diff --git a/.github/ISSUE_TEMPLATE/objective_c.md b/.github/ISSUE_TEMPLATE/objective_c.md new file mode 100644 index 0000000000..63039fbd62 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/objective_c.md @@ -0,0 +1,6 @@ +--- +name: "package:objective_c" +about: "Create a bug or file a feature request against package:objective_c." +labels: "package:objective_c" +--- + diff --git a/.github/labeler.yml b/.github/labeler.yml index 2d7ab38a7b..f67662f37e 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -27,3 +27,7 @@ 'package:native_toolchain_c': - changed-files: - any-glob-to-any-file: 'pkgs/native_toolchain_c/**' + +'package:objective_c': + - changed-files: + - any-glob-to-any-file: 'pkgs/objective_c/**' diff --git a/.github/workflows/ffi.yaml b/.github/workflows/ffi.yaml index b84b5c6bb5..54e94dca38 100644 --- a/.github/workflows/ffi.yaml +++ b/.github/workflows/ffi.yaml @@ -31,8 +31,8 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 - - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b + - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} - id: install @@ -61,8 +61,8 @@ jobs: os: [ubuntu-latest] sdk: [beta, dev] steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 - - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b + - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} - id: install diff --git a/.github/workflows/ffigen.yml b/.github/workflows/ffigen.yml index 3ae5f5c090..1567249520 100644 --- a/.github/workflows/ffigen.yml +++ b/.github/workflows/ffigen.yml @@ -1,17 +1,20 @@ name: ffigen on: - # Run on PRs and pushes to the default branch. + # Run on PRs and pushes to the default branch, in either the ffigen directory, + # or the objective_c directory. push: branches: [main, stable] paths: - '.github/workflows/ffigen.yml' - 'pkgs/ffigen/**' + - 'pkgs/objective_c/**' pull_request: branches: [main, stable] paths: - '.github/workflows/ffigen.yml' - 'pkgs/ffigen/**' + - 'pkgs/objective_c/**' schedule: - cron: "0 0 * * 0" @@ -27,25 +30,22 @@ jobs: working-directory: pkgs/ffigen/ strategy: fail-fast: false - matrix: - sdk: [dev] -# sdk: [3.3.0] steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 - - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b + - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: - sdk: ${{ matrix.sdk }} + flutter-version: 3.19.0 + channel: 'stable' - id: install name: Install dependencies - run: dart pub get && dart pub get --directory="example/shared_bindings" + run: flutter pub get && flutter pub get --directory="example/shared_bindings" - name: Check formatting run: dart format --output=none --set-exit-if-changed . if: always() && steps.install.outcome == 'success' - name: Build test dylib and bindings run: dart test/setup.dart - name: Analyze code - run: dart analyze --fatal-infos - if: always() && steps.install.outcome == 'success' + run: flutter analyze --fatal-infos test-linux: needs: analyze @@ -54,12 +54,13 @@ jobs: run: working-directory: pkgs/ffigen/ steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 - - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b + - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: - sdk: dev #3.3.0 + flutter-version: 3.19.0 + channel: 'stable' - name: Install dependencies - run: dart pub get + run: flutter pub get - name: Install libclang-14-dev run: sudo apt-get install libclang-14-dev - name: Build test dylib and bindings @@ -75,12 +76,13 @@ jobs: run: working-directory: pkgs/ffigen/ steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 - - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b + - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: - sdk: dev #3.3.0 + flutter-version: 3.19.0 + channel: 'stable' - name: Install dependencies - run: dart pub get + run: flutter pub get - name: Build test dylib and bindings run: dart test/setup.dart - name: Run VM tests @@ -97,7 +99,7 @@ jobs: - name: Upload coverage uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 with: - carryforward: "jnigen_tests,jni_tests,native_assets_builder_macos,native_assets_builder_ubuntu,native_assets_builder_windows,native_assets_cli_macos,native_assets_cli_ubuntu,native_assets_cli_windows,native_toolchain_c_macos,native_toolchain_c_ubuntu,native_toolchain_c_windows" + carryforward: "objective_c_tests,ffigen_macos,jnigen_tests,jni_tests,native_assets_builder_macos,native_assets_builder_ubuntu,native_assets_builder_windows,native_assets_cli_macos,native_assets_cli_ubuntu,native_assets_cli_windows,native_toolchain_c_macos,native_toolchain_c_ubuntu,native_toolchain_c_windows" github-token: ${{ secrets.GITHUB_TOKEN }} parallel-finished: true @@ -108,12 +110,13 @@ jobs: run: working-directory: pkgs/ffigen/ steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 - - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b + - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: - sdk: dev #3.3.0 + flutter-version: 3.19.0 + channel: 'stable' - name: Install dependencies - run: dart pub get + run: flutter pub get - name: Build test dylib and bindings run: dart test/setup.dart - name: Run VM tests @@ -136,7 +139,7 @@ jobs: run: working-directory: pkgs/ffigen/ steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: "master" diff --git a/.github/workflows/ffigen_weekly.yml b/.github/workflows/ffigen_weekly.yml index e56b14645a..f710761b25 100644 --- a/.github/workflows/ffigen_weekly.yml +++ b/.github/workflows/ffigen_weekly.yml @@ -14,17 +14,18 @@ env: jobs: # Keep in sync with ffigen.yaml:test-mac test-mac-arm64: - runs-on: 'macos-latest-xlarge' # Arm64. + runs-on: 'macos-14-large' # x64 defaults: run: working-directory: pkgs/ffigen/ steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 - - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b + - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: - sdk: dev #3.3.0 + flutter-version: 3.19.0 + channel: 'stable' - name: Install dependencies - run: dart pub get + run: flutter pub get - name: Build test dylib and bindings run: dart test/setup.dart - name: Run VM tests diff --git a/.github/workflows/health.yaml b/.github/workflows/health.yaml index c6c5dd0417..02f09862fa 100644 --- a/.github/workflows/health.yaml +++ b/.github/workflows/health.yaml @@ -5,7 +5,6 @@ on: # Remove paths after https://github.com/bmw-tech/dart_apitool/issues/177 is addressed. paths: - "pkgs/ffi/**" - - "pkgs/ffigen/**" - "pkgs/native_assets_builder/**" - "pkgs/native_assets_cli/**" - "pkgs/native_toolchain_c/**" diff --git a/.github/workflows/health_jnigen.yaml b/.github/workflows/health_flutter.yaml similarity index 90% rename from .github/workflows/health_jnigen.yaml rename to .github/workflows/health_flutter.yaml index 7d20e2e46e..6432947d05 100644 --- a/.github/workflows/health_jnigen.yaml +++ b/.github/workflows/health_flutter.yaml @@ -4,8 +4,10 @@ on: branches: [ main ] # Merge back into health.yaml after https://github.com/bmw-tech/dart_apitool/issues/177 is addressed. paths: + - "pkgs/ffigen/**" - "pkgs/jni/**" - "pkgs/jnigen/**" + - "pkgs/objective_c/**" types: [opened, synchronize, reopened, labeled, unlabeled] jobs: health: diff --git a/.github/workflows/jnigen.yaml b/.github/workflows/jnigen.yaml index 05d68af04c..77269acb23 100644 --- a/.github/workflows/jnigen.yaml +++ b/.github/workflows/jnigen.yaml @@ -40,7 +40,7 @@ jobs: matrix: sdk: [stable] steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: ${{ matrix.sdk }} @@ -75,7 +75,7 @@ jobs: os: [ubuntu-latest] sdk: [stable, beta] steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: ${{ matrix.sdk }} @@ -105,8 +105,6 @@ jobs: working-directory: ./pkgs/jnigen/java - name: Build summarizer run: dart run jnigen:setup - - name: Generate runtime tests - run: dart run tool/generate_runtime_tests.dart - name: Run VM tests run: dart test --test-randomize-ordering-seed random - name: Install coverage @@ -128,7 +126,7 @@ jobs: run: working-directory: ./pkgs/jni steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: 'stable' @@ -166,7 +164,7 @@ jobs: run: working-directory: ./pkgs/jni steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: 'stable' @@ -215,7 +213,7 @@ jobs: run: working-directory: ./pkgs/jni steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: 'stable' @@ -237,7 +235,7 @@ jobs: run: working-directory: ./pkgs/jnigen steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - name: Setup clang uses: egor-tensin/setup-clang@ef434b41eb33a70396fb336b1bae39c76d740c3d with: @@ -258,8 +256,6 @@ jobs: - run: dart run jnigen:setup - name: Build summarizer run: dart run jnigen:setup - - name: Generate runtime tests - run: dart run tool/generate_runtime_tests.dart - name: Run tests run: dart test --test-randomize-ordering-seed random @@ -270,7 +266,7 @@ jobs: run: working-directory: ./pkgs/jni steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: 'stable' @@ -291,7 +287,7 @@ jobs: run: working-directory: ./pkgs/jnigen steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - name: Setup clang format uses: ConorMacBride/install-package@3e7ad059e07782ee54fa35f827df52aae0626f30 with: @@ -309,8 +305,6 @@ jobs: - run: dart pub get - name: Build summarizer run: dart run jnigen:setup - - name: Generate runtime tests - run: dart run tool/generate_runtime_tests.dart - name: Run tests run: dart test --test-randomize-ordering-seed random @@ -320,7 +314,7 @@ jobs: run: working-directory: ./pkgs/jni/example steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: 'stable' @@ -344,7 +338,7 @@ jobs: run: working-directory: ./pkgs/jni/example steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: 'stable' @@ -364,7 +358,7 @@ jobs: run: working-directory: ./pkgs/jni/example steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 with: distribution: 'zulu' @@ -383,7 +377,7 @@ jobs: run: working-directory: ./pkgs/jnigen/example/pdfbox_plugin steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: 'stable' @@ -424,6 +418,6 @@ jobs: - name: Coveralls finished uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 with: - carryforward: "ffigen_macos,native_assets_builder_macos,native_assets_builder_ubuntu,native_assets_builder_windows,native_assets_cli_macos,native_assets_cli_ubuntu,native_assets_cli_windows,native_toolchain_c_macos,native_toolchain_c_ubuntu,native_toolchain_c_windows" + carryforward: "objective_c_tests,ffigen_macos,jnigen_tests,jni_tests,native_assets_builder_macos,native_assets_builder_ubuntu,native_assets_builder_windows,native_assets_cli_macos,native_assets_cli_ubuntu,native_assets_cli_windows,native_toolchain_c_macos,native_toolchain_c_ubuntu,native_toolchain_c_windows" github-token: ${{ secrets.github_token }} parallel-finished: true diff --git a/.github/workflows/native.yaml b/.github/workflows/native.yaml index 750af4d4fc..b91573b670 100644 --- a/.github/workflows/native.yaml +++ b/.github/workflows/native.yaml @@ -49,16 +49,16 @@ jobs: working-directory: pkgs/${{ matrix.package }} steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} - uses: nttld/setup-ndk@6a7e9c5494a25c4842ca1011f710300132eacd94 with: ndk-version: r26b - if: ${{ matrix.sdk == 'stable' }} + if: ${{ matrix.sdk == 'stable' && matrix.os != 'macos' }} - run: dart pub get @@ -172,6 +172,6 @@ jobs: - name: Upload coverage uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 with: - carryforward: "ffigen_macos,jnigen_tests,jni_tests" + carryforward: "objective_c_tests,ffigen_macos,jnigen_tests,jni_tests,native_assets_builder_macos,native_assets_builder_ubuntu,native_assets_builder_windows,native_assets_cli_macos,native_assets_cli_ubuntu,native_assets_cli_windows,native_toolchain_c_macos,native_toolchain_c_ubuntu,native_toolchain_c_windows" github-token: ${{ secrets.GITHUB_TOKEN }} parallel-finished: true diff --git a/.github/workflows/native_toolchain_c.yaml b/.github/workflows/native_toolchain_c.yaml index 6d29af594e..bc69234404 100644 --- a/.github/workflows/native_toolchain_c.yaml +++ b/.github/workflows/native_toolchain_c.yaml @@ -32,9 +32,9 @@ jobs: working-directory: pkgs/${{ matrix.package }} steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} diff --git a/.github/workflows/objective_c.yaml b/.github/workflows/objective_c.yaml new file mode 100644 index 0000000000..df32492885 --- /dev/null +++ b/.github/workflows/objective_c.yaml @@ -0,0 +1,79 @@ +name: objective_c + +on: + # Run on PRs and pushes to the default branch. + push: + branches: [main, stable] + paths: + - '.github/workflows/objective_c.yml' + - 'pkgs/objective_c/**' + pull_request: + branches: [main, stable] + paths: + - '.github/workflows/objective_c.yml' + - 'pkgs/objective_c/**' + schedule: + - cron: "0 0 * * 0" + +env: + PUB_ENVIRONMENT: bot.github + +jobs: + # Check code formatting and static analysis. + analyze: + runs-on: macos-latest + defaults: + run: + working-directory: pkgs/objective_c/ + strategy: + fail-fast: false + steps: + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b + - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 + with: + flutter-version: 3.19.0 + channel: 'stable' + - id: install + name: Install dependencies + run: flutter pub get + - name: Check formatting + run: dart format --output=none --set-exit-if-changed . + if: always() && steps.install.outcome == 'success' + - name: Analyze code + run: flutter analyze --fatal-infos + if: always() && steps.install.outcome == 'success' + + test-mac: + needs: analyze + runs-on: 'macos-latest' + defaults: + run: + working-directory: pkgs/objective_c/ + steps: + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b + - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 + with: + flutter-version: 3.19.0 + channel: 'stable' + - name: Install dependencies + run: flutter pub get + - name: Build test dylib + # TODO(https://github.com/dart-lang/native/issues/1068): Remove this. + run: dart test/setup.dart + - name: Run VM tests + run: dart test + - name: Collect coverage + run: ./tool/coverage.sh + - name: Upload coverage + uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 + with: + flag-name: objective_c_tests + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel: true + path-to-lcov: pkgs/objective_c/lcov.info + - name: Upload coverage + uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 + with: + carryforward: "objective_c_tests,ffigen_macos,jnigen_tests,jni_tests,native_assets_builder_macos,native_assets_builder_ubuntu,native_assets_builder_windows,native_assets_cli_macos,native_assets_cli_ubuntu,native_assets_cli_windows,native_toolchain_c_macos,native_toolchain_c_ubuntu,native_toolchain_c_windows" + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel-finished: true diff --git a/README.md b/README.md index 499f061ffc..d68ce3ad25 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ building and bundling. | --- | --- | --- | | [ffi](pkgs/ffi/) | Utilities for working with Foreign Function Interface (FFI) code. | [![pub package](https://img.shields.io/pub/v/ffi.svg)](https://pub.dev/packages/ffi) | | [ffigen](pkgs/ffigen/) | Generator for FFI bindings, using LibClang to parse C, Objective-C, and Swift files. | [![pub package](https://img.shields.io/pub/v/ffigen.svg)](https://pub.dev/packages/ffigen) | +| [objective_c](pkgs/objective_c/) | A library to access Objective C from Flutter that acts as a support library for package:ffigen. | [![pub package](https://img.shields.io/pub/v/objective_c.svg)](https://pub.dev/packages/objective_c) | | [jni](pkgs/jni/) | A library to access JNI from Dart and Flutter that acts as a support library for `package:jnigen`. | [![pub package](https://img.shields.io/pub/v/jni.svg)](https://pub.dev/packages/jni) | | [jnigen](pkgs/jnigen/) | A Dart bindings generator for Java and Kotlin that uses JNI under the hood to interop with Java virtual machine. | [![pub package](https://img.shields.io/pub/v/jnigen.svg)](https://pub.dev/packages/jnigen) | | [native_assets_builder](pkgs/native_assets_builder/) | This package is the backend that invokes build hooks. | [![pub package](https://img.shields.io/pub/v/native_assets_builder.svg)](https://pub.dev/packages/native_assets_builder) | diff --git a/pkgs/ffi/lib/src/allocation.dart b/pkgs/ffi/lib/src/allocation.dart index 42021458ad..5611b647d8 100644 --- a/pkgs/ffi/lib/src/allocation.dart +++ b/pkgs/ffi/lib/src/allocation.dart @@ -40,11 +40,11 @@ final WinCoTaskMemFree winCoTaskMemFree = winCoTaskMemFreePointer.asFunction(); /// Manages memory on the native heap. /// -/// Does not initialize newly allocated memory to zero. Use [_CallocAllocator] +/// Does not initialize newly allocated memory to zero. Use [CallocAllocator] /// for zero-initialized memory on allocation. /// /// For POSIX-based systems, this uses `malloc` and `free`. On Windows, it uses -/// `CoTaskMemAlloc`. +/// `CoTaskMemAlloc` and `CoTaskMemFree`. final class MallocAllocator implements Allocator { const MallocAllocator._(); diff --git a/pkgs/ffigen/.gitignore b/pkgs/ffigen/.gitignore index d9616e8fae..e1f3703d7b 100644 --- a/pkgs/ffigen/.gitignore +++ b/pkgs/ffigen/.gitignore @@ -4,6 +4,8 @@ .dart_tool/ .packages pubspec.lock +.flutter-plugins +.flutter-plugins-dependencies # IDE and debugger files. .clangd diff --git a/pkgs/ffigen/CHANGELOG.md b/pkgs/ffigen/CHANGELOG.md index 4003326467..2c5010d9ab 100644 --- a/pkgs/ffigen/CHANGELOG.md +++ b/pkgs/ffigen/CHANGELOG.md @@ -6,6 +6,29 @@ - Add `retainAndReturnPointer` method to ObjC objects and blocks, and add `castFromPointer` method to blocks. - Add `-Wno-nullability-completeness` as default compiler option for MacOS. +- __Breaking change__: Use `package:objective_c` in ObjC bindings. + - ObjC packages will have a flutter dependency (until + https://github.com/dart-lang/native/issues/1068 is fixed). + - Core classes such as `NSString` have been moved intpu `package:objective_c`. + - ObjC class methods don't need the ubiquitous `lib` argument anymore. In + fact, ffigen won't even generate the native library class (unless it needs + to bind top level functions without using `@Native`). It is still necessary + to `DynamicLibrary.open` the dylib though, to load the classes and methods. + - Adapting to this change: + - Update ffigen and re-run the code generation. If the generated code no + longer contains the native library class, it means it isn't needed + anymore. So `final lib = FooNativeLib(DynamicLibrary.open('foo.dylib'));` + must be changed to `DynamicLibrary.open('foo.dylib');`. + - Regardless of whether the native library class still exists, delete the + `lib` parameter from all ObjC object constructors and static method calls + and block constructors. + - If core ObjC classes such as `NSString` are being used, + `package:objective_c` must be imported, as they won't be exported by the + generated bindings. +- Add --[no-]format option to ffigen command line, which controls whether the + formatting step happens. Defaults to true. +- Delete Dart functions associated with ObjC closure blocks when the block is + destroyed. Fixes https://github.com/dart-lang/native/issues/204 ## 11.0.0 diff --git a/pkgs/ffigen/analysis_options.yaml b/pkgs/ffigen/analysis_options.yaml index 0ba641e245..eb3d908603 100644 --- a/pkgs/ffigen/analysis_options.yaml +++ b/pkgs/ffigen/analysis_options.yaml @@ -9,8 +9,12 @@ analyzer: todo: ignore exclude: - 'test/**_expected*' - # Goldens cannot be generated outside MacOS causing analysis errors. - - test/native_objc_test/** + + # Exclude anything that uses package:objective_c, due to flutter dependency. + # https://github.com/dart-lang/native/issues/1068 + - example/objective_c/** + - example/swift/** + - test_flutter/native_objc_test/** language: strict-casts: true strict-inference: true diff --git a/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart b/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart index 0d598f1df4..4016333031 100644 --- a/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart +++ b/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart @@ -1,55717 +1,6307 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field, void_checks, annotate_overrides, no_leading_underscores_for_local_identifiers, library_private_types_in_public_api // 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; - -/// Bindings for AVFAudio. -class AVFAudio { - /// Holds the symbol lookup function. - final ffi.Pointer Function(String symbolName) - _lookup; - - /// The symbols are looked up in [dynamicLibrary]. - AVFAudio(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup; - - /// The symbols are looked up with [lookup]. - AVFAudio.fromLookup( - ffi.Pointer Function(String symbolName) - lookup) - : _lookup = lookup; - - ffi.Pointer _registerName1(String name) { - final cstr = name.toNativeUtf8(); - final sel = _sel_registerName(cstr.cast()); - pkg_ffi.calloc.free(cstr); - return sel; - } - - ffi.Pointer _sel_registerName( - ffi.Pointer str, - ) { - return __sel_registerName( - str, - ); - } - - late final __sel_registerNamePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('sel_registerName'); - late final __sel_registerName = __sel_registerNamePtr - .asFunction Function(ffi.Pointer)>(); - - ffi.Pointer _getClass1(String name) { - final cstr = name.toNativeUtf8(); - final clazz = _objc_getClass(cstr.cast()); - pkg_ffi.calloc.free(cstr); - if (clazz == ffi.nullptr) { - throw Exception('Failed to load Objective-C class: $name'); - } - return clazz; - } - - ffi.Pointer _objc_getClass( - ffi.Pointer str, - ) { - return __objc_getClass( - str, - ); - } - - late final __objc_getClassPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('objc_getClass'); - late final __objc_getClass = __objc_getClassPtr - .asFunction Function(ffi.Pointer)>(); - - ffi.Pointer _objc_retain( - ffi.Pointer value, - ) { - return __objc_retain( - value, - ); - } - - late final __objc_retainPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('objc_retain'); - late final __objc_retain = __objc_retainPtr - .asFunction Function(ffi.Pointer)>(); - - void _objc_release( - ffi.Pointer value, - ) { - return __objc_release( - value, - ); - } - - late final __objc_releasePtr = - _lookup)>>( - 'objc_release'); - late final __objc_release = - __objc_releasePtr.asFunction)>(); - - late final _objc_releaseFinalizer2 = - ffi.NativeFinalizer(__objc_releasePtr.cast()); - late final _class_NSObject1 = _getClass1("NSObject"); - late final _sel_load1 = _registerName1("load"); - void _objc_msgSend_1( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1( - obj, - sel, - ); - } - - late final __objc_msgSend_1Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1 = __objc_msgSend_1Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initialize1 = _registerName1("initialize"); - late final _sel_init1 = _registerName1("init"); - instancetype _objc_msgSend_2( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_2( - obj, - sel, - ); - } - - late final __objc_msgSend_2Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_2 = __objc_msgSend_2Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_new1 = _registerName1("new"); - late final _sel_allocWithZone_1 = _registerName1("allocWithZone:"); - instancetype _objc_msgSend_3( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_NSZone> zone, - ) { - return __objc_msgSend_3( - obj, - sel, - zone, - ); - } - - late final __objc_msgSend_3Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_NSZone>)>>('objc_msgSend'); - late final __objc_msgSend_3 = __objc_msgSend_3Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_NSZone>)>(); - - late final _sel_alloc1 = _registerName1("alloc"); - late final _sel_dealloc1 = _registerName1("dealloc"); - late final _sel_finalize1 = _registerName1("finalize"); - late final _sel_copy1 = _registerName1("copy"); - late final _sel_mutableCopy1 = _registerName1("mutableCopy"); - late final _sel_copyWithZone_1 = _registerName1("copyWithZone:"); - late final _sel_mutableCopyWithZone_1 = - _registerName1("mutableCopyWithZone:"); - late final _sel_instancesRespondToSelector_1 = - _registerName1("instancesRespondToSelector:"); - bool _objc_msgSend_4( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ) { - return __objc_msgSend_4( - obj, - sel, - aSelector, - ); - } - - late final __objc_msgSend_4Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_4 = __objc_msgSend_4Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - bool _objc_msgSend_0( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer clazz, - ) { - return __objc_msgSend_0( - obj, - sel, - clazz, - ); - } - - late final __objc_msgSend_0Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_0 = __objc_msgSend_0Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_isKindOfClass_1 = _registerName1("isKindOfClass:"); - late final _class_Protocol1 = _getClass1("Protocol"); - late final _sel_conformsToProtocol_1 = _registerName1("conformsToProtocol:"); - bool _objc_msgSend_5( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer protocol, - ) { - return __objc_msgSend_5( - obj, - sel, - protocol, - ); - } - - late final __objc_msgSend_5Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_5 = __objc_msgSend_5Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_methodForSelector_1 = _registerName1("methodForSelector:"); - ffi.Pointer> _objc_msgSend_6( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ) { - return __objc_msgSend_6( - obj, - sel, - aSelector, - ); - } - - late final __objc_msgSend_6Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_6 = __objc_msgSend_6Ptr.asFunction< - ffi.Pointer> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_instanceMethodForSelector_1 = - _registerName1("instanceMethodForSelector:"); - late final _sel_doesNotRecognizeSelector_1 = - _registerName1("doesNotRecognizeSelector:"); - void _objc_msgSend_7( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ) { - return __objc_msgSend_7( - obj, - sel, - aSelector, - ); - } - - late final __objc_msgSend_7Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_7 = __objc_msgSend_7Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_forwardingTargetForSelector_1 = - _registerName1("forwardingTargetForSelector:"); - ffi.Pointer _objc_msgSend_8( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ) { - return __objc_msgSend_8( - obj, - sel, - aSelector, - ); - } - - late final __objc_msgSend_8Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_8 = __objc_msgSend_8Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSInvocation1 = _getClass1("NSInvocation"); - late final _class_NSMethodSignature1 = _getClass1("NSMethodSignature"); - late final _sel_signatureWithObjCTypes_1 = - _registerName1("signatureWithObjCTypes:"); - ffi.Pointer _objc_msgSend_9( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer types, - ) { - return __objc_msgSend_9( - obj, - sel, - types, - ); - } - - late final __objc_msgSend_9Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_9 = __objc_msgSend_9Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_numberOfArguments1 = _registerName1("numberOfArguments"); - int _objc_msgSend_10( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_10( - obj, - sel, - ); - } - - late final __objc_msgSend_10Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_10 = __objc_msgSend_10Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_getArgumentTypeAtIndex_1 = - _registerName1("getArgumentTypeAtIndex:"); - ffi.Pointer _objc_msgSend_11( - ffi.Pointer obj, - ffi.Pointer sel, - int idx, - ) { - return __objc_msgSend_11( - obj, - sel, - idx, - ); - } - - late final __objc_msgSend_11Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_11 = __objc_msgSend_11Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_frameLength1 = _registerName1("frameLength"); - late final _sel_isOneway1 = _registerName1("isOneway"); - bool _objc_msgSend_12( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_12( - obj, - sel, - ); - } - - late final __objc_msgSend_12Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_12 = __objc_msgSend_12Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_methodReturnType1 = _registerName1("methodReturnType"); - ffi.Pointer _objc_msgSend_13( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_13( - obj, - sel, - ); - } - - late final __objc_msgSend_13Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_13 = __objc_msgSend_13Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_methodReturnLength1 = _registerName1("methodReturnLength"); - late final _sel_cancelPreviousPerformRequestsWithTarget_selector_object_1 = - _registerName1( - "cancelPreviousPerformRequestsWithTarget:selector:object:"); - void _objc_msgSend_14( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aTarget, - ffi.Pointer aSelector, - ffi.Pointer anArgument, - ) { - return __objc_msgSend_14( - obj, - sel, - aTarget, - aSelector, - anArgument, - ); - } - - late final __objc_msgSend_14Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_14 = __objc_msgSend_14Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_cancelPreviousPerformRequestsWithTarget_1 = - _registerName1("cancelPreviousPerformRequestsWithTarget:"); - void _objc_msgSend_15( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aTarget, - ) { - return __objc_msgSend_15( - obj, - sel, - aTarget, - ); - } - - late final __objc_msgSend_15Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_15 = __objc_msgSend_15Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_accessInstanceVariablesDirectly1 = - _registerName1("accessInstanceVariablesDirectly"); - late final _sel_useStoredAccessor1 = _registerName1("useStoredAccessor"); - late final _class_NSSet1 = _getClass1("NSSet"); - late final _sel_count1 = _registerName1("count"); - late final _sel_member_1 = _registerName1("member:"); - ffi.Pointer _objc_msgSend_16( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer object, - ) { - return __objc_msgSend_16( - obj, - sel, - object, - ); - } - - late final __objc_msgSend_16Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_16 = __objc_msgSend_16Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSEnumerator1 = _getClass1("NSEnumerator"); - late final _sel_nextObject1 = _registerName1("nextObject"); - ffi.Pointer _objc_msgSend_17( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_17( - obj, - sel, - ); - } - - late final __objc_msgSend_17Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_17 = __objc_msgSend_17Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_allObjects1 = _registerName1("allObjects"); - late final _class_NSString1 = _getClass1("NSString"); - late final _sel_length1 = _registerName1("length"); - late final _sel_characterAtIndex_1 = _registerName1("characterAtIndex:"); - int _objc_msgSend_18( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ) { - return __objc_msgSend_18( - obj, - sel, - index, - ); - } - - late final __objc_msgSend_18Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedShort Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_18 = __objc_msgSend_18Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _class_NSCoder1 = _getClass1("NSCoder"); - late final _sel_encodeValueOfObjCType_at_1 = - _registerName1("encodeValueOfObjCType:at:"); - void _objc_msgSend_19( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer type, - ffi.Pointer addr, - ) { - return __objc_msgSend_19( - obj, - sel, - type, - addr, - ); - } - - late final __objc_msgSend_19Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_19 = __objc_msgSend_19Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSData1 = _getClass1("NSData"); - late final _sel_bytes1 = _registerName1("bytes"); - ffi.Pointer _objc_msgSend_20( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_20( - obj, - sel, - ); - } - - late final __objc_msgSend_20Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_20 = __objc_msgSend_20Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_description1 = _registerName1("description"); - ffi.Pointer _objc_msgSend_21( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_21( - obj, - sel, - ); - } - - late final __objc_msgSend_21Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_21 = __objc_msgSend_21Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_getBytes_length_1 = _registerName1("getBytes:length:"); - void _objc_msgSend_22( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - int length, - ) { - return __objc_msgSend_22( - obj, - sel, - buffer, - length, - ); - } - - late final __objc_msgSend_22Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_22 = __objc_msgSend_22Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_getBytes_range_1 = _registerName1("getBytes:range:"); - void _objc_msgSend_23( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - _NSRange range, - ) { - return __objc_msgSend_23( - obj, - sel, - buffer, - range, - ); - } - - late final __objc_msgSend_23Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_23 = __objc_msgSend_23Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>(); - - late final _sel_isEqualToData_1 = _registerName1("isEqualToData:"); - bool _objc_msgSend_24( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - ) { - return __objc_msgSend_24( - obj, - sel, - other, - ); - } - - late final __objc_msgSend_24Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_24 = __objc_msgSend_24Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_subdataWithRange_1 = _registerName1("subdataWithRange:"); - ffi.Pointer _objc_msgSend_25( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_25( - obj, - sel, - range, - ); - } - - late final __objc_msgSend_25Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_25 = __objc_msgSend_25Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _sel_writeToFile_atomically_1 = - _registerName1("writeToFile:atomically:"); - bool _objc_msgSend_26( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool useAuxiliaryFile, - ) { - return __objc_msgSend_26( - obj, - sel, - path, - useAuxiliaryFile, - ); - } - - late final __objc_msgSend_26Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_26 = __objc_msgSend_26Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _class_NSURL1 = _getClass1("NSURL"); - late final _sel_initWithScheme_host_path_1 = - _registerName1("initWithScheme:host:path:"); - instancetype _objc_msgSend_27( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer scheme, - ffi.Pointer host, - ffi.Pointer path, - ) { - return __objc_msgSend_27( - obj, - sel, - scheme, - host, - path, - ); - } - - late final __objc_msgSend_27Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_27 = __objc_msgSend_27Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initFileURLWithPath_isDirectory_relativeToURL_1 = - _registerName1("initFileURLWithPath:isDirectory:relativeToURL:"); - instancetype _objc_msgSend_28( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_28( - obj, - sel, - path, - isDir, - baseURL, - ); - } - - late final __objc_msgSend_28Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_28 = __objc_msgSend_28Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool, ffi.Pointer)>(); - - late final _sel_initFileURLWithPath_relativeToURL_1 = - _registerName1("initFileURLWithPath:relativeToURL:"); - instancetype _objc_msgSend_29( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_29( - obj, - sel, - path, - baseURL, - ); - } - - late final __objc_msgSend_29Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_29 = __objc_msgSend_29Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initFileURLWithPath_isDirectory_1 = - _registerName1("initFileURLWithPath:isDirectory:"); - instancetype _objc_msgSend_30( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ) { - return __objc_msgSend_30( - obj, - sel, - path, - isDir, - ); - } - - late final __objc_msgSend_30Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_30 = __objc_msgSend_30Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_initFileURLWithPath_1 = - _registerName1("initFileURLWithPath:"); - instancetype _objc_msgSend_31( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ) { - return __objc_msgSend_31( - obj, - sel, - path, - ); - } - - late final __objc_msgSend_31Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_31 = __objc_msgSend_31Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_fileURLWithPath_isDirectory_relativeToURL_1 = - _registerName1("fileURLWithPath:isDirectory:relativeToURL:"); - ffi.Pointer _objc_msgSend_32( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_32( - obj, - sel, - path, - isDir, - baseURL, - ); - } - - late final __objc_msgSend_32Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_32 = __objc_msgSend_32Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); - - late final _sel_fileURLWithPath_relativeToURL_1 = - _registerName1("fileURLWithPath:relativeToURL:"); - ffi.Pointer _objc_msgSend_33( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_33( - obj, - sel, - path, - baseURL, - ); - } - - late final __objc_msgSend_33Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_33 = __objc_msgSend_33Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_fileURLWithPath_isDirectory_1 = - _registerName1("fileURLWithPath:isDirectory:"); - ffi.Pointer _objc_msgSend_34( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ) { - return __objc_msgSend_34( - obj, - sel, - path, - isDir, - ); - } - - late final __objc_msgSend_34Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_34 = __objc_msgSend_34Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_fileURLWithPath_1 = _registerName1("fileURLWithPath:"); - ffi.Pointer _objc_msgSend_35( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ) { - return __objc_msgSend_35( - obj, - sel, - path, - ); - } - - late final __objc_msgSend_35Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_35 = __objc_msgSend_35Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = - _registerName1( - "initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); - instancetype _objc_msgSend_36( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_36( - obj, - sel, - path, - isDir, - baseURL, - ); - } - - late final __objc_msgSend_36Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_36 = __objc_msgSend_36Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool, ffi.Pointer)>(); - - late final _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = - _registerName1( - "fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); - ffi.Pointer _objc_msgSend_37( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_37( - obj, - sel, - path, - isDir, - baseURL, - ); - } - - late final __objc_msgSend_37Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_37 = __objc_msgSend_37Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); - - late final _sel_initWithString_1 = _registerName1("initWithString:"); - instancetype _objc_msgSend_38( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer URLString, - ) { - return __objc_msgSend_38( - obj, - sel, - URLString, - ); - } - - late final __objc_msgSend_38Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(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)>(); - - late final _sel_initWithString_relativeToURL_1 = - _registerName1("initWithString:relativeToURL:"); - instancetype _objc_msgSend_39( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer URLString, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_39( - obj, - sel, - URLString, - baseURL, - ); - } - - late final __objc_msgSend_39Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_39 = __objc_msgSend_39Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_URLWithString_1 = _registerName1("URLWithString:"); - late final _sel_URLWithString_relativeToURL_1 = - _registerName1("URLWithString:relativeToURL:"); - late final _sel_initWithString_encodingInvalidCharacters_1 = - _registerName1("initWithString:encodingInvalidCharacters:"); - instancetype _objc_msgSend_40( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer URLString, - bool encodingInvalidCharacters, - ) { - return __objc_msgSend_40( - obj, - sel, - URLString, - encodingInvalidCharacters, - ); - } - - late final __objc_msgSend_40Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_40 = __objc_msgSend_40Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_URLWithString_encodingInvalidCharacters_1 = - _registerName1("URLWithString:encodingInvalidCharacters:"); - late final _sel_initWithDataRepresentation_relativeToURL_1 = - _registerName1("initWithDataRepresentation:relativeToURL:"); - instancetype _objc_msgSend_41( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_41( - obj, - sel, - data, - baseURL, - ); - } - - late final __objc_msgSend_41Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_41 = __objc_msgSend_41Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_URLWithDataRepresentation_relativeToURL_1 = - _registerName1("URLWithDataRepresentation:relativeToURL:"); - ffi.Pointer _objc_msgSend_42( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_42( - obj, - sel, - data, - baseURL, - ); - } - - late final __objc_msgSend_42Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_42 = __objc_msgSend_42Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1 = - _registerName1("initAbsoluteURLWithDataRepresentation:relativeToURL:"); - late final _sel_absoluteURLWithDataRepresentation_relativeToURL_1 = - _registerName1("absoluteURLWithDataRepresentation:relativeToURL:"); - late final _sel_dataRepresentation1 = _registerName1("dataRepresentation"); - ffi.Pointer _objc_msgSend_43( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_43( - obj, - sel, - ); - } - - late final __objc_msgSend_43Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_43 = __objc_msgSend_43Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_absoluteString1 = _registerName1("absoluteString"); - ffi.Pointer _objc_msgSend_44( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_44( - obj, - sel, - ); - } - - late final __objc_msgSend_44Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_44 = __objc_msgSend_44Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_relativeString1 = _registerName1("relativeString"); - late final _sel_baseURL1 = _registerName1("baseURL"); - ffi.Pointer _objc_msgSend_45( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_45( - obj, - sel, - ); - } - - late final __objc_msgSend_45Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_45 = __objc_msgSend_45Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_absoluteURL1 = _registerName1("absoluteURL"); - late final _sel_scheme1 = _registerName1("scheme"); - late final _sel_resourceSpecifier1 = _registerName1("resourceSpecifier"); - late final _sel_host1 = _registerName1("host"); - late final _class_NSNumber1 = _getClass1("NSNumber"); - late final _class_NSValue1 = _getClass1("NSValue"); - late final _sel_getValue_size_1 = _registerName1("getValue:size:"); - late final _sel_objCType1 = _registerName1("objCType"); - late final _sel_initWithBytes_objCType_1 = - _registerName1("initWithBytes:objCType:"); - instancetype _objc_msgSend_46( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer type, - ) { - return __objc_msgSend_46( - obj, - sel, - value, - type, - ); - } - - late final __objc_msgSend_46Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_46 = __objc_msgSend_46Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithCoder_1 = _registerName1("initWithCoder:"); - instancetype _objc_msgSend_47( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer coder, - ) { - return __objc_msgSend_47( - obj, - sel, - coder, - ); - } - - late final __objc_msgSend_47Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_47 = __objc_msgSend_47Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_valueWithBytes_objCType_1 = - _registerName1("valueWithBytes:objCType:"); - ffi.Pointer _objc_msgSend_48( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer type, - ) { - return __objc_msgSend_48( - obj, - sel, - value, - type, - ); - } - - late final __objc_msgSend_48Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_48 = __objc_msgSend_48Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_value_withObjCType_1 = _registerName1("value:withObjCType:"); - late final _sel_valueWithNonretainedObject_1 = - _registerName1("valueWithNonretainedObject:"); - ffi.Pointer _objc_msgSend_49( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - ) { - return __objc_msgSend_49( - obj, - sel, - anObject, - ); - } - - late final __objc_msgSend_49Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_49 = __objc_msgSend_49Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_nonretainedObjectValue1 = - _registerName1("nonretainedObjectValue"); - late final _sel_valueWithPointer_1 = _registerName1("valueWithPointer:"); - ffi.Pointer _objc_msgSend_50( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer pointer, - ) { - return __objc_msgSend_50( - obj, - sel, - pointer, - ); - } - - late final __objc_msgSend_50Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(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)>(); - - late final _sel_pointerValue1 = _registerName1("pointerValue"); - late final _sel_isEqualToValue_1 = _registerName1("isEqualToValue:"); - bool _objc_msgSend_51( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_51( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_51Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_51 = __objc_msgSend_51Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_getValue_1 = _registerName1("getValue:"); - void _objc_msgSend_52( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_52( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_52Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_52 = __objc_msgSend_52Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_valueWithRange_1 = _registerName1("valueWithRange:"); - ffi.Pointer _objc_msgSend_53( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_53( - obj, - sel, - range, - ); - } - - late final __objc_msgSend_53Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_53 = __objc_msgSend_53Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _sel_rangeValue1 = _registerName1("rangeValue"); - late final _objc_msgSend_useVariants1 = ffi.Abi.current() == ffi.Abi.iosX64 || - ffi.Abi.current() == ffi.Abi.macosX64; - _NSRange _objc_msgSend_54( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_54( - obj, - sel, - ); - } - - late final __objc_msgSend_54Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_54 = __objc_msgSend_54Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer)>(); - - void _objc_msgSend_54_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_54_stret( - stret, - obj, - sel, - ); - } - - late final __objc_msgSend_54_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_54_stret = __objc_msgSend_54_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_valueWithPoint_1 = _registerName1("valueWithPoint:"); - ffi.Pointer _objc_msgSend_55( - ffi.Pointer obj, - ffi.Pointer sel, - CGPoint point, - ) { - return __objc_msgSend_55( - obj, - sel, - point, - ); - } - - late final __objc_msgSend_55Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, CGPoint)>>('objc_msgSend'); - late final __objc_msgSend_55 = __objc_msgSend_55Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, CGPoint)>(); - - late final _sel_valueWithSize_1 = _registerName1("valueWithSize:"); - ffi.Pointer _objc_msgSend_56( - ffi.Pointer obj, - ffi.Pointer sel, - CGSize size, - ) { - return __objc_msgSend_56( - obj, - sel, - size, - ); - } - - late final __objc_msgSend_56Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, CGSize)>>('objc_msgSend'); - late final __objc_msgSend_56 = __objc_msgSend_56Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, CGSize)>(); - - late final _sel_valueWithRect_1 = _registerName1("valueWithRect:"); - ffi.Pointer _objc_msgSend_57( - ffi.Pointer obj, - ffi.Pointer sel, - CGRect rect, - ) { - return __objc_msgSend_57( - obj, - sel, - rect, - ); - } - - late final __objc_msgSend_57Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, CGRect)>>('objc_msgSend'); - late final __objc_msgSend_57 = __objc_msgSend_57Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, CGRect)>(); - - late final _sel_valueWithEdgeInsets_1 = - _registerName1("valueWithEdgeInsets:"); - ffi.Pointer _objc_msgSend_58( - ffi.Pointer obj, - ffi.Pointer sel, - NSEdgeInsets insets, - ) { - return __objc_msgSend_58( - obj, - sel, - insets, - ); - } - - late final __objc_msgSend_58Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSEdgeInsets)>>('objc_msgSend'); - late final __objc_msgSend_58 = __objc_msgSend_58Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSEdgeInsets)>(); - - late final _sel_pointValue1 = _registerName1("pointValue"); - CGPoint _objc_msgSend_59( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_59( - obj, - sel, - ); - } - - late final __objc_msgSend_59Ptr = _lookup< - ffi.NativeFunction< - CGPoint Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_59 = __objc_msgSend_59Ptr.asFunction< - CGPoint Function(ffi.Pointer, ffi.Pointer)>(); - - void _objc_msgSend_59_stret( - ffi.Pointer stret, - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_59_stret( - stret, - obj, - sel, - ); - } - - late final __objc_msgSend_59_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_59_stret = __objc_msgSend_59_stretPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_sizeValue1 = _registerName1("sizeValue"); - CGSize _objc_msgSend_60( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_60( - obj, - sel, - ); - } - - late final __objc_msgSend_60Ptr = _lookup< - ffi.NativeFunction< - CGSize Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_60 = __objc_msgSend_60Ptr.asFunction< - CGSize Function(ffi.Pointer, ffi.Pointer)>(); - - void _objc_msgSend_60_stret( - ffi.Pointer stret, - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_60_stret( - stret, - obj, - sel, - ); - } - - late final __objc_msgSend_60_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_60_stret = __objc_msgSend_60_stretPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_rectValue1 = _registerName1("rectValue"); - CGRect _objc_msgSend_61( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_61( - obj, - sel, - ); - } - - late final __objc_msgSend_61Ptr = _lookup< - ffi.NativeFunction< - CGRect Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_61 = __objc_msgSend_61Ptr.asFunction< - CGRect Function(ffi.Pointer, ffi.Pointer)>(); - - void _objc_msgSend_61_stret( - ffi.Pointer stret, - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_61_stret( - stret, - obj, - sel, - ); - } - - late final __objc_msgSend_61_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_61_stret = __objc_msgSend_61_stretPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_edgeInsetsValue1 = _registerName1("edgeInsetsValue"); - NSEdgeInsets _objc_msgSend_62( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_62( - obj, - sel, - ); - } - - late final __objc_msgSend_62Ptr = _lookup< - ffi.NativeFunction< - NSEdgeInsets Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_62 = __objc_msgSend_62Ptr.asFunction< - NSEdgeInsets Function(ffi.Pointer, ffi.Pointer)>(); - - void _objc_msgSend_62_stret( - ffi.Pointer stret, - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_62_stret( - stret, - obj, - sel, - ); - } - - late final __objc_msgSend_62_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_62_stret = __objc_msgSend_62_stretPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_keyPathsForValuesAffectingValueForKey_1 = - _registerName1("keyPathsForValuesAffectingValueForKey:"); - ffi.Pointer _objc_msgSend_63( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_63( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_63Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_63 = __objc_msgSend_63Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_automaticallyNotifiesObserversForKey_1 = - _registerName1("automaticallyNotifiesObserversForKey:"); - bool _objc_msgSend_64( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_64( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_64Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_64 = __objc_msgSend_64Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSArray1 = _getClass1("NSArray"); - late final _sel_objectAtIndex_1 = _registerName1("objectAtIndex:"); - ffi.Pointer _objc_msgSend_65( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ) { - return __objc_msgSend_65( - obj, - sel, - index, - ); - } - - late final __objc_msgSend_65Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_65 = __objc_msgSend_65Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithObjects_count_1 = - _registerName1("initWithObjects:count:"); - instancetype _objc_msgSend_66( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - int cnt, - ) { - return __objc_msgSend_66( - obj, - sel, - objects, - cnt, - ); - } - - late final __objc_msgSend_66Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_66 = __objc_msgSend_66Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, int)>(); - - late final _sel_arrayByAddingObject_1 = - _registerName1("arrayByAddingObject:"); - ffi.Pointer _objc_msgSend_67( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - ) { - return __objc_msgSend_67( - obj, - sel, - anObject, - ); - } - - late final __objc_msgSend_67Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_67 = __objc_msgSend_67Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_arrayByAddingObjectsFromArray_1 = - _registerName1("arrayByAddingObjectsFromArray:"); - ffi.Pointer _objc_msgSend_68( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherArray, - ) { - return __objc_msgSend_68( - obj, - sel, - otherArray, - ); - } - - late final __objc_msgSend_68Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_68 = __objc_msgSend_68Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_componentsJoinedByString_1 = - _registerName1("componentsJoinedByString:"); - ffi.Pointer _objc_msgSend_69( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer separator, - ) { - return __objc_msgSend_69( - obj, - sel, - separator, - ); - } - - late final __objc_msgSend_69Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_69 = __objc_msgSend_69Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_containsObject_1 = _registerName1("containsObject:"); - late final _sel_descriptionWithLocale_1 = - _registerName1("descriptionWithLocale:"); - ffi.Pointer _objc_msgSend_70( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer locale, - ) { - return __objc_msgSend_70( - obj, - sel, - locale, - ); - } - - late final __objc_msgSend_70Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_70 = __objc_msgSend_70Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_descriptionWithLocale_indent_1 = - _registerName1("descriptionWithLocale:indent:"); - ffi.Pointer _objc_msgSend_71( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer locale, - int level, - ) { - return __objc_msgSend_71( - obj, - sel, - locale, - level, - ); - } - - late final __objc_msgSend_71Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_71 = __objc_msgSend_71Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_firstObjectCommonWithArray_1 = - _registerName1("firstObjectCommonWithArray:"); - ffi.Pointer _objc_msgSend_72( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherArray, - ) { - return __objc_msgSend_72( - obj, - sel, - otherArray, - ); - } - - late final __objc_msgSend_72Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_72 = __objc_msgSend_72Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_getObjects_range_1 = _registerName1("getObjects:range:"); - void _objc_msgSend_73( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - _NSRange range, - ) { - return __objc_msgSend_73( - obj, - sel, - objects, - range, - ); - } - - late final __objc_msgSend_73Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_73 = __objc_msgSend_73Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, _NSRange)>(); - - late final _sel_indexOfObject_1 = _registerName1("indexOfObject:"); - int _objc_msgSend_74( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - ) { - return __objc_msgSend_74( - obj, - sel, - anObject, - ); - } - - late final __objc_msgSend_74Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_74 = __objc_msgSend_74Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_indexOfObject_inRange_1 = - _registerName1("indexOfObject:inRange:"); - int _objc_msgSend_75( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - _NSRange range, - ) { - return __objc_msgSend_75( - obj, - sel, - anObject, - range, - ); - } - - late final __objc_msgSend_75Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_75 = __objc_msgSend_75Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>(); - - late final _sel_indexOfObjectIdenticalTo_1 = - _registerName1("indexOfObjectIdenticalTo:"); - late final _sel_indexOfObjectIdenticalTo_inRange_1 = - _registerName1("indexOfObjectIdenticalTo:inRange:"); - late final _sel_isEqualToArray_1 = _registerName1("isEqualToArray:"); - bool _objc_msgSend_76( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherArray, - ) { - return __objc_msgSend_76( - obj, - sel, - otherArray, - ); - } - - late final __objc_msgSend_76Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_76 = __objc_msgSend_76Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_firstObject1 = _registerName1("firstObject"); - late final _sel_lastObject1 = _registerName1("lastObject"); - late final _sel_objectEnumerator1 = _registerName1("objectEnumerator"); - ffi.Pointer _objc_msgSend_77( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_77( - obj, - sel, - ); - } - - late final __objc_msgSend_77Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_77 = __objc_msgSend_77Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - 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_78( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context, - ) { - return __objc_msgSend_78( - obj, - sel, - comparator, - context, - ); - } - - late final __objc_msgSend_78Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_78 = __objc_msgSend_78Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>(); - - late final _sel_sortedArrayUsingFunction_context_hint_1 = - _registerName1("sortedArrayUsingFunction:context:hint:"); - ffi.Pointer _objc_msgSend_79( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context, - ffi.Pointer hint, - ) { - return __objc_msgSend_79( - obj, - sel, - comparator, - context, - hint, - ); - } - - late final __objc_msgSend_79Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_79 = __objc_msgSend_79Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_sortedArrayUsingSelector_1 = - _registerName1("sortedArrayUsingSelector:"); - ffi.Pointer _objc_msgSend_80( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer comparator, - ) { - return __objc_msgSend_80( - obj, - sel, - comparator, - ); - } - - late final __objc_msgSend_80Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_80 = __objc_msgSend_80Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_subarrayWithRange_1 = _registerName1("subarrayWithRange:"); - ffi.Pointer _objc_msgSend_81( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_81( - obj, - sel, - range, - ); - } - - late final __objc_msgSend_81Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_81 = __objc_msgSend_81Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _class_NSError1 = _getClass1("NSError"); - late final _sel_initWithDomain_code_userInfo_1 = - _registerName1("initWithDomain:code:userInfo:"); - instancetype _objc_msgSend_82( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer domain, - int code, - ffi.Pointer dict, - ) { - return __objc_msgSend_82( - obj, - sel, - domain, - code, - dict, - ); - } - - late final __objc_msgSend_82Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_82 = __objc_msgSend_82Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_errorWithDomain_code_userInfo_1 = - _registerName1("errorWithDomain:code:userInfo:"); - late final _sel_domain1 = _registerName1("domain"); - late final _sel_code1 = _registerName1("code"); - int _objc_msgSend_83( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_83( - obj, - sel, - ); - } - - late final __objc_msgSend_83Ptr = _lookup< - ffi.NativeFunction< - ffi.Long 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_userInfo1 = _registerName1("userInfo"); - late final _sel_localizedDescription1 = - _registerName1("localizedDescription"); - late final _sel_localizedFailureReason1 = - _registerName1("localizedFailureReason"); - late final _sel_localizedRecoverySuggestion1 = - _registerName1("localizedRecoverySuggestion"); - late final _sel_localizedRecoveryOptions1 = - _registerName1("localizedRecoveryOptions"); - ffi.Pointer _objc_msgSend_84( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_84( - obj, - sel, - ); - } - - late final __objc_msgSend_84Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_84 = __objc_msgSend_84Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_recoveryAttempter1 = _registerName1("recoveryAttempter"); - late final _sel_helpAnchor1 = _registerName1("helpAnchor"); - late final _sel_underlyingErrors1 = _registerName1("underlyingErrors"); - ffi.Pointer _objc_msgSend_85( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_85( - obj, - sel, - ); - } - - late final __objc_msgSend_85Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_85 = __objc_msgSend_85Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - ffi.Pointer<_ObjCBlockDesc> _newBlockDesc1() { - final d = - pkg_ffi.calloc.allocate<_ObjCBlockDesc>(ffi.sizeOf<_ObjCBlockDesc>()); - d.ref.reserved = 0; - d.ref.size = ffi.sizeOf<_ObjCBlock>(); - d.ref.copy_helper = ffi.nullptr; - d.ref.dispose_helper = ffi.nullptr; - d.ref.signature = ffi.nullptr; - return d; - } - - late final _objc_block_desc1 = _newBlockDesc1(); - late final _objc_concrete_global_block1 = - _lookup('_NSConcreteGlobalBlock'); - ffi.Pointer<_ObjCBlock> _newBlock1( - ffi.Pointer invoke, ffi.Pointer target) { - final b = pkg_ffi.calloc.allocate<_ObjCBlock>(ffi.sizeOf<_ObjCBlock>()); - b.ref.isa = _objc_concrete_global_block1; - b.ref.flags = 0; - b.ref.reserved = 0; - b.ref.invoke = invoke; - b.ref.target = target; - b.ref.descriptor = _objc_block_desc1; - final copy = _Block_copy(b.cast()).cast<_ObjCBlock>(); - pkg_ffi.calloc.free(b); - return copy; - } - - ffi.Pointer _Block_copy( - ffi.Pointer value, - ) { - return __Block_copy( - value, - ); - } - - late final __Block_copyPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('_Block_copy'); - late final __Block_copy = __Block_copyPtr - .asFunction Function(ffi.Pointer)>(); - - void _Block_release( - ffi.Pointer value, - ) { - return __Block_release( - value, - ); - } - - late final __Block_releasePtr = - _lookup)>>( - '_Block_release'); - late final __Block_release = - __Block_releasePtr.asFunction)>(); - - late final _objc_releaseFinalizer11 = - ffi.NativeFinalizer(__Block_releasePtr.cast()); - late final _sel_setUserInfoValueProviderForDomain_provider_1 = - _registerName1("setUserInfoValueProviderForDomain:provider:"); - void _objc_msgSend_86( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer errorDomain, - ffi.Pointer<_ObjCBlock> provider, - ) { - return __objc_msgSend_86( - obj, - sel, - errorDomain, - provider, - ); - } - - late final __objc_msgSend_86Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_86 = __objc_msgSend_86Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_userInfoValueProviderForDomain_1 = - _registerName1("userInfoValueProviderForDomain:"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_87( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer err, - ffi.Pointer userInfoKey, - ffi.Pointer errorDomain, - ) { - return __objc_msgSend_87( - obj, - sel, - err, - userInfoKey, - errorDomain, - ); - } - - late final __objc_msgSend_87Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_87 = __objc_msgSend_87Ptr.asFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_setKeys_triggerChangeNotificationsForDependentKey_1 = - _registerName1("setKeys:triggerChangeNotificationsForDependentKey:"); - void _objc_msgSend_88( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer dependentKey, - ) { - return __objc_msgSend_88( - obj, - sel, - keys, - dependentKey, - ); - } - - late final __objc_msgSend_88Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_88 = __objc_msgSend_88Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_classFallbacksForKeyedArchiver1 = - _registerName1("classFallbacksForKeyedArchiver"); - late final _sel_classForKeyedUnarchiver1 = - _registerName1("classForKeyedUnarchiver"); - late final _sel_writeToURL_error_1 = _registerName1("writeToURL:error:"); - bool _objc_msgSend_89( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> error, - ) { - return __objc_msgSend_89( - obj, - sel, - url, - error, - ); - } - - late final __objc_msgSend_89Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_89 = __objc_msgSend_89Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_makeObjectsPerformSelector_1 = - _registerName1("makeObjectsPerformSelector:"); - late final _sel_makeObjectsPerformSelector_withObject_1 = - _registerName1("makeObjectsPerformSelector:withObject:"); - void _objc_msgSend_90( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ffi.Pointer argument, - ) { - return __objc_msgSend_90( - obj, - sel, - aSelector, - argument, - ); - } - - late final __objc_msgSend_90Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_90 = __objc_msgSend_90Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSIndexSet1 = _getClass1("NSIndexSet"); - late final _sel_indexSet1 = _registerName1("indexSet"); - late final _sel_indexSetWithIndex_1 = _registerName1("indexSetWithIndex:"); - late final _sel_indexSetWithIndexesInRange_1 = - _registerName1("indexSetWithIndexesInRange:"); - instancetype _objc_msgSend_91( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_91( - obj, - sel, - range, - ); - } - - late final __objc_msgSend_91Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_91 = __objc_msgSend_91Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _sel_initWithIndexesInRange_1 = - _registerName1("initWithIndexesInRange:"); - late final _sel_initWithIndexSet_1 = _registerName1("initWithIndexSet:"); - instancetype _objc_msgSend_92( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexSet, - ) { - return __objc_msgSend_92( - obj, - sel, - indexSet, - ); - } - - late final __objc_msgSend_92Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_92 = __objc_msgSend_92Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithIndex_1 = _registerName1("initWithIndex:"); - late final _sel_isEqualToIndexSet_1 = _registerName1("isEqualToIndexSet:"); - bool _objc_msgSend_93( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexSet, - ) { - return __objc_msgSend_93( - obj, - sel, - indexSet, - ); - } - - late final __objc_msgSend_93Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_93 = __objc_msgSend_93Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_firstIndex1 = _registerName1("firstIndex"); - late final _sel_lastIndex1 = _registerName1("lastIndex"); - late final _sel_indexGreaterThanIndex_1 = - _registerName1("indexGreaterThanIndex:"); - int _objc_msgSend_94( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_94( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_94Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_94 = __objc_msgSend_94Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_indexLessThanIndex_1 = _registerName1("indexLessThanIndex:"); - late final _sel_indexGreaterThanOrEqualToIndex_1 = - _registerName1("indexGreaterThanOrEqualToIndex:"); - late final _sel_indexLessThanOrEqualToIndex_1 = - _registerName1("indexLessThanOrEqualToIndex:"); - late final _sel_getIndexes_maxCount_inIndexRange_1 = - _registerName1("getIndexes:maxCount:inIndexRange:"); - int _objc_msgSend_95( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexBuffer, - int bufferSize, - ffi.Pointer<_NSRange> range, - ) { - return __objc_msgSend_95( - obj, - sel, - indexBuffer, - bufferSize, - range, - ); - } - - late final __objc_msgSend_95Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_NSRange>)>>('objc_msgSend'); - late final __objc_msgSend_95 = __objc_msgSend_95Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_NSRange>)>(); - - late final _sel_countOfIndexesInRange_1 = - _registerName1("countOfIndexesInRange:"); - int _objc_msgSend_96( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_96( - obj, - sel, - range, - ); - } - - late final __objc_msgSend_96Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_96 = __objc_msgSend_96Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _sel_containsIndex_1 = _registerName1("containsIndex:"); - bool _objc_msgSend_97( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_97( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_97Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_97 = __objc_msgSend_97Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_containsIndexesInRange_1 = - _registerName1("containsIndexesInRange:"); - bool _objc_msgSend_98( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_98( - obj, - sel, - range, - ); - } - - late final __objc_msgSend_98Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_98 = __objc_msgSend_98Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _sel_containsIndexes_1 = _registerName1("containsIndexes:"); - late final _sel_intersectsIndexesInRange_1 = - _registerName1("intersectsIndexesInRange:"); - late final _sel_enumerateIndexesUsingBlock_1 = - _registerName1("enumerateIndexesUsingBlock:"); - void _objc_msgSend_99( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_99( - obj, - sel, - block, - ); - } - - late final __objc_msgSend_99Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_99 = __objc_msgSend_99Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_enumerateIndexesWithOptions_usingBlock_1 = - _registerName1("enumerateIndexesWithOptions:usingBlock:"); - void _objc_msgSend_100( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_100( - obj, - sel, - opts, - block, - ); - } - - late final __objc_msgSend_100Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_100 = __objc_msgSend_100Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_enumerateIndexesInRange_options_usingBlock_1 = - _registerName1("enumerateIndexesInRange:options:usingBlock:"); - void _objc_msgSend_101( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_101( - obj, - sel, - range, - opts, - block, - ); - } - - late final __objc_msgSend_101Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_101 = __objc_msgSend_101Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexPassingTest_1 = _registerName1("indexPassingTest:"); - int _objc_msgSend_102( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_102( - obj, - sel, - predicate, - ); - } - - late final __objc_msgSend_102Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_102 = __objc_msgSend_102Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexWithOptions_passingTest_1 = - _registerName1("indexWithOptions:passingTest:"); - int _objc_msgSend_103( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_103( - obj, - sel, - opts, - predicate, - ); - } - - late final __objc_msgSend_103Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_103 = __objc_msgSend_103Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexInRange_options_passingTest_1 = - _registerName1("indexInRange:options:passingTest:"); - int _objc_msgSend_104( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_104( - obj, - sel, - range, - opts, - predicate, - ); - } - - late final __objc_msgSend_104Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_104 = __objc_msgSend_104Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, _NSRange, int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexesPassingTest_1 = _registerName1("indexesPassingTest:"); - ffi.Pointer _objc_msgSend_105( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_105( - obj, - sel, - predicate, - ); - } - - late final __objc_msgSend_105Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_105 = __objc_msgSend_105Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexesWithOptions_passingTest_1 = - _registerName1("indexesWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_106( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_106( - obj, - sel, - opts, - predicate, - ); - } - - late final __objc_msgSend_106Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_106 = __objc_msgSend_106Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexesInRange_options_passingTest_1 = - _registerName1("indexesInRange:options:passingTest:"); - ffi.Pointer _objc_msgSend_107( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_107( - obj, - sel, - range, - opts, - predicate, - ); - } - - late final __objc_msgSend_107Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_107 = __objc_msgSend_107Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_enumerateRangesUsingBlock_1 = - _registerName1("enumerateRangesUsingBlock:"); - void _objc_msgSend_108( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_108( - obj, - sel, - block, - ); - } - - late final __objc_msgSend_108Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_108 = __objc_msgSend_108Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_enumerateRangesWithOptions_usingBlock_1 = - _registerName1("enumerateRangesWithOptions:usingBlock:"); - void _objc_msgSend_109( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_109( - obj, - sel, - opts, - block, - ); - } - - late final __objc_msgSend_109Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_109 = __objc_msgSend_109Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_enumerateRangesInRange_options_usingBlock_1 = - _registerName1("enumerateRangesInRange:options:usingBlock:"); - void _objc_msgSend_110( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_110( - obj, - sel, - range, - opts, - block, - ); - } - - late final __objc_msgSend_110Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_110 = __objc_msgSend_110Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_objectsAtIndexes_1 = _registerName1("objectsAtIndexes:"); - ffi.Pointer _objc_msgSend_111( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexes, - ) { - return __objc_msgSend_111( - obj, - sel, - indexes, - ); - } - - late final __objc_msgSend_111Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_111 = __objc_msgSend_111Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_objectAtIndexedSubscript_1 = - _registerName1("objectAtIndexedSubscript:"); - late final _sel_enumerateObjectsUsingBlock_1 = - _registerName1("enumerateObjectsUsingBlock:"); - void _objc_msgSend_112( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_112( - obj, - sel, - block, - ); - } - - late final __objc_msgSend_112Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_112 = __objc_msgSend_112Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_enumerateObjectsWithOptions_usingBlock_1 = - _registerName1("enumerateObjectsWithOptions:usingBlock:"); - void _objc_msgSend_113( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_113( - obj, - sel, - opts, - block, - ); - } - - late final __objc_msgSend_113Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_113 = __objc_msgSend_113Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_enumerateObjectsAtIndexes_options_usingBlock_1 = - _registerName1("enumerateObjectsAtIndexes:options:usingBlock:"); - void _objc_msgSend_114( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer s, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_114( - obj, - sel, - s, - opts, - block, - ); - } - - late final __objc_msgSend_114Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_114 = __objc_msgSend_114Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexOfObjectPassingTest_1 = - _registerName1("indexOfObjectPassingTest:"); - int _objc_msgSend_115( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_115( - obj, - sel, - predicate, - ); - } - - late final __objc_msgSend_115Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_115 = __objc_msgSend_115Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexOfObjectWithOptions_passingTest_1 = - _registerName1("indexOfObjectWithOptions:passingTest:"); - int _objc_msgSend_116( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_116( - obj, - sel, - opts, - predicate, - ); - } - - late final __objc_msgSend_116Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_116 = __objc_msgSend_116Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexOfObjectAtIndexes_options_passingTest_1 = - _registerName1("indexOfObjectAtIndexes:options:passingTest:"); - int _objc_msgSend_117( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer s, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_117( - obj, - sel, - s, - opts, - predicate, - ); - } - - late final __objc_msgSend_117Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_117 = __objc_msgSend_117Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexesOfObjectsPassingTest_1 = - _registerName1("indexesOfObjectsPassingTest:"); - ffi.Pointer _objc_msgSend_118( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_118( - obj, - sel, - predicate, - ); - } - - late final __objc_msgSend_118Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_118 = __objc_msgSend_118Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexesOfObjectsWithOptions_passingTest_1 = - _registerName1("indexesOfObjectsWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_119( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_119( - obj, - sel, - opts, - predicate, - ); - } - - late final __objc_msgSend_119Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_119 = __objc_msgSend_119Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexesOfObjectsAtIndexes_options_passingTest_1 = - _registerName1("indexesOfObjectsAtIndexes:options:passingTest:"); - ffi.Pointer _objc_msgSend_120( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer s, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_120( - obj, - sel, - s, - opts, - predicate, - ); - } - - late final __objc_msgSend_120Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_120 = __objc_msgSend_120Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_sortedArrayUsingComparator_1 = - _registerName1("sortedArrayUsingComparator:"); - ffi.Pointer _objc_msgSend_121( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> cmptr, - ) { - return __objc_msgSend_121( - obj, - sel, - cmptr, - ); - } - - late final __objc_msgSend_121Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_121 = __objc_msgSend_121Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_sortedArrayWithOptions_usingComparator_1 = - _registerName1("sortedArrayWithOptions:usingComparator:"); - ffi.Pointer _objc_msgSend_122( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> cmptr, - ) { - return __objc_msgSend_122( - obj, - sel, - opts, - cmptr, - ); - } - - late final __objc_msgSend_122Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_122 = __objc_msgSend_122Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexOfObject_inSortedRange_options_usingComparator_1 = - _registerName1("indexOfObject:inSortedRange:options:usingComparator:"); - int _objc_msgSend_123( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer obj1, - _NSRange r, - int opts, - ffi.Pointer<_ObjCBlock> cmp, - ) { - return __objc_msgSend_123( - obj, - sel, - obj1, - r, - opts, - cmp, - ); - } - - late final __objc_msgSend_123Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_123 = __objc_msgSend_123Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_array1 = _registerName1("array"); - late final _sel_arrayWithObject_1 = _registerName1("arrayWithObject:"); - instancetype _objc_msgSend_124( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - ) { - return __objc_msgSend_124( - obj, - sel, - anObject, - ); - } - - late final __objc_msgSend_124Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_124 = __objc_msgSend_124Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_arrayWithObjects_count_1 = - _registerName1("arrayWithObjects:count:"); - late final _sel_arrayWithObjects_1 = _registerName1("arrayWithObjects:"); - late final _sel_arrayWithArray_1 = _registerName1("arrayWithArray:"); - instancetype _objc_msgSend_125( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer array, - ) { - return __objc_msgSend_125( - obj, - sel, - array, - ); - } - - late final __objc_msgSend_125Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_125 = __objc_msgSend_125Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithObjects_1 = _registerName1("initWithObjects:"); - late final _sel_initWithArray_1 = _registerName1("initWithArray:"); - late final _sel_initWithArray_copyItems_1 = - _registerName1("initWithArray:copyItems:"); - instancetype _objc_msgSend_126( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer array, - bool flag, - ) { - return __objc_msgSend_126( - obj, - sel, - array, - flag, - ); - } - - late final __objc_msgSend_126Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_126 = __objc_msgSend_126Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_initWithContentsOfURL_error_1 = - _registerName1("initWithContentsOfURL:error:"); - ffi.Pointer _objc_msgSend_127( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> error, - ) { - return __objc_msgSend_127( - obj, - sel, - url, - error, - ); - } - - late final __objc_msgSend_127Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_127 = __objc_msgSend_127Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_arrayWithContentsOfURL_error_1 = - _registerName1("arrayWithContentsOfURL:error:"); - late final _sel_differenceFromArray_withOptions_usingEquivalenceTest_1 = - _registerName1("differenceFromArray:withOptions:usingEquivalenceTest:"); - ffi.Pointer _objc_msgSend_128( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - int options, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_128( - obj, - sel, - other, - options, - block, - ); - } - - late final __objc_msgSend_128Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_128 = __objc_msgSend_128Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_differenceFromArray_withOptions_1 = - _registerName1("differenceFromArray:withOptions:"); - ffi.Pointer _objc_msgSend_129( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - int options, - ) { - return __objc_msgSend_129( - obj, - sel, - other, - options, - ); - } - - late final __objc_msgSend_129Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_129 = __objc_msgSend_129Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_differenceFromArray_1 = - _registerName1("differenceFromArray:"); - late final _sel_arrayByApplyingDifference_1 = - _registerName1("arrayByApplyingDifference:"); - ffi.Pointer _objc_msgSend_130( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer difference, - ) { - return __objc_msgSend_130( - obj, - sel, - difference, - ); - } - - late final __objc_msgSend_130Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_130 = __objc_msgSend_130Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_getObjects_1 = _registerName1("getObjects:"); - void _objc_msgSend_131( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - ) { - return __objc_msgSend_131( - obj, - sel, - objects, - ); - } - - late final __objc_msgSend_131Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_131 = __objc_msgSend_131Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_arrayWithContentsOfFile_1 = - _registerName1("arrayWithContentsOfFile:"); - ffi.Pointer _objc_msgSend_132( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ) { - return __objc_msgSend_132( - obj, - sel, - path, - ); - } - - late final __objc_msgSend_132Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_132 = __objc_msgSend_132Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_arrayWithContentsOfURL_1 = - _registerName1("arrayWithContentsOfURL:"); - ffi.Pointer _objc_msgSend_133( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ) { - return __objc_msgSend_133( - obj, - sel, - url, - ); - } - - late final __objc_msgSend_133Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_133 = __objc_msgSend_133Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithContentsOfFile_1 = - _registerName1("initWithContentsOfFile:"); - late final _sel_initWithContentsOfURL_1 = - _registerName1("initWithContentsOfURL:"); - late final _sel_writeToURL_atomically_1 = - _registerName1("writeToURL:atomically:"); - bool _objc_msgSend_134( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - bool atomically, - ) { - return __objc_msgSend_134( - obj, - sel, - url, - atomically, - ); - } - - late final __objc_msgSend_134Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_134 = __objc_msgSend_134Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_pathsMatchingExtensions_1 = - _registerName1("pathsMatchingExtensions:"); - late final _sel_valueForKey_1 = _registerName1("valueForKey:"); - late final _sel_setValue_forKey_1 = _registerName1("setValue:forKey:"); - void _objc_msgSend_135( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer key, - ) { - return __objc_msgSend_135( - obj, - sel, - value, - key, - ); - } - - late final __objc_msgSend_135Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_135 = __objc_msgSend_135Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_addObserver_toObjectsAtIndexes_forKeyPath_options_context_1 = - _registerName1( - "addObserver:toObjectsAtIndexes:forKeyPath:options:context:"); - void _objc_msgSend_136( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer observer, - ffi.Pointer indexes, - ffi.Pointer keyPath, - int options, - ffi.Pointer context, - ) { - return __objc_msgSend_136( - obj, - sel, - observer, - indexes, - keyPath, - options, - context, - ); - } - - late final __objc_msgSend_136Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_136 = __objc_msgSend_136Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - late final _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_context_1 = - _registerName1("removeObserver:fromObjectsAtIndexes:forKeyPath:context:"); - void _objc_msgSend_137( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer observer, - ffi.Pointer indexes, - ffi.Pointer keyPath, - ffi.Pointer context, - ) { - return __objc_msgSend_137( - obj, - sel, - observer, - indexes, - keyPath, - context, - ); - } - - late final __objc_msgSend_137Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_137 = __objc_msgSend_137Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_1 = - _registerName1("removeObserver:fromObjectsAtIndexes:forKeyPath:"); - void _objc_msgSend_138( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer observer, - ffi.Pointer indexes, - ffi.Pointer keyPath, - ) { - return __objc_msgSend_138( - obj, - sel, - observer, - indexes, - keyPath, - ); - } - - late final __objc_msgSend_138Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_138 = __objc_msgSend_138Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_addObserver_forKeyPath_options_context_1 = - _registerName1("addObserver:forKeyPath:options:context:"); - void _objc_msgSend_139( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer observer, - ffi.Pointer keyPath, - int options, - ffi.Pointer context, - ) { - return __objc_msgSend_139( - obj, - sel, - observer, - keyPath, - options, - context, - ); - } - - late final __objc_msgSend_139Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_139 = __objc_msgSend_139Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - late final _sel_removeObserver_forKeyPath_context_1 = - _registerName1("removeObserver:forKeyPath:context:"); - void _objc_msgSend_140( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer observer, - ffi.Pointer keyPath, - ffi.Pointer context, - ) { - return __objc_msgSend_140( - obj, - sel, - observer, - keyPath, - context, - ); - } - - late final __objc_msgSend_140Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_140 = __objc_msgSend_140Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_removeObserver_forKeyPath_1 = - _registerName1("removeObserver:forKeyPath:"); - void _objc_msgSend_141( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer observer, - ffi.Pointer keyPath, - ) { - return __objc_msgSend_141( - obj, - sel, - observer, - keyPath, - ); - } - - late final __objc_msgSend_141Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_141 = __objc_msgSend_141Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_sortedArrayUsingDescriptors_1 = - _registerName1("sortedArrayUsingDescriptors:"); - late final _class_NSPredicate1 = _getClass1("NSPredicate"); - late final _sel_predicateWithFormat_argumentArray_1 = - _registerName1("predicateWithFormat:argumentArray:"); - ffi.Pointer _objc_msgSend_142( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer predicateFormat, - ffi.Pointer arguments, - ) { - return __objc_msgSend_142( - obj, - sel, - predicateFormat, - arguments, - ); - } - - late final __objc_msgSend_142Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_142 = __objc_msgSend_142Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_predicateWithFormat_1 = - _registerName1("predicateWithFormat:"); - ffi.Pointer _objc_msgSend_143( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer predicateFormat, - ) { - return __objc_msgSend_143( - obj, - sel, - predicateFormat, - ); - } - - late final __objc_msgSend_143Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_143 = __objc_msgSend_143Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_predicateWithFormat_arguments_1 = - _registerName1("predicateWithFormat:arguments:"); - ffi.Pointer _objc_msgSend_144( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer predicateFormat, - ffi.Pointer<__va_list_tag> argList, - ) { - return __objc_msgSend_144( - obj, - sel, - predicateFormat, - argList, - ); - } - - late final __objc_msgSend_144Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>('objc_msgSend'); - late final __objc_msgSend_144 = __objc_msgSend_144Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>(); - - late final _sel_predicateFromMetadataQueryString_1 = - _registerName1("predicateFromMetadataQueryString:"); - ffi.Pointer _objc_msgSend_145( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer queryString, - ) { - return __objc_msgSend_145( - obj, - sel, - queryString, - ); - } - - late final __objc_msgSend_145Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(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)>(); - - late final _sel_predicateWithValue_1 = _registerName1("predicateWithValue:"); - ffi.Pointer _objc_msgSend_146( - ffi.Pointer obj, - ffi.Pointer sel, - bool value, - ) { - return __objc_msgSend_146( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_146Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_146 = __objc_msgSend_146Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _class_NSDictionary1 = _getClass1("NSDictionary"); - late final _sel_objectForKey_1 = _registerName1("objectForKey:"); - late final _sel_keyEnumerator1 = _registerName1("keyEnumerator"); - late final _sel_initWithObjects_forKeys_count_1 = - _registerName1("initWithObjects:forKeys:count:"); - instancetype _objc_msgSend_147( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt, - ) { - return __objc_msgSend_147( - obj, - sel, - objects, - keys, - cnt, - ); - } - - late final __objc_msgSend_147Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_147 = __objc_msgSend_147Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - int)>(); - - late final _sel_allKeys1 = _registerName1("allKeys"); - 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_148( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherDictionary, - ) { - return __objc_msgSend_148( - obj, - sel, - otherDictionary, - ); - } - - late final __objc_msgSend_148Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_148 = __objc_msgSend_148Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_objectsForKeys_notFoundMarker_1 = - _registerName1("objectsForKeys:notFoundMarker:"); - ffi.Pointer _objc_msgSend_149( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer marker, - ) { - return __objc_msgSend_149( - obj, - sel, - keys, - marker, - ); - } - - late final __objc_msgSend_149Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_149 = __objc_msgSend_149Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_keysSortedByValueUsingSelector_1 = - _registerName1("keysSortedByValueUsingSelector:"); - late final _sel_getObjects_andKeys_count_1 = - _registerName1("getObjects:andKeys:count:"); - void _objc_msgSend_150( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - ffi.Pointer> keys, - int count, - ) { - return __objc_msgSend_150( - obj, - sel, - objects, - keys, - count, - ); - } - - late final __objc_msgSend_150Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_150 = __objc_msgSend_150Ptr.asFunction< - void 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_151( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_151( - obj, - sel, - block, - ); - } - - late final __objc_msgSend_151Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_151 = __objc_msgSend_151Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_enumerateKeysAndObjectsWithOptions_usingBlock_1 = - _registerName1("enumerateKeysAndObjectsWithOptions:usingBlock:"); - void _objc_msgSend_152( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_152( - obj, - sel, - opts, - block, - ); - } - - late final __objc_msgSend_152Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_152 = __objc_msgSend_152Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_keysSortedByValueUsingComparator_1 = - _registerName1("keysSortedByValueUsingComparator:"); - late final _sel_keysSortedByValueWithOptions_usingComparator_1 = - _registerName1("keysSortedByValueWithOptions:usingComparator:"); - late final _sel_keysOfEntriesPassingTest_1 = - _registerName1("keysOfEntriesPassingTest:"); - ffi.Pointer _objc_msgSend_153( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_153( - obj, - sel, - predicate, - ); - } - - 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_keysOfEntriesWithOptions_passingTest_1 = - _registerName1("keysOfEntriesWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_154( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_154( - obj, - sel, - opts, - predicate, - ); - } - - late final __objc_msgSend_154Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_154 = __objc_msgSend_154Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_getObjects_andKeys_1 = _registerName1("getObjects:andKeys:"); - void _objc_msgSend_155( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - ffi.Pointer> keys, - ) { - return __objc_msgSend_155( - obj, - sel, - objects, - keys, - ); - } - - late final __objc_msgSend_155Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_155 = __objc_msgSend_155Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _sel_dictionaryWithContentsOfFile_1 = - _registerName1("dictionaryWithContentsOfFile:"); - ffi.Pointer _objc_msgSend_156( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ) { - return __objc_msgSend_156( - obj, - sel, - path, - ); - } - - late final __objc_msgSend_156Ptr = _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)>(); - - late final _sel_dictionaryWithContentsOfURL_1 = - _registerName1("dictionaryWithContentsOfURL:"); - ffi.Pointer _objc_msgSend_157( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ) { - return __objc_msgSend_157( - obj, - sel, - url, - ); - } - - late final __objc_msgSend_157Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_157 = __objc_msgSend_157Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_dictionary1 = _registerName1("dictionary"); - late final _sel_dictionaryWithObject_forKey_1 = - _registerName1("dictionaryWithObject:forKey:"); - instancetype _objc_msgSend_158( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer object, - ffi.Pointer key, - ) { - return __objc_msgSend_158( - obj, - sel, - object, - key, - ); - } - - late final __objc_msgSend_158Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_158 = __objc_msgSend_158Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_dictionaryWithObjects_forKeys_count_1 = - _registerName1("dictionaryWithObjects:forKeys:count:"); - late final _sel_dictionaryWithObjectsAndKeys_1 = - _registerName1("dictionaryWithObjectsAndKeys:"); - late final _sel_dictionaryWithDictionary_1 = - _registerName1("dictionaryWithDictionary:"); - instancetype _objc_msgSend_159( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer dict, - ) { - return __objc_msgSend_159( - obj, - sel, - dict, - ); - } - - late final __objc_msgSend_159Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_159 = __objc_msgSend_159Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_dictionaryWithObjects_forKeys_1 = - _registerName1("dictionaryWithObjects:forKeys:"); - instancetype _objc_msgSend_160( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer objects, - ffi.Pointer keys, - ) { - return __objc_msgSend_160( - obj, - sel, - objects, - keys, - ); - } - - late final __objc_msgSend_160Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_160 = __objc_msgSend_160Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithObjectsAndKeys_1 = - _registerName1("initWithObjectsAndKeys:"); - late final _sel_initWithDictionary_1 = _registerName1("initWithDictionary:"); - late final _sel_initWithDictionary_copyItems_1 = - _registerName1("initWithDictionary:copyItems:"); - instancetype _objc_msgSend_161( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherDictionary, - bool flag, - ) { - return __objc_msgSend_161( - obj, - sel, - otherDictionary, - flag, - ); - } - - late final __objc_msgSend_161Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_161 = __objc_msgSend_161Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_initWithObjects_forKeys_1 = - _registerName1("initWithObjects:forKeys:"); - ffi.Pointer _objc_msgSend_162( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> error, - ) { - return __objc_msgSend_162( - obj, - sel, - url, - error, - ); - } - - late final __objc_msgSend_162Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - 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, - 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_163( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer state, - ffi.Pointer> buffer, - int len, - ) { - return __objc_msgSend_163( - obj, - sel, - state, - buffer, - len, - ); - } - - late final __objc_msgSend_163Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_163 = __objc_msgSend_163Ptr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - int)>(); - - late final _sel_fileSize1 = _registerName1("fileSize"); - int _objc_msgSend_164( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_164( - obj, - sel, - ); - } - - late final __objc_msgSend_164Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLongLong Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_164 = __objc_msgSend_164Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSDate1 = _getClass1("NSDate"); - late final _sel_timeIntervalSinceReferenceDate1 = - _registerName1("timeIntervalSinceReferenceDate"); - double _objc_msgSend_165( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_165( - obj, - sel, - ); - } - - late final __objc_msgSend_165Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_165 = __objc_msgSend_165Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer)>(); - - double _objc_msgSend_165_fpret( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_165_fpret( - obj, - sel, - ); - } - - late final __objc_msgSend_165_fpretPtr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_fpret'); - late final __objc_msgSend_165_fpret = __objc_msgSend_165_fpretPtr.asFunction< - double Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithTimeIntervalSinceReferenceDate_1 = - _registerName1("initWithTimeIntervalSinceReferenceDate:"); - instancetype _objc_msgSend_166( - ffi.Pointer obj, - ffi.Pointer sel, - double ti, - ) { - return __objc_msgSend_166( - obj, - sel, - ti, - ); - } - - late final __objc_msgSend_166Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_166 = __objc_msgSend_166Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, double)>(); - - late final _sel_timeIntervalSinceDate_1 = - _registerName1("timeIntervalSinceDate:"); - double _objc_msgSend_167( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anotherDate, - ) { - return __objc_msgSend_167( - obj, - sel, - anotherDate, - ); - } - - late final __objc_msgSend_167Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_167 = __objc_msgSend_167Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - double _objc_msgSend_167_fpret( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anotherDate, - ) { - return __objc_msgSend_167_fpret( - obj, - sel, - anotherDate, - ); - } - - late final __objc_msgSend_167_fpretPtr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_fpret'); - late final __objc_msgSend_167_fpret = __objc_msgSend_167_fpretPtr.asFunction< - double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_timeIntervalSinceNow1 = - _registerName1("timeIntervalSinceNow"); - late final _sel_timeIntervalSince19701 = - _registerName1("timeIntervalSince1970"); - late final _sel_addTimeInterval_1 = _registerName1("addTimeInterval:"); - late final _sel_dateByAddingTimeInterval_1 = - _registerName1("dateByAddingTimeInterval:"); - late final _sel_earlierDate_1 = _registerName1("earlierDate:"); - ffi.Pointer _objc_msgSend_168( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anotherDate, - ) { - return __objc_msgSend_168( - obj, - sel, - anotherDate, - ); - } - - late final __objc_msgSend_168Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_168 = __objc_msgSend_168Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_laterDate_1 = _registerName1("laterDate:"); - late final _sel_compare_1 = _registerName1("compare:"); - int _objc_msgSend_169( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - ) { - return __objc_msgSend_169( - obj, - sel, - other, - ); - } - - late final __objc_msgSend_169Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_169 = __objc_msgSend_169Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_isEqualToDate_1 = _registerName1("isEqualToDate:"); - bool _objc_msgSend_170( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherDate, - ) { - return __objc_msgSend_170( - obj, - sel, - otherDate, - ); - } - - late final __objc_msgSend_170Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_170 = __objc_msgSend_170Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _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_171( - ffi.Pointer obj, - ffi.Pointer sel, - double secsToBeAdded, - ffi.Pointer date, - ) { - return __objc_msgSend_171( - obj, - sel, - secsToBeAdded, - date, - ); - } - - late final __objc_msgSend_171Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Double, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_171 = __objc_msgSend_171Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - double, ffi.Pointer)>(); - - late final _sel_distantFuture1 = _registerName1("distantFuture"); - ffi.Pointer _objc_msgSend_172( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_172( - obj, - sel, - ); - } - - late final __objc_msgSend_172Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_172 = __objc_msgSend_172Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_distantPast1 = _registerName1("distantPast"); - late final _sel_now1 = _registerName1("now"); - late final _sel_initWithTimeIntervalSinceNow_1 = - _registerName1("initWithTimeIntervalSinceNow:"); - late final _sel_initWithTimeIntervalSince1970_1 = - _registerName1("initWithTimeIntervalSince1970:"); - late final _sel_initWithTimeInterval_sinceDate_1 = - _registerName1("initWithTimeInterval:sinceDate:"); - late final _sel_dateWithNaturalLanguageString_locale_1 = - _registerName1("dateWithNaturalLanguageString:locale:"); - ffi.Pointer _objc_msgSend_173( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - ffi.Pointer locale, - ) { - return __objc_msgSend_173( - obj, - sel, - string, - locale, - ); - } - - late final __objc_msgSend_173Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_173 = __objc_msgSend_173Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_dateWithNaturalLanguageString_1 = - _registerName1("dateWithNaturalLanguageString:"); - late final _sel_dateWithString_1 = _registerName1("dateWithString:"); - late final _class_NSCalendarDate1 = _getClass1("NSCalendarDate"); - late final _sel_calendarDate1 = _registerName1("calendarDate"); - late final _sel_dateWithString_calendarFormat_locale_1 = - _registerName1("dateWithString:calendarFormat:locale:"); - ffi.Pointer _objc_msgSend_174( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer description, - ffi.Pointer format, - ffi.Pointer locale, - ) { - return __objc_msgSend_174( - obj, - sel, - description, - format, - locale, - ); - } - - late final __objc_msgSend_174Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_174 = __objc_msgSend_174Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_dateWithString_calendarFormat_1 = - _registerName1("dateWithString:calendarFormat:"); - ffi.Pointer _objc_msgSend_175( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer description, - ffi.Pointer format, - ) { - return __objc_msgSend_175( - obj, - sel, - description, - format, - ); - } - - late final __objc_msgSend_175Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_175 = __objc_msgSend_175Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSTimeZone1 = _getClass1("NSTimeZone"); - late final _sel_name1 = _registerName1("name"); - late final _sel_data1 = _registerName1("data"); - late final _sel_secondsFromGMTForDate_1 = - _registerName1("secondsFromGMTForDate:"); - int _objc_msgSend_176( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aDate, - ) { - return __objc_msgSend_176( - obj, - sel, - aDate, - ); - } - - late final __objc_msgSend_176Ptr = _lookup< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_176 = __objc_msgSend_176Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_abbreviationForDate_1 = - _registerName1("abbreviationForDate:"); - ffi.Pointer _objc_msgSend_177( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aDate, - ) { - return __objc_msgSend_177( - obj, - sel, - aDate, - ); - } - - late final __objc_msgSend_177Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(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)>(); - - late final _sel_isDaylightSavingTimeForDate_1 = - _registerName1("isDaylightSavingTimeForDate:"); - late final _sel_daylightSavingTimeOffsetForDate_1 = - _registerName1("daylightSavingTimeOffsetForDate:"); - late final _sel_nextDaylightSavingTimeTransitionAfterDate_1 = - _registerName1("nextDaylightSavingTimeTransitionAfterDate:"); - ffi.Pointer _objc_msgSend_178( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aDate, - ) { - return __objc_msgSend_178( - obj, - sel, - aDate, - ); - } - - late final __objc_msgSend_178Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_178 = __objc_msgSend_178Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_systemTimeZone1 = _registerName1("systemTimeZone"); - ffi.Pointer _objc_msgSend_179( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_179( - obj, - sel, - ); - } - - late final __objc_msgSend_179Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_179 = __objc_msgSend_179Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_resetSystemTimeZone1 = _registerName1("resetSystemTimeZone"); - late final _sel_defaultTimeZone1 = _registerName1("defaultTimeZone"); - late final _sel_setDefaultTimeZone_1 = _registerName1("setDefaultTimeZone:"); - void _objc_msgSend_180( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_180( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_180Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_180 = __objc_msgSend_180Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_localTimeZone1 = _registerName1("localTimeZone"); - late final _sel_knownTimeZoneNames1 = _registerName1("knownTimeZoneNames"); - late final _sel_abbreviationDictionary1 = - _registerName1("abbreviationDictionary"); - ffi.Pointer _objc_msgSend_181( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_181( - obj, - sel, - ); - } - - late final __objc_msgSend_181Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_181 = __objc_msgSend_181Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setAbbreviationDictionary_1 = - _registerName1("setAbbreviationDictionary:"); - void _objc_msgSend_182( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_182( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_182Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_182 = __objc_msgSend_182Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_timeZoneDataVersion1 = _registerName1("timeZoneDataVersion"); - late final _sel_secondsFromGMT1 = _registerName1("secondsFromGMT"); - late final _sel_abbreviation1 = _registerName1("abbreviation"); - late final _sel_isDaylightSavingTime1 = - _registerName1("isDaylightSavingTime"); - late final _sel_daylightSavingTimeOffset1 = - _registerName1("daylightSavingTimeOffset"); - late final _sel_nextDaylightSavingTimeTransition1 = - _registerName1("nextDaylightSavingTimeTransition"); - ffi.Pointer _objc_msgSend_183( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_183( - obj, - sel, - ); - } - - late final __objc_msgSend_183Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_183 = __objc_msgSend_183Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_isEqualToTimeZone_1 = _registerName1("isEqualToTimeZone:"); - bool _objc_msgSend_184( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aTimeZone, - ) { - return __objc_msgSend_184( - obj, - sel, - aTimeZone, - ); - } - - late final __objc_msgSend_184Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_184 = __objc_msgSend_184Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSLocale1 = _getClass1("NSLocale"); - late final _sel_displayNameForKey_value_1 = - _registerName1("displayNameForKey:value:"); - ffi.Pointer _objc_msgSend_185( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ffi.Pointer value, - ) { - return __objc_msgSend_185( - obj, - sel, - key, - value, - ); - } - - late final __objc_msgSend_185Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_185 = __objc_msgSend_185Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithLocaleIdentifier_1 = - _registerName1("initWithLocaleIdentifier:"); - late final _sel_localeIdentifier1 = _registerName1("localeIdentifier"); - late final _sel_localizedStringForLocaleIdentifier_1 = - _registerName1("localizedStringForLocaleIdentifier:"); - late final _sel_languageCode1 = _registerName1("languageCode"); - late final _sel_localizedStringForLanguageCode_1 = - _registerName1("localizedStringForLanguageCode:"); - ffi.Pointer _objc_msgSend_186( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer languageCode, - ) { - return __objc_msgSend_186( - obj, - sel, - languageCode, - ); - } - - late final __objc_msgSend_186Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_186 = __objc_msgSend_186Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_languageIdentifier1 = _registerName1("languageIdentifier"); - late final _sel_countryCode1 = _registerName1("countryCode"); - late final _sel_localizedStringForCountryCode_1 = - _registerName1("localizedStringForCountryCode:"); - late final _sel_regionCode1 = _registerName1("regionCode"); - late final _sel_scriptCode1 = _registerName1("scriptCode"); - late final _sel_localizedStringForScriptCode_1 = - _registerName1("localizedStringForScriptCode:"); - late final _sel_variantCode1 = _registerName1("variantCode"); - late final _sel_localizedStringForVariantCode_1 = - _registerName1("localizedStringForVariantCode:"); - late final _class_NSCharacterSet1 = _getClass1("NSCharacterSet"); - late final _sel_controlCharacterSet1 = _registerName1("controlCharacterSet"); - ffi.Pointer _objc_msgSend_187( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_187( - obj, - sel, - ); - } - - late final __objc_msgSend_187Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_187 = __objc_msgSend_187Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _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_188( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange aRange, - ) { - return __objc_msgSend_188( - obj, - sel, - aRange, - ); - } - - late final __objc_msgSend_188Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_188 = __objc_msgSend_188Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _sel_characterSetWithCharactersInString_1 = - _registerName1("characterSetWithCharactersInString:"); - ffi.Pointer _objc_msgSend_189( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aString, - ) { - return __objc_msgSend_189( - obj, - sel, - aString, - ); - } - - late final __objc_msgSend_189Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_189 = __objc_msgSend_189Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_characterSetWithBitmapRepresentation_1 = - _registerName1("characterSetWithBitmapRepresentation:"); - ffi.Pointer _objc_msgSend_190( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ) { - return __objc_msgSend_190( - obj, - sel, - data, - ); - } - - late final __objc_msgSend_190Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_190 = __objc_msgSend_190Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_characterSetWithContentsOfFile_1 = - _registerName1("characterSetWithContentsOfFile:"); - ffi.Pointer _objc_msgSend_191( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer fName, - ) { - return __objc_msgSend_191( - obj, - sel, - fName, - ); - } - - late final __objc_msgSend_191Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_191 = __objc_msgSend_191Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - instancetype _objc_msgSend_192( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer coder, - ) { - return __objc_msgSend_192( - obj, - sel, - coder, - ); - } - - late final __objc_msgSend_192Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_192 = __objc_msgSend_192Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_characterIsMember_1 = _registerName1("characterIsMember:"); - bool _objc_msgSend_193( - ffi.Pointer obj, - ffi.Pointer sel, - int aCharacter, - ) { - return __objc_msgSend_193( - obj, - sel, - aCharacter, - ); - } - - late final __objc_msgSend_193Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedShort)>>('objc_msgSend'); - late final __objc_msgSend_193 = __objc_msgSend_193Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_bitmapRepresentation1 = - _registerName1("bitmapRepresentation"); - late final _sel_invertedSet1 = _registerName1("invertedSet"); - late final _sel_longCharacterIsMember_1 = - _registerName1("longCharacterIsMember:"); - bool _objc_msgSend_194( - ffi.Pointer obj, - ffi.Pointer sel, - int theLongChar, - ) { - return __objc_msgSend_194( - obj, - sel, - theLongChar, - ); - } - - late final __objc_msgSend_194Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_194 = __objc_msgSend_194Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_isSupersetOfSet_1 = _registerName1("isSupersetOfSet:"); - bool _objc_msgSend_195( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer theOtherSet, - ) { - return __objc_msgSend_195( - obj, - sel, - theOtherSet, - ); - } - - late final __objc_msgSend_195Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_195 = __objc_msgSend_195Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_hasMemberInPlane_1 = _registerName1("hasMemberInPlane:"); - bool _objc_msgSend_196( - ffi.Pointer obj, - ffi.Pointer sel, - int thePlane, - ) { - return __objc_msgSend_196( - obj, - sel, - thePlane, - ); - } - - late final __objc_msgSend_196Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Uint8)>>('objc_msgSend'); - late final __objc_msgSend_196 = __objc_msgSend_196Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_URLUserAllowedCharacterSet1 = - _registerName1("URLUserAllowedCharacterSet"); - late final _sel_URLPasswordAllowedCharacterSet1 = - _registerName1("URLPasswordAllowedCharacterSet"); - late final _sel_URLHostAllowedCharacterSet1 = - _registerName1("URLHostAllowedCharacterSet"); - late final _sel_URLPathAllowedCharacterSet1 = - _registerName1("URLPathAllowedCharacterSet"); - late final _sel_URLQueryAllowedCharacterSet1 = - _registerName1("URLQueryAllowedCharacterSet"); - late final _sel_URLFragmentAllowedCharacterSet1 = - _registerName1("URLFragmentAllowedCharacterSet"); - late final _sel_exemplarCharacterSet1 = - _registerName1("exemplarCharacterSet"); - late final _sel_calendarIdentifier1 = _registerName1("calendarIdentifier"); - late final _sel_localizedStringForCalendarIdentifier_1 = - _registerName1("localizedStringForCalendarIdentifier:"); - late final _sel_collationIdentifier1 = _registerName1("collationIdentifier"); - late final _sel_localizedStringForCollationIdentifier_1 = - _registerName1("localizedStringForCollationIdentifier:"); - late final _sel_usesMetricSystem1 = _registerName1("usesMetricSystem"); - late final _sel_decimalSeparator1 = _registerName1("decimalSeparator"); - late final _sel_groupingSeparator1 = _registerName1("groupingSeparator"); - late final _sel_currencySymbol1 = _registerName1("currencySymbol"); - late final _sel_currencyCode1 = _registerName1("currencyCode"); - late final _sel_localizedStringForCurrencyCode_1 = - _registerName1("localizedStringForCurrencyCode:"); - late final _sel_collatorIdentifier1 = _registerName1("collatorIdentifier"); - late final _sel_localizedStringForCollatorIdentifier_1 = - _registerName1("localizedStringForCollatorIdentifier:"); - late final _sel_quotationBeginDelimiter1 = - _registerName1("quotationBeginDelimiter"); - late final _sel_quotationEndDelimiter1 = - _registerName1("quotationEndDelimiter"); - late final _sel_alternateQuotationBeginDelimiter1 = - _registerName1("alternateQuotationBeginDelimiter"); - late final _sel_alternateQuotationEndDelimiter1 = - _registerName1("alternateQuotationEndDelimiter"); - late final _sel_autoupdatingCurrentLocale1 = - _registerName1("autoupdatingCurrentLocale"); - ffi.Pointer _objc_msgSend_197( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_197( - obj, - sel, - ); - } - - late final __objc_msgSend_197Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_197 = __objc_msgSend_197Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_currentLocale1 = _registerName1("currentLocale"); - late final _sel_systemLocale1 = _registerName1("systemLocale"); - late final _sel_localeWithLocaleIdentifier_1 = - _registerName1("localeWithLocaleIdentifier:"); - late final _sel_availableLocaleIdentifiers1 = - _registerName1("availableLocaleIdentifiers"); - late final _sel_ISOLanguageCodes1 = _registerName1("ISOLanguageCodes"); - late final _sel_ISOCountryCodes1 = _registerName1("ISOCountryCodes"); - late final _sel_ISOCurrencyCodes1 = _registerName1("ISOCurrencyCodes"); - late final _sel_commonISOCurrencyCodes1 = - _registerName1("commonISOCurrencyCodes"); - late final _sel_preferredLanguages1 = _registerName1("preferredLanguages"); - late final _sel_componentsFromLocaleIdentifier_1 = - _registerName1("componentsFromLocaleIdentifier:"); - ffi.Pointer _objc_msgSend_198( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - ) { - return __objc_msgSend_198( - obj, - sel, - string, - ); - } - - late final __objc_msgSend_198Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_198 = __objc_msgSend_198Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_localeIdentifierFromComponents_1 = - _registerName1("localeIdentifierFromComponents:"); - ffi.Pointer _objc_msgSend_199( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer dict, - ) { - return __objc_msgSend_199( - obj, - sel, - dict, - ); - } - - late final __objc_msgSend_199Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_199 = __objc_msgSend_199Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_canonicalLocaleIdentifierFromString_1 = - _registerName1("canonicalLocaleIdentifierFromString:"); - late final _sel_canonicalLanguageIdentifierFromString_1 = - _registerName1("canonicalLanguageIdentifierFromString:"); - late final _sel_localeIdentifierFromWindowsLocaleCode_1 = - _registerName1("localeIdentifierFromWindowsLocaleCode:"); - ffi.Pointer _objc_msgSend_200( - ffi.Pointer obj, - ffi.Pointer sel, - int lcid, - ) { - return __objc_msgSend_200( - obj, - sel, - lcid, - ); - } - - late final __objc_msgSend_200Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Uint32)>>('objc_msgSend'); - late final __objc_msgSend_200 = __objc_msgSend_200Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_windowsLocaleCodeFromLocaleIdentifier_1 = - _registerName1("windowsLocaleCodeFromLocaleIdentifier:"); - int _objc_msgSend_201( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer localeIdentifier, - ) { - return __objc_msgSend_201( - obj, - sel, - localeIdentifier, - ); - } - - late final __objc_msgSend_201Ptr = _lookup< - ffi.NativeFunction< - ffi.Uint32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_201 = __objc_msgSend_201Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_characterDirectionForLanguage_1 = - _registerName1("characterDirectionForLanguage:"); - int _objc_msgSend_202( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer isoLangCode, - ) { - return __objc_msgSend_202( - obj, - sel, - isoLangCode, - ); - } - - late final __objc_msgSend_202Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_202 = __objc_msgSend_202Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_lineDirectionForLanguage_1 = - _registerName1("lineDirectionForLanguage:"); - late final _sel_localizedName_locale_1 = - _registerName1("localizedName:locale:"); - ffi.Pointer _objc_msgSend_203( - ffi.Pointer obj, - ffi.Pointer sel, - int style, - ffi.Pointer locale, - ) { - return __objc_msgSend_203( - obj, - sel, - style, - locale, - ); - } - - late final __objc_msgSend_203Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_203 = __objc_msgSend_203Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_timeZoneWithName_1 = _registerName1("timeZoneWithName:"); - late final _sel_timeZoneWithName_data_1 = - _registerName1("timeZoneWithName:data:"); - instancetype _objc_msgSend_204( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer tzName, - ffi.Pointer aData, - ) { - return __objc_msgSend_204( - obj, - sel, - tzName, - aData, - ); - } - - late final __objc_msgSend_204Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_204 = __objc_msgSend_204Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithName_1 = _registerName1("initWithName:"); - late final _sel_initWithName_data_1 = _registerName1("initWithName:data:"); - late final _sel_timeZoneForSecondsFromGMT_1 = - _registerName1("timeZoneForSecondsFromGMT:"); - instancetype _objc_msgSend_205( - ffi.Pointer obj, - ffi.Pointer sel, - int seconds, - ) { - return __objc_msgSend_205( - obj, - sel, - seconds, - ); - } - - late final __objc_msgSend_205Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_205 = __objc_msgSend_205Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_timeZoneWithAbbreviation_1 = - _registerName1("timeZoneWithAbbreviation:"); - late final _sel_dateWithYear_month_day_hour_minute_second_timeZone_1 = - _registerName1("dateWithYear:month:day:hour:minute:second:timeZone:"); - ffi.Pointer _objc_msgSend_206( - ffi.Pointer obj, - ffi.Pointer sel, - int year, - int month, - int day, - int hour, - int minute, - int second, - ffi.Pointer aTimeZone, - ) { - return __objc_msgSend_206( - obj, - sel, - year, - month, - day, - hour, - minute, - second, - aTimeZone, - ); - } - - late final __objc_msgSend_206Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_206 = __objc_msgSend_206Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - int, - int, - int, - int, - ffi.Pointer)>(); - - late final _sel_dateByAddingYears_months_days_hours_minutes_seconds_1 = - _registerName1("dateByAddingYears:months:days:hours:minutes:seconds:"); - ffi.Pointer _objc_msgSend_207( - ffi.Pointer obj, - ffi.Pointer sel, - int year, - int month, - int day, - int hour, - int minute, - int second, - ) { - return __objc_msgSend_207( - obj, - sel, - year, - month, - day, - hour, - minute, - second, - ); - } - - late final __objc_msgSend_207Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_207 = __objc_msgSend_207Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, int, int, int, int, int)>(); - - late final _sel_dayOfCommonEra1 = _registerName1("dayOfCommonEra"); - late final _sel_dayOfMonth1 = _registerName1("dayOfMonth"); - late final _sel_dayOfWeek1 = _registerName1("dayOfWeek"); - late final _sel_dayOfYear1 = _registerName1("dayOfYear"); - late final _sel_hourOfDay1 = _registerName1("hourOfDay"); - late final _sel_minuteOfHour1 = _registerName1("minuteOfHour"); - late final _sel_monthOfYear1 = _registerName1("monthOfYear"); - late final _sel_secondOfMinute1 = _registerName1("secondOfMinute"); - late final _sel_yearOfCommonEra1 = _registerName1("yearOfCommonEra"); - late final _sel_calendarFormat1 = _registerName1("calendarFormat"); - late final _sel_descriptionWithCalendarFormat_locale_1 = - _registerName1("descriptionWithCalendarFormat:locale:"); - ffi.Pointer _objc_msgSend_208( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer locale, - ) { - return __objc_msgSend_208( - obj, - sel, - format, - locale, - ); - } - - late final __objc_msgSend_208Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_208 = __objc_msgSend_208Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_descriptionWithCalendarFormat_1 = - _registerName1("descriptionWithCalendarFormat:"); - late final _sel_timeZone1 = _registerName1("timeZone"); - late final _sel_initWithString_calendarFormat_locale_1 = - _registerName1("initWithString:calendarFormat:locale:"); - late final _sel_initWithString_calendarFormat_1 = - _registerName1("initWithString:calendarFormat:"); - late final _sel_initWithYear_month_day_hour_minute_second_timeZone_1 = - _registerName1("initWithYear:month:day:hour:minute:second:timeZone:"); - late final _sel_setCalendarFormat_1 = _registerName1("setCalendarFormat:"); - void _objc_msgSend_209( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ) { - return __objc_msgSend_209( - obj, - sel, - format, - ); - } - - late final __objc_msgSend_209Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_209 = __objc_msgSend_209Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_setTimeZone_1 = _registerName1("setTimeZone:"); - void _objc_msgSend_210( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aTimeZone, - ) { - return __objc_msgSend_210( - obj, - sel, - aTimeZone, - ); - } - - late final __objc_msgSend_210Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_210 = __objc_msgSend_210Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_years_months_days_hours_minutes_seconds_sinceDate_1 = - _registerName1("years:months:days:hours:minutes:seconds:sinceDate:"); - void _objc_msgSend_211( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer yp, - ffi.Pointer mop, - ffi.Pointer dp, - ffi.Pointer hp, - ffi.Pointer mip, - ffi.Pointer sp, - ffi.Pointer date, - ) { - return __objc_msgSend_211( - obj, - sel, - yp, - mop, - dp, - hp, - mip, - sp, - date, - ); - } - - late final __objc_msgSend_211Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_211 = __objc_msgSend_211Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_dateWithCalendarFormat_timeZone_1 = - _registerName1("dateWithCalendarFormat:timeZone:"); - ffi.Pointer _objc_msgSend_212( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer aTimeZone, - ) { - return __objc_msgSend_212( - obj, - sel, - format, - aTimeZone, - ); - } - - late final __objc_msgSend_212Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_212 = __objc_msgSend_212Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_descriptionWithCalendarFormat_timeZone_locale_1 = - _registerName1("descriptionWithCalendarFormat:timeZone:locale:"); - ffi.Pointer _objc_msgSend_213( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer aTimeZone, - ffi.Pointer locale, - ) { - return __objc_msgSend_213( - obj, - sel, - format, - aTimeZone, - locale, - ); - } - - late final __objc_msgSend_213Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_213 = __objc_msgSend_213Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_fileModificationDate1 = - _registerName1("fileModificationDate"); - late final _sel_fileType1 = _registerName1("fileType"); - late final _sel_filePosixPermissions1 = - _registerName1("filePosixPermissions"); - late final _sel_fileOwnerAccountName1 = - _registerName1("fileOwnerAccountName"); - late final _sel_fileGroupOwnerAccountName1 = - _registerName1("fileGroupOwnerAccountName"); - late final _sel_fileSystemNumber1 = _registerName1("fileSystemNumber"); - late final _sel_fileSystemFileNumber1 = - _registerName1("fileSystemFileNumber"); - late final _sel_fileExtensionHidden1 = _registerName1("fileExtensionHidden"); - late final _sel_fileHFSCreatorCode1 = _registerName1("fileHFSCreatorCode"); - int _objc_msgSend_214( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_214( - obj, - sel, - ); - } - - late final __objc_msgSend_214Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedInt Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_214 = __objc_msgSend_214Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_fileHFSTypeCode1 = _registerName1("fileHFSTypeCode"); - late final _sel_fileIsImmutable1 = _registerName1("fileIsImmutable"); - late final _sel_fileIsAppendOnly1 = _registerName1("fileIsAppendOnly"); - late final _sel_fileCreationDate1 = _registerName1("fileCreationDate"); - late final _sel_fileOwnerAccountID1 = _registerName1("fileOwnerAccountID"); - ffi.Pointer _objc_msgSend_215( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_215( - obj, - sel, - ); - } - - late final __objc_msgSend_215Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_215 = __objc_msgSend_215Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_fileGroupOwnerAccountID1 = - _registerName1("fileGroupOwnerAccountID"); - late final _sel_predicateWithBlock_1 = _registerName1("predicateWithBlock:"); - ffi.Pointer _objc_msgSend_216( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_216( - obj, - sel, - block, - ); - } - - late final __objc_msgSend_216Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_216 = __objc_msgSend_216Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_predicateFormat1 = _registerName1("predicateFormat"); - late final _sel_predicateWithSubstitutionVariables_1 = - _registerName1("predicateWithSubstitutionVariables:"); - late final _sel_evaluateWithObject_1 = _registerName1("evaluateWithObject:"); - bool _objc_msgSend_217( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer object, - ) { - return __objc_msgSend_217( - obj, - sel, - object, - ); - } - - late final __objc_msgSend_217Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_217 = __objc_msgSend_217Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_evaluateWithObject_substitutionVariables_1 = - _registerName1("evaluateWithObject:substitutionVariables:"); - bool _objc_msgSend_218( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer object, - ffi.Pointer bindings, - ) { - return __objc_msgSend_218( - obj, - sel, - object, - bindings, - ); - } - - late final __objc_msgSend_218Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_218 = __objc_msgSend_218Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_allowEvaluation1 = _registerName1("allowEvaluation"); - late final _sel_filteredArrayUsingPredicate_1 = - _registerName1("filteredArrayUsingPredicate:"); - ffi.Pointer _objc_msgSend_219( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer predicate, - ) { - return __objc_msgSend_219( - obj, - sel, - predicate, - ); - } - - late final __objc_msgSend_219Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_219 = __objc_msgSend_219Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithChar_1 = _registerName1("initWithChar:"); - ffi.Pointer _objc_msgSend_220( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_220( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_220Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Char)>>('objc_msgSend'); - late final __objc_msgSend_220 = __objc_msgSend_220Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithUnsignedChar_1 = - _registerName1("initWithUnsignedChar:"); - ffi.Pointer _objc_msgSend_221( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_221( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_221Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedChar)>>('objc_msgSend'); - late final __objc_msgSend_221 = __objc_msgSend_221Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithShort_1 = _registerName1("initWithShort:"); - ffi.Pointer _objc_msgSend_222( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_222( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_222Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Short)>>('objc_msgSend'); - late final __objc_msgSend_222 = __objc_msgSend_222Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithUnsignedShort_1 = - _registerName1("initWithUnsignedShort:"); - ffi.Pointer _objc_msgSend_223( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_223( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_223Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedShort)>>('objc_msgSend'); - late final __objc_msgSend_223 = __objc_msgSend_223Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithInt_1 = _registerName1("initWithInt:"); - ffi.Pointer _objc_msgSend_224( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_224( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_224Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int)>>('objc_msgSend'); - late final __objc_msgSend_224 = __objc_msgSend_224Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithUnsignedInt_1 = - _registerName1("initWithUnsignedInt:"); - ffi.Pointer _objc_msgSend_225( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_225( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_225Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_225 = __objc_msgSend_225Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithLong_1 = _registerName1("initWithLong:"); - ffi.Pointer _objc_msgSend_226( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_226( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_226Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_226 = __objc_msgSend_226Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithUnsignedLong_1 = - _registerName1("initWithUnsignedLong:"); - ffi.Pointer _objc_msgSend_227( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_227( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_227Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_227 = __objc_msgSend_227Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithLongLong_1 = _registerName1("initWithLongLong:"); - ffi.Pointer _objc_msgSend_228( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_228( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_228Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.LongLong)>>('objc_msgSend'); - late final __objc_msgSend_228 = __objc_msgSend_228Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithUnsignedLongLong_1 = - _registerName1("initWithUnsignedLongLong:"); - ffi.Pointer _objc_msgSend_229( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_229( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_229Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLongLong)>>('objc_msgSend'); - late final __objc_msgSend_229 = __objc_msgSend_229Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithFloat_1 = _registerName1("initWithFloat:"); - ffi.Pointer _objc_msgSend_230( - ffi.Pointer obj, - ffi.Pointer sel, - double value, - ) { - return __objc_msgSend_230( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_230Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Float)>>('objc_msgSend'); - late final __objc_msgSend_230 = __objc_msgSend_230Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, double)>(); - - late final _sel_initWithDouble_1 = _registerName1("initWithDouble:"); - ffi.Pointer _objc_msgSend_231( - ffi.Pointer obj, - ffi.Pointer sel, - double value, - ) { - return __objc_msgSend_231( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_231Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_231 = __objc_msgSend_231Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, double)>(); - - late final _sel_initWithBool_1 = _registerName1("initWithBool:"); - ffi.Pointer _objc_msgSend_232( - ffi.Pointer obj, - ffi.Pointer sel, - bool value, - ) { - return __objc_msgSend_232( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_232Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_232 = __objc_msgSend_232Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_initWithInteger_1 = _registerName1("initWithInteger:"); - late final _sel_initWithUnsignedInteger_1 = - _registerName1("initWithUnsignedInteger:"); - late final _sel_charValue1 = _registerName1("charValue"); - int _objc_msgSend_233( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_233( - obj, - sel, - ); - } - - late final __objc_msgSend_233Ptr = _lookup< - ffi.NativeFunction< - ffi.Char Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_233 = __objc_msgSend_233Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_unsignedCharValue1 = _registerName1("unsignedCharValue"); - int _objc_msgSend_234( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_234( - obj, - sel, - ); - } - - late final __objc_msgSend_234Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedChar Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_234 = __objc_msgSend_234Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_shortValue1 = _registerName1("shortValue"); - int _objc_msgSend_235( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_235( - obj, - sel, - ); - } - - late final __objc_msgSend_235Ptr = _lookup< - ffi.NativeFunction< - ffi.Short Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_235 = __objc_msgSend_235Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_unsignedShortValue1 = _registerName1("unsignedShortValue"); - int _objc_msgSend_236( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_236( - obj, - sel, - ); - } - - late final __objc_msgSend_236Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedShort Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_236 = __objc_msgSend_236Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_intValue1 = _registerName1("intValue"); - int _objc_msgSend_237( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_237( - obj, - sel, - ); - } - - late final __objc_msgSend_237Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_237 = __objc_msgSend_237Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_unsignedIntValue1 = _registerName1("unsignedIntValue"); - late final _sel_longValue1 = _registerName1("longValue"); - late final _sel_unsignedLongValue1 = _registerName1("unsignedLongValue"); - late final _sel_longLongValue1 = _registerName1("longLongValue"); - int _objc_msgSend_238( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_238( - obj, - sel, - ); - } - - late final __objc_msgSend_238Ptr = _lookup< - ffi.NativeFunction< - ffi.LongLong Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_238 = __objc_msgSend_238Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_unsignedLongLongValue1 = - _registerName1("unsignedLongLongValue"); - late final _sel_floatValue1 = _registerName1("floatValue"); - double _objc_msgSend_239( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_239( - obj, - sel, - ); - } - - late final __objc_msgSend_239Ptr = _lookup< - ffi.NativeFunction< - ffi.Float Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_239 = __objc_msgSend_239Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer)>(); - - double _objc_msgSend_239_fpret( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_239_fpret( - obj, - sel, - ); - } - - late final __objc_msgSend_239_fpretPtr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_fpret'); - late final __objc_msgSend_239_fpret = __objc_msgSend_239_fpretPtr.asFunction< - double Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_doubleValue1 = _registerName1("doubleValue"); - 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_240( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherNumber, - ) { - return __objc_msgSend_240( - obj, - sel, - otherNumber, - ); - } - - late final __objc_msgSend_240Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_240 = __objc_msgSend_240Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_isEqualToNumber_1 = _registerName1("isEqualToNumber:"); - bool _objc_msgSend_241( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer number, - ) { - return __objc_msgSend_241( - obj, - sel, - number, - ); - } - - late final __objc_msgSend_241Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_241 = __objc_msgSend_241Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_numberWithChar_1 = _registerName1("numberWithChar:"); - late final _sel_numberWithUnsignedChar_1 = - _registerName1("numberWithUnsignedChar:"); - late final _sel_numberWithShort_1 = _registerName1("numberWithShort:"); - late final _sel_numberWithUnsignedShort_1 = - _registerName1("numberWithUnsignedShort:"); - late final _sel_numberWithInt_1 = _registerName1("numberWithInt:"); - late final _sel_numberWithUnsignedInt_1 = - _registerName1("numberWithUnsignedInt:"); - late final _sel_numberWithLong_1 = _registerName1("numberWithLong:"); - late final _sel_numberWithUnsignedLong_1 = - _registerName1("numberWithUnsignedLong:"); - late final _sel_numberWithLongLong_1 = _registerName1("numberWithLongLong:"); - late final _sel_numberWithUnsignedLongLong_1 = - _registerName1("numberWithUnsignedLongLong:"); - late final _sel_numberWithFloat_1 = _registerName1("numberWithFloat:"); - late final _sel_numberWithDouble_1 = _registerName1("numberWithDouble:"); - late final _sel_numberWithBool_1 = _registerName1("numberWithBool:"); - late final _sel_numberWithInteger_1 = _registerName1("numberWithInteger:"); - late final _sel_numberWithUnsignedInteger_1 = - _registerName1("numberWithUnsignedInteger:"); - late final _sel_port1 = _registerName1("port"); - 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_242( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - int maxBufferLength, - ) { - return __objc_msgSend_242( - obj, - sel, - buffer, - maxBufferLength, - ); - } - - late final __objc_msgSend_242Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_242 = __objc_msgSend_242Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_fileSystemRepresentation1 = - _registerName1("fileSystemRepresentation"); - late final _sel_isFileURL1 = _registerName1("isFileURL"); - late final _sel_standardizedURL1 = _registerName1("standardizedURL"); - late final _sel_isFileReferenceURL1 = _registerName1("isFileReferenceURL"); - late final _sel_fileReferenceURL1 = _registerName1("fileReferenceURL"); - late final _sel_filePathURL1 = _registerName1("filePathURL"); - late final _sel_getResourceValue_forKey_error_1 = - _registerName1("getResourceValue:forKey:error:"); - bool _objc_msgSend_243( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> value, - ffi.Pointer key, - ffi.Pointer> error, - ) { - return __objc_msgSend_243( - obj, - sel, - value, - key, - error, - ); - } - - late final __objc_msgSend_243Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_243 = __objc_msgSend_243Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_resourceValuesForKeys_error_1 = - _registerName1("resourceValuesForKeys:error:"); - ffi.Pointer _objc_msgSend_244( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer> error, - ) { - return __objc_msgSend_244( - obj, - sel, - keys, - error, - ); - } - - late final __objc_msgSend_244Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_244 = __objc_msgSend_244Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_setResourceValue_forKey_error_1 = - _registerName1("setResourceValue:forKey:error:"); - bool _objc_msgSend_245( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer key, - ffi.Pointer> error, - ) { - return __objc_msgSend_245( - obj, - sel, - value, - key, - error, - ); - } - - late final __objc_msgSend_245Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_245 = __objc_msgSend_245Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_setResourceValues_error_1 = - _registerName1("setResourceValues:error:"); - bool _objc_msgSend_246( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keyedValues, - ffi.Pointer> error, - ) { - return __objc_msgSend_246( - obj, - sel, - keyedValues, - error, - ); - } - - late final __objc_msgSend_246Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_246 = __objc_msgSend_246Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_removeCachedResourceValueForKey_1 = - _registerName1("removeCachedResourceValueForKey:"); - void _objc_msgSend_247( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_247( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_247Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_247 = __objc_msgSend_247Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_removeAllCachedResourceValues1 = - _registerName1("removeAllCachedResourceValues"); - late final _sel_setTemporaryResourceValue_forKey_1 = - _registerName1("setTemporaryResourceValue:forKey:"); - late final _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1 = - _registerName1( - "bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:"); - ffi.Pointer _objc_msgSend_248( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ffi.Pointer keys, - ffi.Pointer relativeURL, - ffi.Pointer> error, - ) { - return __objc_msgSend_248( - obj, - sel, - options, - keys, - relativeURL, - error, - ); - } - - late final __objc_msgSend_248Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_248 = __objc_msgSend_248Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = - _registerName1( - "initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); - instancetype _objc_msgSend_249( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bookmarkData, - int options, - ffi.Pointer relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error, - ) { - return __objc_msgSend_249( - obj, - sel, - bookmarkData, - options, - relativeURL, - isStale, - error, - ); - } - - late final __objc_msgSend_249Ptr = _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_249 = __objc_msgSend_249Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = - _registerName1( - "URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); - late final _sel_resourceValuesForKeys_fromBookmarkData_1 = - _registerName1("resourceValuesForKeys:fromBookmarkData:"); - ffi.Pointer _objc_msgSend_250( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer bookmarkData, - ) { - return __objc_msgSend_250( - obj, - sel, - keys, - bookmarkData, - ); - } - - late final __objc_msgSend_250Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_250 = __objc_msgSend_250Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_writeBookmarkData_toURL_options_error_1 = - _registerName1("writeBookmarkData:toURL:options:error:"); - bool _objc_msgSend_251( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bookmarkData, - ffi.Pointer bookmarkFileURL, - int options, - ffi.Pointer> error, - ) { - return __objc_msgSend_251( - obj, - sel, - bookmarkData, - bookmarkFileURL, - options, - error, - ); - } - - late final __objc_msgSend_251Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_251 = __objc_msgSend_251Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_bookmarkDataWithContentsOfURL_error_1 = - _registerName1("bookmarkDataWithContentsOfURL:error:"); - ffi.Pointer _objc_msgSend_252( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bookmarkFileURL, - ffi.Pointer> error, - ) { - return __objc_msgSend_252( - obj, - sel, - bookmarkFileURL, - error, - ); - } - - late final __objc_msgSend_252Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_252 = __objc_msgSend_252Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_URLByResolvingAliasFileAtURL_options_error_1 = - _registerName1("URLByResolvingAliasFileAtURL:options:error:"); - instancetype _objc_msgSend_253( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int options, - ffi.Pointer> error, - ) { - return __objc_msgSend_253( - obj, - sel, - url, - options, - error, - ); - } - - late final __objc_msgSend_253Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_253 = __objc_msgSend_253Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_startAccessingSecurityScopedResource1 = - _registerName1("startAccessingSecurityScopedResource"); - late final _sel_stopAccessingSecurityScopedResource1 = - _registerName1("stopAccessingSecurityScopedResource"); - late final _sel_getPromisedItemResourceValue_forKey_error_1 = - _registerName1("getPromisedItemResourceValue:forKey:error:"); - late final _sel_promisedItemResourceValuesForKeys_error_1 = - _registerName1("promisedItemResourceValuesForKeys:error:"); - ffi.Pointer _objc_msgSend_254( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer> error, - ) { - return __objc_msgSend_254( - obj, - sel, - keys, - error, - ); - } - - late final __objc_msgSend_254Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_254 = __objc_msgSend_254Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_checkPromisedItemIsReachableAndReturnError_1 = - _registerName1("checkPromisedItemIsReachableAndReturnError:"); - bool _objc_msgSend_255( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> error, - ) { - return __objc_msgSend_255( - obj, - sel, - error, - ); - } - - late final __objc_msgSend_255Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_255 = __objc_msgSend_255Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_fileURLWithPathComponents_1 = - _registerName1("fileURLWithPathComponents:"); - ffi.Pointer _objc_msgSend_256( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer components, - ) { - return __objc_msgSend_256( - obj, - sel, - components, - ); - } - - late final __objc_msgSend_256Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_256 = __objc_msgSend_256Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_pathComponents1 = _registerName1("pathComponents"); - late final _sel_lastPathComponent1 = _registerName1("lastPathComponent"); - late final _sel_pathExtension1 = _registerName1("pathExtension"); - late final _sel_URLByAppendingPathComponent_1 = - _registerName1("URLByAppendingPathComponent:"); - ffi.Pointer _objc_msgSend_257( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer pathComponent, - ) { - return __objc_msgSend_257( - obj, - sel, - pathComponent, - ); - } - - late final __objc_msgSend_257Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_257 = __objc_msgSend_257Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_URLByAppendingPathComponent_isDirectory_1 = - _registerName1("URLByAppendingPathComponent:isDirectory:"); - ffi.Pointer _objc_msgSend_258( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer pathComponent, - bool isDirectory, - ) { - return __objc_msgSend_258( - obj, - sel, - pathComponent, - isDirectory, - ); - } - - late final __objc_msgSend_258Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_258 = __objc_msgSend_258Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_URLByDeletingLastPathComponent1 = - _registerName1("URLByDeletingLastPathComponent"); - late final _sel_URLByAppendingPathExtension_1 = - _registerName1("URLByAppendingPathExtension:"); - late final _sel_URLByDeletingPathExtension1 = - _registerName1("URLByDeletingPathExtension"); - late final _sel_checkResourceIsReachableAndReturnError_1 = - _registerName1("checkResourceIsReachableAndReturnError:"); - late final _sel_URLByStandardizingPath1 = - _registerName1("URLByStandardizingPath"); - late final _sel_URLByResolvingSymlinksInPath1 = - _registerName1("URLByResolvingSymlinksInPath"); - late final _sel_resourceDataUsingCache_1 = - _registerName1("resourceDataUsingCache:"); - ffi.Pointer _objc_msgSend_259( - ffi.Pointer obj, - ffi.Pointer sel, - bool shouldUseCache, - ) { - return __objc_msgSend_259( - obj, - sel, - shouldUseCache, - ); - } - - late final __objc_msgSend_259Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_259 = __objc_msgSend_259Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_loadResourceDataNotifyingClient_usingCache_1 = - _registerName1("loadResourceDataNotifyingClient:usingCache:"); - void _objc_msgSend_260( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer client, - bool shouldUseCache, - ) { - return __objc_msgSend_260( - obj, - sel, - client, - shouldUseCache, - ); - } - - late final __objc_msgSend_260Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_260 = __objc_msgSend_260Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_propertyForKey_1 = _registerName1("propertyForKey:"); - late final _sel_setResourceData_1 = _registerName1("setResourceData:"); - late final _sel_setProperty_forKey_1 = _registerName1("setProperty:forKey:"); - bool _objc_msgSend_261( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer property, - ffi.Pointer propertyKey, - ) { - return __objc_msgSend_261( - obj, - sel, - property, - propertyKey, - ); - } - - late final __objc_msgSend_261Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_261 = __objc_msgSend_261Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSURLHandle1 = _getClass1("NSURLHandle"); - late final _sel_registerURLHandleClass_1 = - _registerName1("registerURLHandleClass:"); - late final _sel_URLHandleClassForURL_1 = - _registerName1("URLHandleClassForURL:"); - ffi.Pointer _objc_msgSend_262( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anURL, - ) { - return __objc_msgSend_262( - obj, - sel, - anURL, - ); - } - - late final __objc_msgSend_262Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_262 = __objc_msgSend_262Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_status1 = _registerName1("status"); - int _objc_msgSend_263( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_263( - obj, - sel, - ); - } - - late final __objc_msgSend_263Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_263 = __objc_msgSend_263Ptr.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_264( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer newBytes, - bool yorn, - ) { - return __objc_msgSend_264( - obj, - sel, - newBytes, - yorn, - ); - } - - late final __objc_msgSend_264Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_264 = __objc_msgSend_264Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_canInitWithURL_1 = _registerName1("canInitWithURL:"); - bool _objc_msgSend_265( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anURL, - ) { - return __objc_msgSend_265( - obj, - sel, - anURL, - ); - } - - late final __objc_msgSend_265Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_265 = __objc_msgSend_265Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_cachedHandleForURL_1 = _registerName1("cachedHandleForURL:"); - ffi.Pointer _objc_msgSend_266( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anURL, - ) { - return __objc_msgSend_266( - obj, - sel, - anURL, - ); - } - - late final __objc_msgSend_266Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_266 = __objc_msgSend_266Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithURL_cached_1 = _registerName1("initWithURL:cached:"); - ffi.Pointer _objc_msgSend_267( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anURL, - bool willCache, - ) { - return __objc_msgSend_267( - obj, - sel, - anURL, - willCache, - ); - } - - late final __objc_msgSend_267Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_267 = __objc_msgSend_267Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_propertyForKeyIfAvailable_1 = - _registerName1("propertyForKeyIfAvailable:"); - late final _sel_writeProperty_forKey_1 = - _registerName1("writeProperty:forKey:"); - late final _sel_writeData_1 = _registerName1("writeData:"); - late final _sel_loadInForeground1 = _registerName1("loadInForeground"); - late final _sel_beginLoadInBackground1 = - _registerName1("beginLoadInBackground"); - late final _sel_endLoadInBackground1 = _registerName1("endLoadInBackground"); - late final _sel_URLHandleUsingCache_1 = - _registerName1("URLHandleUsingCache:"); - ffi.Pointer _objc_msgSend_268( - ffi.Pointer obj, - ffi.Pointer sel, - bool shouldUseCache, - ) { - return __objc_msgSend_268( - obj, - sel, - shouldUseCache, - ); - } - - late final __objc_msgSend_268Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_268 = __objc_msgSend_268Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_writeToFile_options_error_1 = - _registerName1("writeToFile:options:error:"); - bool _objc_msgSend_269( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - int writeOptionsMask, - ffi.Pointer> errorPtr, - ) { - return __objc_msgSend_269( - obj, - sel, - path, - writeOptionsMask, - errorPtr, - ); - } - - late final __objc_msgSend_269Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_269 = __objc_msgSend_269Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_writeToURL_options_error_1 = - _registerName1("writeToURL:options:error:"); - bool _objc_msgSend_270( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int writeOptionsMask, - ffi.Pointer> errorPtr, - ) { - return __objc_msgSend_270( - obj, - sel, - url, - writeOptionsMask, - errorPtr, - ); - } - - late final __objc_msgSend_270Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_270 = __objc_msgSend_270Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_rangeOfData_options_range_1 = - _registerName1("rangeOfData:options:range:"); - _NSRange _objc_msgSend_271( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer dataToFind, - int mask, - _NSRange searchRange, - ) { - return __objc_msgSend_271( - obj, - sel, - dataToFind, - mask, - searchRange, - ); - } - - late final __objc_msgSend_271Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_271 = __objc_msgSend_271Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, _NSRange)>(); - - void _objc_msgSend_271_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer dataToFind, - int mask, - _NSRange searchRange, - ) { - return __objc_msgSend_271_stret( - stret, - obj, - sel, - dataToFind, - mask, - searchRange, - ); - } - - late final __objc_msgSend_271_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend_stret'); - late final __objc_msgSend_271_stret = __objc_msgSend_271_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, _NSRange)>(); - - late final _sel_enumerateByteRangesUsingBlock_1 = - _registerName1("enumerateByteRangesUsingBlock:"); - void _objc_msgSend_272( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_272( - obj, - sel, - block, - ); - } - - late final __objc_msgSend_272Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_272 = __objc_msgSend_272Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_dataWithBytes_length_1 = - _registerName1("dataWithBytes:length:"); - instancetype _objc_msgSend_273( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int length, - ) { - return __objc_msgSend_273( - obj, - sel, - bytes, - length, - ); - } - - late final __objc_msgSend_273Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_273 = __objc_msgSend_273Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_dataWithBytesNoCopy_length_1 = - _registerName1("dataWithBytesNoCopy:length:"); - late final _sel_dataWithBytesNoCopy_length_freeWhenDone_1 = - _registerName1("dataWithBytesNoCopy:length:freeWhenDone:"); - instancetype _objc_msgSend_274( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int length, - bool b, - ) { - return __objc_msgSend_274( - obj, - sel, - bytes, - length, - b, - ); - } - - late final __objc_msgSend_274Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_274 = __objc_msgSend_274Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, bool)>(); - - late final _sel_dataWithContentsOfFile_options_error_1 = - _registerName1("dataWithContentsOfFile:options:error:"); - instancetype _objc_msgSend_275( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - int readOptionsMask, - ffi.Pointer> errorPtr, - ) { - return __objc_msgSend_275( - obj, - sel, - path, - readOptionsMask, - errorPtr, - ); - } - - late final __objc_msgSend_275Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_275 = __objc_msgSend_275Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_dataWithContentsOfURL_options_error_1 = - _registerName1("dataWithContentsOfURL:options:error:"); - instancetype _objc_msgSend_276( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int readOptionsMask, - ffi.Pointer> errorPtr, - ) { - return __objc_msgSend_276( - obj, - sel, - url, - readOptionsMask, - errorPtr, - ); - } - - late final __objc_msgSend_276Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_276 = __objc_msgSend_276Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_dataWithContentsOfFile_1 = - _registerName1("dataWithContentsOfFile:"); - late final _sel_dataWithContentsOfURL_1 = - _registerName1("dataWithContentsOfURL:"); - instancetype _objc_msgSend_277( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ) { - return __objc_msgSend_277( - obj, - sel, - url, - ); - } - - late final __objc_msgSend_277Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_277 = __objc_msgSend_277Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - 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_278( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int length, - ffi.Pointer<_ObjCBlock> deallocator, - ) { - return __objc_msgSend_278( - obj, - sel, - bytes, - length, - deallocator, - ); - } - - late final __objc_msgSend_278Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_278 = __objc_msgSend_278Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_initWithContentsOfFile_options_error_1 = - _registerName1("initWithContentsOfFile:options:error:"); - late final _sel_initWithContentsOfURL_options_error_1 = - _registerName1("initWithContentsOfURL:options:error:"); - late final _sel_initWithData_1 = _registerName1("initWithData:"); - instancetype _objc_msgSend_279( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ) { - return __objc_msgSend_279( - obj, - sel, - data, - ); - } - - late final __objc_msgSend_279Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_279 = __objc_msgSend_279Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_dataWithData_1 = _registerName1("dataWithData:"); - late final _sel_initWithBase64EncodedString_options_1 = - _registerName1("initWithBase64EncodedString:options:"); - instancetype _objc_msgSend_280( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer base64String, - int options, - ) { - return __objc_msgSend_280( - obj, - sel, - base64String, - options, - ); - } - - late final __objc_msgSend_280Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_280 = __objc_msgSend_280Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_base64EncodedStringWithOptions_1 = - _registerName1("base64EncodedStringWithOptions:"); - ffi.Pointer _objc_msgSend_281( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ) { - return __objc_msgSend_281( - obj, - sel, - options, - ); - } - - late final __objc_msgSend_281Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_281 = __objc_msgSend_281Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithBase64EncodedData_options_1 = - _registerName1("initWithBase64EncodedData:options:"); - instancetype _objc_msgSend_282( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer base64Data, - int options, - ) { - return __objc_msgSend_282( - obj, - sel, - base64Data, - options, - ); - } - - late final __objc_msgSend_282Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_282 = __objc_msgSend_282Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_base64EncodedDataWithOptions_1 = - _registerName1("base64EncodedDataWithOptions:"); - ffi.Pointer _objc_msgSend_283( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ) { - return __objc_msgSend_283( - obj, - sel, - options, - ); - } - - late final __objc_msgSend_283Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_283 = __objc_msgSend_283Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_decompressedDataUsingAlgorithm_error_1 = - _registerName1("decompressedDataUsingAlgorithm:error:"); - instancetype _objc_msgSend_284( - ffi.Pointer obj, - ffi.Pointer sel, - int algorithm, - ffi.Pointer> error, - ) { - return __objc_msgSend_284( - obj, - sel, - algorithm, - error, - ); - } - - late final __objc_msgSend_284Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_284 = __objc_msgSend_284Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer>)>(); - - late final _sel_compressedDataUsingAlgorithm_error_1 = - _registerName1("compressedDataUsingAlgorithm:error:"); - late final _sel_getBytes_1 = _registerName1("getBytes:"); - late final _sel_dataWithContentsOfMappedFile_1 = - _registerName1("dataWithContentsOfMappedFile:"); - late final _sel_initWithContentsOfMappedFile_1 = - _registerName1("initWithContentsOfMappedFile:"); - late final _sel_initWithBase64Encoding_1 = - _registerName1("initWithBase64Encoding:"); - late final _sel_base64Encoding1 = _registerName1("base64Encoding"); - late final _sel_encodeDataObject_1 = _registerName1("encodeDataObject:"); - void _objc_msgSend_285( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ) { - return __objc_msgSend_285( - obj, - sel, - data, - ); - } - - late final __objc_msgSend_285Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_285 = __objc_msgSend_285Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodeDataObject1 = _registerName1("decodeDataObject"); - ffi.Pointer _objc_msgSend_286( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_286( - obj, - sel, - ); - } - - late final __objc_msgSend_286Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_286 = __objc_msgSend_286Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_decodeValueOfObjCType_at_size_1 = - _registerName1("decodeValueOfObjCType:at:size:"); - void _objc_msgSend_287( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer type, - ffi.Pointer data, - int size, - ) { - return __objc_msgSend_287( - obj, - sel, - type, - data, - size, - ); - } - - late final __objc_msgSend_287Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_287 = __objc_msgSend_287Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_versionForClassName_1 = - _registerName1("versionForClassName:"); - int _objc_msgSend_288( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer className, - ) { - return __objc_msgSend_288( - obj, - sel, - className, - ); - } - - late final __objc_msgSend_288Ptr = _lookup< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_288 = __objc_msgSend_288Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_encodeObject_1 = _registerName1("encodeObject:"); - void _objc_msgSend_289( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer object, - ) { - return __objc_msgSend_289( - obj, - sel, - object, - ); - } - - late final __objc_msgSend_289Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_289 = __objc_msgSend_289Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_encodeRootObject_1 = _registerName1("encodeRootObject:"); - late final _sel_encodeBycopyObject_1 = _registerName1("encodeBycopyObject:"); - late final _sel_encodeByrefObject_1 = _registerName1("encodeByrefObject:"); - late final _sel_encodeConditionalObject_1 = - _registerName1("encodeConditionalObject:"); - late final _sel_encodeValuesOfObjCTypes_1 = - _registerName1("encodeValuesOfObjCTypes:"); - void _objc_msgSend_290( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer types, - ) { - return __objc_msgSend_290( - obj, - sel, - types, - ); - } - - late final __objc_msgSend_290Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_290 = __objc_msgSend_290Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_encodeArrayOfObjCType_count_at_1 = - _registerName1("encodeArrayOfObjCType:count:at:"); - void _objc_msgSend_291( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer type, - int count, - ffi.Pointer array, - ) { - return __objc_msgSend_291( - obj, - sel, - type, - count, - array, - ); - } - - late final __objc_msgSend_291Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_291 = __objc_msgSend_291Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_encodeBytes_length_1 = _registerName1("encodeBytes:length:"); - late final _sel_decodeObject1 = _registerName1("decodeObject"); - late final _sel_decodeTopLevelObjectAndReturnError_1 = - _registerName1("decodeTopLevelObjectAndReturnError:"); - ffi.Pointer _objc_msgSend_292( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> error, - ) { - return __objc_msgSend_292( - obj, - sel, - error, - ); - } - - late final __objc_msgSend_292Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_292 = __objc_msgSend_292Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_decodeValuesOfObjCTypes_1 = - _registerName1("decodeValuesOfObjCTypes:"); - late final _sel_decodeArrayOfObjCType_count_at_1 = - _registerName1("decodeArrayOfObjCType:count:at:"); - late final _sel_decodeBytesWithReturnedLength_1 = - _registerName1("decodeBytesWithReturnedLength:"); - ffi.Pointer _objc_msgSend_293( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer lengthp, - ) { - return __objc_msgSend_293( - obj, - sel, - lengthp, - ); - } - - late final __objc_msgSend_293Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_293 = __objc_msgSend_293Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_encodePropertyList_1 = _registerName1("encodePropertyList:"); - late final _sel_decodePropertyList1 = _registerName1("decodePropertyList"); - late final _sel_setObjectZone_1 = _registerName1("setObjectZone:"); - void _objc_msgSend_294( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_NSZone> zone, - ) { - return __objc_msgSend_294( - obj, - sel, - zone, - ); - } - - late final __objc_msgSend_294Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_NSZone>)>>('objc_msgSend'); - late final __objc_msgSend_294 = __objc_msgSend_294Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_NSZone>)>(); - - late final _sel_objectZone1 = _registerName1("objectZone"); - ffi.Pointer<_NSZone> _objc_msgSend_295( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_295( - obj, - sel, - ); - } - - late final __objc_msgSend_295Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer<_NSZone> Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_295 = __objc_msgSend_295Ptr.asFunction< - ffi.Pointer<_NSZone> Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_systemVersion1 = _registerName1("systemVersion"); - late final _sel_allowsKeyedCoding1 = _registerName1("allowsKeyedCoding"); - late final _sel_encodeObject_forKey_1 = - _registerName1("encodeObject:forKey:"); - late final _sel_encodeConditionalObject_forKey_1 = - _registerName1("encodeConditionalObject:forKey:"); - late final _sel_encodeBool_forKey_1 = _registerName1("encodeBool:forKey:"); - void _objc_msgSend_296( - ffi.Pointer obj, - ffi.Pointer sel, - bool value, - ffi.Pointer key, - ) { - return __objc_msgSend_296( - obj, - sel, - value, - key, - ); - } - - late final __objc_msgSend_296Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Bool, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_296 = __objc_msgSend_296Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, bool, - ffi.Pointer)>(); - - late final _sel_encodeInt_forKey_1 = _registerName1("encodeInt:forKey:"); - void _objc_msgSend_297( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ffi.Pointer key, - ) { - return __objc_msgSend_297( - obj, - sel, - value, - key, - ); - } - - late final __objc_msgSend_297Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_297 = __objc_msgSend_297Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _sel_encodeInt32_forKey_1 = _registerName1("encodeInt32:forKey:"); - void _objc_msgSend_298( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ffi.Pointer key, - ) { - return __objc_msgSend_298( - obj, - sel, - value, - key, - ); - } - - late final __objc_msgSend_298Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_298 = __objc_msgSend_298Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _sel_encodeInt64_forKey_1 = _registerName1("encodeInt64:forKey:"); - void _objc_msgSend_299( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ffi.Pointer key, - ) { - return __objc_msgSend_299( - obj, - sel, - value, - key, - ); - } - - late final __objc_msgSend_299Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_299 = __objc_msgSend_299Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _sel_encodeFloat_forKey_1 = _registerName1("encodeFloat:forKey:"); - void _objc_msgSend_300( - ffi.Pointer obj, - ffi.Pointer sel, - double value, - ffi.Pointer key, - ) { - return __objc_msgSend_300( - obj, - sel, - value, - key, - ); - } - - late final __objc_msgSend_300Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Float, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_300 = __objc_msgSend_300Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double, - ffi.Pointer)>(); - - late final _sel_encodeDouble_forKey_1 = - _registerName1("encodeDouble:forKey:"); - void _objc_msgSend_301( - ffi.Pointer obj, - ffi.Pointer sel, - double value, - ffi.Pointer key, - ) { - return __objc_msgSend_301( - obj, - sel, - value, - key, - ); - } - - late final __objc_msgSend_301Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Double, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_301 = __objc_msgSend_301Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double, - ffi.Pointer)>(); - - late final _sel_encodeBytes_length_forKey_1 = - _registerName1("encodeBytes:length:forKey:"); - void _objc_msgSend_302( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int length, - ffi.Pointer key, - ) { - return __objc_msgSend_302( - obj, - sel, - bytes, - length, - key, - ); - } - - late final __objc_msgSend_302Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_302 = __objc_msgSend_302Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_containsValueForKey_1 = - _registerName1("containsValueForKey:"); - late final _sel_decodeObjectForKey_1 = _registerName1("decodeObjectForKey:"); - late final _sel_decodeTopLevelObjectForKey_error_1 = - _registerName1("decodeTopLevelObjectForKey:error:"); - ffi.Pointer _objc_msgSend_303( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ffi.Pointer> error, - ) { - return __objc_msgSend_303( - obj, - sel, - key, - error, - ); - } - - late final __objc_msgSend_303Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_303 = __objc_msgSend_303Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_decodeBoolForKey_1 = _registerName1("decodeBoolForKey:"); - late final _sel_decodeIntForKey_1 = _registerName1("decodeIntForKey:"); - int _objc_msgSend_304( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_304( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_304Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_304 = __objc_msgSend_304Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodeInt32ForKey_1 = _registerName1("decodeInt32ForKey:"); - int _objc_msgSend_305( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_305( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_305Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_305 = __objc_msgSend_305Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodeInt64ForKey_1 = _registerName1("decodeInt64ForKey:"); - int _objc_msgSend_306( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_306( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_306Ptr = _lookup< - ffi.NativeFunction< - ffi.Int64 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_306 = __objc_msgSend_306Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodeFloatForKey_1 = _registerName1("decodeFloatForKey:"); - double _objc_msgSend_307( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_307( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_307Ptr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_307 = __objc_msgSend_307Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - double _objc_msgSend_307_fpret( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_307_fpret( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_307_fpretPtr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_fpret'); - late final __objc_msgSend_307_fpret = __objc_msgSend_307_fpretPtr.asFunction< - double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodeDoubleForKey_1 = _registerName1("decodeDoubleForKey:"); - double _objc_msgSend_308( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_308( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_308Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_308 = __objc_msgSend_308Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - double _objc_msgSend_308_fpret( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_308_fpret( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_308_fpretPtr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_fpret'); - late final __objc_msgSend_308_fpret = __objc_msgSend_308_fpretPtr.asFunction< - double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodeBytesForKey_returnedLength_1 = - _registerName1("decodeBytesForKey:returnedLength:"); - ffi.Pointer _objc_msgSend_309( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ffi.Pointer lengthp, - ) { - return __objc_msgSend_309( - obj, - sel, - key, - lengthp, - ); - } - - late final __objc_msgSend_309Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_309 = __objc_msgSend_309Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_encodeInteger_forKey_1 = - _registerName1("encodeInteger:forKey:"); - void _objc_msgSend_310( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ffi.Pointer key, - ) { - return __objc_msgSend_310( - obj, - sel, - value, - key, - ); - } - - late final __objc_msgSend_310Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Long, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_310 = __objc_msgSend_310Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _sel_decodeIntegerForKey_1 = - _registerName1("decodeIntegerForKey:"); - late final _sel_requiresSecureCoding1 = - _registerName1("requiresSecureCoding"); - late final _sel_decodeObjectOfClass_forKey_1 = - _registerName1("decodeObjectOfClass:forKey:"); - ffi.Pointer _objc_msgSend_311( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aClass, - ffi.Pointer key, - ) { - return __objc_msgSend_311( - obj, - sel, - aClass, - key, - ); - } - - late final __objc_msgSend_311Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_311 = __objc_msgSend_311Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodeTopLevelObjectOfClass_forKey_error_1 = - _registerName1("decodeTopLevelObjectOfClass:forKey:error:"); - ffi.Pointer _objc_msgSend_312( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aClass, - ffi.Pointer key, - ffi.Pointer> error, - ) { - return __objc_msgSend_312( - obj, - sel, - aClass, - key, - error, - ); - } - - late final __objc_msgSend_312Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - 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, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_decodeArrayOfObjectsOfClass_forKey_1 = - _registerName1("decodeArrayOfObjectsOfClass:forKey:"); - ffi.Pointer _objc_msgSend_313( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cls, - ffi.Pointer key, - ) { - return __objc_msgSend_313( - obj, - sel, - cls, - key, - ); - } - - late final __objc_msgSend_313Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - 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, - ffi.Pointer)>(); - - late final _sel_decodeDictionaryWithKeysOfClass_objectsOfClass_forKey_1 = - _registerName1("decodeDictionaryWithKeysOfClass:objectsOfClass:forKey:"); - ffi.Pointer _objc_msgSend_314( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keyCls, - ffi.Pointer objectCls, - ffi.Pointer key, - ) { - return __objc_msgSend_314( - obj, - sel, - keyCls, - objectCls, - key, - ); - } - - late final __objc_msgSend_314Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - 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, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodeObjectOfClasses_forKey_1 = - _registerName1("decodeObjectOfClasses:forKey:"); - ffi.Pointer _objc_msgSend_315( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer classes, - ffi.Pointer key, - ) { - return __objc_msgSend_315( - obj, - sel, - classes, - key, - ); - } - - late final __objc_msgSend_315Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_315 = __objc_msgSend_315Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodeTopLevelObjectOfClasses_forKey_error_1 = - _registerName1("decodeTopLevelObjectOfClasses:forKey:error:"); - ffi.Pointer _objc_msgSend_316( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer classes, - ffi.Pointer key, - ffi.Pointer> error, - ) { - return __objc_msgSend_316( - obj, - sel, - classes, - key, - error, - ); - } - - late final __objc_msgSend_316Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_316 = __objc_msgSend_316Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_decodeArrayOfObjectsOfClasses_forKey_1 = - _registerName1("decodeArrayOfObjectsOfClasses:forKey:"); - ffi.Pointer _objc_msgSend_317( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer classes, - ffi.Pointer key, - ) { - return __objc_msgSend_317( - obj, - sel, - classes, - key, - ); - } - - late final __objc_msgSend_317Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_317 = __objc_msgSend_317Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey_1 = - _registerName1( - "decodeDictionaryWithKeysOfClasses:objectsOfClasses:forKey:"); - ffi.Pointer _objc_msgSend_318( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keyClasses, - ffi.Pointer objectClasses, - ffi.Pointer key, - ) { - return __objc_msgSend_318( - obj, - sel, - keyClasses, - objectClasses, - key, - ); - } - - late final __objc_msgSend_318Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_318 = __objc_msgSend_318Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodePropertyListForKey_1 = - _registerName1("decodePropertyListForKey:"); - late final _sel_allowedClasses1 = _registerName1("allowedClasses"); - ffi.Pointer _objc_msgSend_319( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_319( - obj, - sel, - ); - } - - late final __objc_msgSend_319Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_319 = __objc_msgSend_319Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_failWithError_1 = _registerName1("failWithError:"); - void _objc_msgSend_320( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer error, - ) { - return __objc_msgSend_320( - obj, - sel, - error, - ); - } - - late final __objc_msgSend_320Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_320 = __objc_msgSend_320Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodingFailurePolicy1 = - _registerName1("decodingFailurePolicy"); - int _objc_msgSend_321( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_321( - obj, - sel, - ); - } - - late final __objc_msgSend_321Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_321 = __objc_msgSend_321Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_error1 = _registerName1("error"); - ffi.Pointer _objc_msgSend_322( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_322( - obj, - sel, - ); - } - - late final __objc_msgSend_322Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_322 = __objc_msgSend_322Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_encodeNXObject_1 = _registerName1("encodeNXObject:"); - late final _sel_decodeNXObject1 = _registerName1("decodeNXObject"); - late final _sel_decodeValueOfObjCType_at_1 = - _registerName1("decodeValueOfObjCType:at:"); - late final _sel_encodePoint_1 = _registerName1("encodePoint:"); - void _objc_msgSend_323( - ffi.Pointer obj, - ffi.Pointer sel, - CGPoint point, - ) { - return __objc_msgSend_323( - obj, - sel, - point, - ); - } - - late final __objc_msgSend_323Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - CGPoint)>>('objc_msgSend'); - late final __objc_msgSend_323 = __objc_msgSend_323Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, CGPoint)>(); - - late final _sel_decodePoint1 = _registerName1("decodePoint"); - late final _sel_encodeSize_1 = _registerName1("encodeSize:"); - void _objc_msgSend_324( - ffi.Pointer obj, - ffi.Pointer sel, - CGSize size, - ) { - return __objc_msgSend_324( - obj, - sel, - size, - ); - } - - late final __objc_msgSend_324Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - CGSize)>>('objc_msgSend'); - late final __objc_msgSend_324 = __objc_msgSend_324Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, CGSize)>(); - - late final _sel_decodeSize1 = _registerName1("decodeSize"); - late final _sel_encodeRect_1 = _registerName1("encodeRect:"); - void _objc_msgSend_325( - ffi.Pointer obj, - ffi.Pointer sel, - CGRect rect, - ) { - return __objc_msgSend_325( - obj, - sel, - rect, - ); - } - - late final __objc_msgSend_325Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - CGRect)>>('objc_msgSend'); - late final __objc_msgSend_325 = __objc_msgSend_325Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, CGRect)>(); - - late final _sel_decodeRect1 = _registerName1("decodeRect"); - late final _sel_encodePoint_forKey_1 = _registerName1("encodePoint:forKey:"); - void _objc_msgSend_326( - ffi.Pointer obj, - ffi.Pointer sel, - CGPoint point, - ffi.Pointer key, - ) { - return __objc_msgSend_326( - obj, - sel, - point, - key, - ); - } - - late final __objc_msgSend_326Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - CGPoint, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_326 = __objc_msgSend_326Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, CGPoint, - ffi.Pointer)>(); - - late final _sel_encodeSize_forKey_1 = _registerName1("encodeSize:forKey:"); - void _objc_msgSend_327( - ffi.Pointer obj, - ffi.Pointer sel, - CGSize size, - ffi.Pointer key, - ) { - return __objc_msgSend_327( - obj, - sel, - size, - key, - ); - } - - late final __objc_msgSend_327Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - CGSize, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_327 = __objc_msgSend_327Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, CGSize, - ffi.Pointer)>(); - - late final _sel_encodeRect_forKey_1 = _registerName1("encodeRect:forKey:"); - void _objc_msgSend_328( - ffi.Pointer obj, - ffi.Pointer sel, - CGRect rect, - ffi.Pointer key, - ) { - return __objc_msgSend_328( - obj, - sel, - rect, - key, - ); - } - - late final __objc_msgSend_328Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - CGRect, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_328 = __objc_msgSend_328Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, CGRect, - ffi.Pointer)>(); - - late final _sel_decodePointForKey_1 = _registerName1("decodePointForKey:"); - CGPoint _objc_msgSend_329( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_329( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_329Ptr = _lookup< - ffi.NativeFunction< - CGPoint Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_329 = __objc_msgSend_329Ptr.asFunction< - CGPoint Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - void _objc_msgSend_329_stret( - ffi.Pointer stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_329_stret( - stret, - obj, - sel, - key, - ); - } - - late final __objc_msgSend_329_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_329_stret = __objc_msgSend_329_stretPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_decodeSizeForKey_1 = _registerName1("decodeSizeForKey:"); - CGSize _objc_msgSend_330( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_330( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_330Ptr = _lookup< - ffi.NativeFunction< - CGSize Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_330 = __objc_msgSend_330Ptr.asFunction< - CGSize Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - void _objc_msgSend_330_stret( - ffi.Pointer stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_330_stret( - stret, - obj, - sel, - key, - ); - } - - late final __objc_msgSend_330_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_330_stret = __objc_msgSend_330_stretPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_decodeRectForKey_1 = _registerName1("decodeRectForKey:"); - CGRect _objc_msgSend_331( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_331( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_331Ptr = _lookup< - ffi.NativeFunction< - CGRect Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_331 = __objc_msgSend_331Ptr.asFunction< - CGRect Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - void _objc_msgSend_331_stret( - ffi.Pointer stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_331_stret( - stret, - obj, - sel, - key, - ); - } - - late final __objc_msgSend_331_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_331_stret = __objc_msgSend_331_stretPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_substringFromIndex_1 = _registerName1("substringFromIndex:"); - ffi.Pointer _objc_msgSend_332( - ffi.Pointer obj, - ffi.Pointer sel, - int from, - ) { - return __objc_msgSend_332( - obj, - sel, - from, - ); - } - - late final __objc_msgSend_332Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_332 = __objc_msgSend_332Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_substringToIndex_1 = _registerName1("substringToIndex:"); - late final _sel_substringWithRange_1 = _registerName1("substringWithRange:"); - ffi.Pointer _objc_msgSend_333( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_333( - obj, - sel, - range, - ); - } - - late final __objc_msgSend_333Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_333 = __objc_msgSend_333Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _sel_getCharacters_range_1 = - _registerName1("getCharacters:range:"); - void _objc_msgSend_334( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - _NSRange range, - ) { - return __objc_msgSend_334( - obj, - sel, - buffer, - range, - ); - } - - late final __objc_msgSend_334Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_334 = __objc_msgSend_334Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>(); - - int _objc_msgSend_335( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - ) { - return __objc_msgSend_335( - obj, - sel, - string, - ); - } - - late final __objc_msgSend_335Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_335 = __objc_msgSend_335Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_compare_options_1 = _registerName1("compare:options:"); - int _objc_msgSend_336( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int mask, - ) { - return __objc_msgSend_336( - obj, - sel, - string, - mask, - ); - } - - late final __objc_msgSend_336Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_336 = __objc_msgSend_336Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_compare_options_range_1 = - _registerName1("compare:options:range:"); - int _objc_msgSend_337( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int mask, - _NSRange rangeOfReceiverToCompare, - ) { - return __objc_msgSend_337( - obj, - sel, - string, - mask, - rangeOfReceiverToCompare, - ); - } - - late final __objc_msgSend_337Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_337 = __objc_msgSend_337Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, _NSRange)>(); - - late final _sel_compare_options_range_locale_1 = - _registerName1("compare:options:range:locale:"); - int _objc_msgSend_338( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int mask, - _NSRange rangeOfReceiverToCompare, - ffi.Pointer locale, - ) { - return __objc_msgSend_338( - obj, - sel, - string, - mask, - rangeOfReceiverToCompare, - locale, - ); - } - - late final __objc_msgSend_338Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_338 = __objc_msgSend_338Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, _NSRange, ffi.Pointer)>(); - - late final _sel_caseInsensitiveCompare_1 = - _registerName1("caseInsensitiveCompare:"); - late final _sel_localizedCompare_1 = _registerName1("localizedCompare:"); - late final _sel_localizedCaseInsensitiveCompare_1 = - _registerName1("localizedCaseInsensitiveCompare:"); - late final _sel_localizedStandardCompare_1 = - _registerName1("localizedStandardCompare:"); - late final _sel_isEqualToString_1 = _registerName1("isEqualToString:"); - 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_339( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer str, - int mask, - ) { - return __objc_msgSend_339( - obj, - sel, - str, - mask, - ); - } - - late final __objc_msgSend_339Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_339 = __objc_msgSend_339Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_containsString_1 = _registerName1("containsString:"); - late final _sel_localizedCaseInsensitiveContainsString_1 = - _registerName1("localizedCaseInsensitiveContainsString:"); - late final _sel_localizedStandardContainsString_1 = - _registerName1("localizedStandardContainsString:"); - late final _sel_localizedStandardRangeOfString_1 = - _registerName1("localizedStandardRangeOfString:"); - _NSRange _objc_msgSend_340( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer str, - ) { - return __objc_msgSend_340( - obj, - sel, - str, - ); - } - - late final __objc_msgSend_340Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_340 = __objc_msgSend_340Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - void _objc_msgSend_340_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer str, - ) { - return __objc_msgSend_340_stret( - stret, - obj, - sel, - str, - ); - } - - late final __objc_msgSend_340_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_340_stret = __objc_msgSend_340_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_rangeOfString_1 = _registerName1("rangeOfString:"); - late final _sel_rangeOfString_options_1 = - _registerName1("rangeOfString:options:"); - _NSRange _objc_msgSend_341( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchString, - int mask, - ) { - return __objc_msgSend_341( - obj, - sel, - searchString, - mask, - ); - } - - late final __objc_msgSend_341Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_341 = __objc_msgSend_341Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - void _objc_msgSend_341_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchString, - int mask, - ) { - return __objc_msgSend_341_stret( - stret, - obj, - sel, - searchString, - mask, - ); - } - - late final __objc_msgSend_341_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend_stret'); - late final __objc_msgSend_341_stret = __objc_msgSend_341_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_rangeOfString_options_range_1 = - _registerName1("rangeOfString:options:range:"); - _NSRange _objc_msgSend_342( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchString, - int mask, - _NSRange rangeOfReceiverToSearch, - ) { - return __objc_msgSend_342( - obj, - sel, - searchString, - mask, - rangeOfReceiverToSearch, - ); - } - - late final __objc_msgSend_342Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_342 = __objc_msgSend_342Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, _NSRange)>(); - - void _objc_msgSend_342_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchString, - int mask, - _NSRange rangeOfReceiverToSearch, - ) { - return __objc_msgSend_342_stret( - stret, - obj, - sel, - searchString, - mask, - rangeOfReceiverToSearch, - ); - } - - late final __objc_msgSend_342_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend_stret'); - late final __objc_msgSend_342_stret = __objc_msgSend_342_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, _NSRange)>(); - - late final _sel_rangeOfString_options_range_locale_1 = - _registerName1("rangeOfString:options:range:locale:"); - _NSRange _objc_msgSend_343( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchString, - int mask, - _NSRange rangeOfReceiverToSearch, - ffi.Pointer locale, - ) { - return __objc_msgSend_343( - obj, - sel, - searchString, - mask, - rangeOfReceiverToSearch, - locale, - ); - } - - late final __objc_msgSend_343Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_343 = __objc_msgSend_343Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, _NSRange, ffi.Pointer)>(); - - void _objc_msgSend_343_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchString, - int mask, - _NSRange rangeOfReceiverToSearch, - ffi.Pointer locale, - ) { - return __objc_msgSend_343_stret( - stret, - obj, - sel, - searchString, - mask, - rangeOfReceiverToSearch, - locale, - ); - } - - late final __objc_msgSend_343_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_343_stret = __objc_msgSend_343_stretPtr.asFunction< - void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange, - ffi.Pointer)>(); - - late final _sel_rangeOfCharacterFromSet_1 = - _registerName1("rangeOfCharacterFromSet:"); - _NSRange _objc_msgSend_344( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchSet, - ) { - return __objc_msgSend_344( - obj, - sel, - searchSet, - ); - } - - late final __objc_msgSend_344Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_344 = __objc_msgSend_344Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - void _objc_msgSend_344_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchSet, - ) { - return __objc_msgSend_344_stret( - stret, - obj, - sel, - searchSet, - ); - } - - late final __objc_msgSend_344_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_344_stret = __objc_msgSend_344_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_rangeOfCharacterFromSet_options_1 = - _registerName1("rangeOfCharacterFromSet:options:"); - _NSRange _objc_msgSend_345( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchSet, - int mask, - ) { - return __objc_msgSend_345( - obj, - sel, - searchSet, - mask, - ); - } - - late final __objc_msgSend_345Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_345 = __objc_msgSend_345Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - void _objc_msgSend_345_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchSet, - int mask, - ) { - return __objc_msgSend_345_stret( - stret, - obj, - sel, - searchSet, - mask, - ); - } - - late final __objc_msgSend_345_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend_stret'); - late final __objc_msgSend_345_stret = __objc_msgSend_345_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_rangeOfCharacterFromSet_options_range_1 = - _registerName1("rangeOfCharacterFromSet:options:range:"); - _NSRange _objc_msgSend_346( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchSet, - int mask, - _NSRange rangeOfReceiverToSearch, - ) { - return __objc_msgSend_346( - obj, - sel, - searchSet, - mask, - rangeOfReceiverToSearch, - ); - } - - late final __objc_msgSend_346Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_346 = __objc_msgSend_346Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, _NSRange)>(); - - void _objc_msgSend_346_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchSet, - int mask, - _NSRange rangeOfReceiverToSearch, - ) { - return __objc_msgSend_346_stret( - stret, - obj, - sel, - searchSet, - mask, - rangeOfReceiverToSearch, - ); - } - - late final __objc_msgSend_346_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend_stret'); - late final __objc_msgSend_346_stret = __objc_msgSend_346_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, _NSRange)>(); - - late final _sel_rangeOfComposedCharacterSequenceAtIndex_1 = - _registerName1("rangeOfComposedCharacterSequenceAtIndex:"); - _NSRange _objc_msgSend_347( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ) { - return __objc_msgSend_347( - obj, - sel, - index, - ); - } - - late final __objc_msgSend_347Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_347 = __objc_msgSend_347Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, int)>(); - - void _objc_msgSend_347_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ) { - return __objc_msgSend_347_stret( - stret, - obj, - sel, - index, - ); - } - - late final __objc_msgSend_347_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend_stret'); - late final __objc_msgSend_347_stret = __objc_msgSend_347_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_rangeOfComposedCharacterSequencesForRange_1 = - _registerName1("rangeOfComposedCharacterSequencesForRange:"); - _NSRange _objc_msgSend_348( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_348( - obj, - sel, - range, - ); - } - - late final __objc_msgSend_348Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_348 = __objc_msgSend_348Ptr.asFunction< - _NSRange Function( - ffi.Pointer, ffi.Pointer, _NSRange)>(); - - void _objc_msgSend_348_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_348_stret( - stret, - obj, - sel, - range, - ); - } - - late final __objc_msgSend_348_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend_stret'); - late final __objc_msgSend_348_stret = __objc_msgSend_348_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, _NSRange)>(); - - late final _sel_stringByAppendingString_1 = - _registerName1("stringByAppendingString:"); - late final _sel_stringByAppendingFormat_1 = - _registerName1("stringByAppendingFormat:"); - late final _sel_uppercaseString1 = _registerName1("uppercaseString"); - late final _sel_lowercaseString1 = _registerName1("lowercaseString"); - late final _sel_capitalizedString1 = _registerName1("capitalizedString"); - late final _sel_localizedUppercaseString1 = - _registerName1("localizedUppercaseString"); - late final _sel_localizedLowercaseString1 = - _registerName1("localizedLowercaseString"); - late final _sel_localizedCapitalizedString1 = - _registerName1("localizedCapitalizedString"); - late final _sel_uppercaseStringWithLocale_1 = - _registerName1("uppercaseStringWithLocale:"); - ffi.Pointer _objc_msgSend_349( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer locale, - ) { - return __objc_msgSend_349( - obj, - sel, - locale, - ); - } - - late final __objc_msgSend_349Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_349 = __objc_msgSend_349Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_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_350( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer startPtr, - ffi.Pointer lineEndPtr, - ffi.Pointer contentsEndPtr, - _NSRange range, - ) { - return __objc_msgSend_350( - obj, - sel, - startPtr, - lineEndPtr, - contentsEndPtr, - range, - ); - } - - late final __objc_msgSend_350Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_350 = __objc_msgSend_350Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>(); - - late final _sel_lineRangeForRange_1 = _registerName1("lineRangeForRange:"); - late final _sel_getParagraphStart_end_contentsEnd_forRange_1 = - _registerName1("getParagraphStart:end:contentsEnd:forRange:"); - late final _sel_paragraphRangeForRange_1 = - _registerName1("paragraphRangeForRange:"); - late final _sel_enumerateSubstringsInRange_options_usingBlock_1 = - _registerName1("enumerateSubstringsInRange:options:usingBlock:"); - void _objc_msgSend_351( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_351( - obj, - sel, - range, - opts, - block, - ); - } - - late final __objc_msgSend_351Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_351 = __objc_msgSend_351Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_enumerateLinesUsingBlock_1 = - _registerName1("enumerateLinesUsingBlock:"); - void _objc_msgSend_352( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_352( - obj, - sel, - block, - ); - } - - late final __objc_msgSend_352Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_352 = __objc_msgSend_352Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - 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_353( - ffi.Pointer obj, - ffi.Pointer sel, - int encoding, - bool lossy, - ) { - return __objc_msgSend_353( - obj, - sel, - encoding, - lossy, - ); - } - - late final __objc_msgSend_353Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_353 = __objc_msgSend_353Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int, bool)>(); - - late final _sel_dataUsingEncoding_1 = _registerName1("dataUsingEncoding:"); - ffi.Pointer _objc_msgSend_354( - ffi.Pointer obj, - ffi.Pointer sel, - int encoding, - ) { - return __objc_msgSend_354( - obj, - sel, - encoding, - ); - } - - late final __objc_msgSend_354Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_354 = __objc_msgSend_354Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_canBeConvertedToEncoding_1 = - _registerName1("canBeConvertedToEncoding:"); - late final _sel_cStringUsingEncoding_1 = - _registerName1("cStringUsingEncoding:"); - late final _sel_getCString_maxLength_encoding_1 = - _registerName1("getCString:maxLength:encoding:"); - bool _objc_msgSend_355( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - int maxBufferCount, - int encoding, - ) { - return __objc_msgSend_355( - obj, - sel, - buffer, - maxBufferCount, - encoding, - ); - } - - late final __objc_msgSend_355Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_355 = __objc_msgSend_355Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); - - late final _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1 = - _registerName1( - "getBytes:maxLength:usedLength:encoding:options:range:remainingRange:"); - bool _objc_msgSend_356( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - int maxBufferCount, - ffi.Pointer usedBufferCount, - int encoding, - int options, - _NSRange range, - ffi.Pointer<_NSRange> leftover, - ) { - return __objc_msgSend_356( - obj, - sel, - buffer, - maxBufferCount, - usedBufferCount, - encoding, - options, - range, - leftover, - ); - } - - late final __objc_msgSend_356Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Int32, - _NSRange, - ffi.Pointer<_NSRange>)>>('objc_msgSend'); - late final __objc_msgSend_356 = __objc_msgSend_356Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - int, - int, - _NSRange, - ffi.Pointer<_NSRange>)>(); - - late final _sel_maximumLengthOfBytesUsingEncoding_1 = - _registerName1("maximumLengthOfBytesUsingEncoding:"); - late final _sel_lengthOfBytesUsingEncoding_1 = - _registerName1("lengthOfBytesUsingEncoding:"); - late final _sel_availableStringEncodings1 = - _registerName1("availableStringEncodings"); - ffi.Pointer _objc_msgSend_357( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_357( - obj, - sel, - ); - } - - late final __objc_msgSend_357Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_357 = __objc_msgSend_357Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_localizedNameOfStringEncoding_1 = - _registerName1("localizedNameOfStringEncoding:"); - late final _sel_defaultCStringEncoding1 = - _registerName1("defaultCStringEncoding"); - late final _sel_decomposedStringWithCanonicalMapping1 = - _registerName1("decomposedStringWithCanonicalMapping"); - late final _sel_precomposedStringWithCanonicalMapping1 = - _registerName1("precomposedStringWithCanonicalMapping"); - late final _sel_decomposedStringWithCompatibilityMapping1 = - _registerName1("decomposedStringWithCompatibilityMapping"); - late final _sel_precomposedStringWithCompatibilityMapping1 = - _registerName1("precomposedStringWithCompatibilityMapping"); - late final _sel_componentsSeparatedByString_1 = - _registerName1("componentsSeparatedByString:"); - ffi.Pointer _objc_msgSend_358( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer separator, - ) { - return __objc_msgSend_358( - obj, - sel, - separator, - ); - } - - late final __objc_msgSend_358Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_358 = __objc_msgSend_358Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_componentsSeparatedByCharactersInSet_1 = - _registerName1("componentsSeparatedByCharactersInSet:"); - ffi.Pointer _objc_msgSend_359( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer separator, - ) { - return __objc_msgSend_359( - obj, - sel, - separator, - ); - } - - late final __objc_msgSend_359Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_359 = __objc_msgSend_359Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_stringByTrimmingCharactersInSet_1 = - _registerName1("stringByTrimmingCharactersInSet:"); - ffi.Pointer _objc_msgSend_360( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer set1, - ) { - return __objc_msgSend_360( - obj, - sel, - set1, - ); - } - - late final __objc_msgSend_360Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_360 = __objc_msgSend_360Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_stringByPaddingToLength_withString_startingAtIndex_1 = - _registerName1("stringByPaddingToLength:withString:startingAtIndex:"); - ffi.Pointer _objc_msgSend_361( - ffi.Pointer obj, - ffi.Pointer sel, - int newLength, - ffi.Pointer padString, - int padIndex, - ) { - return __objc_msgSend_361( - obj, - sel, - newLength, - padString, - padIndex, - ); - } - - late final __objc_msgSend_361Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_361 = __objc_msgSend_361Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer, int)>(); - - late final _sel_stringByFoldingWithOptions_locale_1 = - _registerName1("stringByFoldingWithOptions:locale:"); - ffi.Pointer _objc_msgSend_362( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ffi.Pointer locale, - ) { - return __objc_msgSend_362( - obj, - sel, - options, - locale, - ); - } - - late final __objc_msgSend_362Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_362 = __objc_msgSend_362Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_stringByReplacingOccurrencesOfString_withString_options_range_1 = - _registerName1( - "stringByReplacingOccurrencesOfString:withString:options:range:"); - ffi.Pointer _objc_msgSend_363( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer replacement, - int options, - _NSRange searchRange, - ) { - return __objc_msgSend_363( - obj, - sel, - target, - replacement, - options, - searchRange, - ); - } - - late final __objc_msgSend_363Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_363 = __objc_msgSend_363Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange)>(); - - late final _sel_stringByReplacingOccurrencesOfString_withString_1 = - _registerName1("stringByReplacingOccurrencesOfString:withString:"); - ffi.Pointer _objc_msgSend_364( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer replacement, - ) { - return __objc_msgSend_364( - obj, - sel, - target, - replacement, - ); - } - - late final __objc_msgSend_364Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_364 = __objc_msgSend_364Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_stringByReplacingCharactersInRange_withString_1 = - _registerName1("stringByReplacingCharactersInRange:withString:"); - ffi.Pointer _objc_msgSend_365( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer replacement, - ) { - return __objc_msgSend_365( - obj, - sel, - range, - replacement, - ); - } - - late final __objc_msgSend_365Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_365 = __objc_msgSend_365Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange, ffi.Pointer)>(); - - late final _sel_stringByApplyingTransform_reverse_1 = - _registerName1("stringByApplyingTransform:reverse:"); - ffi.Pointer _objc_msgSend_366( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer transform, - bool reverse, - ) { - return __objc_msgSend_366( - obj, - sel, - transform, - reverse, - ); - } - - late final __objc_msgSend_366Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_366 = __objc_msgSend_366Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_writeToURL_atomically_encoding_error_1 = - _registerName1("writeToURL:atomically:encoding:error:"); - bool _objc_msgSend_367( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - bool useAuxiliaryFile, - int enc, - ffi.Pointer> error, - ) { - return __objc_msgSend_367( - obj, - sel, - url, - useAuxiliaryFile, - enc, - error, - ); - } - - late final __objc_msgSend_367Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.UnsignedLong, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_367 = __objc_msgSend_367Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - int, - ffi.Pointer>)>(); - - late final _sel_writeToFile_atomically_encoding_error_1 = - _registerName1("writeToFile:atomically:encoding:error:"); - bool _objc_msgSend_368( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool useAuxiliaryFile, - int enc, - ffi.Pointer> error, - ) { - return __objc_msgSend_368( - obj, - sel, - path, - useAuxiliaryFile, - enc, - error, - ); - } - - late final __objc_msgSend_368Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.UnsignedLong, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_368 = __objc_msgSend_368Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - int, - ffi.Pointer>)>(); - - late final _sel_hash1 = _registerName1("hash"); - late final _sel_initWithCharactersNoCopy_length_freeWhenDone_1 = - _registerName1("initWithCharactersNoCopy:length:freeWhenDone:"); - instancetype _objc_msgSend_369( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer characters, - int length, - bool freeBuffer, - ) { - return __objc_msgSend_369( - obj, - sel, - characters, - length, - freeBuffer, - ); - } - - late final __objc_msgSend_369Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_369 = __objc_msgSend_369Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, bool)>(); - - late final _sel_initWithCharactersNoCopy_length_deallocator_1 = - _registerName1("initWithCharactersNoCopy:length:deallocator:"); - instancetype _objc_msgSend_370( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer chars, - int len, - ffi.Pointer<_ObjCBlock> deallocator, - ) { - return __objc_msgSend_370( - obj, - sel, - chars, - len, - deallocator, - ); - } - - late final __objc_msgSend_370Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_370 = __objc_msgSend_370Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_initWithCharacters_length_1 = - _registerName1("initWithCharacters:length:"); - instancetype _objc_msgSend_371( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer characters, - int length, - ) { - return __objc_msgSend_371( - obj, - sel, - characters, - length, - ); - } - - late final __objc_msgSend_371Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_371 = __objc_msgSend_371Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_initWithUTF8String_1 = _registerName1("initWithUTF8String:"); - instancetype _objc_msgSend_372( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer nullTerminatedCString, - ) { - return __objc_msgSend_372( - obj, - sel, - nullTerminatedCString, - ); - } - - late final __objc_msgSend_372Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_372 = __objc_msgSend_372Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithFormat_1 = _registerName1("initWithFormat:"); - late final _sel_initWithFormat_arguments_1 = - _registerName1("initWithFormat:arguments:"); - instancetype _objc_msgSend_373( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer<__va_list_tag> argList, - ) { - return __objc_msgSend_373( - obj, - sel, - format, - argList, - ); - } - - late final __objc_msgSend_373Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>('objc_msgSend'); - late final __objc_msgSend_373 = __objc_msgSend_373Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<__va_list_tag>)>(); - - late final _sel_initWithFormat_locale_1 = - _registerName1("initWithFormat:locale:"); - instancetype _objc_msgSend_374( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer locale, - ) { - return __objc_msgSend_374( - obj, - sel, - format, - locale, - ); - } - - late final __objc_msgSend_374Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_374 = __objc_msgSend_374Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithFormat_locale_arguments_1 = - _registerName1("initWithFormat:locale:arguments:"); - instancetype _objc_msgSend_375( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer locale, - ffi.Pointer<__va_list_tag> argList, - ) { - return __objc_msgSend_375( - obj, - sel, - format, - locale, - argList, - ); - } - - late final __objc_msgSend_375Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>('objc_msgSend'); - late final __objc_msgSend_375 = __objc_msgSend_375Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>(); - - late final _sel_initWithValidatedFormat_validFormatSpecifiers_error_1 = - _registerName1("initWithValidatedFormat:validFormatSpecifiers:error:"); - instancetype _objc_msgSend_376( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer validFormatSpecifiers, - ffi.Pointer> error, - ) { - return __objc_msgSend_376( - obj, - sel, - format, - validFormatSpecifiers, - error, - ); - } - - late final __objc_msgSend_376Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_376 = __objc_msgSend_376Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1 = - _registerName1( - "initWithValidatedFormat:validFormatSpecifiers:locale:error:"); - instancetype _objc_msgSend_377( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer validFormatSpecifiers, - ffi.Pointer locale, - ffi.Pointer> error, - ) { - return __objc_msgSend_377( - obj, - sel, - format, - validFormatSpecifiers, - locale, - error, - ); - } - - late final __objc_msgSend_377Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_377 = __objc_msgSend_377Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1 = - _registerName1( - "initWithValidatedFormat:validFormatSpecifiers:arguments:error:"); - instancetype _objc_msgSend_378( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer validFormatSpecifiers, - ffi.Pointer<__va_list_tag> argList, - ffi.Pointer> error, - ) { - return __objc_msgSend_378( - obj, - sel, - format, - validFormatSpecifiers, - argList, - error, - ); - } - - late final __objc_msgSend_378Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_378 = __objc_msgSend_378Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>, - ffi.Pointer>)>(); - - late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1 = - _registerName1( - "initWithValidatedFormat:validFormatSpecifiers:locale:arguments:error:"); - instancetype _objc_msgSend_379( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer validFormatSpecifiers, - ffi.Pointer locale, - ffi.Pointer<__va_list_tag> argList, - ffi.Pointer> error, - ) { - return __objc_msgSend_379( - obj, - sel, - format, - validFormatSpecifiers, - locale, - argList, - error, - ); - } - - late final __objc_msgSend_379Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_379 = __objc_msgSend_379Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>, - ffi.Pointer>)>(); - - late final _sel_initWithData_encoding_1 = - _registerName1("initWithData:encoding:"); - instancetype _objc_msgSend_380( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - int encoding, - ) { - return __objc_msgSend_380( - obj, - sel, - data, - encoding, - ); - } - - late final __objc_msgSend_380Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_380 = __objc_msgSend_380Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_initWithBytes_length_encoding_1 = - _registerName1("initWithBytes:length:encoding:"); - instancetype _objc_msgSend_381( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int len, - int encoding, - ) { - return __objc_msgSend_381( - obj, - sel, - bytes, - len, - encoding, - ); - } - - late final __objc_msgSend_381Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_381 = __objc_msgSend_381Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); - - late final _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1 = - _registerName1("initWithBytesNoCopy:length:encoding:freeWhenDone:"); - instancetype _objc_msgSend_382( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int len, - int encoding, - bool freeBuffer, - ) { - return __objc_msgSend_382( - obj, - sel, - bytes, - len, - encoding, - freeBuffer, - ); - } - - late final __objc_msgSend_382Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_382 = __objc_msgSend_382Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, bool)>(); - - late final _sel_initWithBytesNoCopy_length_encoding_deallocator_1 = - _registerName1("initWithBytesNoCopy:length:encoding:deallocator:"); - instancetype _objc_msgSend_383( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int len, - int encoding, - ffi.Pointer<_ObjCBlock> deallocator, - ) { - return __objc_msgSend_383( - obj, - sel, - bytes, - len, - encoding, - deallocator, - ); - } - - late final __objc_msgSend_383Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_383 = __objc_msgSend_383Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_string1 = _registerName1("string"); - late final _sel_stringWithString_1 = _registerName1("stringWithString:"); - late final _sel_stringWithCharacters_length_1 = - _registerName1("stringWithCharacters:length:"); - late final _sel_stringWithUTF8String_1 = - _registerName1("stringWithUTF8String:"); - late final _sel_stringWithFormat_1 = _registerName1("stringWithFormat:"); - late final _sel_localizedStringWithFormat_1 = - _registerName1("localizedStringWithFormat:"); - late final _sel_stringWithValidatedFormat_validFormatSpecifiers_error_1 = - _registerName1("stringWithValidatedFormat:validFormatSpecifiers:error:"); - late final _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1 = - _registerName1( - "localizedStringWithValidatedFormat:validFormatSpecifiers:error:"); - late final _sel_initWithCString_encoding_1 = - _registerName1("initWithCString:encoding:"); - instancetype _objc_msgSend_384( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer nullTerminatedCString, - int encoding, - ) { - return __objc_msgSend_384( - obj, - sel, - nullTerminatedCString, - encoding, - ); - } - - late final __objc_msgSend_384Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_384 = __objc_msgSend_384Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_stringWithCString_encoding_1 = - _registerName1("stringWithCString:encoding:"); - late final _sel_initWithContentsOfURL_encoding_error_1 = - _registerName1("initWithContentsOfURL:encoding:error:"); - instancetype _objc_msgSend_385( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int enc, - ffi.Pointer> error, - ) { - return __objc_msgSend_385( - obj, - sel, - url, - enc, - error, - ); - } - - late final __objc_msgSend_385Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_385 = __objc_msgSend_385Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_initWithContentsOfFile_encoding_error_1 = - _registerName1("initWithContentsOfFile:encoding:error:"); - instancetype _objc_msgSend_386( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - int enc, - ffi.Pointer> error, - ) { - return __objc_msgSend_386( - obj, - sel, - path, - enc, - error, - ); - } - - late final __objc_msgSend_386Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_386 = __objc_msgSend_386Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_stringWithContentsOfURL_encoding_error_1 = - _registerName1("stringWithContentsOfURL:encoding:error:"); - late final _sel_stringWithContentsOfFile_encoding_error_1 = - _registerName1("stringWithContentsOfFile:encoding:error:"); - late final _sel_initWithContentsOfURL_usedEncoding_error_1 = - _registerName1("initWithContentsOfURL:usedEncoding:error:"); - instancetype _objc_msgSend_387( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer enc, - ffi.Pointer> error, - ) { - return __objc_msgSend_387( - obj, - sel, - url, - enc, - error, - ); - } - - late final __objc_msgSend_387Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_387 = __objc_msgSend_387Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_initWithContentsOfFile_usedEncoding_error_1 = - _registerName1("initWithContentsOfFile:usedEncoding:error:"); - instancetype _objc_msgSend_388( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer enc, - ffi.Pointer> error, - ) { - return __objc_msgSend_388( - obj, - sel, - path, - enc, - error, - ); - } - - late final __objc_msgSend_388Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_388 = __objc_msgSend_388Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_stringWithContentsOfURL_usedEncoding_error_1 = - _registerName1("stringWithContentsOfURL:usedEncoding:error:"); - late final _sel_stringWithContentsOfFile_usedEncoding_error_1 = - _registerName1("stringWithContentsOfFile:usedEncoding:error:"); - late final _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1 = - _registerName1( - "stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:"); - int _objc_msgSend_389( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion, - ) { - return __objc_msgSend_389( - obj, - sel, - data, - opts, - string, - usedLossyConversion, - ); - } - - late final __objc_msgSend_389Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_389 = __objc_msgSend_389Ptr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); - - late final _sel_propertyList1 = _registerName1("propertyList"); - late final _sel_propertyListFromStringsFileFormat1 = - _registerName1("propertyListFromStringsFileFormat"); - ffi.Pointer _objc_msgSend_390( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_390( - obj, - sel, - ); - } - - late final __objc_msgSend_390Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_390 = __objc_msgSend_390Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_cString1 = _registerName1("cString"); - late final _sel_lossyCString1 = _registerName1("lossyCString"); - late final _sel_cStringLength1 = _registerName1("cStringLength"); - late final _sel_getCString_1 = _registerName1("getCString:"); - late final _sel_getCString_maxLength_1 = - _registerName1("getCString:maxLength:"); - void _objc_msgSend_391( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int maxLength, - ) { - return __objc_msgSend_391( - obj, - sel, - bytes, - maxLength, - ); - } - - late final __objc_msgSend_391Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_391 = __objc_msgSend_391Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_getCString_maxLength_range_remainingRange_1 = - _registerName1("getCString:maxLength:range:remainingRange:"); - void _objc_msgSend_392( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int maxLength, - _NSRange aRange, - ffi.Pointer<_NSRange> leftoverRange, - ) { - return __objc_msgSend_392( - obj, - sel, - bytes, - maxLength, - aRange, - leftoverRange, - ); - } - - late final __objc_msgSend_392Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - _NSRange, - ffi.Pointer<_NSRange>)>>('objc_msgSend'); - late final __objc_msgSend_392 = __objc_msgSend_392Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, _NSRange, ffi.Pointer<_NSRange>)>(); - - 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_393( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int length, - bool freeBuffer, - ) { - return __objc_msgSend_393( - obj, - sel, - bytes, - length, - freeBuffer, - ); - } - - late final __objc_msgSend_393Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_393 = __objc_msgSend_393Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, bool)>(); - - late final _sel_initWithCString_length_1 = - _registerName1("initWithCString:length:"); - late final _sel_initWithCString_1 = _registerName1("initWithCString:"); - late final _sel_stringWithCString_length_1 = - _registerName1("stringWithCString:length:"); - late final _sel_stringWithCString_1 = _registerName1("stringWithCString:"); - late final _sel_getCharacters_1 = _registerName1("getCharacters:"); - void _objc_msgSend_394( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - ) { - return __objc_msgSend_394( - obj, - sel, - buffer, - ); - } - - late final __objc_msgSend_394Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_394 = __objc_msgSend_394Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_variantFittingPresentationWidth_1 = - _registerName1("variantFittingPresentationWidth:"); - ffi.Pointer _objc_msgSend_395( - ffi.Pointer obj, - ffi.Pointer sel, - int width, - ) { - return __objc_msgSend_395( - obj, - sel, - width, - ); - } - - late final __objc_msgSend_395Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_395 = __objc_msgSend_395Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_pathWithComponents_1 = _registerName1("pathWithComponents:"); - ffi.Pointer _objc_msgSend_396( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer components, - ) { - return __objc_msgSend_396( - obj, - sel, - components, - ); - } - - late final __objc_msgSend_396Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(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)>(); - - late final _sel_isAbsolutePath1 = _registerName1("isAbsolutePath"); - late final _sel_stringByDeletingLastPathComponent1 = - _registerName1("stringByDeletingLastPathComponent"); - late final _sel_stringByAppendingPathComponent_1 = - _registerName1("stringByAppendingPathComponent:"); - late final _sel_stringByDeletingPathExtension1 = - _registerName1("stringByDeletingPathExtension"); - late final _sel_stringByAppendingPathExtension_1 = - _registerName1("stringByAppendingPathExtension:"); - late final _sel_stringByAbbreviatingWithTildeInPath1 = - _registerName1("stringByAbbreviatingWithTildeInPath"); - late final _sel_stringByExpandingTildeInPath1 = - _registerName1("stringByExpandingTildeInPath"); - late final _sel_stringByStandardizingPath1 = - _registerName1("stringByStandardizingPath"); - late final _sel_stringByResolvingSymlinksInPath1 = - _registerName1("stringByResolvingSymlinksInPath"); - late final _sel_stringsByAppendingPaths_1 = - _registerName1("stringsByAppendingPaths:"); - late final _sel_completePathIntoString_caseSensitive_matchesIntoArray_filterTypes_1 = - _registerName1( - "completePathIntoString:caseSensitive:matchesIntoArray:filterTypes:"); - int _objc_msgSend_397( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> outputName, - bool flag, - ffi.Pointer> outputArray, - ffi.Pointer filterTypes, - ) { - return __objc_msgSend_397( - obj, - sel, - outputName, - flag, - outputArray, - filterTypes, - ); - } - - late final __objc_msgSend_397Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Bool, - ffi.Pointer>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_397 = __objc_msgSend_397Ptr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - bool, - ffi.Pointer>, - ffi.Pointer)>(); - - late final _sel_stringByAddingPercentEncodingWithAllowedCharacters_1 = - _registerName1("stringByAddingPercentEncodingWithAllowedCharacters:"); - ffi.Pointer _objc_msgSend_398( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer allowedCharacters, - ) { - return __objc_msgSend_398( - obj, - sel, - allowedCharacters, - ); - } - - late final __objc_msgSend_398Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_398 = __objc_msgSend_398Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_stringByRemovingPercentEncoding1 = - _registerName1("stringByRemovingPercentEncoding"); - late final _sel_stringByAddingPercentEscapesUsingEncoding_1 = - _registerName1("stringByAddingPercentEscapesUsingEncoding:"); - ffi.Pointer _objc_msgSend_399( - ffi.Pointer obj, - ffi.Pointer sel, - int enc, - ) { - return __objc_msgSend_399( - obj, - sel, - enc, - ); - } - - late final __objc_msgSend_399Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_399 = __objc_msgSend_399Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_stringByReplacingPercentEscapesUsingEncoding_1 = - _registerName1("stringByReplacingPercentEscapesUsingEncoding:"); - late final _class_NSOrthography1 = _getClass1("NSOrthography"); - late final _sel_dominantScript1 = _registerName1("dominantScript"); - late final _sel_languageMap1 = _registerName1("languageMap"); - late final _sel_initWithDominantScript_languageMap_1 = - _registerName1("initWithDominantScript:languageMap:"); - instancetype _objc_msgSend_400( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer script, - ffi.Pointer map, - ) { - return __objc_msgSend_400( - obj, - sel, - script, - map, - ); - } - - late final __objc_msgSend_400Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_400 = __objc_msgSend_400Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_languagesForScript_1 = _registerName1("languagesForScript:"); - late final _sel_dominantLanguageForScript_1 = - _registerName1("dominantLanguageForScript:"); - late final _sel_dominantLanguage1 = _registerName1("dominantLanguage"); - late final _sel_allScripts1 = _registerName1("allScripts"); - late final _sel_allLanguages1 = _registerName1("allLanguages"); - late final _sel_defaultOrthographyForLanguage_1 = - _registerName1("defaultOrthographyForLanguage:"); - late final _sel_orthographyWithDominantScript_languageMap_1 = - _registerName1("orthographyWithDominantScript:languageMap:"); - late final _sel_linguisticTagsInRange_scheme_options_orthography_tokenRanges_1 = - _registerName1( - "linguisticTagsInRange:scheme:options:orthography:tokenRanges:"); - ffi.Pointer _objc_msgSend_401( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer scheme, - int options, - ffi.Pointer orthography, - ffi.Pointer> tokenRanges, - ) { - return __objc_msgSend_401( - obj, - sel, - range, - scheme, - options, - orthography, - tokenRanges, - ); - } - - late final __objc_msgSend_401Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_401 = __objc_msgSend_401Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock_1 = - _registerName1( - "enumerateLinguisticTagsInRange:scheme:options:orthography:usingBlock:"); - void _objc_msgSend_402( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer scheme, - int options, - ffi.Pointer orthography, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_402( - obj, - sel, - range, - scheme, - options, - orthography, - block, - ); - } - - late final __objc_msgSend_402Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_402 = __objc_msgSend_402Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_anyObject1 = _registerName1("anyObject"); - late final _sel_intersectsSet_1 = _registerName1("intersectsSet:"); - bool _objc_msgSend_403( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherSet, - ) { - return __objc_msgSend_403( - obj, - sel, - otherSet, - ); - } - - late final __objc_msgSend_403Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_403 = __objc_msgSend_403Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_isEqualToSet_1 = _registerName1("isEqualToSet:"); - late final _sel_isSubsetOfSet_1 = _registerName1("isSubsetOfSet:"); - late final _sel_setByAddingObject_1 = _registerName1("setByAddingObject:"); - ffi.Pointer _objc_msgSend_404( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - ) { - return __objc_msgSend_404( - obj, - sel, - anObject, - ); - } - - late final __objc_msgSend_404Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_404 = __objc_msgSend_404Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setByAddingObjectsFromSet_1 = - _registerName1("setByAddingObjectsFromSet:"); - ffi.Pointer _objc_msgSend_405( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - ) { - return __objc_msgSend_405( - obj, - sel, - other, - ); - } - - late final __objc_msgSend_405Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_405 = __objc_msgSend_405Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setByAddingObjectsFromArray_1 = - _registerName1("setByAddingObjectsFromArray:"); - ffi.Pointer _objc_msgSend_406( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - ) { - return __objc_msgSend_406( - obj, - sel, - other, - ); - } - - late final __objc_msgSend_406Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_406 = __objc_msgSend_406Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - void _objc_msgSend_407( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_407( - obj, - sel, - block, - ); - } - - late final __objc_msgSend_407Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(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<_ObjCBlock>)>(); - - void _objc_msgSend_408( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_408( - obj, - sel, - opts, - block, - ); - } - - late final __objc_msgSend_408Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_408 = __objc_msgSend_408Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_objectsPassingTest_1 = _registerName1("objectsPassingTest:"); - ffi.Pointer _objc_msgSend_409( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_409( - obj, - sel, - predicate, - ); - } - - late final __objc_msgSend_409Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_409 = __objc_msgSend_409Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_objectsWithOptions_passingTest_1 = - _registerName1("objectsWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_410( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_410( - obj, - sel, - opts, - predicate, - ); - } - - late final __objc_msgSend_410Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_410 = __objc_msgSend_410Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_set1 = _registerName1("set"); - late final _sel_setWithObject_1 = _registerName1("setWithObject:"); - late final _sel_setWithObjects_count_1 = - _registerName1("setWithObjects:count:"); - late final _sel_setWithObjects_1 = _registerName1("setWithObjects:"); - late final _sel_setWithSet_1 = _registerName1("setWithSet:"); - instancetype _objc_msgSend_411( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer set1, - ) { - return __objc_msgSend_411( - obj, - sel, - set1, - ); - } - - late final __objc_msgSend_411Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_411 = __objc_msgSend_411Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_setWithArray_1 = _registerName1("setWithArray:"); - late final _sel_initWithSet_1 = _registerName1("initWithSet:"); - late final _sel_initWithSet_copyItems_1 = - _registerName1("initWithSet:copyItems:"); - instancetype _objc_msgSend_412( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer set1, - bool flag, - ) { - return __objc_msgSend_412( - obj, - sel, - set1, - flag, - ); - } - - late final __objc_msgSend_412Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_412 = __objc_msgSend_412Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_filteredSetUsingPredicate_1 = - _registerName1("filteredSetUsingPredicate:"); - ffi.Pointer _objc_msgSend_413( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer predicate, - ) { - return __objc_msgSend_413( - obj, - sel, - predicate, - ); - } - - late final __objc_msgSend_413Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_413 = __objc_msgSend_413Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_invocationWithMethodSignature_1 = - _registerName1("invocationWithMethodSignature:"); - ffi.Pointer _objc_msgSend_414( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer sig, - ) { - return __objc_msgSend_414( - obj, - sel, - sig, - ); - } - - late final __objc_msgSend_414Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_414 = __objc_msgSend_414Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_methodSignature1 = _registerName1("methodSignature"); - ffi.Pointer _objc_msgSend_415( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_415( - obj, - sel, - ); - } - - late final __objc_msgSend_415Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_415 = __objc_msgSend_415Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_retainArguments1 = _registerName1("retainArguments"); - late final _sel_argumentsRetained1 = _registerName1("argumentsRetained"); - late final _sel_target1 = _registerName1("target"); - late final _sel_setTarget_1 = _registerName1("setTarget:"); - void _objc_msgSend_416( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_416( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_416Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_416 = __objc_msgSend_416Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_selector1 = _registerName1("selector"); - ffi.Pointer _objc_msgSend_417( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_417( - obj, - sel, - ); - } - - late final __objc_msgSend_417Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_417 = __objc_msgSend_417Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setSelector_1 = _registerName1("setSelector:"); - void _objc_msgSend_418( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_418( - obj, - sel, - 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)>(); - - late final _sel_getReturnValue_1 = _registerName1("getReturnValue:"); - late final _sel_setReturnValue_1 = _registerName1("setReturnValue:"); - late final _sel_getArgument_atIndex_1 = - _registerName1("getArgument:atIndex:"); - void _objc_msgSend_419( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer argumentLocation, - int idx, - ) { - return __objc_msgSend_419( - obj, - sel, - argumentLocation, - idx, - ); - } - - late final __objc_msgSend_419Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_419 = __objc_msgSend_419Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_setArgument_atIndex_1 = - _registerName1("setArgument:atIndex:"); - late final _sel_invoke1 = _registerName1("invoke"); - late final _sel_invokeWithTarget_1 = _registerName1("invokeWithTarget:"); - late final _sel_invokeUsingIMP_1 = _registerName1("invokeUsingIMP:"); - void _objc_msgSend_420( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> imp, - ) { - return __objc_msgSend_420( - obj, - sel, - imp, - ); - } - - late final __objc_msgSend_420Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>( - 'objc_msgSend'); - late final __objc_msgSend_420 = __objc_msgSend_420Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_forwardInvocation_1 = _registerName1("forwardInvocation:"); - void _objc_msgSend_421( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anInvocation, - ) { - return __objc_msgSend_421( - obj, - sel, - anInvocation, - ); - } - - late final __objc_msgSend_421Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_421 = __objc_msgSend_421Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_methodSignatureForSelector_1 = - _registerName1("methodSignatureForSelector:"); - ffi.Pointer _objc_msgSend_422( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ) { - return __objc_msgSend_422( - obj, - sel, - aSelector, - ); - } - - late final __objc_msgSend_422Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(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)>(); - - late final _sel_instanceMethodSignatureForSelector_1 = - _registerName1("instanceMethodSignatureForSelector:"); - late final _sel_allowsWeakReference1 = _registerName1("allowsWeakReference"); - 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_superclass1 = _registerName1("superclass"); - late final _sel_class1 = _registerName1("class"); - late final _sel_debugDescription1 = _registerName1("debugDescription"); - late final _sel_version1 = _registerName1("version"); - late final _sel_setVersion_1 = _registerName1("setVersion:"); - void _objc_msgSend_423( - ffi.Pointer obj, - ffi.Pointer sel, - int aVersion, - ) { - return __objc_msgSend_423( - obj, - sel, - aVersion, - ); - } - - late final __objc_msgSend_423Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_423 = __objc_msgSend_423Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_classForCoder1 = _registerName1("classForCoder"); - late final _sel_replacementObjectForCoder_1 = - _registerName1("replacementObjectForCoder:"); - late final _sel_awakeAfterUsingCoder_1 = - _registerName1("awakeAfterUsingCoder:"); - late final _sel_poseAsClass_1 = _registerName1("poseAsClass:"); - late final _sel_autoContentAccessingProxy1 = - _registerName1("autoContentAccessingProxy"); - late final _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1 = - _registerName1( - "attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:"); - void _objc_msgSend_424( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer error, - int recoveryOptionIndex, - ffi.Pointer delegate, - ffi.Pointer didRecoverSelector, - ffi.Pointer contextInfo, - ) { - return __objc_msgSend_424( - obj, - sel, - error, - recoveryOptionIndex, - delegate, - didRecoverSelector, - contextInfo, - ); - } - - late final __objc_msgSend_424Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_424 = __objc_msgSend_424Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_attemptRecoveryFromError_optionIndex_1 = - _registerName1("attemptRecoveryFromError:optionIndex:"); - bool _objc_msgSend_425( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer error, - int recoveryOptionIndex, - ) { - return __objc_msgSend_425( - obj, - sel, - error, - recoveryOptionIndex, - ); - } - - late final __objc_msgSend_425Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_425 = __objc_msgSend_425Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_performSelector_withObject_afterDelay_inModes_1 = - _registerName1("performSelector:withObject:afterDelay:inModes:"); - void _objc_msgSend_426( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ffi.Pointer anArgument, - double delay, - ffi.Pointer modes, - ) { - return __objc_msgSend_426( - obj, - sel, - aSelector, - anArgument, - delay, - modes, - ); - } - - late final __objc_msgSend_426Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_426 = __objc_msgSend_426Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - double, - ffi.Pointer)>(); - - late final _sel_performSelector_withObject_afterDelay_1 = - _registerName1("performSelector:withObject:afterDelay:"); - void _objc_msgSend_427( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ffi.Pointer anArgument, - double delay, - ) { - return __objc_msgSend_427( - obj, - sel, - aSelector, - anArgument, - delay, - ); - } - - late final __objc_msgSend_427Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_427 = __objc_msgSend_427Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, double)>(); - - late final _sel_URL_resourceDataDidBecomeAvailable_1 = - _registerName1("URL:resourceDataDidBecomeAvailable:"); - void _objc_msgSend_428( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer sender, - ffi.Pointer newBytes, - ) { - return __objc_msgSend_428( - obj, - sel, - sender, - newBytes, - ); - } - - late final __objc_msgSend_428Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_428 = __objc_msgSend_428Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_URLResourceDidFinishLoading_1 = - _registerName1("URLResourceDidFinishLoading:"); - void _objc_msgSend_429( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer sender, - ) { - return __objc_msgSend_429( - obj, - sel, - sender, - ); - } - - late final __objc_msgSend_429Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_429 = __objc_msgSend_429Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_URLResourceDidCancelLoading_1 = - _registerName1("URLResourceDidCancelLoading:"); - late final _sel_URL_resourceDidFailLoadingWithReason_1 = - _registerName1("URL:resourceDidFailLoadingWithReason:"); - void _objc_msgSend_430( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer sender, - ffi.Pointer reason, - ) { - return __objc_msgSend_430( - obj, - sel, - sender, - reason, - ); - } - - late final __objc_msgSend_430Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_430 = __objc_msgSend_430Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSFileManager1 = _getClass1("NSFileManager"); - late final _sel_defaultManager1 = _registerName1("defaultManager"); - ffi.Pointer _objc_msgSend_431( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_431( - obj, - sel, - ); - } - - late final __objc_msgSend_431Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_431 = __objc_msgSend_431Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_1 = - _registerName1( - "mountedVolumeURLsIncludingResourceValuesForKeys:options:"); - ffi.Pointer _objc_msgSend_432( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer propertyKeys, - int options, - ) { - return __objc_msgSend_432( - obj, - sel, - propertyKeys, - options, - ); - } - - late final __objc_msgSend_432Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_432 = __objc_msgSend_432Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_unmountVolumeAtURL_options_completionHandler_1 = - _registerName1("unmountVolumeAtURL:options:completionHandler:"); - void _objc_msgSend_433( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int mask, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_433( - obj, - sel, - url, - mask, - completionHandler, - ); - } - - late final __objc_msgSend_433Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_433 = __objc_msgSend_433Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_1 = - _registerName1( - "contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:"); - ffi.Pointer _objc_msgSend_434( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer keys, - int mask, - ffi.Pointer> error, - ) { - return __objc_msgSend_434( - obj, - sel, - url, - keys, - mask, - error, - ); - } - - late final __objc_msgSend_434Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_434 = __objc_msgSend_434Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_URLsForDirectory_inDomains_1 = - _registerName1("URLsForDirectory:inDomains:"); - ffi.Pointer _objc_msgSend_435( - ffi.Pointer obj, - ffi.Pointer sel, - int directory, - int domainMask, - ) { - return __objc_msgSend_435( - obj, - sel, - directory, - domainMask, - ); - } - - late final __objc_msgSend_435Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_435 = __objc_msgSend_435Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int, int)>(); - - late final _sel_URLForDirectory_inDomain_appropriateForURL_create_error_1 = - _registerName1( - "URLForDirectory:inDomain:appropriateForURL:create:error:"); - ffi.Pointer _objc_msgSend_436( - ffi.Pointer obj, - ffi.Pointer sel, - int directory, - int domain, - ffi.Pointer url, - bool shouldCreate, - ffi.Pointer> error, - ) { - return __objc_msgSend_436( - obj, - sel, - directory, - domain, - url, - shouldCreate, - error, - ); - } - - late final __objc_msgSend_436Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer, - ffi.Bool, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_436 = __objc_msgSend_436Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer, - bool, - ffi.Pointer>)>(); - - late final _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_1 = - _registerName1("getRelationship:ofDirectoryAtURL:toItemAtURL:error:"); - bool _objc_msgSend_437( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer outRelationship, - ffi.Pointer directoryURL, - ffi.Pointer otherURL, - ffi.Pointer> error, - ) { - return __objc_msgSend_437( - obj, - sel, - outRelationship, - directoryURL, - otherURL, - error, - ); - } - - late final __objc_msgSend_437Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_437 = __objc_msgSend_437Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_getRelationship_ofDirectory_inDomain_toItemAtURL_error_1 = - _registerName1("getRelationship:ofDirectory:inDomain:toItemAtURL:error:"); - bool _objc_msgSend_438( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer outRelationship, - int directory, - int domainMask, - ffi.Pointer url, - ffi.Pointer> error, - ) { - return __objc_msgSend_438( - obj, - sel, - outRelationship, - directory, - domainMask, - url, - error, - ); - } - - late final __objc_msgSend_438Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_438 = __objc_msgSend_438Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_createDirectoryAtURL_withIntermediateDirectories_attributes_error_1 = - _registerName1( - "createDirectoryAtURL:withIntermediateDirectories:attributes:error:"); - bool _objc_msgSend_439( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - bool createIntermediates, - ffi.Pointer attributes, - ffi.Pointer> error, - ) { - return __objc_msgSend_439( - obj, - sel, - url, - createIntermediates, - attributes, - error, - ); - } - - late final __objc_msgSend_439Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_439 = __objc_msgSend_439Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_createSymbolicLinkAtURL_withDestinationURL_error_1 = - _registerName1("createSymbolicLinkAtURL:withDestinationURL:error:"); - bool _objc_msgSend_440( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer destURL, - ffi.Pointer> error, - ) { - return __objc_msgSend_440( - obj, - sel, - url, - destURL, - error, - ); - } - - late final __objc_msgSend_440Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_440 = __objc_msgSend_440Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_delegate1 = _registerName1("delegate"); - late final _sel_setDelegate_1 = _registerName1("setDelegate:"); - late final _sel_setAttributes_ofItemAtPath_error_1 = - _registerName1("setAttributes:ofItemAtPath:error:"); - bool _objc_msgSend_441( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer attributes, - ffi.Pointer path, - ffi.Pointer> error, - ) { - return __objc_msgSend_441( - obj, - sel, - attributes, - path, - error, - ); - } - - late final __objc_msgSend_441Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_441 = __objc_msgSend_441Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_1 = - _registerName1( - "createDirectoryAtPath:withIntermediateDirectories:attributes:error:"); - bool _objc_msgSend_442( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool createIntermediates, - ffi.Pointer attributes, - ffi.Pointer> error, - ) { - return __objc_msgSend_442( - obj, - sel, - path, - createIntermediates, - attributes, - error, - ); - } - - late final __objc_msgSend_442Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_442 = __objc_msgSend_442Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_contentsOfDirectoryAtPath_error_1 = - _registerName1("contentsOfDirectoryAtPath:error:"); - ffi.Pointer _objc_msgSend_443( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer> error, - ) { - return __objc_msgSend_443( - obj, - sel, - path, - error, - ); - } - - late final __objc_msgSend_443Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_443 = __objc_msgSend_443Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_subpathsOfDirectoryAtPath_error_1 = - _registerName1("subpathsOfDirectoryAtPath:error:"); - late final _sel_attributesOfItemAtPath_error_1 = - _registerName1("attributesOfItemAtPath:error:"); - ffi.Pointer _objc_msgSend_444( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer> error, - ) { - return __objc_msgSend_444( - obj, - sel, - path, - error, - ); - } - - late final __objc_msgSend_444Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - 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, - ffi.Pointer>)>(); - - late final _sel_attributesOfFileSystemForPath_error_1 = - _registerName1("attributesOfFileSystemForPath:error:"); - late final _sel_createSymbolicLinkAtPath_withDestinationPath_error_1 = - _registerName1("createSymbolicLinkAtPath:withDestinationPath:error:"); - bool _objc_msgSend_445( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer destPath, - ffi.Pointer> error, - ) { - return __objc_msgSend_445( - obj, - sel, - path, - destPath, - error, - ); - } - - late final __objc_msgSend_445Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_445 = __objc_msgSend_445Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_destinationOfSymbolicLinkAtPath_error_1 = - _registerName1("destinationOfSymbolicLinkAtPath:error:"); - ffi.Pointer _objc_msgSend_446( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer> error, - ) { - return __objc_msgSend_446( - obj, - sel, - path, - error, - ); - } - - late final __objc_msgSend_446Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - 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, - ffi.Pointer>)>(); - - late final _sel_copyItemAtPath_toPath_error_1 = - _registerName1("copyItemAtPath:toPath:error:"); - late final _sel_moveItemAtPath_toPath_error_1 = - _registerName1("moveItemAtPath:toPath:error:"); - late final _sel_linkItemAtPath_toPath_error_1 = - _registerName1("linkItemAtPath:toPath:error:"); - late final _sel_removeItemAtPath_error_1 = - _registerName1("removeItemAtPath:error:"); - bool _objc_msgSend_447( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer> error, - ) { - return __objc_msgSend_447( - obj, - sel, - path, - error, - ); - } - - late final __objc_msgSend_447Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_447 = __objc_msgSend_447Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_copyItemAtURL_toURL_error_1 = - _registerName1("copyItemAtURL:toURL:error:"); - late final _sel_moveItemAtURL_toURL_error_1 = - _registerName1("moveItemAtURL:toURL:error:"); - late final _sel_linkItemAtURL_toURL_error_1 = - _registerName1("linkItemAtURL:toURL:error:"); - late final _sel_removeItemAtURL_error_1 = - _registerName1("removeItemAtURL:error:"); - late final _sel_trashItemAtURL_resultingItemURL_error_1 = - _registerName1("trashItemAtURL:resultingItemURL:error:"); - bool _objc_msgSend_448( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> outResultingURL, - ffi.Pointer> error, - ) { - return __objc_msgSend_448( - obj, - sel, - url, - outResultingURL, - error, - ); - } - - late final __objc_msgSend_448Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_448 = __objc_msgSend_448Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _sel_fileAttributesAtPath_traverseLink_1 = - _registerName1("fileAttributesAtPath:traverseLink:"); - ffi.Pointer _objc_msgSend_449( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool yorn, - ) { - return __objc_msgSend_449( - obj, - sel, - path, - yorn, - ); - } - - late final __objc_msgSend_449Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_449 = __objc_msgSend_449Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_changeFileAttributes_atPath_1 = - _registerName1("changeFileAttributes:atPath:"); - bool _objc_msgSend_450( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer attributes, - ffi.Pointer path, - ) { - return __objc_msgSend_450( - obj, - sel, - attributes, - path, - ); - } - - late final __objc_msgSend_450Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_450 = __objc_msgSend_450Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_directoryContentsAtPath_1 = - _registerName1("directoryContentsAtPath:"); - late final _sel_fileSystemAttributesAtPath_1 = - _registerName1("fileSystemAttributesAtPath:"); - late final _sel_pathContentOfSymbolicLinkAtPath_1 = - _registerName1("pathContentOfSymbolicLinkAtPath:"); - late final _sel_createSymbolicLinkAtPath_pathContent_1 = - _registerName1("createSymbolicLinkAtPath:pathContent:"); - bool _objc_msgSend_451( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer otherpath, - ) { - return __objc_msgSend_451( - obj, - sel, - path, - otherpath, - ); - } - - late final __objc_msgSend_451Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_451 = __objc_msgSend_451Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_createDirectoryAtPath_attributes_1 = - _registerName1("createDirectoryAtPath:attributes:"); - bool _objc_msgSend_452( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer attributes, - ) { - return __objc_msgSend_452( - obj, - sel, - path, - attributes, - ); - } - - late final __objc_msgSend_452Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_452 = __objc_msgSend_452Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_linkPath_toPath_handler_1 = - _registerName1("linkPath:toPath:handler:"); - bool _objc_msgSend_453( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer src, - ffi.Pointer dest, - ffi.Pointer handler, - ) { - return __objc_msgSend_453( - obj, - sel, - src, - dest, - handler, - ); - } - - late final __objc_msgSend_453Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_453 = __objc_msgSend_453Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_copyPath_toPath_handler_1 = - _registerName1("copyPath:toPath:handler:"); - late final _sel_movePath_toPath_handler_1 = - _registerName1("movePath:toPath:handler:"); - late final _sel_removeFileAtPath_handler_1 = - _registerName1("removeFileAtPath:handler:"); - bool _objc_msgSend_454( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer handler, - ) { - return __objc_msgSend_454( - obj, - sel, - path, - handler, - ); - } - - late final __objc_msgSend_454Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_454 = __objc_msgSend_454Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_currentDirectoryPath1 = - _registerName1("currentDirectoryPath"); - late final _sel_changeCurrentDirectoryPath_1 = - _registerName1("changeCurrentDirectoryPath:"); - late final _sel_fileExistsAtPath_1 = _registerName1("fileExistsAtPath:"); - late final _sel_fileExistsAtPath_isDirectory_1 = - _registerName1("fileExistsAtPath:isDirectory:"); - bool _objc_msgSend_455( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer isDirectory, - ) { - return __objc_msgSend_455( - obj, - sel, - path, - isDirectory, - ); - } - - late final __objc_msgSend_455Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_455 = __objc_msgSend_455Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_isReadableFileAtPath_1 = - _registerName1("isReadableFileAtPath:"); - late final _sel_isWritableFileAtPath_1 = - _registerName1("isWritableFileAtPath:"); - late final _sel_isExecutableFileAtPath_1 = - _registerName1("isExecutableFileAtPath:"); - late final _sel_isDeletableFileAtPath_1 = - _registerName1("isDeletableFileAtPath:"); - late final _sel_contentsEqualAtPath_andPath_1 = - _registerName1("contentsEqualAtPath:andPath:"); - late final _sel_displayNameAtPath_1 = _registerName1("displayNameAtPath:"); - late final _sel_componentsToDisplayForPath_1 = - _registerName1("componentsToDisplayForPath:"); - late final _sel_enumeratorAtPath_1 = _registerName1("enumeratorAtPath:"); - late final _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_1 = - _registerName1( - "enumeratorAtURL:includingPropertiesForKeys:options:errorHandler:"); - ffi.Pointer _objc_msgSend_456( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer keys, - int mask, - ffi.Pointer<_ObjCBlock> handler, - ) { - return __objc_msgSend_456( - obj, - sel, - url, - keys, - mask, - handler, - ); - } - - late final __objc_msgSend_456Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_456 = __objc_msgSend_456Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_subpathsAtPath_1 = _registerName1("subpathsAtPath:"); - late final _sel_contentsAtPath_1 = _registerName1("contentsAtPath:"); - ffi.Pointer _objc_msgSend_457( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ) { - return __objc_msgSend_457( - obj, - sel, - path, - ); - } - - late final __objc_msgSend_457Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_457 = __objc_msgSend_457Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_createFileAtPath_contents_attributes_1 = - _registerName1("createFileAtPath:contents:attributes:"); - bool _objc_msgSend_458( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer data, - ffi.Pointer attr, - ) { - return __objc_msgSend_458( - obj, - sel, - path, - data, - attr, - ); - } - - late final __objc_msgSend_458Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_458 = __objc_msgSend_458Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_fileSystemRepresentationWithPath_1 = - _registerName1("fileSystemRepresentationWithPath:"); - ffi.Pointer _objc_msgSend_459( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ) { - return __objc_msgSend_459( - obj, - sel, - path, - ); - } - - late final __objc_msgSend_459Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_459 = __objc_msgSend_459Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_stringWithFileSystemRepresentation_length_1 = - _registerName1("stringWithFileSystemRepresentation:length:"); - ffi.Pointer _objc_msgSend_460( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer str, - int len, - ) { - return __objc_msgSend_460( - obj, - sel, - str, - len, - ); - } - - late final __objc_msgSend_460Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_460 = __objc_msgSend_460Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_1 = - _registerName1( - "replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error:"); - bool _objc_msgSend_461( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer originalItemURL, - ffi.Pointer newItemURL, - ffi.Pointer backupItemName, - int options, - ffi.Pointer> resultingURL, - ffi.Pointer> error, - ) { - return __objc_msgSend_461( - obj, - sel, - originalItemURL, - newItemURL, - backupItemName, - options, - resultingURL, - error, - ); - } - - late final __objc_msgSend_461Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_461 = __objc_msgSend_461Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _sel_setUbiquitous_itemAtURL_destinationURL_error_1 = - _registerName1("setUbiquitous:itemAtURL:destinationURL:error:"); - bool _objc_msgSend_462( - ffi.Pointer obj, - ffi.Pointer sel, - bool flag, - ffi.Pointer url, - ffi.Pointer destinationURL, - ffi.Pointer> error, - ) { - return __objc_msgSend_462( - obj, - sel, - flag, - url, - destinationURL, - error, - ); - } - - late final __objc_msgSend_462Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_462 = __objc_msgSend_462Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_isUbiquitousItemAtURL_1 = - _registerName1("isUbiquitousItemAtURL:"); - late final _sel_startDownloadingUbiquitousItemAtURL_error_1 = - _registerName1("startDownloadingUbiquitousItemAtURL:error:"); - late final _sel_evictUbiquitousItemAtURL_error_1 = - _registerName1("evictUbiquitousItemAtURL:error:"); - late final _sel_URLForUbiquityContainerIdentifier_1 = - _registerName1("URLForUbiquityContainerIdentifier:"); - ffi.Pointer _objc_msgSend_463( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer containerIdentifier, - ) { - return __objc_msgSend_463( - obj, - sel, - containerIdentifier, - ); - } - - late final __objc_msgSend_463Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_463 = __objc_msgSend_463Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_1 = - _registerName1( - "URLForPublishingUbiquitousItemAtURL:expirationDate:error:"); - ffi.Pointer _objc_msgSend_464( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> outDate, - ffi.Pointer> error, - ) { - return __objc_msgSend_464( - obj, - sel, - url, - outDate, - error, - ); - } - - late final __objc_msgSend_464Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_464 = __objc_msgSend_464Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _sel_ubiquityIdentityToken1 = - _registerName1("ubiquityIdentityToken"); - late final _sel_getFileProviderServicesForItemAtURL_completionHandler_1 = - _registerName1("getFileProviderServicesForItemAtURL:completionHandler:"); - void _objc_msgSend_465( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_465( - obj, - sel, - url, - completionHandler, - ); - } - - late final __objc_msgSend_465Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_465 = __objc_msgSend_465Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_containerURLForSecurityApplicationGroupIdentifier_1 = - _registerName1("containerURLForSecurityApplicationGroupIdentifier:"); - late final _sel_homeDirectoryForCurrentUser1 = - _registerName1("homeDirectoryForCurrentUser"); - ffi.Pointer _objc_msgSend_466( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_466( - obj, - sel, - ); - } - - late final __objc_msgSend_466Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_466 = __objc_msgSend_466Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_temporaryDirectory1 = _registerName1("temporaryDirectory"); - late final _sel_homeDirectoryForUser_1 = - _registerName1("homeDirectoryForUser:"); - late final _sel_fileManager_shouldProceedAfterError_1 = - _registerName1("fileManager:shouldProceedAfterError:"); - bool _objc_msgSend_467( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer fm, - ffi.Pointer errorInfo, - ) { - return __objc_msgSend_467( - obj, - sel, - fm, - errorInfo, - ); - } - - late final __objc_msgSend_467Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_467 = __objc_msgSend_467Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_fileManager_willProcessPath_1 = - _registerName1("fileManager:willProcessPath:"); - void _objc_msgSend_468( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer fm, - ffi.Pointer path, - ) { - return __objc_msgSend_468( - obj, - sel, - fm, - path, - ); - } - - late final __objc_msgSend_468Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_468 = __objc_msgSend_468Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_validateValue_forKey_error_1 = - _registerName1("validateValue:forKey:error:"); - 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_469( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - int index, - ) { - return __objc_msgSend_469( - obj, - sel, - anObject, - index, - ); - } - - late final __objc_msgSend_469Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_469 = __objc_msgSend_469Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_removeLastObject1 = _registerName1("removeLastObject"); - late final _sel_removeObjectAtIndex_1 = - _registerName1("removeObjectAtIndex:"); - void _objc_msgSend_470( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ) { - return __objc_msgSend_470( - obj, - sel, - index, - ); - } - - late final __objc_msgSend_470Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_470 = __objc_msgSend_470Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_replaceObjectAtIndex_withObject_1 = - _registerName1("replaceObjectAtIndex:withObject:"); - void _objc_msgSend_471( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ffi.Pointer anObject, - ) { - return __objc_msgSend_471( - obj, - sel, - index, - anObject, - ); - } - - late final __objc_msgSend_471Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_471 = __objc_msgSend_471Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _sel_initWithCapacity_1 = _registerName1("initWithCapacity:"); - late final _sel_addObjectsFromArray_1 = - _registerName1("addObjectsFromArray:"); - void _objc_msgSend_472( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherArray, - ) { - return __objc_msgSend_472( - obj, - sel, - otherArray, - ); - } - - late final __objc_msgSend_472Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_472 = __objc_msgSend_472Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_exchangeObjectAtIndex_withObjectAtIndex_1 = - _registerName1("exchangeObjectAtIndex:withObjectAtIndex:"); - void _objc_msgSend_473( - ffi.Pointer obj, - ffi.Pointer sel, - int idx1, - int idx2, - ) { - return __objc_msgSend_473( - obj, - sel, - idx1, - idx2, - ); - } - - late final __objc_msgSend_473Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_473 = __objc_msgSend_473Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, int)>(); - - late final _sel_removeAllObjects1 = _registerName1("removeAllObjects"); - late final _sel_removeObject_inRange_1 = - _registerName1("removeObject:inRange:"); - void _objc_msgSend_474( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - _NSRange range, - ) { - return __objc_msgSend_474( - obj, - sel, - anObject, - range, - ); - } - - late final __objc_msgSend_474Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_474 = __objc_msgSend_474Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>(); - - late final _sel_removeObject_1 = _registerName1("removeObject:"); - late final _sel_removeObjectIdenticalTo_inRange_1 = - _registerName1("removeObjectIdenticalTo:inRange:"); - late final _sel_removeObjectIdenticalTo_1 = - _registerName1("removeObjectIdenticalTo:"); - late final _sel_removeObjectsFromIndices_numIndices_1 = - _registerName1("removeObjectsFromIndices:numIndices:"); - void _objc_msgSend_475( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indices, - int cnt, - ) { - return __objc_msgSend_475( - obj, - sel, - indices, - cnt, - ); - } - - late final __objc_msgSend_475Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_475 = __objc_msgSend_475Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_removeObjectsInArray_1 = - _registerName1("removeObjectsInArray:"); - late final _sel_removeObjectsInRange_1 = - _registerName1("removeObjectsInRange:"); - void _objc_msgSend_476( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_476( - obj, - sel, - range, - ); - } - - late final __objc_msgSend_476Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_476 = __objc_msgSend_476Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _sel_replaceObjectsInRange_withObjectsFromArray_range_1 = - _registerName1("replaceObjectsInRange:withObjectsFromArray:range:"); - void _objc_msgSend_477( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer otherArray, - _NSRange otherRange, - ) { - return __objc_msgSend_477( - obj, - sel, - range, - otherArray, - otherRange, - ); - } - - late final __objc_msgSend_477Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_477 = __objc_msgSend_477Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - ffi.Pointer, _NSRange)>(); - - late final _sel_replaceObjectsInRange_withObjectsFromArray_1 = - _registerName1("replaceObjectsInRange:withObjectsFromArray:"); - void _objc_msgSend_478( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer otherArray, - ) { - return __objc_msgSend_478( - obj, - sel, - range, - otherArray, - ); - } - - late final __objc_msgSend_478Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_478 = __objc_msgSend_478Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - ffi.Pointer)>(); - - late final _sel_setArray_1 = _registerName1("setArray:"); - late final _sel_sortUsingFunction_context_1 = - _registerName1("sortUsingFunction:context:"); - void _objc_msgSend_479( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - compare, - ffi.Pointer context, - ) { - return __objc_msgSend_479( - obj, - sel, - compare, - context, - ); - } - - late final __objc_msgSend_479Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_479 = __objc_msgSend_479Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>(); - - late final _sel_sortUsingSelector_1 = _registerName1("sortUsingSelector:"); - late final _sel_insertObjects_atIndexes_1 = - _registerName1("insertObjects:atIndexes:"); - void _objc_msgSend_480( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer objects, - ffi.Pointer indexes, - ) { - return __objc_msgSend_480( - obj, - sel, - objects, - indexes, - ); - } - - late final __objc_msgSend_480Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_480 = __objc_msgSend_480Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_removeObjectsAtIndexes_1 = - _registerName1("removeObjectsAtIndexes:"); - void _objc_msgSend_481( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexes, - ) { - return __objc_msgSend_481( - obj, - sel, - indexes, - ); - } - - late final __objc_msgSend_481Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_481 = __objc_msgSend_481Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_replaceObjectsAtIndexes_withObjects_1 = - _registerName1("replaceObjectsAtIndexes:withObjects:"); - void _objc_msgSend_482( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexes, - ffi.Pointer objects, - ) { - return __objc_msgSend_482( - obj, - sel, - indexes, - objects, - ); - } - - late final __objc_msgSend_482Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_482 = __objc_msgSend_482Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setObject_atIndexedSubscript_1 = - _registerName1("setObject:atIndexedSubscript:"); - late final _sel_sortUsingComparator_1 = - _registerName1("sortUsingComparator:"); - void _objc_msgSend_483( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> cmptr, - ) { - return __objc_msgSend_483( - obj, - sel, - cmptr, - ); - } - - late final __objc_msgSend_483Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_483 = __objc_msgSend_483Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_sortWithOptions_usingComparator_1 = - _registerName1("sortWithOptions:usingComparator:"); - void _objc_msgSend_484( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> cmptr, - ) { - return __objc_msgSend_484( - obj, - sel, - opts, - cmptr, - ); - } - - late final __objc_msgSend_484Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_484 = __objc_msgSend_484Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_arrayWithCapacity_1 = _registerName1("arrayWithCapacity:"); - ffi.Pointer _objc_msgSend_485( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ) { - return __objc_msgSend_485( - obj, - sel, - path, - ); - } - - late final __objc_msgSend_485Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_485 = __objc_msgSend_485Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - ffi.Pointer _objc_msgSend_486( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ) { - return __objc_msgSend_486( - obj, - sel, - url, - ); - } - - late final __objc_msgSend_486Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_486 = __objc_msgSend_486Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_applyDifference_1 = _registerName1("applyDifference:"); - late final _sel_sortUsingDescriptors_1 = - _registerName1("sortUsingDescriptors:"); - late final _sel_filterUsingPredicate_1 = - _registerName1("filterUsingPredicate:"); - void _objc_msgSend_487( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer predicate, - ) { - return __objc_msgSend_487( - obj, - sel, - predicate, - ); - } - - late final __objc_msgSend_487Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_487 = __objc_msgSend_487Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_mutableArrayValueForKey_1 = - _registerName1("mutableArrayValueForKey:"); - ffi.Pointer _objc_msgSend_488( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_488( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_488Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_488 = __objc_msgSend_488Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSMutableOrderedSet1 = _getClass1("NSMutableOrderedSet"); - late final _class_NSOrderedSet1 = _getClass1("NSOrderedSet"); - late final _sel_isEqualToOrderedSet_1 = - _registerName1("isEqualToOrderedSet:"); - bool _objc_msgSend_489( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - ) { - return __objc_msgSend_489( - obj, - sel, - other, - ); - } - - late final __objc_msgSend_489Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_489 = __objc_msgSend_489Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_intersectsOrderedSet_1 = - _registerName1("intersectsOrderedSet:"); - late final _sel_isSubsetOfOrderedSet_1 = - _registerName1("isSubsetOfOrderedSet:"); - late final _sel_reversedOrderedSet1 = _registerName1("reversedOrderedSet"); - ffi.Pointer _objc_msgSend_490( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_490( - obj, - sel, - ); - } - - late final __objc_msgSend_490Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_490 = __objc_msgSend_490Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - ffi.Pointer _objc_msgSend_491( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_491( - obj, - sel, - ); - } - - late final __objc_msgSend_491Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_491 = __objc_msgSend_491Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_orderedSet1 = _registerName1("orderedSet"); - late final _sel_orderedSetWithObject_1 = - _registerName1("orderedSetWithObject:"); - late final _sel_orderedSetWithObjects_count_1 = - _registerName1("orderedSetWithObjects:count:"); - late final _sel_orderedSetWithObjects_1 = - _registerName1("orderedSetWithObjects:"); - late final _sel_orderedSetWithOrderedSet_1 = - _registerName1("orderedSetWithOrderedSet:"); - instancetype _objc_msgSend_492( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer set1, - ) { - return __objc_msgSend_492( - obj, - sel, - set1, - ); - } - - late final __objc_msgSend_492Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_492 = __objc_msgSend_492Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_orderedSetWithOrderedSet_range_copyItems_1 = - _registerName1("orderedSetWithOrderedSet:range:copyItems:"); - instancetype _objc_msgSend_493( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer set1, - _NSRange range, - bool flag, - ) { - return __objc_msgSend_493( - obj, - sel, - set1, - range, - flag, - ); - } - - late final __objc_msgSend_493Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_493 = __objc_msgSend_493Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange, bool)>(); - - late final _sel_orderedSetWithArray_1 = - _registerName1("orderedSetWithArray:"); - late final _sel_orderedSetWithArray_range_copyItems_1 = - _registerName1("orderedSetWithArray:range:copyItems:"); - instancetype _objc_msgSend_494( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer array, - _NSRange range, - bool flag, - ) { - return __objc_msgSend_494( - obj, - sel, - array, - range, - flag, - ); - } - - late final __objc_msgSend_494Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_494 = __objc_msgSend_494Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange, bool)>(); - - late final _sel_orderedSetWithSet_1 = _registerName1("orderedSetWithSet:"); - late final _sel_orderedSetWithSet_copyItems_1 = - _registerName1("orderedSetWithSet:copyItems:"); - late final _sel_initWithObject_1 = _registerName1("initWithObject:"); - late final _sel_initWithOrderedSet_1 = _registerName1("initWithOrderedSet:"); - late final _sel_initWithOrderedSet_copyItems_1 = - _registerName1("initWithOrderedSet:copyItems:"); - instancetype _objc_msgSend_495( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer set1, - bool flag, - ) { - return __objc_msgSend_495( - obj, - sel, - set1, - flag, - ); - } - - late final __objc_msgSend_495Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_495 = __objc_msgSend_495Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_initWithOrderedSet_range_copyItems_1 = - _registerName1("initWithOrderedSet:range:copyItems:"); - late final _sel_initWithArray_range_copyItems_1 = - _registerName1("initWithArray:range:copyItems:"); - late final _sel_differenceFromOrderedSet_withOptions_usingEquivalenceTest_1 = - _registerName1( - "differenceFromOrderedSet:withOptions:usingEquivalenceTest:"); - ffi.Pointer _objc_msgSend_496( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - int options, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_496( - obj, - sel, - other, - options, - block, - ); - } - - late final __objc_msgSend_496Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_496 = __objc_msgSend_496Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_differenceFromOrderedSet_withOptions_1 = - _registerName1("differenceFromOrderedSet:withOptions:"); - ffi.Pointer _objc_msgSend_497( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - int options, - ) { - return __objc_msgSend_497( - obj, - sel, - other, - options, - ); - } - - late final __objc_msgSend_497Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_497 = __objc_msgSend_497Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_differenceFromOrderedSet_1 = - _registerName1("differenceFromOrderedSet:"); - late final _sel_orderedSetByApplyingDifference_1 = - _registerName1("orderedSetByApplyingDifference:"); - ffi.Pointer _objc_msgSend_498( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer difference, - ) { - return __objc_msgSend_498( - obj, - sel, - difference, - ); - } - - late final __objc_msgSend_498Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(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)>(); - - late final _sel_filteredOrderedSetUsingPredicate_1 = - _registerName1("filteredOrderedSetUsingPredicate:"); - ffi.Pointer _objc_msgSend_499( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer p, - ) { - return __objc_msgSend_499( - obj, - sel, - p, - ); - } - - late final __objc_msgSend_499Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_499 = __objc_msgSend_499Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_addObjects_count_1 = _registerName1("addObjects:count:"); - void _objc_msgSend_500( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - int count, - ) { - return __objc_msgSend_500( - obj, - sel, - objects, - count, - ); - } - - late final __objc_msgSend_500Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_500 = __objc_msgSend_500Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, int)>(); - - late final _sel_moveObjectsAtIndexes_toIndex_1 = - _registerName1("moveObjectsAtIndexes:toIndex:"); - void _objc_msgSend_501( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexes, - int idx, - ) { - return __objc_msgSend_501( - obj, - sel, - indexes, - idx, - ); - } - - late final __objc_msgSend_501Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_501 = __objc_msgSend_501Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_setObject_atIndex_1 = _registerName1("setObject:atIndex:"); - late final _sel_replaceObjectsInRange_withObjects_count_1 = - _registerName1("replaceObjectsInRange:withObjects:count:"); - void _objc_msgSend_502( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer> objects, - int count, - ) { - return __objc_msgSend_502( - obj, - sel, - range, - objects, - count, - ); - } - - late final __objc_msgSend_502Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer>, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_502 = __objc_msgSend_502Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - ffi.Pointer>, int)>(); - - late final _sel_intersectOrderedSet_1 = - _registerName1("intersectOrderedSet:"); - void _objc_msgSend_503( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - ) { - return __objc_msgSend_503( - obj, - sel, - other, - ); - } - - late final __objc_msgSend_503Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_503 = __objc_msgSend_503Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_minusOrderedSet_1 = _registerName1("minusOrderedSet:"); - late final _sel_unionOrderedSet_1 = _registerName1("unionOrderedSet:"); - late final _sel_intersectSet_1 = _registerName1("intersectSet:"); - void _objc_msgSend_504( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - ) { - return __objc_msgSend_504( - obj, - sel, - other, - ); - } - - late final __objc_msgSend_504Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_504 = __objc_msgSend_504Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_minusSet_1 = _registerName1("minusSet:"); - late final _sel_unionSet_1 = _registerName1("unionSet:"); - late final _sel_sortRange_options_usingComparator_1 = - _registerName1("sortRange:options:usingComparator:"); - void _objc_msgSend_505( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> cmptr, - ) { - return __objc_msgSend_505( - obj, - sel, - range, - opts, - cmptr, - ); - } - - late final __objc_msgSend_505Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_505 = __objc_msgSend_505Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_orderedSetWithCapacity_1 = - _registerName1("orderedSetWithCapacity:"); - late final _sel_mutableOrderedSetValueForKey_1 = - _registerName1("mutableOrderedSetValueForKey:"); - ffi.Pointer _objc_msgSend_506( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_506( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_506Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(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)>(); - - late final _class_NSMutableSet1 = _getClass1("NSMutableSet"); - late final _sel_setSet_1 = _registerName1("setSet:"); - late final _sel_setWithCapacity_1 = _registerName1("setWithCapacity:"); - late final _sel_mutableSetValueForKey_1 = - _registerName1("mutableSetValueForKey:"); - ffi.Pointer _objc_msgSend_507( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_507( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_507Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(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)>(); - - late final _sel_valueForKeyPath_1 = _registerName1("valueForKeyPath:"); - late final _sel_setValue_forKeyPath_1 = - _registerName1("setValue:forKeyPath:"); - late final _sel_validateValue_forKeyPath_error_1 = - _registerName1("validateValue:forKeyPath:error:"); - late final _sel_mutableArrayValueForKeyPath_1 = - _registerName1("mutableArrayValueForKeyPath:"); - late final _sel_mutableOrderedSetValueForKeyPath_1 = - _registerName1("mutableOrderedSetValueForKeyPath:"); - late final _sel_mutableSetValueForKeyPath_1 = - _registerName1("mutableSetValueForKeyPath:"); - late final _sel_valueForUndefinedKey_1 = - _registerName1("valueForUndefinedKey:"); - late final _sel_setValue_forUndefinedKey_1 = - _registerName1("setValue:forUndefinedKey:"); - late final _sel_setNilValueForKey_1 = _registerName1("setNilValueForKey:"); - late final _sel_dictionaryWithValuesForKeys_1 = - _registerName1("dictionaryWithValuesForKeys:"); - ffi.Pointer _objc_msgSend_508( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keys, - ) { - return __objc_msgSend_508( - obj, - sel, - keys, - ); - } - - late final __objc_msgSend_508Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(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)>(); - - late final _sel_setValuesForKeysWithDictionary_1 = - _registerName1("setValuesForKeysWithDictionary:"); - void _objc_msgSend_509( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keyedValues, - ) { - return __objc_msgSend_509( - obj, - sel, - keyedValues, - ); - } - - late final __objc_msgSend_509Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_509 = __objc_msgSend_509Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_storedValueForKey_1 = _registerName1("storedValueForKey:"); - late final _sel_takeStoredValue_forKey_1 = - _registerName1("takeStoredValue:forKey:"); - late final _sel_takeValue_forKey_1 = _registerName1("takeValue:forKey:"); - late final _sel_takeValue_forKeyPath_1 = - _registerName1("takeValue:forKeyPath:"); - late final _sel_handleQueryWithUnboundKey_1 = - _registerName1("handleQueryWithUnboundKey:"); - late final _sel_handleTakeValue_forUnboundKey_1 = - _registerName1("handleTakeValue:forUnboundKey:"); - late final _sel_unableToSetNilForKey_1 = - _registerName1("unableToSetNilForKey:"); - late final _sel_valuesForKeys_1 = _registerName1("valuesForKeys:"); - late final _sel_takeValuesFromDictionary_1 = - _registerName1("takeValuesFromDictionary:"); - late final _sel_observeValueForKeyPath_ofObject_change_context_1 = - _registerName1("observeValueForKeyPath:ofObject:change:context:"); - void _objc_msgSend_510( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keyPath, - ffi.Pointer object, - ffi.Pointer change, - ffi.Pointer context, - ) { - return __objc_msgSend_510( - obj, - sel, - keyPath, - object, - change, - context, - ); - } - - late final __objc_msgSend_510Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_510 = __objc_msgSend_510Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_willChangeValueForKey_1 = - _registerName1("willChangeValueForKey:"); - late final _sel_didChangeValueForKey_1 = - _registerName1("didChangeValueForKey:"); - late final _sel_willChange_valuesAtIndexes_forKey_1 = - _registerName1("willChange:valuesAtIndexes:forKey:"); - void _objc_msgSend_511( - ffi.Pointer obj, - ffi.Pointer sel, - int changeKind, - ffi.Pointer indexes, - ffi.Pointer key, - ) { - return __objc_msgSend_511( - obj, - sel, - changeKind, - indexes, - key, - ); - } - - late final __objc_msgSend_511Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_511 = __objc_msgSend_511Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_didChange_valuesAtIndexes_forKey_1 = - _registerName1("didChange:valuesAtIndexes:forKey:"); - late final _sel_willChangeValueForKey_withSetMutation_usingObjects_1 = - _registerName1("willChangeValueForKey:withSetMutation:usingObjects:"); - void _objc_msgSend_512( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - int mutationKind, - ffi.Pointer objects, - ) { - return __objc_msgSend_512( - obj, - sel, - key, - mutationKind, - objects, - ); - } - - late final __objc_msgSend_512Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_512 = __objc_msgSend_512Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_didChangeValueForKey_withSetMutation_usingObjects_1 = - _registerName1("didChangeValueForKey:withSetMutation:usingObjects:"); - late final _sel_observationInfo1 = _registerName1("observationInfo"); - late final _sel_setObservationInfo_1 = _registerName1("setObservationInfo:"); - void _objc_msgSend_513( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_513( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_513Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_513 = __objc_msgSend_513Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_classForKeyedArchiver1 = - _registerName1("classForKeyedArchiver"); - late final _class_NSKeyedArchiver1 = _getClass1("NSKeyedArchiver"); - late final _sel_initRequiringSecureCoding_1 = - _registerName1("initRequiringSecureCoding:"); - instancetype _objc_msgSend_514( - ffi.Pointer obj, - ffi.Pointer sel, - bool requiresSecureCoding, - ) { - return __objc_msgSend_514( - obj, - sel, - requiresSecureCoding, - ); - } - - late final __objc_msgSend_514Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_514 = __objc_msgSend_514Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_archivedDataWithRootObject_requiringSecureCoding_error_1 = - _registerName1("archivedDataWithRootObject:requiringSecureCoding:error:"); - ffi.Pointer _objc_msgSend_515( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer object, - bool requiresSecureCoding, - ffi.Pointer> error, - ) { - return __objc_msgSend_515( - obj, - sel, - object, - requiresSecureCoding, - error, - ); - } - - late final __objc_msgSend_515Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_515 = __objc_msgSend_515Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer>)>(); - - late final _class_NSMutableData1 = _getClass1("NSMutableData"); - late final _sel_mutableBytes1 = _registerName1("mutableBytes"); - late final _sel_setLength_1 = _registerName1("setLength:"); - void _objc_msgSend_516( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_516( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_516Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_516 = __objc_msgSend_516Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_appendBytes_length_1 = _registerName1("appendBytes:length:"); - late final _sel_appendData_1 = _registerName1("appendData:"); - late final _sel_increaseLengthBy_1 = _registerName1("increaseLengthBy:"); - late final _sel_replaceBytesInRange_withBytes_1 = - _registerName1("replaceBytesInRange:withBytes:"); - void _objc_msgSend_517( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer bytes, - ) { - return __objc_msgSend_517( - obj, - sel, - range, - bytes, - ); - } - - late final __objc_msgSend_517Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_517 = __objc_msgSend_517Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - ffi.Pointer)>(); - - late final _sel_resetBytesInRange_1 = _registerName1("resetBytesInRange:"); - late final _sel_setData_1 = _registerName1("setData:"); - late final _sel_replaceBytesInRange_withBytes_length_1 = - _registerName1("replaceBytesInRange:withBytes:length:"); - void _objc_msgSend_518( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer replacementBytes, - int replacementLength, - ) { - return __objc_msgSend_518( - obj, - sel, - range, - replacementBytes, - replacementLength, - ); - } - - late final __objc_msgSend_518Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_518 = __objc_msgSend_518Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - ffi.Pointer, int)>(); - - late final _sel_dataWithCapacity_1 = _registerName1("dataWithCapacity:"); - instancetype _objc_msgSend_519( - ffi.Pointer obj, - ffi.Pointer sel, - int aNumItems, - ) { - return __objc_msgSend_519( - obj, - sel, - aNumItems, - ); - } - - late final __objc_msgSend_519Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_519 = __objc_msgSend_519Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_dataWithLength_1 = _registerName1("dataWithLength:"); - late final _sel_initWithLength_1 = _registerName1("initWithLength:"); - late final _sel_decompressUsingAlgorithm_error_1 = - _registerName1("decompressUsingAlgorithm:error:"); - bool _objc_msgSend_520( - ffi.Pointer obj, - ffi.Pointer sel, - int algorithm, - ffi.Pointer> error, - ) { - return __objc_msgSend_520( - obj, - sel, - algorithm, - error, - ); - } - - late final __objc_msgSend_520Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_520 = __objc_msgSend_520Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer>)>(); - - late final _sel_compressUsingAlgorithm_error_1 = - _registerName1("compressUsingAlgorithm:error:"); - late final _sel_initForWritingWithMutableData_1 = - _registerName1("initForWritingWithMutableData:"); - instancetype _objc_msgSend_521( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ) { - return __objc_msgSend_521( - obj, - sel, - data, - ); - } - - late final __objc_msgSend_521Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_521 = __objc_msgSend_521Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_archivedDataWithRootObject_1 = - _registerName1("archivedDataWithRootObject:"); - ffi.Pointer _objc_msgSend_522( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer rootObject, - ) { - return __objc_msgSend_522( - obj, - sel, - rootObject, - ); - } - - late final __objc_msgSend_522Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_522 = __objc_msgSend_522Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_archiveRootObject_toFile_1 = - _registerName1("archiveRootObject:toFile:"); - late final _sel_outputFormat1 = _registerName1("outputFormat"); - int _objc_msgSend_523( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_523( - obj, - sel, - ); - } - - late final __objc_msgSend_523Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_523 = __objc_msgSend_523Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setOutputFormat_1 = _registerName1("setOutputFormat:"); - void _objc_msgSend_524( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_524( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_524Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_524 = __objc_msgSend_524Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_encodedData1 = _registerName1("encodedData"); - late final _sel_finishEncoding1 = _registerName1("finishEncoding"); - late final _sel_setClassName_forClass_1 = - _registerName1("setClassName:forClass:"); - void _objc_msgSend_525( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer codedName, - ffi.Pointer cls, - ) { - return __objc_msgSend_525( - obj, - sel, - codedName, - cls, - ); - } - - late final __objc_msgSend_525Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_525 = __objc_msgSend_525Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_classNameForClass_1 = _registerName1("classNameForClass:"); - ffi.Pointer _objc_msgSend_526( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cls, - ) { - return __objc_msgSend_526( - obj, - sel, - cls, - ); - } - - late final __objc_msgSend_526Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_526 = __objc_msgSend_526Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setRequiresSecureCoding_1 = - _registerName1("setRequiresSecureCoding:"); - void _objc_msgSend_527( - ffi.Pointer obj, - ffi.Pointer sel, - bool value, - ) { - return __objc_msgSend_527( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_527Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_527 = __objc_msgSend_527Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_replacementObjectForKeyedArchiver_1 = - _registerName1("replacementObjectForKeyedArchiver:"); - ffi.Pointer _objc_msgSend_528( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer archiver, - ) { - return __objc_msgSend_528( - obj, - sel, - archiver, - ); - } - - late final __objc_msgSend_528Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_528 = __objc_msgSend_528Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_performSelectorOnMainThread_withObject_waitUntilDone_modes_1 = - _registerName1( - "performSelectorOnMainThread:withObject:waitUntilDone:modes:"); - void _objc_msgSend_529( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ffi.Pointer arg, - bool wait, - ffi.Pointer array, - ) { - return __objc_msgSend_529( - obj, - sel, - aSelector, - arg, - wait, - array, - ); - } - - late final __objc_msgSend_529Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_529 = __objc_msgSend_529Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); - - late final _sel_performSelectorOnMainThread_withObject_waitUntilDone_1 = - _registerName1("performSelectorOnMainThread:withObject:waitUntilDone:"); - void _objc_msgSend_530( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ffi.Pointer arg, - bool wait, - ) { - return __objc_msgSend_530( - obj, - sel, - aSelector, - arg, - wait, - ); - } - - late final __objc_msgSend_530Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_530 = __objc_msgSend_530Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _class_NSThread1 = _getClass1("NSThread"); - late final _sel_currentThread1 = _registerName1("currentThread"); - ffi.Pointer _objc_msgSend_531( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_531( - obj, - sel, - ); - } - - late final __objc_msgSend_531Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_531 = __objc_msgSend_531Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_detachNewThreadWithBlock_1 = - _registerName1("detachNewThreadWithBlock:"); - void _objc_msgSend_532( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_532( - obj, - sel, - block, - ); - } - - late final __objc_msgSend_532Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_532 = __objc_msgSend_532Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_detachNewThreadSelector_toTarget_withObject_1 = - _registerName1("detachNewThreadSelector:toTarget:withObject:"); - void _objc_msgSend_533( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer selector, - ffi.Pointer target, - ffi.Pointer argument, - ) { - return __objc_msgSend_533( - obj, - sel, - selector, - target, - argument, - ); - } - - late final __objc_msgSend_533Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_533 = __objc_msgSend_533Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_isMultiThreaded1 = _registerName1("isMultiThreaded"); - 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_534( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - ffi.Pointer aKey, - ) { - return __objc_msgSend_534( - obj, - sel, - anObject, - aKey, - ); - } - - late final __objc_msgSend_534Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_534 = __objc_msgSend_534Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_addEntriesFromDictionary_1 = - _registerName1("addEntriesFromDictionary:"); - late final _sel_removeObjectsForKeys_1 = - _registerName1("removeObjectsForKeys:"); - late final _sel_setDictionary_1 = _registerName1("setDictionary:"); - late final _sel_setObject_forKeyedSubscript_1 = - _registerName1("setObject:forKeyedSubscript:"); - void _objc_msgSend_535( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer obj1, - ffi.Pointer key, - ) { - return __objc_msgSend_535( - obj, - sel, - obj1, - key, - ); - } - - late final __objc_msgSend_535Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_535 = __objc_msgSend_535Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_dictionaryWithCapacity_1 = - _registerName1("dictionaryWithCapacity:"); - ffi.Pointer _objc_msgSend_536( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ) { - return __objc_msgSend_536( - obj, - sel, - path, - ); - } - - late final __objc_msgSend_536Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_536 = __objc_msgSend_536Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - ffi.Pointer _objc_msgSend_537( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ) { - return __objc_msgSend_537( - obj, - sel, - url, - ); - } - - late final __objc_msgSend_537Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_537 = __objc_msgSend_537Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_dictionaryWithSharedKeySet_1 = - _registerName1("dictionaryWithSharedKeySet:"); - ffi.Pointer _objc_msgSend_538( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keyset, - ) { - return __objc_msgSend_538( - obj, - sel, - keyset, - ); - } - - late final __objc_msgSend_538Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_538 = __objc_msgSend_538Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_threadDictionary1 = _registerName1("threadDictionary"); - ffi.Pointer _objc_msgSend_539( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_539( - obj, - sel, - ); - } - - late final __objc_msgSend_539Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_539 = __objc_msgSend_539Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_sleepUntilDate_1 = _registerName1("sleepUntilDate:"); - void _objc_msgSend_540( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, - ) { - return __objc_msgSend_540( - obj, - sel, - date, - ); - } - - late final __objc_msgSend_540Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_540 = __objc_msgSend_540Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_sleepForTimeInterval_1 = - _registerName1("sleepForTimeInterval:"); - void _objc_msgSend_541( - ffi.Pointer obj, - ffi.Pointer sel, - double ti, - ) { - return __objc_msgSend_541( - obj, - sel, - ti, - ); - } - - late final __objc_msgSend_541Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_541 = __objc_msgSend_541Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double)>(); - - late final _sel_exit1 = _registerName1("exit"); - late final _sel_threadPriority1 = _registerName1("threadPriority"); - late final _sel_setThreadPriority_1 = _registerName1("setThreadPriority:"); - void _objc_msgSend_542( - ffi.Pointer obj, - ffi.Pointer sel, - double value, - ) { - return __objc_msgSend_542( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_542Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_542 = __objc_msgSend_542Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double)>(); - - late final _sel_qualityOfService1 = _registerName1("qualityOfService"); - int _objc_msgSend_543( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_543( - obj, - sel, - ); - } - - late final __objc_msgSend_543Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_543 = __objc_msgSend_543Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setQualityOfService_1 = - _registerName1("setQualityOfService:"); - void _objc_msgSend_544( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_544( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_544Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_544 = __objc_msgSend_544Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_callStackReturnAddresses1 = - _registerName1("callStackReturnAddresses"); - late final _sel_callStackSymbols1 = _registerName1("callStackSymbols"); - late final _sel_setName_1 = _registerName1("setName:"); - void _objc_msgSend_545( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_545( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_545Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_545 = __objc_msgSend_545Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_stackSize1 = _registerName1("stackSize"); - late final _sel_setStackSize_1 = _registerName1("setStackSize:"); - late final _sel_isMainThread1 = _registerName1("isMainThread"); - late final _sel_mainThread1 = _registerName1("mainThread"); - late final _sel_initWithTarget_selector_object_1 = - _registerName1("initWithTarget:selector:object:"); - instancetype _objc_msgSend_546( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer selector, - ffi.Pointer argument, - ) { - return __objc_msgSend_546( - obj, - sel, - target, - selector, - argument, - ); - } - - late final __objc_msgSend_546Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_546 = __objc_msgSend_546Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithBlock_1 = _registerName1("initWithBlock:"); - instancetype _objc_msgSend_547( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_547( - obj, - sel, - block, - ); - } - - late final __objc_msgSend_547Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_547 = __objc_msgSend_547Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_isExecuting1 = _registerName1("isExecuting"); - late final _sel_isFinished1 = _registerName1("isFinished"); - late final _sel_isCancelled1 = _registerName1("isCancelled"); - late final _sel_cancel1 = _registerName1("cancel"); - late final _sel_start1 = _registerName1("start"); - late final _sel_main1 = _registerName1("main"); - late final _sel_performSelector_onThread_withObject_waitUntilDone_modes_1 = - _registerName1( - "performSelector:onThread:withObject:waitUntilDone:modes:"); - void _objc_msgSend_548( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ffi.Pointer thr, - ffi.Pointer arg, - bool wait, - ffi.Pointer array, - ) { - return __objc_msgSend_548( - obj, - sel, - aSelector, - thr, - arg, - wait, - array, - ); - } - - late final __objc_msgSend_548Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_548 = __objc_msgSend_548Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); - - late final _sel_performSelector_onThread_withObject_waitUntilDone_1 = - _registerName1("performSelector:onThread:withObject:waitUntilDone:"); - void _objc_msgSend_549( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ffi.Pointer thr, - ffi.Pointer arg, - bool wait, - ) { - return __objc_msgSend_549( - obj, - sel, - aSelector, - thr, - arg, - wait, - ); - } - - late final __objc_msgSend_549Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_549 = __objc_msgSend_549Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); - - late final _sel_performSelectorInBackground_withObject_1 = - _registerName1("performSelectorInBackground:withObject:"); - late final _sel_classForArchiver1 = _registerName1("classForArchiver"); - late final _class_NSArchiver1 = _getClass1("NSArchiver"); - late final _sel_archiverData1 = _registerName1("archiverData"); - ffi.Pointer _objc_msgSend_550( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_550( - obj, - sel, - ); - } - - late final __objc_msgSend_550Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_550 = __objc_msgSend_550Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_encodeClassName_intoClassName_1 = - _registerName1("encodeClassName:intoClassName:"); - void _objc_msgSend_551( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer trueName, - ffi.Pointer inArchiveName, - ) { - return __objc_msgSend_551( - obj, - sel, - trueName, - inArchiveName, - ); - } - - late final __objc_msgSend_551Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_551 = __objc_msgSend_551Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_classNameEncodedForTrueClassName_1 = - _registerName1("classNameEncodedForTrueClassName:"); - late final _sel_replaceObject_withObject_1 = - _registerName1("replaceObject:withObject:"); - late final _sel_replacementObjectForArchiver_1 = - _registerName1("replacementObjectForArchiver:"); - ffi.Pointer _objc_msgSend_552( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer archiver, - ) { - return __objc_msgSend_552( - obj, - sel, - archiver, - ); - } - - late final __objc_msgSend_552Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_552 = __objc_msgSend_552Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_classForPortCoder1 = _registerName1("classForPortCoder"); - late final _class_NSPortCoder1 = _getClass1("NSPortCoder"); - late final _sel_isBycopy1 = _registerName1("isBycopy"); - late final _sel_isByref1 = _registerName1("isByref"); - late final _class_NSPort1 = _getClass1("NSPort"); - ffi.Pointer _objc_msgSend_553( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_553( - obj, - sel, - ); - } - - late final __objc_msgSend_553Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_553 = __objc_msgSend_553Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_invalidate1 = _registerName1("invalidate"); - late final _sel_isValid1 = _registerName1("isValid"); - late final _class_NSRunLoop1 = _getClass1("NSRunLoop"); - late final _sel_currentRunLoop1 = _registerName1("currentRunLoop"); - ffi.Pointer _objc_msgSend_554( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_554( - obj, - sel, - ); - } - - late final __objc_msgSend_554Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_554 = __objc_msgSend_554Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_mainRunLoop1 = _registerName1("mainRunLoop"); - late final _sel_currentMode1 = _registerName1("currentMode"); - late final _sel_getCFRunLoop1 = _registerName1("getCFRunLoop"); - ffi.Pointer<__CFRunLoop> _objc_msgSend_555( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_555( - obj, - sel, - ); - } - - late final __objc_msgSend_555Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer<__CFRunLoop> Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_555 = __objc_msgSend_555Ptr.asFunction< - ffi.Pointer<__CFRunLoop> Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSTimer1 = _getClass1("NSTimer"); - late final _sel_timerWithTimeInterval_invocation_repeats_1 = - _registerName1("timerWithTimeInterval:invocation:repeats:"); - ffi.Pointer _objc_msgSend_556( - ffi.Pointer obj, - ffi.Pointer sel, - double ti, - ffi.Pointer invocation, - bool yesOrNo, - ) { - return __objc_msgSend_556( - obj, - sel, - ti, - invocation, - yesOrNo, - ); - } - - late final __objc_msgSend_556Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_556 = __objc_msgSend_556Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, double, ffi.Pointer, bool)>(); - - late final _sel_scheduledTimerWithTimeInterval_invocation_repeats_1 = - _registerName1("scheduledTimerWithTimeInterval:invocation:repeats:"); - late final _sel_timerWithTimeInterval_target_selector_userInfo_repeats_1 = - _registerName1("timerWithTimeInterval:target:selector:userInfo:repeats:"); - ffi.Pointer _objc_msgSend_557( - ffi.Pointer obj, - ffi.Pointer sel, - double ti, - ffi.Pointer aTarget, - ffi.Pointer aSelector, - ffi.Pointer userInfo, - bool yesOrNo, - ) { - return __objc_msgSend_557( - obj, - sel, - ti, - aTarget, - aSelector, - userInfo, - yesOrNo, - ); - } - - late final __objc_msgSend_557Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_557 = __objc_msgSend_557Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - double, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); - - late final _sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_1 = - _registerName1( - "scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:"); - late final _sel_timerWithTimeInterval_repeats_block_1 = - _registerName1("timerWithTimeInterval:repeats:block:"); - ffi.Pointer _objc_msgSend_558( - ffi.Pointer obj, - ffi.Pointer sel, - double interval, - bool repeats, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_558( - obj, - sel, - interval, - repeats, - block, - ); - } - - late final __objc_msgSend_558Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Bool, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_558 = __objc_msgSend_558Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, double, bool, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_scheduledTimerWithTimeInterval_repeats_block_1 = - _registerName1("scheduledTimerWithTimeInterval:repeats:block:"); - late final _sel_initWithFireDate_interval_repeats_block_1 = - _registerName1("initWithFireDate:interval:repeats:block:"); - instancetype _objc_msgSend_559( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, - double interval, - bool repeats, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_559( - obj, - sel, - date, - interval, - repeats, - block, - ); - } - - late final __objc_msgSend_559Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Bool, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_559 = __objc_msgSend_559Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, double, bool, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_initWithFireDate_interval_target_selector_userInfo_repeats_1 = - _registerName1( - "initWithFireDate:interval:target:selector:userInfo:repeats:"); - instancetype _objc_msgSend_560( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, - double ti, - ffi.Pointer t, - ffi.Pointer s, - ffi.Pointer ui, - bool rep, - ) { - return __objc_msgSend_560( - obj, - sel, - date, - ti, - t, - s, - ui, - rep, - ); - } - - late final __objc_msgSend_560Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_560 = __objc_msgSend_560Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - double, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); - - late final _sel_fire1 = _registerName1("fire"); - late final _sel_fireDate1 = _registerName1("fireDate"); - late final _sel_setFireDate_1 = _registerName1("setFireDate:"); - void _objc_msgSend_561( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_561( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_561Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_561 = __objc_msgSend_561Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_timeInterval1 = _registerName1("timeInterval"); - late final _sel_tolerance1 = _registerName1("tolerance"); - late final _sel_setTolerance_1 = _registerName1("setTolerance:"); - late final _sel_addTimer_forMode_1 = _registerName1("addTimer:forMode:"); - void _objc_msgSend_562( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer timer, - ffi.Pointer mode, - ) { - return __objc_msgSend_562( - obj, - sel, - timer, - mode, - ); - } - - late final __objc_msgSend_562Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_562 = __objc_msgSend_562Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_addPort_forMode_1 = _registerName1("addPort:forMode:"); - void _objc_msgSend_563( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aPort, - ffi.Pointer mode, - ) { - return __objc_msgSend_563( - obj, - sel, - aPort, - mode, - ); - } - - late final __objc_msgSend_563Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_563 = __objc_msgSend_563Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_removePort_forMode_1 = _registerName1("removePort:forMode:"); - late final _sel_limitDateForMode_1 = _registerName1("limitDateForMode:"); - ffi.Pointer _objc_msgSend_564( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer mode, - ) { - return __objc_msgSend_564( - obj, - sel, - mode, - ); - } - - late final __objc_msgSend_564Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_564 = __objc_msgSend_564Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_acceptInputForMode_beforeDate_1 = - _registerName1("acceptInputForMode:beforeDate:"); - void _objc_msgSend_565( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer mode, - ffi.Pointer limitDate, - ) { - return __objc_msgSend_565( - obj, - sel, - mode, - limitDate, - ); - } - - late final __objc_msgSend_565Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_565 = __objc_msgSend_565Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_run1 = _registerName1("run"); - late final _sel_runUntilDate_1 = _registerName1("runUntilDate:"); - late final _sel_runMode_beforeDate_1 = _registerName1("runMode:beforeDate:"); - bool _objc_msgSend_566( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer mode, - ffi.Pointer limitDate, - ) { - return __objc_msgSend_566( - obj, - sel, - mode, - limitDate, - ); - } - - late final __objc_msgSend_566Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_566 = __objc_msgSend_566Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_configureAsServer1 = _registerName1("configureAsServer"); - late final _sel_performInModes_block_1 = - _registerName1("performInModes:block:"); - void _objc_msgSend_567( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer modes, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_567( - obj, - sel, - modes, - block, - ); - } - - late final __objc_msgSend_567Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_567 = __objc_msgSend_567Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_performBlock_1 = _registerName1("performBlock:"); - late final _sel_performSelector_target_argument_order_modes_1 = - _registerName1("performSelector:target:argument:order:modes:"); - void _objc_msgSend_568( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ffi.Pointer target, - ffi.Pointer arg, - int order, - ffi.Pointer modes, - ) { - return __objc_msgSend_568( - obj, - sel, - aSelector, - target, - arg, - order, - modes, - ); - } - - late final __objc_msgSend_568Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_568 = __objc_msgSend_568Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - late final _sel_cancelPerformSelector_target_argument_1 = - _registerName1("cancelPerformSelector:target:argument:"); - late final _sel_cancelPerformSelectorsWithTarget_1 = - _registerName1("cancelPerformSelectorsWithTarget:"); - late final _sel_scheduleInRunLoop_forMode_1 = - _registerName1("scheduleInRunLoop:forMode:"); - void _objc_msgSend_569( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer runLoop, - ffi.Pointer mode, - ) { - return __objc_msgSend_569( - obj, - sel, - runLoop, - mode, - ); - } - - late final __objc_msgSend_569Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_569 = __objc_msgSend_569Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_removeFromRunLoop_forMode_1 = - _registerName1("removeFromRunLoop:forMode:"); - late final _sel_reservedSpaceLength1 = _registerName1("reservedSpaceLength"); - late final _sel_sendBeforeDate_components_from_reserved_1 = - _registerName1("sendBeforeDate:components:from:reserved:"); - bool _objc_msgSend_570( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer limitDate, - ffi.Pointer components, - ffi.Pointer receivePort, - int headerSpaceReserved, - ) { - return __objc_msgSend_570( - obj, - sel, - limitDate, - components, - receivePort, - headerSpaceReserved, - ); - } - - late final __objc_msgSend_570Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_570 = __objc_msgSend_570Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); - - late final _sel_sendBeforeDate_msgid_components_from_reserved_1 = - _registerName1("sendBeforeDate:msgid:components:from:reserved:"); - bool _objc_msgSend_571( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer limitDate, - int msgID, - ffi.Pointer components, - ffi.Pointer receivePort, - int headerSpaceReserved, - ) { - return __objc_msgSend_571( - obj, - sel, - limitDate, - msgID, - components, - receivePort, - headerSpaceReserved, - ); - } - - late final __objc_msgSend_571Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_571 = __objc_msgSend_571Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - int)>(); - - late final _class_NSConnection1 = _getClass1("NSConnection"); - late final _sel_statistics1 = _registerName1("statistics"); - late final _sel_allConnections1 = _registerName1("allConnections"); - late final _sel_defaultConnection1 = _registerName1("defaultConnection"); - ffi.Pointer _objc_msgSend_572( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_572( - obj, - sel, - ); - } - - late final __objc_msgSend_572Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_572 = __objc_msgSend_572Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_connectionWithRegisteredName_host_1 = - _registerName1("connectionWithRegisteredName:host:"); - instancetype _objc_msgSend_573( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer hostName, - ) { - return __objc_msgSend_573( - obj, - sel, - name, - hostName, - ); - } - - late final __objc_msgSend_573Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_573 = __objc_msgSend_573Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSPortNameServer1 = _getClass1("NSPortNameServer"); - late final _sel_systemDefaultPortNameServer1 = - _registerName1("systemDefaultPortNameServer"); - ffi.Pointer _objc_msgSend_574( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_574( - obj, - sel, - ); - } - - late final __objc_msgSend_574Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_574 = __objc_msgSend_574Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_portForName_1 = _registerName1("portForName:"); - ffi.Pointer _objc_msgSend_575( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ) { - return __objc_msgSend_575( - obj, - sel, - name, - ); - } - - late final __objc_msgSend_575Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_575 = __objc_msgSend_575Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_portForName_host_1 = _registerName1("portForName:host:"); - ffi.Pointer _objc_msgSend_576( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer host, - ) { - return __objc_msgSend_576( - obj, - sel, - name, - host, - ); - } - - late final __objc_msgSend_576Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_576 = __objc_msgSend_576Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_registerPort_name_1 = _registerName1("registerPort:name:"); - bool _objc_msgSend_577( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer port, - ffi.Pointer name, - ) { - return __objc_msgSend_577( - obj, - sel, - port, - name, - ); - } - - late final __objc_msgSend_577Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_577 = __objc_msgSend_577Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_removePortForName_1 = _registerName1("removePortForName:"); - late final _sel_connectionWithRegisteredName_host_usingNameServer_1 = - _registerName1("connectionWithRegisteredName:host:usingNameServer:"); - instancetype _objc_msgSend_578( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer hostName, - ffi.Pointer server, - ) { - return __objc_msgSend_578( - obj, - sel, - name, - hostName, - server, - ); - } - - late final __objc_msgSend_578Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_578 = __objc_msgSend_578Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSDistantObject1 = _getClass1("NSDistantObject"); - late final _class_NSProxy1 = _getClass1("NSProxy"); - ffi.Pointer _objc_msgSend_579( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer sel1, - ) { - return __objc_msgSend_579( - obj, - sel, - sel1, - ); - } - - late final __objc_msgSend_579Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_579 = __objc_msgSend_579Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_respondsToSelector_1 = _registerName1("respondsToSelector:"); - late final _sel_proxyWithTarget_connection_1 = - _registerName1("proxyWithTarget:connection:"); - ffi.Pointer _objc_msgSend_580( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer connection, - ) { - return __objc_msgSend_580( - obj, - sel, - target, - connection, - ); - } - - late final __objc_msgSend_580Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_580 = __objc_msgSend_580Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithTarget_connection_1 = - _registerName1("initWithTarget:connection:"); - late final _sel_proxyWithLocal_connection_1 = - _registerName1("proxyWithLocal:connection:"); - ffi.Pointer _objc_msgSend_581( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer connection, - ) { - return __objc_msgSend_581( - obj, - sel, - target, - connection, - ); - } - - late final __objc_msgSend_581Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_581 = __objc_msgSend_581Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithLocal_connection_1 = - _registerName1("initWithLocal:connection:"); - late final _sel_setProtocolForProxy_1 = - _registerName1("setProtocolForProxy:"); - void _objc_msgSend_582( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer proto, - ) { - return __objc_msgSend_582( - obj, - sel, - proto, - ); - } - - late final __objc_msgSend_582Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_582 = __objc_msgSend_582Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_connectionForProxy1 = _registerName1("connectionForProxy"); - late final _sel_rootProxyForConnectionWithRegisteredName_host_1 = - _registerName1("rootProxyForConnectionWithRegisteredName:host:"); - ffi.Pointer _objc_msgSend_583( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer hostName, - ) { - return __objc_msgSend_583( - obj, - sel, - name, - hostName, - ); - } - - late final __objc_msgSend_583Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_583 = __objc_msgSend_583Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_1 = - _registerName1( - "rootProxyForConnectionWithRegisteredName:host:usingNameServer:"); - ffi.Pointer _objc_msgSend_584( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer hostName, - ffi.Pointer server, - ) { - return __objc_msgSend_584( - obj, - sel, - name, - hostName, - server, - ); - } - - late final __objc_msgSend_584Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_584 = __objc_msgSend_584Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_serviceConnectionWithName_rootObject_usingNameServer_1 = - _registerName1("serviceConnectionWithName:rootObject:usingNameServer:"); - instancetype _objc_msgSend_585( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer root, - ffi.Pointer server, - ) { - return __objc_msgSend_585( - obj, - sel, - name, - root, - server, - ); - } - - late final __objc_msgSend_585Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_585 = __objc_msgSend_585Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_serviceConnectionWithName_rootObject_1 = - _registerName1("serviceConnectionWithName:rootObject:"); - instancetype _objc_msgSend_586( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer root, - ) { - return __objc_msgSend_586( - obj, - sel, - name, - root, - ); - } - - late final __objc_msgSend_586Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_586 = __objc_msgSend_586Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_requestTimeout1 = _registerName1("requestTimeout"); - late final _sel_setRequestTimeout_1 = _registerName1("setRequestTimeout:"); - late final _sel_replyTimeout1 = _registerName1("replyTimeout"); - late final _sel_setReplyTimeout_1 = _registerName1("setReplyTimeout:"); - late final _sel_rootObject1 = _registerName1("rootObject"); - late final _sel_setRootObject_1 = _registerName1("setRootObject:"); - late final _sel_independentConversationQueueing1 = - _registerName1("independentConversationQueueing"); - late final _sel_setIndependentConversationQueueing_1 = - _registerName1("setIndependentConversationQueueing:"); - late final _sel_rootProxy1 = _registerName1("rootProxy"); - ffi.Pointer _objc_msgSend_587( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_587( - obj, - sel, - ); - } - - late final __objc_msgSend_587Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_587 = __objc_msgSend_587Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_addRequestMode_1 = _registerName1("addRequestMode:"); - late final _sel_removeRequestMode_1 = _registerName1("removeRequestMode:"); - late final _sel_requestModes1 = _registerName1("requestModes"); - late final _sel_registerName_1 = _registerName1("registerName:"); - bool _objc_msgSend_588( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ) { - return __objc_msgSend_588( - obj, - sel, - name, - ); - } - - late final __objc_msgSend_588Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_588 = __objc_msgSend_588Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_registerName_withNameServer_1 = - _registerName1("registerName:withNameServer:"); - bool _objc_msgSend_589( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer server, - ) { - return __objc_msgSend_589( - obj, - sel, - name, - server, - ); - } - - late final __objc_msgSend_589Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_589 = __objc_msgSend_589Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_connectionWithReceivePort_sendPort_1 = - _registerName1("connectionWithReceivePort:sendPort:"); - instancetype _objc_msgSend_590( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer receivePort, - ffi.Pointer sendPort, - ) { - return __objc_msgSend_590( - obj, - sel, - receivePort, - sendPort, - ); - } - - late final __objc_msgSend_590Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_590 = __objc_msgSend_590Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_currentConversation1 = _registerName1("currentConversation"); - late final _sel_initWithReceivePort_sendPort_1 = - _registerName1("initWithReceivePort:sendPort:"); - late final _sel_sendPort1 = _registerName1("sendPort"); - late final _sel_receivePort1 = _registerName1("receivePort"); - late final _sel_enableMultipleThreads1 = - _registerName1("enableMultipleThreads"); - late final _sel_multipleThreadsEnabled1 = - _registerName1("multipleThreadsEnabled"); - late final _sel_addRunLoop_1 = _registerName1("addRunLoop:"); - void _objc_msgSend_591( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer runloop, - ) { - return __objc_msgSend_591( - obj, - sel, - runloop, - ); - } - - late final __objc_msgSend_591Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_591 = __objc_msgSend_591Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_removeRunLoop_1 = _registerName1("removeRunLoop:"); - late final _sel_runInNewThread1 = _registerName1("runInNewThread"); - late final _sel_remoteObjects1 = _registerName1("remoteObjects"); - late final _sel_localObjects1 = _registerName1("localObjects"); - late final _sel_dispatchWithComponents_1 = - _registerName1("dispatchWithComponents:"); - late final _sel_addConnection_toRunLoop_forMode_1 = - _registerName1("addConnection:toRunLoop:forMode:"); - void _objc_msgSend_592( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer conn, - ffi.Pointer runLoop, - ffi.Pointer mode, - ) { - return __objc_msgSend_592( - obj, - sel, - conn, - runLoop, - mode, - ); - } - - late final __objc_msgSend_592Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_592 = __objc_msgSend_592Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_removeConnection_fromRunLoop_forMode_1 = - _registerName1("removeConnection:fromRunLoop:forMode:"); - late final _sel_encodePortObject_1 = _registerName1("encodePortObject:"); - void _objc_msgSend_593( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aport, - ) { - return __objc_msgSend_593( - obj, - sel, - aport, - ); - } - - late final __objc_msgSend_593Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_593 = __objc_msgSend_593Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodePortObject1 = _registerName1("decodePortObject"); - ffi.Pointer _objc_msgSend_594( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_594( - obj, - sel, - ); - } - - late final __objc_msgSend_594Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_594 = __objc_msgSend_594Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_connection1 = _registerName1("connection"); - ffi.Pointer _objc_msgSend_595( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_595( - obj, - sel, - ); - } - - late final __objc_msgSend_595Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_595 = __objc_msgSend_595Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_portCoderWithReceivePort_sendPort_components_1 = - _registerName1("portCoderWithReceivePort:sendPort:components:"); - ffi.Pointer _objc_msgSend_596( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer rcvPort, - ffi.Pointer sndPort, - ffi.Pointer comps, - ) { - return __objc_msgSend_596( - obj, - sel, - rcvPort, - sndPort, - comps, - ); - } - - late final __objc_msgSend_596Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_596 = __objc_msgSend_596Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithReceivePort_sendPort_components_1 = - _registerName1("initWithReceivePort:sendPort:components:"); - late final _sel_dispatch1 = _registerName1("dispatch"); - late final _sel_replacementObjectForPortCoder_1 = - _registerName1("replacementObjectForPortCoder:"); - ffi.Pointer _objc_msgSend_597( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer coder, - ) { - return __objc_msgSend_597( - obj, - sel, - coder, - ); - } - - late final __objc_msgSend_597Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_597 = __objc_msgSend_597Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSClassDescription1 = _getClass1("NSClassDescription"); - late final _sel_registerClassDescription_forClass_1 = - _registerName1("registerClassDescription:forClass:"); - void _objc_msgSend_598( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer description, - ffi.Pointer aClass, - ) { - return __objc_msgSend_598( - obj, - sel, - description, - aClass, - ); - } - - late final __objc_msgSend_598Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_598 = __objc_msgSend_598Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_invalidateClassDescriptionCache1 = - _registerName1("invalidateClassDescriptionCache"); - late final _sel_classDescriptionForClass_1 = - _registerName1("classDescriptionForClass:"); - ffi.Pointer _objc_msgSend_599( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aClass, - ) { - return __objc_msgSend_599( - obj, - sel, - aClass, - ); - } - - late final __objc_msgSend_599Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_599 = __objc_msgSend_599Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_attributeKeys1 = _registerName1("attributeKeys"); - late final _sel_toOneRelationshipKeys1 = - _registerName1("toOneRelationshipKeys"); - late final _sel_toManyRelationshipKeys1 = - _registerName1("toManyRelationshipKeys"); - late final _sel_inverseForRelationshipKey_1 = - _registerName1("inverseForRelationshipKey:"); - late final _sel_classDescription1 = _registerName1("classDescription"); - ffi.Pointer _objc_msgSend_600( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_600( - obj, - sel, - ); - } - - late final __objc_msgSend_600Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_600 = __objc_msgSend_600Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSScriptObjectSpecifier1 = - _getClass1("NSScriptObjectSpecifier"); - late final _class_NSAppleEventDescriptor1 = - _getClass1("NSAppleEventDescriptor"); - late final _sel_nullDescriptor1 = _registerName1("nullDescriptor"); - ffi.Pointer _objc_msgSend_601( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_601( - obj, - sel, - ); - } - - late final __objc_msgSend_601Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_601 = __objc_msgSend_601Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_descriptorWithDescriptorType_bytes_length_1 = - _registerName1("descriptorWithDescriptorType:bytes:length:"); - ffi.Pointer _objc_msgSend_602( - ffi.Pointer obj, - ffi.Pointer sel, - int descriptorType, - ffi.Pointer bytes, - int byteCount, - ) { - return __objc_msgSend_602( - obj, - sel, - descriptorType, - bytes, - byteCount, - ); - } - - late final __objc_msgSend_602Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_602 = __objc_msgSend_602Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer, int)>(); - - late final _sel_descriptorWithDescriptorType_data_1 = - _registerName1("descriptorWithDescriptorType:data:"); - ffi.Pointer _objc_msgSend_603( - ffi.Pointer obj, - ffi.Pointer sel, - int descriptorType, - ffi.Pointer data, - ) { - return __objc_msgSend_603( - obj, - sel, - descriptorType, - data, - ); - } - - late final __objc_msgSend_603Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_603 = __objc_msgSend_603Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_descriptorWithBoolean_1 = - _registerName1("descriptorWithBoolean:"); - ffi.Pointer _objc_msgSend_604( - ffi.Pointer obj, - ffi.Pointer sel, - int boolean, - ) { - return __objc_msgSend_604( - obj, - sel, - boolean, - ); - } - - late final __objc_msgSend_604Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedChar)>>('objc_msgSend'); - late final __objc_msgSend_604 = __objc_msgSend_604Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_descriptorWithEnumCode_1 = - _registerName1("descriptorWithEnumCode:"); - ffi.Pointer _objc_msgSend_605( - ffi.Pointer obj, - ffi.Pointer sel, - int enumerator, - ) { - return __objc_msgSend_605( - obj, - sel, - enumerator, - ); - } - - late final __objc_msgSend_605Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_605 = __objc_msgSend_605Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_descriptorWithInt32_1 = - _registerName1("descriptorWithInt32:"); - ffi.Pointer _objc_msgSend_606( - ffi.Pointer obj, - ffi.Pointer sel, - int signedInt, - ) { - return __objc_msgSend_606( - obj, - sel, - signedInt, - ); - } - - late final __objc_msgSend_606Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int)>>('objc_msgSend'); - late final __objc_msgSend_606 = __objc_msgSend_606Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_descriptorWithDouble_1 = - _registerName1("descriptorWithDouble:"); - ffi.Pointer _objc_msgSend_607( - ffi.Pointer obj, - ffi.Pointer sel, - double doubleValue, - ) { - return __objc_msgSend_607( - obj, - sel, - doubleValue, - ); - } - - late final __objc_msgSend_607Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_607 = __objc_msgSend_607Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, double)>(); - - late final _sel_descriptorWithTypeCode_1 = - _registerName1("descriptorWithTypeCode:"); - late final _sel_descriptorWithString_1 = - _registerName1("descriptorWithString:"); - ffi.Pointer _objc_msgSend_608( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - ) { - return __objc_msgSend_608( - obj, - sel, - string, - ); - } - - late final __objc_msgSend_608Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_608 = __objc_msgSend_608Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_descriptorWithDate_1 = _registerName1("descriptorWithDate:"); - ffi.Pointer _objc_msgSend_609( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, - ) { - return __objc_msgSend_609( - obj, - sel, - date, - ); - } - - late final __objc_msgSend_609Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_609 = __objc_msgSend_609Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_descriptorWithFileURL_1 = - _registerName1("descriptorWithFileURL:"); - ffi.Pointer _objc_msgSend_610( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer fileURL, - ) { - return __objc_msgSend_610( - obj, - sel, - fileURL, - ); - } - - late final __objc_msgSend_610Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_610 = __objc_msgSend_610Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_1 = - _registerName1( - "appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID:"); - ffi.Pointer _objc_msgSend_611( - ffi.Pointer obj, - ffi.Pointer sel, - int eventClass, - int eventID, - ffi.Pointer targetDescriptor, - int returnID, - int transactionID, - ) { - return __objc_msgSend_611( - obj, - sel, - eventClass, - eventID, - targetDescriptor, - returnID, - transactionID, - ); - } - - late final __objc_msgSend_611Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.UnsignedInt, - ffi.Pointer, - ffi.Short, - ffi.Int)>>('objc_msgSend'); - late final __objc_msgSend_611 = __objc_msgSend_611Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer, int, int)>(); - - late final _sel_listDescriptor1 = _registerName1("listDescriptor"); - late final _sel_recordDescriptor1 = _registerName1("recordDescriptor"); - late final _sel_currentProcessDescriptor1 = - _registerName1("currentProcessDescriptor"); - late final _sel_descriptorWithProcessIdentifier_1 = - _registerName1("descriptorWithProcessIdentifier:"); - late final _sel_descriptorWithBundleIdentifier_1 = - _registerName1("descriptorWithBundleIdentifier:"); - late final _sel_descriptorWithApplicationURL_1 = - _registerName1("descriptorWithApplicationURL:"); - late final _sel_initWithAEDescNoCopy_1 = - _registerName1("initWithAEDescNoCopy:"); - instancetype _objc_msgSend_612( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aeDesc, - ) { - return __objc_msgSend_612( - obj, - sel, - aeDesc, - ); - } - - late final __objc_msgSend_612Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_612 = __objc_msgSend_612Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithDescriptorType_bytes_length_1 = - _registerName1("initWithDescriptorType:bytes:length:"); - instancetype _objc_msgSend_613( - ffi.Pointer obj, - ffi.Pointer sel, - int descriptorType, - ffi.Pointer bytes, - int byteCount, - ) { - return __objc_msgSend_613( - obj, - sel, - descriptorType, - bytes, - byteCount, - ); - } - - late final __objc_msgSend_613Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_613 = __objc_msgSend_613Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer, int)>(); - - late final _sel_initWithDescriptorType_data_1 = - _registerName1("initWithDescriptorType:data:"); - instancetype _objc_msgSend_614( - ffi.Pointer obj, - ffi.Pointer sel, - int descriptorType, - ffi.Pointer data, - ) { - return __objc_msgSend_614( - obj, - sel, - descriptorType, - data, - ); - } - - late final __objc_msgSend_614Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedInt, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_614 = __objc_msgSend_614Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_1 = - _registerName1( - "initWithEventClass:eventID:targetDescriptor:returnID:transactionID:"); - instancetype _objc_msgSend_615( - ffi.Pointer obj, - ffi.Pointer sel, - int eventClass, - int eventID, - ffi.Pointer targetDescriptor, - int returnID, - int transactionID, - ) { - return __objc_msgSend_615( - obj, - sel, - eventClass, - eventID, - targetDescriptor, - returnID, - transactionID, - ); - } - - late final __objc_msgSend_615Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.UnsignedInt, - ffi.Pointer, - ffi.Short, - ffi.Int)>>('objc_msgSend'); - late final __objc_msgSend_615 = __objc_msgSend_615Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - int, ffi.Pointer, int, int)>(); - - late final _sel_initListDescriptor1 = _registerName1("initListDescriptor"); - late final _sel_initRecordDescriptor1 = - _registerName1("initRecordDescriptor"); - late final _sel_aeDesc1 = _registerName1("aeDesc"); - ffi.Pointer _objc_msgSend_616( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_616( - obj, - sel, - ); - } - - late final __objc_msgSend_616Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_616 = __objc_msgSend_616Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_descriptorType1 = _registerName1("descriptorType"); - late final _sel_booleanValue1 = _registerName1("booleanValue"); - late final _sel_enumCodeValue1 = _registerName1("enumCodeValue"); - late final _sel_int32Value1 = _registerName1("int32Value"); - late final _sel_typeCodeValue1 = _registerName1("typeCodeValue"); - late final _sel_dateValue1 = _registerName1("dateValue"); - late final _sel_fileURLValue1 = _registerName1("fileURLValue"); - late final _sel_eventClass1 = _registerName1("eventClass"); - late final _sel_eventID1 = _registerName1("eventID"); - late final _sel_returnID1 = _registerName1("returnID"); - late final _sel_transactionID1 = _registerName1("transactionID"); - late final _sel_setParamDescriptor_forKeyword_1 = - _registerName1("setParamDescriptor:forKeyword:"); - void _objc_msgSend_617( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer descriptor, - int keyword, - ) { - return __objc_msgSend_617( - obj, - sel, - descriptor, - keyword, - ); - } - - late final __objc_msgSend_617Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_617 = __objc_msgSend_617Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_paramDescriptorForKeyword_1 = - _registerName1("paramDescriptorForKeyword:"); - ffi.Pointer _objc_msgSend_618( - ffi.Pointer obj, - ffi.Pointer sel, - int keyword, - ) { - return __objc_msgSend_618( - obj, - sel, - keyword, - ); - } - - late final __objc_msgSend_618Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_618 = __objc_msgSend_618Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_removeParamDescriptorWithKeyword_1 = - _registerName1("removeParamDescriptorWithKeyword:"); - void _objc_msgSend_619( - ffi.Pointer obj, - ffi.Pointer sel, - int keyword, - ) { - return __objc_msgSend_619( - obj, - sel, - keyword, - ); - } - - late final __objc_msgSend_619Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_619 = __objc_msgSend_619Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_setAttributeDescriptor_forKeyword_1 = - _registerName1("setAttributeDescriptor:forKeyword:"); - late final _sel_attributeDescriptorForKeyword_1 = - _registerName1("attributeDescriptorForKeyword:"); - late final _sel_sendEventWithOptions_timeout_error_1 = - _registerName1("sendEventWithOptions:timeout:error:"); - ffi.Pointer _objc_msgSend_620( - ffi.Pointer obj, - ffi.Pointer sel, - int sendOptions, - double timeoutInSeconds, - ffi.Pointer> error, - ) { - return __objc_msgSend_620( - obj, - sel, - sendOptions, - timeoutInSeconds, - error, - ); - } - - late final __objc_msgSend_620Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Double, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_620 = __objc_msgSend_620Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - double, - ffi.Pointer>)>(); - - late final _sel_isRecordDescriptor1 = _registerName1("isRecordDescriptor"); - late final _sel_numberOfItems1 = _registerName1("numberOfItems"); - late final _sel_insertDescriptor_atIndex_1 = - _registerName1("insertDescriptor:atIndex:"); - void _objc_msgSend_621( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer descriptor, - int index, - ) { - return __objc_msgSend_621( - obj, - sel, - descriptor, - index, - ); - } - - late final __objc_msgSend_621Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_621 = __objc_msgSend_621Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_descriptorAtIndex_1 = _registerName1("descriptorAtIndex:"); - ffi.Pointer _objc_msgSend_622( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ) { - return __objc_msgSend_622( - obj, - sel, - index, - ); - } - - late final __objc_msgSend_622Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_622 = __objc_msgSend_622Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_removeDescriptorAtIndex_1 = - _registerName1("removeDescriptorAtIndex:"); - late final _sel_setDescriptor_forKeyword_1 = - _registerName1("setDescriptor:forKeyword:"); - late final _sel_descriptorForKeyword_1 = - _registerName1("descriptorForKeyword:"); - late final _sel_removeDescriptorWithKeyword_1 = - _registerName1("removeDescriptorWithKeyword:"); - late final _sel_keywordForDescriptorAtIndex_1 = - _registerName1("keywordForDescriptorAtIndex:"); - int _objc_msgSend_623( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ) { - return __objc_msgSend_623( - obj, - sel, - index, - ); - } - - late final __objc_msgSend_623Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedInt Function(ffi.Pointer, - ffi.Pointer, ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_623 = __objc_msgSend_623Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_coerceToDescriptorType_1 = - _registerName1("coerceToDescriptorType:"); - late final _sel_objectSpecifierWithDescriptor_1 = - _registerName1("objectSpecifierWithDescriptor:"); - ffi.Pointer _objc_msgSend_624( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer descriptor, - ) { - return __objc_msgSend_624( - obj, - sel, - descriptor, - ); - } - - late final __objc_msgSend_624Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_624 = __objc_msgSend_624Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithContainerSpecifier_key_1 = - _registerName1("initWithContainerSpecifier:key:"); - instancetype _objc_msgSend_625( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer container, - ffi.Pointer property, - ) { - return __objc_msgSend_625( - obj, - sel, - container, - property, - ); - } - - late final __objc_msgSend_625Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_625 = __objc_msgSend_625Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSScriptClassDescription1 = - _getClass1("NSScriptClassDescription"); - ffi.Pointer _objc_msgSend_626( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aClass, - ) { - return __objc_msgSend_626( - obj, - sel, - aClass, - ); - } - - late final __objc_msgSend_626Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_626 = __objc_msgSend_626Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithSuiteName_className_dictionary_1 = - _registerName1("initWithSuiteName:className:dictionary:"); - instancetype _objc_msgSend_627( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer suiteName, - ffi.Pointer className, - ffi.Pointer classDeclaration, - ) { - return __objc_msgSend_627( - obj, - sel, - suiteName, - className, - classDeclaration, - ); - } - - late final __objc_msgSend_627Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_627 = __objc_msgSend_627Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_suiteName1 = _registerName1("suiteName"); - late final _sel_className1 = _registerName1("className"); - late final _sel_implementationClassName1 = - _registerName1("implementationClassName"); - late final _sel_superclassDescription1 = - _registerName1("superclassDescription"); - ffi.Pointer _objc_msgSend_628( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_628( - obj, - sel, - ); - } - - late final __objc_msgSend_628Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_628 = __objc_msgSend_628Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_appleEventCode1 = _registerName1("appleEventCode"); - late final _sel_matchesAppleEventCode_1 = - _registerName1("matchesAppleEventCode:"); - late final _class_NSScriptCommandDescription1 = - _getClass1("NSScriptCommandDescription"); - late final _sel_initWithSuiteName_commandName_dictionary_1 = - _registerName1("initWithSuiteName:commandName:dictionary:"); - late final _sel_commandName1 = _registerName1("commandName"); - late final _sel_appleEventClassCode1 = _registerName1("appleEventClassCode"); - late final _sel_commandClassName1 = _registerName1("commandClassName"); - late final _sel_returnType1 = _registerName1("returnType"); - late final _sel_appleEventCodeForReturnType1 = - _registerName1("appleEventCodeForReturnType"); - late final _sel_argumentNames1 = _registerName1("argumentNames"); - late final _sel_typeForArgumentWithName_1 = - _registerName1("typeForArgumentWithName:"); - late final _sel_appleEventCodeForArgumentWithName_1 = - _registerName1("appleEventCodeForArgumentWithName:"); - int _objc_msgSend_629( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer argumentName, - ) { - return __objc_msgSend_629( - obj, - sel, - argumentName, - ); - } - - late final __objc_msgSend_629Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedInt Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_629 = __objc_msgSend_629Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_isOptionalArgumentWithName_1 = - _registerName1("isOptionalArgumentWithName:"); - late final _class_NSScriptCommand1 = _getClass1("NSScriptCommand"); - late final _sel_initWithCommandDescription_1 = - _registerName1("initWithCommandDescription:"); - instancetype _objc_msgSend_630( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer commandDef, - ) { - return __objc_msgSend_630( - obj, - sel, - commandDef, - ); - } - - late final __objc_msgSend_630Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_630 = __objc_msgSend_630Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_commandDescription1 = _registerName1("commandDescription"); - ffi.Pointer _objc_msgSend_631( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_631( - obj, - sel, - ); - } - - late final __objc_msgSend_631Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_631 = __objc_msgSend_631Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_directParameter1 = _registerName1("directParameter"); - late final _sel_setDirectParameter_1 = _registerName1("setDirectParameter:"); - late final _sel_receiversSpecifier1 = _registerName1("receiversSpecifier"); - ffi.Pointer _objc_msgSend_632( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_632( - obj, - sel, - ); - } - - late final __objc_msgSend_632Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_632 = __objc_msgSend_632Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setReceiversSpecifier_1 = - _registerName1("setReceiversSpecifier:"); - void _objc_msgSend_633( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_633( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_633Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_633 = __objc_msgSend_633Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_evaluatedReceivers1 = _registerName1("evaluatedReceivers"); - late final _sel_arguments1 = _registerName1("arguments"); - late final _sel_setArguments_1 = _registerName1("setArguments:"); - void _objc_msgSend_634( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_634( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_634Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_634 = __objc_msgSend_634Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_evaluatedArguments1 = _registerName1("evaluatedArguments"); - late final _sel_isWellFormed1 = _registerName1("isWellFormed"); - late final _sel_performDefaultImplementation1 = - _registerName1("performDefaultImplementation"); - late final _sel_executeCommand1 = _registerName1("executeCommand"); - late final _sel_scriptErrorNumber1 = _registerName1("scriptErrorNumber"); - late final _sel_setScriptErrorNumber_1 = - _registerName1("setScriptErrorNumber:"); - void _objc_msgSend_635( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_635( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_635Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_635 = __objc_msgSend_635Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_scriptErrorOffendingObjectDescriptor1 = - _registerName1("scriptErrorOffendingObjectDescriptor"); - ffi.Pointer _objc_msgSend_636( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_636( - obj, - sel, - ); - } - - late final __objc_msgSend_636Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_636 = __objc_msgSend_636Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setScriptErrorOffendingObjectDescriptor_1 = - _registerName1("setScriptErrorOffendingObjectDescriptor:"); - void _objc_msgSend_637( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_637( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_637Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_637 = __objc_msgSend_637Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_scriptErrorExpectedTypeDescriptor1 = - _registerName1("scriptErrorExpectedTypeDescriptor"); - late final _sel_setScriptErrorExpectedTypeDescriptor_1 = - _registerName1("setScriptErrorExpectedTypeDescriptor:"); - late final _sel_scriptErrorString1 = _registerName1("scriptErrorString"); - late final _sel_setScriptErrorString_1 = - _registerName1("setScriptErrorString:"); - late final _sel_currentCommand1 = _registerName1("currentCommand"); - ffi.Pointer _objc_msgSend_638( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_638( - obj, - sel, - ); - } - - late final __objc_msgSend_638Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_638 = __objc_msgSend_638Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_appleEvent1 = _registerName1("appleEvent"); - late final _sel_suspendExecution1 = _registerName1("suspendExecution"); - late final _sel_resumeExecutionWithResult_1 = - _registerName1("resumeExecutionWithResult:"); - late final _sel_createCommandInstance1 = - _registerName1("createCommandInstance"); - ffi.Pointer _objc_msgSend_639( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_639( - obj, - sel, - ); - } - - late final __objc_msgSend_639Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_639 = __objc_msgSend_639Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_createCommandInstanceWithZone_1 = - _registerName1("createCommandInstanceWithZone:"); - ffi.Pointer _objc_msgSend_640( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_NSZone> zone, - ) { - return __objc_msgSend_640( - obj, - sel, - zone, - ); - } - - late final __objc_msgSend_640Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_NSZone>)>>('objc_msgSend'); - late final __objc_msgSend_640 = __objc_msgSend_640Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_NSZone>)>(); - - late final _sel_supportsCommand_1 = _registerName1("supportsCommand:"); - bool _objc_msgSend_641( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer commandDescription, - ) { - return __objc_msgSend_641( - obj, - sel, - commandDescription, - ); - } - - late final __objc_msgSend_641Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_641 = __objc_msgSend_641Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_selectorForCommand_1 = _registerName1("selectorForCommand:"); - ffi.Pointer _objc_msgSend_642( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer commandDescription, - ) { - return __objc_msgSend_642( - obj, - sel, - commandDescription, - ); - } - - late final __objc_msgSend_642Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_642 = __objc_msgSend_642Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_typeForKey_1 = _registerName1("typeForKey:"); - late final _sel_classDescriptionForKey_1 = - _registerName1("classDescriptionForKey:"); - ffi.Pointer _objc_msgSend_643( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_643( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_643Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_643 = __objc_msgSend_643Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_appleEventCodeForKey_1 = - _registerName1("appleEventCodeForKey:"); - late final _sel_keyWithAppleEventCode_1 = - _registerName1("keyWithAppleEventCode:"); - ffi.Pointer _objc_msgSend_644( - ffi.Pointer obj, - ffi.Pointer sel, - int appleEventCode, - ) { - return __objc_msgSend_644( - obj, - sel, - appleEventCode, - ); - } - - late final __objc_msgSend_644Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_644 = __objc_msgSend_644Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_defaultSubcontainerAttributeKey1 = - _registerName1("defaultSubcontainerAttributeKey"); - late final _sel_isLocationRequiredToCreateForKey_1 = - _registerName1("isLocationRequiredToCreateForKey:"); - late final _sel_hasPropertyForKey_1 = _registerName1("hasPropertyForKey:"); - late final _sel_hasOrderedToManyRelationshipForKey_1 = - _registerName1("hasOrderedToManyRelationshipForKey:"); - late final _sel_hasReadablePropertyForKey_1 = - _registerName1("hasReadablePropertyForKey:"); - late final _sel_hasWritablePropertyForKey_1 = - _registerName1("hasWritablePropertyForKey:"); - late final _sel_isReadOnlyKey_1 = _registerName1("isReadOnlyKey:"); - late final _sel_initWithContainerClassDescription_containerSpecifier_key_1 = - _registerName1( - "initWithContainerClassDescription:containerSpecifier:key:"); - instancetype _objc_msgSend_645( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer classDesc, - ffi.Pointer container, - ffi.Pointer property, - ) { - return __objc_msgSend_645( - obj, - sel, - classDesc, - container, - property, - ); - } - - late final __objc_msgSend_645Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_645 = __objc_msgSend_645Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_childSpecifier1 = _registerName1("childSpecifier"); - late final _sel_setChildSpecifier_1 = _registerName1("setChildSpecifier:"); - late final _sel_containerSpecifier1 = _registerName1("containerSpecifier"); - late final _sel_setContainerSpecifier_1 = - _registerName1("setContainerSpecifier:"); - late final _sel_containerIsObjectBeingTested1 = - _registerName1("containerIsObjectBeingTested"); - late final _sel_setContainerIsObjectBeingTested_1 = - _registerName1("setContainerIsObjectBeingTested:"); - late final _sel_containerIsRangeContainerObject1 = - _registerName1("containerIsRangeContainerObject"); - late final _sel_setContainerIsRangeContainerObject_1 = - _registerName1("setContainerIsRangeContainerObject:"); - late final _sel_key1 = _registerName1("key"); - late final _sel_setKey_1 = _registerName1("setKey:"); - void _objc_msgSend_646( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_646( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_646Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_646 = __objc_msgSend_646Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_containerClassDescription1 = - _registerName1("containerClassDescription"); - late final _sel_setContainerClassDescription_1 = - _registerName1("setContainerClassDescription:"); - void _objc_msgSend_647( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_647( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_647Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_647 = __objc_msgSend_647Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_keyClassDescription1 = _registerName1("keyClassDescription"); - late final _sel_indicesOfObjectsByEvaluatingWithContainer_count_1 = - _registerName1("indicesOfObjectsByEvaluatingWithContainer:count:"); - ffi.Pointer _objc_msgSend_648( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer container, - ffi.Pointer count, - ) { - return __objc_msgSend_648( - obj, - sel, - container, - count, - ); - } - - late final __objc_msgSend_648Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_648 = __objc_msgSend_648Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_objectsByEvaluatingWithContainers_1 = - _registerName1("objectsByEvaluatingWithContainers:"); - late final _sel_objectsByEvaluatingSpecifier1 = - _registerName1("objectsByEvaluatingSpecifier"); - late final _sel_evaluationErrorNumber1 = - _registerName1("evaluationErrorNumber"); - late final _sel_setEvaluationErrorNumber_1 = - _registerName1("setEvaluationErrorNumber:"); - late final _sel_evaluationErrorSpecifier1 = - _registerName1("evaluationErrorSpecifier"); - late final _sel_descriptor1 = _registerName1("descriptor"); - late final _sel_scriptingValueForSpecifier_1 = - _registerName1("scriptingValueForSpecifier:"); - ffi.Pointer _objc_msgSend_649( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer objectSpecifier, - ) { - return __objc_msgSend_649( - obj, - sel, - objectSpecifier, - ); - } - - late final __objc_msgSend_649Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_649 = __objc_msgSend_649Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_scriptingProperties1 = _registerName1("scriptingProperties"); - late final _sel_setScriptingProperties_1 = - _registerName1("setScriptingProperties:"); - late final _sel_copyScriptingValue_forKey_withProperties_1 = - _registerName1("copyScriptingValue:forKey:withProperties:"); - ffi.Pointer _objc_msgSend_650( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer key, - ffi.Pointer properties, - ) { - return __objc_msgSend_650( - obj, - sel, - value, - key, - properties, - ); - } - - late final __objc_msgSend_650Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_650 = __objc_msgSend_650Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_newScriptingObjectOfClass_forValueForKey_withContentsValue_properties_1 = - _registerName1( - "newScriptingObjectOfClass:forValueForKey:withContentsValue:properties:"); - ffi.Pointer _objc_msgSend_651( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer objectClass, - ffi.Pointer key, - ffi.Pointer contentsValue, - ffi.Pointer properties, - ) { - return __objc_msgSend_651( - obj, - sel, - objectClass, - key, - contentsValue, - properties, - ); - } - - late final __objc_msgSend_651Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_651 = __objc_msgSend_651Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_classCode1 = _registerName1("classCode"); - late final _sel_valueAtIndex_inPropertyWithKey_1 = - _registerName1("valueAtIndex:inPropertyWithKey:"); - ffi.Pointer _objc_msgSend_652( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ffi.Pointer key, - ) { - return __objc_msgSend_652( - obj, - sel, - index, - key, - ); - } - - late final __objc_msgSend_652Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_652 = __objc_msgSend_652Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_valueWithName_inPropertyWithKey_1 = - _registerName1("valueWithName:inPropertyWithKey:"); - late final _sel_valueWithUniqueID_inPropertyWithKey_1 = - _registerName1("valueWithUniqueID:inPropertyWithKey:"); - late final _sel_insertValue_atIndex_inPropertyWithKey_1 = - _registerName1("insertValue:atIndex:inPropertyWithKey:"); - void _objc_msgSend_653( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - int index, - ffi.Pointer key, - ) { - return __objc_msgSend_653( - obj, - sel, - value, - index, - key, - ); - } - - late final __objc_msgSend_653Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_653 = __objc_msgSend_653Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_removeValueAtIndex_fromPropertyWithKey_1 = - _registerName1("removeValueAtIndex:fromPropertyWithKey:"); - void _objc_msgSend_654( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ffi.Pointer key, - ) { - return __objc_msgSend_654( - obj, - sel, - index, - key, - ); - } - - late final __objc_msgSend_654Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_654 = __objc_msgSend_654Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _sel_replaceValueAtIndex_inPropertyWithKey_withValue_1 = - _registerName1("replaceValueAtIndex:inPropertyWithKey:withValue:"); - void _objc_msgSend_655( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ffi.Pointer key, - ffi.Pointer value, - ) { - return __objc_msgSend_655( - obj, - sel, - index, - key, - value, - ); - } - - late final __objc_msgSend_655Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_655 = __objc_msgSend_655Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_insertValue_inPropertyWithKey_1 = - _registerName1("insertValue:inPropertyWithKey:"); - void _objc_msgSend_656( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer key, - ) { - return __objc_msgSend_656( - obj, - sel, - value, - key, - ); - } - - late final __objc_msgSend_656Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_656 = __objc_msgSend_656Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_coerceValue_forKey_1 = _registerName1("coerceValue:forKey:"); - ffi.Pointer _objc_msgSend_657( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer key, - ) { - return __objc_msgSend_657( - obj, - sel, - value, - key, - ); - } - - late final __objc_msgSend_657Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_657 = __objc_msgSend_657Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_objectSpecifier1 = _registerName1("objectSpecifier"); - late final _sel_indicesOfObjectsByEvaluatingObjectSpecifier_1 = - _registerName1("indicesOfObjectsByEvaluatingObjectSpecifier:"); - ffi.Pointer _objc_msgSend_658( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer specifier, - ) { - return __objc_msgSend_658( - obj, - sel, - specifier, - ); - } - - late final __objc_msgSend_658Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_658 = __objc_msgSend_658Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_isEqualTo_1 = _registerName1("isEqualTo:"); - late final _sel_isLessThanOrEqualTo_1 = - _registerName1("isLessThanOrEqualTo:"); - late final _sel_isLessThan_1 = _registerName1("isLessThan:"); - late final _sel_isGreaterThanOrEqualTo_1 = - _registerName1("isGreaterThanOrEqualTo:"); - late final _sel_isGreaterThan_1 = _registerName1("isGreaterThan:"); - late final _sel_isNotEqualTo_1 = _registerName1("isNotEqualTo:"); - late final _sel_doesContain_1 = _registerName1("doesContain:"); - late final _sel_isLike_1 = _registerName1("isLike:"); - late final _sel_isCaseInsensitiveLike_1 = - _registerName1("isCaseInsensitiveLike:"); - late final _sel_scriptingIsEqualTo_1 = _registerName1("scriptingIsEqualTo:"); - late final _sel_scriptingIsLessThanOrEqualTo_1 = - _registerName1("scriptingIsLessThanOrEqualTo:"); - late final _sel_scriptingIsLessThan_1 = - _registerName1("scriptingIsLessThan:"); - late final _sel_scriptingIsGreaterThanOrEqualTo_1 = - _registerName1("scriptingIsGreaterThanOrEqualTo:"); - late final _sel_scriptingIsGreaterThan_1 = - _registerName1("scriptingIsGreaterThan:"); - late final _sel_scriptingBeginsWith_1 = - _registerName1("scriptingBeginsWith:"); - late final _sel_scriptingEndsWith_1 = _registerName1("scriptingEndsWith:"); - late final _sel_scriptingContains_1 = _registerName1("scriptingContains:"); - late final _class_NSItemProvider1 = _getClass1("NSItemProvider"); - late final _class_NSProgress1 = _getClass1("NSProgress"); - late final _sel_currentProgress1 = _registerName1("currentProgress"); - ffi.Pointer _objc_msgSend_659( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_659( - obj, - sel, - ); - } - - late final __objc_msgSend_659Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_659 = __objc_msgSend_659Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_progressWithTotalUnitCount_1 = - _registerName1("progressWithTotalUnitCount:"); - ffi.Pointer _objc_msgSend_660( - ffi.Pointer obj, - ffi.Pointer sel, - int unitCount, - ) { - return __objc_msgSend_660( - obj, - sel, - unitCount, - ); - } - - late final __objc_msgSend_660Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_660 = __objc_msgSend_660Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_discreteProgressWithTotalUnitCount_1 = - _registerName1("discreteProgressWithTotalUnitCount:"); - late final _sel_progressWithTotalUnitCount_parent_pendingUnitCount_1 = - _registerName1("progressWithTotalUnitCount:parent:pendingUnitCount:"); - ffi.Pointer _objc_msgSend_661( - ffi.Pointer obj, - ffi.Pointer sel, - int unitCount, - ffi.Pointer parent, - int portionOfParentTotalUnitCount, - ) { - return __objc_msgSend_661( - obj, - sel, - unitCount, - parent, - portionOfParentTotalUnitCount, - ); - } - - late final __objc_msgSend_661Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_661 = __objc_msgSend_661Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer, int)>(); - - late final _sel_initWithParent_userInfo_1 = - _registerName1("initWithParent:userInfo:"); - instancetype _objc_msgSend_662( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer parentProgressOrNil, - ffi.Pointer userInfoOrNil, - ) { - return __objc_msgSend_662( - obj, - sel, - parentProgressOrNil, - userInfoOrNil, - ); - } - - late final __objc_msgSend_662Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_662 = __objc_msgSend_662Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_becomeCurrentWithPendingUnitCount_1 = - _registerName1("becomeCurrentWithPendingUnitCount:"); - void _objc_msgSend_663( - ffi.Pointer obj, - ffi.Pointer sel, - int unitCount, - ) { - return __objc_msgSend_663( - obj, - sel, - unitCount, - ); - } - - late final __objc_msgSend_663Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_663 = __objc_msgSend_663Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_1 = - _registerName1("performAsCurrentWithPendingUnitCount:usingBlock:"); - void _objc_msgSend_664( - ffi.Pointer obj, - ffi.Pointer sel, - int unitCount, - ffi.Pointer<_ObjCBlock> work, - ) { - return __objc_msgSend_664( - obj, - sel, - unitCount, - work, - ); - } - - late final __objc_msgSend_664Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_664 = __objc_msgSend_664Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_resignCurrent1 = _registerName1("resignCurrent"); - late final _sel_addChild_withPendingUnitCount_1 = - _registerName1("addChild:withPendingUnitCount:"); - void _objc_msgSend_665( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer child, - int inUnitCount, - ) { - return __objc_msgSend_665( - obj, - sel, - child, - inUnitCount, - ); - } - - late final __objc_msgSend_665Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_665 = __objc_msgSend_665Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_totalUnitCount1 = _registerName1("totalUnitCount"); - int _objc_msgSend_666( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_666( - obj, - sel, - ); - } - - late final __objc_msgSend_666Ptr = _lookup< - ffi.NativeFunction< - ffi.Int64 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_666 = __objc_msgSend_666Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setTotalUnitCount_1 = _registerName1("setTotalUnitCount:"); - void _objc_msgSend_667( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_667( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_667Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_667 = __objc_msgSend_667Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_completedUnitCount1 = _registerName1("completedUnitCount"); - late final _sel_setCompletedUnitCount_1 = - _registerName1("setCompletedUnitCount:"); - late final _sel_setLocalizedDescription_1 = - _registerName1("setLocalizedDescription:"); - late final _sel_localizedAdditionalDescription1 = - _registerName1("localizedAdditionalDescription"); - late final _sel_setLocalizedAdditionalDescription_1 = - _registerName1("setLocalizedAdditionalDescription:"); - late final _sel_isCancellable1 = _registerName1("isCancellable"); - late final _sel_setCancellable_1 = _registerName1("setCancellable:"); - late final _sel_isPausable1 = _registerName1("isPausable"); - late final _sel_setPausable_1 = _registerName1("setPausable:"); - late final _sel_isPaused1 = _registerName1("isPaused"); - late final _sel_cancellationHandler1 = _registerName1("cancellationHandler"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_668( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_668( - obj, - sel, - ); - } - - late final __objc_msgSend_668Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_668 = __objc_msgSend_668Ptr.asFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setCancellationHandler_1 = - _registerName1("setCancellationHandler:"); - void _objc_msgSend_669( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> value, - ) { - return __objc_msgSend_669( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_669Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_669 = __objc_msgSend_669Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_pausingHandler1 = _registerName1("pausingHandler"); - late final _sel_setPausingHandler_1 = _registerName1("setPausingHandler:"); - late final _sel_resumingHandler1 = _registerName1("resumingHandler"); - late final _sel_setResumingHandler_1 = _registerName1("setResumingHandler:"); - late final _sel_setUserInfoObject_forKey_1 = - _registerName1("setUserInfoObject:forKey:"); - late final _sel_isIndeterminate1 = _registerName1("isIndeterminate"); - late final _sel_fractionCompleted1 = _registerName1("fractionCompleted"); - late final _sel_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_670( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_670( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_670Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_670 = __objc_msgSend_670Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_throughput1 = _registerName1("throughput"); - late final _sel_setThroughput_1 = _registerName1("setThroughput:"); - late final _sel_fileOperationKind1 = _registerName1("fileOperationKind"); - late final _sel_setFileOperationKind_1 = - _registerName1("setFileOperationKind:"); - late final _sel_fileURL1 = _registerName1("fileURL"); - late final _sel_setFileURL_1 = _registerName1("setFileURL:"); - void _objc_msgSend_671( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_671( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_671Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_671 = __objc_msgSend_671Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_fileTotalCount1 = _registerName1("fileTotalCount"); - late final _sel_setFileTotalCount_1 = _registerName1("setFileTotalCount:"); - late final _sel_fileCompletedCount1 = _registerName1("fileCompletedCount"); - late final _sel_setFileCompletedCount_1 = - _registerName1("setFileCompletedCount:"); - late final _sel_publish1 = _registerName1("publish"); - late final _sel_unpublish1 = _registerName1("unpublish"); - late final _sel_addSubscriberForFileURL_withPublishingHandler_1 = - _registerName1("addSubscriberForFileURL:withPublishingHandler:"); - ffi.Pointer _objc_msgSend_672( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer<_ObjCBlock> publishingHandler, - ) { - return __objc_msgSend_672( - obj, - sel, - url, - publishingHandler, - ); - } - - late final __objc_msgSend_672Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_672 = __objc_msgSend_672Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_removeSubscriber_1 = _registerName1("removeSubscriber:"); - late final _sel_isOld1 = _registerName1("isOld"); - late final _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1 = - _registerName1( - "registerDataRepresentationForTypeIdentifier:visibility:loadHandler:"); - void _objc_msgSend_673( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - int visibility, - ffi.Pointer<_ObjCBlock> loadHandler, - ) { - return __objc_msgSend_673( - obj, - sel, - typeIdentifier, - visibility, - loadHandler, - ); - } - - late final __objc_msgSend_673Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_673 = __objc_msgSend_673Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1 = - _registerName1( - "registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:"); - void _objc_msgSend_674( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - int fileOptions, - int visibility, - ffi.Pointer<_ObjCBlock> loadHandler, - ) { - return __objc_msgSend_674( - obj, - sel, - typeIdentifier, - fileOptions, - visibility, - loadHandler, - ); - } - - late final __objc_msgSend_674Ptr = _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_674 = __objc_msgSend_674Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_registeredTypeIdentifiers1 = - _registerName1("registeredTypeIdentifiers"); - late final _sel_registeredTypeIdentifiersWithFileOptions_1 = - _registerName1("registeredTypeIdentifiersWithFileOptions:"); - ffi.Pointer _objc_msgSend_675( - ffi.Pointer obj, - ffi.Pointer sel, - int fileOptions, - ) { - return __objc_msgSend_675( - obj, - sel, - fileOptions, - ); - } - - late final __objc_msgSend_675Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_675 = __objc_msgSend_675Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_hasItemConformingToTypeIdentifier_1 = - _registerName1("hasItemConformingToTypeIdentifier:"); - late final _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1 = - _registerName1( - "hasRepresentationConformingToTypeIdentifier:fileOptions:"); - bool _objc_msgSend_676( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - int fileOptions, - ) { - return __objc_msgSend_676( - obj, - sel, - typeIdentifier, - fileOptions, - ); - } - - late final __objc_msgSend_676Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_676 = __objc_msgSend_676Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_loadDataRepresentationForTypeIdentifier_completionHandler_1 = - _registerName1( - "loadDataRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_677( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_677( - obj, - sel, - typeIdentifier, - completionHandler, - ); - } - - late final __objc_msgSend_677Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_677 = __objc_msgSend_677Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_loadFileRepresentationForTypeIdentifier_completionHandler_1 = - _registerName1( - "loadFileRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_678( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_678( - obj, - sel, - typeIdentifier, - completionHandler, - ); - } - - late final __objc_msgSend_678Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_678 = __objc_msgSend_678Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1 = - _registerName1( - "loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_679( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_679( - obj, - sel, - typeIdentifier, - completionHandler, - ); - } - - late final __objc_msgSend_679Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_679 = __objc_msgSend_679Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_suggestedName1 = _registerName1("suggestedName"); - late final _sel_setSuggestedName_1 = _registerName1("setSuggestedName:"); - late final _sel_registerObject_visibility_1 = - _registerName1("registerObject:visibility:"); - void _objc_msgSend_680( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer object, - int visibility, - ) { - return __objc_msgSend_680( - obj, - sel, - object, - visibility, - ); - } - - late final __objc_msgSend_680Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_680 = __objc_msgSend_680Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_registerObjectOfClass_visibility_loadHandler_1 = - _registerName1("registerObjectOfClass:visibility:loadHandler:"); - void _objc_msgSend_681( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aClass, - int visibility, - ffi.Pointer<_ObjCBlock> loadHandler, - ) { - return __objc_msgSend_681( - obj, - sel, - aClass, - visibility, - loadHandler, - ); - } - - late final __objc_msgSend_681Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_681 = __objc_msgSend_681Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_canLoadObjectOfClass_1 = - _registerName1("canLoadObjectOfClass:"); - late final _sel_loadObjectOfClass_completionHandler_1 = - _registerName1("loadObjectOfClass:completionHandler:"); - ffi.Pointer _objc_msgSend_682( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aClass, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_682( - obj, - sel, - aClass, - completionHandler, - ); - } - - late final __objc_msgSend_682Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_682 = __objc_msgSend_682Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_initWithItem_typeIdentifier_1 = - _registerName1("initWithItem:typeIdentifier:"); - instancetype _objc_msgSend_683( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer item, - ffi.Pointer typeIdentifier, - ) { - return __objc_msgSend_683( - obj, - sel, - item, - typeIdentifier, - ); - } - - late final __objc_msgSend_683Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_683 = __objc_msgSend_683Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_registerItemForTypeIdentifier_loadHandler_1 = - _registerName1("registerItemForTypeIdentifier:loadHandler:"); - void _objc_msgSend_684( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - ffi.Pointer<_ObjCBlock> loadHandler, - ) { - return __objc_msgSend_684( - obj, - sel, - typeIdentifier, - loadHandler, - ); - } - - late final __objc_msgSend_684Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_684 = __objc_msgSend_684Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_loadItemForTypeIdentifier_options_completionHandler_1 = - _registerName1("loadItemForTypeIdentifier:options:completionHandler:"); - void _objc_msgSend_685( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - ffi.Pointer options, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_685( - obj, - sel, - typeIdentifier, - options, - completionHandler, - ); - } - - late final __objc_msgSend_685Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_685 = __objc_msgSend_685Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_previewImageHandler1 = _registerName1("previewImageHandler"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_686( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_686( - obj, - sel, - ); - } - - late final __objc_msgSend_686Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_686 = __objc_msgSend_686Ptr.asFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setPreviewImageHandler_1 = - _registerName1("setPreviewImageHandler:"); - void _objc_msgSend_687( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> value, - ) { - return __objc_msgSend_687( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_687Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_687 = __objc_msgSend_687Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_loadPreviewImageWithOptions_completionHandler_1 = - _registerName1("loadPreviewImageWithOptions:completionHandler:"); - void _objc_msgSend_688( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer options, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_688( - obj, - sel, - options, - completionHandler, - ); - } - - late final __objc_msgSend_688Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_688 = __objc_msgSend_688Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _class_NSMutableString1 = _getClass1("NSMutableString"); - late final _sel_replaceCharactersInRange_withString_1 = - _registerName1("replaceCharactersInRange:withString:"); - void _objc_msgSend_689( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer aString, - ) { - return __objc_msgSend_689( - obj, - sel, - range, - aString, - ); - } - - late final __objc_msgSend_689Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_689 = __objc_msgSend_689Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - ffi.Pointer)>(); - - late final _sel_insertString_atIndex_1 = - _registerName1("insertString:atIndex:"); - void _objc_msgSend_690( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aString, - int loc, - ) { - return __objc_msgSend_690( - obj, - sel, - aString, - loc, - ); - } - - late final __objc_msgSend_690Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_690 = __objc_msgSend_690Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_deleteCharactersInRange_1 = - _registerName1("deleteCharactersInRange:"); - late final _sel_appendString_1 = _registerName1("appendString:"); - late final _sel_appendFormat_1 = _registerName1("appendFormat:"); - late final _sel_setString_1 = _registerName1("setString:"); - late final _sel_replaceOccurrencesOfString_withString_options_range_1 = - _registerName1("replaceOccurrencesOfString:withString:options:range:"); - int _objc_msgSend_691( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer replacement, - int options, - _NSRange searchRange, - ) { - return __objc_msgSend_691( - obj, - sel, - target, - replacement, - options, - searchRange, - ); - } - - late final __objc_msgSend_691Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_691 = __objc_msgSend_691Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, _NSRange)>(); - - late final _sel_applyTransform_reverse_range_updatedRange_1 = - _registerName1("applyTransform:reverse:range:updatedRange:"); - bool _objc_msgSend_692( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer transform, - bool reverse, - _NSRange range, - ffi.Pointer<_NSRange> resultingRange, - ) { - return __objc_msgSend_692( - obj, - sel, - transform, - reverse, - range, - resultingRange, - ); - } - - late final __objc_msgSend_692Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - _NSRange, - ffi.Pointer<_NSRange>)>>('objc_msgSend'); - late final __objc_msgSend_692 = __objc_msgSend_692Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool, _NSRange, ffi.Pointer<_NSRange>)>(); - - ffi.Pointer _objc_msgSend_693( - ffi.Pointer obj, - ffi.Pointer sel, - int capacity, - ) { - return __objc_msgSend_693( - obj, - sel, - capacity, - ); - } - - late final __objc_msgSend_693Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_693 = __objc_msgSend_693Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_stringWithCapacity_1 = _registerName1("stringWithCapacity:"); - late final _class_NSNotification1 = _getClass1("NSNotification"); - late final _sel_object1 = _registerName1("object"); - late final _sel_initWithName_object_userInfo_1 = - _registerName1("initWithName:object:userInfo:"); - instancetype _objc_msgSend_694( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer object, - ffi.Pointer userInfo, - ) { - return __objc_msgSend_694( - obj, - sel, - name, - object, - userInfo, - ); - } - - late final __objc_msgSend_694Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_694 = __objc_msgSend_694Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_notificationWithName_object_1 = - _registerName1("notificationWithName:object:"); - late final _sel_notificationWithName_object_userInfo_1 = - _registerName1("notificationWithName:object:userInfo:"); - late final _class_NSBundle1 = _getClass1("NSBundle"); - late final _sel_mainBundle1 = _registerName1("mainBundle"); - ffi.Pointer _objc_msgSend_695( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_695( - obj, - sel, - ); - } - - late final __objc_msgSend_695Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_695 = __objc_msgSend_695Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_bundleWithPath_1 = _registerName1("bundleWithPath:"); - late final _sel_initWithPath_1 = _registerName1("initWithPath:"); - late final _sel_bundleWithURL_1 = _registerName1("bundleWithURL:"); - late final _sel_initWithURL_1 = _registerName1("initWithURL:"); - late final _sel_bundleForClass_1 = _registerName1("bundleForClass:"); - ffi.Pointer _objc_msgSend_696( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aClass, - ) { - return __objc_msgSend_696( - obj, - sel, - aClass, - ); - } - - late final __objc_msgSend_696Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_696 = __objc_msgSend_696Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_bundleWithIdentifier_1 = - _registerName1("bundleWithIdentifier:"); - ffi.Pointer _objc_msgSend_697( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer identifier, - ) { - return __objc_msgSend_697( - obj, - sel, - identifier, - ); - } - - late final __objc_msgSend_697Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_697 = __objc_msgSend_697Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_allBundles1 = _registerName1("allBundles"); - late final _sel_allFrameworks1 = _registerName1("allFrameworks"); - late final _sel_isLoaded1 = _registerName1("isLoaded"); - late final _sel_unload1 = _registerName1("unload"); - late final _sel_preflightAndReturnError_1 = - _registerName1("preflightAndReturnError:"); - late final _sel_loadAndReturnError_1 = _registerName1("loadAndReturnError:"); - late final _sel_bundleURL1 = _registerName1("bundleURL"); - late final _sel_resourceURL1 = _registerName1("resourceURL"); - late final _sel_executableURL1 = _registerName1("executableURL"); - late final _sel_URLForAuxiliaryExecutable_1 = - _registerName1("URLForAuxiliaryExecutable:"); - late final _sel_privateFrameworksURL1 = - _registerName1("privateFrameworksURL"); - late final _sel_sharedFrameworksURL1 = _registerName1("sharedFrameworksURL"); - late final _sel_sharedSupportURL1 = _registerName1("sharedSupportURL"); - late final _sel_builtInPlugInsURL1 = _registerName1("builtInPlugInsURL"); - late final _sel_appStoreReceiptURL1 = _registerName1("appStoreReceiptURL"); - late final _sel_bundlePath1 = _registerName1("bundlePath"); - late final _sel_resourcePath1 = _registerName1("resourcePath"); - late final _sel_executablePath1 = _registerName1("executablePath"); - late final _sel_pathForAuxiliaryExecutable_1 = - _registerName1("pathForAuxiliaryExecutable:"); - late final _sel_privateFrameworksPath1 = - _registerName1("privateFrameworksPath"); - late final _sel_sharedFrameworksPath1 = - _registerName1("sharedFrameworksPath"); - late final _sel_sharedSupportPath1 = _registerName1("sharedSupportPath"); - late final _sel_builtInPlugInsPath1 = _registerName1("builtInPlugInsPath"); - late final _sel_URLForResource_withExtension_subdirectory_inBundleWithURL_1 = - _registerName1( - "URLForResource:withExtension:subdirectory:inBundleWithURL:"); - ffi.Pointer _objc_msgSend_698( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer ext, - ffi.Pointer subpath, - ffi.Pointer bundleURL, - ) { - return __objc_msgSend_698( - obj, - sel, - name, - ext, - subpath, - bundleURL, - ); - } - - late final __objc_msgSend_698Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_698 = __objc_msgSend_698Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_URLsForResourcesWithExtension_subdirectory_inBundleWithURL_1 = - _registerName1( - "URLsForResourcesWithExtension:subdirectory:inBundleWithURL:"); - ffi.Pointer _objc_msgSend_699( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer ext, - ffi.Pointer subpath, - ffi.Pointer bundleURL, - ) { - return __objc_msgSend_699( - obj, - sel, - ext, - subpath, - bundleURL, - ); - } - - late final __objc_msgSend_699Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_699 = __objc_msgSend_699Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_URLForResource_withExtension_1 = - _registerName1("URLForResource:withExtension:"); - ffi.Pointer _objc_msgSend_700( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer ext, - ) { - return __objc_msgSend_700( - obj, - sel, - name, - ext, - ); - } - - late final __objc_msgSend_700Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_700 = __objc_msgSend_700Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_URLForResource_withExtension_subdirectory_1 = - _registerName1("URLForResource:withExtension:subdirectory:"); - ffi.Pointer _objc_msgSend_701( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer ext, - ffi.Pointer subpath, - ) { - return __objc_msgSend_701( - obj, - sel, - name, - ext, - subpath, - ); - } - - late final __objc_msgSend_701Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_701 = __objc_msgSend_701Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_URLForResource_withExtension_subdirectory_localization_1 = - _registerName1("URLForResource:withExtension:subdirectory:localization:"); - ffi.Pointer _objc_msgSend_702( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer ext, - ffi.Pointer subpath, - ffi.Pointer localizationName, - ) { - return __objc_msgSend_702( - obj, - sel, - name, - ext, - subpath, - localizationName, - ); - } - - late final __objc_msgSend_702Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_702 = __objc_msgSend_702Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_URLsForResourcesWithExtension_subdirectory_1 = - _registerName1("URLsForResourcesWithExtension:subdirectory:"); - ffi.Pointer _objc_msgSend_703( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer ext, - ffi.Pointer subpath, - ) { - return __objc_msgSend_703( - obj, - sel, - ext, - subpath, - ); - } - - late final __objc_msgSend_703Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_703 = __objc_msgSend_703Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_URLsForResourcesWithExtension_subdirectory_localization_1 = - _registerName1( - "URLsForResourcesWithExtension:subdirectory:localization:"); - ffi.Pointer _objc_msgSend_704( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer ext, - ffi.Pointer subpath, - ffi.Pointer localizationName, - ) { - return __objc_msgSend_704( - obj, - sel, - ext, - subpath, - localizationName, - ); - } - - late final __objc_msgSend_704Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_704 = __objc_msgSend_704Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_pathForResource_ofType_inDirectory_1 = - _registerName1("pathForResource:ofType:inDirectory:"); - ffi.Pointer _objc_msgSend_705( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer ext, - ffi.Pointer bundlePath, - ) { - return __objc_msgSend_705( - obj, - sel, - name, - ext, - bundlePath, - ); - } - - late final __objc_msgSend_705Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_705 = __objc_msgSend_705Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_pathsForResourcesOfType_inDirectory_1 = - _registerName1("pathsForResourcesOfType:inDirectory:"); - ffi.Pointer _objc_msgSend_706( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer ext, - ffi.Pointer bundlePath, - ) { - return __objc_msgSend_706( - obj, - sel, - ext, - bundlePath, - ); - } - - late final __objc_msgSend_706Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_706 = __objc_msgSend_706Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_pathForResource_ofType_1 = - _registerName1("pathForResource:ofType:"); - ffi.Pointer _objc_msgSend_707( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer ext, - ) { - return __objc_msgSend_707( - obj, - sel, - name, - ext, - ); - } - - late final __objc_msgSend_707Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_707 = __objc_msgSend_707Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_pathForResource_ofType_inDirectory_forLocalization_1 = - _registerName1("pathForResource:ofType:inDirectory:forLocalization:"); - ffi.Pointer _objc_msgSend_708( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer ext, - ffi.Pointer subpath, - ffi.Pointer localizationName, - ) { - return __objc_msgSend_708( - obj, - sel, - name, - ext, - subpath, - localizationName, - ); - } - - late final __objc_msgSend_708Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_708 = __objc_msgSend_708Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_pathsForResourcesOfType_inDirectory_forLocalization_1 = - _registerName1("pathsForResourcesOfType:inDirectory:forLocalization:"); - ffi.Pointer _objc_msgSend_709( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer ext, - ffi.Pointer subpath, - ffi.Pointer localizationName, - ) { - return __objc_msgSend_709( - obj, - sel, - ext, - subpath, - localizationName, - ); - } - - late final __objc_msgSend_709Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_709 = __objc_msgSend_709Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_localizedStringForKey_value_table_1 = - _registerName1("localizedStringForKey:value:table:"); - ffi.Pointer _objc_msgSend_710( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer tableName, - ) { - return __objc_msgSend_710( - obj, - sel, - key, - value, - tableName, - ); - } - - late final __objc_msgSend_710Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_710 = __objc_msgSend_710Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSAttributedString1 = _getClass1("NSAttributedString"); - late final _sel_attributesAtIndex_effectiveRange_1 = - _registerName1("attributesAtIndex:effectiveRange:"); - ffi.Pointer _objc_msgSend_711( - ffi.Pointer obj, - ffi.Pointer sel, - int location, - ffi.Pointer<_NSRange> range, - ) { - return __objc_msgSend_711( - obj, - sel, - location, - range, - ); - } - - late final __objc_msgSend_711Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_NSRange>)>>('objc_msgSend'); - late final __objc_msgSend_711 = __objc_msgSend_711Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_NSRange>)>(); - - late final _sel_attribute_atIndex_effectiveRange_1 = - _registerName1("attribute:atIndex:effectiveRange:"); - ffi.Pointer _objc_msgSend_712( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer attrName, - int location, - ffi.Pointer<_NSRange> range, - ) { - return __objc_msgSend_712( - obj, - sel, - attrName, - location, - range, - ); - } - - late final __objc_msgSend_712Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_NSRange>)>>('objc_msgSend'); - late final __objc_msgSend_712 = __objc_msgSend_712Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_NSRange>)>(); - - late final _sel_attributedSubstringFromRange_1 = - _registerName1("attributedSubstringFromRange:"); - ffi.Pointer _objc_msgSend_713( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_713( - obj, - sel, - range, - ); - } - - late final __objc_msgSend_713Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_713 = __objc_msgSend_713Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _sel_attributesAtIndex_longestEffectiveRange_inRange_1 = - _registerName1("attributesAtIndex:longestEffectiveRange:inRange:"); - ffi.Pointer _objc_msgSend_714( - ffi.Pointer obj, - ffi.Pointer sel, - int location, - ffi.Pointer<_NSRange> range, - _NSRange rangeLimit, - ) { - return __objc_msgSend_714( - obj, - sel, - location, - range, - rangeLimit, - ); - } - - late final __objc_msgSend_714Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_NSRange>, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_714 = __objc_msgSend_714Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_NSRange>, _NSRange)>(); - - late final _sel_attribute_atIndex_longestEffectiveRange_inRange_1 = - _registerName1("attribute:atIndex:longestEffectiveRange:inRange:"); - ffi.Pointer _objc_msgSend_715( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer attrName, - int location, - ffi.Pointer<_NSRange> range, - _NSRange rangeLimit, - ) { - return __objc_msgSend_715( - obj, - sel, - attrName, - location, - range, - rangeLimit, - ); - } - - late final __objc_msgSend_715Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_NSRange>, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_715 = __objc_msgSend_715Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_NSRange>, - _NSRange)>(); - - late final _sel_isEqualToAttributedString_1 = - _registerName1("isEqualToAttributedString:"); - bool _objc_msgSend_716( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - ) { - return __objc_msgSend_716( - obj, - sel, - other, - ); - } - - late final __objc_msgSend_716Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_716 = __objc_msgSend_716Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithString_attributes_1 = - _registerName1("initWithString:attributes:"); - instancetype _objc_msgSend_717( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer str, - ffi.Pointer attrs, - ) { - return __objc_msgSend_717( - obj, - sel, - str, - attrs, - ); - } - - late final __objc_msgSend_717Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_717 = __objc_msgSend_717Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithAttributedString_1 = - _registerName1("initWithAttributedString:"); - instancetype _objc_msgSend_718( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer attrStr, - ) { - return __objc_msgSend_718( - obj, - sel, - attrStr, - ); - } - - late final __objc_msgSend_718Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_718 = __objc_msgSend_718Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_enumerateAttributesInRange_options_usingBlock_1 = - _registerName1("enumerateAttributesInRange:options:usingBlock:"); - void _objc_msgSend_719( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange enumerationRange, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_719( - obj, - sel, - enumerationRange, - opts, - block, - ); - } - - late final __objc_msgSend_719Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_719 = __objc_msgSend_719Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_enumerateAttribute_inRange_options_usingBlock_1 = - _registerName1("enumerateAttribute:inRange:options:usingBlock:"); - void _objc_msgSend_720( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer attrName, - _NSRange enumerationRange, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_720( - obj, - sel, - attrName, - enumerationRange, - opts, - block, - ); - } - - late final __objc_msgSend_720Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_720 = __objc_msgSend_720Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _class_NSAttributedStringMarkdownParsingOptions1 = - _getClass1("NSAttributedStringMarkdownParsingOptions"); - late final _sel_allowsExtendedAttributes1 = - _registerName1("allowsExtendedAttributes"); - late final _sel_setAllowsExtendedAttributes_1 = - _registerName1("setAllowsExtendedAttributes:"); - late final _sel_interpretedSyntax1 = _registerName1("interpretedSyntax"); - int _objc_msgSend_721( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_721( - obj, - sel, - ); - } - - late final __objc_msgSend_721Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_721 = __objc_msgSend_721Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setInterpretedSyntax_1 = - _registerName1("setInterpretedSyntax:"); - void _objc_msgSend_722( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_722( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_722Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_722 = __objc_msgSend_722Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_failurePolicy1 = _registerName1("failurePolicy"); - int _objc_msgSend_723( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_723( - obj, - sel, - ); - } - - late final __objc_msgSend_723Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_723 = __objc_msgSend_723Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setFailurePolicy_1 = _registerName1("setFailurePolicy:"); - void _objc_msgSend_724( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_724( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_724Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_724 = __objc_msgSend_724Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_setLanguageCode_1 = _registerName1("setLanguageCode:"); - late final _sel_appliesSourcePositionAttributes1 = - _registerName1("appliesSourcePositionAttributes"); - late final _sel_setAppliesSourcePositionAttributes_1 = - _registerName1("setAppliesSourcePositionAttributes:"); - late final _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_1 = - _registerName1( - "initWithContentsOfMarkdownFileAtURL:options:baseURL:error:"); - instancetype _objc_msgSend_725( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer markdownFile, - ffi.Pointer options, - ffi.Pointer baseURL, - ffi.Pointer> error, - ) { - return __objc_msgSend_725( - obj, - sel, - markdownFile, - options, - baseURL, - error, - ); - } - - late final __objc_msgSend_725Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_725 = __objc_msgSend_725Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_initWithMarkdown_options_baseURL_error_1 = - _registerName1("initWithMarkdown:options:baseURL:error:"); - instancetype _objc_msgSend_726( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer markdown, - ffi.Pointer options, - ffi.Pointer baseURL, - ffi.Pointer> error, - ) { - return __objc_msgSend_726( - obj, - sel, - markdown, - options, - baseURL, - error, - ); - } - - late final __objc_msgSend_726Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_726 = __objc_msgSend_726Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_initWithMarkdownString_options_baseURL_error_1 = - _registerName1("initWithMarkdownString:options:baseURL:error:"); - instancetype _objc_msgSend_727( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer markdownString, - ffi.Pointer options, - ffi.Pointer baseURL, - ffi.Pointer> error, - ) { - return __objc_msgSend_727( - obj, - sel, - markdownString, - options, - baseURL, - error, - ); - } - - late final __objc_msgSend_727Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_727 = __objc_msgSend_727Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_initWithFormat_options_locale_1 = - _registerName1("initWithFormat:options:locale:"); - instancetype _objc_msgSend_728( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - int options, - ffi.Pointer locale, - ) { - return __objc_msgSend_728( - obj, - sel, - format, - options, - locale, - ); - } - - late final __objc_msgSend_728Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_728 = __objc_msgSend_728Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_initWithFormat_options_locale_arguments_1 = - _registerName1("initWithFormat:options:locale:arguments:"); - instancetype _objc_msgSend_729( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - int options, - ffi.Pointer locale, - ffi.Pointer<__va_list_tag> arguments, - ) { - return __objc_msgSend_729( - obj, - sel, - format, - options, - locale, - arguments, - ); - } - - late final __objc_msgSend_729Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>('objc_msgSend'); - late final __objc_msgSend_729 = __objc_msgSend_729Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>(); - - late final _sel_localizedAttributedStringWithFormat_1 = - _registerName1("localizedAttributedStringWithFormat:"); - late final _sel_localizedAttributedStringWithFormat_options_1 = - _registerName1("localizedAttributedStringWithFormat:options:"); - instancetype _objc_msgSend_730( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - int options, - ) { - return __objc_msgSend_730( - obj, - sel, - format, - options, - ); - } - - late final __objc_msgSend_730Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_730 = __objc_msgSend_730Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_initWithFormat_options_locale_context_1 = - _registerName1("initWithFormat:options:locale:context:"); - instancetype _objc_msgSend_731( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - int options, - ffi.Pointer locale, - ffi.Pointer context, - ) { - return __objc_msgSend_731( - obj, - sel, - format, - options, - locale, - context, - ); - } - - late final __objc_msgSend_731Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_731 = __objc_msgSend_731Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithFormat_options_locale_context_arguments_1 = - _registerName1("initWithFormat:options:locale:context:arguments:"); - instancetype _objc_msgSend_732( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - int options, - ffi.Pointer locale, - ffi.Pointer context, - ffi.Pointer<__va_list_tag> arguments, - ) { - return __objc_msgSend_732( - obj, - sel, - format, - options, - locale, - context, - arguments, - ); - } - - late final __objc_msgSend_732Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>('objc_msgSend'); - late final __objc_msgSend_732 = __objc_msgSend_732Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>(); - - late final _sel_localizedAttributedStringWithFormat_context_1 = - _registerName1("localizedAttributedStringWithFormat:context:"); - instancetype _objc_msgSend_733( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer context, - ) { - return __objc_msgSend_733( - obj, - sel, - format, - context, - ); - } - - late final __objc_msgSend_733Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_733 = __objc_msgSend_733Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_localizedAttributedStringWithFormat_options_context_1 = - _registerName1("localizedAttributedStringWithFormat:options:context:"); - instancetype _objc_msgSend_734( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - int options, - ffi.Pointer context, - ) { - return __objc_msgSend_734( - obj, - sel, - format, - options, - context, - ); - } - - late final __objc_msgSend_734Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_734 = __objc_msgSend_734Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_attributedStringByInflectingString1 = - _registerName1("attributedStringByInflectingString"); - ffi.Pointer _objc_msgSend_735( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_735( - obj, - sel, - ); - } - - late final __objc_msgSend_735Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_735 = __objc_msgSend_735Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_localizedAttributedStringForKey_value_table_1 = - _registerName1("localizedAttributedStringForKey:value:table:"); - ffi.Pointer _objc_msgSend_736( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer tableName, - ) { - return __objc_msgSend_736( - obj, - sel, - key, - value, - tableName, - ); - } - - late final __objc_msgSend_736Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_736 = __objc_msgSend_736Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_bundleIdentifier1 = _registerName1("bundleIdentifier"); - late final _sel_infoDictionary1 = _registerName1("infoDictionary"); - late final _sel_localizedInfoDictionary1 = - _registerName1("localizedInfoDictionary"); - late final _sel_objectForInfoDictionaryKey_1 = - _registerName1("objectForInfoDictionaryKey:"); - late final _sel_classNamed_1 = _registerName1("classNamed:"); - late final _sel_principalClass1 = _registerName1("principalClass"); - late final _sel_preferredLocalizations1 = - _registerName1("preferredLocalizations"); - late final _sel_localizations1 = _registerName1("localizations"); - late final _sel_developmentLocalization1 = - _registerName1("developmentLocalization"); - late final _sel_preferredLocalizationsFromArray_1 = - _registerName1("preferredLocalizationsFromArray:"); - late final _sel_preferredLocalizationsFromArray_forPreferences_1 = - _registerName1("preferredLocalizationsFromArray:forPreferences:"); - ffi.Pointer _objc_msgSend_737( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer localizationsArray, - ffi.Pointer preferencesArray, - ) { - return __objc_msgSend_737( - obj, - sel, - localizationsArray, - preferencesArray, - ); - } - - late final __objc_msgSend_737Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_737 = __objc_msgSend_737Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_executableArchitectures1 = - _registerName1("executableArchitectures"); - late final _sel_setPreservationPriority_forTags_1 = - _registerName1("setPreservationPriority:forTags:"); - void _objc_msgSend_738( - ffi.Pointer obj, - ffi.Pointer sel, - double priority, - ffi.Pointer tags, - ) { - return __objc_msgSend_738( - obj, - sel, - priority, - tags, - ); - } - - late final __objc_msgSend_738Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Double, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_738 = __objc_msgSend_738Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double, - ffi.Pointer)>(); - - late final _sel_preservationPriorityForTag_1 = - _registerName1("preservationPriorityForTag:"); - late final _class_NSMutableAttributedString1 = - _getClass1("NSMutableAttributedString"); - late final _sel_setAttributes_range_1 = - _registerName1("setAttributes:range:"); - void _objc_msgSend_739( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer attrs, - _NSRange range, - ) { - return __objc_msgSend_739( - obj, - sel, - attrs, - range, - ); - } - - late final __objc_msgSend_739Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_739 = __objc_msgSend_739Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>(); - - late final _sel_mutableString1 = _registerName1("mutableString"); - ffi.Pointer _objc_msgSend_740( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_740( - obj, - sel, - ); - } - - late final __objc_msgSend_740Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_740 = __objc_msgSend_740Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_addAttribute_value_range_1 = - _registerName1("addAttribute:value:range:"); - void _objc_msgSend_741( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer value, - _NSRange range, - ) { - return __objc_msgSend_741( - obj, - sel, - name, - value, - range, - ); - } - - late final __objc_msgSend_741Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_741 = __objc_msgSend_741Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _sel_addAttributes_range_1 = - _registerName1("addAttributes:range:"); - void _objc_msgSend_742( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer attrs, - _NSRange range, - ) { - return __objc_msgSend_742( - obj, - sel, - attrs, - range, - ); - } - - late final __objc_msgSend_742Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_742 = __objc_msgSend_742Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>(); - - late final _sel_removeAttribute_range_1 = - _registerName1("removeAttribute:range:"); - void _objc_msgSend_743( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - _NSRange range, - ) { - return __objc_msgSend_743( - obj, - sel, - name, - range, - ); - } - - late final __objc_msgSend_743Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_743 = __objc_msgSend_743Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>(); - - late final _sel_replaceCharactersInRange_withAttributedString_1 = - _registerName1("replaceCharactersInRange:withAttributedString:"); - void _objc_msgSend_744( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer attrString, - ) { - return __objc_msgSend_744( - obj, - sel, - range, - attrString, - ); - } - - late final __objc_msgSend_744Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_744 = __objc_msgSend_744Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - ffi.Pointer)>(); - - late final _sel_insertAttributedString_atIndex_1 = - _registerName1("insertAttributedString:atIndex:"); - void _objc_msgSend_745( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer attrString, - int loc, - ) { - return __objc_msgSend_745( - obj, - sel, - attrString, - loc, - ); - } - - late final __objc_msgSend_745Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_745 = __objc_msgSend_745Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_appendAttributedString_1 = - _registerName1("appendAttributedString:"); - void _objc_msgSend_746( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer attrString, - ) { - return __objc_msgSend_746( - obj, - sel, - attrString, - ); - } - - late final __objc_msgSend_746Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_746 = __objc_msgSend_746Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_setAttributedString_1 = - _registerName1("setAttributedString:"); - late final _sel_beginEditing1 = _registerName1("beginEditing"); - late final _sel_endEditing1 = _registerName1("endEditing"); - late final _sel_appendLocalizedFormat_1 = - _registerName1("appendLocalizedFormat:"); - late final _class_NSDateFormatter1 = _getClass1("NSDateFormatter"); - late final _class_NSFormatter1 = _getClass1("NSFormatter"); - late final _sel_stringForObjectValue_1 = - _registerName1("stringForObjectValue:"); - ffi.Pointer _objc_msgSend_747( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer obj1, - ) { - return __objc_msgSend_747( - obj, - sel, - obj1, - ); - } - - late final __objc_msgSend_747Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_747 = __objc_msgSend_747Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_attributedStringForObjectValue_withDefaultAttributes_1 = - _registerName1("attributedStringForObjectValue:withDefaultAttributes:"); - ffi.Pointer _objc_msgSend_748( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer obj1, - ffi.Pointer attrs, - ) { - return __objc_msgSend_748( - obj, - sel, - obj1, - attrs, - ); - } - - late final __objc_msgSend_748Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_748 = __objc_msgSend_748Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_editingStringForObjectValue_1 = - _registerName1("editingStringForObjectValue:"); - late final _sel_getObjectValue_forString_errorDescription_1 = - _registerName1("getObjectValue:forString:errorDescription:"); - bool _objc_msgSend_749( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> obj1, - ffi.Pointer string, - ffi.Pointer> error, - ) { - return __objc_msgSend_749( - obj, - sel, - obj1, - string, - error, - ); - } - - late final __objc_msgSend_749Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_749 = __objc_msgSend_749Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_isPartialStringValid_newEditingString_errorDescription_1 = - _registerName1("isPartialStringValid:newEditingString:errorDescription:"); - bool _objc_msgSend_750( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer partialString, - ffi.Pointer> newString, - ffi.Pointer> error, - ) { - return __objc_msgSend_750( - obj, - sel, - partialString, - newString, - error, - ); - } - - late final __objc_msgSend_750Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_750 = __objc_msgSend_750Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _sel_isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_1 = - _registerName1( - "isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription:"); - bool _objc_msgSend_751( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> partialStringPtr, - ffi.Pointer<_NSRange> proposedSelRangePtr, - ffi.Pointer origString, - _NSRange origSelRange, - ffi.Pointer> error, - ) { - return __objc_msgSend_751( - obj, - sel, - partialStringPtr, - proposedSelRangePtr, - origString, - origSelRange, - error, - ); - } - - late final __objc_msgSend_751Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer<_NSRange>, - ffi.Pointer, - _NSRange, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_751 = __objc_msgSend_751Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer<_NSRange>, - ffi.Pointer, - _NSRange, - ffi.Pointer>)>(); - - late final _sel_formattingContext1 = _registerName1("formattingContext"); - int _objc_msgSend_752( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_752( - obj, - sel, - ); - } - - late final __objc_msgSend_752Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_752 = __objc_msgSend_752Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setFormattingContext_1 = - _registerName1("setFormattingContext:"); - void _objc_msgSend_753( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_753( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_753Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_753 = __objc_msgSend_753Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_getObjectValue_forString_range_error_1 = - _registerName1("getObjectValue:forString:range:error:"); - bool _objc_msgSend_754( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> obj1, - ffi.Pointer string, - ffi.Pointer<_NSRange> rangep, - ffi.Pointer> error, - ) { - return __objc_msgSend_754( - obj, - sel, - obj1, - string, - rangep, - error, - ); - } - - late final __objc_msgSend_754Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer<_NSRange>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_754 = __objc_msgSend_754Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer<_NSRange>, - ffi.Pointer>)>(); - - late final _sel_stringFromDate_1 = _registerName1("stringFromDate:"); - ffi.Pointer _objc_msgSend_755( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, - ) { - return __objc_msgSend_755( - obj, - sel, - date, - ); - } - - late final __objc_msgSend_755Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_755 = __objc_msgSend_755Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_dateFromString_1 = _registerName1("dateFromString:"); - late final _sel_localizedStringFromDate_dateStyle_timeStyle_1 = - _registerName1("localizedStringFromDate:dateStyle:timeStyle:"); - ffi.Pointer _objc_msgSend_756( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, - int dstyle, - int tstyle, - ) { - return __objc_msgSend_756( - obj, - sel, - date, - dstyle, - tstyle, - ); - } - - late final __objc_msgSend_756Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_756 = __objc_msgSend_756Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, int)>(); - - late final _sel_dateFormatFromTemplate_options_locale_1 = - _registerName1("dateFormatFromTemplate:options:locale:"); - ffi.Pointer _objc_msgSend_757( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer tmplate, - int opts, - ffi.Pointer locale, - ) { - return __objc_msgSend_757( - obj, - sel, - tmplate, - opts, - locale, - ); - } - - late final __objc_msgSend_757Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_757 = __objc_msgSend_757Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - late final _sel_defaultFormatterBehavior1 = - _registerName1("defaultFormatterBehavior"); - int _objc_msgSend_758( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_758( - obj, - sel, - ); - } - - late final __objc_msgSend_758Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_758 = __objc_msgSend_758Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setDefaultFormatterBehavior_1 = - _registerName1("setDefaultFormatterBehavior:"); - void _objc_msgSend_759( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_759( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_759Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_759 = __objc_msgSend_759Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_setLocalizedDateFormatFromTemplate_1 = - _registerName1("setLocalizedDateFormatFromTemplate:"); - late final _sel_dateFormat1 = _registerName1("dateFormat"); - late final _sel_setDateFormat_1 = _registerName1("setDateFormat:"); - late final _sel_dateStyle1 = _registerName1("dateStyle"); - int _objc_msgSend_760( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_760( - obj, - sel, - ); - } - - late final __objc_msgSend_760Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_760 = __objc_msgSend_760Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setDateStyle_1 = _registerName1("setDateStyle:"); - void _objc_msgSend_761( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_761( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_761Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_761 = __objc_msgSend_761Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_timeStyle1 = _registerName1("timeStyle"); - late final _sel_setTimeStyle_1 = _registerName1("setTimeStyle:"); - late final _sel_locale1 = _registerName1("locale"); - late final _sel_setLocale_1 = _registerName1("setLocale:"); - void _objc_msgSend_762( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_762( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_762Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_762 = __objc_msgSend_762Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_generatesCalendarDates1 = - _registerName1("generatesCalendarDates"); - late final _sel_setGeneratesCalendarDates_1 = - _registerName1("setGeneratesCalendarDates:"); - late final _sel_formatterBehavior1 = _registerName1("formatterBehavior"); - late final _sel_setFormatterBehavior_1 = - _registerName1("setFormatterBehavior:"); - late final _class_NSCalendar1 = _getClass1("NSCalendar"); - late final _sel_currentCalendar1 = _registerName1("currentCalendar"); - ffi.Pointer _objc_msgSend_763( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_763( - obj, - sel, - ); - } - - late final __objc_msgSend_763Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_763 = __objc_msgSend_763Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_autoupdatingCurrentCalendar1 = - _registerName1("autoupdatingCurrentCalendar"); - late final _sel_calendarWithIdentifier_1 = - _registerName1("calendarWithIdentifier:"); - ffi.Pointer _objc_msgSend_764( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer calendarIdentifierConstant, - ) { - return __objc_msgSend_764( - obj, - sel, - calendarIdentifierConstant, - ); - } - - late final __objc_msgSend_764Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_764 = __objc_msgSend_764Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithCalendarIdentifier_1 = - _registerName1("initWithCalendarIdentifier:"); - ffi.Pointer _objc_msgSend_765( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_765( - obj, - sel, - ); - } - - late final __objc_msgSend_765Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_765 = __objc_msgSend_765Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - void _objc_msgSend_766( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_766( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_766Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_766 = __objc_msgSend_766Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_firstWeekday1 = _registerName1("firstWeekday"); - late final _sel_setFirstWeekday_1 = _registerName1("setFirstWeekday:"); - late final _sel_minimumDaysInFirstWeek1 = - _registerName1("minimumDaysInFirstWeek"); - late final _sel_setMinimumDaysInFirstWeek_1 = - _registerName1("setMinimumDaysInFirstWeek:"); - late final _sel_eraSymbols1 = _registerName1("eraSymbols"); - late final _sel_longEraSymbols1 = _registerName1("longEraSymbols"); - late final _sel_monthSymbols1 = _registerName1("monthSymbols"); - late final _sel_shortMonthSymbols1 = _registerName1("shortMonthSymbols"); - late final _sel_veryShortMonthSymbols1 = - _registerName1("veryShortMonthSymbols"); - late final _sel_standaloneMonthSymbols1 = - _registerName1("standaloneMonthSymbols"); - late final _sel_shortStandaloneMonthSymbols1 = - _registerName1("shortStandaloneMonthSymbols"); - late final _sel_veryShortStandaloneMonthSymbols1 = - _registerName1("veryShortStandaloneMonthSymbols"); - late final _sel_weekdaySymbols1 = _registerName1("weekdaySymbols"); - late final _sel_shortWeekdaySymbols1 = _registerName1("shortWeekdaySymbols"); - late final _sel_veryShortWeekdaySymbols1 = - _registerName1("veryShortWeekdaySymbols"); - late final _sel_standaloneWeekdaySymbols1 = - _registerName1("standaloneWeekdaySymbols"); - late final _sel_shortStandaloneWeekdaySymbols1 = - _registerName1("shortStandaloneWeekdaySymbols"); - late final _sel_veryShortStandaloneWeekdaySymbols1 = - _registerName1("veryShortStandaloneWeekdaySymbols"); - late final _sel_quarterSymbols1 = _registerName1("quarterSymbols"); - late final _sel_shortQuarterSymbols1 = _registerName1("shortQuarterSymbols"); - late final _sel_standaloneQuarterSymbols1 = - _registerName1("standaloneQuarterSymbols"); - late final _sel_shortStandaloneQuarterSymbols1 = - _registerName1("shortStandaloneQuarterSymbols"); - late final _sel_AMSymbol1 = _registerName1("AMSymbol"); - late final _sel_PMSymbol1 = _registerName1("PMSymbol"); - late final _sel_minimumRangeOfUnit_1 = _registerName1("minimumRangeOfUnit:"); - _NSRange _objc_msgSend_767( - ffi.Pointer obj, - ffi.Pointer sel, - int unit, - ) { - return __objc_msgSend_767( - obj, - sel, - unit, - ); - } - - late final __objc_msgSend_767Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_767 = __objc_msgSend_767Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, int)>(); - - void _objc_msgSend_767_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - int unit, - ) { - return __objc_msgSend_767_stret( - stret, - obj, - sel, - unit, - ); - } - - late final __objc_msgSend_767_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend_stret'); - late final __objc_msgSend_767_stret = __objc_msgSend_767_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_maximumRangeOfUnit_1 = _registerName1("maximumRangeOfUnit:"); - late final _sel_rangeOfUnit_inUnit_forDate_1 = - _registerName1("rangeOfUnit:inUnit:forDate:"); - _NSRange _objc_msgSend_768( - ffi.Pointer obj, - ffi.Pointer sel, - int smaller, - int larger, - ffi.Pointer date, - ) { - return __objc_msgSend_768( - obj, - sel, - smaller, - larger, - date, - ); - } - - late final __objc_msgSend_768Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Int32, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_768 = __objc_msgSend_768Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, int, int, - ffi.Pointer)>(); - - void _objc_msgSend_768_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - int smaller, - int larger, - ffi.Pointer date, - ) { - return __objc_msgSend_768_stret( - stret, - obj, - sel, - smaller, - larger, - date, - ); - } - - late final __objc_msgSend_768_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_768_stret = __objc_msgSend_768_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer)>(); - - late final _sel_ordinalityOfUnit_inUnit_forDate_1 = - _registerName1("ordinalityOfUnit:inUnit:forDate:"); - int _objc_msgSend_769( - ffi.Pointer obj, - ffi.Pointer sel, - int smaller, - int larger, - ffi.Pointer date, - ) { - return __objc_msgSend_769( - obj, - sel, - smaller, - larger, - date, - ); - } - - late final __objc_msgSend_769Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_769 = __objc_msgSend_769Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, int, - ffi.Pointer)>(); - - late final _sel_rangeOfUnit_startDate_interval_forDate_1 = - _registerName1("rangeOfUnit:startDate:interval:forDate:"); - bool _objc_msgSend_770( - ffi.Pointer obj, - ffi.Pointer sel, - int unit, - ffi.Pointer> datep, - ffi.Pointer tip, - ffi.Pointer date, - ) { - return __objc_msgSend_770( - obj, - sel, - unit, - datep, - tip, - date, - ); - } - - late final __objc_msgSend_770Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_770 = __objc_msgSend_770Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSDateComponents1 = _getClass1("NSDateComponents"); - late final _sel_calendar1 = _registerName1("calendar"); - ffi.Pointer _objc_msgSend_771( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_771( - obj, - sel, - ); - } - - late final __objc_msgSend_771Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_771 = __objc_msgSend_771Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setCalendar_1 = _registerName1("setCalendar:"); - void _objc_msgSend_772( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_772( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_772Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_772 = __objc_msgSend_772Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - ffi.Pointer _objc_msgSend_773( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_773( - obj, - sel, - ); - } - - late final __objc_msgSend_773Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_773 = __objc_msgSend_773Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - void _objc_msgSend_774( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_774( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_774Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_774 = __objc_msgSend_774Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_era1 = _registerName1("era"); - late final _sel_setEra_1 = _registerName1("setEra:"); - late final _sel_year1 = _registerName1("year"); - late final _sel_setYear_1 = _registerName1("setYear:"); - late final _sel_month1 = _registerName1("month"); - late final _sel_setMonth_1 = _registerName1("setMonth:"); - late final _sel_day1 = _registerName1("day"); - late final _sel_setDay_1 = _registerName1("setDay:"); - late final _sel_hour1 = _registerName1("hour"); - late final _sel_setHour_1 = _registerName1("setHour:"); - late final _sel_minute1 = _registerName1("minute"); - late final _sel_setMinute_1 = _registerName1("setMinute:"); - late final _sel_second1 = _registerName1("second"); - late final _sel_setSecond_1 = _registerName1("setSecond:"); - late final _sel_nanosecond1 = _registerName1("nanosecond"); - late final _sel_setNanosecond_1 = _registerName1("setNanosecond:"); - late final _sel_weekday1 = _registerName1("weekday"); - late final _sel_setWeekday_1 = _registerName1("setWeekday:"); - late final _sel_weekdayOrdinal1 = _registerName1("weekdayOrdinal"); - late final _sel_setWeekdayOrdinal_1 = _registerName1("setWeekdayOrdinal:"); - late final _sel_quarter1 = _registerName1("quarter"); - late final _sel_setQuarter_1 = _registerName1("setQuarter:"); - late final _sel_weekOfMonth1 = _registerName1("weekOfMonth"); - late final _sel_setWeekOfMonth_1 = _registerName1("setWeekOfMonth:"); - late final _sel_weekOfYear1 = _registerName1("weekOfYear"); - late final _sel_setWeekOfYear_1 = _registerName1("setWeekOfYear:"); - late final _sel_yearForWeekOfYear1 = _registerName1("yearForWeekOfYear"); - late final _sel_setYearForWeekOfYear_1 = - _registerName1("setYearForWeekOfYear:"); - late final _sel_isLeapMonth1 = _registerName1("isLeapMonth"); - late final _sel_setLeapMonth_1 = _registerName1("setLeapMonth:"); - late final _sel_week1 = _registerName1("week"); - late final _sel_setWeek_1 = _registerName1("setWeek:"); - late final _sel_setValue_forComponent_1 = - _registerName1("setValue:forComponent:"); - void _objc_msgSend_775( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - int unit, - ) { - return __objc_msgSend_775( - obj, - sel, - value, - unit, - ); - } - - late final __objc_msgSend_775Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Long, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_775 = __objc_msgSend_775Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, int)>(); - - late final _sel_valueForComponent_1 = _registerName1("valueForComponent:"); - int _objc_msgSend_776( - ffi.Pointer obj, - ffi.Pointer sel, - int unit, - ) { - return __objc_msgSend_776( - obj, - sel, - unit, - ); - } - - late final __objc_msgSend_776Ptr = _lookup< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_776 = __objc_msgSend_776Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_isValidDate1 = _registerName1("isValidDate"); - late final _sel_isValidDateInCalendar_1 = - _registerName1("isValidDateInCalendar:"); - bool _objc_msgSend_777( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer calendar, - ) { - return __objc_msgSend_777( - obj, - sel, - calendar, - ); - } - - late final __objc_msgSend_777Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_777 = __objc_msgSend_777Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_dateFromComponents_1 = _registerName1("dateFromComponents:"); - ffi.Pointer _objc_msgSend_778( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer comps, - ) { - return __objc_msgSend_778( - obj, - sel, - comps, - ); - } - - late final __objc_msgSend_778Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_778 = __objc_msgSend_778Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_components_fromDate_1 = - _registerName1("components:fromDate:"); - ffi.Pointer _objc_msgSend_779( - ffi.Pointer obj, - ffi.Pointer sel, - int unitFlags, - ffi.Pointer date, - ) { - return __objc_msgSend_779( - obj, - sel, - unitFlags, - date, - ); - } - - late final __objc_msgSend_779Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_779 = __objc_msgSend_779Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_dateByAddingComponents_toDate_options_1 = - _registerName1("dateByAddingComponents:toDate:options:"); - ffi.Pointer _objc_msgSend_780( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer comps, - ffi.Pointer date, - int opts, - ) { - return __objc_msgSend_780( - obj, - sel, - comps, - date, - opts, - ); - } - - late final __objc_msgSend_780Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_780 = __objc_msgSend_780Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); - - late final _sel_components_fromDate_toDate_options_1 = - _registerName1("components:fromDate:toDate:options:"); - ffi.Pointer _objc_msgSend_781( - ffi.Pointer obj, - ffi.Pointer sel, - int unitFlags, - ffi.Pointer startingDate, - ffi.Pointer resultDate, - int opts, - ) { - return __objc_msgSend_781( - obj, - sel, - unitFlags, - startingDate, - resultDate, - opts, - ); - } - - late final __objc_msgSend_781Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_781 = __objc_msgSend_781Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - int)>(); - - late final _sel_getEra_year_month_day_fromDate_1 = - _registerName1("getEra:year:month:day:fromDate:"); - void _objc_msgSend_782( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer eraValuePointer, - ffi.Pointer yearValuePointer, - ffi.Pointer monthValuePointer, - ffi.Pointer dayValuePointer, - ffi.Pointer date, - ) { - return __objc_msgSend_782( - obj, - sel, - eraValuePointer, - yearValuePointer, - monthValuePointer, - dayValuePointer, - date, - ); - } - - late final __objc_msgSend_782Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_782 = __objc_msgSend_782Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_1 = - _registerName1("getEra:yearForWeekOfYear:weekOfYear:weekday:fromDate:"); - late final _sel_getHour_minute_second_nanosecond_fromDate_1 = - _registerName1("getHour:minute:second:nanosecond:fromDate:"); - late final _sel_component_fromDate_1 = _registerName1("component:fromDate:"); - int _objc_msgSend_783( - ffi.Pointer obj, - ffi.Pointer sel, - int unit, - ffi.Pointer date, - ) { - return __objc_msgSend_783( - obj, - sel, - unit, - date, - ); - } - - late final __objc_msgSend_783Ptr = _lookup< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_783 = __objc_msgSend_783Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _sel_dateWithEra_year_month_day_hour_minute_second_nanosecond_1 = - _registerName1( - "dateWithEra:year:month:day:hour:minute:second:nanosecond:"); - ffi.Pointer _objc_msgSend_784( - ffi.Pointer obj, - ffi.Pointer sel, - int eraValue, - int yearValue, - int monthValue, - int dayValue, - int hourValue, - int minuteValue, - int secondValue, - int nanosecondValue, - ) { - return __objc_msgSend_784( - obj, - sel, - eraValue, - yearValue, - monthValue, - dayValue, - hourValue, - minuteValue, - secondValue, - nanosecondValue, - ); - } - - late final __objc_msgSend_784Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_784 = __objc_msgSend_784Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, int, int, int, int, int, int, int)>(); - - late final _sel_dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_1 = - _registerName1( - "dateWithEra:yearForWeekOfYear:weekOfYear:weekday:hour:minute:second:nanosecond:"); - late final _sel_startOfDayForDate_1 = _registerName1("startOfDayForDate:"); - late final _sel_componentsInTimeZone_fromDate_1 = - _registerName1("componentsInTimeZone:fromDate:"); - ffi.Pointer _objc_msgSend_785( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer timezone, - ffi.Pointer date, - ) { - return __objc_msgSend_785( - obj, - sel, - timezone, - date, - ); - } - - late final __objc_msgSend_785Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_785 = __objc_msgSend_785Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_compareDate_toDate_toUnitGranularity_1 = - _registerName1("compareDate:toDate:toUnitGranularity:"); - int _objc_msgSend_786( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date1, - ffi.Pointer date2, - int unit, - ) { - return __objc_msgSend_786( - obj, - sel, - date1, - date2, - unit, - ); - } - - late final __objc_msgSend_786Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_786 = __objc_msgSend_786Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_isDate_equalToDate_toUnitGranularity_1 = - _registerName1("isDate:equalToDate:toUnitGranularity:"); - bool _objc_msgSend_787( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date1, - ffi.Pointer date2, - int unit, - ) { - return __objc_msgSend_787( - obj, - sel, - date1, - date2, - unit, - ); - } - - late final __objc_msgSend_787Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_787 = __objc_msgSend_787Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_isDate_inSameDayAsDate_1 = - _registerName1("isDate:inSameDayAsDate:"); - bool _objc_msgSend_788( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date1, - ffi.Pointer date2, - ) { - return __objc_msgSend_788( - obj, - sel, - date1, - date2, - ); - } - - late final __objc_msgSend_788Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_788 = __objc_msgSend_788Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_isDateInToday_1 = _registerName1("isDateInToday:"); - late final _sel_isDateInYesterday_1 = _registerName1("isDateInYesterday:"); - late final _sel_isDateInTomorrow_1 = _registerName1("isDateInTomorrow:"); - late final _sel_isDateInWeekend_1 = _registerName1("isDateInWeekend:"); - late final _sel_rangeOfWeekendStartDate_interval_containingDate_1 = - _registerName1("rangeOfWeekendStartDate:interval:containingDate:"); - bool _objc_msgSend_789( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> datep, - ffi.Pointer tip, - ffi.Pointer date, - ) { - return __objc_msgSend_789( - obj, - sel, - datep, - tip, - date, - ); - } - - late final __objc_msgSend_789Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_789 = __objc_msgSend_789Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_nextWeekendStartDate_interval_options_afterDate_1 = - _registerName1("nextWeekendStartDate:interval:options:afterDate:"); - bool _objc_msgSend_790( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> datep, - ffi.Pointer tip, - int options, - ffi.Pointer date, - ) { - return __objc_msgSend_790( - obj, - sel, - datep, - tip, - options, - date, - ); - } - - late final __objc_msgSend_790Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_790 = __objc_msgSend_790Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - int, - ffi.Pointer)>(); - - late final _sel_components_fromDateComponents_toDateComponents_options_1 = - _registerName1("components:fromDateComponents:toDateComponents:options:"); - ffi.Pointer _objc_msgSend_791( - ffi.Pointer obj, - ffi.Pointer sel, - int unitFlags, - ffi.Pointer startingDateComp, - ffi.Pointer resultDateComp, - int options, - ) { - return __objc_msgSend_791( - obj, - sel, - unitFlags, - startingDateComp, - resultDateComp, - options, - ); - } - - late final __objc_msgSend_791Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_791 = __objc_msgSend_791Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - int)>(); - - late final _sel_dateByAddingUnit_value_toDate_options_1 = - _registerName1("dateByAddingUnit:value:toDate:options:"); - ffi.Pointer _objc_msgSend_792( - ffi.Pointer obj, - ffi.Pointer sel, - int unit, - int value, - ffi.Pointer date, - int options, - ) { - return __objc_msgSend_792( - obj, - sel, - unit, - value, - date, - options, - ); - } - - late final __objc_msgSend_792Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Long, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_792 = __objc_msgSend_792Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer, int)>(); - - late final _sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_1 = - _registerName1( - "enumerateDatesStartingAfterDate:matchingComponents:options:usingBlock:"); - void _objc_msgSend_793( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer start, - ffi.Pointer comps, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_793( - obj, - sel, - start, - comps, - opts, - block, - ); - } - - late final __objc_msgSend_793Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_793 = __objc_msgSend_793Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_nextDateAfterDate_matchingComponents_options_1 = - _registerName1("nextDateAfterDate:matchingComponents:options:"); - ffi.Pointer _objc_msgSend_794( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, - ffi.Pointer comps, - int options, - ) { - return __objc_msgSend_794( - obj, - sel, - date, - comps, - options, - ); - } - - late final __objc_msgSend_794Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_794 = __objc_msgSend_794Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); - - late final _sel_nextDateAfterDate_matchingUnit_value_options_1 = - _registerName1("nextDateAfterDate:matchingUnit:value:options:"); - ffi.Pointer _objc_msgSend_795( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, - int unit, - int value, - int options, - ) { - return __objc_msgSend_795( - obj, - sel, - date, - unit, - value, - options, - ); - } - - late final __objc_msgSend_795Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Long, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_795 = __objc_msgSend_795Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, int, int)>(); - - late final _sel_nextDateAfterDate_matchingHour_minute_second_options_1 = - _registerName1("nextDateAfterDate:matchingHour:minute:second:options:"); - ffi.Pointer _objc_msgSend_796( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, - int hourValue, - int minuteValue, - int secondValue, - int options, - ) { - return __objc_msgSend_796( - obj, - sel, - date, - hourValue, - minuteValue, - secondValue, - options, - ); - } - - late final __objc_msgSend_796Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_796 = __objc_msgSend_796Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, int, int, int)>(); - - late final _sel_dateBySettingUnit_value_ofDate_options_1 = - _registerName1("dateBySettingUnit:value:ofDate:options:"); - late final _sel_dateBySettingHour_minute_second_ofDate_options_1 = - _registerName1("dateBySettingHour:minute:second:ofDate:options:"); - ffi.Pointer _objc_msgSend_797( - ffi.Pointer obj, - ffi.Pointer sel, - int h, - int m, - int s, - ffi.Pointer date, - int opts, - ) { - return __objc_msgSend_797( - obj, - sel, - h, - m, - s, - date, - opts, - ); - } - - late final __objc_msgSend_797Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_797 = __objc_msgSend_797Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, int, int, ffi.Pointer, int)>(); - - late final _sel_date_matchesComponents_1 = - _registerName1("date:matchesComponents:"); - bool _objc_msgSend_798( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, - ffi.Pointer components, - ) { - return __objc_msgSend_798( - obj, - sel, - date, - components, - ); - } - - late final __objc_msgSend_798Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_798 = __objc_msgSend_798Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - void _objc_msgSend_799( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_799( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_799Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_799 = __objc_msgSend_799Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_isLenient1 = _registerName1("isLenient"); - late final _sel_setLenient_1 = _registerName1("setLenient:"); - late final _sel_twoDigitStartDate1 = _registerName1("twoDigitStartDate"); - late final _sel_setTwoDigitStartDate_1 = - _registerName1("setTwoDigitStartDate:"); - void _objc_msgSend_800( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_800( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_800Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_800 = __objc_msgSend_800Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_defaultDate1 = _registerName1("defaultDate"); - late final _sel_setDefaultDate_1 = _registerName1("setDefaultDate:"); - late final _sel_setEraSymbols_1 = _registerName1("setEraSymbols:"); - void _objc_msgSend_801( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_801( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_801Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_801 = __objc_msgSend_801Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_setMonthSymbols_1 = _registerName1("setMonthSymbols:"); - late final _sel_setShortMonthSymbols_1 = - _registerName1("setShortMonthSymbols:"); - late final _sel_setWeekdaySymbols_1 = _registerName1("setWeekdaySymbols:"); - late final _sel_setShortWeekdaySymbols_1 = - _registerName1("setShortWeekdaySymbols:"); - late final _sel_setAMSymbol_1 = _registerName1("setAMSymbol:"); - late final _sel_setPMSymbol_1 = _registerName1("setPMSymbol:"); - late final _sel_setLongEraSymbols_1 = _registerName1("setLongEraSymbols:"); - late final _sel_setVeryShortMonthSymbols_1 = - _registerName1("setVeryShortMonthSymbols:"); - late final _sel_setStandaloneMonthSymbols_1 = - _registerName1("setStandaloneMonthSymbols:"); - late final _sel_setShortStandaloneMonthSymbols_1 = - _registerName1("setShortStandaloneMonthSymbols:"); - late final _sel_setVeryShortStandaloneMonthSymbols_1 = - _registerName1("setVeryShortStandaloneMonthSymbols:"); - late final _sel_setVeryShortWeekdaySymbols_1 = - _registerName1("setVeryShortWeekdaySymbols:"); - late final _sel_setStandaloneWeekdaySymbols_1 = - _registerName1("setStandaloneWeekdaySymbols:"); - late final _sel_setShortStandaloneWeekdaySymbols_1 = - _registerName1("setShortStandaloneWeekdaySymbols:"); - late final _sel_setVeryShortStandaloneWeekdaySymbols_1 = - _registerName1("setVeryShortStandaloneWeekdaySymbols:"); - late final _sel_setQuarterSymbols_1 = _registerName1("setQuarterSymbols:"); - late final _sel_setShortQuarterSymbols_1 = - _registerName1("setShortQuarterSymbols:"); - late final _sel_setStandaloneQuarterSymbols_1 = - _registerName1("setStandaloneQuarterSymbols:"); - late final _sel_setShortStandaloneQuarterSymbols_1 = - _registerName1("setShortStandaloneQuarterSymbols:"); - late final _sel_gregorianStartDate1 = _registerName1("gregorianStartDate"); - late final _sel_setGregorianStartDate_1 = - _registerName1("setGregorianStartDate:"); - late final _sel_doesRelativeDateFormatting1 = - _registerName1("doesRelativeDateFormatting"); - late final _sel_setDoesRelativeDateFormatting_1 = - _registerName1("setDoesRelativeDateFormatting:"); - late final _sel_initWithDateFormat_allowNaturalLanguage_1 = - _registerName1("initWithDateFormat:allowNaturalLanguage:"); - late final _sel_allowsNaturalLanguage1 = - _registerName1("allowsNaturalLanguage"); - late final _class_NSNumberFormatter1 = _getClass1("NSNumberFormatter"); - late final _sel_stringFromNumber_1 = _registerName1("stringFromNumber:"); - ffi.Pointer _objc_msgSend_802( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer number, - ) { - return __objc_msgSend_802( - obj, - sel, - number, - ); - } - - late final __objc_msgSend_802Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_802 = __objc_msgSend_802Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_numberFromString_1 = _registerName1("numberFromString:"); - ffi.Pointer _objc_msgSend_803( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - ) { - return __objc_msgSend_803( - obj, - sel, - string, - ); - } - - late final __objc_msgSend_803Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_803 = __objc_msgSend_803Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_localizedStringFromNumber_numberStyle_1 = - _registerName1("localizedStringFromNumber:numberStyle:"); - ffi.Pointer _objc_msgSend_804( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer num, - int nstyle, - ) { - return __objc_msgSend_804( - obj, - sel, - num, - nstyle, - ); - } - - late final __objc_msgSend_804Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_804 = __objc_msgSend_804Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - int _objc_msgSend_805( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_805( - obj, - sel, - ); - } - - late final __objc_msgSend_805Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_805 = __objc_msgSend_805Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - void _objc_msgSend_806( - ffi.Pointer obj, - ffi.Pointer sel, - int behavior, - ) { - return __objc_msgSend_806( - obj, - sel, - behavior, - ); - } - - late final __objc_msgSend_806Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_806 = __objc_msgSend_806Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_numberStyle1 = _registerName1("numberStyle"); - int _objc_msgSend_807( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_807( - obj, - sel, - ); - } - - late final __objc_msgSend_807Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_807 = __objc_msgSend_807Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setNumberStyle_1 = _registerName1("setNumberStyle:"); - void _objc_msgSend_808( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_808( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_808Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_808 = __objc_msgSend_808Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_generatesDecimalNumbers1 = - _registerName1("generatesDecimalNumbers"); - late final _sel_setGeneratesDecimalNumbers_1 = - _registerName1("setGeneratesDecimalNumbers:"); - void _objc_msgSend_809( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_809( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_809Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_809 = __objc_msgSend_809Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_negativeFormat1 = _registerName1("negativeFormat"); - late final _sel_setNegativeFormat_1 = _registerName1("setNegativeFormat:"); - late final _sel_textAttributesForNegativeValues1 = - _registerName1("textAttributesForNegativeValues"); - late final _sel_setTextAttributesForNegativeValues_1 = - _registerName1("setTextAttributesForNegativeValues:"); - late final _sel_positiveFormat1 = _registerName1("positiveFormat"); - late final _sel_setPositiveFormat_1 = _registerName1("setPositiveFormat:"); - late final _sel_textAttributesForPositiveValues1 = - _registerName1("textAttributesForPositiveValues"); - late final _sel_setTextAttributesForPositiveValues_1 = - _registerName1("setTextAttributesForPositiveValues:"); - late final _sel_allowsFloats1 = _registerName1("allowsFloats"); - late final _sel_setAllowsFloats_1 = _registerName1("setAllowsFloats:"); - late final _sel_setDecimalSeparator_1 = - _registerName1("setDecimalSeparator:"); - late final _sel_alwaysShowsDecimalSeparator1 = - _registerName1("alwaysShowsDecimalSeparator"); - late final _sel_setAlwaysShowsDecimalSeparator_1 = - _registerName1("setAlwaysShowsDecimalSeparator:"); - late final _sel_currencyDecimalSeparator1 = - _registerName1("currencyDecimalSeparator"); - late final _sel_setCurrencyDecimalSeparator_1 = - _registerName1("setCurrencyDecimalSeparator:"); - late final _sel_usesGroupingSeparator1 = - _registerName1("usesGroupingSeparator"); - late final _sel_setUsesGroupingSeparator_1 = - _registerName1("setUsesGroupingSeparator:"); - late final _sel_setGroupingSeparator_1 = - _registerName1("setGroupingSeparator:"); - late final _sel_zeroSymbol1 = _registerName1("zeroSymbol"); - late final _sel_setZeroSymbol_1 = _registerName1("setZeroSymbol:"); - late final _sel_textAttributesForZero1 = - _registerName1("textAttributesForZero"); - late final _sel_setTextAttributesForZero_1 = - _registerName1("setTextAttributesForZero:"); - late final _sel_nilSymbol1 = _registerName1("nilSymbol"); - late final _sel_setNilSymbol_1 = _registerName1("setNilSymbol:"); - late final _sel_textAttributesForNil1 = - _registerName1("textAttributesForNil"); - late final _sel_setTextAttributesForNil_1 = - _registerName1("setTextAttributesForNil:"); - late final _sel_notANumberSymbol1 = _registerName1("notANumberSymbol"); - late final _sel_setNotANumberSymbol_1 = - _registerName1("setNotANumberSymbol:"); - late final _sel_textAttributesForNotANumber1 = - _registerName1("textAttributesForNotANumber"); - late final _sel_setTextAttributesForNotANumber_1 = - _registerName1("setTextAttributesForNotANumber:"); - late final _sel_positiveInfinitySymbol1 = - _registerName1("positiveInfinitySymbol"); - late final _sel_setPositiveInfinitySymbol_1 = - _registerName1("setPositiveInfinitySymbol:"); - late final _sel_textAttributesForPositiveInfinity1 = - _registerName1("textAttributesForPositiveInfinity"); - late final _sel_setTextAttributesForPositiveInfinity_1 = - _registerName1("setTextAttributesForPositiveInfinity:"); - late final _sel_negativeInfinitySymbol1 = - _registerName1("negativeInfinitySymbol"); - late final _sel_setNegativeInfinitySymbol_1 = - _registerName1("setNegativeInfinitySymbol:"); - late final _sel_textAttributesForNegativeInfinity1 = - _registerName1("textAttributesForNegativeInfinity"); - late final _sel_setTextAttributesForNegativeInfinity_1 = - _registerName1("setTextAttributesForNegativeInfinity:"); - late final _sel_positivePrefix1 = _registerName1("positivePrefix"); - late final _sel_setPositivePrefix_1 = _registerName1("setPositivePrefix:"); - late final _sel_positiveSuffix1 = _registerName1("positiveSuffix"); - late final _sel_setPositiveSuffix_1 = _registerName1("setPositiveSuffix:"); - late final _sel_negativePrefix1 = _registerName1("negativePrefix"); - late final _sel_setNegativePrefix_1 = _registerName1("setNegativePrefix:"); - late final _sel_negativeSuffix1 = _registerName1("negativeSuffix"); - late final _sel_setNegativeSuffix_1 = _registerName1("setNegativeSuffix:"); - late final _sel_setCurrencyCode_1 = _registerName1("setCurrencyCode:"); - late final _sel_setCurrencySymbol_1 = _registerName1("setCurrencySymbol:"); - late final _sel_internationalCurrencySymbol1 = - _registerName1("internationalCurrencySymbol"); - late final _sel_setInternationalCurrencySymbol_1 = - _registerName1("setInternationalCurrencySymbol:"); - late final _sel_percentSymbol1 = _registerName1("percentSymbol"); - late final _sel_setPercentSymbol_1 = _registerName1("setPercentSymbol:"); - late final _sel_perMillSymbol1 = _registerName1("perMillSymbol"); - late final _sel_setPerMillSymbol_1 = _registerName1("setPerMillSymbol:"); - late final _sel_minusSign1 = _registerName1("minusSign"); - late final _sel_setMinusSign_1 = _registerName1("setMinusSign:"); - late final _sel_plusSign1 = _registerName1("plusSign"); - late final _sel_setPlusSign_1 = _registerName1("setPlusSign:"); - late final _sel_exponentSymbol1 = _registerName1("exponentSymbol"); - late final _sel_setExponentSymbol_1 = _registerName1("setExponentSymbol:"); - late final _sel_groupingSize1 = _registerName1("groupingSize"); - late final _sel_setGroupingSize_1 = _registerName1("setGroupingSize:"); - late final _sel_secondaryGroupingSize1 = - _registerName1("secondaryGroupingSize"); - late final _sel_setSecondaryGroupingSize_1 = - _registerName1("setSecondaryGroupingSize:"); - late final _sel_multiplier1 = _registerName1("multiplier"); - late final _sel_setMultiplier_1 = _registerName1("setMultiplier:"); - late final _sel_formatWidth1 = _registerName1("formatWidth"); - late final _sel_setFormatWidth_1 = _registerName1("setFormatWidth:"); - late final _sel_paddingCharacter1 = _registerName1("paddingCharacter"); - late final _sel_setPaddingCharacter_1 = - _registerName1("setPaddingCharacter:"); - late final _sel_paddingPosition1 = _registerName1("paddingPosition"); - int _objc_msgSend_810( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_810( - obj, - sel, - ); - } - - late final __objc_msgSend_810Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_810 = __objc_msgSend_810Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setPaddingPosition_1 = _registerName1("setPaddingPosition:"); - void _objc_msgSend_811( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_811( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_811Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_811 = __objc_msgSend_811Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_roundingMode1 = _registerName1("roundingMode"); - int _objc_msgSend_812( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_812( - obj, - sel, - ); - } - - late final __objc_msgSend_812Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_812 = __objc_msgSend_812Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setRoundingMode_1 = _registerName1("setRoundingMode:"); - void _objc_msgSend_813( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_813( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_813Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_813 = __objc_msgSend_813Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_roundingIncrement1 = _registerName1("roundingIncrement"); - ffi.Pointer _objc_msgSend_814( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_814( - obj, - sel, - ); - } - - late final __objc_msgSend_814Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_814 = __objc_msgSend_814Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setRoundingIncrement_1 = - _registerName1("setRoundingIncrement:"); - void _objc_msgSend_815( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_815( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_815Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_815 = __objc_msgSend_815Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_minimumIntegerDigits1 = - _registerName1("minimumIntegerDigits"); - late final _sel_setMinimumIntegerDigits_1 = - _registerName1("setMinimumIntegerDigits:"); - late final _sel_maximumIntegerDigits1 = - _registerName1("maximumIntegerDigits"); - late final _sel_setMaximumIntegerDigits_1 = - _registerName1("setMaximumIntegerDigits:"); - late final _sel_minimumFractionDigits1 = - _registerName1("minimumFractionDigits"); - late final _sel_setMinimumFractionDigits_1 = - _registerName1("setMinimumFractionDigits:"); - late final _sel_maximumFractionDigits1 = - _registerName1("maximumFractionDigits"); - late final _sel_setMaximumFractionDigits_1 = - _registerName1("setMaximumFractionDigits:"); - late final _sel_minimum1 = _registerName1("minimum"); - late final _sel_setMinimum_1 = _registerName1("setMinimum:"); - late final _sel_maximum1 = _registerName1("maximum"); - late final _sel_setMaximum_1 = _registerName1("setMaximum:"); - late final _sel_currencyGroupingSeparator1 = - _registerName1("currencyGroupingSeparator"); - late final _sel_setCurrencyGroupingSeparator_1 = - _registerName1("setCurrencyGroupingSeparator:"); - late final _sel_usesSignificantDigits1 = - _registerName1("usesSignificantDigits"); - late final _sel_setUsesSignificantDigits_1 = - _registerName1("setUsesSignificantDigits:"); - late final _sel_minimumSignificantDigits1 = - _registerName1("minimumSignificantDigits"); - late final _sel_setMinimumSignificantDigits_1 = - _registerName1("setMinimumSignificantDigits:"); - late final _sel_maximumSignificantDigits1 = - _registerName1("maximumSignificantDigits"); - late final _sel_setMaximumSignificantDigits_1 = - _registerName1("setMaximumSignificantDigits:"); - late final _sel_isPartialStringValidationEnabled1 = - _registerName1("isPartialStringValidationEnabled"); - late final _sel_setPartialStringValidationEnabled_1 = - _registerName1("setPartialStringValidationEnabled:"); - late final _sel_hasThousandSeparators1 = - _registerName1("hasThousandSeparators"); - late final _sel_setHasThousandSeparators_1 = - _registerName1("setHasThousandSeparators:"); - late final _sel_thousandSeparator1 = _registerName1("thousandSeparator"); - late final _sel_setThousandSeparator_1 = - _registerName1("setThousandSeparator:"); - late final _sel_localizesFormat1 = _registerName1("localizesFormat"); - late final _sel_setLocalizesFormat_1 = _registerName1("setLocalizesFormat:"); - late final _sel_format1 = _registerName1("format"); - late final _sel_setFormat_1 = _registerName1("setFormat:"); - late final _sel_attributedStringForZero1 = - _registerName1("attributedStringForZero"); - late final _sel_setAttributedStringForZero_1 = - _registerName1("setAttributedStringForZero:"); - void _objc_msgSend_816( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_816( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_816Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_816 = __objc_msgSend_816Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_attributedStringForNil1 = - _registerName1("attributedStringForNil"); - late final _sel_setAttributedStringForNil_1 = - _registerName1("setAttributedStringForNil:"); - late final _sel_attributedStringForNotANumber1 = - _registerName1("attributedStringForNotANumber"); - late final _sel_setAttributedStringForNotANumber_1 = - _registerName1("setAttributedStringForNotANumber:"); - late final _class_NSDecimalNumberHandler1 = - _getClass1("NSDecimalNumberHandler"); - late final _sel_defaultDecimalNumberHandler1 = - _registerName1("defaultDecimalNumberHandler"); - ffi.Pointer _objc_msgSend_817( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_817( - obj, - sel, - ); - } - - late final __objc_msgSend_817Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_817 = __objc_msgSend_817Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_1 = - _registerName1( - "initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:"); - instancetype _objc_msgSend_818( - ffi.Pointer obj, - ffi.Pointer sel, - int roundingMode, - int scale, - bool exact, - bool overflow, - bool underflow, - bool divideByZero, - ) { - return __objc_msgSend_818( - obj, - sel, - roundingMode, - scale, - exact, - overflow, - underflow, - divideByZero, - ); - } - - late final __objc_msgSend_818Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Short, - ffi.Bool, - ffi.Bool, - ffi.Bool, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_818 = __objc_msgSend_818Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - int, bool, bool, bool, bool)>(); - - late final _sel_decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_1 = - _registerName1( - "decimalNumberHandlerWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:"); - late final _sel_roundingBehavior1 = _registerName1("roundingBehavior"); - late final _sel_setRoundingBehavior_1 = - _registerName1("setRoundingBehavior:"); - void _objc_msgSend_819( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_819( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_819Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_819 = __objc_msgSend_819Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSScanner1 = _getClass1("NSScanner"); - late final _sel_scanLocation1 = _registerName1("scanLocation"); - late final _sel_setScanLocation_1 = _registerName1("setScanLocation:"); - late final _sel_charactersToBeSkipped1 = - _registerName1("charactersToBeSkipped"); - ffi.Pointer _objc_msgSend_820( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_820( - obj, - sel, - ); - } - - late final __objc_msgSend_820Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_820 = __objc_msgSend_820Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setCharactersToBeSkipped_1 = - _registerName1("setCharactersToBeSkipped:"); - void _objc_msgSend_821( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_821( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_821Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_821 = __objc_msgSend_821Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_caseSensitive1 = _registerName1("caseSensitive"); - late final _sel_setCaseSensitive_1 = _registerName1("setCaseSensitive:"); - late final _sel_scanInt_1 = _registerName1("scanInt:"); - bool _objc_msgSend_822( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer result, - ) { - return __objc_msgSend_822( - obj, - sel, - result, - ); - } - - late final __objc_msgSend_822Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_822 = __objc_msgSend_822Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_scanInteger_1 = _registerName1("scanInteger:"); - bool _objc_msgSend_823( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer result, - ) { - return __objc_msgSend_823( - obj, - sel, - result, - ); - } - - late final __objc_msgSend_823Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_823 = __objc_msgSend_823Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_scanLongLong_1 = _registerName1("scanLongLong:"); - bool _objc_msgSend_824( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer result, - ) { - return __objc_msgSend_824( - obj, - sel, - result, - ); - } - - late final __objc_msgSend_824Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_824 = __objc_msgSend_824Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_scanUnsignedLongLong_1 = - _registerName1("scanUnsignedLongLong:"); - bool _objc_msgSend_825( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer result, - ) { - return __objc_msgSend_825( - obj, - sel, - result, - ); - } - - late final __objc_msgSend_825Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_825 = __objc_msgSend_825Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_scanFloat_1 = _registerName1("scanFloat:"); - bool _objc_msgSend_826( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer result, - ) { - return __objc_msgSend_826( - obj, - sel, - result, - ); - } - - late final __objc_msgSend_826Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_826 = __objc_msgSend_826Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_scanDouble_1 = _registerName1("scanDouble:"); - bool _objc_msgSend_827( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer result, - ) { - return __objc_msgSend_827( - obj, - sel, - result, - ); - } - - late final __objc_msgSend_827Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_827 = __objc_msgSend_827Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_scanHexInt_1 = _registerName1("scanHexInt:"); - bool _objc_msgSend_828( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer result, - ) { - return __objc_msgSend_828( - obj, - sel, - result, - ); - } - - late final __objc_msgSend_828Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_828 = __objc_msgSend_828Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_scanHexLongLong_1 = _registerName1("scanHexLongLong:"); - late final _sel_scanHexFloat_1 = _registerName1("scanHexFloat:"); - late final _sel_scanHexDouble_1 = _registerName1("scanHexDouble:"); - late final _sel_scanString_intoString_1 = - _registerName1("scanString:intoString:"); - bool _objc_msgSend_829( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - ffi.Pointer> result, - ) { - return __objc_msgSend_829( - obj, - sel, - string, - result, - ); - } - - late final __objc_msgSend_829Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_829 = __objc_msgSend_829Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_scanCharactersFromSet_intoString_1 = - _registerName1("scanCharactersFromSet:intoString:"); - bool _objc_msgSend_830( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer set1, - ffi.Pointer> result, - ) { - return __objc_msgSend_830( - obj, - sel, - set1, - result, - ); - } - - late final __objc_msgSend_830Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_830 = __objc_msgSend_830Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_scanUpToString_intoString_1 = - _registerName1("scanUpToString:intoString:"); - late final _sel_scanUpToCharactersFromSet_intoString_1 = - _registerName1("scanUpToCharactersFromSet:intoString:"); - late final _sel_isAtEnd1 = _registerName1("isAtEnd"); - late final _sel_scannerWithString_1 = _registerName1("scannerWithString:"); - late final _sel_localizedScannerWithString_1 = - _registerName1("localizedScannerWithString:"); - late final _sel_scanDecimal_1 = _registerName1("scanDecimal:"); - bool _objc_msgSend_831( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer dcm, - ) { - return __objc_msgSend_831( - obj, - sel, - dcm, - ); - } - - late final __objc_msgSend_831Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_831 = __objc_msgSend_831Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSException1 = _getClass1("NSException"); - late final _sel_exceptionWithName_reason_userInfo_1 = - _registerName1("exceptionWithName:reason:userInfo:"); - ffi.Pointer _objc_msgSend_832( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer reason, - ffi.Pointer userInfo, - ) { - return __objc_msgSend_832( - obj, - sel, - name, - reason, - userInfo, - ); - } - - late final __objc_msgSend_832Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_832 = __objc_msgSend_832Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithName_reason_userInfo_1 = - _registerName1("initWithName:reason:userInfo:"); - instancetype _objc_msgSend_833( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aName, - ffi.Pointer aReason, - ffi.Pointer aUserInfo, - ) { - return __objc_msgSend_833( - obj, - sel, - aName, - aReason, - aUserInfo, - ); - } - - late final __objc_msgSend_833Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_833 = __objc_msgSend_833Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_reason1 = _registerName1("reason"); - 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_834( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer format, - ffi.Pointer<__va_list_tag> argList, - ) { - return __objc_msgSend_834( - obj, - sel, - name, - format, - argList, - ); - } - - late final __objc_msgSend_834Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>('objc_msgSend'); - late final __objc_msgSend_834 = __objc_msgSend_834Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>(); - - late final _class_NSFileHandle1 = _getClass1("NSFileHandle"); - late final _sel_availableData1 = _registerName1("availableData"); - late final _sel_initWithFileDescriptor_closeOnDealloc_1 = - _registerName1("initWithFileDescriptor:closeOnDealloc:"); - instancetype _objc_msgSend_835( - ffi.Pointer obj, - ffi.Pointer sel, - int fd, - bool closeopt, - ) { - return __objc_msgSend_835( - obj, - sel, - fd, - closeopt, - ); - } - - late final __objc_msgSend_835Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Int, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_835 = __objc_msgSend_835Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, int, bool)>(); - - late final _sel_readDataToEndOfFileAndReturnError_1 = - _registerName1("readDataToEndOfFileAndReturnError:"); - ffi.Pointer _objc_msgSend_836( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> error, - ) { - return __objc_msgSend_836( - obj, - sel, - error, - ); - } - - late final __objc_msgSend_836Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_836 = __objc_msgSend_836Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_readDataUpToLength_error_1 = - _registerName1("readDataUpToLength:error:"); - ffi.Pointer _objc_msgSend_837( - ffi.Pointer obj, - ffi.Pointer sel, - int length, - ffi.Pointer> error, - ) { - return __objc_msgSend_837( - obj, - sel, - length, - error, - ); - } - - late final __objc_msgSend_837Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_837 = __objc_msgSend_837Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer>)>(); - - late final _sel_writeData_error_1 = _registerName1("writeData:error:"); - bool _objc_msgSend_838( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer> error, - ) { - return __objc_msgSend_838( - obj, - sel, - data, - error, - ); - } - - late final __objc_msgSend_838Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_838 = __objc_msgSend_838Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_getOffset_error_1 = _registerName1("getOffset:error:"); - bool _objc_msgSend_839( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer offsetInFile, - ffi.Pointer> error, - ) { - return __objc_msgSend_839( - obj, - sel, - offsetInFile, - error, - ); - } - - late final __objc_msgSend_839Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_839 = __objc_msgSend_839Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_seekToEndReturningOffset_error_1 = - _registerName1("seekToEndReturningOffset:error:"); - late final _sel_seekToOffset_error_1 = _registerName1("seekToOffset:error:"); - bool _objc_msgSend_840( - ffi.Pointer obj, - ffi.Pointer sel, - int offset, - ffi.Pointer> error, - ) { - return __objc_msgSend_840( - obj, - sel, - offset, - error, - ); - } - - late final __objc_msgSend_840Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLongLong, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_840 = __objc_msgSend_840Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer>)>(); - - late final _sel_truncateAtOffset_error_1 = - _registerName1("truncateAtOffset:error:"); - late final _sel_synchronizeAndReturnError_1 = - _registerName1("synchronizeAndReturnError:"); - late final _sel_closeAndReturnError_1 = - _registerName1("closeAndReturnError:"); - late final _sel_fileHandleWithStandardInput1 = - _registerName1("fileHandleWithStandardInput"); - ffi.Pointer _objc_msgSend_841( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_841( - obj, - sel, - ); - } - - late final __objc_msgSend_841Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_841 = __objc_msgSend_841Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_fileHandleWithStandardOutput1 = - _registerName1("fileHandleWithStandardOutput"); - late final _sel_fileHandleWithStandardError1 = - _registerName1("fileHandleWithStandardError"); - late final _sel_fileHandleWithNullDevice1 = - _registerName1("fileHandleWithNullDevice"); - late final _sel_fileHandleForReadingAtPath_1 = - _registerName1("fileHandleForReadingAtPath:"); - late final _sel_fileHandleForWritingAtPath_1 = - _registerName1("fileHandleForWritingAtPath:"); - late final _sel_fileHandleForUpdatingAtPath_1 = - _registerName1("fileHandleForUpdatingAtPath:"); - late final _sel_fileHandleForReadingFromURL_error_1 = - _registerName1("fileHandleForReadingFromURL:error:"); - instancetype _objc_msgSend_842( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> error, - ) { - return __objc_msgSend_842( - obj, - sel, - url, - error, - ); - } - - late final __objc_msgSend_842Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_842 = __objc_msgSend_842Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_fileHandleForWritingToURL_error_1 = - _registerName1("fileHandleForWritingToURL:error:"); - late final _sel_fileHandleForUpdatingURL_error_1 = - _registerName1("fileHandleForUpdatingURL:error:"); - late final _sel_readInBackgroundAndNotifyForModes_1 = - _registerName1("readInBackgroundAndNotifyForModes:"); - void _objc_msgSend_843( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer modes, - ) { - return __objc_msgSend_843( - obj, - sel, - modes, - ); - } - - late final __objc_msgSend_843Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_843 = __objc_msgSend_843Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_readInBackgroundAndNotify1 = - _registerName1("readInBackgroundAndNotify"); - late final _sel_readToEndOfFileInBackgroundAndNotifyForModes_1 = - _registerName1("readToEndOfFileInBackgroundAndNotifyForModes:"); - late final _sel_readToEndOfFileInBackgroundAndNotify1 = - _registerName1("readToEndOfFileInBackgroundAndNotify"); - late final _sel_acceptConnectionInBackgroundAndNotifyForModes_1 = - _registerName1("acceptConnectionInBackgroundAndNotifyForModes:"); - late final _sel_acceptConnectionInBackgroundAndNotify1 = - _registerName1("acceptConnectionInBackgroundAndNotify"); - late final _sel_waitForDataInBackgroundAndNotifyForModes_1 = - _registerName1("waitForDataInBackgroundAndNotifyForModes:"); - late final _sel_waitForDataInBackgroundAndNotify1 = - _registerName1("waitForDataInBackgroundAndNotify"); - late final _sel_readabilityHandler1 = _registerName1("readabilityHandler"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_844( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_844( - obj, - sel, - ); - } - - late final __objc_msgSend_844Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_844 = __objc_msgSend_844Ptr.asFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setReadabilityHandler_1 = - _registerName1("setReadabilityHandler:"); - void _objc_msgSend_845( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> value, - ) { - return __objc_msgSend_845( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_845Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_845 = __objc_msgSend_845Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_writeabilityHandler1 = _registerName1("writeabilityHandler"); - late final _sel_setWriteabilityHandler_1 = - _registerName1("setWriteabilityHandler:"); - late final _sel_initWithFileDescriptor_1 = - _registerName1("initWithFileDescriptor:"); - instancetype _objc_msgSend_846( - ffi.Pointer obj, - ffi.Pointer sel, - int fd, - ) { - return __objc_msgSend_846( - obj, - sel, - fd, - ); - } - - late final __objc_msgSend_846Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Int)>>('objc_msgSend'); - late final __objc_msgSend_846 = __objc_msgSend_846Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_fileDescriptor1 = _registerName1("fileDescriptor"); - late final _sel_readDataToEndOfFile1 = _registerName1("readDataToEndOfFile"); - late final _sel_readDataOfLength_1 = _registerName1("readDataOfLength:"); - ffi.Pointer _objc_msgSend_847( - ffi.Pointer obj, - ffi.Pointer sel, - int length, - ) { - return __objc_msgSend_847( - obj, - sel, - length, - ); - } - - late final __objc_msgSend_847Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_847 = __objc_msgSend_847Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_offsetInFile1 = _registerName1("offsetInFile"); - late final _sel_seekToEndOfFile1 = _registerName1("seekToEndOfFile"); - late final _sel_seekToFileOffset_1 = _registerName1("seekToFileOffset:"); - void _objc_msgSend_848( - ffi.Pointer obj, - ffi.Pointer sel, - int offset, - ) { - return __objc_msgSend_848( - obj, - sel, - offset, - ); - } - - late final __objc_msgSend_848Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLongLong)>>('objc_msgSend'); - late final __objc_msgSend_848 = __objc_msgSend_848Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_truncateFileAtOffset_1 = - _registerName1("truncateFileAtOffset:"); - late final _sel_synchronizeFile1 = _registerName1("synchronizeFile"); - late final _sel_closeFile1 = _registerName1("closeFile"); - late final _class_NSHTTPCookieStorage1 = _getClass1("NSHTTPCookieStorage"); - late final _sel_sharedHTTPCookieStorage1 = - _registerName1("sharedHTTPCookieStorage"); - ffi.Pointer _objc_msgSend_849( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_849( - obj, - sel, - ); - } - - late final __objc_msgSend_849Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_849 = __objc_msgSend_849Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_sharedCookieStorageForGroupContainerIdentifier_1 = - _registerName1("sharedCookieStorageForGroupContainerIdentifier:"); - ffi.Pointer _objc_msgSend_850( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer identifier, - ) { - return __objc_msgSend_850( - obj, - sel, - identifier, - ); - } - - late final __objc_msgSend_850Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_850 = __objc_msgSend_850Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_cookies1 = _registerName1("cookies"); - late final _class_NSHTTPCookie1 = _getClass1("NSHTTPCookie"); - late final _sel_initWithProperties_1 = _registerName1("initWithProperties:"); - instancetype _objc_msgSend_851( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer properties, - ) { - return __objc_msgSend_851( - obj, - sel, - properties, - ); - } - - late final __objc_msgSend_851Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_851 = __objc_msgSend_851Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_cookieWithProperties_1 = - _registerName1("cookieWithProperties:"); - ffi.Pointer _objc_msgSend_852( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer properties, - ) { - return __objc_msgSend_852( - obj, - sel, - properties, - ); - } - - late final __objc_msgSend_852Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_852 = __objc_msgSend_852Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_requestHeaderFieldsWithCookies_1 = - _registerName1("requestHeaderFieldsWithCookies:"); - late final _sel_cookiesWithResponseHeaderFields_forURL_1 = - _registerName1("cookiesWithResponseHeaderFields:forURL:"); - ffi.Pointer _objc_msgSend_853( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer headerFields, - ffi.Pointer URL, - ) { - return __objc_msgSend_853( - obj, - sel, - headerFields, - URL, - ); - } - - late final __objc_msgSend_853Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_853 = __objc_msgSend_853Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_properties1 = _registerName1("properties"); - late final _sel_value1 = _registerName1("value"); - late final _sel_expiresDate1 = _registerName1("expiresDate"); - late final _sel_isSessionOnly1 = _registerName1("isSessionOnly"); - late final _sel_isSecure1 = _registerName1("isSecure"); - late final _sel_isHTTPOnly1 = _registerName1("isHTTPOnly"); - late final _sel_comment1 = _registerName1("comment"); - late final _sel_commentURL1 = _registerName1("commentURL"); - late final _sel_portList1 = _registerName1("portList"); - late final _sel_sameSitePolicy1 = _registerName1("sameSitePolicy"); - late final _sel_setCookie_1 = _registerName1("setCookie:"); - void _objc_msgSend_854( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cookie, - ) { - return __objc_msgSend_854( - obj, - sel, - cookie, - ); - } - - late final __objc_msgSend_854Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_854 = __objc_msgSend_854Ptr.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_855( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cookies, - ffi.Pointer URL, - ffi.Pointer mainDocumentURL, - ) { - return __objc_msgSend_855( - obj, - sel, - cookies, - URL, - mainDocumentURL, - ); - } - - late final __objc_msgSend_855Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_855 = __objc_msgSend_855Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_cookieAcceptPolicy1 = _registerName1("cookieAcceptPolicy"); - int _objc_msgSend_856( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_856( - obj, - sel, - ); - } - - late final __objc_msgSend_856Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_856 = __objc_msgSend_856Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setCookieAcceptPolicy_1 = - _registerName1("setCookieAcceptPolicy:"); - void _objc_msgSend_857( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_857( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_857Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_857 = __objc_msgSend_857Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_sortedCookiesUsingDescriptors_1 = - _registerName1("sortedCookiesUsingDescriptors:"); - late final _class_NSURLSessionTask1 = _getClass1("NSURLSessionTask"); - late final _sel_taskIdentifier1 = _registerName1("taskIdentifier"); - late final _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_858( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer URL, - int cachePolicy, - double timeoutInterval, - ) { - return __objc_msgSend_858( - obj, - sel, - URL, - cachePolicy, - timeoutInterval, - ); - } - - late final __objc_msgSend_858Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_858 = __objc_msgSend_858Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, double)>(); - - 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_859( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_859( - obj, - sel, - ); - } - - late final __objc_msgSend_859Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_859 = __objc_msgSend_859Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_timeoutInterval1 = _registerName1("timeoutInterval"); - late final _sel_mainDocumentURL1 = _registerName1("mainDocumentURL"); - late final _sel_networkServiceType1 = _registerName1("networkServiceType"); - int _objc_msgSend_860( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_860( - obj, - sel, - ); - } - - late final __objc_msgSend_860Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_860 = __objc_msgSend_860Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_allowsCellularAccess1 = - _registerName1("allowsCellularAccess"); - late final _sel_allowsExpensiveNetworkAccess1 = - _registerName1("allowsExpensiveNetworkAccess"); - late final _sel_allowsConstrainedNetworkAccess1 = - _registerName1("allowsConstrainedNetworkAccess"); - late final _sel_assumesHTTP3Capable1 = _registerName1("assumesHTTP3Capable"); - late final _sel_attribution1 = _registerName1("attribution"); - int _objc_msgSend_861( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_861( - obj, - sel, - ); - } - - late final __objc_msgSend_861Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_861 = __objc_msgSend_861Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - 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"); - bool _objc_msgSend_862( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer property, - ffi.Pointer key, - ) { - return __objc_msgSend_862( - obj, - sel, - property, - key, - ); - } - - late final __objc_msgSend_862Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_862 = __objc_msgSend_862Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_streamStatus1 = _registerName1("streamStatus"); - int _objc_msgSend_863( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_863( - obj, - sel, - ); - } - - late final __objc_msgSend_863Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_863 = __objc_msgSend_863Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_streamError1 = _registerName1("streamError"); - late final _class_NSOutputStream1 = _getClass1("NSOutputStream"); - late final _sel_write_maxLength_1 = _registerName1("write:maxLength:"); - int _objc_msgSend_864( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - int len, - ) { - return __objc_msgSend_864( - obj, - sel, - buffer, - len, - ); - } - - late final __objc_msgSend_864Ptr = _lookup< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_864 = __objc_msgSend_864Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_hasSpaceAvailable1 = _registerName1("hasSpaceAvailable"); - late final _sel_initToMemory1 = _registerName1("initToMemory"); - late final _sel_initToBuffer_capacity_1 = - _registerName1("initToBuffer:capacity:"); - instancetype _objc_msgSend_865( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - int capacity, - ) { - return __objc_msgSend_865( - obj, - sel, - buffer, - capacity, - ); - } - - late final __objc_msgSend_865Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_865 = __objc_msgSend_865Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_initWithURL_append_1 = _registerName1("initWithURL:append:"); - instancetype _objc_msgSend_866( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - bool shouldAppend, - ) { - return __objc_msgSend_866( - obj, - sel, - url, - shouldAppend, - ); - } - - late final __objc_msgSend_866Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_866 = __objc_msgSend_866Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_initToFileAtPath_append_1 = - _registerName1("initToFileAtPath:append:"); - late final _sel_outputStreamToMemory1 = - _registerName1("outputStreamToMemory"); - late final _sel_outputStreamToBuffer_capacity_1 = - _registerName1("outputStreamToBuffer:capacity:"); - late final _sel_outputStreamToFileAtPath_append_1 = - _registerName1("outputStreamToFileAtPath:append:"); - late final _sel_outputStreamWithURL_append_1 = - _registerName1("outputStreamWithURL:append:"); - late final _sel_getStreamsToHostWithName_port_inputStream_outputStream_1 = - _registerName1("getStreamsToHostWithName:port:inputStream:outputStream:"); - void _objc_msgSend_867( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer hostname, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream, - ) { - return __objc_msgSend_867( - obj, - sel, - hostname, - port, - inputStream, - outputStream, - ); - } - - late final __objc_msgSend_867Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_867 = __objc_msgSend_867Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _class_NSHost1 = _getClass1("NSHost"); - late final _sel_currentHost1 = _registerName1("currentHost"); - late final _sel_hostWithName_1 = _registerName1("hostWithName:"); - instancetype _objc_msgSend_868( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ) { - return __objc_msgSend_868( - obj, - sel, - name, - ); - } - - late final __objc_msgSend_868Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_868 = __objc_msgSend_868Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_hostWithAddress_1 = _registerName1("hostWithAddress:"); - late final _sel_isEqualToHost_1 = _registerName1("isEqualToHost:"); - bool _objc_msgSend_869( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aHost, - ) { - return __objc_msgSend_869( - obj, - sel, - aHost, - ); - } - - late final __objc_msgSend_869Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_869 = __objc_msgSend_869Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_names1 = _registerName1("names"); - late final _sel_address1 = _registerName1("address"); - late final _sel_addresses1 = _registerName1("addresses"); - late final _sel_localizedName1 = _registerName1("localizedName"); - late final _sel_setHostCacheEnabled_1 = - _registerName1("setHostCacheEnabled:"); - void _objc_msgSend_870( - ffi.Pointer obj, - ffi.Pointer sel, - bool flag, - ) { - return __objc_msgSend_870( - obj, - sel, - flag, - ); - } - - late final __objc_msgSend_870Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_870 = __objc_msgSend_870Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_isHostCacheEnabled1 = _registerName1("isHostCacheEnabled"); - late final _sel_flushHostCache1 = _registerName1("flushHostCache"); - late final _sel_getStreamsToHost_port_inputStream_outputStream_1 = - _registerName1("getStreamsToHost:port:inputStream:outputStream:"); - void _objc_msgSend_871( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer host, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream, - ) { - return __objc_msgSend_871( - obj, - sel, - host, - port, - inputStream, - outputStream, - ); - } - - late final __objc_msgSend_871Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_871 = __objc_msgSend_871Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1 = - _registerName1("getBoundStreamsWithBufferSize:inputStream:outputStream:"); - void _objc_msgSend_872( - ffi.Pointer obj, - ffi.Pointer sel, - int bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream, - ) { - return __objc_msgSend_872( - obj, - sel, - bufferSize, - inputStream, - outputStream, - ); - } - - late final __objc_msgSend_872Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_872 = __objc_msgSend_872Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _sel_read_maxLength_1 = _registerName1("read:maxLength:"); - late final _sel_getBuffer_length_1 = _registerName1("getBuffer:length:"); - bool _objc_msgSend_873( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> buffer, - ffi.Pointer len, - ) { - return __objc_msgSend_873( - obj, - sel, - buffer, - len, - ); - } - - late final __objc_msgSend_873Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_873 = __objc_msgSend_873Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); - - late final _sel_hasBytesAvailable1 = _registerName1("hasBytesAvailable"); - late final _sel_initWithFileAtPath_1 = _registerName1("initWithFileAtPath:"); - late final _sel_inputStreamWithData_1 = - _registerName1("inputStreamWithData:"); - instancetype _objc_msgSend_874( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ) { - return __objc_msgSend_874( - obj, - sel, - data, - ); - } - - late final __objc_msgSend_874Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_874 = __objc_msgSend_874Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_inputStreamWithFileAtPath_1 = - _registerName1("inputStreamWithFileAtPath:"); - late final _sel_inputStreamWithURL_1 = _registerName1("inputStreamWithURL:"); - late final _sel_HTTPBodyStream1 = _registerName1("HTTPBodyStream"); - ffi.Pointer _objc_msgSend_875( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_875( - obj, - sel, - ); - } - - late final __objc_msgSend_875Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_875 = __objc_msgSend_875Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_HTTPShouldHandleCookies1 = - _registerName1("HTTPShouldHandleCookies"); - late final _sel_HTTPShouldUsePipelining1 = - _registerName1("HTTPShouldUsePipelining"); - late final _sel_originalRequest1 = _registerName1("originalRequest"); - ffi.Pointer _objc_msgSend_876( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_876( - obj, - sel, - ); - } - - late final __objc_msgSend_876Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_876 = __objc_msgSend_876Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_currentRequest1 = _registerName1("currentRequest"); - late final _class_NSURLResponse1 = _getClass1("NSURLResponse"); - late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1 = - _registerName1( - "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); - instancetype _objc_msgSend_877( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer URL, - ffi.Pointer MIMEType, - int length, - ffi.Pointer name, - ) { - return __objc_msgSend_877( - obj, - sel, - URL, - MIMEType, - length, - name, - ); - } - - late final __objc_msgSend_877Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_877 = __objc_msgSend_877Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - late final _sel_MIMEType1 = _registerName1("MIMEType"); - late final _sel_expectedContentLength1 = - _registerName1("expectedContentLength"); - late final _sel_textEncodingName1 = _registerName1("textEncodingName"); - late final _sel_suggestedFilename1 = _registerName1("suggestedFilename"); - late final _sel_response1 = _registerName1("response"); - ffi.Pointer _objc_msgSend_878( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_878( - obj, - sel, - ); - } - - late final __objc_msgSend_878Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_878 = __objc_msgSend_878Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_progress1 = _registerName1("progress"); - ffi.Pointer _objc_msgSend_879( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_879( - obj, - sel, - ); - } - - late final __objc_msgSend_879Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_879 = __objc_msgSend_879Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_earliestBeginDate1 = _registerName1("earliestBeginDate"); - late final _sel_setEarliestBeginDate_1 = - _registerName1("setEarliestBeginDate:"); - 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_880( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_880( - obj, - sel, - ); - } - - late final __objc_msgSend_880Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_880 = __objc_msgSend_880Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_suspend1 = _registerName1("suspend"); - late final _sel_priority1 = _registerName1("priority"); - late final _sel_setPriority_1 = _registerName1("setPriority:"); - void _objc_msgSend_881( - ffi.Pointer obj, - ffi.Pointer sel, - double value, - ) { - return __objc_msgSend_881( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_881Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Float)>>('objc_msgSend'); - late final __objc_msgSend_881 = __objc_msgSend_881Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double)>(); - - late final _sel_prefersIncrementalDelivery1 = - _registerName1("prefersIncrementalDelivery"); - late final _sel_setPrefersIncrementalDelivery_1 = - _registerName1("setPrefersIncrementalDelivery:"); - late final _sel_storeCookies_forTask_1 = - _registerName1("storeCookies:forTask:"); - void _objc_msgSend_882( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cookies, - ffi.Pointer task, - ) { - return __objc_msgSend_882( - obj, - sel, - cookies, - task, - ); - } - - late final __objc_msgSend_882Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_882 = __objc_msgSend_882Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_getCookiesForTask_completionHandler_1 = - _registerName1("getCookiesForTask:completionHandler:"); - void _objc_msgSend_883( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer task, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_883( - obj, - sel, - task, - completionHandler, - ); - } - - late final __objc_msgSend_883Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_883 = __objc_msgSend_883Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _class_NSIndexPath1 = _getClass1("NSIndexPath"); - late final _sel_indexPathWithIndex_1 = _registerName1("indexPathWithIndex:"); - late final _sel_indexPathWithIndexes_length_1 = - _registerName1("indexPathWithIndexes:length:"); - instancetype _objc_msgSend_884( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexes, - int length, - ) { - return __objc_msgSend_884( - obj, - sel, - indexes, - length, - ); - } - - late final __objc_msgSend_884Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_884 = __objc_msgSend_884Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_initWithIndexes_length_1 = - _registerName1("initWithIndexes:length:"); - late final _sel_indexPathByAddingIndex_1 = - _registerName1("indexPathByAddingIndex:"); - ffi.Pointer _objc_msgSend_885( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ) { - return __objc_msgSend_885( - obj, - sel, - index, - ); - } - - late final __objc_msgSend_885Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_885 = __objc_msgSend_885Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_indexPathByRemovingLastIndex1 = - _registerName1("indexPathByRemovingLastIndex"); - ffi.Pointer _objc_msgSend_886( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_886( - obj, - sel, - ); - } - - late final __objc_msgSend_886Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_886 = __objc_msgSend_886Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_indexAtPosition_1 = _registerName1("indexAtPosition:"); - late final _sel_getIndexes_range_1 = _registerName1("getIndexes:range:"); - void _objc_msgSend_887( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexes, - _NSRange positionRange, - ) { - return __objc_msgSend_887( - obj, - sel, - indexes, - positionRange, - ); - } - - late final __objc_msgSend_887Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_887 = __objc_msgSend_887Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>(); - - int _objc_msgSend_888( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherObject, - ) { - return __objc_msgSend_888( - obj, - sel, - otherObject, - ); - } - - late final __objc_msgSend_888Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_888 = __objc_msgSend_888Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_getIndexes_1 = _registerName1("getIndexes:"); - void _objc_msgSend_889( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexes, - ) { - return __objc_msgSend_889( - obj, - sel, - indexes, - ); - } - - late final __objc_msgSend_889Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_889 = __objc_msgSend_889Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSInflectionRule1 = _getClass1("NSInflectionRule"); - late final _sel_automaticRule1 = _registerName1("automaticRule"); - ffi.Pointer _objc_msgSend_890( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_890( - obj, - sel, - ); - } - - late final __objc_msgSend_890Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_890 = __objc_msgSend_890Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_canInflectLanguage_1 = _registerName1("canInflectLanguage:"); - late final _sel_canInflectPreferredLocalization1 = - _registerName1("canInflectPreferredLocalization"); - late final _class_NSMorphology1 = _getClass1("NSMorphology"); - late final _sel_grammaticalGender1 = _registerName1("grammaticalGender"); - int _objc_msgSend_891( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_891( - obj, - sel, - ); - } - - late final __objc_msgSend_891Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_891 = __objc_msgSend_891Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setGrammaticalGender_1 = - _registerName1("setGrammaticalGender:"); - void _objc_msgSend_892( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_892( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_892Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_892 = __objc_msgSend_892Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_partOfSpeech1 = _registerName1("partOfSpeech"); - int _objc_msgSend_893( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_893( - obj, - sel, - ); - } - - late final __objc_msgSend_893Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_893 = __objc_msgSend_893Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setPartOfSpeech_1 = _registerName1("setPartOfSpeech:"); - void _objc_msgSend_894( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_894( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_894Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_894 = __objc_msgSend_894Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_number1 = _registerName1("number"); - int _objc_msgSend_895( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_895( - obj, - sel, - ); - } - - late final __objc_msgSend_895Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_895 = __objc_msgSend_895Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setNumber_1 = _registerName1("setNumber:"); - void _objc_msgSend_896( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_896( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_896Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_896 = __objc_msgSend_896Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_grammaticalCase1 = _registerName1("grammaticalCase"); - int _objc_msgSend_897( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_897( - obj, - sel, - ); - } - - late final __objc_msgSend_897Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_897 = __objc_msgSend_897Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setGrammaticalCase_1 = _registerName1("setGrammaticalCase:"); - void _objc_msgSend_898( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_898( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_898Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_898 = __objc_msgSend_898Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_determination1 = _registerName1("determination"); - int _objc_msgSend_899( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_899( - obj, - sel, - ); - } - - late final __objc_msgSend_899Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_899 = __objc_msgSend_899Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setDetermination_1 = _registerName1("setDetermination:"); - void _objc_msgSend_900( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_900( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_900Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_900 = __objc_msgSend_900Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_grammaticalPerson1 = _registerName1("grammaticalPerson"); - int _objc_msgSend_901( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_901( - obj, - sel, - ); - } - - late final __objc_msgSend_901Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_901 = __objc_msgSend_901Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setGrammaticalPerson_1 = - _registerName1("setGrammaticalPerson:"); - void _objc_msgSend_902( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_902( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_902Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_902 = __objc_msgSend_902Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_pronounType1 = _registerName1("pronounType"); - int _objc_msgSend_903( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_903( - obj, - sel, - ); - } - - late final __objc_msgSend_903Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_903 = __objc_msgSend_903Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setPronounType_1 = _registerName1("setPronounType:"); - void _objc_msgSend_904( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_904( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_904Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_904 = __objc_msgSend_904Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_definiteness1 = _registerName1("definiteness"); - int _objc_msgSend_905( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_905( - obj, - sel, - ); - } - - late final __objc_msgSend_905Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_905 = __objc_msgSend_905Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setDefiniteness_1 = _registerName1("setDefiniteness:"); - void _objc_msgSend_906( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_906( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_906Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_906 = __objc_msgSend_906Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _class_NSMorphologyCustomPronoun1 = - _getClass1("NSMorphologyCustomPronoun"); - late final _sel_isSupportedForLanguage_1 = - _registerName1("isSupportedForLanguage:"); - late final _sel_requiredKeysForLanguage_1 = - _registerName1("requiredKeysForLanguage:"); - late final _sel_subjectForm1 = _registerName1("subjectForm"); - late final _sel_setSubjectForm_1 = _registerName1("setSubjectForm:"); - late final _sel_objectForm1 = _registerName1("objectForm"); - late final _sel_setObjectForm_1 = _registerName1("setObjectForm:"); - late final _sel_possessiveForm1 = _registerName1("possessiveForm"); - late final _sel_setPossessiveForm_1 = _registerName1("setPossessiveForm:"); - late final _sel_possessiveAdjectiveForm1 = - _registerName1("possessiveAdjectiveForm"); - late final _sel_setPossessiveAdjectiveForm_1 = - _registerName1("setPossessiveAdjectiveForm:"); - late final _sel_reflexiveForm1 = _registerName1("reflexiveForm"); - late final _sel_setReflexiveForm_1 = _registerName1("setReflexiveForm:"); - late final _sel_customPronounForLanguage_1 = - _registerName1("customPronounForLanguage:"); - ffi.Pointer _objc_msgSend_907( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer language, - ) { - return __objc_msgSend_907( - obj, - sel, - language, - ); - } - - late final __objc_msgSend_907Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_907 = __objc_msgSend_907Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setCustomPronoun_forLanguage_error_1 = - _registerName1("setCustomPronoun:forLanguage:error:"); - bool _objc_msgSend_908( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer features, - ffi.Pointer language, - ffi.Pointer> error, - ) { - return __objc_msgSend_908( - obj, - sel, - features, - language, - error, - ); - } - - late final __objc_msgSend_908Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_908 = __objc_msgSend_908Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_isUnspecified1 = _registerName1("isUnspecified"); - late final _sel_userMorphology1 = _registerName1("userMorphology"); - ffi.Pointer _objc_msgSend_909( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_909( - obj, - sel, - ); - } - - late final __objc_msgSend_909Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_909 = __objc_msgSend_909Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSOperationQueue1 = _getClass1("NSOperationQueue"); - late final _class_NSOperation1 = _getClass1("NSOperation"); - 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_910( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer op, - ) { - return __objc_msgSend_910( - obj, - sel, - op, - ); - } - - late final __objc_msgSend_910Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_910 = __objc_msgSend_910Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_removeDependency_1 = _registerName1("removeDependency:"); - late final _sel_dependencies1 = _registerName1("dependencies"); - late final _sel_queuePriority1 = _registerName1("queuePriority"); - int _objc_msgSend_911( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_911( - obj, - sel, - ); - } - - late final __objc_msgSend_911Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_911 = __objc_msgSend_911Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setQueuePriority_1 = _registerName1("setQueuePriority:"); - void _objc_msgSend_912( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_912( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_912Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_912 = __objc_msgSend_912Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_completionBlock1 = _registerName1("completionBlock"); - late final _sel_setCompletionBlock_1 = _registerName1("setCompletionBlock:"); - late final _sel_waitUntilFinished1 = _registerName1("waitUntilFinished"); - late final _sel_addOperation_1 = _registerName1("addOperation:"); - late final _sel_addOperations_waitUntilFinished_1 = - _registerName1("addOperations:waitUntilFinished:"); - void _objc_msgSend_913( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer ops, - bool wait, - ) { - return __objc_msgSend_913( - obj, - sel, - ops, - wait, - ); - } - - late final __objc_msgSend_913Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_913 = __objc_msgSend_913Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_addOperationWithBlock_1 = - _registerName1("addOperationWithBlock:"); - late final _sel_addBarrierBlock_1 = _registerName1("addBarrierBlock:"); - late final _sel_maxConcurrentOperationCount1 = - _registerName1("maxConcurrentOperationCount"); - late final _sel_setMaxConcurrentOperationCount_1 = - _registerName1("setMaxConcurrentOperationCount:"); - late final _sel_isSuspended1 = _registerName1("isSuspended"); - late final _sel_setSuspended_1 = _registerName1("setSuspended:"); - late final _sel_underlyingQueue1 = _registerName1("underlyingQueue"); - ffi.Pointer _objc_msgSend_914( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_914( - obj, - sel, - ); - } - - late final __objc_msgSend_914Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_914 = __objc_msgSend_914Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setUnderlyingQueue_1 = _registerName1("setUnderlyingQueue:"); - void _objc_msgSend_915( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_915( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_915Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_915 = __objc_msgSend_915Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_cancelAllOperations1 = _registerName1("cancelAllOperations"); - late final _sel_waitUntilAllOperationsAreFinished1 = - _registerName1("waitUntilAllOperationsAreFinished"); - late final _sel_currentQueue1 = _registerName1("currentQueue"); - ffi.Pointer _objc_msgSend_916( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_916( - obj, - sel, - ); - } - - late final __objc_msgSend_916Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_916 = __objc_msgSend_916Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_mainQueue1 = _registerName1("mainQueue"); - ffi.Pointer _objc_msgSend_917( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_917( - obj, - sel, - ); - } - - late final __objc_msgSend_917Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_917 = __objc_msgSend_917Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_operations1 = _registerName1("operations"); - late final _sel_operationCount1 = _registerName1("operationCount"); - late final _class_NSPointerArray1 = _getClass1("NSPointerArray"); - late final _sel_initWithOptions_1 = _registerName1("initWithOptions:"); - instancetype _objc_msgSend_918( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ) { - return __objc_msgSend_918( - obj, - sel, - options, - ); - } - - late final __objc_msgSend_918Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_918 = __objc_msgSend_918Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _class_NSPointerFunctions1 = _getClass1("NSPointerFunctions"); - late final _sel_pointerFunctionsWithOptions_1 = - _registerName1("pointerFunctionsWithOptions:"); - ffi.Pointer _objc_msgSend_919( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ) { - return __objc_msgSend_919( - obj, - sel, - options, - ); - } - - late final __objc_msgSend_919Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_919 = __objc_msgSend_919Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_hashFunction1 = _registerName1("hashFunction"); - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>)>> - _objc_msgSend_920( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_920( - obj, - sel, - ); - } - - late final __objc_msgSend_920Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - Function(ffi.Pointer, ffi.Pointer)>>( - 'objc_msgSend'); - late final __objc_msgSend_920 = __objc_msgSend_920Ptr.asFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setHashFunction_1 = _registerName1("setHashFunction:"); - void _objc_msgSend_921( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - value, - ) { - return __objc_msgSend_921( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_921Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>>)>>( - 'objc_msgSend'); - late final __objc_msgSend_921 = __objc_msgSend_921Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>>)>(); - - late final _sel_isEqualFunction1 = _registerName1("isEqualFunction"); - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>)>> - _objc_msgSend_922( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_922( - obj, - sel, - ); - } - - late final __objc_msgSend_922Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - Function(ffi.Pointer, ffi.Pointer)>>( - 'objc_msgSend'); - late final __objc_msgSend_922 = __objc_msgSend_922Ptr.asFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setIsEqualFunction_1 = _registerName1("setIsEqualFunction:"); - void _objc_msgSend_923( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - value, - ) { - return __objc_msgSend_923( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_923Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>>)>>( - 'objc_msgSend'); - late final __objc_msgSend_923 = __objc_msgSend_923Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>>)>(); - - late final _sel_sizeFunction1 = _registerName1("sizeFunction"); - ffi.Pointer< - ffi.NativeFunction)>> - _objc_msgSend_924( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_924( - obj, - sel, - ); - } - - late final __objc_msgSend_924Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>> - Function(ffi.Pointer, ffi.Pointer)>>( - 'objc_msgSend'); - late final __objc_msgSend_924 = __objc_msgSend_924Ptr.asFunction< - ffi.Pointer< - ffi - .NativeFunction)>> - Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setSizeFunction_1 = _registerName1("setSizeFunction:"); - void _objc_msgSend_925( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi - .NativeFunction)>> - value, - ) { - return __objc_msgSend_925( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_925Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>>('objc_msgSend'); - late final __objc_msgSend_925 = __objc_msgSend_925Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>)>(); - - late final _sel_descriptionFunction1 = _registerName1("descriptionFunction"); - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> - _objc_msgSend_926( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_926( - obj, - sel, - ); - } - - late final __objc_msgSend_926Ptr = - _lookup< - ffi.NativeFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>> - Function(ffi.Pointer, ffi.Pointer)>>( - 'objc_msgSend'); - late final __objc_msgSend_926 = __objc_msgSend_926Ptr.asFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> - Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setDescriptionFunction_1 = - _registerName1("setDescriptionFunction:"); - void _objc_msgSend_927( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> - value, - ) { - return __objc_msgSend_927( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_927Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>)>>('objc_msgSend'); - late final __objc_msgSend_927 = __objc_msgSend_927Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>)>(); - - late final _sel_relinquishFunction1 = _registerName1("relinquishFunction"); - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>)>> - _objc_msgSend_928( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_928( - obj, - sel, - ); - } - - late final __objc_msgSend_928Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - Function(ffi.Pointer, ffi.Pointer)>>( - 'objc_msgSend'); - late final __objc_msgSend_928 = __objc_msgSend_928Ptr.asFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setRelinquishFunction_1 = - _registerName1("setRelinquishFunction:"); - void _objc_msgSend_929( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - value, - ) { - return __objc_msgSend_929( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_929Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>>)>>( - 'objc_msgSend'); - late final __objc_msgSend_929 = __objc_msgSend_929Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>>)>(); - - late final _sel_acquireFunction1 = _registerName1("acquireFunction"); - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>, - ffi.Bool)>> _objc_msgSend_930( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_930( - obj, - sel, - ); - } - - late final __objc_msgSend_930Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>, - ffi.Bool)>> - Function(ffi.Pointer, ffi.Pointer)>>( - 'objc_msgSend'); - late final __objc_msgSend_930 = __objc_msgSend_930Ptr.asFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>, - ffi.Bool)>> - Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setAcquireFunction_1 = _registerName1("setAcquireFunction:"); - void _objc_msgSend_931( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>, - ffi.Bool)>> - value, - ) { - return __objc_msgSend_931( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_931Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>, - ffi.Bool)>>)>>('objc_msgSend'); - late final __objc_msgSend_931 = __objc_msgSend_931Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>, - ffi.Bool)>>)>(); - - late final _sel_usesStrongWriteBarrier1 = - _registerName1("usesStrongWriteBarrier"); - late final _sel_setUsesStrongWriteBarrier_1 = - _registerName1("setUsesStrongWriteBarrier:"); - late final _sel_usesWeakReadAndWriteBarriers1 = - _registerName1("usesWeakReadAndWriteBarriers"); - late final _sel_setUsesWeakReadAndWriteBarriers_1 = - _registerName1("setUsesWeakReadAndWriteBarriers:"); - late final _sel_initWithPointerFunctions_1 = - _registerName1("initWithPointerFunctions:"); - instancetype _objc_msgSend_932( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer functions, - ) { - return __objc_msgSend_932( - obj, - sel, - functions, - ); - } - - late final __objc_msgSend_932Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_932 = __objc_msgSend_932Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_pointerArrayWithOptions_1 = - _registerName1("pointerArrayWithOptions:"); - ffi.Pointer _objc_msgSend_933( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ) { - return __objc_msgSend_933( - obj, - sel, - options, - ); - } - - late final __objc_msgSend_933Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_933 = __objc_msgSend_933Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_pointerArrayWithPointerFunctions_1 = - _registerName1("pointerArrayWithPointerFunctions:"); - ffi.Pointer _objc_msgSend_934( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer functions, - ) { - return __objc_msgSend_934( - obj, - sel, - functions, - ); - } - - late final __objc_msgSend_934Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_934 = __objc_msgSend_934Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_pointerFunctions1 = _registerName1("pointerFunctions"); - ffi.Pointer _objc_msgSend_935( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_935( - obj, - sel, - ); - } - - late final __objc_msgSend_935Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_935 = __objc_msgSend_935Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_pointerAtIndex_1 = _registerName1("pointerAtIndex:"); - ffi.Pointer _objc_msgSend_936( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ) { - return __objc_msgSend_936( - obj, - sel, - index, - ); - } - - late final __objc_msgSend_936Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_936 = __objc_msgSend_936Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_addPointer_1 = _registerName1("addPointer:"); - late final _sel_removePointerAtIndex_1 = - _registerName1("removePointerAtIndex:"); - late final _sel_insertPointer_atIndex_1 = - _registerName1("insertPointer:atIndex:"); - late final _sel_replacePointerAtIndex_withPointer_1 = - _registerName1("replacePointerAtIndex:withPointer:"); - void _objc_msgSend_937( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ffi.Pointer item, - ) { - return __objc_msgSend_937( - obj, - sel, - index, - item, - ); - } - - late final __objc_msgSend_937Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_937 = __objc_msgSend_937Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _sel_compact1 = _registerName1("compact"); - late final _sel_setCount_1 = _registerName1("setCount:"); - late final _sel_pointerArrayWithStrongObjects1 = - _registerName1("pointerArrayWithStrongObjects"); - late final _sel_pointerArrayWithWeakObjects1 = - _registerName1("pointerArrayWithWeakObjects"); - late final _sel_strongObjectsPointerArray1 = - _registerName1("strongObjectsPointerArray"); - ffi.Pointer _objc_msgSend_938( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_938( - obj, - sel, - ); - } - - late final __objc_msgSend_938Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_938 = __objc_msgSend_938Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_weakObjectsPointerArray1 = - _registerName1("weakObjectsPointerArray"); - late final _class_NSProcessInfo1 = _getClass1("NSProcessInfo"); - late final _sel_processInfo1 = _registerName1("processInfo"); - ffi.Pointer _objc_msgSend_939( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_939( - obj, - sel, - ); - } - - late final __objc_msgSend_939Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_939 = __objc_msgSend_939Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_environment1 = _registerName1("environment"); - late final _sel_hostName1 = _registerName1("hostName"); - late final _sel_processName1 = _registerName1("processName"); - late final _sel_setProcessName_1 = _registerName1("setProcessName:"); - late final _sel_processIdentifier1 = _registerName1("processIdentifier"); - late final _sel_globallyUniqueString1 = - _registerName1("globallyUniqueString"); - late final _sel_operatingSystem1 = _registerName1("operatingSystem"); - late final _sel_operatingSystemName1 = _registerName1("operatingSystemName"); - late final _sel_operatingSystemVersionString1 = - _registerName1("operatingSystemVersionString"); - late final _sel_operatingSystemVersion1 = - _registerName1("operatingSystemVersion"); - NSOperatingSystemVersion _objc_msgSend_940( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_940( - obj, - sel, - ); - } - - late final __objc_msgSend_940Ptr = _lookup< - ffi.NativeFunction< - NSOperatingSystemVersion Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_940 = __objc_msgSend_940Ptr.asFunction< - NSOperatingSystemVersion Function( - ffi.Pointer, ffi.Pointer)>(); - - void _objc_msgSend_940_stret( - ffi.Pointer stret, - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_940_stret( - stret, - obj, - sel, - ); - } - - late final __objc_msgSend_940_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_940_stret = __objc_msgSend_940_stretPtr.asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_processorCount1 = _registerName1("processorCount"); - late final _sel_activeProcessorCount1 = - _registerName1("activeProcessorCount"); - late final _sel_physicalMemory1 = _registerName1("physicalMemory"); - late final _sel_isOperatingSystemAtLeastVersion_1 = - _registerName1("isOperatingSystemAtLeastVersion:"); - bool _objc_msgSend_941( - ffi.Pointer obj, - ffi.Pointer sel, - NSOperatingSystemVersion version, - ) { - return __objc_msgSend_941( - obj, - sel, - version, - ); - } - - late final __objc_msgSend_941Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - NSOperatingSystemVersion)>>('objc_msgSend'); - late final __objc_msgSend_941 = __objc_msgSend_941Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - NSOperatingSystemVersion)>(); - - late final _sel_systemUptime1 = _registerName1("systemUptime"); - late final _sel_disableSuddenTermination1 = - _registerName1("disableSuddenTermination"); - late final _sel_enableSuddenTermination1 = - _registerName1("enableSuddenTermination"); - late final _sel_disableAutomaticTermination_1 = - _registerName1("disableAutomaticTermination:"); - late final _sel_enableAutomaticTermination_1 = - _registerName1("enableAutomaticTermination:"); - late final _sel_automaticTerminationSupportEnabled1 = - _registerName1("automaticTerminationSupportEnabled"); - late final _sel_setAutomaticTerminationSupportEnabled_1 = - _registerName1("setAutomaticTerminationSupportEnabled:"); - late final _sel_beginActivityWithOptions_reason_1 = - _registerName1("beginActivityWithOptions:reason:"); - ffi.Pointer _objc_msgSend_942( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ffi.Pointer reason, - ) { - return __objc_msgSend_942( - obj, - sel, - options, - reason, - ); - } - - late final __objc_msgSend_942Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_942 = __objc_msgSend_942Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_endActivity_1 = _registerName1("endActivity:"); - late final _sel_performActivityWithOptions_reason_usingBlock_1 = - _registerName1("performActivityWithOptions:reason:usingBlock:"); - void _objc_msgSend_943( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ffi.Pointer reason, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_943( - obj, - sel, - options, - reason, - block, - ); - } - - late final __objc_msgSend_943Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_943 = __objc_msgSend_943Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_performExpiringActivityWithReason_usingBlock_1 = - _registerName1("performExpiringActivityWithReason:usingBlock:"); - void _objc_msgSend_944( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer reason, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_944( - obj, - sel, - reason, - block, - ); - } - - late final __objc_msgSend_944Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_944 = __objc_msgSend_944Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_userName1 = _registerName1("userName"); - late final _sel_fullUserName1 = _registerName1("fullUserName"); - late final _sel_thermalState1 = _registerName1("thermalState"); - int _objc_msgSend_945( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_945( - obj, - sel, - ); - } - - late final __objc_msgSend_945Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_945 = __objc_msgSend_945Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_isLowPowerModeEnabled1 = - _registerName1("isLowPowerModeEnabled"); - late final _sel_isMacCatalystApp1 = _registerName1("isMacCatalystApp"); - late final _sel_isiOSAppOnMac1 = _registerName1("isiOSAppOnMac"); - late final _class_NSTextCheckingResult1 = _getClass1("NSTextCheckingResult"); - late final _sel_resultType1 = _registerName1("resultType"); - int _objc_msgSend_946( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_946( - obj, - sel, - ); - } - - late final __objc_msgSend_946Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_946 = __objc_msgSend_946Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_range1 = _registerName1("range"); - late final _sel_orthography1 = _registerName1("orthography"); - ffi.Pointer _objc_msgSend_947( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_947( - obj, - sel, - ); - } - - late final __objc_msgSend_947Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_947 = __objc_msgSend_947Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_grammarDetails1 = _registerName1("grammarDetails"); - late final _sel_duration1 = _registerName1("duration"); - late final _sel_components1 = _registerName1("components"); - late final _sel_replacementString1 = _registerName1("replacementString"); - late final _sel_alternativeStrings1 = _registerName1("alternativeStrings"); - late final _class_NSRegularExpression1 = _getClass1("NSRegularExpression"); - late final _sel_regularExpressionWithPattern_options_error_1 = - _registerName1("regularExpressionWithPattern:options:error:"); - ffi.Pointer _objc_msgSend_948( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer pattern, - int options, - ffi.Pointer> error, - ) { - return __objc_msgSend_948( - obj, - sel, - pattern, - options, - error, - ); - } - - late final __objc_msgSend_948Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_948 = __objc_msgSend_948Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_initWithPattern_options_error_1 = - _registerName1("initWithPattern:options:error:"); - instancetype _objc_msgSend_949( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer pattern, - int options, - ffi.Pointer> error, - ) { - return __objc_msgSend_949( - obj, - sel, - pattern, - options, - error, - ); - } - - late final __objc_msgSend_949Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_949 = __objc_msgSend_949Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_pattern1 = _registerName1("pattern"); - late final _sel_options1 = _registerName1("options"); - int _objc_msgSend_950( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_950( - obj, - sel, - ); - } - - late final __objc_msgSend_950Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_950 = __objc_msgSend_950Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_numberOfCaptureGroups1 = - _registerName1("numberOfCaptureGroups"); - late final _sel_escapedPatternForString_1 = - _registerName1("escapedPatternForString:"); - late final _sel_enumerateMatchesInString_options_range_usingBlock_1 = - _registerName1("enumerateMatchesInString:options:range:usingBlock:"); - void _objc_msgSend_951( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int options, - _NSRange range, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_951( - obj, - sel, - string, - options, - range, - block, - ); - } - - late final __objc_msgSend_951Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_951 = __objc_msgSend_951Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, _NSRange, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_matchesInString_options_range_1 = - _registerName1("matchesInString:options:range:"); - ffi.Pointer _objc_msgSend_952( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int options, - _NSRange range, - ) { - return __objc_msgSend_952( - obj, - sel, - string, - options, - range, - ); - } - - late final __objc_msgSend_952Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_952 = __objc_msgSend_952Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, _NSRange)>(); - - late final _sel_numberOfMatchesInString_options_range_1 = - _registerName1("numberOfMatchesInString:options:range:"); - int _objc_msgSend_953( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int options, - _NSRange range, - ) { - return __objc_msgSend_953( - obj, - sel, - string, - options, - range, - ); - } - - late final __objc_msgSend_953Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_953 = __objc_msgSend_953Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, _NSRange)>(); - - late final _sel_firstMatchInString_options_range_1 = - _registerName1("firstMatchInString:options:range:"); - ffi.Pointer _objc_msgSend_954( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int options, - _NSRange range, - ) { - return __objc_msgSend_954( - obj, - sel, - string, - options, - range, - ); - } - - late final __objc_msgSend_954Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_954 = __objc_msgSend_954Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, _NSRange)>(); - - late final _sel_rangeOfFirstMatchInString_options_range_1 = - _registerName1("rangeOfFirstMatchInString:options:range:"); - _NSRange _objc_msgSend_955( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int options, - _NSRange range, - ) { - return __objc_msgSend_955( - obj, - sel, - string, - options, - range, - ); - } - - late final __objc_msgSend_955Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_955 = __objc_msgSend_955Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, _NSRange)>(); - - void _objc_msgSend_955_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int options, - _NSRange range, - ) { - return __objc_msgSend_955_stret( - stret, - obj, - sel, - string, - options, - range, - ); - } - - late final __objc_msgSend_955_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend_stret'); - late final __objc_msgSend_955_stret = __objc_msgSend_955_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, _NSRange)>(); - - late final _sel_stringByReplacingMatchesInString_options_range_withTemplate_1 = - _registerName1( - "stringByReplacingMatchesInString:options:range:withTemplate:"); - ffi.Pointer _objc_msgSend_956( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int options, - _NSRange range, - ffi.Pointer templ, - ) { - return __objc_msgSend_956( - obj, - sel, - string, - options, - range, - templ, - ); - } - - late final __objc_msgSend_956Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_956 = __objc_msgSend_956Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange, - ffi.Pointer)>(); - - late final _sel_replaceMatchesInString_options_range_withTemplate_1 = - _registerName1("replaceMatchesInString:options:range:withTemplate:"); - int _objc_msgSend_957( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int options, - _NSRange range, - ffi.Pointer templ, - ) { - return __objc_msgSend_957( - obj, - sel, - string, - options, - range, - templ, - ); - } - - late final __objc_msgSend_957Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_957 = __objc_msgSend_957Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, _NSRange, ffi.Pointer)>(); - - late final _sel_replacementStringForResult_inString_offset_template_1 = - _registerName1("replacementStringForResult:inString:offset:template:"); - ffi.Pointer _objc_msgSend_958( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer result, - ffi.Pointer string, - int offset, - ffi.Pointer templ, - ) { - return __objc_msgSend_958( - obj, - sel, - result, - string, - offset, - templ, - ); - } - - late final __objc_msgSend_958Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_958 = __objc_msgSend_958Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - late final _sel_escapedTemplateForString_1 = - _registerName1("escapedTemplateForString:"); - late final _sel_regularExpression1 = _registerName1("regularExpression"); - ffi.Pointer _objc_msgSend_959( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_959( - obj, - sel, - ); - } - - late final __objc_msgSend_959Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_959 = __objc_msgSend_959Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_phoneNumber1 = _registerName1("phoneNumber"); - late final _sel_numberOfRanges1 = _registerName1("numberOfRanges"); - late final _sel_rangeAtIndex_1 = _registerName1("rangeAtIndex:"); - late final _sel_rangeWithName_1 = _registerName1("rangeWithName:"); - late final _sel_resultByAdjustingRangesWithOffset_1 = - _registerName1("resultByAdjustingRangesWithOffset:"); - ffi.Pointer _objc_msgSend_960( - ffi.Pointer obj, - ffi.Pointer sel, - int offset, - ) { - return __objc_msgSend_960( - obj, - sel, - offset, - ); - } - - late final __objc_msgSend_960Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_960 = __objc_msgSend_960Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_addressComponents1 = _registerName1("addressComponents"); - late final _sel_orthographyCheckingResultWithRange_orthography_1 = - _registerName1("orthographyCheckingResultWithRange:orthography:"); - ffi.Pointer _objc_msgSend_961( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer orthography, - ) { - return __objc_msgSend_961( - obj, - sel, - range, - orthography, - ); - } - - late final __objc_msgSend_961Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_961 = __objc_msgSend_961Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange, ffi.Pointer)>(); - - late final _sel_spellCheckingResultWithRange_1 = - _registerName1("spellCheckingResultWithRange:"); - ffi.Pointer _objc_msgSend_962( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_962( - obj, - sel, - range, - ); - } - - late final __objc_msgSend_962Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_962 = __objc_msgSend_962Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _sel_grammarCheckingResultWithRange_details_1 = - _registerName1("grammarCheckingResultWithRange:details:"); - ffi.Pointer _objc_msgSend_963( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer details, - ) { - return __objc_msgSend_963( - obj, - sel, - range, - details, - ); - } - - late final __objc_msgSend_963Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_963 = __objc_msgSend_963Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange, ffi.Pointer)>(); - - late final _sel_dateCheckingResultWithRange_date_1 = - _registerName1("dateCheckingResultWithRange:date:"); - ffi.Pointer _objc_msgSend_964( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer date, - ) { - return __objc_msgSend_964( - obj, - sel, - range, - date, - ); - } - - late final __objc_msgSend_964Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_964 = __objc_msgSend_964Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange, ffi.Pointer)>(); - - late final _sel_dateCheckingResultWithRange_date_timeZone_duration_1 = - _registerName1("dateCheckingResultWithRange:date:timeZone:duration:"); - ffi.Pointer _objc_msgSend_965( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer date, - ffi.Pointer timeZone, - double duration, - ) { - return __objc_msgSend_965( - obj, - sel, - range, - date, - timeZone, - duration, - ); - } - - late final __objc_msgSend_965Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - ffi.Pointer, - ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_965 = __objc_msgSend_965Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - ffi.Pointer, - double)>(); - - late final _sel_addressCheckingResultWithRange_components_1 = - _registerName1("addressCheckingResultWithRange:components:"); - ffi.Pointer _objc_msgSend_966( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer components, - ) { - return __objc_msgSend_966( - obj, - sel, - range, - components, - ); - } - - late final __objc_msgSend_966Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_966 = __objc_msgSend_966Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange, ffi.Pointer)>(); - - late final _sel_linkCheckingResultWithRange_URL_1 = - _registerName1("linkCheckingResultWithRange:URL:"); - ffi.Pointer _objc_msgSend_967( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer url, - ) { - return __objc_msgSend_967( - obj, - sel, - range, - url, - ); - } - - late final __objc_msgSend_967Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_967 = __objc_msgSend_967Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange, ffi.Pointer)>(); - - late final _sel_quoteCheckingResultWithRange_replacementString_1 = - _registerName1("quoteCheckingResultWithRange:replacementString:"); - ffi.Pointer _objc_msgSend_968( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer replacementString, - ) { - return __objc_msgSend_968( - obj, - sel, - range, - replacementString, - ); - } - - late final __objc_msgSend_968Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_968 = __objc_msgSend_968Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange, ffi.Pointer)>(); - - late final _sel_dashCheckingResultWithRange_replacementString_1 = - _registerName1("dashCheckingResultWithRange:replacementString:"); - late final _sel_replacementCheckingResultWithRange_replacementString_1 = - _registerName1("replacementCheckingResultWithRange:replacementString:"); - late final _sel_correctionCheckingResultWithRange_replacementString_1 = - _registerName1("correctionCheckingResultWithRange:replacementString:"); - late final _sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_1 = - _registerName1( - "correctionCheckingResultWithRange:replacementString:alternativeStrings:"); - ffi.Pointer _objc_msgSend_969( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer replacementString, - ffi.Pointer alternativeStrings, - ) { - return __objc_msgSend_969( - obj, - sel, - range, - replacementString, - alternativeStrings, - ); - } - - late final __objc_msgSend_969Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_969 = __objc_msgSend_969Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_1 = - _registerName1( - "regularExpressionCheckingResultWithRanges:count:regularExpression:"); - ffi.Pointer _objc_msgSend_970( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_NSRange> ranges, - int count, - ffi.Pointer regularExpression, - ) { - return __objc_msgSend_970( - obj, - sel, - ranges, - count, - regularExpression, - ); - } - - late final __objc_msgSend_970Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_NSRange>, - ffi.UnsignedLong, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_970 = __objc_msgSend_970Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_NSRange>, - int, - ffi.Pointer)>(); - - late final _sel_phoneNumberCheckingResultWithRange_phoneNumber_1 = - _registerName1("phoneNumberCheckingResultWithRange:phoneNumber:"); - late final _sel_transitInformationCheckingResultWithRange_components_1 = - _registerName1("transitInformationCheckingResultWithRange:components:"); - late final _class_NSURLCache1 = _getClass1("NSURLCache"); - late final _sel_sharedURLCache1 = _registerName1("sharedURLCache"); - ffi.Pointer _objc_msgSend_971( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_971( - obj, - sel, - ); - } - - late final __objc_msgSend_971Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_971 = __objc_msgSend_971Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setSharedURLCache_1 = _registerName1("setSharedURLCache:"); - void _objc_msgSend_972( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_972( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_972Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_972 = __objc_msgSend_972Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithMemoryCapacity_diskCapacity_diskPath_1 = - _registerName1("initWithMemoryCapacity:diskCapacity:diskPath:"); - instancetype _objc_msgSend_973( - ffi.Pointer obj, - ffi.Pointer sel, - int memoryCapacity, - int diskCapacity, - ffi.Pointer path, - ) { - return __objc_msgSend_973( - obj, - sel, - memoryCapacity, - diskCapacity, - path, - ); - } - - late final __objc_msgSend_973Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_973 = __objc_msgSend_973Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - int, ffi.Pointer)>(); - - late final _sel_initWithMemoryCapacity_diskCapacity_directoryURL_1 = - _registerName1("initWithMemoryCapacity:diskCapacity:directoryURL:"); - instancetype _objc_msgSend_974( - ffi.Pointer obj, - ffi.Pointer sel, - int memoryCapacity, - int diskCapacity, - ffi.Pointer directoryURL, - ) { - return __objc_msgSend_974( - obj, - sel, - memoryCapacity, - diskCapacity, - directoryURL, - ); - } - - late final __objc_msgSend_974Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_974 = __objc_msgSend_974Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - int, ffi.Pointer)>(); - - late final _class_NSCachedURLResponse1 = _getClass1("NSCachedURLResponse"); - late final _sel_initWithResponse_data_1 = - _registerName1("initWithResponse:data:"); - instancetype _objc_msgSend_975( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer response, - ffi.Pointer data, - ) { - return __objc_msgSend_975( - obj, - sel, - response, - data, - ); - } - - late final __objc_msgSend_975Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_975 = __objc_msgSend_975Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithResponse_data_userInfo_storagePolicy_1 = - _registerName1("initWithResponse:data:userInfo:storagePolicy:"); - instancetype _objc_msgSend_976( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer response, - ffi.Pointer data, - ffi.Pointer userInfo, - int storagePolicy, - ) { - return __objc_msgSend_976( - obj, - sel, - response, - data, - userInfo, - storagePolicy, - ); - } - - late final __objc_msgSend_976Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_976 = __objc_msgSend_976Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); - - ffi.Pointer _objc_msgSend_977( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_977( - obj, - sel, - ); - } - - late final __objc_msgSend_977Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_977 = __objc_msgSend_977Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_storagePolicy1 = _registerName1("storagePolicy"); - int _objc_msgSend_978( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_978( - obj, - sel, - ); - } - - late final __objc_msgSend_978Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_978 = __objc_msgSend_978Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_cachedResponseForRequest_1 = - _registerName1("cachedResponseForRequest:"); - ffi.Pointer _objc_msgSend_979( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_979( - obj, - sel, - request, - ); - } - - late final __objc_msgSend_979Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_979 = __objc_msgSend_979Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_storeCachedResponse_forRequest_1 = - _registerName1("storeCachedResponse:forRequest:"); - void _objc_msgSend_980( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cachedResponse, - ffi.Pointer request, - ) { - return __objc_msgSend_980( - obj, - sel, - cachedResponse, - request, - ); - } - - late final __objc_msgSend_980Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_980 = __objc_msgSend_980Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_removeCachedResponseForRequest_1 = - _registerName1("removeCachedResponseForRequest:"); - void _objc_msgSend_981( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_981( - obj, - sel, - request, - ); - } - - late final __objc_msgSend_981Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_981 = __objc_msgSend_981Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_removeAllCachedResponses1 = - _registerName1("removeAllCachedResponses"); - late final _sel_removeCachedResponsesSinceDate_1 = - _registerName1("removeCachedResponsesSinceDate:"); - 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 _sel_storeCachedResponse_forDataTask_1 = - _registerName1("storeCachedResponse:forDataTask:"); - void _objc_msgSend_982( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cachedResponse, - ffi.Pointer dataTask, - ) { - return __objc_msgSend_982( - obj, - sel, - cachedResponse, - dataTask, - ); - } - - late final __objc_msgSend_982Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_982 = __objc_msgSend_982Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_getCachedResponseForDataTask_completionHandler_1 = - _registerName1("getCachedResponseForDataTask:completionHandler:"); - void _objc_msgSend_983( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer dataTask, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_983( - obj, - sel, - dataTask, - completionHandler, - ); - } - - late final __objc_msgSend_983Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_983 = __objc_msgSend_983Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_removeCachedResponseForDataTask_1 = - _registerName1("removeCachedResponseForDataTask:"); - void _objc_msgSend_984( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer dataTask, - ) { - return __objc_msgSend_984( - obj, - sel, - dataTask, - ); - } - - late final __objc_msgSend_984Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_984 = __objc_msgSend_984Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSURLConnection1 = _getClass1("NSURLConnection"); - late final _sel_initWithRequest_delegate_startImmediately_1 = - _registerName1("initWithRequest:delegate:startImmediately:"); - instancetype _objc_msgSend_985( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer delegate, - bool startImmediately, - ) { - return __objc_msgSend_985( - obj, - sel, - request, - delegate, - startImmediately, - ); - } - - late final __objc_msgSend_985Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_985 = __objc_msgSend_985Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_initWithRequest_delegate_1 = - _registerName1("initWithRequest:delegate:"); - instancetype _objc_msgSend_986( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer delegate, - ) { - return __objc_msgSend_986( - obj, - sel, - request, - delegate, - ); - } - - late final __objc_msgSend_986Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_986 = __objc_msgSend_986Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_connectionWithRequest_delegate_1 = - _registerName1("connectionWithRequest:delegate:"); - ffi.Pointer _objc_msgSend_987( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer delegate, - ) { - return __objc_msgSend_987( - obj, - sel, - request, - delegate, - ); - } - - late final __objc_msgSend_987Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_987 = __objc_msgSend_987Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - ffi.Pointer _objc_msgSend_988( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_988( - obj, - sel, - ); - } - - late final __objc_msgSend_988Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_988 = __objc_msgSend_988Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_unscheduleFromRunLoop_forMode_1 = - _registerName1("unscheduleFromRunLoop:forMode:"); - late final _sel_setDelegateQueue_1 = _registerName1("setDelegateQueue:"); - void _objc_msgSend_989( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer queue, - ) { - return __objc_msgSend_989( - obj, - sel, - queue, - ); - } - - late final __objc_msgSend_989Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_989 = __objc_msgSend_989Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_canHandleRequest_1 = _registerName1("canHandleRequest:"); - bool _objc_msgSend_990( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_990( - obj, - sel, - request, - ); - } - - late final __objc_msgSend_990Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_990 = __objc_msgSend_990Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_sendSynchronousRequest_returningResponse_error_1 = - _registerName1("sendSynchronousRequest:returningResponse:error:"); - ffi.Pointer _objc_msgSend_991( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer> response, - ffi.Pointer> error, - ) { - return __objc_msgSend_991( - obj, - sel, - request, - response, - error, - ); - } - - late final __objc_msgSend_991Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_991 = __objc_msgSend_991Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _sel_sendAsynchronousRequest_queue_completionHandler_1 = - _registerName1("sendAsynchronousRequest:queue:completionHandler:"); - void _objc_msgSend_992( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer queue, - ffi.Pointer<_ObjCBlock> handler, - ) { - return __objc_msgSend_992( - obj, - sel, - request, - queue, - handler, - ); - } - - late final __objc_msgSend_992Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_992 = __objc_msgSend_992Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _class_NSURLCredential1 = _getClass1("NSURLCredential"); - late final _sel_persistence1 = _registerName1("persistence"); - int _objc_msgSend_993( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_993( - obj, - sel, - ); - } - - late final __objc_msgSend_993Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_993 = __objc_msgSend_993Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithUser_password_persistence_1 = - _registerName1("initWithUser:password:persistence:"); - instancetype _objc_msgSend_994( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer user, - ffi.Pointer password, - int persistence, - ) { - return __objc_msgSend_994( - obj, - sel, - user, - password, - persistence, - ); - } - - late final __objc_msgSend_994Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_994 = __objc_msgSend_994Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_credentialWithUser_password_persistence_1 = - _registerName1("credentialWithUser:password:persistence:"); - ffi.Pointer _objc_msgSend_995( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer user, - ffi.Pointer password, - int persistence, - ) { - return __objc_msgSend_995( - obj, - sel, - user, - password, - persistence, - ); - } - - late final __objc_msgSend_995Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_995 = __objc_msgSend_995Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); - - late final _sel_hasPassword1 = _registerName1("hasPassword"); - late final _sel_initWithIdentity_certificates_persistence_1 = - _registerName1("initWithIdentity:certificates:persistence:"); - instancetype _objc_msgSend_996( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<__SecIdentity> identity, - ffi.Pointer certArray, - int persistence, - ) { - return __objc_msgSend_996( - obj, - sel, - identity, - certArray, - persistence, - ); - } - - late final __objc_msgSend_996Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__SecIdentity>, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_996 = __objc_msgSend_996Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<__SecIdentity>, ffi.Pointer, int)>(); - - late final _sel_credentialWithIdentity_certificates_persistence_1 = - _registerName1("credentialWithIdentity:certificates:persistence:"); - ffi.Pointer _objc_msgSend_997( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<__SecIdentity> identity, - ffi.Pointer certArray, - int persistence, - ) { - return __objc_msgSend_997( - obj, - sel, - identity, - certArray, - persistence, - ); - } - - late final __objc_msgSend_997Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__SecIdentity>, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_997 = __objc_msgSend_997Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__SecIdentity>, - ffi.Pointer, - int)>(); - - late final _sel_identity1 = _registerName1("identity"); - ffi.Pointer<__SecIdentity> _objc_msgSend_998( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_998( - obj, - sel, - ); - } - - late final __objc_msgSend_998Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer<__SecIdentity> Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_998 = __objc_msgSend_998Ptr.asFunction< - ffi.Pointer<__SecIdentity> Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_certificates1 = _registerName1("certificates"); - late final _sel_initWithTrust_1 = _registerName1("initWithTrust:"); - instancetype _objc_msgSend_999( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<__SecTrust> trust, - ) { - return __objc_msgSend_999( - obj, - sel, - trust, - ); - } - - late final __objc_msgSend_999Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<__SecTrust>)>>('objc_msgSend'); - late final __objc_msgSend_999 = __objc_msgSend_999Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<__SecTrust>)>(); - - late final _sel_credentialForTrust_1 = _registerName1("credentialForTrust:"); - ffi.Pointer _objc_msgSend_1000( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<__SecTrust> trust, - ) { - return __objc_msgSend_1000( - obj, - sel, - trust, - ); - } - - late final __objc_msgSend_1000Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<__SecTrust>)>>('objc_msgSend'); - late final __objc_msgSend_1000 = __objc_msgSend_1000Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<__SecTrust>)>(); - - late final _class_NSURLProtectionSpace1 = _getClass1("NSURLProtectionSpace"); - late final _sel_initWithHost_port_protocol_realm_authenticationMethod_1 = - _registerName1("initWithHost:port:protocol:realm:authenticationMethod:"); - instancetype _objc_msgSend_1001( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer host, - int port, - ffi.Pointer protocol, - ffi.Pointer realm, - ffi.Pointer authenticationMethod, - ) { - return __objc_msgSend_1001( - obj, - sel, - host, - port, - protocol, - realm, - authenticationMethod, - ); - } - - late final __objc_msgSend_1001Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1001 = __objc_msgSend_1001Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithProxyHost_port_type_realm_authenticationMethod_1 = - _registerName1("initWithProxyHost:port:type:realm:authenticationMethod:"); - late final _sel_realm1 = _registerName1("realm"); - late final _sel_receivesCredentialSecurely1 = - _registerName1("receivesCredentialSecurely"); - late final _sel_isProxy1 = _registerName1("isProxy"); - late final _sel_proxyType1 = _registerName1("proxyType"); - late final _sel_protocol1 = _registerName1("protocol"); - late final _sel_authenticationMethod1 = - _registerName1("authenticationMethod"); - late final _sel_distinguishedNames1 = _registerName1("distinguishedNames"); - late final _sel_serverTrust1 = _registerName1("serverTrust"); - ffi.Pointer<__SecTrust> _objc_msgSend_1002( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1002( - obj, - sel, - ); - } - - late final __objc_msgSend_1002Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer<__SecTrust> Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1002 = __objc_msgSend_1002Ptr.asFunction< - ffi.Pointer<__SecTrust> Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSURLCredentialStorage1 = - _getClass1("NSURLCredentialStorage"); - late final _sel_sharedCredentialStorage1 = - _registerName1("sharedCredentialStorage"); - ffi.Pointer _objc_msgSend_1003( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1003( - obj, - sel, - ); - } - - late final __objc_msgSend_1003Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1003 = __objc_msgSend_1003Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_credentialsForProtectionSpace_1 = - _registerName1("credentialsForProtectionSpace:"); - ffi.Pointer _objc_msgSend_1004( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer space, - ) { - return __objc_msgSend_1004( - obj, - sel, - space, - ); - } - - late final __objc_msgSend_1004Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1004 = __objc_msgSend_1004Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_allCredentials1 = _registerName1("allCredentials"); - late final _sel_setCredential_forProtectionSpace_1 = - _registerName1("setCredential:forProtectionSpace:"); - void _objc_msgSend_1005( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer credential, - ffi.Pointer space, - ) { - return __objc_msgSend_1005( - obj, - sel, - credential, - space, - ); - } - - late final __objc_msgSend_1005Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1005 = __objc_msgSend_1005Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_removeCredential_forProtectionSpace_1 = - _registerName1("removeCredential:forProtectionSpace:"); - late final _sel_removeCredential_forProtectionSpace_options_1 = - _registerName1("removeCredential:forProtectionSpace:options:"); - void _objc_msgSend_1006( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer credential, - ffi.Pointer space, - ffi.Pointer options, - ) { - return __objc_msgSend_1006( - obj, - sel, - credential, - space, - options, - ); - } - - late final __objc_msgSend_1006Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1006 = __objc_msgSend_1006Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_defaultCredentialForProtectionSpace_1 = - _registerName1("defaultCredentialForProtectionSpace:"); - ffi.Pointer _objc_msgSend_1007( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer space, - ) { - return __objc_msgSend_1007( - obj, - sel, - space, - ); - } - - late final __objc_msgSend_1007Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1007 = __objc_msgSend_1007Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setDefaultCredential_forProtectionSpace_1 = - _registerName1("setDefaultCredential:forProtectionSpace:"); - late final _sel_getCredentialsForProtectionSpace_task_completionHandler_1 = - _registerName1( - "getCredentialsForProtectionSpace:task:completionHandler:"); - void _objc_msgSend_1008( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer protectionSpace, - ffi.Pointer task, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1008( - obj, - sel, - protectionSpace, - task, - completionHandler, - ); - } - - late final __objc_msgSend_1008Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1008 = __objc_msgSend_1008Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_setCredential_forProtectionSpace_task_1 = - _registerName1("setCredential:forProtectionSpace:task:"); - void _objc_msgSend_1009( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer credential, - ffi.Pointer protectionSpace, - ffi.Pointer task, - ) { - return __objc_msgSend_1009( - obj, - sel, - credential, - protectionSpace, - task, - ); - } - - late final __objc_msgSend_1009Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1009 = __objc_msgSend_1009Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_removeCredential_forProtectionSpace_options_task_1 = - _registerName1("removeCredential:forProtectionSpace:options:task:"); - void _objc_msgSend_1010( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer credential, - ffi.Pointer protectionSpace, - ffi.Pointer options, - ffi.Pointer task, - ) { - return __objc_msgSend_1010( - obj, - sel, - credential, - protectionSpace, - options, - task, - ); - } - - late final __objc_msgSend_1010Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1010 = __objc_msgSend_1010Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_1 = - _registerName1( - "getDefaultCredentialForProtectionSpace:task:completionHandler:"); - void _objc_msgSend_1011( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer space, - ffi.Pointer task, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1011( - obj, - sel, - space, - task, - completionHandler, - ); - } - - late final __objc_msgSend_1011Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1011 = __objc_msgSend_1011Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_setDefaultCredential_forProtectionSpace_task_1 = - _registerName1("setDefaultCredential:forProtectionSpace:task:"); - late final _class_NSURLProtocol1 = _getClass1("NSURLProtocol"); - late final _sel_initWithRequest_cachedResponse_client_1 = - _registerName1("initWithRequest:cachedResponse:client:"); - instancetype _objc_msgSend_1012( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer cachedResponse, - ffi.Pointer client, - ) { - return __objc_msgSend_1012( - obj, - sel, - request, - cachedResponse, - client, - ); - } - - late final __objc_msgSend_1012Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1012 = __objc_msgSend_1012Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_client1 = _registerName1("client"); - late final _sel_request1 = _registerName1("request"); - late final _sel_cachedResponse1 = _registerName1("cachedResponse"); - ffi.Pointer _objc_msgSend_1013( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1013( - obj, - sel, - ); - } - - late final __objc_msgSend_1013Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1013 = __objc_msgSend_1013Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_canInitWithRequest_1 = _registerName1("canInitWithRequest:"); - late final _sel_canonicalRequestForRequest_1 = - _registerName1("canonicalRequestForRequest:"); - ffi.Pointer _objc_msgSend_1014( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_1014( - obj, - sel, - request, - ); - } - - late final __objc_msgSend_1014Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1014 = __objc_msgSend_1014Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_requestIsCacheEquivalent_toRequest_1 = - _registerName1("requestIsCacheEquivalent:toRequest:"); - bool _objc_msgSend_1015( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer a, - ffi.Pointer b, - ) { - return __objc_msgSend_1015( - obj, - sel, - a, - b, - ); - } - - late final __objc_msgSend_1015Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1015 = __objc_msgSend_1015Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_startLoading1 = _registerName1("startLoading"); - late final _sel_stopLoading1 = _registerName1("stopLoading"); - late final _sel_propertyForKey_inRequest_1 = - _registerName1("propertyForKey:inRequest:"); - ffi.Pointer _objc_msgSend_1016( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ffi.Pointer request, - ) { - return __objc_msgSend_1016( - obj, - sel, - key, - request, - ); - } - - late final __objc_msgSend_1016Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1016 = __objc_msgSend_1016Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSMutableURLRequest1 = _getClass1("NSMutableURLRequest"); - late final _sel_setURL_1 = _registerName1("setURL:"); - late final _sel_setCachePolicy_1 = _registerName1("setCachePolicy:"); - void _objc_msgSend_1017( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_1017( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1017Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1017 = __objc_msgSend_1017Ptr.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_1018( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_1018( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1018Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1018 = __objc_msgSend_1018Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_setAllowsCellularAccess_1 = - _registerName1("setAllowsCellularAccess:"); - late final _sel_setAllowsExpensiveNetworkAccess_1 = - _registerName1("setAllowsExpensiveNetworkAccess:"); - late final _sel_setAllowsConstrainedNetworkAccess_1 = - _registerName1("setAllowsConstrainedNetworkAccess:"); - late final _sel_setAssumesHTTP3Capable_1 = - _registerName1("setAssumesHTTP3Capable:"); - late final _sel_setAttribution_1 = _registerName1("setAttribution:"); - void _objc_msgSend_1019( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_1019( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1019Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1019 = __objc_msgSend_1019Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_setRequiresDNSSECValidation_1 = - _registerName1("setRequiresDNSSECValidation:"); - late final _sel_setHTTPMethod_1 = _registerName1("setHTTPMethod:"); - late final _sel_setAllHTTPHeaderFields_1 = - _registerName1("setAllHTTPHeaderFields:"); - late final _sel_setValue_forHTTPHeaderField_1 = - _registerName1("setValue:forHTTPHeaderField:"); - void _objc_msgSend_1020( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer field, - ) { - return __objc_msgSend_1020( - obj, - sel, - value, - field, - ); - } - - late final __objc_msgSend_1020Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1020 = __objc_msgSend_1020Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_addValue_forHTTPHeaderField_1 = - _registerName1("addValue:forHTTPHeaderField:"); - late final _sel_setHTTPBody_1 = _registerName1("setHTTPBody:"); - void _objc_msgSend_1021( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_1021( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1021Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1021 = __objc_msgSend_1021Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_setHTTPBodyStream_1 = _registerName1("setHTTPBodyStream:"); - void _objc_msgSend_1022( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_1022( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1022Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1022 = __objc_msgSend_1022Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_setHTTPShouldHandleCookies_1 = - _registerName1("setHTTPShouldHandleCookies:"); - late final _sel_setHTTPShouldUsePipelining_1 = - _registerName1("setHTTPShouldUsePipelining:"); - late final _sel_setProperty_forKey_inRequest_1 = - _registerName1("setProperty:forKey:inRequest:"); - void _objc_msgSend_1023( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer key, - ffi.Pointer request, - ) { - return __objc_msgSend_1023( - obj, - sel, - value, - key, - request, - ); - } - - late final __objc_msgSend_1023Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1023 = __objc_msgSend_1023Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_removePropertyForKey_inRequest_1 = - _registerName1("removePropertyForKey:inRequest:"); - void _objc_msgSend_1024( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ffi.Pointer request, - ) { - return __objc_msgSend_1024( - obj, - sel, - key, - request, - ); - } - - late final __objc_msgSend_1024Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1024 = __objc_msgSend_1024Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_registerClass_1 = _registerName1("registerClass:"); - late final _sel_unregisterClass_1 = _registerName1("unregisterClass:"); - late final _sel_canInitWithTask_1 = _registerName1("canInitWithTask:"); - bool _objc_msgSend_1025( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer task, - ) { - return __objc_msgSend_1025( - obj, - sel, - task, - ); - } - - late final __objc_msgSend_1025Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1025 = __objc_msgSend_1025Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithTask_cachedResponse_client_1 = - _registerName1("initWithTask:cachedResponse:client:"); - instancetype _objc_msgSend_1026( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer task, - ffi.Pointer cachedResponse, - ffi.Pointer client, - ) { - return __objc_msgSend_1026( - obj, - sel, - task, - cachedResponse, - client, - ); - } - - late final __objc_msgSend_1026Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1026 = __objc_msgSend_1026Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_task1 = _registerName1("task"); - ffi.Pointer _objc_msgSend_1027( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1027( - obj, - sel, - ); - } - - late final __objc_msgSend_1027Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1027 = __objc_msgSend_1027Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSXMLParser1 = _getClass1("NSXMLParser"); - late final _sel_initWithStream_1 = _registerName1("initWithStream:"); - instancetype _objc_msgSend_1028( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer stream, - ) { - return __objc_msgSend_1028( - obj, - sel, - stream, - ); - } - - late final __objc_msgSend_1028Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1028 = __objc_msgSend_1028Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_shouldProcessNamespaces1 = - _registerName1("shouldProcessNamespaces"); - late final _sel_setShouldProcessNamespaces_1 = - _registerName1("setShouldProcessNamespaces:"); - late final _sel_shouldReportNamespacePrefixes1 = - _registerName1("shouldReportNamespacePrefixes"); - late final _sel_setShouldReportNamespacePrefixes_1 = - _registerName1("setShouldReportNamespacePrefixes:"); - late final _sel_externalEntityResolvingPolicy1 = - _registerName1("externalEntityResolvingPolicy"); - int _objc_msgSend_1029( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1029( - obj, - sel, - ); - } - - late final __objc_msgSend_1029Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1029 = __objc_msgSend_1029Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setExternalEntityResolvingPolicy_1 = - _registerName1("setExternalEntityResolvingPolicy:"); - void _objc_msgSend_1030( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_1030( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1030Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1030 = __objc_msgSend_1030Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_allowedExternalEntityURLs1 = - _registerName1("allowedExternalEntityURLs"); - late final _sel_setAllowedExternalEntityURLs_1 = - _registerName1("setAllowedExternalEntityURLs:"); - void _objc_msgSend_1031( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_1031( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1031Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1031 = __objc_msgSend_1031Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_parse1 = _registerName1("parse"); - late final _sel_abortParsing1 = _registerName1("abortParsing"); - late final _sel_parserError1 = _registerName1("parserError"); - late final _sel_shouldResolveExternalEntities1 = - _registerName1("shouldResolveExternalEntities"); - late final _sel_setShouldResolveExternalEntities_1 = - _registerName1("setShouldResolveExternalEntities:"); - late final _sel_publicID1 = _registerName1("publicID"); - late final _sel_systemID1 = _registerName1("systemID"); - late final _sel_lineNumber1 = _registerName1("lineNumber"); - late final _sel_columnNumber1 = _registerName1("columnNumber"); - late final _class_NSFileWrapper1 = _getClass1("NSFileWrapper"); - late final _sel_initWithURL_options_error_1 = - _registerName1("initWithURL:options:error:"); - instancetype _objc_msgSend_1032( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int options, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1032( - obj, - sel, - url, - options, - outError, - ); - } - - late final __objc_msgSend_1032Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1032 = __objc_msgSend_1032Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_initDirectoryWithFileWrappers_1 = - _registerName1("initDirectoryWithFileWrappers:"); - late final _sel_initRegularFileWithContents_1 = - _registerName1("initRegularFileWithContents:"); - late final _sel_initSymbolicLinkWithDestinationURL_1 = - _registerName1("initSymbolicLinkWithDestinationURL:"); - late final _sel_initWithSerializedRepresentation_1 = - _registerName1("initWithSerializedRepresentation:"); - late final _sel_isDirectory1 = _registerName1("isDirectory"); - late final _sel_isRegularFile1 = _registerName1("isRegularFile"); - late final _sel_isSymbolicLink1 = _registerName1("isSymbolicLink"); - late final _sel_preferredFilename1 = _registerName1("preferredFilename"); - late final _sel_setPreferredFilename_1 = - _registerName1("setPreferredFilename:"); - late final _sel_filename1 = _registerName1("filename"); - late final _sel_setFilename_1 = _registerName1("setFilename:"); - late final _sel_fileAttributes1 = _registerName1("fileAttributes"); - late final _sel_setFileAttributes_1 = _registerName1("setFileAttributes:"); - late final _sel_matchesContentsOfURL_1 = - _registerName1("matchesContentsOfURL:"); - late final _sel_readFromURL_options_error_1 = - _registerName1("readFromURL:options:error:"); - bool _objc_msgSend_1033( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int options, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1033( - obj, - sel, - url, - options, - outError, - ); - } - - late final __objc_msgSend_1033Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1033 = __objc_msgSend_1033Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_writeToURL_options_originalContentsURL_error_1 = - _registerName1("writeToURL:options:originalContentsURL:error:"); - bool _objc_msgSend_1034( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int options, - ffi.Pointer originalContentsURL, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1034( - obj, - sel, - url, - options, - originalContentsURL, - outError, - ); - } - - late final __objc_msgSend_1034Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1034 = __objc_msgSend_1034Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_serializedRepresentation1 = - _registerName1("serializedRepresentation"); - late final _sel_addFileWrapper_1 = _registerName1("addFileWrapper:"); - ffi.Pointer _objc_msgSend_1035( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer child, - ) { - return __objc_msgSend_1035( - obj, - sel, - child, - ); - } - - late final __objc_msgSend_1035Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1035 = __objc_msgSend_1035Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_addRegularFileWithContents_preferredFilename_1 = - _registerName1("addRegularFileWithContents:preferredFilename:"); - ffi.Pointer _objc_msgSend_1036( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer fileName, - ) { - return __objc_msgSend_1036( - obj, - sel, - data, - fileName, - ); - } - - late final __objc_msgSend_1036Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1036 = __objc_msgSend_1036Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_removeFileWrapper_1 = _registerName1("removeFileWrapper:"); - void _objc_msgSend_1037( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer child, - ) { - return __objc_msgSend_1037( - obj, - sel, - child, - ); - } - - late final __objc_msgSend_1037Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1037 = __objc_msgSend_1037Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_fileWrappers1 = _registerName1("fileWrappers"); - late final _sel_keyForFileWrapper_1 = _registerName1("keyForFileWrapper:"); - ffi.Pointer _objc_msgSend_1038( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer child, - ) { - return __objc_msgSend_1038( - obj, - sel, - child, - ); - } - - late final __objc_msgSend_1038Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1038 = __objc_msgSend_1038Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_regularFileContents1 = _registerName1("regularFileContents"); - late final _sel_symbolicLinkDestinationURL1 = - _registerName1("symbolicLinkDestinationURL"); - late final _sel_initSymbolicLinkWithDestination_1 = - _registerName1("initSymbolicLinkWithDestination:"); - late final _sel_needsToBeUpdatedFromPath_1 = - _registerName1("needsToBeUpdatedFromPath:"); - late final _sel_updateFromPath_1 = _registerName1("updateFromPath:"); - late final _sel_writeToFile_atomically_updateFilenames_1 = - _registerName1("writeToFile:atomically:updateFilenames:"); - bool _objc_msgSend_1039( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool atomicFlag, - bool updateFilenamesFlag, - ) { - return __objc_msgSend_1039( - obj, - sel, - path, - atomicFlag, - updateFilenamesFlag, - ); - } - - late final __objc_msgSend_1039Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_1039 = __objc_msgSend_1039Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool, bool)>(); - - late final _sel_addFileWithPath_1 = _registerName1("addFileWithPath:"); - late final _sel_addSymbolicLinkWithDestination_preferredFilename_1 = - _registerName1("addSymbolicLinkWithDestination:preferredFilename:"); - late final _sel_symbolicLinkDestination1 = - _registerName1("symbolicLinkDestination"); - late final _class_NSURLSession1 = _getClass1("NSURLSession"); - late final _sel_sharedSession1 = _registerName1("sharedSession"); - ffi.Pointer _objc_msgSend_1040( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1040( - obj, - sel, - ); - } - - late final __objc_msgSend_1040Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1040 = __objc_msgSend_1040Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSURLSessionConfiguration1 = - _getClass1("NSURLSessionConfiguration"); - late final _sel_defaultSessionConfiguration1 = - _registerName1("defaultSessionConfiguration"); - ffi.Pointer _objc_msgSend_1041( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1041( - obj, - sel, - ); - } - - late final __objc_msgSend_1041Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1041 = __objc_msgSend_1041Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_ephemeralSessionConfiguration1 = - _registerName1("ephemeralSessionConfiguration"); - late final _sel_backgroundSessionConfigurationWithIdentifier_1 = - _registerName1("backgroundSessionConfigurationWithIdentifier:"); - ffi.Pointer _objc_msgSend_1042( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer identifier, - ) { - return __objc_msgSend_1042( - obj, - sel, - identifier, - ); - } - - late final __objc_msgSend_1042Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1042 = __objc_msgSend_1042Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_identifier1 = _registerName1("identifier"); - late final _sel_requestCachePolicy1 = _registerName1("requestCachePolicy"); - late final _sel_setRequestCachePolicy_1 = - _registerName1("setRequestCachePolicy:"); - late final _sel_timeoutIntervalForRequest1 = - _registerName1("timeoutIntervalForRequest"); - late final _sel_setTimeoutIntervalForRequest_1 = - _registerName1("setTimeoutIntervalForRequest:"); - late final _sel_timeoutIntervalForResource1 = - _registerName1("timeoutIntervalForResource"); - late final _sel_setTimeoutIntervalForResource_1 = - _registerName1("setTimeoutIntervalForResource:"); - late final _sel_waitsForConnectivity1 = - _registerName1("waitsForConnectivity"); - late final _sel_setWaitsForConnectivity_1 = - _registerName1("setWaitsForConnectivity:"); - late final _sel_isDiscretionary1 = _registerName1("isDiscretionary"); - late final _sel_setDiscretionary_1 = _registerName1("setDiscretionary:"); - late final _sel_sharedContainerIdentifier1 = - _registerName1("sharedContainerIdentifier"); - late final _sel_setSharedContainerIdentifier_1 = - _registerName1("setSharedContainerIdentifier:"); - late final _sel_sessionSendsLaunchEvents1 = - _registerName1("sessionSendsLaunchEvents"); - late final _sel_setSessionSendsLaunchEvents_1 = - _registerName1("setSessionSendsLaunchEvents:"); - late final _sel_connectionProxyDictionary1 = - _registerName1("connectionProxyDictionary"); - late final _sel_setConnectionProxyDictionary_1 = - _registerName1("setConnectionProxyDictionary:"); - late final _sel_TLSMinimumSupportedProtocol1 = - _registerName1("TLSMinimumSupportedProtocol"); - int _objc_msgSend_1043( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1043( - obj, - sel, - ); - } - - late final __objc_msgSend_1043Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1043 = __objc_msgSend_1043Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setTLSMinimumSupportedProtocol_1 = - _registerName1("setTLSMinimumSupportedProtocol:"); - void _objc_msgSend_1044( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_1044( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1044Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1044 = __objc_msgSend_1044Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_TLSMaximumSupportedProtocol1 = - _registerName1("TLSMaximumSupportedProtocol"); - late final _sel_setTLSMaximumSupportedProtocol_1 = - _registerName1("setTLSMaximumSupportedProtocol:"); - late final _sel_TLSMinimumSupportedProtocolVersion1 = - _registerName1("TLSMinimumSupportedProtocolVersion"); - int _objc_msgSend_1045( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1045( - obj, - sel, - ); - } - - late final __objc_msgSend_1045Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1045 = __objc_msgSend_1045Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setTLSMinimumSupportedProtocolVersion_1 = - _registerName1("setTLSMinimumSupportedProtocolVersion:"); - void _objc_msgSend_1046( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_1046( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1046Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1046 = __objc_msgSend_1046Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_TLSMaximumSupportedProtocolVersion1 = - _registerName1("TLSMaximumSupportedProtocolVersion"); - late final _sel_setTLSMaximumSupportedProtocolVersion_1 = - _registerName1("setTLSMaximumSupportedProtocolVersion:"); - late final _sel_HTTPShouldSetCookies1 = - _registerName1("HTTPShouldSetCookies"); - late final _sel_setHTTPShouldSetCookies_1 = - _registerName1("setHTTPShouldSetCookies:"); - late final _sel_HTTPCookieAcceptPolicy1 = - _registerName1("HTTPCookieAcceptPolicy"); - late final _sel_setHTTPCookieAcceptPolicy_1 = - _registerName1("setHTTPCookieAcceptPolicy:"); - late final _sel_HTTPAdditionalHeaders1 = - _registerName1("HTTPAdditionalHeaders"); - late final _sel_setHTTPAdditionalHeaders_1 = - _registerName1("setHTTPAdditionalHeaders:"); - late final _sel_HTTPMaximumConnectionsPerHost1 = - _registerName1("HTTPMaximumConnectionsPerHost"); - late final _sel_setHTTPMaximumConnectionsPerHost_1 = - _registerName1("setHTTPMaximumConnectionsPerHost:"); - late final _sel_HTTPCookieStorage1 = _registerName1("HTTPCookieStorage"); - ffi.Pointer _objc_msgSend_1047( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1047( - obj, - sel, - ); - } - - late final __objc_msgSend_1047Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1047 = __objc_msgSend_1047Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setHTTPCookieStorage_1 = - _registerName1("setHTTPCookieStorage:"); - void _objc_msgSend_1048( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_1048( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1048Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1048 = __objc_msgSend_1048Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_URLCredentialStorage1 = - _registerName1("URLCredentialStorage"); - ffi.Pointer _objc_msgSend_1049( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1049( - obj, - sel, - ); - } - - late final __objc_msgSend_1049Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1049 = __objc_msgSend_1049Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setURLCredentialStorage_1 = - _registerName1("setURLCredentialStorage:"); - void _objc_msgSend_1050( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_1050( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1050Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1050 = __objc_msgSend_1050Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_URLCache1 = _registerName1("URLCache"); - ffi.Pointer _objc_msgSend_1051( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1051( - obj, - sel, - ); - } - - late final __objc_msgSend_1051Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1051 = __objc_msgSend_1051Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setURLCache_1 = _registerName1("setURLCache:"); - void _objc_msgSend_1052( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_1052( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1052Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1052 = __objc_msgSend_1052Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_shouldUseExtendedBackgroundIdleMode1 = - _registerName1("shouldUseExtendedBackgroundIdleMode"); - late final _sel_setShouldUseExtendedBackgroundIdleMode_1 = - _registerName1("setShouldUseExtendedBackgroundIdleMode:"); - late final _sel_protocolClasses1 = _registerName1("protocolClasses"); - late final _sel_setProtocolClasses_1 = _registerName1("setProtocolClasses:"); - void _objc_msgSend_1053( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_1053( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1053Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1053 = __objc_msgSend_1053Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_multipathServiceType1 = - _registerName1("multipathServiceType"); - int _objc_msgSend_1054( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1054( - obj, - sel, - ); - } - - late final __objc_msgSend_1054Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1054 = __objc_msgSend_1054Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setMultipathServiceType_1 = - _registerName1("setMultipathServiceType:"); - void _objc_msgSend_1055( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_1055( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1055Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1055 = __objc_msgSend_1055Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_backgroundSessionConfiguration_1 = - _registerName1("backgroundSessionConfiguration:"); - late final _sel_sessionWithConfiguration_1 = - _registerName1("sessionWithConfiguration:"); - ffi.Pointer _objc_msgSend_1056( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer configuration, - ) { - return __objc_msgSend_1056( - obj, - sel, - configuration, - ); - } - - late final __objc_msgSend_1056Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1056 = __objc_msgSend_1056Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_sessionWithConfiguration_delegate_delegateQueue_1 = - _registerName1("sessionWithConfiguration:delegate:delegateQueue:"); - ffi.Pointer _objc_msgSend_1057( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer configuration, - ffi.Pointer delegate, - ffi.Pointer queue, - ) { - return __objc_msgSend_1057( - obj, - sel, - configuration, - delegate, - queue, - ); - } - - late final __objc_msgSend_1057Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1057 = __objc_msgSend_1057Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_delegateQueue1 = _registerName1("delegateQueue"); - late final _sel_configuration1 = _registerName1("configuration"); - late final _sel_sessionDescription1 = _registerName1("sessionDescription"); - late final _sel_setSessionDescription_1 = - _registerName1("setSessionDescription:"); - late final _sel_finishTasksAndInvalidate1 = - _registerName1("finishTasksAndInvalidate"); - late final _sel_invalidateAndCancel1 = _registerName1("invalidateAndCancel"); - late final _sel_resetWithCompletionHandler_1 = - _registerName1("resetWithCompletionHandler:"); - late final _sel_flushWithCompletionHandler_1 = - _registerName1("flushWithCompletionHandler:"); - late final _sel_getTasksWithCompletionHandler_1 = - _registerName1("getTasksWithCompletionHandler:"); - void _objc_msgSend_1058( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1058( - obj, - sel, - completionHandler, - ); - } - - late final __objc_msgSend_1058Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1058 = __objc_msgSend_1058Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_getAllTasksWithCompletionHandler_1 = - _registerName1("getAllTasksWithCompletionHandler:"); - void _objc_msgSend_1059( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1059( - obj, - sel, - completionHandler, - ); - } - - late final __objc_msgSend_1059Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1059 = __objc_msgSend_1059Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_dataTaskWithRequest_1 = - _registerName1("dataTaskWithRequest:"); - ffi.Pointer _objc_msgSend_1060( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_1060( - obj, - sel, - request, - ); - } - - late final __objc_msgSend_1060Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1060 = __objc_msgSend_1060Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_dataTaskWithURL_1 = _registerName1("dataTaskWithURL:"); - ffi.Pointer _objc_msgSend_1061( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ) { - return __objc_msgSend_1061( - obj, - sel, - url, - ); - } - - late final __objc_msgSend_1061Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1061 = __objc_msgSend_1061Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSURLSessionUploadTask1 = - _getClass1("NSURLSessionUploadTask"); - late final _sel_cancelByProducingResumeData_1 = - _registerName1("cancelByProducingResumeData:"); - void _objc_msgSend_1062( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1062( - obj, - sel, - completionHandler, - ); - } - - late final __objc_msgSend_1062Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1062 = __objc_msgSend_1062Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_uploadTaskWithRequest_fromFile_1 = - _registerName1("uploadTaskWithRequest:fromFile:"); - ffi.Pointer _objc_msgSend_1063( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer fileURL, - ) { - return __objc_msgSend_1063( - obj, - sel, - request, - fileURL, - ); - } - - late final __objc_msgSend_1063Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1063 = __objc_msgSend_1063Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_uploadTaskWithRequest_fromData_1 = - _registerName1("uploadTaskWithRequest:fromData:"); - ffi.Pointer _objc_msgSend_1064( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer bodyData, - ) { - return __objc_msgSend_1064( - obj, - sel, - request, - bodyData, - ); - } - - late final __objc_msgSend_1064Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1064 = __objc_msgSend_1064Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_uploadTaskWithResumeData_1 = - _registerName1("uploadTaskWithResumeData:"); - ffi.Pointer _objc_msgSend_1065( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer resumeData, - ) { - return __objc_msgSend_1065( - obj, - sel, - resumeData, - ); - } - - late final __objc_msgSend_1065Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1065 = __objc_msgSend_1065Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_uploadTaskWithStreamedRequest_1 = - _registerName1("uploadTaskWithStreamedRequest:"); - ffi.Pointer _objc_msgSend_1066( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_1066( - obj, - sel, - request, - ); - } - - late final __objc_msgSend_1066Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1066 = __objc_msgSend_1066Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSURLSessionDownloadTask1 = - _getClass1("NSURLSessionDownloadTask"); - late final _sel_downloadTaskWithRequest_1 = - _registerName1("downloadTaskWithRequest:"); - ffi.Pointer _objc_msgSend_1067( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_1067( - obj, - sel, - request, - ); - } - - late final __objc_msgSend_1067Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1067 = __objc_msgSend_1067Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_downloadTaskWithURL_1 = - _registerName1("downloadTaskWithURL:"); - ffi.Pointer _objc_msgSend_1068( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ) { - return __objc_msgSend_1068( - obj, - sel, - url, - ); - } - - late final __objc_msgSend_1068Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1068 = __objc_msgSend_1068Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_downloadTaskWithResumeData_1 = - _registerName1("downloadTaskWithResumeData:"); - ffi.Pointer _objc_msgSend_1069( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer resumeData, - ) { - return __objc_msgSend_1069( - obj, - sel, - resumeData, - ); - } - - late final __objc_msgSend_1069Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1069 = __objc_msgSend_1069Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSURLSessionStreamTask1 = - _getClass1("NSURLSessionStreamTask"); - late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_1 = - _registerName1( - "readDataOfMinLength:maxLength:timeout:completionHandler:"); - void _objc_msgSend_1070( - ffi.Pointer obj, - ffi.Pointer sel, - int minBytes, - int maxBytes, - double timeout, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1070( - obj, - sel, - minBytes, - maxBytes, - timeout, - completionHandler, - ); - } - - late final __objc_msgSend_1070Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Double, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1070 = __objc_msgSend_1070Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, int, - double, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_writeData_timeout_completionHandler_1 = - _registerName1("writeData:timeout:completionHandler:"); - void _objc_msgSend_1071( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - double timeout, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1071( - obj, - sel, - data, - timeout, - completionHandler, - ); - } - - late final __objc_msgSend_1071Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1071 = __objc_msgSend_1071Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, double, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_captureStreams1 = _registerName1("captureStreams"); - late final _sel_closeWrite1 = _registerName1("closeWrite"); - late final _sel_closeRead1 = _registerName1("closeRead"); - late final _sel_startSecureConnection1 = - _registerName1("startSecureConnection"); - late final _sel_stopSecureConnection1 = - _registerName1("stopSecureConnection"); - late final _sel_streamTaskWithHostName_port_1 = - _registerName1("streamTaskWithHostName:port:"); - ffi.Pointer _objc_msgSend_1072( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer hostname, - int port, - ) { - return __objc_msgSend_1072( - obj, - sel, - hostname, - port, - ); - } - - late final __objc_msgSend_1072Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_1072 = __objc_msgSend_1072Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _class_NSNetService1 = _getClass1("NSNetService"); - late final _sel_initWithDomain_type_name_port_1 = - _registerName1("initWithDomain:type:name:port:"); - instancetype _objc_msgSend_1073( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer domain, - ffi.Pointer type, - ffi.Pointer name, - int port, - ) { - return __objc_msgSend_1073( - obj, - sel, - domain, - type, - name, - port, - ); - } - - late final __objc_msgSend_1073Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int)>>('objc_msgSend'); - late final __objc_msgSend_1073 = __objc_msgSend_1073Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); - - late final _sel_initWithDomain_type_name_1 = - _registerName1("initWithDomain:type:name:"); - instancetype _objc_msgSend_1074( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer domain, - ffi.Pointer type, - ffi.Pointer name, - ) { - return __objc_msgSend_1074( - obj, - sel, - domain, - type, - name, - ); - } - - late final __objc_msgSend_1074Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1074 = __objc_msgSend_1074Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_includesPeerToPeer1 = _registerName1("includesPeerToPeer"); - late final _sel_setIncludesPeerToPeer_1 = - _registerName1("setIncludesPeerToPeer:"); - late final _sel_type1 = _registerName1("type"); - late final _sel_publishWithOptions_1 = _registerName1("publishWithOptions:"); - void _objc_msgSend_1075( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ) { - return __objc_msgSend_1075( - obj, - sel, - options, - ); - } - - late final __objc_msgSend_1075Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1075 = __objc_msgSend_1075Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_resolve1 = _registerName1("resolve"); - late final _sel_stop1 = _registerName1("stop"); - late final _sel_dictionaryFromTXTRecordData_1 = - _registerName1("dictionaryFromTXTRecordData:"); - ffi.Pointer _objc_msgSend_1076( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer txtData, - ) { - return __objc_msgSend_1076( - obj, - sel, - txtData, - ); - } - - late final __objc_msgSend_1076Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1076 = __objc_msgSend_1076Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_dataFromTXTRecordDictionary_1 = - _registerName1("dataFromTXTRecordDictionary:"); - ffi.Pointer _objc_msgSend_1077( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer txtDictionary, - ) { - return __objc_msgSend_1077( - obj, - sel, - txtDictionary, - ); - } - - late final __objc_msgSend_1077Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1077 = __objc_msgSend_1077Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_resolveWithTimeout_1 = _registerName1("resolveWithTimeout:"); - late final _sel_getInputStream_outputStream_1 = - _registerName1("getInputStream:outputStream:"); - bool _objc_msgSend_1078( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream, - ) { - return __objc_msgSend_1078( - obj, - sel, - inputStream, - outputStream, - ); - } - - late final __objc_msgSend_1078Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1078 = __objc_msgSend_1078Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _sel_setTXTRecordData_1 = _registerName1("setTXTRecordData:"); - bool _objc_msgSend_1079( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer recordData, - ) { - return __objc_msgSend_1079( - obj, - sel, - recordData, - ); - } - - late final __objc_msgSend_1079Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1079 = __objc_msgSend_1079Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_TXTRecordData1 = _registerName1("TXTRecordData"); - late final _sel_startMonitoring1 = _registerName1("startMonitoring"); - late final _sel_stopMonitoring1 = _registerName1("stopMonitoring"); - late final _sel_streamTaskWithNetService_1 = - _registerName1("streamTaskWithNetService:"); - ffi.Pointer _objc_msgSend_1080( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer service, - ) { - return __objc_msgSend_1080( - obj, - sel, - service, - ); - } - - late final __objc_msgSend_1080Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1080 = __objc_msgSend_1080Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSURLSessionWebSocketTask1 = - _getClass1("NSURLSessionWebSocketTask"); - late final _class_NSURLSessionWebSocketMessage1 = - _getClass1("NSURLSessionWebSocketMessage"); - int _objc_msgSend_1081( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1081( - obj, - sel, - ); - } - - late final __objc_msgSend_1081Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1081 = __objc_msgSend_1081Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_sendMessage_completionHandler_1 = - _registerName1("sendMessage:completionHandler:"); - void _objc_msgSend_1082( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer message, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1082( - obj, - sel, - message, - completionHandler, - ); - } - - late final __objc_msgSend_1082Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1082 = __objc_msgSend_1082Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_receiveMessageWithCompletionHandler_1 = - _registerName1("receiveMessageWithCompletionHandler:"); - void _objc_msgSend_1083( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1083( - obj, - sel, - completionHandler, - ); - } - - late final __objc_msgSend_1083Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1083 = __objc_msgSend_1083Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_sendPingWithPongReceiveHandler_1 = - _registerName1("sendPingWithPongReceiveHandler:"); - void _objc_msgSend_1084( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> pongReceiveHandler, - ) { - return __objc_msgSend_1084( - obj, - sel, - pongReceiveHandler, - ); - } - - late final __objc_msgSend_1084Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1084 = __objc_msgSend_1084Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_cancelWithCloseCode_reason_1 = - _registerName1("cancelWithCloseCode:reason:"); - void _objc_msgSend_1085( - ffi.Pointer obj, - ffi.Pointer sel, - int closeCode, - ffi.Pointer reason, - ) { - return __objc_msgSend_1085( - obj, - sel, - closeCode, - reason, - ); - } - - late final __objc_msgSend_1085Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1085 = __objc_msgSend_1085Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _sel_maximumMessageSize1 = _registerName1("maximumMessageSize"); - late final _sel_setMaximumMessageSize_1 = - _registerName1("setMaximumMessageSize:"); - late final _sel_closeCode1 = _registerName1("closeCode"); - int _objc_msgSend_1086( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1086( - obj, - sel, - ); - } - - late final __objc_msgSend_1086Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1086 = __objc_msgSend_1086Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_closeReason1 = _registerName1("closeReason"); - late final _sel_webSocketTaskWithURL_1 = - _registerName1("webSocketTaskWithURL:"); - ffi.Pointer _objc_msgSend_1087( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ) { - return __objc_msgSend_1087( - obj, - sel, - url, - ); - } - - late final __objc_msgSend_1087Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1087 = __objc_msgSend_1087Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_webSocketTaskWithURL_protocols_1 = - _registerName1("webSocketTaskWithURL:protocols:"); - ffi.Pointer _objc_msgSend_1088( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer protocols, - ) { - return __objc_msgSend_1088( - obj, - sel, - url, - protocols, - ); - } - - late final __objc_msgSend_1088Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1088 = __objc_msgSend_1088Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_webSocketTaskWithRequest_1 = - _registerName1("webSocketTaskWithRequest:"); - ffi.Pointer _objc_msgSend_1089( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_1089( - obj, - sel, - request, - ); - } - - late final __objc_msgSend_1089Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1089 = __objc_msgSend_1089Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_dataTaskWithRequest_completionHandler_1 = - _registerName1("dataTaskWithRequest:completionHandler:"); - ffi.Pointer _objc_msgSend_1090( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1090( - obj, - sel, - request, - completionHandler, - ); - } - - late final __objc_msgSend_1090Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1090 = __objc_msgSend_1090Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_dataTaskWithURL_completionHandler_1 = - _registerName1("dataTaskWithURL:completionHandler:"); - ffi.Pointer _objc_msgSend_1091( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1091( - obj, - sel, - url, - completionHandler, - ); - } - - late final __objc_msgSend_1091Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1091 = __objc_msgSend_1091Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_uploadTaskWithRequest_fromFile_completionHandler_1 = - _registerName1("uploadTaskWithRequest:fromFile:completionHandler:"); - ffi.Pointer _objc_msgSend_1092( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer fileURL, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1092( - obj, - sel, - request, - fileURL, - completionHandler, - ); - } - - late final __objc_msgSend_1092Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1092 = __objc_msgSend_1092Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_uploadTaskWithRequest_fromData_completionHandler_1 = - _registerName1("uploadTaskWithRequest:fromData:completionHandler:"); - ffi.Pointer _objc_msgSend_1093( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer bodyData, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1093( - obj, - sel, - request, - bodyData, - completionHandler, - ); - } - - late final __objc_msgSend_1093Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1093 = __objc_msgSend_1093Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_uploadTaskWithResumeData_completionHandler_1 = - _registerName1("uploadTaskWithResumeData:completionHandler:"); - ffi.Pointer _objc_msgSend_1094( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer resumeData, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1094( - obj, - sel, - resumeData, - completionHandler, - ); - } - - late final __objc_msgSend_1094Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1094 = __objc_msgSend_1094Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_downloadTaskWithRequest_completionHandler_1 = - _registerName1("downloadTaskWithRequest:completionHandler:"); - ffi.Pointer _objc_msgSend_1095( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1095( - obj, - sel, - request, - completionHandler, - ); - } - - late final __objc_msgSend_1095Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1095 = __objc_msgSend_1095Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_downloadTaskWithURL_completionHandler_1 = - _registerName1("downloadTaskWithURL:completionHandler:"); - ffi.Pointer _objc_msgSend_1096( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1096( - obj, - sel, - url, - completionHandler, - ); - } - - late final __objc_msgSend_1096Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1096 = __objc_msgSend_1096Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_downloadTaskWithResumeData_completionHandler_1 = - _registerName1("downloadTaskWithResumeData:completionHandler:"); - ffi.Pointer _objc_msgSend_1097( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer resumeData, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1097( - obj, - sel, - resumeData, - completionHandler, - ); - } - - late final __objc_msgSend_1097Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1097 = __objc_msgSend_1097Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _class_NSProtocolChecker1 = _getClass1("NSProtocolChecker"); - ffi.Pointer _objc_msgSend_1098( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1098( - obj, - sel, - ); - } - - late final __objc_msgSend_1098Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1098 = __objc_msgSend_1098Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - ffi.Pointer _objc_msgSend_1099( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1099( - obj, - sel, - ); - } - - late final __objc_msgSend_1099Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1099 = __objc_msgSend_1099Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_protocolCheckerWithTarget_protocol_1 = - _registerName1("protocolCheckerWithTarget:protocol:"); - instancetype _objc_msgSend_1100( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - ffi.Pointer aProtocol, - ) { - return __objc_msgSend_1100( - obj, - sel, - anObject, - aProtocol, - ); - } - - late final __objc_msgSend_1100Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1100 = __objc_msgSend_1100Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithTarget_protocol_1 = - _registerName1("initWithTarget:protocol:"); - late final _class_NSTask1 = _getClass1("NSTask"); - late final _sel_setExecutableURL_1 = _registerName1("setExecutableURL:"); - late final _sel_setEnvironment_1 = _registerName1("setEnvironment:"); - late final _sel_currentDirectoryURL1 = _registerName1("currentDirectoryURL"); - late final _sel_setCurrentDirectoryURL_1 = - _registerName1("setCurrentDirectoryURL:"); - late final _sel_launchRequirementData1 = - _registerName1("launchRequirementData"); - late final _sel_setLaunchRequirementData_1 = - _registerName1("setLaunchRequirementData:"); - late final _sel_standardInput1 = _registerName1("standardInput"); - late final _sel_setStandardInput_1 = _registerName1("setStandardInput:"); - late final _sel_standardOutput1 = _registerName1("standardOutput"); - late final _sel_setStandardOutput_1 = _registerName1("setStandardOutput:"); - late final _sel_standardError1 = _registerName1("standardError"); - late final _sel_setStandardError_1 = _registerName1("setStandardError:"); - late final _sel_launchAndReturnError_1 = - _registerName1("launchAndReturnError:"); - late final _sel_interrupt1 = _registerName1("interrupt"); - late final _sel_terminate1 = _registerName1("terminate"); - late final _sel_isRunning1 = _registerName1("isRunning"); - late final _sel_terminationStatus1 = _registerName1("terminationStatus"); - late final _sel_terminationReason1 = _registerName1("terminationReason"); - int _objc_msgSend_1101( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1101( - obj, - sel, - ); - } - - late final __objc_msgSend_1101Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1101 = __objc_msgSend_1101Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_terminationHandler1 = _registerName1("terminationHandler"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_1102( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1102( - obj, - sel, - ); - } - - late final __objc_msgSend_1102Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1102 = __objc_msgSend_1102Ptr.asFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setTerminationHandler_1 = - _registerName1("setTerminationHandler:"); - void _objc_msgSend_1103( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> value, - ) { - return __objc_msgSend_1103( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1103Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1103 = __objc_msgSend_1103Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_launchedTaskWithExecutableURL_arguments_error_terminationHandler_1 = - _registerName1( - "launchedTaskWithExecutableURL:arguments:error:terminationHandler:"); - ffi.Pointer _objc_msgSend_1104( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer arguments, - ffi.Pointer> error, - ffi.Pointer<_ObjCBlock> terminationHandler, - ) { - return __objc_msgSend_1104( - obj, - sel, - url, - arguments, - error, - terminationHandler, - ); - } - - late final __objc_msgSend_1104Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1104 = __objc_msgSend_1104Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_waitUntilExit1 = _registerName1("waitUntilExit"); - late final _sel_launchPath1 = _registerName1("launchPath"); - late final _sel_setLaunchPath_1 = _registerName1("setLaunchPath:"); - late final _sel_setCurrentDirectoryPath_1 = - _registerName1("setCurrentDirectoryPath:"); - late final _sel_launch1 = _registerName1("launch"); - late final _sel_launchedTaskWithLaunchPath_arguments_1 = - _registerName1("launchedTaskWithLaunchPath:arguments:"); - ffi.Pointer _objc_msgSend_1105( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer arguments, - ) { - return __objc_msgSend_1105( - obj, - sel, - path, - arguments, - ); - } - - late final __objc_msgSend_1105Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1105 = __objc_msgSend_1105Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSXMLElement1 = _getClass1("NSXMLElement"); - late final _class_NSXMLNode1 = _getClass1("NSXMLNode"); - late final _sel_initWithKind_1 = _registerName1("initWithKind:"); - instancetype _objc_msgSend_1106( - ffi.Pointer obj, - ffi.Pointer sel, - int kind, - ) { - return __objc_msgSend_1106( - obj, - sel, - kind, - ); - } - - late final __objc_msgSend_1106Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1106 = __objc_msgSend_1106Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithKind_options_1 = - _registerName1("initWithKind:options:"); - instancetype _objc_msgSend_1107( - ffi.Pointer obj, - ffi.Pointer sel, - int kind, - int options, - ) { - return __objc_msgSend_1107( - obj, - sel, - kind, - options, - ); - } - - late final __objc_msgSend_1107Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1107 = __objc_msgSend_1107Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, int, int)>(); - - late final _sel_document1 = _registerName1("document"); - late final _sel_documentWithRootElement_1 = - _registerName1("documentWithRootElement:"); - ffi.Pointer _objc_msgSend_1108( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer element, - ) { - return __objc_msgSend_1108( - obj, - sel, - element, - ); - } - - late final __objc_msgSend_1108Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1108 = __objc_msgSend_1108Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_elementWithName_1 = _registerName1("elementWithName:"); - late final _sel_elementWithName_URI_1 = - _registerName1("elementWithName:URI:"); - ffi.Pointer _objc_msgSend_1109( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer URI, - ) { - return __objc_msgSend_1109( - obj, - sel, - name, - URI, - ); - } - - late final __objc_msgSend_1109Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1109 = __objc_msgSend_1109Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_elementWithName_stringValue_1 = - _registerName1("elementWithName:stringValue:"); - late final _sel_elementWithName_children_attributes_1 = - _registerName1("elementWithName:children:attributes:"); - ffi.Pointer _objc_msgSend_1110( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer children, - ffi.Pointer attributes, - ) { - return __objc_msgSend_1110( - obj, - sel, - name, - children, - attributes, - ); - } - - late final __objc_msgSend_1110Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1110 = __objc_msgSend_1110Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_attributeWithName_stringValue_1 = - _registerName1("attributeWithName:stringValue:"); - late final _sel_attributeWithName_URI_stringValue_1 = - _registerName1("attributeWithName:URI:stringValue:"); - late final _sel_namespaceWithName_stringValue_1 = - _registerName1("namespaceWithName:stringValue:"); - late final _sel_processingInstructionWithName_stringValue_1 = - _registerName1("processingInstructionWithName:stringValue:"); - late final _sel_commentWithStringValue_1 = - _registerName1("commentWithStringValue:"); - late final _sel_textWithStringValue_1 = - _registerName1("textWithStringValue:"); - late final _sel_DTDNodeWithXMLString_1 = - _registerName1("DTDNodeWithXMLString:"); - int _objc_msgSend_1111( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1111( - obj, - sel, - ); - } - - late final __objc_msgSend_1111Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1111 = __objc_msgSend_1111Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_objectValue1 = _registerName1("objectValue"); - late final _sel_setObjectValue_1 = _registerName1("setObjectValue:"); - late final _sel_setStringValue_1 = _registerName1("setStringValue:"); - late final _sel_setStringValue_resolvingEntities_1 = - _registerName1("setStringValue:resolvingEntities:"); - void _objc_msgSend_1112( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - bool resolve, - ) { - return __objc_msgSend_1112( - obj, - sel, - string, - resolve, - ); - } - - late final __objc_msgSend_1112Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_1112 = __objc_msgSend_1112Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_index1 = _registerName1("index"); - late final _sel_level1 = _registerName1("level"); - late final _class_NSXMLDocument1 = _getClass1("NSXMLDocument"); - late final _sel_initWithXMLString_options_error_1 = - _registerName1("initWithXMLString:options:error:"); - instancetype _objc_msgSend_1113( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int mask, - ffi.Pointer> error, - ) { - return __objc_msgSend_1113( - obj, - sel, - string, - mask, - error, - ); - } - - late final __objc_msgSend_1113Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1113 = __objc_msgSend_1113Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - instancetype _objc_msgSend_1114( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int mask, - ffi.Pointer> error, - ) { - return __objc_msgSend_1114( - obj, - sel, - url, - mask, - error, - ); - } - - late final __objc_msgSend_1114Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1114 = __objc_msgSend_1114Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_initWithData_options_error_1 = - _registerName1("initWithData:options:error:"); - instancetype _objc_msgSend_1115( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - int mask, - ffi.Pointer> error, - ) { - return __objc_msgSend_1115( - obj, - sel, - data, - mask, - error, - ); - } - - late final __objc_msgSend_1115Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1115 = __objc_msgSend_1115Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_initWithRootElement_1 = - _registerName1("initWithRootElement:"); - instancetype _objc_msgSend_1116( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer element, - ) { - return __objc_msgSend_1116( - obj, - sel, - element, - ); - } - - late final __objc_msgSend_1116Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1116 = __objc_msgSend_1116Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_replacementClassForClass_1 = - _registerName1("replacementClassForClass:"); - late final _sel_characterEncoding1 = _registerName1("characterEncoding"); - late final _sel_setCharacterEncoding_1 = - _registerName1("setCharacterEncoding:"); - late final _sel_isStandalone1 = _registerName1("isStandalone"); - late final _sel_setStandalone_1 = _registerName1("setStandalone:"); - late final _sel_documentContentKind1 = _registerName1("documentContentKind"); - int _objc_msgSend_1117( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1117( - obj, - sel, - ); - } - - late final __objc_msgSend_1117Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1117 = __objc_msgSend_1117Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setDocumentContentKind_1 = - _registerName1("setDocumentContentKind:"); - void _objc_msgSend_1118( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_1118( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1118Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1118 = __objc_msgSend_1118Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_setMIMEType_1 = _registerName1("setMIMEType:"); - late final _class_NSXMLDTD1 = _getClass1("NSXMLDTD"); - late final _sel_setPublicID_1 = _registerName1("setPublicID:"); - late final _sel_setSystemID_1 = _registerName1("setSystemID:"); - late final _sel_insertChild_atIndex_1 = - _registerName1("insertChild:atIndex:"); - void _objc_msgSend_1119( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer child, - int index, - ) { - return __objc_msgSend_1119( - obj, - sel, - child, - index, - ); - } - - late final __objc_msgSend_1119Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_1119 = __objc_msgSend_1119Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_insertChildren_atIndex_1 = - _registerName1("insertChildren:atIndex:"); - void _objc_msgSend_1120( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer children, - int index, - ) { - return __objc_msgSend_1120( - obj, - sel, - children, - index, - ); - } - - late final __objc_msgSend_1120Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_1120 = __objc_msgSend_1120Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_removeChildAtIndex_1 = _registerName1("removeChildAtIndex:"); - late final _sel_setChildren_1 = _registerName1("setChildren:"); - late final _sel_addChild_1 = _registerName1("addChild:"); - void _objc_msgSend_1121( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer child, - ) { - return __objc_msgSend_1121( - obj, - sel, - child, - ); - } - - late final __objc_msgSend_1121Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1121 = __objc_msgSend_1121Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_replaceChildAtIndex_withNode_1 = - _registerName1("replaceChildAtIndex:withNode:"); - void _objc_msgSend_1122( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ffi.Pointer node, - ) { - return __objc_msgSend_1122( - obj, - sel, - index, - node, - ); - } - - late final __objc_msgSend_1122Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1122 = __objc_msgSend_1122Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _class_NSXMLDTDNode1 = _getClass1("NSXMLDTDNode"); - late final _sel_initWithXMLString_1 = _registerName1("initWithXMLString:"); - late final _sel_DTDKind1 = _registerName1("DTDKind"); - int _objc_msgSend_1123( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1123( - obj, - sel, - ); - } - - late final __objc_msgSend_1123Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1123 = __objc_msgSend_1123Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setDTDKind_1 = _registerName1("setDTDKind:"); - void _objc_msgSend_1124( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_1124( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1124Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1124 = __objc_msgSend_1124Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_isExternal1 = _registerName1("isExternal"); - late final _sel_notationName1 = _registerName1("notationName"); - late final _sel_setNotationName_1 = _registerName1("setNotationName:"); - late final _sel_localNameForName_1 = _registerName1("localNameForName:"); - late final _sel_prefixForName_1 = _registerName1("prefixForName:"); - late final _sel_predefinedNamespaceForPrefix_1 = - _registerName1("predefinedNamespaceForPrefix:"); - ffi.Pointer _objc_msgSend_1125( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ) { - return __objc_msgSend_1125( - obj, - sel, - name, - ); - } - - late final __objc_msgSend_1125Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1125 = __objc_msgSend_1125Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_entityDeclarationForName_1 = - _registerName1("entityDeclarationForName:"); - ffi.Pointer _objc_msgSend_1126( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ) { - return __objc_msgSend_1126( - obj, - sel, - name, - ); - } - - late final __objc_msgSend_1126Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1126 = __objc_msgSend_1126Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_notationDeclarationForName_1 = - _registerName1("notationDeclarationForName:"); - late final _sel_elementDeclarationForName_1 = - _registerName1("elementDeclarationForName:"); - late final _sel_attributeDeclarationForName_elementName_1 = - _registerName1("attributeDeclarationForName:elementName:"); - ffi.Pointer _objc_msgSend_1127( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer elementName, - ) { - return __objc_msgSend_1127( - obj, - sel, - name, - elementName, - ); - } - - late final __objc_msgSend_1127Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1127 = __objc_msgSend_1127Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_predefinedEntityDeclarationForName_1 = - _registerName1("predefinedEntityDeclarationForName:"); - late final _sel_DTD1 = _registerName1("DTD"); - ffi.Pointer _objc_msgSend_1128( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1128( - obj, - sel, - ); - } - - late final __objc_msgSend_1128Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1128 = __objc_msgSend_1128Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setDTD_1 = _registerName1("setDTD:"); - void _objc_msgSend_1129( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_1129( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1129Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1129 = __objc_msgSend_1129Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_setRootElement_1 = _registerName1("setRootElement:"); - void _objc_msgSend_1130( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer root, - ) { - return __objc_msgSend_1130( - obj, - sel, - root, - ); - } - - late final __objc_msgSend_1130Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1130 = __objc_msgSend_1130Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_rootElement1 = _registerName1("rootElement"); - ffi.Pointer _objc_msgSend_1131( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1131( - obj, - sel, - ); - } - - late final __objc_msgSend_1131Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1131 = __objc_msgSend_1131Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_XMLData1 = _registerName1("XMLData"); - late final _sel_XMLDataWithOptions_1 = _registerName1("XMLDataWithOptions:"); - ffi.Pointer _objc_msgSend_1132( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ) { - return __objc_msgSend_1132( - obj, - sel, - options, - ); - } - - late final __objc_msgSend_1132Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1132 = __objc_msgSend_1132Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_objectByApplyingXSLT_arguments_error_1 = - _registerName1("objectByApplyingXSLT:arguments:error:"); - ffi.Pointer _objc_msgSend_1133( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer xslt, - ffi.Pointer arguments, - ffi.Pointer> error, - ) { - return __objc_msgSend_1133( - obj, - sel, - xslt, - arguments, - error, - ); - } - - late final __objc_msgSend_1133Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1133 = __objc_msgSend_1133Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_objectByApplyingXSLTString_arguments_error_1 = - _registerName1("objectByApplyingXSLTString:arguments:error:"); - ffi.Pointer _objc_msgSend_1134( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer xslt, - ffi.Pointer arguments, - ffi.Pointer> error, - ) { - return __objc_msgSend_1134( - obj, - sel, - xslt, - arguments, - error, - ); - } - - late final __objc_msgSend_1134Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1134 = __objc_msgSend_1134Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_objectByApplyingXSLTAtURL_arguments_error_1 = - _registerName1("objectByApplyingXSLTAtURL:arguments:error:"); - ffi.Pointer _objc_msgSend_1135( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer xsltURL, - ffi.Pointer argument, - ffi.Pointer> error, - ) { - return __objc_msgSend_1135( - obj, - sel, - xsltURL, - argument, - error, - ); - } - - late final __objc_msgSend_1135Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1135 = __objc_msgSend_1135Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_validateAndReturnError_1 = - _registerName1("validateAndReturnError:"); - late final _sel_rootDocument1 = _registerName1("rootDocument"); - ffi.Pointer _objc_msgSend_1136( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1136( - obj, - sel, - ); - } - - late final __objc_msgSend_1136Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1136 = __objc_msgSend_1136Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_parent1 = _registerName1("parent"); - ffi.Pointer _objc_msgSend_1137( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1137( - obj, - sel, - ); - } - - late final __objc_msgSend_1137Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1137 = __objc_msgSend_1137Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_childCount1 = _registerName1("childCount"); - late final _sel_children1 = _registerName1("children"); - late final _sel_childAtIndex_1 = _registerName1("childAtIndex:"); - ffi.Pointer _objc_msgSend_1138( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ) { - return __objc_msgSend_1138( - obj, - sel, - index, - ); - } - - late final __objc_msgSend_1138Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_1138 = __objc_msgSend_1138Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_previousSibling1 = _registerName1("previousSibling"); - late final _sel_nextSibling1 = _registerName1("nextSibling"); - late final _sel_previousNode1 = _registerName1("previousNode"); - late final _sel_nextNode1 = _registerName1("nextNode"); - late final _sel_detach1 = _registerName1("detach"); - late final _sel_XPath1 = _registerName1("XPath"); - late final _sel_localName1 = _registerName1("localName"); - late final _sel_prefix1 = _registerName1("prefix"); - late final _sel_URI1 = _registerName1("URI"); - late final _sel_setURI_1 = _registerName1("setURI:"); - late final _sel_XMLString1 = _registerName1("XMLString"); - late final _sel_XMLStringWithOptions_1 = - _registerName1("XMLStringWithOptions:"); - ffi.Pointer _objc_msgSend_1139( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ) { - return __objc_msgSend_1139( - obj, - sel, - options, - ); - } - - late final __objc_msgSend_1139Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1139 = __objc_msgSend_1139Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_canonicalXMLStringPreservingComments_1 = - _registerName1("canonicalXMLStringPreservingComments:"); - ffi.Pointer _objc_msgSend_1140( - ffi.Pointer obj, - ffi.Pointer sel, - bool comments, - ) { - return __objc_msgSend_1140( - obj, - sel, - comments, - ); - } - - late final __objc_msgSend_1140Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_1140 = __objc_msgSend_1140Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_nodesForXPath_error_1 = - _registerName1("nodesForXPath:error:"); - late final _sel_objectsForXQuery_constants_error_1 = - _registerName1("objectsForXQuery:constants:error:"); - ffi.Pointer _objc_msgSend_1141( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer xquery, - ffi.Pointer constants, - ffi.Pointer> error, - ) { - return __objc_msgSend_1141( - obj, - sel, - xquery, - constants, - error, - ); - } - - late final __objc_msgSend_1141Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1141 = __objc_msgSend_1141Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_objectsForXQuery_error_1 = - _registerName1("objectsForXQuery:error:"); - late final _sel_initWithName_URI_1 = _registerName1("initWithName:URI:"); - instancetype _objc_msgSend_1142( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer URI, - ) { - return __objc_msgSend_1142( - obj, - sel, - name, - URI, - ); - } - - late final __objc_msgSend_1142Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1142 = __objc_msgSend_1142Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithName_stringValue_1 = - _registerName1("initWithName:stringValue:"); - late final _sel_initWithXMLString_error_1 = - _registerName1("initWithXMLString:error:"); - late final _sel_elementsForName_1 = _registerName1("elementsForName:"); - late final _sel_elementsForLocalName_URI_1 = - _registerName1("elementsForLocalName:URI:"); - ffi.Pointer _objc_msgSend_1143( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer localName, - ffi.Pointer URI, - ) { - return __objc_msgSend_1143( - obj, - sel, - localName, - URI, - ); - } - - late final __objc_msgSend_1143Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1143 = __objc_msgSend_1143Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_addAttribute_1 = _registerName1("addAttribute:"); - late final _sel_removeAttributeForName_1 = - _registerName1("removeAttributeForName:"); - late final _sel_attributes1 = _registerName1("attributes"); - late final _sel_setAttributes_1 = _registerName1("setAttributes:"); - late final _sel_setAttributesWithDictionary_1 = - _registerName1("setAttributesWithDictionary:"); - late final _sel_attributeForName_1 = _registerName1("attributeForName:"); - late final _sel_attributeForLocalName_URI_1 = - _registerName1("attributeForLocalName:URI:"); - ffi.Pointer _objc_msgSend_1144( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer localName, - ffi.Pointer URI, - ) { - return __objc_msgSend_1144( - obj, - sel, - localName, - URI, - ); - } - - late final __objc_msgSend_1144Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1144 = __objc_msgSend_1144Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_addNamespace_1 = _registerName1("addNamespace:"); - late final _sel_removeNamespaceForPrefix_1 = - _registerName1("removeNamespaceForPrefix:"); - late final _sel_namespaces1 = _registerName1("namespaces"); - late final _sel_setNamespaces_1 = _registerName1("setNamespaces:"); - late final _sel_namespaceForPrefix_1 = _registerName1("namespaceForPrefix:"); - late final _sel_resolveNamespaceForName_1 = - _registerName1("resolveNamespaceForName:"); - late final _sel_resolvePrefixForNamespaceURI_1 = - _registerName1("resolvePrefixForNamespaceURI:"); - late final _sel_normalizeAdjacentTextNodesPreservingCDATA_1 = - _registerName1("normalizeAdjacentTextNodesPreservingCDATA:"); - late final _sel_setAttributesAsDictionary_1 = - _registerName1("setAttributesAsDictionary:"); - late final _class_AVAudioSession1 = _getClass1("AVAudioSession"); - late final _sel_sharedInstance1 = _registerName1("sharedInstance"); - ffi.Pointer _objc_msgSend_1145( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1145( - obj, - sel, - ); - } - - late final __objc_msgSend_1145Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1145 = __objc_msgSend_1145Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_availableCategories1 = _registerName1("availableCategories"); - late final _sel_setCategory_error_1 = _registerName1("setCategory:error:"); - late final _sel_setCategory_withOptions_error_1 = - _registerName1("setCategory:withOptions:error:"); - bool _objc_msgSend_1146( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer category, - int options, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1146( - obj, - sel, - category, - options, - outError, - ); - } - - late final __objc_msgSend_1146Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1146 = __objc_msgSend_1146Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_setCategory_mode_options_error_1 = - _registerName1("setCategory:mode:options:error:"); - bool _objc_msgSend_1147( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer category, - ffi.Pointer mode, - int options, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1147( - obj, - sel, - category, - mode, - options, - outError, - ); - } - - late final __objc_msgSend_1147Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1147 = __objc_msgSend_1147Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_setCategory_mode_routeSharingPolicy_options_error_1 = - _registerName1("setCategory:mode:routeSharingPolicy:options:error:"); - bool _objc_msgSend_1148( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer category, - ffi.Pointer mode, - int policy, - int options, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1148( - obj, - sel, - category, - mode, - policy, - options, - outError, - ); - } - - late final __objc_msgSend_1148Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1148 = __objc_msgSend_1148Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer>)>(); - - late final _sel_category1 = _registerName1("category"); - late final _sel_categoryOptions1 = _registerName1("categoryOptions"); - int _objc_msgSend_1149( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1149( - obj, - sel, - ); - } - - late final __objc_msgSend_1149Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1149 = __objc_msgSend_1149Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_routeSharingPolicy1 = _registerName1("routeSharingPolicy"); - int _objc_msgSend_1150( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1150( - obj, - sel, - ); - } - - late final __objc_msgSend_1150Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1150 = __objc_msgSend_1150Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_availableModes1 = _registerName1("availableModes"); - late final _sel_setMode_error_1 = _registerName1("setMode:error:"); - late final _sel_mode1 = _registerName1("mode"); - late final _sel_setAllowHapticsAndSystemSoundsDuringRecording_error_1 = - _registerName1("setAllowHapticsAndSystemSoundsDuringRecording:error:"); - bool _objc_msgSend_1151( - ffi.Pointer obj, - ffi.Pointer sel, - bool inValue, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1151( - obj, - sel, - inValue, - outError, - ); - } - - late final __objc_msgSend_1151Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Bool, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1151 = __objc_msgSend_1151Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, bool, - ffi.Pointer>)>(); - - late final _sel_allowHapticsAndSystemSoundsDuringRecording1 = - _registerName1("allowHapticsAndSystemSoundsDuringRecording"); - late final _sel_recordPermission1 = _registerName1("recordPermission"); - int _objc_msgSend_1152( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1152( - obj, - sel, - ); - } - - late final __objc_msgSend_1152Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1152 = __objc_msgSend_1152Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_requestRecordPermission_1 = - _registerName1("requestRecordPermission:"); - void _objc_msgSend_1153( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> response, - ) { - return __objc_msgSend_1153( - obj, - sel, - response, - ); - } - - late final __objc_msgSend_1153Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1153 = __objc_msgSend_1153Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_overrideOutputAudioPort_error_1 = - _registerName1("overrideOutputAudioPort:error:"); - bool _objc_msgSend_1154( - ffi.Pointer obj, - ffi.Pointer sel, - int portOverride, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1154( - obj, - sel, - portOverride, - outError, - ); - } - - late final __objc_msgSend_1154Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1154 = __objc_msgSend_1154Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer>)>(); - - late final _class_AVAudioSessionPortDescription1 = - _getClass1("AVAudioSessionPortDescription"); - late final _sel_portType1 = _registerName1("portType"); - late final _sel_portName1 = _registerName1("portName"); - late final _sel_UID1 = _registerName1("UID"); - late final _sel_hasHardwareVoiceCallProcessing1 = - _registerName1("hasHardwareVoiceCallProcessing"); - late final _sel_isSpatialAudioEnabled1 = - _registerName1("isSpatialAudioEnabled"); - late final _sel_channels1 = _registerName1("channels"); - late final _sel_dataSources1 = _registerName1("dataSources"); - late final _class_AVAudioSessionDataSourceDescription1 = - _getClass1("AVAudioSessionDataSourceDescription"); - late final _sel_dataSourceID1 = _registerName1("dataSourceID"); - late final _sel_dataSourceName1 = _registerName1("dataSourceName"); - late final _sel_location1 = _registerName1("location"); - late final _sel_orientation1 = _registerName1("orientation"); - late final _sel_supportedPolarPatterns1 = - _registerName1("supportedPolarPatterns"); - late final _sel_selectedPolarPattern1 = - _registerName1("selectedPolarPattern"); - late final _sel_preferredPolarPattern1 = - _registerName1("preferredPolarPattern"); - late final _sel_setPreferredPolarPattern_error_1 = - _registerName1("setPreferredPolarPattern:error:"); - bool _objc_msgSend_1155( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer pattern, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1155( - obj, - sel, - pattern, - outError, - ); - } - - late final __objc_msgSend_1155Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1155 = __objc_msgSend_1155Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_selectedDataSource1 = _registerName1("selectedDataSource"); - ffi.Pointer _objc_msgSend_1156( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1156( - obj, - sel, - ); - } - - late final __objc_msgSend_1156Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1156 = __objc_msgSend_1156Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_preferredDataSource1 = _registerName1("preferredDataSource"); - late final _sel_setPreferredDataSource_error_1 = - _registerName1("setPreferredDataSource:error:"); - bool _objc_msgSend_1157( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer dataSource, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1157( - obj, - sel, - dataSource, - outError, - ); - } - - late final __objc_msgSend_1157Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1157 = __objc_msgSend_1157Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_setPreferredInput_error_1 = - _registerName1("setPreferredInput:error:"); - bool _objc_msgSend_1158( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer inPort, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1158( - obj, - sel, - inPort, - outError, - ); - } - - late final __objc_msgSend_1158Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1158 = __objc_msgSend_1158Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_preferredInput1 = _registerName1("preferredInput"); - ffi.Pointer _objc_msgSend_1159( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1159( - obj, - sel, - ); - } - - late final __objc_msgSend_1159Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1159 = __objc_msgSend_1159Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setPrefersNoInterruptionsFromSystemAlerts_error_1 = - _registerName1("setPrefersNoInterruptionsFromSystemAlerts:error:"); - late final _sel_prefersNoInterruptionsFromSystemAlerts1 = - _registerName1("prefersNoInterruptionsFromSystemAlerts"); - late final _sel_renderingMode1 = _registerName1("renderingMode"); - int _objc_msgSend_1160( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1160( - obj, - sel, - ); - } - - late final __objc_msgSend_1160Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1160 = __objc_msgSend_1160Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setActive_error_1 = _registerName1("setActive:error:"); - late final _sel_setActive_withOptions_error_1 = - _registerName1("setActive:withOptions:error:"); - bool _objc_msgSend_1161( - ffi.Pointer obj, - ffi.Pointer sel, - bool active, - int options, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1161( - obj, - sel, - active, - options, - outError, - ); - } - - late final __objc_msgSend_1161Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1161 = __objc_msgSend_1161Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, bool, int, - ffi.Pointer>)>(); - - late final _sel_activateWithOptions_completionHandler_1 = - _registerName1("activateWithOptions:completionHandler:"); - void _objc_msgSend_1162( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ffi.Pointer<_ObjCBlock> handler, - ) { - return __objc_msgSend_1162( - obj, - sel, - options, - handler, - ); - } - - late final __objc_msgSend_1162Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1162 = __objc_msgSend_1162Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_setPreferredSampleRate_error_1 = - _registerName1("setPreferredSampleRate:error:"); - bool _objc_msgSend_1163( - ffi.Pointer obj, - ffi.Pointer sel, - double sampleRate, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1163( - obj, - sel, - sampleRate, - outError, - ); - } - - late final __objc_msgSend_1163Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1163 = __objc_msgSend_1163Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, double, - ffi.Pointer>)>(); - - late final _sel_preferredSampleRate1 = _registerName1("preferredSampleRate"); - late final _sel_setPreferredIOBufferDuration_error_1 = - _registerName1("setPreferredIOBufferDuration:error:"); - late final _sel_preferredIOBufferDuration1 = - _registerName1("preferredIOBufferDuration"); - late final _sel_setPreferredInputNumberOfChannels_error_1 = - _registerName1("setPreferredInputNumberOfChannels:error:"); - bool _objc_msgSend_1164( - ffi.Pointer obj, - ffi.Pointer sel, - int count, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1164( - obj, - sel, - count, - outError, - ); - } - - late final __objc_msgSend_1164Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Long, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1164 = __objc_msgSend_1164Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer>)>(); - - late final _sel_preferredInputNumberOfChannels1 = - _registerName1("preferredInputNumberOfChannels"); - late final _sel_setPreferredOutputNumberOfChannels_error_1 = - _registerName1("setPreferredOutputNumberOfChannels:error:"); - late final _sel_preferredOutputNumberOfChannels1 = - _registerName1("preferredOutputNumberOfChannels"); - late final _sel_setPreferredInputOrientation_error_1 = - _registerName1("setPreferredInputOrientation:error:"); - bool _objc_msgSend_1165( - ffi.Pointer obj, - ffi.Pointer sel, - int orientation, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1165( - obj, - sel, - orientation, - outError, - ); - } - - late final __objc_msgSend_1165Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1165 = __objc_msgSend_1165Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer>)>(); - - late final _sel_preferredInputOrientation1 = - _registerName1("preferredInputOrientation"); - int _objc_msgSend_1166( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1166( - obj, - sel, - ); - } - - late final __objc_msgSend_1166Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1166 = __objc_msgSend_1166Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_inputOrientation1 = _registerName1("inputOrientation"); - late final _sel_maximumInputNumberOfChannels1 = - _registerName1("maximumInputNumberOfChannels"); - late final _sel_maximumOutputNumberOfChannels1 = - _registerName1("maximumOutputNumberOfChannels"); - late final _sel_setInputGain_error_1 = _registerName1("setInputGain:error:"); - bool _objc_msgSend_1167( - ffi.Pointer obj, - ffi.Pointer sel, - double gain, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1167( - obj, - sel, - gain, - outError, - ); - } - - late final __objc_msgSend_1167Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Float, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1167 = __objc_msgSend_1167Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, double, - ffi.Pointer>)>(); - - late final _sel_inputGain1 = _registerName1("inputGain"); - late final _sel_isInputGainSettable1 = _registerName1("isInputGainSettable"); - late final _sel_isInputAvailable1 = _registerName1("isInputAvailable"); - late final _sel_inputDataSources1 = _registerName1("inputDataSources"); - late final _sel_inputDataSource1 = _registerName1("inputDataSource"); - late final _sel_setInputDataSource_error_1 = - _registerName1("setInputDataSource:error:"); - late final _sel_outputDataSources1 = _registerName1("outputDataSources"); - late final _sel_outputDataSource1 = _registerName1("outputDataSource"); - late final _sel_setOutputDataSource_error_1 = - _registerName1("setOutputDataSource:error:"); - late final _sel_sampleRate1 = _registerName1("sampleRate"); - late final _sel_inputNumberOfChannels1 = - _registerName1("inputNumberOfChannels"); - late final _sel_outputNumberOfChannels1 = - _registerName1("outputNumberOfChannels"); - late final _sel_inputLatency1 = _registerName1("inputLatency"); - late final _sel_outputLatency1 = _registerName1("outputLatency"); - late final _sel_IOBufferDuration1 = _registerName1("IOBufferDuration"); - late final _sel_supportedOutputChannelLayouts1 = - _registerName1("supportedOutputChannelLayouts"); - late final _sel_isOtherAudioPlaying1 = _registerName1("isOtherAudioPlaying"); - late final _sel_secondaryAudioShouldBeSilencedHint1 = - _registerName1("secondaryAudioShouldBeSilencedHint"); - late final _sel_outputVolume1 = _registerName1("outputVolume"); - late final _sel_promptStyle1 = _registerName1("promptStyle"); - int _objc_msgSend_1168( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1168( - obj, - sel, - ); - } - - late final __objc_msgSend_1168Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1168 = __objc_msgSend_1168Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_availableInputs1 = _registerName1("availableInputs"); - late final _class_AVAudioSessionRouteDescription1 = - _getClass1("AVAudioSessionRouteDescription"); - late final _sel_inputs1 = _registerName1("inputs"); - late final _sel_outputs1 = _registerName1("outputs"); - late final _sel_currentRoute1 = _registerName1("currentRoute"); - ffi.Pointer _objc_msgSend_1169( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1169( - obj, - sel, - ); - } - - late final __objc_msgSend_1169Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1169 = __objc_msgSend_1169Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setAggregatedIOPreference_error_1 = - _registerName1("setAggregatedIOPreference:error:"); - bool _objc_msgSend_1170( - ffi.Pointer obj, - ffi.Pointer sel, - int inIOType, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1170( - obj, - sel, - inIOType, - outError, - ); - } - - late final __objc_msgSend_1170Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1170 = __objc_msgSend_1170Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer>)>(); - - late final _sel_setSupportsMultichannelContent_error_1 = - _registerName1("setSupportsMultichannelContent:error:"); - late final _sel_supportsMultichannelContent1 = - _registerName1("supportsMultichannelContent"); - late final _sel_setPrefersInterruptionOnRouteDisconnect_error_1 = - _registerName1("setPrefersInterruptionOnRouteDisconnect:error:"); - late final _sel_prefersInterruptionOnRouteDisconnect1 = - _registerName1("prefersInterruptionOnRouteDisconnect"); - late final _sel_setActive_withFlags_error_1 = - _registerName1("setActive:withFlags:error:"); - bool _objc_msgSend_1171( - ffi.Pointer obj, - ffi.Pointer sel, - bool active, - int flags, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1171( - obj, - sel, - active, - flags, - outError, - ); - } - - late final __objc_msgSend_1171Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Long, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1171 = __objc_msgSend_1171Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, bool, int, - ffi.Pointer>)>(); - - late final _sel_inputIsAvailable1 = _registerName1("inputIsAvailable"); - late final _sel_currentHardwareSampleRate1 = - _registerName1("currentHardwareSampleRate"); - late final _sel_currentHardwareInputNumberOfChannels1 = - _registerName1("currentHardwareInputNumberOfChannels"); - late final _sel_currentHardwareOutputNumberOfChannels1 = - _registerName1("currentHardwareOutputNumberOfChannels"); - late final _sel_setPreferredHardwareSampleRate_error_1 = - _registerName1("setPreferredHardwareSampleRate:error:"); - late final _sel_preferredHardwareSampleRate1 = - _registerName1("preferredHardwareSampleRate"); - late final _class_AVAudioPlayer1 = _getClass1("AVAudioPlayer"); - late final _sel_initWithData_error_1 = _registerName1("initWithData:error:"); - instancetype _objc_msgSend_1172( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1172( - obj, - sel, - data, - outError, - ); - } - - late final __objc_msgSend_1172Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1172 = __objc_msgSend_1172Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_initWithContentsOfURL_fileTypeHint_error_1 = - _registerName1("initWithContentsOfURL:fileTypeHint:error:"); - instancetype _objc_msgSend_1173( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer utiString, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1173( - obj, - sel, - url, - utiString, - outError, - ); - } - - late final __objc_msgSend_1173Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1173 = __objc_msgSend_1173Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_initWithData_fileTypeHint_error_1 = - _registerName1("initWithData:fileTypeHint:error:"); - instancetype _objc_msgSend_1174( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer utiString, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1174( - obj, - sel, - data, - utiString, - outError, - ); - } - - late final __objc_msgSend_1174Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1174 = __objc_msgSend_1174Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_prepareToPlay1 = _registerName1("prepareToPlay"); - late final _sel_play1 = _registerName1("play"); - late final _sel_playAtTime_1 = _registerName1("playAtTime:"); - bool _objc_msgSend_1175( - ffi.Pointer obj, - ffi.Pointer sel, - double time, - ) { - return __objc_msgSend_1175( - obj, - sel, - time, - ); - } - - late final __objc_msgSend_1175Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_1175 = __objc_msgSend_1175Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, double)>(); - - late final _sel_isPlaying1 = _registerName1("isPlaying"); - late final _sel_numberOfChannels1 = _registerName1("numberOfChannels"); - late final _sel_currentDevice1 = _registerName1("currentDevice"); - late final _sel_setCurrentDevice_1 = _registerName1("setCurrentDevice:"); - late final _sel_url1 = _registerName1("url"); - late final _sel_pan1 = _registerName1("pan"); - late final _sel_setPan_1 = _registerName1("setPan:"); - late final _sel_volume1 = _registerName1("volume"); - late final _sel_setVolume_1 = _registerName1("setVolume:"); - late final _sel_setVolume_fadeDuration_1 = - _registerName1("setVolume:fadeDuration:"); - void _objc_msgSend_1176( - ffi.Pointer obj, - ffi.Pointer sel, - double volume, - double duration, - ) { - return __objc_msgSend_1176( - obj, - sel, - volume, - duration, - ); - } - - late final __objc_msgSend_1176Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Float, ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_1176 = __objc_msgSend_1176Ptr.asFunction< - void Function( - ffi.Pointer, ffi.Pointer, double, double)>(); - - late final _sel_enableRate1 = _registerName1("enableRate"); - late final _sel_setEnableRate_1 = _registerName1("setEnableRate:"); - late final _sel_rate1 = _registerName1("rate"); - late final _sel_setRate_1 = _registerName1("setRate:"); - late final _sel_currentTime1 = _registerName1("currentTime"); - late final _sel_setCurrentTime_1 = _registerName1("setCurrentTime:"); - late final _sel_deviceCurrentTime1 = _registerName1("deviceCurrentTime"); - late final _sel_numberOfLoops1 = _registerName1("numberOfLoops"); - late final _sel_setNumberOfLoops_1 = _registerName1("setNumberOfLoops:"); - late final _sel_settings1 = _registerName1("settings"); - late final _class_AVAudioFormat1 = _getClass1("AVAudioFormat"); - late final _sel_initWithStreamDescription_1 = - _registerName1("initWithStreamDescription:"); - instancetype _objc_msgSend_1177( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer asbd, - ) { - return __objc_msgSend_1177( - obj, - sel, - asbd, - ); - } - - late final __objc_msgSend_1177Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1177 = __objc_msgSend_1177Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _class_AVAudioChannelLayout1 = _getClass1("AVAudioChannelLayout"); - late final _sel_initWithLayoutTag_1 = _registerName1("initWithLayoutTag:"); - instancetype _objc_msgSend_1178( - ffi.Pointer obj, - ffi.Pointer sel, - int layoutTag, - ) { - return __objc_msgSend_1178( - obj, - sel, - layoutTag, - ); - } - - late final __objc_msgSend_1178Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_1178 = __objc_msgSend_1178Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithLayout_1 = _registerName1("initWithLayout:"); - instancetype _objc_msgSend_1179( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer layout, - ) { - return __objc_msgSend_1179( - obj, - sel, - layout, - ); - } - - late final __objc_msgSend_1179Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1179 = __objc_msgSend_1179Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_isEqual_1 = _registerName1("isEqual:"); - late final _sel_layoutWithLayoutTag_1 = - _registerName1("layoutWithLayoutTag:"); - instancetype _objc_msgSend_1180( - ffi.Pointer obj, - ffi.Pointer sel, - int layoutTag, - ) { - return __objc_msgSend_1180( - obj, - sel, - layoutTag, - ); - } - - late final __objc_msgSend_1180Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_1180 = __objc_msgSend_1180Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_layoutWithLayout_1 = _registerName1("layoutWithLayout:"); - late final _sel_layoutTag1 = _registerName1("layoutTag"); - late final _sel_layout1 = _registerName1("layout"); - ffi.Pointer _objc_msgSend_1181( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1181( - obj, - sel, - ); - } - - late final __objc_msgSend_1181Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1181 = __objc_msgSend_1181Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_channelCount1 = _registerName1("channelCount"); - int _objc_msgSend_1182( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1182( - obj, - sel, - ); - } - - late final __objc_msgSend_1182Ptr = _lookup< - ffi.NativeFunction< - ffi.Uint32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1182 = __objc_msgSend_1182Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithStreamDescription_channelLayout_1 = - _registerName1("initWithStreamDescription:channelLayout:"); - instancetype _objc_msgSend_1183( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer asbd, - ffi.Pointer layout, - ) { - return __objc_msgSend_1183( - obj, - sel, - asbd, - layout, - ); - } - - late final __objc_msgSend_1183Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1183 = __objc_msgSend_1183Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initStandardFormatWithSampleRate_channels_1 = - _registerName1("initStandardFormatWithSampleRate:channels:"); - instancetype _objc_msgSend_1184( - ffi.Pointer obj, - ffi.Pointer sel, - double sampleRate, - int channels, - ) { - return __objc_msgSend_1184( - obj, - sel, - sampleRate, - channels, - ); - } - - late final __objc_msgSend_1184Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Double, ffi.Uint32)>>('objc_msgSend'); - late final __objc_msgSend_1184 = __objc_msgSend_1184Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, double, int)>(); - - late final _sel_initStandardFormatWithSampleRate_channelLayout_1 = - _registerName1("initStandardFormatWithSampleRate:channelLayout:"); - instancetype _objc_msgSend_1185( - ffi.Pointer obj, - ffi.Pointer sel, - double sampleRate, - ffi.Pointer layout, - ) { - return __objc_msgSend_1185( - obj, - sel, - sampleRate, - layout, - ); - } - - late final __objc_msgSend_1185Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Double, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1185 = __objc_msgSend_1185Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - double, ffi.Pointer)>(); - - late final _sel_initWithCommonFormat_sampleRate_channels_interleaved_1 = - _registerName1("initWithCommonFormat:sampleRate:channels:interleaved:"); - instancetype _objc_msgSend_1186( - ffi.Pointer obj, - ffi.Pointer sel, - int format, - double sampleRate, - int channels, - bool interleaved, - ) { - return __objc_msgSend_1186( - obj, - sel, - format, - sampleRate, - channels, - interleaved, - ); - } - - late final __objc_msgSend_1186Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Double, ffi.Uint32, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_1186 = __objc_msgSend_1186Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - double, int, bool)>(); - - late final _sel_initWithCommonFormat_sampleRate_interleaved_channelLayout_1 = - _registerName1( - "initWithCommonFormat:sampleRate:interleaved:channelLayout:"); - instancetype _objc_msgSend_1187( - ffi.Pointer obj, - ffi.Pointer sel, - int format, - double sampleRate, - bool interleaved, - ffi.Pointer layout, - ) { - return __objc_msgSend_1187( - obj, - sel, - format, - sampleRate, - interleaved, - layout, - ); - } - - late final __objc_msgSend_1187Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Double, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1187 = __objc_msgSend_1187Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - double, bool, ffi.Pointer)>(); - - late final _sel_initWithSettings_1 = _registerName1("initWithSettings:"); - late final _sel_initWithCMAudioFormatDescription_1 = - _registerName1("initWithCMAudioFormatDescription:"); - instancetype _objc_msgSend_1188( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer formatDescription, - ) { - return __objc_msgSend_1188( - obj, - sel, - formatDescription, - ); - } - - late final __objc_msgSend_1188Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1188 = __objc_msgSend_1188Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_isStandard1 = _registerName1("isStandard"); - late final _sel_commonFormat1 = _registerName1("commonFormat"); - int _objc_msgSend_1189( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1189( - obj, - sel, - ); - } - - late final __objc_msgSend_1189Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1189 = __objc_msgSend_1189Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_isInterleaved1 = _registerName1("isInterleaved"); - late final _sel_streamDescription1 = _registerName1("streamDescription"); - ffi.Pointer _objc_msgSend_1190( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1190( - obj, - sel, - ); - } - - late final __objc_msgSend_1190Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1190 = __objc_msgSend_1190Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_channelLayout1 = _registerName1("channelLayout"); - ffi.Pointer _objc_msgSend_1191( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1191( - obj, - sel, - ); - } - - late final __objc_msgSend_1191Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1191 = __objc_msgSend_1191Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_magicCookie1 = _registerName1("magicCookie"); - late final _sel_setMagicCookie_1 = _registerName1("setMagicCookie:"); - late final _sel_formatDescription1 = _registerName1("formatDescription"); - ffi.Pointer _objc_msgSend_1192( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1192( - obj, - sel, - ); - } - - late final __objc_msgSend_1192Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1192 = __objc_msgSend_1192Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - ffi.Pointer _objc_msgSend_1193( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1193( - obj, - sel, - ); - } - - late final __objc_msgSend_1193Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1193 = __objc_msgSend_1193Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_isMeteringEnabled1 = _registerName1("isMeteringEnabled"); - late final _sel_setMeteringEnabled_1 = _registerName1("setMeteringEnabled:"); - late final _sel_updateMeters1 = _registerName1("updateMeters"); - late final _sel_peakPowerForChannel_1 = - _registerName1("peakPowerForChannel:"); - double _objc_msgSend_1194( - ffi.Pointer obj, - ffi.Pointer sel, - int channelNumber, - ) { - return __objc_msgSend_1194( - obj, - sel, - channelNumber, - ); - } - - late final __objc_msgSend_1194Ptr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_1194 = __objc_msgSend_1194Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer, int)>(); - - double _objc_msgSend_1194_fpret( - ffi.Pointer obj, - ffi.Pointer sel, - int channelNumber, - ) { - return __objc_msgSend_1194_fpret( - obj, - sel, - channelNumber, - ); - } - - late final __objc_msgSend_1194_fpretPtr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend_fpret'); - late final __objc_msgSend_1194_fpret = - __objc_msgSend_1194_fpretPtr.asFunction< - double Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_averagePowerForChannel_1 = - _registerName1("averagePowerForChannel:"); - late final _sel_channelAssignments1 = _registerName1("channelAssignments"); - late final _sel_setChannelAssignments_1 = - _registerName1("setChannelAssignments:"); -} - -class _ObjCWrapper implements ffi.Finalizable { - final ffi.Pointer _id; - final AVFAudio _lib; - bool _pendingRelease; - - _ObjCWrapper._(this._id, this._lib, - {bool retain = false, bool release = false}) - : _pendingRelease = release { - if (retain) { - _lib._objc_retain(_id.cast()); - } - if (release) { - _lib._objc_releaseFinalizer2.attach(this, _id.cast(), detach: this); - } - } - - /// Releases the reference to the underlying ObjC object held by this wrapper. - /// Throws a StateError if this wrapper doesn't currently hold a reference. - void release() { - if (_pendingRelease) { - _pendingRelease = false; - _lib._objc_release(_id.cast()); - _lib._objc_releaseFinalizer2.detach(this); - } else { - throw StateError( - 'Released an ObjC object that was unowned or already released.'); - } - } - - @override - bool operator ==(Object other) { - return other is _ObjCWrapper && _id == other._id; - } - - @override - int get hashCode => _id.hashCode; - - /// Return a pointer to this object. - ffi.Pointer get pointer => _id; - - ffi.Pointer retainAndReturnPointer() { - _lib._objc_retain(_id.cast()); - return _id; - } -} - -class NSObject extends _ObjCWrapper { - NSObject._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSObject] that points to the same underlying object as [other]. - static NSObject castFrom(T other) { - return NSObject._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSObject] that wraps the given raw object pointer. - static NSObject castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSObject._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSObject]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSObject1); - } - - static void load(AVFAudio _lib) { - _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_load1); - } - - static void initialize(AVFAudio _lib) { - _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_initialize1); - } - - NSObject init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_new1); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - static NSObject allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSObject1, _lib._sel_allocWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - static NSObject alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_alloc1); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - void dealloc() { - _lib._objc_msgSend_1(_id, _lib._sel_dealloc1); - } - - void finalize() { - _lib._objc_msgSend_1(_id, _lib._sel_finalize1); - } - - NSObject copy() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_copy1); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - NSObject mutableCopy() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_mutableCopy1); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - static NSObject copyWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSObject1, _lib._sel_copyWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - static NSObject mutableCopyWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSObject1, _lib._sel_mutableCopyWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - static bool instancesRespondToSelector_( - AVFAudio _lib, ffi.Pointer aSelector) { - return _lib._objc_msgSend_4(_lib._class_NSObject1, - _lib._sel_instancesRespondToSelector_1, aSelector); - } - - static bool conformsToProtocol_(AVFAudio _lib, Protocol protocol) { - return _lib._objc_msgSend_5( - _lib._class_NSObject1, _lib._sel_conformsToProtocol_1, protocol._id); - } - - ffi.Pointer> methodForSelector_( - ffi.Pointer aSelector) { - return _lib._objc_msgSend_6(_id, _lib._sel_methodForSelector_1, aSelector); - } - - static ffi.Pointer> - instanceMethodForSelector_( - AVFAudio _lib, ffi.Pointer aSelector) { - return _lib._objc_msgSend_6(_lib._class_NSObject1, - _lib._sel_instanceMethodForSelector_1, aSelector); - } - - void doesNotRecognizeSelector_(ffi.Pointer aSelector) { - _lib._objc_msgSend_7(_id, _lib._sel_doesNotRecognizeSelector_1, aSelector); - } - - NSObject forwardingTargetForSelector_(ffi.Pointer aSelector) { - final _ret = _lib._objc_msgSend_8( - _id, _lib._sel_forwardingTargetForSelector_1, aSelector); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - void forwardInvocation_(NSInvocation anInvocation) { - _lib._objc_msgSend_421( - _id, _lib._sel_forwardInvocation_1, anInvocation._id); - } - - NSMethodSignature methodSignatureForSelector_( - ffi.Pointer aSelector) { - final _ret = _lib._objc_msgSend_422( - _id, _lib._sel_methodSignatureForSelector_1, aSelector); - return NSMethodSignature._(_ret, _lib, retain: true, release: true); - } - - static NSMethodSignature instanceMethodSignatureForSelector_( - AVFAudio _lib, ffi.Pointer aSelector) { - final _ret = _lib._objc_msgSend_422(_lib._class_NSObject1, - _lib._sel_instanceMethodSignatureForSelector_1, aSelector); - return NSMethodSignature._(_ret, _lib, retain: true, release: true); - } - - bool allowsWeakReference() { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsWeakReference1); - } - - bool retainWeakReference() { - return _lib._objc_msgSend_12(_id, _lib._sel_retainWeakReference1); - } - - static bool isSubclassOfClass_(AVFAudio _lib, NSObject aClass) { - return _lib._objc_msgSend_0( - _lib._class_NSObject1, _lib._sel_isSubclassOfClass_1, aClass._id); - } - - static bool resolveClassMethod_(AVFAudio _lib, ffi.Pointer sel) { - return _lib._objc_msgSend_4( - _lib._class_NSObject1, _lib._sel_resolveClassMethod_1, sel); - } - - static bool resolveInstanceMethod_(AVFAudio _lib, ffi.Pointer sel) { - return _lib._objc_msgSend_4( - _lib._class_NSObject1, _lib._sel_resolveInstanceMethod_1, sel); - } - - static int hash(AVFAudio _lib) { - return _lib._objc_msgSend_10(_lib._class_NSObject1, _lib._sel_hash1); - } - - static NSObject superclass(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_superclass1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject class1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_class1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSString description(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_21(_lib._class_NSObject1, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString debugDescription(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_21( - _lib._class_NSObject1, _lib._sel_debugDescription1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static int version(AVFAudio _lib) { - return _lib._objc_msgSend_83(_lib._class_NSObject1, _lib._sel_version1); - } - - static void setVersion_(AVFAudio _lib, int aVersion) { - _lib._objc_msgSend_423( - _lib._class_NSObject1, _lib._sel_setVersion_1, aVersion); - } - - NSObject get classForCoder { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_classForCoder1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? replacementObjectForCoder_(NSCoder coder) { - final _ret = _lib._objc_msgSend_47( - _id, _lib._sel_replacementObjectForCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? awakeAfterUsingCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_awakeAfterUsingCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: false, release: true); - } - - static void poseAsClass_(AVFAudio _lib, NSObject aClass) { - _lib._objc_msgSend_15( - _lib._class_NSObject1, _lib._sel_poseAsClass_1, aClass._id); - } - - NSObject get autoContentAccessingProxy { - final _ret = - _lib._objc_msgSend_2(_id, _lib._sel_autoContentAccessingProxy1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - void - attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_( - NSError error, - int recoveryOptionIndex, - NSObject? delegate, - ffi.Pointer didRecoverSelector, - ffi.Pointer contextInfo) { - _lib._objc_msgSend_424( - _id, - _lib._sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1, - error._id, - recoveryOptionIndex, - delegate?._id ?? ffi.nullptr, - didRecoverSelector, - contextInfo); - } - - bool attemptRecoveryFromError_optionIndex_( - NSError error, int recoveryOptionIndex) { - return _lib._objc_msgSend_425( - _id, - _lib._sel_attemptRecoveryFromError_optionIndex_1, - error._id, - recoveryOptionIndex); - } - - void performSelector_withObject_afterDelay_inModes_( - ffi.Pointer aSelector, - NSObject? anArgument, - double delay, - NSArray modes) { - _lib._objc_msgSend_426( - _id, - _lib._sel_performSelector_withObject_afterDelay_inModes_1, - aSelector, - anArgument?._id ?? ffi.nullptr, - delay, - modes._id); - } - - void performSelector_withObject_afterDelay_( - ffi.Pointer aSelector, NSObject? anArgument, double delay) { - _lib._objc_msgSend_427( - _id, - _lib._sel_performSelector_withObject_afterDelay_1, - aSelector, - anArgument?._id ?? ffi.nullptr, - delay); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSObject1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSObject1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - void URL_resourceDataDidBecomeAvailable_(NSURL sender, NSData newBytes) { - _lib._objc_msgSend_428(_id, _lib._sel_URL_resourceDataDidBecomeAvailable_1, - sender._id, newBytes._id); - } - - void URLResourceDidFinishLoading_(NSURL sender) { - _lib._objc_msgSend_429( - _id, _lib._sel_URLResourceDidFinishLoading_1, sender._id); - } - - void URLResourceDidCancelLoading_(NSURL sender) { - _lib._objc_msgSend_429( - _id, _lib._sel_URLResourceDidCancelLoading_1, sender._id); - } - - void URL_resourceDidFailLoadingWithReason_(NSURL sender, NSString reason) { - _lib._objc_msgSend_430( - _id, - _lib._sel_URL_resourceDidFailLoadingWithReason_1, - sender._id, - reason._id); - } - - bool fileManager_shouldProceedAfterError_( - NSFileManager fm, NSDictionary errorInfo) { - return _lib._objc_msgSend_467(_id, - _lib._sel_fileManager_shouldProceedAfterError_1, fm._id, errorInfo._id); - } - - void fileManager_willProcessPath_(NSFileManager fm, NSString path) { - _lib._objc_msgSend_468( - _id, _lib._sel_fileManager_willProcessPath_1, fm._id, path._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSObject1, _lib._sel_accessInstanceVariablesDirectly1); - } - - NSObject? valueForKey_(NSString key) { - final _ret = _lib._objc_msgSend_38(_id, _lib._sel_valueForKey_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void setValue_forKey_(NSObject? value, NSString key) { - _lib._objc_msgSend_135( - _id, _lib._sel_setValue_forKey_1, value?._id ?? ffi.nullptr, key._id); - } - - bool validateValue_forKey_error_(ffi.Pointer> ioValue, - NSString inKey, ffi.Pointer> outError) { - return _lib._objc_msgSend_243(_id, _lib._sel_validateValue_forKey_error_1, - ioValue, inKey._id, outError); - } - - NSMutableArray mutableArrayValueForKey_(NSString key) { - final _ret = _lib._objc_msgSend_488( - _id, _lib._sel_mutableArrayValueForKey_1, key._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - NSMutableOrderedSet mutableOrderedSetValueForKey_(NSString key) { - final _ret = _lib._objc_msgSend_506( - _id, _lib._sel_mutableOrderedSetValueForKey_1, key._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSMutableSet mutableSetValueForKey_(NSString key) { - final _ret = - _lib._objc_msgSend_507(_id, _lib._sel_mutableSetValueForKey_1, key._id); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - NSObject? valueForKeyPath_(NSString keyPath) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_valueForKeyPath_1, keyPath._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void setValue_forKeyPath_(NSObject? value, NSString keyPath) { - _lib._objc_msgSend_135(_id, _lib._sel_setValue_forKeyPath_1, - value?._id ?? ffi.nullptr, keyPath._id); - } - - bool validateValue_forKeyPath_error_( - ffi.Pointer> ioValue, - NSString inKeyPath, - ffi.Pointer> outError) { - return _lib._objc_msgSend_243( - _id, - _lib._sel_validateValue_forKeyPath_error_1, - ioValue, - inKeyPath._id, - outError); - } - - NSMutableArray mutableArrayValueForKeyPath_(NSString keyPath) { - final _ret = _lib._objc_msgSend_488( - _id, _lib._sel_mutableArrayValueForKeyPath_1, keyPath._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - NSMutableOrderedSet mutableOrderedSetValueForKeyPath_(NSString keyPath) { - final _ret = _lib._objc_msgSend_506( - _id, _lib._sel_mutableOrderedSetValueForKeyPath_1, keyPath._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSMutableSet mutableSetValueForKeyPath_(NSString keyPath) { - final _ret = _lib._objc_msgSend_507( - _id, _lib._sel_mutableSetValueForKeyPath_1, keyPath._id); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - NSObject? valueForUndefinedKey_(NSString key) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_valueForUndefinedKey_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void setValue_forUndefinedKey_(NSObject? value, NSString key) { - _lib._objc_msgSend_135(_id, _lib._sel_setValue_forUndefinedKey_1, - value?._id ?? ffi.nullptr, key._id); - } - - void setNilValueForKey_(NSString key) { - _lib._objc_msgSend_247(_id, _lib._sel_setNilValueForKey_1, key._id); - } - - NSDictionary dictionaryWithValuesForKeys_(NSArray keys) { - final _ret = _lib._objc_msgSend_508( - _id, _lib._sel_dictionaryWithValuesForKeys_1, keys._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - void setValuesForKeysWithDictionary_(NSDictionary keyedValues) { - _lib._objc_msgSend_509( - _id, _lib._sel_setValuesForKeysWithDictionary_1, keyedValues._id); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSObject1, _lib._sel_useStoredAccessor1); - } - - NSObject? storedValueForKey_(NSString key) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_storedValueForKey_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void takeStoredValue_forKey_(NSObject? value, NSString key) { - _lib._objc_msgSend_135(_id, _lib._sel_takeStoredValue_forKey_1, - value?._id ?? ffi.nullptr, key._id); - } - - void takeValue_forKey_(NSObject? value, NSString key) { - _lib._objc_msgSend_135( - _id, _lib._sel_takeValue_forKey_1, value?._id ?? ffi.nullptr, key._id); - } - - void takeValue_forKeyPath_(NSObject? value, NSString keyPath) { - _lib._objc_msgSend_135(_id, _lib._sel_takeValue_forKeyPath_1, - value?._id ?? ffi.nullptr, keyPath._id); - } - - NSObject? handleQueryWithUnboundKey_(NSString key) { - final _ret = _lib._objc_msgSend_38( - _id, _lib._sel_handleQueryWithUnboundKey_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void handleTakeValue_forUnboundKey_(NSObject? value, NSString key) { - _lib._objc_msgSend_135(_id, _lib._sel_handleTakeValue_forUnboundKey_1, - value?._id ?? ffi.nullptr, key._id); - } - - void unableToSetNilForKey_(NSString key) { - _lib._objc_msgSend_247(_id, _lib._sel_unableToSetNilForKey_1, key._id); - } - - NSDictionary valuesForKeys_(NSArray keys) { - final _ret = - _lib._objc_msgSend_508(_id, _lib._sel_valuesForKeys_1, keys._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - void takeValuesFromDictionary_(NSDictionary properties) { - _lib._objc_msgSend_509( - _id, _lib._sel_takeValuesFromDictionary_1, properties._id); - } - - void observeValueForKeyPath_ofObject_change_context_(NSString? keyPath, - NSObject? object, NSDictionary? change, ffi.Pointer context) { - _lib._objc_msgSend_510( - _id, - _lib._sel_observeValueForKeyPath_ofObject_change_context_1, - keyPath?._id ?? ffi.nullptr, - object?._id ?? ffi.nullptr, - change?._id ?? ffi.nullptr, - context); - } - - void addObserver_forKeyPath_options_context_(NSObject observer, - NSString keyPath, int options, ffi.Pointer context) { - _lib._objc_msgSend_139( - _id, - _lib._sel_addObserver_forKeyPath_options_context_1, - observer._id, - keyPath._id, - options, - context); - } - - void removeObserver_forKeyPath_context_( - NSObject observer, NSString keyPath, ffi.Pointer context) { - _lib._objc_msgSend_140(_id, _lib._sel_removeObserver_forKeyPath_context_1, - observer._id, keyPath._id, context); - } - - void removeObserver_forKeyPath_(NSObject observer, NSString keyPath) { - _lib._objc_msgSend_141( - _id, _lib._sel_removeObserver_forKeyPath_1, observer._id, keyPath._id); - } - - void willChangeValueForKey_(NSString key) { - _lib._objc_msgSend_247(_id, _lib._sel_willChangeValueForKey_1, key._id); - } - - void didChangeValueForKey_(NSString key) { - _lib._objc_msgSend_247(_id, _lib._sel_didChangeValueForKey_1, key._id); - } - - void willChange_valuesAtIndexes_forKey_( - int changeKind, NSIndexSet indexes, NSString key) { - _lib._objc_msgSend_511(_id, _lib._sel_willChange_valuesAtIndexes_forKey_1, - changeKind, indexes._id, key._id); - } - - void didChange_valuesAtIndexes_forKey_( - int changeKind, NSIndexSet indexes, NSString key) { - _lib._objc_msgSend_511(_id, _lib._sel_didChange_valuesAtIndexes_forKey_1, - changeKind, indexes._id, key._id); - } - - void willChangeValueForKey_withSetMutation_usingObjects_( - NSString key, int mutationKind, NSSet objects) { - _lib._objc_msgSend_512( - _id, - _lib._sel_willChangeValueForKey_withSetMutation_usingObjects_1, - key._id, - mutationKind, - objects._id); - } - - void didChangeValueForKey_withSetMutation_usingObjects_( - NSString key, int mutationKind, NSSet objects) { - _lib._objc_msgSend_512( - _id, - _lib._sel_didChangeValueForKey_withSetMutation_usingObjects_1, - key._id, - mutationKind, - objects._id); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSObject1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSObject1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - ffi.Pointer get observationInfo { - return _lib._objc_msgSend_20(_id, _lib._sel_observationInfo1); - } - - set observationInfo(ffi.Pointer value) { - return _lib._objc_msgSend_513(_id, _lib._sel_setObservationInfo_1, value); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSObject1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - NSObject? get classForKeyedArchiver { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_classForKeyedArchiver1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? replacementObjectForKeyedArchiver_(NSKeyedArchiver archiver) { - final _ret = _lib._objc_msgSend_528( - _id, _lib._sel_replacementObjectForKeyedArchiver_1, archiver._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSObject1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSObject1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - void performSelectorOnMainThread_withObject_waitUntilDone_modes_( - ffi.Pointer aSelector, - NSObject? arg, - bool wait, - NSArray? array) { - _lib._objc_msgSend_529( - _id, - _lib._sel_performSelectorOnMainThread_withObject_waitUntilDone_modes_1, - aSelector, - arg?._id ?? ffi.nullptr, - wait, - array?._id ?? ffi.nullptr); - } - - void performSelectorOnMainThread_withObject_waitUntilDone_( - ffi.Pointer aSelector, NSObject? arg, bool wait) { - _lib._objc_msgSend_530( - _id, - _lib._sel_performSelectorOnMainThread_withObject_waitUntilDone_1, - aSelector, - arg?._id ?? ffi.nullptr, - wait); - } - - void performSelector_onThread_withObject_waitUntilDone_modes_( - ffi.Pointer aSelector, - NSThread thr, - NSObject? arg, - bool wait, - NSArray? array) { - _lib._objc_msgSend_548( - _id, - _lib._sel_performSelector_onThread_withObject_waitUntilDone_modes_1, - aSelector, - thr._id, - arg?._id ?? ffi.nullptr, - wait, - array?._id ?? ffi.nullptr); - } - - void performSelector_onThread_withObject_waitUntilDone_( - ffi.Pointer aSelector, NSThread thr, NSObject? arg, bool wait) { - _lib._objc_msgSend_549( - _id, - _lib._sel_performSelector_onThread_withObject_waitUntilDone_1, - aSelector, - thr._id, - arg?._id ?? ffi.nullptr, - wait); - } - - void performSelectorInBackground_withObject_( - ffi.Pointer aSelector, NSObject? arg) { - _lib._objc_msgSend_90( - _id, - _lib._sel_performSelectorInBackground_withObject_1, - aSelector, - arg?._id ?? ffi.nullptr); - } - - NSObject? get classForArchiver { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_classForArchiver1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? replacementObjectForArchiver_(NSArchiver archiver) { - final _ret = _lib._objc_msgSend_552( - _id, _lib._sel_replacementObjectForArchiver_1, archiver._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject get classForPortCoder { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_classForPortCoder1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? replacementObjectForPortCoder_(NSPortCoder coder) { - final _ret = _lib._objc_msgSend_597( - _id, _lib._sel_replacementObjectForPortCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSClassDescription get classDescription { - final _ret = _lib._objc_msgSend_600(_id, _lib._sel_classDescription1); - return NSClassDescription._(_ret, _lib, retain: true, release: true); - } - - NSArray get attributeKeys { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_attributeKeys1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray get toOneRelationshipKeys { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_toOneRelationshipKeys1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray get toManyRelationshipKeys { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_toManyRelationshipKeys1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSString? inverseForRelationshipKey_(NSString relationshipKey) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_inverseForRelationshipKey_1, relationshipKey._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSObject? scriptingValueForSpecifier_( - NSScriptObjectSpecifier objectSpecifier) { - final _ret = _lib._objc_msgSend_649( - _id, _lib._sel_scriptingValueForSpecifier_1, objectSpecifier._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? get scriptingProperties { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_scriptingProperties1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - set scriptingProperties(NSDictionary? value) { - return _lib._objc_msgSend_634( - _id, _lib._sel_setScriptingProperties_1, value?._id ?? ffi.nullptr); - } - - NSObject? copyScriptingValue_forKey_withProperties_( - NSObject value, NSString key, NSDictionary properties) { - final _ret = _lib._objc_msgSend_650( - _id, - _lib._sel_copyScriptingValue_forKey_withProperties_1, - value._id, - key._id, - properties._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: false, release: true); - } - - NSObject? - newScriptingObjectOfClass_forValueForKey_withContentsValue_properties_( - NSObject objectClass, - NSString key, - NSObject? contentsValue, - NSDictionary properties) { - final _ret = _lib._objc_msgSend_651( - _id, - _lib._sel_newScriptingObjectOfClass_forValueForKey_withContentsValue_properties_1, - objectClass._id, - key._id, - contentsValue?._id ?? ffi.nullptr, - properties._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: false, release: true); - } - - int get classCode { - return _lib._objc_msgSend_214(_id, _lib._sel_classCode1); - } - - NSString? get className { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_className1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSObject? valueAtIndex_inPropertyWithKey_(int index, NSString key) { - final _ret = _lib._objc_msgSend_652( - _id, _lib._sel_valueAtIndex_inPropertyWithKey_1, index, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? valueWithName_inPropertyWithKey_(NSString name, NSString key) { - final _ret = _lib._objc_msgSend_175( - _id, _lib._sel_valueWithName_inPropertyWithKey_1, name._id, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? valueWithUniqueID_inPropertyWithKey_( - NSObject uniqueID, NSString key) { - final _ret = _lib._objc_msgSend_311(_id, - _lib._sel_valueWithUniqueID_inPropertyWithKey_1, uniqueID._id, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void insertValue_atIndex_inPropertyWithKey_( - NSObject value, int index, NSString key) { - _lib._objc_msgSend_653( - _id, - _lib._sel_insertValue_atIndex_inPropertyWithKey_1, - value._id, - index, - key._id); - } - - void removeValueAtIndex_fromPropertyWithKey_(int index, NSString key) { - _lib._objc_msgSend_654(_id, - _lib._sel_removeValueAtIndex_fromPropertyWithKey_1, index, key._id); - } - - void replaceValueAtIndex_inPropertyWithKey_withValue_( - int index, NSString key, NSObject value) { - _lib._objc_msgSend_655( - _id, - _lib._sel_replaceValueAtIndex_inPropertyWithKey_withValue_1, - index, - key._id, - value._id); - } - - void insertValue_inPropertyWithKey_(NSObject value, NSString key) { - _lib._objc_msgSend_656( - _id, _lib._sel_insertValue_inPropertyWithKey_1, value._id, key._id); - } - - NSObject? coerceValue_forKey_(NSObject? value, NSString key) { - final _ret = _lib._objc_msgSend_657(_id, _lib._sel_coerceValue_forKey_1, - value?._id ?? ffi.nullptr, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSScriptObjectSpecifier? get objectSpecifier { - final _ret = _lib._objc_msgSend_632(_id, _lib._sel_objectSpecifier1); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); - } - - NSArray? indicesOfObjectsByEvaluatingObjectSpecifier_( - NSScriptObjectSpecifier specifier) { - final _ret = _lib._objc_msgSend_658(_id, - _lib._sel_indicesOfObjectsByEvaluatingObjectSpecifier_1, specifier._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - bool isEqualTo_(NSObject? object) { - return _lib._objc_msgSend_217( - _id, _lib._sel_isEqualTo_1, object?._id ?? ffi.nullptr); - } - - bool isLessThanOrEqualTo_(NSObject? object) { - return _lib._objc_msgSend_217( - _id, _lib._sel_isLessThanOrEqualTo_1, object?._id ?? ffi.nullptr); - } - - bool isLessThan_(NSObject? object) { - return _lib._objc_msgSend_217( - _id, _lib._sel_isLessThan_1, object?._id ?? ffi.nullptr); - } - - bool isGreaterThanOrEqualTo_(NSObject? object) { - return _lib._objc_msgSend_217( - _id, _lib._sel_isGreaterThanOrEqualTo_1, object?._id ?? ffi.nullptr); - } - - bool isGreaterThan_(NSObject? object) { - return _lib._objc_msgSend_217( - _id, _lib._sel_isGreaterThan_1, object?._id ?? ffi.nullptr); - } - - bool isNotEqualTo_(NSObject? object) { - return _lib._objc_msgSend_217( - _id, _lib._sel_isNotEqualTo_1, object?._id ?? ffi.nullptr); - } - - bool doesContain_(NSObject object) { - return _lib._objc_msgSend_0(_id, _lib._sel_doesContain_1, object._id); - } - - bool isLike_(NSString object) { - return _lib._objc_msgSend_64(_id, _lib._sel_isLike_1, object._id); - } - - bool isCaseInsensitiveLike_(NSString object) { - return _lib._objc_msgSend_64( - _id, _lib._sel_isCaseInsensitiveLike_1, object._id); - } - - bool scriptingIsEqualTo_(NSObject object) { - return _lib._objc_msgSend_0( - _id, _lib._sel_scriptingIsEqualTo_1, object._id); - } - - bool scriptingIsLessThanOrEqualTo_(NSObject object) { - return _lib._objc_msgSend_0( - _id, _lib._sel_scriptingIsLessThanOrEqualTo_1, object._id); - } - - bool scriptingIsLessThan_(NSObject object) { - return _lib._objc_msgSend_0( - _id, _lib._sel_scriptingIsLessThan_1, object._id); - } - - bool scriptingIsGreaterThanOrEqualTo_(NSObject object) { - return _lib._objc_msgSend_0( - _id, _lib._sel_scriptingIsGreaterThanOrEqualTo_1, object._id); - } - - bool scriptingIsGreaterThan_(NSObject object) { - return _lib._objc_msgSend_0( - _id, _lib._sel_scriptingIsGreaterThan_1, object._id); - } - - bool scriptingBeginsWith_(NSObject object) { - return _lib._objc_msgSend_0( - _id, _lib._sel_scriptingBeginsWith_1, object._id); - } - - bool scriptingEndsWith_(NSObject object) { - return _lib._objc_msgSend_0(_id, _lib._sel_scriptingEndsWith_1, object._id); - } - - bool scriptingContains_(NSObject object) { - return _lib._objc_msgSend_0(_id, _lib._sel_scriptingContains_1, object._id); - } -} - -final class ObjCSel extends ffi.Opaque {} - -final class ObjCObject extends ffi.Opaque {} - -typedef instancetype = ffi.Pointer; -typedef Dartinstancetype = NSObject; - -final class _NSZone extends ffi.Opaque {} - -class Protocol extends _ObjCWrapper { - Protocol._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [Protocol] that points to the same underlying object as [other]. - static Protocol castFrom(T other) { - return Protocol._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [Protocol] that wraps the given raw object pointer. - static Protocol castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return Protocol._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [Protocol]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_Protocol1); - } -} - -class NSInvocation extends NSObject { - NSInvocation._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSInvocation] that points to the same underlying object as [other]. - static NSInvocation castFrom(T other) { - return NSInvocation._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSInvocation] that wraps the given raw object pointer. - static NSInvocation castFromPointer( - AVFAudio 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); - } - - static NSInvocation invocationWithMethodSignature_( - AVFAudio _lib, NSMethodSignature sig) { - final _ret = _lib._objc_msgSend_414(_lib._class_NSInvocation1, - _lib._sel_invocationWithMethodSignature_1, sig._id); - return NSInvocation._(_ret, _lib, retain: true, release: true); - } - - NSMethodSignature get methodSignature { - final _ret = _lib._objc_msgSend_415(_id, _lib._sel_methodSignature1); - return NSMethodSignature._(_ret, _lib, retain: true, release: true); - } - - void retainArguments() { - _lib._objc_msgSend_1(_id, _lib._sel_retainArguments1); - } - - bool get argumentsRetained { - return _lib._objc_msgSend_12(_id, _lib._sel_argumentsRetained1); - } - - NSObject? get target { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_target1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - set target(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setTarget_1, value?._id ?? ffi.nullptr); - } - - ffi.Pointer get selector { - return _lib._objc_msgSend_417(_id, _lib._sel_selector1); - } - - set selector(ffi.Pointer value) { - return _lib._objc_msgSend_418(_id, _lib._sel_setSelector_1, value); - } - - void getReturnValue_(ffi.Pointer retLoc) { - _lib._objc_msgSend_52(_id, _lib._sel_getReturnValue_1, retLoc); - } - - void setReturnValue_(ffi.Pointer retLoc) { - _lib._objc_msgSend_52(_id, _lib._sel_setReturnValue_1, retLoc); - } - - void getArgument_atIndex_(ffi.Pointer argumentLocation, int idx) { - _lib._objc_msgSend_419( - _id, _lib._sel_getArgument_atIndex_1, argumentLocation, idx); - } - - void setArgument_atIndex_(ffi.Pointer argumentLocation, int idx) { - _lib._objc_msgSend_419( - _id, _lib._sel_setArgument_atIndex_1, argumentLocation, idx); - } - - void invoke() { - _lib._objc_msgSend_1(_id, _lib._sel_invoke1); - } - - void invokeWithTarget_(NSObject target) { - _lib._objc_msgSend_15(_id, _lib._sel_invokeWithTarget_1, target._id); - } - - void invokeUsingIMP_( - ffi.Pointer> imp) { - _lib._objc_msgSend_420(_id, _lib._sel_invokeUsingIMP_1, imp); - } - - @override - NSInvocation init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSInvocation._(_ret, _lib, retain: true, release: true); - } - - static NSInvocation new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSInvocation1, _lib._sel_new1); - return NSInvocation._(_ret, _lib, retain: false, release: true); - } - - static NSInvocation allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSInvocation1, _lib._sel_allocWithZone_1, zone); - return NSInvocation._(_ret, _lib, retain: false, release: true); - } - - static NSInvocation alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSInvocation1, _lib._sel_alloc1); - return NSInvocation._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSInvocation1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSInvocation1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSInvocation1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSInvocation1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSInvocation1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSInvocation1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSInvocation1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSInvocation1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSInvocation1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSMethodSignature extends NSObject { - NSMethodSignature._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSMethodSignature] that points to the same underlying object as [other]. - static NSMethodSignature castFrom(T other) { - return NSMethodSignature._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSMethodSignature] that wraps the given raw object pointer. - static NSMethodSignature castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMethodSignature._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMethodSignature]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMethodSignature1); - } - - static NSMethodSignature? signatureWithObjCTypes_( - AVFAudio _lib, ffi.Pointer types) { - final _ret = _lib._objc_msgSend_9(_lib._class_NSMethodSignature1, - _lib._sel_signatureWithObjCTypes_1, types); - return _ret.address == 0 - ? null - : NSMethodSignature._(_ret, _lib, retain: true, release: true); - } - - int get numberOfArguments { - return _lib._objc_msgSend_10(_id, _lib._sel_numberOfArguments1); - } - - ffi.Pointer getArgumentTypeAtIndex_(int idx) { - return _lib._objc_msgSend_11(_id, _lib._sel_getArgumentTypeAtIndex_1, idx); - } - - int get frameLength { - return _lib._objc_msgSend_10(_id, _lib._sel_frameLength1); - } - - bool isOneway() { - return _lib._objc_msgSend_12(_id, _lib._sel_isOneway1); - } - - ffi.Pointer get methodReturnType { - return _lib._objc_msgSend_13(_id, _lib._sel_methodReturnType1); - } - - int get methodReturnLength { - return _lib._objc_msgSend_10(_id, _lib._sel_methodReturnLength1); - } - - @override - NSMethodSignature init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMethodSignature._(_ret, _lib, retain: true, release: true); - } - - static NSMethodSignature new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMethodSignature1, _lib._sel_new1); - return NSMethodSignature._(_ret, _lib, retain: false, release: true); - } - - static NSMethodSignature allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMethodSignature1, _lib._sel_allocWithZone_1, zone); - return NSMethodSignature._(_ret, _lib, retain: false, release: true); - } - - static NSMethodSignature alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMethodSignature1, _lib._sel_alloc1); - return NSMethodSignature._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSMethodSignature1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSMethodSignature1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSMethodSignature1, - _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMethodSignature1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSMethodSignature1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSMethodSignature1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSMethodSignature1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSMethodSignature1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMethodSignature1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSSet extends NSObject { - NSSet._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSSet] that points to the same underlying object as [other]. - static NSSet castFrom(T other) { - return NSSet._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSSet] that wraps the given raw object pointer. - static NSSet castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSSet._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSSet1); - } - - int get count { - return _lib._objc_msgSend_10(_id, _lib._sel_count1); - } - - NSObject? member_(NSObject object) { - final _ret = _lib._objc_msgSend_16(_id, _lib._sel_member_1, object._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSEnumerator objectEnumerator() { - final _ret = _lib._objc_msgSend_77(_id, _lib._sel_objectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } - - @override - NSSet init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - NSSet initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66( - _id, _lib._sel_initWithObjects_count_1, objects, cnt); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - NSSet? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSSet._(_ret, _lib, retain: true, release: true); - } - - NSArray get allObjects { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_allObjects1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSObject? anyObject() { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_anyObject1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - bool containsObject_(NSObject anObject) { - return _lib._objc_msgSend_0(_id, _lib._sel_containsObject_1, anObject._id); - } - - NSString get description { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _lib._objc_msgSend_70( - _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - bool intersectsSet_(NSSet otherSet) { - return _lib._objc_msgSend_403(_id, _lib._sel_intersectsSet_1, otherSet._id); - } - - bool isEqualToSet_(NSSet otherSet) { - return _lib._objc_msgSend_403(_id, _lib._sel_isEqualToSet_1, otherSet._id); - } - - bool isSubsetOfSet_(NSSet otherSet) { - return _lib._objc_msgSend_403(_id, _lib._sel_isSubsetOfSet_1, otherSet._id); - } - - void makeObjectsPerformSelector_(ffi.Pointer aSelector) { - _lib._objc_msgSend_7( - _id, _lib._sel_makeObjectsPerformSelector_1, aSelector); - } - - void makeObjectsPerformSelector_withObject_( - ffi.Pointer aSelector, NSObject? argument) { - _lib._objc_msgSend_90( - _id, - _lib._sel_makeObjectsPerformSelector_withObject_1, - aSelector, - argument?._id ?? ffi.nullptr); - } - - NSSet setByAddingObject_(NSObject anObject) { - final _ret = _lib._objc_msgSend_404( - _id, _lib._sel_setByAddingObject_1, anObject._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - NSSet setByAddingObjectsFromSet_(NSSet other) { - final _ret = _lib._objc_msgSend_405( - _id, _lib._sel_setByAddingObjectsFromSet_1, other._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - NSSet setByAddingObjectsFromArray_(NSArray other) { - final _ret = _lib._objc_msgSend_406( - _id, _lib._sel_setByAddingObjectsFromArray_1, other._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - void enumerateObjectsUsingBlock_(ObjCBlock_ffiVoid_ObjCObject_bool block) { - _lib._objc_msgSend_407( - _id, _lib._sel_enumerateObjectsUsingBlock_1, block._id); - } - - void enumerateObjectsWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_ObjCObject_bool block) { - _lib._objc_msgSend_408(_id, - _lib._sel_enumerateObjectsWithOptions_usingBlock_1, opts, block._id); - } - - NSSet objectsPassingTest_(ObjCBlock_bool_ObjCObject_bool predicate) { - final _ret = _lib._objc_msgSend_409( - _id, _lib._sel_objectsPassingTest_1, predicate._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - NSSet objectsWithOptions_passingTest_( - int opts, ObjCBlock_bool_ObjCObject_bool predicate) { - final _ret = _lib._objc_msgSend_410( - _id, _lib._sel_objectsWithOptions_passingTest_1, opts, predicate._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static NSSet set1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSSet1, _lib._sel_set1); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static NSSet setWithObject_(AVFAudio _lib, NSObject object) { - final _ret = _lib._objc_msgSend_124( - _lib._class_NSSet1, _lib._sel_setWithObject_1, object._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static NSSet setWithObjects_count_( - AVFAudio _lib, ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66( - _lib._class_NSSet1, _lib._sel_setWithObjects_count_1, objects, cnt); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static NSSet setWithObjects_(AVFAudio _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_124( - _lib._class_NSSet1, _lib._sel_setWithObjects_1, firstObj._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static NSSet setWithSet_(AVFAudio _lib, NSSet set) { - final _ret = _lib._objc_msgSend_411( - _lib._class_NSSet1, _lib._sel_setWithSet_1, set._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static NSSet setWithArray_(AVFAudio _lib, NSArray array) { - final _ret = _lib._objc_msgSend_125( - _lib._class_NSSet1, _lib._sel_setWithArray_1, array._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - NSSet initWithObjects_(NSObject firstObj) { - final _ret = - _lib._objc_msgSend_124(_id, _lib._sel_initWithObjects_1, firstObj._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - NSSet initWithSet_(NSSet set) { - final _ret = _lib._objc_msgSend_411(_id, _lib._sel_initWithSet_1, set._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - NSSet initWithSet_copyItems_(NSSet set, bool flag) { - final _ret = _lib._objc_msgSend_412( - _id, _lib._sel_initWithSet_copyItems_1, set._id, flag); - return NSSet._(_ret, _lib, retain: false, release: true); - } - - NSSet initWithArray_(NSArray array) { - final _ret = - _lib._objc_msgSend_125(_id, _lib._sel_initWithArray_1, array._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - NSObject valueForKey_(NSString key) { - final _ret = _lib._objc_msgSend_31(_id, _lib._sel_valueForKey_1, key._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - @override - void setValue_forKey_(NSObject? value, NSString key) { - _lib._objc_msgSend_135( - _id, _lib._sel_setValue_forKey_1, value?._id ?? ffi.nullptr, key._id); - } - - @override - void addObserver_forKeyPath_options_context_(NSObject observer, - NSString keyPath, int options, ffi.Pointer context) { - _lib._objc_msgSend_139( - _id, - _lib._sel_addObserver_forKeyPath_options_context_1, - observer._id, - keyPath._id, - options, - context); - } - - @override - void removeObserver_forKeyPath_context_( - NSObject observer, NSString keyPath, ffi.Pointer context) { - _lib._objc_msgSend_140(_id, _lib._sel_removeObserver_forKeyPath_context_1, - observer._id, keyPath._id, context); - } - - @override - void removeObserver_forKeyPath_(NSObject observer, NSString keyPath) { - _lib._objc_msgSend_141( - _id, _lib._sel_removeObserver_forKeyPath_1, observer._id, keyPath._id); - } - - NSArray sortedArrayUsingDescriptors_(NSArray sortDescriptors) { - final _ret = _lib._objc_msgSend_68( - _id, _lib._sel_sortedArrayUsingDescriptors_1, sortDescriptors._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSSet filteredSetUsingPredicate_(NSPredicate predicate) { - final _ret = _lib._objc_msgSend_413( - _id, _lib._sel_filteredSetUsingPredicate_1, predicate._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static NSSet new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSSet1, _lib._sel_new1); - return NSSet._(_ret, _lib, retain: false, release: true); - } - - static NSSet allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSSet1, _lib._sel_allocWithZone_1, zone); - return NSSet._(_ret, _lib, retain: false, release: true); - } - - static NSSet alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSSet1, _lib._sel_alloc1); - return NSSet._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSSet1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSSet1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSSet1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSSet1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSSet1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSSet1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSSet1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSEnumerator extends NSObject { - NSEnumerator._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSEnumerator] that points to the same underlying object as [other]. - static NSEnumerator castFrom(T other) { - return NSEnumerator._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSEnumerator] that wraps the given raw object pointer. - static NSEnumerator castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSEnumerator._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSEnumerator]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSEnumerator1); - } - - NSObject? nextObject() { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_nextObject1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject get allObjects { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_allObjects1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - @override - NSEnumerator init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } - - static NSEnumerator new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_new1); - return NSEnumerator._(_ret, _lib, retain: false, release: true); - } - - static NSEnumerator allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSEnumerator1, _lib._sel_allocWithZone_1, zone); - return NSEnumerator._(_ret, _lib, retain: false, release: true); - } - - static NSEnumerator alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_alloc1); - return NSEnumerator._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSEnumerator1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSEnumerator1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSEnumerator1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSEnumerator1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSEnumerator1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSEnumerator1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSEnumerator1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSEnumerator1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSEnumerator1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSString extends NSObject { - NSString._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSString] that points to the same underlying object as [other]. - static NSString castFrom(T other) { - return NSString._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSString] that wraps the given raw object pointer. - static NSString castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSString._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSString1); - } - - factory NSString(AVFAudio _lib, String str) { - final cstr = str.toNativeUtf16(); - final nsstr = stringWithCharacters_length_(_lib, cstr.cast(), str.length); - pkg_ffi.calloc.free(cstr); - return nsstr; - } - - @override - String toString() { - final data = - dataUsingEncoding_(0x94000100 /* NSUTF16LittleEndianStringEncoding */); - return data!.bytes.cast().toDartString(length: length); - } - - int get length { - return _lib._objc_msgSend_10(_id, _lib._sel_length1); - } - - int characterAtIndex_(int index) { - return _lib._objc_msgSend_18(_id, _lib._sel_characterAtIndex_1, index); - } - - @override - NSString init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString substringFromIndex_(int from) { - final _ret = - _lib._objc_msgSend_332(_id, _lib._sel_substringFromIndex_1, from); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString substringToIndex_(int to) { - final _ret = _lib._objc_msgSend_332(_id, _lib._sel_substringToIndex_1, to); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString substringWithRange_(_NSRange range) { - final _ret = - _lib._objc_msgSend_333(_id, _lib._sel_substringWithRange_1, range); - return NSString._(_ret, _lib, retain: true, release: true); - } - - void getCharacters_range_( - ffi.Pointer buffer, _NSRange range) { - _lib._objc_msgSend_334(_id, _lib._sel_getCharacters_range_1, buffer, range); - } - - int compare_(NSString string) { - return _lib._objc_msgSend_335(_id, _lib._sel_compare_1, string._id); - } - - int compare_options_(NSString string, int mask) { - return _lib._objc_msgSend_336( - _id, _lib._sel_compare_options_1, string._id, mask); - } - - int compare_options_range_( - NSString string, int mask, _NSRange rangeOfReceiverToCompare) { - return _lib._objc_msgSend_337(_id, _lib._sel_compare_options_range_1, - string._id, mask, rangeOfReceiverToCompare); - } - - int compare_options_range_locale_(NSString string, int mask, - _NSRange rangeOfReceiverToCompare, NSObject? locale) { - return _lib._objc_msgSend_338(_id, _lib._sel_compare_options_range_locale_1, - string._id, mask, rangeOfReceiverToCompare, locale?._id ?? ffi.nullptr); - } - - int caseInsensitiveCompare_(NSString string) { - return _lib._objc_msgSend_335( - _id, _lib._sel_caseInsensitiveCompare_1, string._id); - } - - int localizedCompare_(NSString string) { - return _lib._objc_msgSend_335( - _id, _lib._sel_localizedCompare_1, string._id); - } - - int localizedCaseInsensitiveCompare_(NSString string) { - return _lib._objc_msgSend_335( - _id, _lib._sel_localizedCaseInsensitiveCompare_1, string._id); - } - - int localizedStandardCompare_(NSString string) { - return _lib._objc_msgSend_335( - _id, _lib._sel_localizedStandardCompare_1, string._id); - } - - bool isEqualToString_(NSString aString) { - return _lib._objc_msgSend_64(_id, _lib._sel_isEqualToString_1, aString._id); - } - - bool hasPrefix_(NSString str) { - return _lib._objc_msgSend_64(_id, _lib._sel_hasPrefix_1, str._id); - } - - bool hasSuffix_(NSString str) { - return _lib._objc_msgSend_64(_id, _lib._sel_hasSuffix_1, str._id); - } - - NSString commonPrefixWithString_options_(NSString str, int mask) { - final _ret = _lib._objc_msgSend_339( - _id, _lib._sel_commonPrefixWithString_options_1, str._id, mask); - return NSString._(_ret, _lib, retain: true, release: true); - } - - bool containsString_(NSString str) { - return _lib._objc_msgSend_64(_id, _lib._sel_containsString_1, str._id); - } - - bool localizedCaseInsensitiveContainsString_(NSString str) { - return _lib._objc_msgSend_64( - _id, _lib._sel_localizedCaseInsensitiveContainsString_1, str._id); - } - - bool localizedStandardContainsString_(NSString str) { - return _lib._objc_msgSend_64( - _id, _lib._sel_localizedStandardContainsString_1, str._id); - } - - void localizedStandardRangeOfString_( - ffi.Pointer<_NSRange> stret, NSString str) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_340_stret( - stret, _id, _lib._sel_localizedStandardRangeOfString_1, str._id) - : stret.ref = _lib._objc_msgSend_340( - _id, _lib._sel_localizedStandardRangeOfString_1, str._id); - } - - void rangeOfString_(ffi.Pointer<_NSRange> stret, NSString searchString) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_340_stret( - stret, _id, _lib._sel_rangeOfString_1, searchString._id) - : stret.ref = _lib._objc_msgSend_340( - _id, _lib._sel_rangeOfString_1, searchString._id); - } - - void rangeOfString_options_( - ffi.Pointer<_NSRange> stret, NSString searchString, int mask) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_341_stret(stret, _id, - _lib._sel_rangeOfString_options_1, searchString._id, mask) - : stret.ref = _lib._objc_msgSend_341( - _id, _lib._sel_rangeOfString_options_1, searchString._id, mask); - } - - void rangeOfString_options_range_(ffi.Pointer<_NSRange> stret, - NSString searchString, int mask, _NSRange rangeOfReceiverToSearch) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_342_stret( - stret, - _id, - _lib._sel_rangeOfString_options_range_1, - searchString._id, - mask, - rangeOfReceiverToSearch) - : stret.ref = _lib._objc_msgSend_342( - _id, - _lib._sel_rangeOfString_options_range_1, - searchString._id, - mask, - rangeOfReceiverToSearch); - } - - void rangeOfString_options_range_locale_( - ffi.Pointer<_NSRange> stret, - NSString searchString, - int mask, - _NSRange rangeOfReceiverToSearch, - NSLocale? locale) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_343_stret( - stret, - _id, - _lib._sel_rangeOfString_options_range_locale_1, - searchString._id, - mask, - rangeOfReceiverToSearch, - locale?._id ?? ffi.nullptr) - : stret.ref = _lib._objc_msgSend_343( - _id, - _lib._sel_rangeOfString_options_range_locale_1, - searchString._id, - mask, - rangeOfReceiverToSearch, - locale?._id ?? ffi.nullptr); - } - - void rangeOfCharacterFromSet_( - ffi.Pointer<_NSRange> stret, NSCharacterSet searchSet) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_344_stret( - stret, _id, _lib._sel_rangeOfCharacterFromSet_1, searchSet._id) - : stret.ref = _lib._objc_msgSend_344( - _id, _lib._sel_rangeOfCharacterFromSet_1, searchSet._id); - } - - void rangeOfCharacterFromSet_options_( - ffi.Pointer<_NSRange> stret, NSCharacterSet searchSet, int mask) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_345_stret(stret, _id, - _lib._sel_rangeOfCharacterFromSet_options_1, searchSet._id, mask) - : stret.ref = _lib._objc_msgSend_345(_id, - _lib._sel_rangeOfCharacterFromSet_options_1, searchSet._id, mask); - } - - void rangeOfCharacterFromSet_options_range_(ffi.Pointer<_NSRange> stret, - NSCharacterSet searchSet, int mask, _NSRange rangeOfReceiverToSearch) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_346_stret( - stret, - _id, - _lib._sel_rangeOfCharacterFromSet_options_range_1, - searchSet._id, - mask, - rangeOfReceiverToSearch) - : stret.ref = _lib._objc_msgSend_346( - _id, - _lib._sel_rangeOfCharacterFromSet_options_range_1, - searchSet._id, - mask, - rangeOfReceiverToSearch); - } - - void rangeOfComposedCharacterSequenceAtIndex_( - ffi.Pointer<_NSRange> stret, int index) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_347_stret(stret, _id, - _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index) - : stret.ref = _lib._objc_msgSend_347( - _id, _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index); - } - - void rangeOfComposedCharacterSequencesForRange_( - ffi.Pointer<_NSRange> stret, _NSRange range) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_348_stret(stret, _id, - _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range) - : stret.ref = _lib._objc_msgSend_348( - _id, _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range); - } - - NSString stringByAppendingString_(NSString aString) { - final _ret = _lib._objc_msgSend_69( - _id, _lib._sel_stringByAppendingString_1, aString._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString stringByAppendingFormat_(NSString format) { - final _ret = _lib._objc_msgSend_69( - _id, _lib._sel_stringByAppendingFormat_1, format._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - double get doubleValue { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_doubleValue1) - : _lib._objc_msgSend_165(_id, _lib._sel_doubleValue1); - } - - double get floatValue { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_239_fpret(_id, _lib._sel_floatValue1) - : _lib._objc_msgSend_239(_id, _lib._sel_floatValue1); - } - - int get intValue { - return _lib._objc_msgSend_237(_id, _lib._sel_intValue1); - } - - int get integerValue { - return _lib._objc_msgSend_83(_id, _lib._sel_integerValue1); - } - - int get longLongValue { - return _lib._objc_msgSend_238(_id, _lib._sel_longLongValue1); - } - - bool get boolValue { - return _lib._objc_msgSend_12(_id, _lib._sel_boolValue1); - } - - NSString get uppercaseString { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_uppercaseString1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get lowercaseString { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_lowercaseString1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get capitalizedString { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_capitalizedString1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get localizedUppercaseString { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_localizedUppercaseString1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get localizedLowercaseString { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_localizedLowercaseString1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get localizedCapitalizedString { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_localizedCapitalizedString1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString uppercaseStringWithLocale_(NSLocale? locale) { - final _ret = _lib._objc_msgSend_349( - _id, _lib._sel_uppercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString lowercaseStringWithLocale_(NSLocale? locale) { - final _ret = _lib._objc_msgSend_349( - _id, _lib._sel_lowercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString capitalizedStringWithLocale_(NSLocale? locale) { - final _ret = _lib._objc_msgSend_349(_id, - _lib._sel_capitalizedStringWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - void getLineStart_end_contentsEnd_forRange_( - ffi.Pointer startPtr, - ffi.Pointer lineEndPtr, - ffi.Pointer contentsEndPtr, - _NSRange range) { - _lib._objc_msgSend_350( - _id, - _lib._sel_getLineStart_end_contentsEnd_forRange_1, - startPtr, - lineEndPtr, - contentsEndPtr, - range); - } - - void lineRangeForRange_(ffi.Pointer<_NSRange> stret, _NSRange range) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_348_stret( - stret, _id, _lib._sel_lineRangeForRange_1, range) - : stret.ref = - _lib._objc_msgSend_348(_id, _lib._sel_lineRangeForRange_1, range); - } - - void getParagraphStart_end_contentsEnd_forRange_( - ffi.Pointer startPtr, - ffi.Pointer parEndPtr, - ffi.Pointer contentsEndPtr, - _NSRange range) { - _lib._objc_msgSend_350( - _id, - _lib._sel_getParagraphStart_end_contentsEnd_forRange_1, - startPtr, - parEndPtr, - contentsEndPtr, - range); - } - - void paragraphRangeForRange_(ffi.Pointer<_NSRange> stret, _NSRange range) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_348_stret( - stret, _id, _lib._sel_paragraphRangeForRange_1, range) - : stret.ref = _lib._objc_msgSend_348( - _id, _lib._sel_paragraphRangeForRange_1, range); - } - - void enumerateSubstringsInRange_options_usingBlock_(_NSRange range, int opts, - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool block) { - _lib._objc_msgSend_351( - _id, - _lib._sel_enumerateSubstringsInRange_options_usingBlock_1, - range, - opts, - block._id); - } - - void enumerateLinesUsingBlock_(ObjCBlock_ffiVoid_NSString_bool block) { - _lib._objc_msgSend_352( - _id, _lib._sel_enumerateLinesUsingBlock_1, block._id); - } - - ffi.Pointer get UTF8String { - return _lib._objc_msgSend_13(_id, _lib._sel_UTF8String1); - } - - int get fastestEncoding { - return _lib._objc_msgSend_10(_id, _lib._sel_fastestEncoding1); - } - - int get smallestEncoding { - return _lib._objc_msgSend_10(_id, _lib._sel_smallestEncoding1); - } - - NSData? dataUsingEncoding_allowLossyConversion_(int encoding, bool lossy) { - final _ret = _lib._objc_msgSend_353(_id, - _lib._sel_dataUsingEncoding_allowLossyConversion_1, encoding, lossy); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData? dataUsingEncoding_(int encoding) { - final _ret = - _lib._objc_msgSend_354(_id, _lib._sel_dataUsingEncoding_1, encoding); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - bool canBeConvertedToEncoding_(int encoding) { - return _lib._objc_msgSend_97( - _id, _lib._sel_canBeConvertedToEncoding_1, encoding); - } - - ffi.Pointer cStringUsingEncoding_(int encoding) { - return _lib._objc_msgSend_11( - _id, _lib._sel_cStringUsingEncoding_1, encoding); - } - - bool getCString_maxLength_encoding_( - ffi.Pointer buffer, int maxBufferCount, int encoding) { - return _lib._objc_msgSend_355( - _id, - _lib._sel_getCString_maxLength_encoding_1, - buffer, - maxBufferCount, - encoding); - } - - bool getBytes_maxLength_usedLength_encoding_options_range_remainingRange_( - ffi.Pointer buffer, - int maxBufferCount, - ffi.Pointer usedBufferCount, - int encoding, - int options, - _NSRange range, - ffi.Pointer<_NSRange> leftover) { - return _lib._objc_msgSend_356( - _id, - _lib._sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1, - buffer, - maxBufferCount, - usedBufferCount, - encoding, - options, - range, - leftover); - } - - int maximumLengthOfBytesUsingEncoding_(int enc) { - return _lib._objc_msgSend_94( - _id, _lib._sel_maximumLengthOfBytesUsingEncoding_1, enc); - } - - int lengthOfBytesUsingEncoding_(int enc) { - return _lib._objc_msgSend_94( - _id, _lib._sel_lengthOfBytesUsingEncoding_1, enc); - } - - static ffi.Pointer getAvailableStringEncodings( - AVFAudio _lib) { - return _lib._objc_msgSend_357( - _lib._class_NSString1, _lib._sel_availableStringEncodings1); - } - - static NSString localizedNameOfStringEncoding_(AVFAudio _lib, int encoding) { - final _ret = _lib._objc_msgSend_332(_lib._class_NSString1, - _lib._sel_localizedNameOfStringEncoding_1, encoding); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static int getDefaultCStringEncoding(AVFAudio _lib) { - return _lib._objc_msgSend_10( - _lib._class_NSString1, _lib._sel_defaultCStringEncoding1); - } - - NSString get decomposedStringWithCanonicalMapping { - final _ret = _lib._objc_msgSend_21( - _id, _lib._sel_decomposedStringWithCanonicalMapping1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get precomposedStringWithCanonicalMapping { - final _ret = _lib._objc_msgSend_21( - _id, _lib._sel_precomposedStringWithCanonicalMapping1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get decomposedStringWithCompatibilityMapping { - final _ret = _lib._objc_msgSend_21( - _id, _lib._sel_decomposedStringWithCompatibilityMapping1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get precomposedStringWithCompatibilityMapping { - final _ret = _lib._objc_msgSend_21( - _id, _lib._sel_precomposedStringWithCompatibilityMapping1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSArray componentsSeparatedByString_(NSString separator) { - final _ret = _lib._objc_msgSend_358( - _id, _lib._sel_componentsSeparatedByString_1, separator._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray componentsSeparatedByCharactersInSet_(NSCharacterSet separator) { - final _ret = _lib._objc_msgSend_359( - _id, _lib._sel_componentsSeparatedByCharactersInSet_1, separator._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSString stringByTrimmingCharactersInSet_(NSCharacterSet set) { - final _ret = _lib._objc_msgSend_360( - _id, _lib._sel_stringByTrimmingCharactersInSet_1, set._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString stringByPaddingToLength_withString_startingAtIndex_( - int newLength, NSString padString, int padIndex) { - final _ret = _lib._objc_msgSend_361( - _id, - _lib._sel_stringByPaddingToLength_withString_startingAtIndex_1, - newLength, - padString._id, - padIndex); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString stringByFoldingWithOptions_locale_(int options, NSLocale? locale) { - final _ret = _lib._objc_msgSend_362( - _id, - _lib._sel_stringByFoldingWithOptions_locale_1, - options, - locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString stringByReplacingOccurrencesOfString_withString_options_range_( - NSString target, - NSString replacement, - int options, - _NSRange searchRange) { - final _ret = _lib._objc_msgSend_363( - _id, - _lib._sel_stringByReplacingOccurrencesOfString_withString_options_range_1, - target._id, - replacement._id, - options, - searchRange); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString stringByReplacingOccurrencesOfString_withString_( - NSString target, NSString replacement) { - final _ret = _lib._objc_msgSend_364( - _id, - _lib._sel_stringByReplacingOccurrencesOfString_withString_1, - target._id, - replacement._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString stringByReplacingCharactersInRange_withString_( - _NSRange range, NSString replacement) { - final _ret = _lib._objc_msgSend_365( - _id, - _lib._sel_stringByReplacingCharactersInRange_withString_1, - range, - replacement._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? stringByApplyingTransform_reverse_( - NSString transform, bool reverse) { - final _ret = _lib._objc_msgSend_366(_id, - _lib._sel_stringByApplyingTransform_reverse_1, transform._id, reverse); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - bool writeToURL_atomically_encoding_error_(NSURL url, bool useAuxiliaryFile, - int enc, ffi.Pointer> error) { - return _lib._objc_msgSend_367( - _id, - _lib._sel_writeToURL_atomically_encoding_error_1, - url._id, - useAuxiliaryFile, - enc, - error); - } - - bool writeToFile_atomically_encoding_error_( - NSString path, - bool useAuxiliaryFile, - int enc, - ffi.Pointer> error) { - return _lib._objc_msgSend_368( - _id, - _lib._sel_writeToFile_atomically_encoding_error_1, - path._id, - useAuxiliaryFile, - enc, - error); - } - - NSString get description { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - int get hash { - return _lib._objc_msgSend_10(_id, _lib._sel_hash1); - } - - NSString initWithCharactersNoCopy_length_freeWhenDone_( - ffi.Pointer characters, int length, bool freeBuffer) { - final _ret = _lib._objc_msgSend_369( - _id, - _lib._sel_initWithCharactersNoCopy_length_freeWhenDone_1, - characters, - length, - freeBuffer); - return NSString._(_ret, _lib, retain: false, release: true); - } - - NSString initWithCharactersNoCopy_length_deallocator_( - ffi.Pointer chars, - int len, - ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong? deallocator) { - final _ret = _lib._objc_msgSend_370( - _id, - _lib._sel_initWithCharactersNoCopy_length_deallocator_1, - chars, - len, - deallocator?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: false, release: true); - } - - NSString initWithCharacters_length_( - ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_371( - _id, _lib._sel_initWithCharacters_length_1, characters, length); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithUTF8String_(ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_372( - _id, _lib._sel_initWithUTF8String_1, nullTerminatedCString); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString initWithString_(NSString aString) { - final _ret = - _lib._objc_msgSend_31(_id, _lib._sel_initWithString_1, aString._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString initWithFormat_(NSString format) { - final _ret = - _lib._objc_msgSend_31(_id, _lib._sel_initWithFormat_1, format._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString initWithFormat_arguments_( - NSString format, ffi.Pointer<__va_list_tag> argList) { - final _ret = _lib._objc_msgSend_373( - _id, _lib._sel_initWithFormat_arguments_1, format._id, argList); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString initWithFormat_locale_(NSString format, NSObject? locale) { - final _ret = _lib._objc_msgSend_374(_id, _lib._sel_initWithFormat_locale_1, - format._id, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString initWithFormat_locale_arguments_( - NSString format, NSObject? locale, ffi.Pointer<__va_list_tag> argList) { - final _ret = _lib._objc_msgSend_375( - _id, - _lib._sel_initWithFormat_locale_arguments_1, - format._id, - locale?._id ?? ffi.nullptr, - argList); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithValidatedFormat_validFormatSpecifiers_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_376( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_377( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1, - format._id, - validFormatSpecifiers._id, - locale?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithValidatedFormat_validFormatSpecifiers_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer<__va_list_tag> argList, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_378( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1, - format._id, - validFormatSpecifiers._id, - argList, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? - initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - ffi.Pointer<__va_list_tag> argList, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_379( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1, - format._id, - validFormatSpecifiers._id, - locale?._id ?? ffi.nullptr, - argList, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithData_encoding_(NSData data, int encoding) { - final _ret = _lib._objc_msgSend_380( - _id, _lib._sel_initWithData_encoding_1, data._id, encoding); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithBytes_length_encoding_( - ffi.Pointer bytes, int len, int encoding) { - final _ret = _lib._objc_msgSend_381( - _id, _lib._sel_initWithBytes_length_encoding_1, bytes, len, encoding); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithBytesNoCopy_length_encoding_freeWhenDone_( - ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { - final _ret = _lib._objc_msgSend_382( - _id, - _lib._sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1, - bytes, - len, - encoding, - freeBuffer); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: false, release: true); - } - - NSString? initWithBytesNoCopy_length_encoding_deallocator_( - ffi.Pointer bytes, - int len, - int encoding, - ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { - final _ret = _lib._objc_msgSend_383( - _id, - _lib._sel_initWithBytesNoCopy_length_encoding_deallocator_1, - bytes, - len, - encoding, - deallocator?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: false, release: true); - } - - static NSString string(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_string1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString stringWithString_(AVFAudio _lib, NSString string) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSString1, _lib._sel_stringWithString_1, string._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString stringWithCharacters_length_( - AVFAudio _lib, ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_371(_lib._class_NSString1, - _lib._sel_stringWithCharacters_length_1, characters, length); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? stringWithUTF8String_( - AVFAudio _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_372(_lib._class_NSString1, - _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString stringWithFormat_(AVFAudio _lib, NSString format) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSString1, _lib._sel_stringWithFormat_1, format._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString localizedStringWithFormat_(AVFAudio _lib, NSString format) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSString1, - _lib._sel_localizedStringWithFormat_1, format._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? stringWithValidatedFormat_validFormatSpecifiers_error_( - AVFAudio _lib, - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_376( - _lib._class_NSString1, - _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? - localizedStringWithValidatedFormat_validFormatSpecifiers_error_( - AVFAudio _lib, - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_376( - _lib._class_NSString1, - _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithCString_encoding_( - ffi.Pointer nullTerminatedCString, int encoding) { - final _ret = _lib._objc_msgSend_384(_id, - _lib._sel_initWithCString_encoding_1, nullTerminatedCString, encoding); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? stringWithCString_encoding_( - AVFAudio _lib, ffi.Pointer cString, int enc) { - final _ret = _lib._objc_msgSend_384(_lib._class_NSString1, - _lib._sel_stringWithCString_encoding_1, cString, enc); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithContentsOfURL_encoding_error_( - NSURL url, int enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_385(_id, - _lib._sel_initWithContentsOfURL_encoding_error_1, url._id, enc, error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithContentsOfFile_encoding_error_( - NSString path, int enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_386( - _id, - _lib._sel_initWithContentsOfFile_encoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? stringWithContentsOfURL_encoding_error_(AVFAudio _lib, - NSURL url, int enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_385( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfURL_encoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? stringWithContentsOfFile_encoding_error_(AVFAudio _lib, - NSString path, int enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_386( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfFile_encoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithContentsOfURL_usedEncoding_error_( - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_387( - _id, - _lib._sel_initWithContentsOfURL_usedEncoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithContentsOfFile_usedEncoding_error_( - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_388( - _id, - _lib._sel_initWithContentsOfFile_usedEncoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? stringWithContentsOfURL_usedEncoding_error_( - AVFAudio _lib, - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_387( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? stringWithContentsOfFile_usedEncoding_error_( - AVFAudio _lib, - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_388( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static int - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - AVFAudio _lib, - NSData data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_389( - _lib._class_NSString1, - _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data._id, - opts?._id ?? ffi.nullptr, - string, - usedLossyConversion); - } - - NSObject propertyList() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_propertyList1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? propertyListFromStringsFileFormat() { - final _ret = _lib._objc_msgSend_390( - _id, _lib._sel_propertyListFromStringsFileFormat1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - ffi.Pointer cString() { - return _lib._objc_msgSend_13(_id, _lib._sel_cString1); - } - - ffi.Pointer lossyCString() { - return _lib._objc_msgSend_13(_id, _lib._sel_lossyCString1); - } - - int cStringLength() { - return _lib._objc_msgSend_10(_id, _lib._sel_cStringLength1); - } - - void getCString_(ffi.Pointer bytes) { - _lib._objc_msgSend_290(_id, _lib._sel_getCString_1, bytes); - } - - void getCString_maxLength_(ffi.Pointer bytes, int maxLength) { - _lib._objc_msgSend_391( - _id, _lib._sel_getCString_maxLength_1, bytes, maxLength); - } - - void getCString_maxLength_range_remainingRange_(ffi.Pointer bytes, - int maxLength, _NSRange aRange, ffi.Pointer<_NSRange> leftoverRange) { - _lib._objc_msgSend_392( - _id, - _lib._sel_getCString_maxLength_range_remainingRange_1, - bytes, - maxLength, - aRange, - leftoverRange); - } - - bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_26( - _id, _lib._sel_writeToFile_atomically_1, path._id, useAuxiliaryFile); - } - - bool writeToURL_atomically_(NSURL url, bool atomically) { - return _lib._objc_msgSend_134( - _id, _lib._sel_writeToURL_atomically_1, url._id, atomically); - } - - NSObject? initWithContentsOfFile_(NSString path) { - final _ret = _lib._objc_msgSend_38( - _id, _lib._sel_initWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_277(_id, _lib._sel_initWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject? stringWithContentsOfFile_(AVFAudio _lib, NSString path) { - final _ret = _lib._objc_msgSend_38( - _lib._class_NSString1, _lib._sel_stringWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject? stringWithContentsOfURL_(AVFAudio _lib, NSURL url) { - final _ret = _lib._objc_msgSend_277( - _lib._class_NSString1, _lib._sel_stringWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? initWithCStringNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool freeBuffer) { - final _ret = _lib._objc_msgSend_393( - _id, - _lib._sel_initWithCStringNoCopy_length_freeWhenDone_1, - bytes, - length, - freeBuffer); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: false, release: true); - } - - NSObject? initWithCString_length_(ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_384( - _id, _lib._sel_initWithCString_length_1, bytes, length); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? initWithCString_(ffi.Pointer bytes) { - final _ret = - _lib._objc_msgSend_372(_id, _lib._sel_initWithCString_1, bytes); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject? stringWithCString_length_( - AVFAudio _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_384(_lib._class_NSString1, - _lib._sel_stringWithCString_length_1, bytes, length); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject? stringWithCString_( - AVFAudio _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_372( - _lib._class_NSString1, _lib._sel_stringWithCString_1, bytes); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void getCharacters_(ffi.Pointer buffer) { - _lib._objc_msgSend_394(_id, _lib._sel_getCharacters_1, buffer); - } - - NSString variantFittingPresentationWidth_(int width) { - final _ret = _lib._objc_msgSend_395( - _id, _lib._sel_variantFittingPresentationWidth_1, width); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString pathWithComponents_(AVFAudio _lib, NSArray components) { - final _ret = _lib._objc_msgSend_396( - _lib._class_NSString1, _lib._sel_pathWithComponents_1, components._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSArray get pathComponents { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_pathComponents1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - bool get absolutePath { - return _lib._objc_msgSend_12(_id, _lib._sel_isAbsolutePath1); - } - - NSString get lastPathComponent { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_lastPathComponent1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get stringByDeletingLastPathComponent { - final _ret = _lib._objc_msgSend_21( - _id, _lib._sel_stringByDeletingLastPathComponent1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString stringByAppendingPathComponent_(NSString str) { - final _ret = _lib._objc_msgSend_69( - _id, _lib._sel_stringByAppendingPathComponent_1, str._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get pathExtension { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_pathExtension1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get stringByDeletingPathExtension { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_stringByDeletingPathExtension1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? stringByAppendingPathExtension_(NSString str) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_stringByAppendingPathExtension_1, str._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get stringByAbbreviatingWithTildeInPath { - final _ret = _lib._objc_msgSend_21( - _id, _lib._sel_stringByAbbreviatingWithTildeInPath1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get stringByExpandingTildeInPath { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_stringByExpandingTildeInPath1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get stringByStandardizingPath { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_stringByStandardizingPath1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get stringByResolvingSymlinksInPath { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_stringByResolvingSymlinksInPath1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSArray stringsByAppendingPaths_(NSArray paths) { - final _ret = _lib._objc_msgSend_68( - _id, _lib._sel_stringsByAppendingPaths_1, paths._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - int completePathIntoString_caseSensitive_matchesIntoArray_filterTypes_( - ffi.Pointer> outputName, - bool flag, - ffi.Pointer> outputArray, - NSArray? filterTypes) { - return _lib._objc_msgSend_397( - _id, - _lib._sel_completePathIntoString_caseSensitive_matchesIntoArray_filterTypes_1, - outputName, - flag, - outputArray, - filterTypes?._id ?? ffi.nullptr); - } - - ffi.Pointer get fileSystemRepresentation { - return _lib._objc_msgSend_13(_id, _lib._sel_fileSystemRepresentation1); - } - - bool getFileSystemRepresentation_maxLength_( - ffi.Pointer cname, int max) { - return _lib._objc_msgSend_242( - _id, _lib._sel_getFileSystemRepresentation_maxLength_1, cname, max); - } - - NSString? stringByAddingPercentEncodingWithAllowedCharacters_( - NSCharacterSet allowedCharacters) { - final _ret = _lib._objc_msgSend_398( - _id, - _lib._sel_stringByAddingPercentEncodingWithAllowedCharacters_1, - allowedCharacters._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get stringByRemovingPercentEncoding { - final _ret = - _lib._objc_msgSend_44(_id, _lib._sel_stringByRemovingPercentEncoding1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? stringByAddingPercentEscapesUsingEncoding_(int enc) { - final _ret = _lib._objc_msgSend_399( - _id, _lib._sel_stringByAddingPercentEscapesUsingEncoding_1, enc); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? stringByReplacingPercentEscapesUsingEncoding_(int enc) { - final _ret = _lib._objc_msgSend_399( - _id, _lib._sel_stringByReplacingPercentEscapesUsingEncoding_1, enc); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSArray linguisticTagsInRange_scheme_options_orthography_tokenRanges_( - _NSRange range, - NSString scheme, - int options, - NSOrthography? orthography, - ffi.Pointer> tokenRanges) { - final _ret = _lib._objc_msgSend_401( - _id, - _lib._sel_linguisticTagsInRange_scheme_options_orthography_tokenRanges_1, - range, - scheme._id, - options, - orthography?._id ?? ffi.nullptr, - tokenRanges); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - void enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock_( - _NSRange range, - NSString scheme, - int options, - NSOrthography? orthography, - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool block) { - _lib._objc_msgSend_402( - _id, - _lib._sel_enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock_1, - range, - scheme._id, - options, - orthography?._id ?? ffi.nullptr, - block._id); - } - - static NSString new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_new1); - return NSString._(_ret, _lib, retain: false, release: true); - } - - static NSString allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSString1, _lib._sel_allocWithZone_1, zone); - return NSString._(_ret, _lib, retain: false, release: true); - } - - static NSString alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_alloc1); - return NSString._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSString1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSString1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSString1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSString1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSString1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSString1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSString1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSString1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSString1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -extension StringToNSString on String { - NSString toNSString(AVFAudio lib) => NSString(lib, this); -} - -class NSCoder extends NSObject { - NSCoder._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSCoder] that points to the same underlying object as [other]. - static NSCoder castFrom(T other) { - return NSCoder._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSCoder] that wraps the given raw object pointer. - static NSCoder castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCoder._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSCoder]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSCoder1); - } - - void encodeValueOfObjCType_at_( - ffi.Pointer type, ffi.Pointer addr) { - _lib._objc_msgSend_19( - _id, _lib._sel_encodeValueOfObjCType_at_1, type, addr); - } - - void encodeDataObject_(NSData data) { - _lib._objc_msgSend_285(_id, _lib._sel_encodeDataObject_1, data._id); - } - - NSData? decodeDataObject() { - final _ret = _lib._objc_msgSend_286(_id, _lib._sel_decodeDataObject1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - void decodeValueOfObjCType_at_size_( - ffi.Pointer type, ffi.Pointer data, int size) { - _lib._objc_msgSend_287( - _id, _lib._sel_decodeValueOfObjCType_at_size_1, type, data, size); - } - - int versionForClassName_(NSString className) { - return _lib._objc_msgSend_288( - _id, _lib._sel_versionForClassName_1, className._id); - } - - void encodeObject_(NSObject? object) { - _lib._objc_msgSend_289( - _id, _lib._sel_encodeObject_1, object?._id ?? ffi.nullptr); - } - - void encodeRootObject_(NSObject rootObject) { - _lib._objc_msgSend_15(_id, _lib._sel_encodeRootObject_1, rootObject._id); - } - - void encodeBycopyObject_(NSObject? anObject) { - _lib._objc_msgSend_289( - _id, _lib._sel_encodeBycopyObject_1, anObject?._id ?? ffi.nullptr); - } - - void encodeByrefObject_(NSObject? anObject) { - _lib._objc_msgSend_289( - _id, _lib._sel_encodeByrefObject_1, anObject?._id ?? ffi.nullptr); - } - - void encodeConditionalObject_(NSObject? object) { - _lib._objc_msgSend_289( - _id, _lib._sel_encodeConditionalObject_1, object?._id ?? ffi.nullptr); - } - - void encodeValuesOfObjCTypes_(ffi.Pointer types) { - _lib._objc_msgSend_290(_id, _lib._sel_encodeValuesOfObjCTypes_1, types); - } - - void encodeArrayOfObjCType_count_at_( - ffi.Pointer type, int count, ffi.Pointer array) { - _lib._objc_msgSend_291( - _id, _lib._sel_encodeArrayOfObjCType_count_at_1, type, count, array); - } - - void encodeBytes_length_(ffi.Pointer byteaddr, int length) { - _lib._objc_msgSend_22( - _id, _lib._sel_encodeBytes_length_1, byteaddr, length); - } - - NSObject? decodeObject() { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_decodeObject1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? decodeTopLevelObjectAndReturnError_( - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_292( - _id, _lib._sel_decodeTopLevelObjectAndReturnError_1, error); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void decodeValuesOfObjCTypes_(ffi.Pointer types) { - _lib._objc_msgSend_290(_id, _lib._sel_decodeValuesOfObjCTypes_1, types); - } - - void decodeArrayOfObjCType_count_at_( - ffi.Pointer itemType, int count, ffi.Pointer array) { - _lib._objc_msgSend_291(_id, _lib._sel_decodeArrayOfObjCType_count_at_1, - itemType, count, array); - } - - ffi.Pointer decodeBytesWithReturnedLength_( - ffi.Pointer lengthp) { - return _lib._objc_msgSend_293( - _id, _lib._sel_decodeBytesWithReturnedLength_1, lengthp); - } - - void encodePropertyList_(NSObject aPropertyList) { - _lib._objc_msgSend_15( - _id, _lib._sel_encodePropertyList_1, aPropertyList._id); - } - - NSObject? decodePropertyList() { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_decodePropertyList1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void setObjectZone_(ffi.Pointer<_NSZone> zone) { - _lib._objc_msgSend_294(_id, _lib._sel_setObjectZone_1, zone); - } - - ffi.Pointer<_NSZone> objectZone() { - return _lib._objc_msgSend_295(_id, _lib._sel_objectZone1); - } - - int get systemVersion { - return _lib._objc_msgSend_214(_id, _lib._sel_systemVersion1); - } - - bool get allowsKeyedCoding { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsKeyedCoding1); - } - - void encodeObject_forKey_(NSObject? object, NSString key) { - _lib._objc_msgSend_135(_id, _lib._sel_encodeObject_forKey_1, - object?._id ?? ffi.nullptr, key._id); - } - - void encodeConditionalObject_forKey_(NSObject? object, NSString key) { - _lib._objc_msgSend_135(_id, _lib._sel_encodeConditionalObject_forKey_1, - object?._id ?? ffi.nullptr, key._id); - } - - void encodeBool_forKey_(bool value, NSString key) { - _lib._objc_msgSend_296(_id, _lib._sel_encodeBool_forKey_1, value, key._id); - } - - void encodeInt_forKey_(int value, NSString key) { - _lib._objc_msgSend_297(_id, _lib._sel_encodeInt_forKey_1, value, key._id); - } - - void encodeInt32_forKey_(int value, NSString key) { - _lib._objc_msgSend_298(_id, _lib._sel_encodeInt32_forKey_1, value, key._id); - } - - void encodeInt64_forKey_(int value, NSString key) { - _lib._objc_msgSend_299(_id, _lib._sel_encodeInt64_forKey_1, value, key._id); - } - - void encodeFloat_forKey_(double value, NSString key) { - _lib._objc_msgSend_300(_id, _lib._sel_encodeFloat_forKey_1, value, key._id); - } - - void encodeDouble_forKey_(double value, NSString key) { - _lib._objc_msgSend_301( - _id, _lib._sel_encodeDouble_forKey_1, value, key._id); - } - - void encodeBytes_length_forKey_( - ffi.Pointer bytes, int length, NSString key) { - _lib._objc_msgSend_302( - _id, _lib._sel_encodeBytes_length_forKey_1, bytes, length, key._id); - } - - bool containsValueForKey_(NSString key) { - return _lib._objc_msgSend_64(_id, _lib._sel_containsValueForKey_1, key._id); - } - - NSObject? decodeObjectForKey_(NSString key) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_decodeObjectForKey_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? decodeTopLevelObjectForKey_error_( - NSString key, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_303( - _id, _lib._sel_decodeTopLevelObjectForKey_error_1, key._id, error); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - bool decodeBoolForKey_(NSString key) { - return _lib._objc_msgSend_64(_id, _lib._sel_decodeBoolForKey_1, key._id); - } - - int decodeIntForKey_(NSString key) { - return _lib._objc_msgSend_304(_id, _lib._sel_decodeIntForKey_1, key._id); - } - - int decodeInt32ForKey_(NSString key) { - return _lib._objc_msgSend_305(_id, _lib._sel_decodeInt32ForKey_1, key._id); - } - - int decodeInt64ForKey_(NSString key) { - return _lib._objc_msgSend_306(_id, _lib._sel_decodeInt64ForKey_1, key._id); - } - - double decodeFloatForKey_(NSString key) { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_307_fpret( - _id, _lib._sel_decodeFloatForKey_1, key._id) - : _lib._objc_msgSend_307(_id, _lib._sel_decodeFloatForKey_1, key._id); - } - - double decodeDoubleForKey_(NSString key) { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_308_fpret( - _id, _lib._sel_decodeDoubleForKey_1, key._id) - : _lib._objc_msgSend_308(_id, _lib._sel_decodeDoubleForKey_1, key._id); - } - - ffi.Pointer decodeBytesForKey_returnedLength_( - NSString key, ffi.Pointer lengthp) { - return _lib._objc_msgSend_309( - _id, _lib._sel_decodeBytesForKey_returnedLength_1, key._id, lengthp); - } - - void encodeInteger_forKey_(int value, NSString key) { - _lib._objc_msgSend_310( - _id, _lib._sel_encodeInteger_forKey_1, value, key._id); - } - - int decodeIntegerForKey_(NSString key) { - return _lib._objc_msgSend_288( - _id, _lib._sel_decodeIntegerForKey_1, key._id); - } - - bool get requiresSecureCoding { - return _lib._objc_msgSend_12(_id, _lib._sel_requiresSecureCoding1); - } - - NSObject? decodeObjectOfClass_forKey_(NSObject aClass, NSString key) { - final _ret = _lib._objc_msgSend_311( - _id, _lib._sel_decodeObjectOfClass_forKey_1, aClass._id, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? decodeTopLevelObjectOfClass_forKey_error_(NSObject aClass, - NSString key, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_312( - _id, - _lib._sel_decodeTopLevelObjectOfClass_forKey_error_1, - aClass._id, - key._id, - error); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSArray? decodeArrayOfObjectsOfClass_forKey_(NSObject cls, NSString key) { - final _ret = _lib._objc_msgSend_313( - _id, _lib._sel_decodeArrayOfObjectsOfClass_forKey_1, cls._id, key._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? decodeDictionaryWithKeysOfClass_objectsOfClass_forKey_( - NSObject keyCls, NSObject objectCls, NSString key) { - final _ret = _lib._objc_msgSend_314( - _id, - _lib._sel_decodeDictionaryWithKeysOfClass_objectsOfClass_forKey_1, - keyCls._id, - objectCls._id, - key._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSObject? decodeObjectOfClasses_forKey_(NSSet? classes, NSString key) { - final _ret = _lib._objc_msgSend_315( - _id, - _lib._sel_decodeObjectOfClasses_forKey_1, - classes?._id ?? ffi.nullptr, - key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? decodeTopLevelObjectOfClasses_forKey_error_(NSSet? classes, - NSString key, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_316( - _id, - _lib._sel_decodeTopLevelObjectOfClasses_forKey_error_1, - classes?._id ?? ffi.nullptr, - key._id, - error); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSArray? decodeArrayOfObjectsOfClasses_forKey_(NSSet classes, NSString key) { - final _ret = _lib._objc_msgSend_317(_id, - _lib._sel_decodeArrayOfObjectsOfClasses_forKey_1, classes._id, key._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey_( - NSSet keyClasses, NSSet objectClasses, NSString key) { - final _ret = _lib._objc_msgSend_318( - _id, - _lib._sel_decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey_1, - keyClasses._id, - objectClasses._id, - key._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSObject? decodePropertyListForKey_(NSString key) { - final _ret = _lib._objc_msgSend_38( - _id, _lib._sel_decodePropertyListForKey_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSSet? get allowedClasses { - final _ret = _lib._objc_msgSend_319(_id, _lib._sel_allowedClasses1); - return _ret.address == 0 - ? null - : NSSet._(_ret, _lib, retain: true, release: true); - } - - void failWithError_(NSError error) { - _lib._objc_msgSend_320(_id, _lib._sel_failWithError_1, error._id); - } - - int get decodingFailurePolicy { - return _lib._objc_msgSend_321(_id, _lib._sel_decodingFailurePolicy1); - } - - NSError? get error { - final _ret = _lib._objc_msgSend_322(_id, _lib._sel_error1); - return _ret.address == 0 - ? null - : NSError._(_ret, _lib, retain: true, release: true); - } - - void encodeNXObject_(NSObject object) { - _lib._objc_msgSend_15(_id, _lib._sel_encodeNXObject_1, object._id); - } - - NSObject? decodeNXObject() { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_decodeNXObject1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void decodeValueOfObjCType_at_( - ffi.Pointer type, ffi.Pointer data) { - _lib._objc_msgSend_19( - _id, _lib._sel_decodeValueOfObjCType_at_1, type, data); - } - - void encodePoint_(CGPoint point) { - _lib._objc_msgSend_323(_id, _lib._sel_encodePoint_1, point); - } - - void decodePoint(ffi.Pointer stret) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_59_stret(stret, _id, _lib._sel_decodePoint1) - : stret.ref = _lib._objc_msgSend_59(_id, _lib._sel_decodePoint1); - } - - void encodeSize_(CGSize size) { - _lib._objc_msgSend_324(_id, _lib._sel_encodeSize_1, size); - } - - void decodeSize(ffi.Pointer stret) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_60_stret(stret, _id, _lib._sel_decodeSize1) - : stret.ref = _lib._objc_msgSend_60(_id, _lib._sel_decodeSize1); - } - - void encodeRect_(CGRect rect) { - _lib._objc_msgSend_325(_id, _lib._sel_encodeRect_1, rect); - } - - void decodeRect(ffi.Pointer stret) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_61_stret(stret, _id, _lib._sel_decodeRect1) - : stret.ref = _lib._objc_msgSend_61(_id, _lib._sel_decodeRect1); - } - - void encodePoint_forKey_(CGPoint point, NSString key) { - _lib._objc_msgSend_326(_id, _lib._sel_encodePoint_forKey_1, point, key._id); - } - - void encodeSize_forKey_(CGSize size, NSString key) { - _lib._objc_msgSend_327(_id, _lib._sel_encodeSize_forKey_1, size, key._id); - } - - void encodeRect_forKey_(CGRect rect, NSString key) { - _lib._objc_msgSend_328(_id, _lib._sel_encodeRect_forKey_1, rect, key._id); - } - - void decodePointForKey_(ffi.Pointer stret, NSString key) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_329_stret( - stret, _id, _lib._sel_decodePointForKey_1, key._id) - : stret.ref = - _lib._objc_msgSend_329(_id, _lib._sel_decodePointForKey_1, key._id); - } - - void decodeSizeForKey_(ffi.Pointer stret, NSString key) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_330_stret( - stret, _id, _lib._sel_decodeSizeForKey_1, key._id) - : stret.ref = - _lib._objc_msgSend_330(_id, _lib._sel_decodeSizeForKey_1, key._id); - } - - void decodeRectForKey_(ffi.Pointer stret, NSString key) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_331_stret( - stret, _id, _lib._sel_decodeRectForKey_1, key._id) - : stret.ref = - _lib._objc_msgSend_331(_id, _lib._sel_decodeRectForKey_1, key._id); - } - - @override - NSCoder init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSCoder._(_ret, _lib, retain: true, release: true); - } - - static NSCoder new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSCoder1, _lib._sel_new1); - return NSCoder._(_ret, _lib, retain: false, release: true); - } - - static NSCoder allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSCoder1, _lib._sel_allocWithZone_1, zone); - return NSCoder._(_ret, _lib, retain: false, release: true); - } - - static NSCoder alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSCoder1, _lib._sel_alloc1); - return NSCoder._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSCoder1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSCoder1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSCoder1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSCoder1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSCoder1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSCoder1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSCoder1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSCoder1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSCoder1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSData extends NSObject { - NSData._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSData] that points to the same underlying object as [other]. - static NSData castFrom(T other) { - return NSData._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSData] that wraps the given raw object pointer. - static NSData castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSData._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSData1); - } - - int get length { - return _lib._objc_msgSend_10(_id, _lib._sel_length1); - } - - ffi.Pointer get bytes { - return _lib._objc_msgSend_20(_id, _lib._sel_bytes1); - } - - NSString get description { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - void getBytes_length_(ffi.Pointer buffer, int length) { - _lib._objc_msgSend_22(_id, _lib._sel_getBytes_length_1, buffer, length); - } - - void getBytes_range_(ffi.Pointer buffer, _NSRange range) { - _lib._objc_msgSend_23(_id, _lib._sel_getBytes_range_1, buffer, range); - } - - bool isEqualToData_(NSData other) { - return _lib._objc_msgSend_24(_id, _lib._sel_isEqualToData_1, other._id); - } - - NSData subdataWithRange_(_NSRange range) { - final _ret = - _lib._objc_msgSend_25(_id, _lib._sel_subdataWithRange_1, range); - return NSData._(_ret, _lib, retain: true, release: true); - } - - bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_26( - _id, _lib._sel_writeToFile_atomically_1, path._id, useAuxiliaryFile); - } - - bool writeToURL_atomically_(NSURL url, bool atomically) { - return _lib._objc_msgSend_134( - _id, _lib._sel_writeToURL_atomically_1, url._id, atomically); - } - - bool writeToFile_options_error_(NSString path, int writeOptionsMask, - ffi.Pointer> errorPtr) { - return _lib._objc_msgSend_269(_id, _lib._sel_writeToFile_options_error_1, - path._id, writeOptionsMask, errorPtr); - } - - bool writeToURL_options_error_(NSURL url, int writeOptionsMask, - ffi.Pointer> errorPtr) { - return _lib._objc_msgSend_270(_id, _lib._sel_writeToURL_options_error_1, - url._id, writeOptionsMask, errorPtr); - } - - void rangeOfData_options_range_(ffi.Pointer<_NSRange> stret, - NSData dataToFind, int mask, _NSRange searchRange) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_271_stret( - stret, - _id, - _lib._sel_rangeOfData_options_range_1, - dataToFind._id, - mask, - searchRange) - : stret.ref = _lib._objc_msgSend_271( - _id, - _lib._sel_rangeOfData_options_range_1, - dataToFind._id, - mask, - searchRange); - } - - void enumerateByteRangesUsingBlock_( - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool block) { - _lib._objc_msgSend_272( - _id, _lib._sel_enumerateByteRangesUsingBlock_1, block._id); - } - - static NSData data(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_data1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - static NSData dataWithBytes_length_( - AVFAudio _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_273( - _lib._class_NSData1, _lib._sel_dataWithBytes_length_1, bytes, length); - return NSData._(_ret, _lib, retain: true, release: true); - } - - static NSData dataWithBytesNoCopy_length_( - AVFAudio _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_273(_lib._class_NSData1, - _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); - return NSData._(_ret, _lib, retain: false, release: true); - } - - static NSData dataWithBytesNoCopy_length_freeWhenDone_( - AVFAudio _lib, ffi.Pointer bytes, int length, bool b) { - final _ret = _lib._objc_msgSend_274(_lib._class_NSData1, - _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSData._(_ret, _lib, retain: false, release: true); - } - - static NSData? dataWithContentsOfFile_options_error_( - AVFAudio _lib, - NSString path, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_275( - _lib._class_NSData1, - _lib._sel_dataWithContentsOfFile_options_error_1, - path._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - static NSData? dataWithContentsOfURL_options_error_(AVFAudio _lib, NSURL url, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_276( - _lib._class_NSData1, - _lib._sel_dataWithContentsOfURL_options_error_1, - url._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - static NSData? dataWithContentsOfFile_(AVFAudio _lib, NSString path) { - final _ret = _lib._objc_msgSend_38( - _lib._class_NSData1, _lib._sel_dataWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - static NSData? dataWithContentsOfURL_(AVFAudio _lib, NSURL url) { - final _ret = _lib._objc_msgSend_277( - _lib._class_NSData1, _lib._sel_dataWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData initWithBytes_length_(ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_273( - _id, _lib._sel_initWithBytes_length_1, bytes, length); - return NSData._(_ret, _lib, retain: true, release: true); - } - - NSData initWithBytesNoCopy_length_(ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_273( - _id, _lib._sel_initWithBytesNoCopy_length_1, bytes, length); - return NSData._(_ret, _lib, retain: false, release: true); - } - - NSData initWithBytesNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool b) { - final _ret = _lib._objc_msgSend_274(_id, - _lib._sel_initWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSData._(_ret, _lib, retain: false, release: true); - } - - NSData initWithBytesNoCopy_length_deallocator_(ffi.Pointer bytes, - int length, ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { - final _ret = _lib._objc_msgSend_278( - _id, - _lib._sel_initWithBytesNoCopy_length_deallocator_1, - bytes, - length, - deallocator?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: false, release: true); - } - - NSData? initWithContentsOfFile_options_error_(NSString path, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_275( - _id, - _lib._sel_initWithContentsOfFile_options_error_1, - path._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData? initWithContentsOfURL_options_error_(NSURL url, int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_276( - _id, - _lib._sel_initWithContentsOfURL_options_error_1, - url._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData? initWithContentsOfFile_(NSString path) { - final _ret = _lib._objc_msgSend_38( - _id, _lib._sel_initWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_277(_id, _lib._sel_initWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData initWithData_(NSData data) { - final _ret = - _lib._objc_msgSend_279(_id, _lib._sel_initWithData_1, data._id); - return NSData._(_ret, _lib, retain: true, release: true); - } - - static NSData dataWithData_(AVFAudio _lib, NSData data) { - final _ret = _lib._objc_msgSend_279( - _lib._class_NSData1, _lib._sel_dataWithData_1, data._id); - return NSData._(_ret, _lib, retain: true, release: true); - } - - NSData? initWithBase64EncodedString_options_( - NSString base64String, int options) { - final _ret = _lib._objc_msgSend_280( - _id, - _lib._sel_initWithBase64EncodedString_options_1, - base64String._id, - options); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSString base64EncodedStringWithOptions_(int options) { - final _ret = _lib._objc_msgSend_281( - _id, _lib._sel_base64EncodedStringWithOptions_1, options); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSData? initWithBase64EncodedData_options_(NSData base64Data, int options) { - final _ret = _lib._objc_msgSend_282(_id, - _lib._sel_initWithBase64EncodedData_options_1, base64Data._id, options); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData base64EncodedDataWithOptions_(int options) { - final _ret = _lib._objc_msgSend_283( - _id, _lib._sel_base64EncodedDataWithOptions_1, options); - return NSData._(_ret, _lib, retain: true, release: true); - } - - NSData? decompressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_284(_id, - _lib._sel_decompressedDataUsingAlgorithm_error_1, algorithm, error); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData? compressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_284( - _id, _lib._sel_compressedDataUsingAlgorithm_error_1, algorithm, error); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - void getBytes_(ffi.Pointer buffer) { - _lib._objc_msgSend_52(_id, _lib._sel_getBytes_1, buffer); - } - - static NSObject? dataWithContentsOfMappedFile_(AVFAudio _lib, NSString path) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSData1, - _lib._sel_dataWithContentsOfMappedFile_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? initWithContentsOfMappedFile_(NSString path) { - final _ret = _lib._objc_msgSend_38( - _id, _lib._sel_initWithContentsOfMappedFile_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? initWithBase64Encoding_(NSString base64String) { - final _ret = _lib._objc_msgSend_38( - _id, _lib._sel_initWithBase64Encoding_1, base64String._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSString base64Encoding() { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_base64Encoding1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - @override - NSData init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - static NSData new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_new1); - return NSData._(_ret, _lib, retain: false, release: true); - } - - static NSData allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSData1, _lib._sel_allocWithZone_1, zone); - return NSData._(_ret, _lib, retain: false, release: true); - } - - static NSData alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_alloc1); - return NSData._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSData1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSData1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSData1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSData1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSData1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSData1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSData1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSData1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSData1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -final class _NSRange extends ffi.Struct { - @ffi.UnsignedLong() - external int location; - - @ffi.UnsignedLong() - external int length; -} - -class NSURL extends NSObject { - NSURL._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURL] that points to the same underlying object as [other]. - static NSURL castFrom(T other) { - return NSURL._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSURL] that wraps the given raw object pointer. - static NSURL castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURL._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSURL]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURL1); - } - - NSURL? initWithScheme_host_path_( - NSString scheme, NSString? host, NSString path) { - final _ret = _lib._objc_msgSend_27( - _id, - _lib._sel_initWithScheme_host_path_1, - scheme._id, - host?._id ?? ffi.nullptr, - path._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL initFileURLWithPath_isDirectory_relativeToURL_( - NSString path, bool isDir, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_28( - _id, - _lib._sel_initFileURLWithPath_isDirectory_relativeToURL_1, - path._id, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL initFileURLWithPath_relativeToURL_(NSString path, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_29( - _id, - _lib._sel_initFileURLWithPath_relativeToURL_1, - path._id, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL initFileURLWithPath_isDirectory_(NSString path, bool isDir) { - final _ret = _lib._objc_msgSend_30( - _id, _lib._sel_initFileURLWithPath_isDirectory_1, path._id, isDir); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL initFileURLWithPath_(NSString path) { - final _ret = - _lib._objc_msgSend_31(_id, _lib._sel_initFileURLWithPath_1, path._id); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL fileURLWithPath_isDirectory_relativeToURL_( - AVFAudio _lib, NSString path, bool isDir, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_32( - _lib._class_NSURL1, - _lib._sel_fileURLWithPath_isDirectory_relativeToURL_1, - path._id, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL fileURLWithPath_relativeToURL_( - AVFAudio _lib, NSString path, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_33( - _lib._class_NSURL1, - _lib._sel_fileURLWithPath_relativeToURL_1, - path._id, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL fileURLWithPath_isDirectory_( - AVFAudio _lib, NSString path, bool isDir) { - final _ret = _lib._objc_msgSend_34(_lib._class_NSURL1, - _lib._sel_fileURLWithPath_isDirectory_1, path._id, isDir); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL fileURLWithPath_(AVFAudio _lib, NSString path) { - final _ret = _lib._objc_msgSend_35( - _lib._class_NSURL1, _lib._sel_fileURLWithPath_1, path._id); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( - ffi.Pointer path, bool isDir, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_36( - _id, - _lib._sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, - path, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( - AVFAudio _lib, ffi.Pointer path, bool isDir, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_37( - _lib._class_NSURL1, - _lib._sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, - path, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? initWithString_(NSString URLString) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_initWithString_1, URLString._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? initWithString_relativeToURL_(NSString URLString, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_39( - _id, - _lib._sel_initWithString_relativeToURL_1, - URLString._id, - baseURL?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL? URLWithString_(AVFAudio _lib, NSString URLString) { - final _ret = _lib._objc_msgSend_38( - _lib._class_NSURL1, _lib._sel_URLWithString_1, URLString._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL? URLWithString_relativeToURL_( - AVFAudio _lib, NSString URLString, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_39( - _lib._class_NSURL1, - _lib._sel_URLWithString_relativeToURL_1, - URLString._id, - baseURL?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? initWithString_encodingInvalidCharacters_( - NSString URLString, bool encodingInvalidCharacters) { - final _ret = _lib._objc_msgSend_40( - _id, - _lib._sel_initWithString_encodingInvalidCharacters_1, - URLString._id, - encodingInvalidCharacters); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL? URLWithString_encodingInvalidCharacters_( - AVFAudio _lib, NSString URLString, bool encodingInvalidCharacters) { - final _ret = _lib._objc_msgSend_40( - _lib._class_NSURL1, - _lib._sel_URLWithString_encodingInvalidCharacters_1, - URLString._id, - encodingInvalidCharacters); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL initWithDataRepresentation_relativeToURL_(NSData data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_41( - _id, - _lib._sel_initWithDataRepresentation_relativeToURL_1, - data._id, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL URLWithDataRepresentation_relativeToURL_( - AVFAudio _lib, NSData data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_42( - _lib._class_NSURL1, - _lib._sel_URLWithDataRepresentation_relativeToURL_1, - data._id, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL initAbsoluteURLWithDataRepresentation_relativeToURL_( - NSData data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_41( - _id, - _lib._sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1, - data._id, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL absoluteURLWithDataRepresentation_relativeToURL_( - AVFAudio _lib, NSData data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_42( - _lib._class_NSURL1, - _lib._sel_absoluteURLWithDataRepresentation_relativeToURL_1, - data._id, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - NSData get dataRepresentation { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_dataRepresentation1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - NSString? get absoluteString { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_absoluteString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get relativeString { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_relativeString1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSURL? get baseURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_baseURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? get absoluteURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_absoluteURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSString? get scheme { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_scheme1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get resourceSpecifier { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_resourceSpecifier1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get host { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_host1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSNumber? get port { - final _ret = _lib._objc_msgSend_215(_id, _lib._sel_port1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSString? get user { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_user1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get password { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_password1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get path { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_path1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get fragment { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_fragment1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get parameterString { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_parameterString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get query { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_query1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get relativePath { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_relativePath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - bool get hasDirectoryPath { - return _lib._objc_msgSend_12(_id, _lib._sel_hasDirectoryPath1); - } - - bool getFileSystemRepresentation_maxLength_( - ffi.Pointer buffer, int maxBufferLength) { - return _lib._objc_msgSend_242( - _id, - _lib._sel_getFileSystemRepresentation_maxLength_1, - buffer, - maxBufferLength); - } - - ffi.Pointer get fileSystemRepresentation { - return _lib._objc_msgSend_13(_id, _lib._sel_fileSystemRepresentation1); - } - - bool get fileURL { - return _lib._objc_msgSend_12(_id, _lib._sel_isFileURL1); - } - - NSURL? get standardizedURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_standardizedURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - bool isFileReferenceURL() { - return _lib._objc_msgSend_12(_id, _lib._sel_isFileReferenceURL1); - } - - NSURL? fileReferenceURL() { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_fileReferenceURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? get filePathURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_filePathURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - bool getResourceValue_forKey_error_( - ffi.Pointer> value, - NSString key, - ffi.Pointer> error) { - return _lib._objc_msgSend_243( - _id, _lib._sel_getResourceValue_forKey_error_1, value, key._id, error); - } - - NSObject? resourceValuesForKeys_error_( - NSArray keys, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_244( - _id, _lib._sel_resourceValuesForKeys_error_1, keys._id, error); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - bool setResourceValue_forKey_error_(NSObject? value, NSString key, - ffi.Pointer> error) { - return _lib._objc_msgSend_245( - _id, - _lib._sel_setResourceValue_forKey_error_1, - value?._id ?? ffi.nullptr, - key._id, - error); - } - - bool setResourceValues_error_( - NSObject keyedValues, ffi.Pointer> error) { - return _lib._objc_msgSend_246( - _id, _lib._sel_setResourceValues_error_1, keyedValues._id, error); - } - - void removeCachedResourceValueForKey_(NSString key) { - _lib._objc_msgSend_247( - _id, _lib._sel_removeCachedResourceValueForKey_1, key._id); - } - - void removeAllCachedResourceValues() { - _lib._objc_msgSend_1(_id, _lib._sel_removeAllCachedResourceValues1); - } - - void setTemporaryResourceValue_forKey_(NSObject? value, NSString key) { - _lib._objc_msgSend_135(_id, _lib._sel_setTemporaryResourceValue_forKey_1, - value?._id ?? ffi.nullptr, key._id); - } - - NSData? - bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_( - int options, - NSArray? keys, - NSURL? relativeURL, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_248( - _id, - _lib._sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1, - options, - keys?._id ?? ffi.nullptr, - relativeURL?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSURL? - initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( - NSData bookmarkData, - int options, - NSURL? relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_249( - _id, - _lib._sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, - bookmarkData._id, - options, - relativeURL?._id ?? ffi.nullptr, - isStale, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL? - URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( - AVFAudio _lib, - NSData bookmarkData, - int options, - NSURL? relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_249( - _lib._class_NSURL1, - _lib._sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, - bookmarkData._id, - options, - relativeURL?._id ?? ffi.nullptr, - isStale, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSObject? resourceValuesForKeys_fromBookmarkData_( - AVFAudio _lib, NSArray keys, NSData bookmarkData) { - final _ret = _lib._objc_msgSend_250( - _lib._class_NSURL1, - _lib._sel_resourceValuesForKeys_fromBookmarkData_1, - keys._id, - bookmarkData._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static bool writeBookmarkData_toURL_options_error_( - AVFAudio _lib, - NSData bookmarkData, - NSURL bookmarkFileURL, - int options, - ffi.Pointer> error) { - return _lib._objc_msgSend_251( - _lib._class_NSURL1, - _lib._sel_writeBookmarkData_toURL_options_error_1, - bookmarkData._id, - bookmarkFileURL._id, - options, - error); - } - - static NSData? bookmarkDataWithContentsOfURL_error_(AVFAudio _lib, - NSURL bookmarkFileURL, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_252( - _lib._class_NSURL1, - _lib._sel_bookmarkDataWithContentsOfURL_error_1, - bookmarkFileURL._id, - error); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - static NSURL? URLByResolvingAliasFileAtURL_options_error_(AVFAudio _lib, - NSURL url, int options, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_253( - _lib._class_NSURL1, - _lib._sel_URLByResolvingAliasFileAtURL_options_error_1, - url._id, - options, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - bool startAccessingSecurityScopedResource() { - return _lib._objc_msgSend_12( - _id, _lib._sel_startAccessingSecurityScopedResource1); - } - - void stopAccessingSecurityScopedResource() { - _lib._objc_msgSend_1(_id, _lib._sel_stopAccessingSecurityScopedResource1); - } - - bool getPromisedItemResourceValue_forKey_error_( - ffi.Pointer> value, - NSString key, - ffi.Pointer> error) { - return _lib._objc_msgSend_243( - _id, - _lib._sel_getPromisedItemResourceValue_forKey_error_1, - value, - key._id, - error); - } - - NSDictionary? promisedItemResourceValuesForKeys_error_( - NSArray keys, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_254(_id, - _lib._sel_promisedItemResourceValuesForKeys_error_1, keys._id, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - bool checkPromisedItemIsReachableAndReturnError_( - ffi.Pointer> error) { - return _lib._objc_msgSend_255( - _id, _lib._sel_checkPromisedItemIsReachableAndReturnError_1, error); - } - - static NSURL? fileURLWithPathComponents_(AVFAudio _lib, NSArray components) { - final _ret = _lib._objc_msgSend_256(_lib._class_NSURL1, - _lib._sel_fileURLWithPathComponents_1, components._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSArray? get pathComponents { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_pathComponents1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSString? get lastPathComponent { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_lastPathComponent1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get pathExtension { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_pathExtension1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSURL? URLByAppendingPathComponent_(NSString pathComponent) { - final _ret = _lib._objc_msgSend_257( - _id, _lib._sel_URLByAppendingPathComponent_1, pathComponent._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? URLByAppendingPathComponent_isDirectory_( - NSString pathComponent, bool isDirectory) { - final _ret = _lib._objc_msgSend_258( - _id, - _lib._sel_URLByAppendingPathComponent_isDirectory_1, - pathComponent._id, - isDirectory); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? get URLByDeletingLastPathComponent { - final _ret = - _lib._objc_msgSend_45(_id, _lib._sel_URLByDeletingLastPathComponent1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? URLByAppendingPathExtension_(NSString pathExtension) { - final _ret = _lib._objc_msgSend_257( - _id, _lib._sel_URLByAppendingPathExtension_1, pathExtension._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? get URLByDeletingPathExtension { - final _ret = - _lib._objc_msgSend_45(_id, _lib._sel_URLByDeletingPathExtension1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - bool checkResourceIsReachableAndReturnError_( - ffi.Pointer> error) { - return _lib._objc_msgSend_255( - _id, _lib._sel_checkResourceIsReachableAndReturnError_1, error); - } - - NSURL? get URLByStandardizingPath { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_URLByStandardizingPath1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? get URLByResolvingSymlinksInPath { - final _ret = - _lib._objc_msgSend_45(_id, _lib._sel_URLByResolvingSymlinksInPath1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSData? resourceDataUsingCache_(bool shouldUseCache) { - final _ret = _lib._objc_msgSend_259( - _id, _lib._sel_resourceDataUsingCache_1, shouldUseCache); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - void loadResourceDataNotifyingClient_usingCache_( - NSObject client, bool shouldUseCache) { - _lib._objc_msgSend_260( - _id, - _lib._sel_loadResourceDataNotifyingClient_usingCache_1, - client._id, - shouldUseCache); - } - - NSObject? propertyForKey_(NSString propertyKey) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_propertyForKey_1, propertyKey._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - bool setResourceData_(NSData data) { - return _lib._objc_msgSend_24(_id, _lib._sel_setResourceData_1, data._id); - } - - bool setProperty_forKey_(NSObject property, NSString propertyKey) { - return _lib._objc_msgSend_261( - _id, _lib._sel_setProperty_forKey_1, property._id, propertyKey._id); - } - - NSURLHandle? URLHandleUsingCache_(bool shouldUseCache) { - final _ret = _lib._objc_msgSend_268( - _id, _lib._sel_URLHandleUsingCache_1, shouldUseCache); - return _ret.address == 0 - ? null - : NSURLHandle._(_ret, _lib, retain: true, release: true); - } - - @override - NSURL init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_new1); - return NSURL._(_ret, _lib, retain: false, release: true); - } - - static NSURL allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURL1, _lib._sel_allocWithZone_1, zone); - return NSURL._(_ret, _lib, retain: false, release: true); - } - - static NSURL alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_alloc1); - return NSURL._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURL1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURL1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURL1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURL1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURL1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURL1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURL1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSURL1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURL1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSNumber extends NSValue { - NSNumber._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSNumber] that points to the same underlying object as [other]. - static NSNumber castFrom(T other) { - return NSNumber._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSNumber] that wraps the given raw object pointer. - static NSNumber castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNumber._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSNumber]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSNumber1); - } - - @override - NSNumber? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithChar_(int value) { - final _ret = _lib._objc_msgSend_220(_id, _lib._sel_initWithChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithUnsignedChar_(int value) { - final _ret = - _lib._objc_msgSend_221(_id, _lib._sel_initWithUnsignedChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithShort_(int value) { - final _ret = _lib._objc_msgSend_222(_id, _lib._sel_initWithShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithUnsignedShort_(int value) { - final _ret = - _lib._objc_msgSend_223(_id, _lib._sel_initWithUnsignedShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithInt_(int value) { - final _ret = _lib._objc_msgSend_224(_id, _lib._sel_initWithInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithUnsignedInt_(int value) { - final _ret = - _lib._objc_msgSend_225(_id, _lib._sel_initWithUnsignedInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithLong_(int value) { - final _ret = _lib._objc_msgSend_226(_id, _lib._sel_initWithLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithUnsignedLong_(int value) { - final _ret = - _lib._objc_msgSend_227(_id, _lib._sel_initWithUnsignedLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithLongLong_(int value) { - final _ret = - _lib._objc_msgSend_228(_id, _lib._sel_initWithLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithUnsignedLongLong_(int value) { - final _ret = _lib._objc_msgSend_229( - _id, _lib._sel_initWithUnsignedLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithFloat_(double value) { - final _ret = _lib._objc_msgSend_230(_id, _lib._sel_initWithFloat_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithDouble_(double value) { - final _ret = _lib._objc_msgSend_231(_id, _lib._sel_initWithDouble_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithBool_(bool value) { - final _ret = _lib._objc_msgSend_232(_id, _lib._sel_initWithBool_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithInteger_(int value) { - final _ret = - _lib._objc_msgSend_226(_id, _lib._sel_initWithInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithUnsignedInteger_(int value) { - final _ret = - _lib._objc_msgSend_227(_id, _lib._sel_initWithUnsignedInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - int get charValue { - return _lib._objc_msgSend_233(_id, _lib._sel_charValue1); - } - - int get unsignedCharValue { - return _lib._objc_msgSend_234(_id, _lib._sel_unsignedCharValue1); - } - - int get shortValue { - return _lib._objc_msgSend_235(_id, _lib._sel_shortValue1); - } - - int get unsignedShortValue { - return _lib._objc_msgSend_236(_id, _lib._sel_unsignedShortValue1); - } - - int get intValue { - return _lib._objc_msgSend_237(_id, _lib._sel_intValue1); - } - - int get unsignedIntValue { - return _lib._objc_msgSend_214(_id, _lib._sel_unsignedIntValue1); - } - - int get longValue { - return _lib._objc_msgSend_83(_id, _lib._sel_longValue1); - } - - int get unsignedLongValue { - return _lib._objc_msgSend_10(_id, _lib._sel_unsignedLongValue1); - } - - int get longLongValue { - return _lib._objc_msgSend_238(_id, _lib._sel_longLongValue1); - } - - int get unsignedLongLongValue { - return _lib._objc_msgSend_164(_id, _lib._sel_unsignedLongLongValue1); - } - - double get floatValue { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_239_fpret(_id, _lib._sel_floatValue1) - : _lib._objc_msgSend_239(_id, _lib._sel_floatValue1); - } - - double get doubleValue { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_doubleValue1) - : _lib._objc_msgSend_165(_id, _lib._sel_doubleValue1); - } - - bool get boolValue { - return _lib._objc_msgSend_12(_id, _lib._sel_boolValue1); - } - - int get integerValue { - return _lib._objc_msgSend_83(_id, _lib._sel_integerValue1); - } - - int get unsignedIntegerValue { - return _lib._objc_msgSend_10(_id, _lib._sel_unsignedIntegerValue1); - } - - NSString get stringValue { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_stringValue1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - int compare_(NSNumber otherNumber) { - return _lib._objc_msgSend_240(_id, _lib._sel_compare_1, otherNumber._id); - } - - bool isEqualToNumber_(NSNumber number) { - return _lib._objc_msgSend_241(_id, _lib._sel_isEqualToNumber_1, number._id); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _lib._objc_msgSend_70( - _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithChar_(AVFAudio _lib, int value) { - final _ret = _lib._objc_msgSend_220( - _lib._class_NSNumber1, _lib._sel_numberWithChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithUnsignedChar_(AVFAudio _lib, int value) { - final _ret = _lib._objc_msgSend_221( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithShort_(AVFAudio _lib, int value) { - final _ret = _lib._objc_msgSend_222( - _lib._class_NSNumber1, _lib._sel_numberWithShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithUnsignedShort_(AVFAudio _lib, int value) { - final _ret = _lib._objc_msgSend_223( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithInt_(AVFAudio _lib, int value) { - final _ret = _lib._objc_msgSend_224( - _lib._class_NSNumber1, _lib._sel_numberWithInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithUnsignedInt_(AVFAudio _lib, int value) { - final _ret = _lib._objc_msgSend_225( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithLong_(AVFAudio _lib, int value) { - final _ret = _lib._objc_msgSend_226( - _lib._class_NSNumber1, _lib._sel_numberWithLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithUnsignedLong_(AVFAudio _lib, int value) { - final _ret = _lib._objc_msgSend_227( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithLongLong_(AVFAudio _lib, int value) { - final _ret = _lib._objc_msgSend_228( - _lib._class_NSNumber1, _lib._sel_numberWithLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithUnsignedLongLong_(AVFAudio _lib, int value) { - final _ret = _lib._objc_msgSend_229( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithFloat_(AVFAudio _lib, double value) { - final _ret = _lib._objc_msgSend_230( - _lib._class_NSNumber1, _lib._sel_numberWithFloat_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithDouble_(AVFAudio _lib, double value) { - final _ret = _lib._objc_msgSend_231( - _lib._class_NSNumber1, _lib._sel_numberWithDouble_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithBool_(AVFAudio _lib, bool value) { - final _ret = _lib._objc_msgSend_232( - _lib._class_NSNumber1, _lib._sel_numberWithBool_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithInteger_(AVFAudio _lib, int value) { - final _ret = _lib._objc_msgSend_226( - _lib._class_NSNumber1, _lib._sel_numberWithInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithUnsignedInteger_(AVFAudio _lib, int value) { - final _ret = _lib._objc_msgSend_227( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - @override - NSNumber initWithBytes_objCType_( - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_46( - _id, _lib._sel_initWithBytes_objCType_1, value, type); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithBytes_objCType_( - AVFAudio _lib, ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_48(_lib._class_NSNumber1, - _lib._sel_valueWithBytes_objCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue value_withObjCType_( - AVFAudio _lib, ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_48( - _lib._class_NSNumber1, _lib._sel_value_withObjCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithNonretainedObject_( - AVFAudio _lib, NSObject? anObject) { - final _ret = _lib._objc_msgSend_49(_lib._class_NSNumber1, - _lib._sel_valueWithNonretainedObject_1, anObject?._id ?? ffi.nullptr); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithPointer_( - AVFAudio _lib, ffi.Pointer pointer) { - final _ret = _lib._objc_msgSend_50( - _lib._class_NSNumber1, _lib._sel_valueWithPointer_1, pointer); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithRange_(AVFAudio _lib, _NSRange range) { - final _ret = _lib._objc_msgSend_53( - _lib._class_NSNumber1, _lib._sel_valueWithRange_1, range); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithPoint_(AVFAudio _lib, CGPoint point) { - final _ret = _lib._objc_msgSend_55( - _lib._class_NSNumber1, _lib._sel_valueWithPoint_1, point); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithSize_(AVFAudio _lib, CGSize size) { - final _ret = _lib._objc_msgSend_56( - _lib._class_NSNumber1, _lib._sel_valueWithSize_1, size); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithRect_(AVFAudio _lib, CGRect rect) { - final _ret = _lib._objc_msgSend_57( - _lib._class_NSNumber1, _lib._sel_valueWithRect_1, rect); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithEdgeInsets_(AVFAudio _lib, NSEdgeInsets insets) { - final _ret = _lib._objc_msgSend_58( - _lib._class_NSNumber1, _lib._sel_valueWithEdgeInsets_1, insets); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - @override - NSNumber init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_new1); - return NSNumber._(_ret, _lib, retain: false, release: true); - } - - static NSNumber allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSNumber1, _lib._sel_allocWithZone_1, zone); - return NSNumber._(_ret, _lib, retain: false, release: true); - } - - static NSNumber alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_alloc1); - return NSNumber._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSNumber1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSNumber1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSNumber1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSNumber1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSNumber1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSNumber1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSNumber1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSNumber1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSNumber1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSValue extends NSObject { - NSValue._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSValue] that points to the same underlying object as [other]. - static NSValue castFrom(T other) { - return NSValue._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSValue] that wraps the given raw object pointer. - static NSValue castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSValue._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSValue]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSValue1); - } - - void getValue_size_(ffi.Pointer value, int size) { - _lib._objc_msgSend_22(_id, _lib._sel_getValue_size_1, value, size); - } - - ffi.Pointer get objCType { - return _lib._objc_msgSend_13(_id, _lib._sel_objCType1); - } - - NSValue initWithBytes_objCType_( - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_46( - _id, _lib._sel_initWithBytes_objCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - NSValue? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithBytes_objCType_( - AVFAudio _lib, ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_48( - _lib._class_NSValue1, _lib._sel_valueWithBytes_objCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue value_withObjCType_( - AVFAudio _lib, ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_48( - _lib._class_NSValue1, _lib._sel_value_withObjCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithNonretainedObject_( - AVFAudio _lib, NSObject? anObject) { - final _ret = _lib._objc_msgSend_49(_lib._class_NSValue1, - _lib._sel_valueWithNonretainedObject_1, anObject?._id ?? ffi.nullptr); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - NSObject? get nonretainedObjectValue { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_nonretainedObjectValue1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithPointer_( - AVFAudio _lib, ffi.Pointer pointer) { - final _ret = _lib._objc_msgSend_50( - _lib._class_NSValue1, _lib._sel_valueWithPointer_1, pointer); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - ffi.Pointer get pointerValue { - return _lib._objc_msgSend_20(_id, _lib._sel_pointerValue1); - } - - bool isEqualToValue_(NSValue value) { - return _lib._objc_msgSend_51(_id, _lib._sel_isEqualToValue_1, value._id); - } - - void getValue_(ffi.Pointer value) { - _lib._objc_msgSend_52(_id, _lib._sel_getValue_1, value); - } - - static NSValue valueWithRange_(AVFAudio _lib, _NSRange range) { - final _ret = _lib._objc_msgSend_53( - _lib._class_NSValue1, _lib._sel_valueWithRange_1, range); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - void getRangeValue(ffi.Pointer<_NSRange> stret) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_54_stret(stret, _id, _lib._sel_rangeValue1) - : stret.ref = _lib._objc_msgSend_54(_id, _lib._sel_rangeValue1); - } - - static NSValue valueWithPoint_(AVFAudio _lib, CGPoint point) { - final _ret = _lib._objc_msgSend_55( - _lib._class_NSValue1, _lib._sel_valueWithPoint_1, point); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithSize_(AVFAudio _lib, CGSize size) { - final _ret = _lib._objc_msgSend_56( - _lib._class_NSValue1, _lib._sel_valueWithSize_1, size); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithRect_(AVFAudio _lib, CGRect rect) { - final _ret = _lib._objc_msgSend_57( - _lib._class_NSValue1, _lib._sel_valueWithRect_1, rect); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithEdgeInsets_(AVFAudio _lib, NSEdgeInsets insets) { - final _ret = _lib._objc_msgSend_58( - _lib._class_NSValue1, _lib._sel_valueWithEdgeInsets_1, insets); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - void getPointValue(ffi.Pointer stret) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_59_stret(stret, _id, _lib._sel_pointValue1) - : stret.ref = _lib._objc_msgSend_59(_id, _lib._sel_pointValue1); - } - - void getSizeValue(ffi.Pointer stret) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_60_stret(stret, _id, _lib._sel_sizeValue1) - : stret.ref = _lib._objc_msgSend_60(_id, _lib._sel_sizeValue1); - } - - void getRectValue(ffi.Pointer stret) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_61_stret(stret, _id, _lib._sel_rectValue1) - : stret.ref = _lib._objc_msgSend_61(_id, _lib._sel_rectValue1); - } - - void getEdgeInsetsValue(ffi.Pointer stret) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_62_stret(stret, _id, _lib._sel_edgeInsetsValue1) - : stret.ref = _lib._objc_msgSend_62(_id, _lib._sel_edgeInsetsValue1); - } - - @override - NSValue init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_new1); - return NSValue._(_ret, _lib, retain: false, release: true); - } - - static NSValue allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSValue1, _lib._sel_allocWithZone_1, zone); - return NSValue._(_ret, _lib, retain: false, release: true); - } - - static NSValue alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_alloc1); - return NSValue._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSValue1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSValue1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSValue1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSValue1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSValue1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSValue1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSValue1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSValue1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSValue1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -final class CGPoint extends ffi.Struct { - @ffi.Double() - external double x; - - @ffi.Double() - external double y; -} - -final class CGSize extends ffi.Struct { - @ffi.Double() - external double width; - - @ffi.Double() - external double height; -} - -final class CGRect extends ffi.Struct { - external CGPoint origin; - - external CGSize size; -} - -final class NSEdgeInsets extends ffi.Struct { - @ffi.Double() - external double top; - - @ffi.Double() - external double left; - - @ffi.Double() - external double bottom; - - @ffi.Double() - external double right; -} - -class NSArray extends NSObject { - NSArray._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSArray] that points to the same underlying object as [other]. - static NSArray castFrom(T other) { - return NSArray._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSArray] that wraps the given raw object pointer. - static NSArray castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSArray._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSArray]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSArray1); - } - - int get count { - return _lib._objc_msgSend_10(_id, _lib._sel_count1); - } - - NSObject objectAtIndex_(int index) { - final _ret = _lib._objc_msgSend_65(_id, _lib._sel_objectAtIndex_1, index); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - @override - NSArray init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66( - _id, _lib._sel_initWithObjects_count_1, objects, cnt); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray arrayByAddingObject_(NSObject anObject) { - final _ret = _lib._objc_msgSend_67( - _id, _lib._sel_arrayByAddingObject_1, anObject._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray arrayByAddingObjectsFromArray_(NSArray otherArray) { - final _ret = _lib._objc_msgSend_68( - _id, _lib._sel_arrayByAddingObjectsFromArray_1, otherArray._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSString componentsJoinedByString_(NSString separator) { - final _ret = _lib._objc_msgSend_69( - _id, _lib._sel_componentsJoinedByString_1, separator._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - bool containsObject_(NSObject anObject) { - return _lib._objc_msgSend_0(_id, _lib._sel_containsObject_1, anObject._id); - } - - NSString get description { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _lib._objc_msgSend_70( - _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithLocale_indent_(NSObject? locale, int level) { - final _ret = _lib._objc_msgSend_71( - _id, - _lib._sel_descriptionWithLocale_indent_1, - locale?._id ?? ffi.nullptr, - level); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSObject? firstObjectCommonWithArray_(NSArray otherArray) { - final _ret = _lib._objc_msgSend_72( - _id, _lib._sel_firstObjectCommonWithArray_1, otherArray._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void getObjects_range_( - ffi.Pointer> objects, _NSRange range) { - _lib._objc_msgSend_73(_id, _lib._sel_getObjects_range_1, objects, range); - } - - int indexOfObject_(NSObject anObject) { - return _lib._objc_msgSend_74(_id, _lib._sel_indexOfObject_1, anObject._id); - } - - int indexOfObject_inRange_(NSObject anObject, _NSRange range) { - return _lib._objc_msgSend_75( - _id, _lib._sel_indexOfObject_inRange_1, anObject._id, range); - } - - int indexOfObjectIdenticalTo_(NSObject anObject) { - return _lib._objc_msgSend_74( - _id, _lib._sel_indexOfObjectIdenticalTo_1, anObject._id); - } - - int indexOfObjectIdenticalTo_inRange_(NSObject anObject, _NSRange range) { - return _lib._objc_msgSend_75( - _id, _lib._sel_indexOfObjectIdenticalTo_inRange_1, anObject._id, range); - } - - bool isEqualToArray_(NSArray otherArray) { - return _lib._objc_msgSend_76( - _id, _lib._sel_isEqualToArray_1, otherArray._id); - } - - NSObject? get firstObject { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_firstObject1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? get lastObject { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_lastObject1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSEnumerator objectEnumerator() { - final _ret = _lib._objc_msgSend_77(_id, _lib._sel_objectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } - - NSEnumerator reverseObjectEnumerator() { - final _ret = _lib._objc_msgSend_77(_id, _lib._sel_reverseObjectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } - - NSData get sortedArrayHint { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_sortedArrayHint1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - NSArray sortedArrayUsingFunction_context_( - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context) { - final _ret = _lib._objc_msgSend_78( - _id, _lib._sel_sortedArrayUsingFunction_context_1, comparator, context); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray sortedArrayUsingFunction_context_hint_( - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context, - NSData? hint) { - final _ret = _lib._objc_msgSend_79( - _id, - _lib._sel_sortedArrayUsingFunction_context_hint_1, - comparator, - context, - hint?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray sortedArrayUsingSelector_(ffi.Pointer comparator) { - final _ret = _lib._objc_msgSend_80( - _id, _lib._sel_sortedArrayUsingSelector_1, comparator); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray subarrayWithRange_(_NSRange range) { - final _ret = - _lib._objc_msgSend_81(_id, _lib._sel_subarrayWithRange_1, range); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - bool writeToURL_error_( - NSURL url, ffi.Pointer> error) { - return _lib._objc_msgSend_89( - _id, _lib._sel_writeToURL_error_1, url._id, error); - } - - void makeObjectsPerformSelector_(ffi.Pointer aSelector) { - _lib._objc_msgSend_7( - _id, _lib._sel_makeObjectsPerformSelector_1, aSelector); - } - - void makeObjectsPerformSelector_withObject_( - ffi.Pointer aSelector, NSObject? argument) { - _lib._objc_msgSend_90( - _id, - _lib._sel_makeObjectsPerformSelector_withObject_1, - aSelector, - argument?._id ?? ffi.nullptr); - } - - NSArray objectsAtIndexes_(NSIndexSet indexes) { - final _ret = - _lib._objc_msgSend_111(_id, _lib._sel_objectsAtIndexes_1, indexes._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSObject objectAtIndexedSubscript_(int idx) { - final _ret = - _lib._objc_msgSend_65(_id, _lib._sel_objectAtIndexedSubscript_1, idx); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - void enumerateObjectsUsingBlock_( - ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool block) { - _lib._objc_msgSend_112( - _id, _lib._sel_enumerateObjectsUsingBlock_1, block._id); - } - - void enumerateObjectsWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool block) { - _lib._objc_msgSend_113(_id, - _lib._sel_enumerateObjectsWithOptions_usingBlock_1, opts, block._id); - } - - void enumerateObjectsAtIndexes_options_usingBlock_(NSIndexSet s, int opts, - ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool block) { - _lib._objc_msgSend_114( - _id, - _lib._sel_enumerateObjectsAtIndexes_options_usingBlock_1, - s._id, - opts, - block._id); - } - - int indexOfObjectPassingTest_( - ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - return _lib._objc_msgSend_115( - _id, _lib._sel_indexOfObjectPassingTest_1, predicate._id); - } - - int indexOfObjectWithOptions_passingTest_( - int opts, ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - return _lib._objc_msgSend_116(_id, - _lib._sel_indexOfObjectWithOptions_passingTest_1, opts, predicate._id); - } - - int indexOfObjectAtIndexes_options_passingTest_(NSIndexSet s, int opts, - ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - return _lib._objc_msgSend_117( - _id, - _lib._sel_indexOfObjectAtIndexes_options_passingTest_1, - s._id, - opts, - predicate._id); - } - - NSIndexSet indexesOfObjectsPassingTest_( - ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _lib._objc_msgSend_118( - _id, _lib._sel_indexesOfObjectsPassingTest_1, predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet indexesOfObjectsWithOptions_passingTest_( - int opts, ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _lib._objc_msgSend_119( - _id, - _lib._sel_indexesOfObjectsWithOptions_passingTest_1, - opts, - predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_(NSIndexSet s, - int opts, ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _lib._objc_msgSend_120( - _id, - _lib._sel_indexesOfObjectsAtIndexes_options_passingTest_1, - s._id, - opts, - predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSArray sortedArrayUsingComparator_( - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { - final _ret = _lib._objc_msgSend_121( - _id, _lib._sel_sortedArrayUsingComparator_1, cmptr._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray sortedArrayWithOptions_usingComparator_( - int opts, ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { - final _ret = _lib._objc_msgSend_122(_id, - _lib._sel_sortedArrayWithOptions_usingComparator_1, opts, cmptr._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - int indexOfObject_inSortedRange_options_usingComparator_( - NSObject obj, - _NSRange r, - int opts, - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmp) { - return _lib._objc_msgSend_123( - _id, - _lib._sel_indexOfObject_inSortedRange_options_usingComparator_1, - obj._id, - r, - opts, - cmp._id); - } - - static NSArray array(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_array1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray arrayWithObject_(AVFAudio _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_124( - _lib._class_NSArray1, _lib._sel_arrayWithObject_1, anObject._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray arrayWithObjects_count_( - AVFAudio _lib, ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66( - _lib._class_NSArray1, _lib._sel_arrayWithObjects_count_1, objects, cnt); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray arrayWithObjects_(AVFAudio _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_124( - _lib._class_NSArray1, _lib._sel_arrayWithObjects_1, firstObj._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray arrayWithArray_(AVFAudio _lib, NSArray array) { - final _ret = _lib._objc_msgSend_125( - _lib._class_NSArray1, _lib._sel_arrayWithArray_1, array._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray initWithObjects_(NSObject firstObj) { - final _ret = - _lib._objc_msgSend_124(_id, _lib._sel_initWithObjects_1, firstObj._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray initWithArray_(NSArray array) { - final _ret = - _lib._objc_msgSend_125(_id, _lib._sel_initWithArray_1, array._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray initWithArray_copyItems_(NSArray array, bool flag) { - final _ret = _lib._objc_msgSend_126( - _id, _lib._sel_initWithArray_copyItems_1, array._id, flag); - return NSArray._(_ret, _lib, retain: false, release: true); - } - - NSArray? initWithContentsOfURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_127( - _id, _lib._sel_initWithContentsOfURL_error_1, url._id, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray? arrayWithContentsOfURL_error_( - AVFAudio _lib, NSURL url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_127(_lib._class_NSArray1, - _lib._sel_arrayWithContentsOfURL_error_1, url._id, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSObject differenceFromArray_withOptions_usingEquivalenceTest_( - NSArray other, int options, ObjCBlock_bool_ObjCObject_ObjCObject block) { - final _ret = _lib._objc_msgSend_128( - _id, - _lib._sel_differenceFromArray_withOptions_usingEquivalenceTest_1, - other._id, - options, - block._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject differenceFromArray_withOptions_(NSArray other, int options) { - final _ret = _lib._objc_msgSend_129( - _id, _lib._sel_differenceFromArray_withOptions_1, other._id, options); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject differenceFromArray_(NSArray other) { - final _ret = - _lib._objc_msgSend_125(_id, _lib._sel_differenceFromArray_1, other._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSArray? arrayByApplyingDifference_(NSObject difference) { - final _ret = _lib._objc_msgSend_130( - _id, _lib._sel_arrayByApplyingDifference_1, difference._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - void getObjects_(ffi.Pointer> objects) { - _lib._objc_msgSend_131(_id, _lib._sel_getObjects_1, objects); - } - - static NSArray? arrayWithContentsOfFile_(AVFAudio _lib, NSString path) { - final _ret = _lib._objc_msgSend_132( - _lib._class_NSArray1, _lib._sel_arrayWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray? arrayWithContentsOfURL_(AVFAudio _lib, NSURL url) { - final _ret = _lib._objc_msgSend_133( - _lib._class_NSArray1, _lib._sel_arrayWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray? initWithContentsOfFile_(NSString path) { - final _ret = _lib._objc_msgSend_132( - _id, _lib._sel_initWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_133(_id, _lib._sel_initWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_26( - _id, _lib._sel_writeToFile_atomically_1, path._id, useAuxiliaryFile); - } - - bool writeToURL_atomically_(NSURL url, bool atomically) { - return _lib._objc_msgSend_134( - _id, _lib._sel_writeToURL_atomically_1, url._id, atomically); - } - - NSArray pathsMatchingExtensions_(NSArray filterTypes) { - final _ret = _lib._objc_msgSend_68( - _id, _lib._sel_pathsMatchingExtensions_1, filterTypes._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSObject valueForKey_(NSString key) { - final _ret = _lib._objc_msgSend_31(_id, _lib._sel_valueForKey_1, key._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - @override - void setValue_forKey_(NSObject? value, NSString key) { - _lib._objc_msgSend_135( - _id, _lib._sel_setValue_forKey_1, value?._id ?? ffi.nullptr, key._id); - } - - void addObserver_toObjectsAtIndexes_forKeyPath_options_context_( - NSObject observer, - NSIndexSet indexes, - NSString keyPath, - int options, - ffi.Pointer context) { - _lib._objc_msgSend_136( - _id, - _lib._sel_addObserver_toObjectsAtIndexes_forKeyPath_options_context_1, - observer._id, - indexes._id, - keyPath._id, - options, - context); - } - - void removeObserver_fromObjectsAtIndexes_forKeyPath_context_( - NSObject observer, - NSIndexSet indexes, - NSString keyPath, - ffi.Pointer context) { - _lib._objc_msgSend_137( - _id, - _lib._sel_removeObserver_fromObjectsAtIndexes_forKeyPath_context_1, - observer._id, - indexes._id, - keyPath._id, - context); - } - - void removeObserver_fromObjectsAtIndexes_forKeyPath_( - NSObject observer, NSIndexSet indexes, NSString keyPath) { - _lib._objc_msgSend_138( - _id, - _lib._sel_removeObserver_fromObjectsAtIndexes_forKeyPath_1, - observer._id, - indexes._id, - keyPath._id); - } - - @override - void addObserver_forKeyPath_options_context_(NSObject observer, - NSString keyPath, int options, ffi.Pointer context) { - _lib._objc_msgSend_139( - _id, - _lib._sel_addObserver_forKeyPath_options_context_1, - observer._id, - keyPath._id, - options, - context); - } - - @override - void removeObserver_forKeyPath_context_( - NSObject observer, NSString keyPath, ffi.Pointer context) { - _lib._objc_msgSend_140(_id, _lib._sel_removeObserver_forKeyPath_context_1, - observer._id, keyPath._id, context); - } - - @override - void removeObserver_forKeyPath_(NSObject observer, NSString keyPath) { - _lib._objc_msgSend_141( - _id, _lib._sel_removeObserver_forKeyPath_1, observer._id, keyPath._id); - } - - NSArray sortedArrayUsingDescriptors_(NSArray sortDescriptors) { - final _ret = _lib._objc_msgSend_68( - _id, _lib._sel_sortedArrayUsingDescriptors_1, sortDescriptors._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray filteredArrayUsingPredicate_(NSPredicate predicate) { - final _ret = _lib._objc_msgSend_219( - _id, _lib._sel_filteredArrayUsingPredicate_1, predicate._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_new1); - return NSArray._(_ret, _lib, retain: false, release: true); - } - - static NSArray allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSArray1, _lib._sel_allocWithZone_1, zone); - return NSArray._(_ret, _lib, retain: false, release: true); - } - - static NSArray alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_alloc1); - return NSArray._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSArray1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSArray1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSArray1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSArray1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSArray1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSArray1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSArray1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSArray1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSArray1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSError extends NSObject { - NSError._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSError] that points to the same underlying object as [other]. - static NSError castFrom(T other) { - return NSError._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSError] that wraps the given raw object pointer. - static NSError castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSError._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSError]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSError1); - } - - NSError initWithDomain_code_userInfo_( - NSString domain, int code, NSObject? dict) { - final _ret = _lib._objc_msgSend_82( - _id, - _lib._sel_initWithDomain_code_userInfo_1, - domain._id, - code, - dict?._id ?? ffi.nullptr); - return NSError._(_ret, _lib, retain: true, release: true); - } - - static NSError errorWithDomain_code_userInfo_( - AVFAudio _lib, NSString domain, int code, NSObject? dict) { - final _ret = _lib._objc_msgSend_82( - _lib._class_NSError1, - _lib._sel_errorWithDomain_code_userInfo_1, - domain._id, - code, - dict?._id ?? ffi.nullptr); - return NSError._(_ret, _lib, retain: true, release: true); - } - - NSString get domain { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_domain1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - int get code { - return _lib._objc_msgSend_83(_id, _lib._sel_code1); - } - - NSObject get userInfo { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_userInfo1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSString get localizedDescription { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_localizedDescription1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get localizedFailureReason { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_localizedFailureReason1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get localizedRecoverySuggestion { - final _ret = - _lib._objc_msgSend_44(_id, _lib._sel_localizedRecoverySuggestion1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSArray? get localizedRecoveryOptions { - final _ret = - _lib._objc_msgSend_84(_id, _lib._sel_localizedRecoveryOptions1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSObject? get recoveryAttempter { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_recoveryAttempter1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSString? get helpAnchor { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_helpAnchor1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSArray get underlyingErrors { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_underlyingErrors1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static void setUserInfoValueProviderForDomain_provider_(AVFAudio _lib, - NSString errorDomain, ObjCBlock_ObjCObject_NSError_NSString? provider) { - _lib._objc_msgSend_86( - _lib._class_NSError1, - _lib._sel_setUserInfoValueProviderForDomain_provider_1, - errorDomain._id, - provider?._id ?? ffi.nullptr); - } - - static ObjCBlock_ObjCObject_NSError_NSString? userInfoValueProviderForDomain_( - AVFAudio _lib, NSError err, NSString userInfoKey, NSString errorDomain) { - final _ret = _lib._objc_msgSend_87( - _lib._class_NSError1, - _lib._sel_userInfoValueProviderForDomain_1, - err._id, - userInfoKey._id, - errorDomain._id); - return _ret.address == 0 - ? null - : ObjCBlock_ObjCObject_NSError_NSString._(_ret, _lib, - retain: true, release: true); - } - - @override - NSError init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSError._(_ret, _lib, retain: true, release: true); - } - - static NSError new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_new1); - return NSError._(_ret, _lib, retain: false, release: true); - } - - static NSError allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSError1, _lib._sel_allocWithZone_1, zone); - return NSError._(_ret, _lib, retain: false, release: true); - } - - static NSError alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_alloc1); - return NSError._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSError1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSError1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSError1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSError1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSError1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSError1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSError1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSError1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSError1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class _ObjCBlockBase implements ffi.Finalizable { - final ffi.Pointer<_ObjCBlock> _id; - final AVFAudio _lib; - bool _pendingRelease; - - _ObjCBlockBase._(this._id, this._lib, - {bool retain = false, bool release = false}) - : _pendingRelease = release { - if (retain) { - _lib._Block_copy(_id.cast()); - } - if (release) { - _lib._objc_releaseFinalizer11.attach(this, _id.cast(), detach: this); - } - } - - /// Releases the reference to the underlying ObjC block held by this wrapper. - /// Throws a StateError if this wrapper doesn't currently hold a reference. - void release() { - if (_pendingRelease) { - _pendingRelease = false; - _lib._Block_release(_id.cast()); - _lib._objc_releaseFinalizer11.detach(this); - } else { - throw StateError( - 'Released an ObjC block that was unowned or already released.'); - } - } - - @override - bool operator ==(Object other) { - return other is _ObjCBlockBase && _id == other._id; - } - - @override - int get hashCode => _id.hashCode; - - /// Return a pointer to this object. - ffi.Pointer<_ObjCBlock> get pointer => _id; - - ffi.Pointer<_ObjCBlock> retainAndReturnPointer() { - _lib._Block_copy(_id.cast()); - return _id; - } -} - -ffi.Pointer _ObjCBlock_ObjCObject_NSError_NSString_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ObjCObject_NSError_NSString_closureRegistry = Function( - ffi.Pointer, ffi.Pointer)>{}; -int _ObjCBlock_ObjCObject_NSError_NSString_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ObjCObject_NSError_NSString_registerClosure( - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_ObjCObject_NSError_NSString_closureRegistryIndex; - _ObjCBlock_ObjCObject_NSError_NSString_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -ffi.Pointer - _ObjCBlock_ObjCObject_NSError_NSString_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ObjCObject_NSError_NSString_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ObjCObject_NSError_NSString extends _ObjCBlockBase { - ObjCBlock_ObjCObject_NSError_NSString._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ObjCObject_NSError_NSString castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ObjCObject_NSError_NSString._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ObjCObject_NSError_NSString.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ObjCObject_NSError_NSString_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ObjCObject_NSError_NSString.fromFunction( - AVFAudio lib, NSObject? Function(NSError, NSString) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ObjCObject_NSError_NSString_closureTrampoline) - .cast(), - _ObjCBlock_ObjCObject_NSError_NSString_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(NSError._(arg0, lib, retain: true, release: true), NSString._(arg1, lib, retain: true, release: true)) - ?.retainAndReturnPointer() ?? - ffi.nullptr)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - NSObject? call(NSError arg0, NSString arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>() - (_id, arg0._id, arg1._id) - .address == - 0 - ? null - : NSObject._( - _id.ref.invoke - .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>()(_id, arg0._id, arg1._id), - _lib, - retain: false, - release: true); -} - -final class _ObjCBlockDesc extends ffi.Struct { - @ffi.UnsignedLong() - external int reserved; - - @ffi.UnsignedLong() - external int size; - - external ffi.Pointer copy_helper; - - external ffi.Pointer dispose_helper; - - external ffi.Pointer signature; -} - -final class _ObjCBlock extends ffi.Struct { - external ffi.Pointer isa; - - @ffi.Int() - external int flags; - - @ffi.Int() - external int reserved; - - external ffi.Pointer invoke; - - external ffi.Pointer<_ObjCBlockDesc> descriptor; - - external ffi.Pointer target; -} - -class NSIndexSet extends NSObject { - NSIndexSet._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSIndexSet] that points to the same underlying object as [other]. - static NSIndexSet castFrom(T other) { - return NSIndexSet._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSIndexSet] that wraps the given raw object pointer. - static NSIndexSet castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSIndexSet._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSIndexSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSIndexSet1); - } - - static NSIndexSet indexSet(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_indexSet1); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - static NSIndexSet indexSetWithIndex_(AVFAudio _lib, int value) { - final _ret = _lib._objc_msgSend_65( - _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndex_1, value); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - static NSIndexSet indexSetWithIndexesInRange_(AVFAudio _lib, _NSRange range) { - final _ret = _lib._objc_msgSend_91( - _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndexesInRange_1, range); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet initWithIndexesInRange_(_NSRange range) { - final _ret = - _lib._objc_msgSend_91(_id, _lib._sel_initWithIndexesInRange_1, range); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet initWithIndexSet_(NSIndexSet indexSet) { - final _ret = - _lib._objc_msgSend_92(_id, _lib._sel_initWithIndexSet_1, indexSet._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet initWithIndex_(int value) { - final _ret = _lib._objc_msgSend_65(_id, _lib._sel_initWithIndex_1, value); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - bool isEqualToIndexSet_(NSIndexSet indexSet) { - return _lib._objc_msgSend_93( - _id, _lib._sel_isEqualToIndexSet_1, indexSet._id); - } - - int get count { - return _lib._objc_msgSend_10(_id, _lib._sel_count1); - } - - int get firstIndex { - return _lib._objc_msgSend_10(_id, _lib._sel_firstIndex1); - } - - int get lastIndex { - return _lib._objc_msgSend_10(_id, _lib._sel_lastIndex1); - } - - int indexGreaterThanIndex_(int value) { - return _lib._objc_msgSend_94(_id, _lib._sel_indexGreaterThanIndex_1, value); - } - - int indexLessThanIndex_(int value) { - return _lib._objc_msgSend_94(_id, _lib._sel_indexLessThanIndex_1, value); - } - - int indexGreaterThanOrEqualToIndex_(int value) { - return _lib._objc_msgSend_94( - _id, _lib._sel_indexGreaterThanOrEqualToIndex_1, value); - } - - int indexLessThanOrEqualToIndex_(int value) { - return _lib._objc_msgSend_94( - _id, _lib._sel_indexLessThanOrEqualToIndex_1, value); - } - - int getIndexes_maxCount_inIndexRange_( - ffi.Pointer indexBuffer, - int bufferSize, - ffi.Pointer<_NSRange> range) { - return _lib._objc_msgSend_95( - _id, - _lib._sel_getIndexes_maxCount_inIndexRange_1, - indexBuffer, - bufferSize, - range); - } - - int countOfIndexesInRange_(_NSRange range) { - return _lib._objc_msgSend_96(_id, _lib._sel_countOfIndexesInRange_1, range); - } - - bool containsIndex_(int value) { - return _lib._objc_msgSend_97(_id, _lib._sel_containsIndex_1, value); - } - - bool containsIndexesInRange_(_NSRange range) { - return _lib._objc_msgSend_98( - _id, _lib._sel_containsIndexesInRange_1, range); - } - - bool containsIndexes_(NSIndexSet indexSet) { - return _lib._objc_msgSend_93( - _id, _lib._sel_containsIndexes_1, indexSet._id); - } - - bool intersectsIndexesInRange_(_NSRange range) { - return _lib._objc_msgSend_98( - _id, _lib._sel_intersectsIndexesInRange_1, range); - } - - void enumerateIndexesUsingBlock_( - ObjCBlock_ffiVoid_ffiUnsignedLong_bool block) { - _lib._objc_msgSend_99( - _id, _lib._sel_enumerateIndexesUsingBlock_1, block._id); - } - - void enumerateIndexesWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_ffiUnsignedLong_bool block) { - _lib._objc_msgSend_100(_id, - _lib._sel_enumerateIndexesWithOptions_usingBlock_1, opts, block._id); - } - - void enumerateIndexesInRange_options_usingBlock_( - _NSRange range, int opts, ObjCBlock_ffiVoid_ffiUnsignedLong_bool block) { - _lib._objc_msgSend_101( - _id, - _lib._sel_enumerateIndexesInRange_options_usingBlock_1, - range, - opts, - block._id); - } - - int indexPassingTest_(ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - return _lib._objc_msgSend_102( - _id, _lib._sel_indexPassingTest_1, predicate._id); - } - - int indexWithOptions_passingTest_( - int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - return _lib._objc_msgSend_103( - _id, _lib._sel_indexWithOptions_passingTest_1, opts, predicate._id); - } - - int indexInRange_options_passingTest_( - _NSRange range, int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - return _lib._objc_msgSend_104( - _id, - _lib._sel_indexInRange_options_passingTest_1, - range, - opts, - predicate._id); - } - - NSIndexSet indexesPassingTest_( - ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - final _ret = _lib._objc_msgSend_105( - _id, _lib._sel_indexesPassingTest_1, predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet indexesWithOptions_passingTest_( - int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - final _ret = _lib._objc_msgSend_106( - _id, _lib._sel_indexesWithOptions_passingTest_1, opts, predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet indexesInRange_options_passingTest_( - _NSRange range, int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - final _ret = _lib._objc_msgSend_107( - _id, - _lib._sel_indexesInRange_options_passingTest_1, - range, - opts, - predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - void enumerateRangesUsingBlock_(ObjCBlock_ffiVoid_NSRange_bool block) { - _lib._objc_msgSend_108( - _id, _lib._sel_enumerateRangesUsingBlock_1, block._id); - } - - void enumerateRangesWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_NSRange_bool block) { - _lib._objc_msgSend_109(_id, - _lib._sel_enumerateRangesWithOptions_usingBlock_1, opts, block._id); - } - - void enumerateRangesInRange_options_usingBlock_( - _NSRange range, int opts, ObjCBlock_ffiVoid_NSRange_bool block) { - _lib._objc_msgSend_110( - _id, - _lib._sel_enumerateRangesInRange_options_usingBlock_1, - range, - opts, - block._id); - } - - @override - NSIndexSet init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - static NSIndexSet new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_new1); - return NSIndexSet._(_ret, _lib, retain: false, release: true); - } - - static NSIndexSet allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSIndexSet1, _lib._sel_allocWithZone_1, zone); - return NSIndexSet._(_ret, _lib, retain: false, release: true); - } - - static NSIndexSet alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_alloc1); - return NSIndexSet._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSIndexSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSIndexSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSIndexSet1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSIndexSet1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSIndexSet1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSIndexSet1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSIndexSet1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSIndexSet1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSIndexSet1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -void _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() - .asFunction)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_registerClosure( - void Function(int, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_ffiUnsignedLong_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ffiUnsignedLong_bool._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ffiUnsignedLong_bool castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ffiUnsignedLong_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiUnsignedLong_bool.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.UnsignedLong arg0, ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.UnsignedLong, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiUnsignedLong_bool.fromFunction( - AVFAudio lib, void Function(int, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.UnsignedLong, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_registerClosure( - (int arg0, ffi.Pointer arg1) => fn(arg0, arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ffiUnsignedLong_bool.listener( - AVFAudio lib, void Function(int, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.UnsignedLong, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_registerClosure( - (int arg0, ffi.Pointer arg1) => fn(arg0, arg1))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.UnsignedLong, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(int arg0, ffi.Pointer arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, int, - ffi.Pointer)>()(_id, arg0, arg1); -} - -abstract class NSEnumerationOptions { - static const int NSEnumerationConcurrent = 1; - static const int NSEnumerationReverse = 2; -} - -bool _ObjCBlock_bool_ffiUnsignedLong_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() - .asFunction)>()(arg0, arg1); -final _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistry = - )>{}; -int _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_bool_ffiUnsignedLong_bool_registerClosure( - bool Function(int, ffi.Pointer) fn) { - final id = ++_ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistryIndex; - _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_ffiUnsignedLong_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) => - _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_bool_ffiUnsignedLong_bool extends _ObjCBlockBase { - ObjCBlock_bool_ffiUnsignedLong_bool._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_bool_ffiUnsignedLong_bool castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_bool_ffiUnsignedLong_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ffiUnsignedLong_bool.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi - .NativeFunction< - ffi.Bool Function( - ffi.UnsignedLong arg0, ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock>, - ffi.UnsignedLong, ffi.Pointer)>( - _ObjCBlock_bool_ffiUnsignedLong_bool_fnPtrTrampoline, - false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ffiUnsignedLong_bool.fromFunction( - AVFAudio lib, bool Function(int, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock>, - ffi.UnsignedLong, ffi.Pointer)>( - _ObjCBlock_bool_ffiUnsignedLong_bool_closureTrampoline, - false) - .cast(), - _ObjCBlock_bool_ffiUnsignedLong_bool_registerClosure( - (int arg0, ffi.Pointer arg1) => fn(arg0, arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(int arg0, ffi.Pointer arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, - ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer<_ObjCBlock>, int, - ffi.Pointer)>()(_id, arg0, arg1); -} - -void _ObjCBlock_ffiVoid_NSRange_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - _NSRange arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(_NSRange arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(_NSRange, ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( - void Function(_NSRange, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - _NSRange arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry[block.ref.target.address]!( - arg0, arg1); - -class ObjCBlock_ffiVoid_NSRange_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSRange_bool._(ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSRange_bool castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSRange_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSRange_bool.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(_NSRange arg0, ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSRange_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSRange_bool.fromFunction( - AVFAudio lib, void Function(_NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( - (_NSRange arg0, ffi.Pointer arg1) => - fn(arg0, arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSRange_bool.listener( - AVFAudio lib, void Function(_NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, _NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( - (_NSRange arg0, ffi.Pointer arg1) => - fn(arg0, arg1))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, _NSRange, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(_NSRange arg0, ffi.Pointer arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, _NSRange arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, _NSRange, - ffi.Pointer)>()(_id, arg0, arg1); -} - -void _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.UnsignedLong arg1, ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, int, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureRegistry = - , int, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_registerClosure( - void Function(ffi.Pointer, int, ffi.Pointer) fn) { - final id = - ++_ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.UnsignedLong arg1, ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool.fromFunction( - AVFAudio lib, void Function(NSObject, int, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_registerClosure( - (ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) => - fn(NSObject._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool.listener( - AVFAudio lib, void Function(NSObject, int, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_registerClosure( - (ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) => - fn(NSObject._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSObject arg0, int arg1, ffi.Pointer arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.UnsignedLong arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - int, ffi.Pointer)>()(_id, arg0._id, arg1, arg2); -} - -bool _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.UnsignedLong arg1, ffi.Pointer arg2)>>() - .asFunction< - bool Function(ffi.Pointer, int, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_closureRegistry = - , int, ffi.Pointer)>{}; -int _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_registerClosure( - bool Function(ffi.Pointer, int, ffi.Pointer) fn) { - final id = - ++_ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_closureRegistryIndex; - _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool extends _ObjCBlockBase { - ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.UnsignedLong arg1, ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline, - false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool.fromFunction( - AVFAudio lib, bool Function(NSObject, int, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_registerClosure( - (ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) => - fn(NSObject._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSObject arg0, int arg1, ffi.Pointer arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.UnsignedLong arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - int, ffi.Pointer)>()(_id, arg0._id, arg1, arg2); -} - -int _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_registerClosure( - int Function(ffi.Pointer, ffi.Pointer) fn) { - final id = - ++_ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistryIndex; - _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -int _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject - extends _ObjCBlockBase { - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int32 Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_fnPtrTrampoline, - 0) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject.fromFunction( - AVFAudio lib, int Function(NSObject, NSObject) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int32 Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureTrampoline, 0) - .cast(), - _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - NSObject._(arg0, lib, retain: true, release: true), - NSObject._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - int call(NSObject arg0, NSObject arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - int Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1._id); -} - -abstract class NSComparisonResult { - static const int NSOrderedAscending = -1; - static const int NSOrderedSame = 0; - static const int NSOrderedDescending = 1; -} - -abstract class NSSortOptions { - static const int NSSortConcurrent = 1; - static const int NSSortStable = 16; -} - -abstract class NSBinarySearchingOptions { - static const int NSBinarySearchingFirstEqual = 256; - static const int NSBinarySearchingLastEqual = 512; - static const int NSBinarySearchingInsertionIndex = 1024; -} - -abstract class NSOrderedCollectionDifferenceCalculationOptions { - static const int NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = - 1; - static const int NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = - 2; - static const int NSOrderedCollectionDifferenceCalculationInferMoves = 4; -} - -bool _ObjCBlock_bool_ObjCObject_ObjCObject_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_bool_ObjCObject_ObjCObject_registerClosure( - bool Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistryIndex; - _ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_ObjCObject_ObjCObject_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_bool_ObjCObject_ObjCObject extends _ObjCBlockBase { - ObjCBlock_bool_ObjCObject_ObjCObject._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_bool_ObjCObject_ObjCObject castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_bool_ObjCObject_ObjCObject._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_ObjCObject.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi - .NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib - ._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_ObjCObject_fnPtrTrampoline, - false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_ObjCObject.fromFunction( - AVFAudio lib, bool Function(NSObject, NSObject) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_ObjCObject_closureTrampoline, - false) - .cast(), - _ObjCBlock_bool_ObjCObject_ObjCObject_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(NSObject._(arg0, lib, retain: true, release: true), NSObject._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSObject arg0, NSObject arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1._id); -} - -abstract class NSKeyValueObservingOptions { - static const int NSKeyValueObservingOptionNew = 1; - static const int NSKeyValueObservingOptionOld = 2; - static const int NSKeyValueObservingOptionInitial = 4; - static const int NSKeyValueObservingOptionPrior = 8; -} - -class NSPredicate extends NSObject { - NSPredicate._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSPredicate] that points to the same underlying object as [other]. - static NSPredicate castFrom(T other) { - return NSPredicate._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSPredicate] that wraps the given raw object pointer. - static NSPredicate castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPredicate._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSPredicate]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSPredicate1); - } - - static NSPredicate predicateWithFormat_argumentArray_( - AVFAudio _lib, NSString predicateFormat, NSArray? arguments) { - final _ret = _lib._objc_msgSend_142( - _lib._class_NSPredicate1, - _lib._sel_predicateWithFormat_argumentArray_1, - predicateFormat._id, - arguments?._id ?? ffi.nullptr); - return NSPredicate._(_ret, _lib, retain: true, release: true); - } - - static NSPredicate predicateWithFormat_( - AVFAudio _lib, NSString predicateFormat) { - final _ret = _lib._objc_msgSend_143(_lib._class_NSPredicate1, - _lib._sel_predicateWithFormat_1, predicateFormat._id); - return NSPredicate._(_ret, _lib, retain: true, release: true); - } - - static NSPredicate predicateWithFormat_arguments_(AVFAudio _lib, - NSString predicateFormat, ffi.Pointer<__va_list_tag> argList) { - final _ret = _lib._objc_msgSend_144( - _lib._class_NSPredicate1, - _lib._sel_predicateWithFormat_arguments_1, - predicateFormat._id, - argList); - return NSPredicate._(_ret, _lib, retain: true, release: true); - } - - static NSPredicate? predicateFromMetadataQueryString_( - AVFAudio _lib, NSString queryString) { - final _ret = _lib._objc_msgSend_145(_lib._class_NSPredicate1, - _lib._sel_predicateFromMetadataQueryString_1, queryString._id); - return _ret.address == 0 - ? null - : NSPredicate._(_ret, _lib, retain: true, release: true); - } - - static NSPredicate predicateWithValue_(AVFAudio _lib, bool value) { - final _ret = _lib._objc_msgSend_146( - _lib._class_NSPredicate1, _lib._sel_predicateWithValue_1, value); - return NSPredicate._(_ret, _lib, retain: true, release: true); - } - - static NSPredicate predicateWithBlock_( - AVFAudio _lib, ObjCBlock_bool_ObjCObject_NSDictionary block) { - final _ret = _lib._objc_msgSend_216( - _lib._class_NSPredicate1, _lib._sel_predicateWithBlock_1, block._id); - return NSPredicate._(_ret, _lib, retain: true, release: true); - } - - NSString get predicateFormat { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_predicateFormat1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSPredicate predicateWithSubstitutionVariables_(NSDictionary variables) { - final _ret = _lib._objc_msgSend_159( - _id, _lib._sel_predicateWithSubstitutionVariables_1, variables._id); - return NSPredicate._(_ret, _lib, retain: true, release: true); - } - - bool evaluateWithObject_(NSObject? object) { - return _lib._objc_msgSend_217( - _id, _lib._sel_evaluateWithObject_1, object?._id ?? ffi.nullptr); - } - - bool evaluateWithObject_substitutionVariables_( - NSObject? object, NSDictionary? bindings) { - return _lib._objc_msgSend_218( - _id, - _lib._sel_evaluateWithObject_substitutionVariables_1, - object?._id ?? ffi.nullptr, - bindings?._id ?? ffi.nullptr); - } - - void allowEvaluation() { - _lib._objc_msgSend_1(_id, _lib._sel_allowEvaluation1); - } - - @override - NSPredicate init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSPredicate._(_ret, _lib, retain: true, release: true); - } - - static NSPredicate new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSPredicate1, _lib._sel_new1); - return NSPredicate._(_ret, _lib, retain: false, release: true); - } - - static NSPredicate allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSPredicate1, _lib._sel_allocWithZone_1, zone); - return NSPredicate._(_ret, _lib, retain: false, release: true); - } - - static NSPredicate alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPredicate1, _lib._sel_alloc1); - return NSPredicate._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSPredicate1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSPredicate1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSPredicate1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSPredicate1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSPredicate1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSPredicate1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSPredicate1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSPredicate1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSPredicate1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -final class __va_list_tag extends ffi.Struct { - @ffi.UnsignedInt() - external int gp_offset; - - @ffi.UnsignedInt() - external int fp_offset; - - external ffi.Pointer overflow_arg_area; - - external ffi.Pointer reg_save_area; -} - -bool _ObjCBlock_bool_ObjCObject_NSDictionary_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_bool_ObjCObject_NSDictionary_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_bool_ObjCObject_NSDictionary_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_bool_ObjCObject_NSDictionary_registerClosure( - bool Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_bool_ObjCObject_NSDictionary_closureRegistryIndex; - _ObjCBlock_bool_ObjCObject_NSDictionary_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_ObjCObject_NSDictionary_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_bool_ObjCObject_NSDictionary_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_bool_ObjCObject_NSDictionary extends _ObjCBlockBase { - ObjCBlock_bool_ObjCObject_NSDictionary._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_bool_ObjCObject_NSDictionary castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_bool_ObjCObject_NSDictionary._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_NSDictionary.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_NSDictionary_fnPtrTrampoline, - false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_NSDictionary.fromFunction( - AVFAudio lib, bool Function(NSObject?, NSDictionary?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_NSDictionary_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_ObjCObject_NSDictionary_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSObject._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSDictionary._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSObject? arg0, NSDictionary? arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); -} - -class NSDictionary extends NSObject { - NSDictionary._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSDictionary] that points to the same underlying object as [other]. - static NSDictionary castFrom(T other) { - return NSDictionary._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSDictionary] that wraps the given raw object pointer. - static NSDictionary castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDictionary._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSDictionary]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDictionary1); - } - - int get count { - return _lib._objc_msgSend_10(_id, _lib._sel_count1); - } - - NSObject? objectForKey_(NSObject aKey) { - final _ret = _lib._objc_msgSend_16(_id, _lib._sel_objectForKey_1, aKey._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSEnumerator keyEnumerator() { - final _ret = _lib._objc_msgSend_77(_id, _lib._sel_keyEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } - - @override - NSDictionary init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary initWithObjects_forKeys_count_( - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _lib._objc_msgSend_147( - _id, _lib._sel_initWithObjects_forKeys_count_1, objects, keys, cnt); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSArray get allKeys { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_allKeys1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray allKeysForObject_(NSObject anObject) { - final _ret = - _lib._objc_msgSend_67(_id, _lib._sel_allKeysForObject_1, anObject._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray get allValues { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_allValues1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSString get description { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get descriptionInStringsFileFormat { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_descriptionInStringsFileFormat1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _lib._objc_msgSend_70( - _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithLocale_indent_(NSObject? locale, int level) { - final _ret = _lib._objc_msgSend_71( - _id, - _lib._sel_descriptionWithLocale_indent_1, - locale?._id ?? ffi.nullptr, - level); - return NSString._(_ret, _lib, retain: true, release: true); - } - - bool isEqualToDictionary_(NSDictionary otherDictionary) { - return _lib._objc_msgSend_148( - _id, _lib._sel_isEqualToDictionary_1, otherDictionary._id); - } - - NSEnumerator objectEnumerator() { - final _ret = _lib._objc_msgSend_77(_id, _lib._sel_objectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } - - NSArray objectsForKeys_notFoundMarker_(NSArray keys, NSObject marker) { - final _ret = _lib._objc_msgSend_149( - _id, _lib._sel_objectsForKeys_notFoundMarker_1, keys._id, marker._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - bool writeToURL_error_( - NSURL url, ffi.Pointer> error) { - return _lib._objc_msgSend_89( - _id, _lib._sel_writeToURL_error_1, url._id, error); - } - - NSArray keysSortedByValueUsingSelector_(ffi.Pointer comparator) { - final _ret = _lib._objc_msgSend_80( - _id, _lib._sel_keysSortedByValueUsingSelector_1, comparator); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - void getObjects_andKeys_count_(ffi.Pointer> objects, - ffi.Pointer> keys, int count) { - _lib._objc_msgSend_150( - _id, _lib._sel_getObjects_andKeys_count_1, objects, keys, count); - } - - NSObject? objectForKeyedSubscript_(NSObject key) { - final _ret = _lib._objc_msgSend_16( - _id, _lib._sel_objectForKeyedSubscript_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void enumerateKeysAndObjectsUsingBlock_( - ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool block) { - _lib._objc_msgSend_151( - _id, _lib._sel_enumerateKeysAndObjectsUsingBlock_1, block._id); - } - - void enumerateKeysAndObjectsWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool block) { - _lib._objc_msgSend_152( - _id, - _lib._sel_enumerateKeysAndObjectsWithOptions_usingBlock_1, - opts, - block._id); - } - - NSArray keysSortedByValueUsingComparator_( - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { - final _ret = _lib._objc_msgSend_121( - _id, _lib._sel_keysSortedByValueUsingComparator_1, cmptr._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray keysSortedByValueWithOptions_usingComparator_( - int opts, ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { - final _ret = _lib._objc_msgSend_122( - _id, - _lib._sel_keysSortedByValueWithOptions_usingComparator_1, - opts, - cmptr._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSObject keysOfEntriesPassingTest_( - ObjCBlock_bool_ObjCObject_ObjCObject_bool predicate) { - final _ret = _lib._objc_msgSend_153( - _id, _lib._sel_keysOfEntriesPassingTest_1, predicate._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject keysOfEntriesWithOptions_passingTest_( - int opts, ObjCBlock_bool_ObjCObject_ObjCObject_bool predicate) { - final _ret = _lib._objc_msgSend_154(_id, - _lib._sel_keysOfEntriesWithOptions_passingTest_1, opts, predicate._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - void getObjects_andKeys_(ffi.Pointer> objects, - ffi.Pointer> keys) { - _lib._objc_msgSend_155(_id, _lib._sel_getObjects_andKeys_1, objects, keys); - } - - static NSDictionary? dictionaryWithContentsOfFile_( - AVFAudio _lib, NSString path) { - final _ret = _lib._objc_msgSend_156(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary? dictionaryWithContentsOfURL_(AVFAudio _lib, NSURL url) { - final _ret = _lib._objc_msgSend_157(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? initWithContentsOfFile_(NSString path) { - final _ret = _lib._objc_msgSend_156( - _id, _lib._sel_initWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_157(_id, _lib._sel_initWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_26( - _id, _lib._sel_writeToFile_atomically_1, path._id, useAuxiliaryFile); - } - - bool writeToURL_atomically_(NSURL url, bool atomically) { - return _lib._objc_msgSend_134( - _id, _lib._sel_writeToURL_atomically_1, url._id, atomically); - } - - static NSDictionary dictionary(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_dictionary1); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary dictionaryWithObject_forKey_( - AVFAudio _lib, NSObject object, NSObject key) { - final _ret = _lib._objc_msgSend_158(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary dictionaryWithObjects_forKeys_count_( - AVFAudio _lib, - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _lib._objc_msgSend_147(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary dictionaryWithObjectsAndKeys_( - AVFAudio _lib, NSObject firstObject) { - final _ret = _lib._objc_msgSend_124(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary dictionaryWithDictionary_( - AVFAudio _lib, NSDictionary dict) { - final _ret = _lib._objc_msgSend_159(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithDictionary_1, dict._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary dictionaryWithObjects_forKeys_( - AVFAudio _lib, NSArray objects, NSArray keys) { - final _ret = _lib._objc_msgSend_160(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_1, objects._id, keys._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary initWithObjectsAndKeys_(NSObject firstObject) { - final _ret = _lib._objc_msgSend_124( - _id, _lib._sel_initWithObjectsAndKeys_1, firstObject._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary initWithDictionary_(NSDictionary otherDictionary) { - final _ret = _lib._objc_msgSend_159( - _id, _lib._sel_initWithDictionary_1, otherDictionary._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary initWithDictionary_copyItems_( - NSDictionary otherDictionary, bool flag) { - final _ret = _lib._objc_msgSend_161(_id, - _lib._sel_initWithDictionary_copyItems_1, otherDictionary._id, flag); - return NSDictionary._(_ret, _lib, retain: false, release: true); - } - - NSDictionary initWithObjects_forKeys_(NSArray objects, NSArray keys) { - final _ret = _lib._objc_msgSend_160( - _id, _lib._sel_initWithObjects_forKeys_1, objects._id, keys._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? initWithContentsOfURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_162( - _id, _lib._sel_initWithContentsOfURL_error_1, url._id, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary? dictionaryWithContentsOfURL_error_( - AVFAudio _lib, NSURL url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_162(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfURL_error_1, url._id, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSObject sharedKeySetForKeys_(AVFAudio _lib, NSArray keys) { - final _ret = _lib._objc_msgSend_125( - _lib._class_NSDictionary1, _lib._sel_sharedKeySetForKeys_1, keys._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - int countByEnumeratingWithState_objects_count_( - ffi.Pointer state, - ffi.Pointer> buffer, - int len) { - return _lib._objc_msgSend_163( - _id, - _lib._sel_countByEnumeratingWithState_objects_count_1, - state, - buffer, - len); - } - - int fileSize() { - return _lib._objc_msgSend_164(_id, _lib._sel_fileSize1); - } - - NSDate? fileModificationDate() { - final _ret = _lib._objc_msgSend_183(_id, _lib._sel_fileModificationDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - NSString? fileType() { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_fileType1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - int filePosixPermissions() { - return _lib._objc_msgSend_10(_id, _lib._sel_filePosixPermissions1); - } - - NSString? fileOwnerAccountName() { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_fileOwnerAccountName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? fileGroupOwnerAccountName() { - final _ret = - _lib._objc_msgSend_44(_id, _lib._sel_fileGroupOwnerAccountName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - int fileSystemNumber() { - return _lib._objc_msgSend_83(_id, _lib._sel_fileSystemNumber1); - } - - int fileSystemFileNumber() { - return _lib._objc_msgSend_10(_id, _lib._sel_fileSystemFileNumber1); - } - - bool fileExtensionHidden() { - return _lib._objc_msgSend_12(_id, _lib._sel_fileExtensionHidden1); - } - - int fileHFSCreatorCode() { - return _lib._objc_msgSend_214(_id, _lib._sel_fileHFSCreatorCode1); - } - - int fileHFSTypeCode() { - return _lib._objc_msgSend_214(_id, _lib._sel_fileHFSTypeCode1); - } - - bool fileIsImmutable() { - return _lib._objc_msgSend_12(_id, _lib._sel_fileIsImmutable1); - } - - bool fileIsAppendOnly() { - return _lib._objc_msgSend_12(_id, _lib._sel_fileIsAppendOnly1); - } - - NSDate? fileCreationDate() { - final _ret = _lib._objc_msgSend_183(_id, _lib._sel_fileCreationDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - NSNumber? fileOwnerAccountID() { - final _ret = _lib._objc_msgSend_215(_id, _lib._sel_fileOwnerAccountID1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber? fileGroupOwnerAccountID() { - final _ret = - _lib._objc_msgSend_215(_id, _lib._sel_fileGroupOwnerAccountID1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } - - @override - NSObject? valueForKey_(NSString key) { - final _ret = _lib._objc_msgSend_38(_id, _lib._sel_valueForKey_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_new1); - return NSDictionary._(_ret, _lib, retain: false, release: true); - } - - static NSDictionary allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSDictionary1, _lib._sel_allocWithZone_1, zone); - return NSDictionary._(_ret, _lib, retain: false, release: true); - } - - static NSDictionary alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_alloc1); - return NSDictionary._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSDictionary1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSDictionary1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSDictionary1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSDictionary1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSDictionary1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSDictionary1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSDictionary1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSDictionary1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSDictionary1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -void _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_registerClosure( - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool.fromFunction( - AVFAudio lib, void Function(NSObject, NSObject, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) => - fn(NSObject._(arg0, lib, retain: true, release: true), NSObject._(arg1, lib, retain: true, release: true), arg2))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool.listener( - AVFAudio lib, void Function(NSObject, NSObject, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - NSObject._(arg0, lib, retain: true, release: true), - NSObject._(arg1, lib, retain: true, release: true), - arg2))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSObject arg0, NSObject arg1, ffi.Pointer arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1._id, arg2); -} - -bool _ObjCBlock_bool_ObjCObject_ObjCObject_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_bool_ObjCObject_ObjCObject_bool_registerClosure( - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer) - fn) { - final id = ++_ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistryIndex; - _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_bool_ObjCObject_ObjCObject_bool extends _ObjCBlockBase { - ObjCBlock_bool_ObjCObject_ObjCObject_bool._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_bool_ObjCObject_ObjCObject_bool castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_bool_ObjCObject_ObjCObject_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_ObjCObject_bool.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_ObjCObject_bool_fnPtrTrampoline, - false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_ObjCObject_bool.fromFunction( - AVFAudio lib, bool Function(NSObject, NSObject, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_ObjCObject_ObjCObject_bool_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) => - fn(NSObject._(arg0, lib, retain: true, release: true), NSObject._(arg1, lib, retain: true, release: true), arg2))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSObject arg0, NSObject arg1, ffi.Pointer arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1._id, arg2); -} - -final class NSFastEnumerationState extends ffi.Struct { - @ffi.UnsignedLong() - external int state; - - external ffi.Pointer> itemsPtr; - - external ffi.Pointer mutationsPtr; - - @ffi.Array.multi([5]) - external ffi.Array extra; -} - -class NSDate extends NSObject { - NSDate._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSDate] that points to the same underlying object as [other]. - static NSDate castFrom(T other) { - return NSDate._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSDate] that wraps the given raw object pointer. - static NSDate castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDate._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSDate]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDate1); - } - - double get timeIntervalSinceReferenceDate { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret( - _id, _lib._sel_timeIntervalSinceReferenceDate1) - : _lib._objc_msgSend_165( - _id, _lib._sel_timeIntervalSinceReferenceDate1); - } - - @override - NSDate init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - NSDate initWithTimeIntervalSinceReferenceDate_(double ti) { - final _ret = _lib._objc_msgSend_166( - _id, _lib._sel_initWithTimeIntervalSinceReferenceDate_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - NSDate? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - double timeIntervalSinceDate_(NSDate anotherDate) { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_167_fpret( - _id, _lib._sel_timeIntervalSinceDate_1, anotherDate._id) - : _lib._objc_msgSend_167( - _id, _lib._sel_timeIntervalSinceDate_1, anotherDate._id); - } - - double get timeIntervalSinceNow { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_timeIntervalSinceNow1) - : _lib._objc_msgSend_165(_id, _lib._sel_timeIntervalSinceNow1); - } - - double get timeIntervalSince1970 { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_timeIntervalSince19701) - : _lib._objc_msgSend_165(_id, _lib._sel_timeIntervalSince19701); - } - - NSObject addTimeInterval_(double seconds) { - final _ret = - _lib._objc_msgSend_166(_id, _lib._sel_addTimeInterval_1, seconds); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSDate dateByAddingTimeInterval_(double ti) { - final _ret = - _lib._objc_msgSend_166(_id, _lib._sel_dateByAddingTimeInterval_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - NSDate earlierDate_(NSDate anotherDate) { - final _ret = - _lib._objc_msgSend_168(_id, _lib._sel_earlierDate_1, anotherDate._id); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - NSDate laterDate_(NSDate anotherDate) { - final _ret = - _lib._objc_msgSend_168(_id, _lib._sel_laterDate_1, anotherDate._id); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - int compare_(NSDate other) { - return _lib._objc_msgSend_169(_id, _lib._sel_compare_1, other._id); - } - - bool isEqualToDate_(NSDate otherDate) { - return _lib._objc_msgSend_170( - _id, _lib._sel_isEqualToDate_1, otherDate._id); - } - - NSString get description { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _lib._objc_msgSend_70( - _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSDate date(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_date1); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate dateWithTimeIntervalSinceNow_(AVFAudio _lib, double secs) { - final _ret = _lib._objc_msgSend_166( - _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSinceNow_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate dateWithTimeIntervalSinceReferenceDate_( - AVFAudio _lib, double ti) { - final _ret = _lib._objc_msgSend_166(_lib._class_NSDate1, - _lib._sel_dateWithTimeIntervalSinceReferenceDate_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate dateWithTimeIntervalSince1970_(AVFAudio _lib, double secs) { - final _ret = _lib._objc_msgSend_166( - _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSince1970_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate dateWithTimeInterval_sinceDate_( - AVFAudio _lib, double secsToBeAdded, NSDate date) { - final _ret = _lib._objc_msgSend_171(_lib._class_NSDate1, - _lib._sel_dateWithTimeInterval_sinceDate_1, secsToBeAdded, date._id); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate getDistantFuture(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_172(_lib._class_NSDate1, _lib._sel_distantFuture1); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate getDistantPast(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_172(_lib._class_NSDate1, _lib._sel_distantPast1); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate getNow(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_172(_lib._class_NSDate1, _lib._sel_now1); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - NSDate initWithTimeIntervalSinceNow_(double secs) { - final _ret = _lib._objc_msgSend_166( - _id, _lib._sel_initWithTimeIntervalSinceNow_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - NSDate initWithTimeIntervalSince1970_(double secs) { - final _ret = _lib._objc_msgSend_166( - _id, _lib._sel_initWithTimeIntervalSince1970_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - NSDate initWithTimeInterval_sinceDate_(double secsToBeAdded, NSDate date) { - final _ret = _lib._objc_msgSend_171(_id, - _lib._sel_initWithTimeInterval_sinceDate_1, secsToBeAdded, date._id); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSObject? dateWithNaturalLanguageString_locale_( - AVFAudio _lib, NSString string, NSObject? locale) { - final _ret = _lib._objc_msgSend_173( - _lib._class_NSDate1, - _lib._sel_dateWithNaturalLanguageString_locale_1, - string._id, - locale?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject? dateWithNaturalLanguageString_( - AVFAudio _lib, NSString string) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSDate1, - _lib._sel_dateWithNaturalLanguageString_1, string._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject dateWithString_(AVFAudio _lib, NSString aString) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSDate1, _lib._sel_dateWithString_1, aString._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSCalendarDate dateWithCalendarFormat_timeZone_( - NSString? format, NSTimeZone? aTimeZone) { - final _ret = _lib._objc_msgSend_212( - _id, - _lib._sel_dateWithCalendarFormat_timeZone_1, - format?._id ?? ffi.nullptr, - aTimeZone?._id ?? ffi.nullptr); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - NSString? descriptionWithCalendarFormat_timeZone_locale_( - NSString? format, NSTimeZone? aTimeZone, NSObject? locale) { - final _ret = _lib._objc_msgSend_213( - _id, - _lib._sel_descriptionWithCalendarFormat_timeZone_locale_1, - format?._id ?? ffi.nullptr, - aTimeZone?._id ?? ffi.nullptr, - locale?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSObject? initWithString_(NSString description) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_initWithString_1, description._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSDate new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_new1); - return NSDate._(_ret, _lib, retain: false, release: true); - } - - static NSDate allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSDate1, _lib._sel_allocWithZone_1, zone); - return NSDate._(_ret, _lib, retain: false, release: true); - } - - static NSDate alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_alloc1); - return NSDate._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSDate1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSDate1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSDate1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSDate1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSDate1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSDate1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSDate1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSDate1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSDate1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSCalendarDate extends NSDate { - NSCalendarDate._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSCalendarDate] that points to the same underlying object as [other]. - static NSCalendarDate castFrom(T other) { - return NSCalendarDate._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSCalendarDate] that wraps the given raw object pointer. - static NSCalendarDate castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCalendarDate._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSCalendarDate]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSCalendarDate1); - } - - static NSObject calendarDate(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSCalendarDate1, _lib._sel_calendarDate1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject? dateWithString_calendarFormat_locale_( - AVFAudio _lib, NSString description, NSString format, NSObject? locale) { - final _ret = _lib._objc_msgSend_174( - _lib._class_NSCalendarDate1, - _lib._sel_dateWithString_calendarFormat_locale_1, - description._id, - format._id, - locale?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject? dateWithString_calendarFormat_( - AVFAudio _lib, NSString description, NSString format) { - final _ret = _lib._objc_msgSend_175(_lib._class_NSCalendarDate1, - _lib._sel_dateWithString_calendarFormat_1, description._id, format._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject dateWithYear_month_day_hour_minute_second_timeZone_( - AVFAudio _lib, - int year, - int month, - int day, - int hour, - int minute, - int second, - NSTimeZone? aTimeZone) { - final _ret = _lib._objc_msgSend_206( - _lib._class_NSCalendarDate1, - _lib._sel_dateWithYear_month_day_hour_minute_second_timeZone_1, - year, - month, - day, - hour, - minute, - second, - aTimeZone?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSCalendarDate dateByAddingYears_months_days_hours_minutes_seconds_( - int year, int month, int day, int hour, int minute, int second) { - final _ret = _lib._objc_msgSend_207( - _id, - _lib._sel_dateByAddingYears_months_days_hours_minutes_seconds_1, - year, - month, - day, - hour, - minute, - second); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - int dayOfCommonEra() { - return _lib._objc_msgSend_83(_id, _lib._sel_dayOfCommonEra1); - } - - int dayOfMonth() { - return _lib._objc_msgSend_83(_id, _lib._sel_dayOfMonth1); - } - - int dayOfWeek() { - return _lib._objc_msgSend_83(_id, _lib._sel_dayOfWeek1); - } - - int dayOfYear() { - return _lib._objc_msgSend_83(_id, _lib._sel_dayOfYear1); - } - - int hourOfDay() { - return _lib._objc_msgSend_83(_id, _lib._sel_hourOfDay1); - } - - int minuteOfHour() { - return _lib._objc_msgSend_83(_id, _lib._sel_minuteOfHour1); - } - - int monthOfYear() { - return _lib._objc_msgSend_83(_id, _lib._sel_monthOfYear1); - } - - int secondOfMinute() { - return _lib._objc_msgSend_83(_id, _lib._sel_secondOfMinute1); - } - - int yearOfCommonEra() { - return _lib._objc_msgSend_83(_id, _lib._sel_yearOfCommonEra1); - } - - NSString calendarFormat() { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_calendarFormat1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithCalendarFormat_locale_( - NSString format, NSObject? locale) { - final _ret = _lib._objc_msgSend_208( - _id, - _lib._sel_descriptionWithCalendarFormat_locale_1, - format._id, - locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithCalendarFormat_(NSString format) { - final _ret = _lib._objc_msgSend_69( - _id, _lib._sel_descriptionWithCalendarFormat_1, format._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - @override - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _lib._objc_msgSend_70( - _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSTimeZone timeZone() { - final _ret = _lib._objc_msgSend_179(_id, _lib._sel_timeZone1); - return NSTimeZone._(_ret, _lib, retain: true, release: true); - } - - NSObject? initWithString_calendarFormat_locale_( - NSString description, NSString format, NSObject? locale) { - final _ret = _lib._objc_msgSend_174( - _id, - _lib._sel_initWithString_calendarFormat_locale_1, - description._id, - format._id, - locale?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? initWithString_calendarFormat_( - NSString description, NSString format) { - final _ret = _lib._objc_msgSend_175(_id, - _lib._sel_initWithString_calendarFormat_1, description._id, format._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - @override - NSObject? initWithString_(NSString description) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_initWithString_1, description._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject initWithYear_month_day_hour_minute_second_timeZone_( - int year, - int month, - int day, - int hour, - int minute, - int second, - NSTimeZone? aTimeZone) { - final _ret = _lib._objc_msgSend_206( - _id, - _lib._sel_initWithYear_month_day_hour_minute_second_timeZone_1, - year, - month, - day, - hour, - minute, - second, - aTimeZone?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - void setCalendarFormat_(NSString? format) { - _lib._objc_msgSend_209( - _id, _lib._sel_setCalendarFormat_1, format?._id ?? ffi.nullptr); - } - - void setTimeZone_(NSTimeZone? aTimeZone) { - _lib._objc_msgSend_210( - _id, _lib._sel_setTimeZone_1, aTimeZone?._id ?? ffi.nullptr); - } - - void years_months_days_hours_minutes_seconds_sinceDate_( - ffi.Pointer yp, - ffi.Pointer mop, - ffi.Pointer dp, - ffi.Pointer hp, - ffi.Pointer mip, - ffi.Pointer sp, - NSCalendarDate date) { - _lib._objc_msgSend_211( - _id, - _lib._sel_years_months_days_hours_minutes_seconds_sinceDate_1, - yp, - mop, - dp, - hp, - mip, - sp, - date._id); - } - - static NSDate getDistantFuture(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_172( - _lib._class_NSCalendarDate1, _lib._sel_distantFuture1); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate getDistantPast(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_172( - _lib._class_NSCalendarDate1, _lib._sel_distantPast1); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - @override - NSCalendarDate init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - @override - NSCalendarDate initWithTimeIntervalSinceReferenceDate_(double ti) { - final _ret = _lib._objc_msgSend_166( - _id, _lib._sel_initWithTimeIntervalSinceReferenceDate_1, ti); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - @override - NSCalendarDate? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - @override - NSCalendarDate dateByAddingTimeInterval_(double ti) { - final _ret = - _lib._objc_msgSend_166(_id, _lib._sel_dateByAddingTimeInterval_1, ti); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - static NSCalendarDate date(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCalendarDate1, _lib._sel_date1); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - static NSCalendarDate dateWithTimeIntervalSinceNow_( - AVFAudio _lib, double secs) { - final _ret = _lib._objc_msgSend_166(_lib._class_NSCalendarDate1, - _lib._sel_dateWithTimeIntervalSinceNow_1, secs); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - static NSCalendarDate dateWithTimeIntervalSinceReferenceDate_( - AVFAudio _lib, double ti) { - final _ret = _lib._objc_msgSend_166(_lib._class_NSCalendarDate1, - _lib._sel_dateWithTimeIntervalSinceReferenceDate_1, ti); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - static NSCalendarDate dateWithTimeIntervalSince1970_( - AVFAudio _lib, double secs) { - final _ret = _lib._objc_msgSend_166(_lib._class_NSCalendarDate1, - _lib._sel_dateWithTimeIntervalSince1970_1, secs); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - static NSCalendarDate dateWithTimeInterval_sinceDate_( - AVFAudio _lib, double secsToBeAdded, NSDate date) { - final _ret = _lib._objc_msgSend_171(_lib._class_NSCalendarDate1, - _lib._sel_dateWithTimeInterval_sinceDate_1, secsToBeAdded, date._id); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate getNow(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_172(_lib._class_NSCalendarDate1, _lib._sel_now1); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - @override - NSCalendarDate initWithTimeIntervalSinceNow_(double secs) { - final _ret = _lib._objc_msgSend_166( - _id, _lib._sel_initWithTimeIntervalSinceNow_1, secs); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - @override - NSCalendarDate initWithTimeIntervalSince1970_(double secs) { - final _ret = _lib._objc_msgSend_166( - _id, _lib._sel_initWithTimeIntervalSince1970_1, secs); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - @override - NSCalendarDate initWithTimeInterval_sinceDate_( - double secsToBeAdded, NSDate date) { - final _ret = _lib._objc_msgSend_171(_id, - _lib._sel_initWithTimeInterval_sinceDate_1, secsToBeAdded, date._id); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - static NSObject? dateWithNaturalLanguageString_locale_( - AVFAudio _lib, NSString string, NSObject? locale) { - final _ret = _lib._objc_msgSend_173( - _lib._class_NSCalendarDate1, - _lib._sel_dateWithNaturalLanguageString_locale_1, - string._id, - locale?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject? dateWithNaturalLanguageString_( - AVFAudio _lib, NSString string) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSCalendarDate1, - _lib._sel_dateWithNaturalLanguageString_1, string._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject dateWithString_(AVFAudio _lib, NSString aString) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSCalendarDate1, _lib._sel_dateWithString_1, aString._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSCalendarDate new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCalendarDate1, _lib._sel_new1); - return NSCalendarDate._(_ret, _lib, retain: false, release: true); - } - - static NSCalendarDate allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSCalendarDate1, _lib._sel_allocWithZone_1, zone); - return NSCalendarDate._(_ret, _lib, retain: false, release: true); - } - - static NSCalendarDate alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCalendarDate1, _lib._sel_alloc1); - return NSCalendarDate._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSCalendarDate1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSCalendarDate1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSCalendarDate1, - _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSCalendarDate1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSCalendarDate1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSCalendarDate1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSCalendarDate1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSCalendarDate1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSCalendarDate1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSTimeZone extends NSObject { - NSTimeZone._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSTimeZone] that points to the same underlying object as [other]. - static NSTimeZone castFrom(T other) { - return NSTimeZone._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSTimeZone] that wraps the given raw object pointer. - static NSTimeZone castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSTimeZone._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSTimeZone]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSTimeZone1); - } - - NSString get name { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_name1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSData get data { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_data1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - int secondsFromGMTForDate_(NSDate aDate) { - return _lib._objc_msgSend_176( - _id, _lib._sel_secondsFromGMTForDate_1, aDate._id); - } - - NSString? abbreviationForDate_(NSDate aDate) { - final _ret = - _lib._objc_msgSend_177(_id, _lib._sel_abbreviationForDate_1, aDate._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - bool isDaylightSavingTimeForDate_(NSDate aDate) { - return _lib._objc_msgSend_170( - _id, _lib._sel_isDaylightSavingTimeForDate_1, aDate._id); - } - - double daylightSavingTimeOffsetForDate_(NSDate aDate) { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_167_fpret( - _id, _lib._sel_daylightSavingTimeOffsetForDate_1, aDate._id) - : _lib._objc_msgSend_167( - _id, _lib._sel_daylightSavingTimeOffsetForDate_1, aDate._id); - } - - NSDate? nextDaylightSavingTimeTransitionAfterDate_(NSDate aDate) { - final _ret = _lib._objc_msgSend_178( - _id, _lib._sel_nextDaylightSavingTimeTransitionAfterDate_1, aDate._id); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSTimeZone getSystemTimeZone(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_179( - _lib._class_NSTimeZone1, _lib._sel_systemTimeZone1); - return NSTimeZone._(_ret, _lib, retain: true, release: true); - } - - static void resetSystemTimeZone(AVFAudio _lib) { - _lib._objc_msgSend_1( - _lib._class_NSTimeZone1, _lib._sel_resetSystemTimeZone1); - } - - static NSTimeZone getDefaultTimeZone(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_179( - _lib._class_NSTimeZone1, _lib._sel_defaultTimeZone1); - return NSTimeZone._(_ret, _lib, retain: true, release: true); - } - - static void setDefaultTimeZone(AVFAudio _lib, NSTimeZone value) { - return _lib._objc_msgSend_180( - _lib._class_NSTimeZone1, _lib._sel_setDefaultTimeZone_1, value._id); - } - - static NSTimeZone getLocalTimeZone(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_179( - _lib._class_NSTimeZone1, _lib._sel_localTimeZone1); - return NSTimeZone._(_ret, _lib, retain: true, release: true); - } - - static NSArray getKnownTimeZoneNames(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSTimeZone1, _lib._sel_knownTimeZoneNames1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary getAbbreviationDictionary(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_181( - _lib._class_NSTimeZone1, _lib._sel_abbreviationDictionary1); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static void setAbbreviationDictionary(AVFAudio _lib, NSDictionary value) { - return _lib._objc_msgSend_182(_lib._class_NSTimeZone1, - _lib._sel_setAbbreviationDictionary_1, value._id); - } - - static NSString getTimeZoneDataVersion(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_21( - _lib._class_NSTimeZone1, _lib._sel_timeZoneDataVersion1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - int get secondsFromGMT { - return _lib._objc_msgSend_83(_id, _lib._sel_secondsFromGMT1); - } - - NSString? get abbreviation { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_abbreviation1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - bool get daylightSavingTime { - return _lib._objc_msgSend_12(_id, _lib._sel_isDaylightSavingTime1); - } - - double get daylightSavingTimeOffset { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_daylightSavingTimeOffset1) - : _lib._objc_msgSend_165(_id, _lib._sel_daylightSavingTimeOffset1); - } - - NSDate? get nextDaylightSavingTimeTransition { - final _ret = _lib._objc_msgSend_183( - _id, _lib._sel_nextDaylightSavingTimeTransition1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - NSString get description { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - bool isEqualToTimeZone_(NSTimeZone aTimeZone) { - return _lib._objc_msgSend_184( - _id, _lib._sel_isEqualToTimeZone_1, aTimeZone._id); - } - - NSString? localizedName_locale_(int style, NSLocale? locale) { - final _ret = _lib._objc_msgSend_203(_id, _lib._sel_localizedName_locale_1, - style, locale?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSTimeZone? timeZoneWithName_(AVFAudio _lib, NSString tzName) { - final _ret = _lib._objc_msgSend_38( - _lib._class_NSTimeZone1, _lib._sel_timeZoneWithName_1, tzName._id); - return _ret.address == 0 - ? null - : NSTimeZone._(_ret, _lib, retain: true, release: true); - } - - static NSTimeZone? timeZoneWithName_data_( - AVFAudio _lib, NSString tzName, NSData? aData) { - final _ret = _lib._objc_msgSend_204( - _lib._class_NSTimeZone1, - _lib._sel_timeZoneWithName_data_1, - tzName._id, - aData?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSTimeZone._(_ret, _lib, retain: true, release: true); - } - - NSTimeZone? initWithName_(NSString tzName) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_initWithName_1, tzName._id); - return _ret.address == 0 - ? null - : NSTimeZone._(_ret, _lib, retain: true, release: true); - } - - NSTimeZone? initWithName_data_(NSString tzName, NSData? aData) { - final _ret = _lib._objc_msgSend_204(_id, _lib._sel_initWithName_data_1, - tzName._id, aData?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSTimeZone._(_ret, _lib, retain: true, release: true); - } - - static NSTimeZone timeZoneForSecondsFromGMT_(AVFAudio _lib, int seconds) { - final _ret = _lib._objc_msgSend_205(_lib._class_NSTimeZone1, - _lib._sel_timeZoneForSecondsFromGMT_1, seconds); - return NSTimeZone._(_ret, _lib, retain: true, release: true); - } - - static NSTimeZone? timeZoneWithAbbreviation_( - AVFAudio _lib, NSString abbreviation) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSTimeZone1, - _lib._sel_timeZoneWithAbbreviation_1, abbreviation._id); - return _ret.address == 0 - ? null - : NSTimeZone._(_ret, _lib, retain: true, release: true); - } - - @override - NSTimeZone init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSTimeZone._(_ret, _lib, retain: true, release: true); - } - - static NSTimeZone new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSTimeZone1, _lib._sel_new1); - return NSTimeZone._(_ret, _lib, retain: false, release: true); - } - - static NSTimeZone allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSTimeZone1, _lib._sel_allocWithZone_1, zone); - return NSTimeZone._(_ret, _lib, retain: false, release: true); - } - - static NSTimeZone alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSTimeZone1, _lib._sel_alloc1); - return NSTimeZone._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSTimeZone1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSTimeZone1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSTimeZone1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSTimeZone1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSTimeZone1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSTimeZone1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSTimeZone1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSTimeZone1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSTimeZone1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -abstract class NSTimeZoneNameStyle { - static const int NSTimeZoneNameStyleStandard = 0; - static const int NSTimeZoneNameStyleShortStandard = 1; - static const int NSTimeZoneNameStyleDaylightSaving = 2; - static const int NSTimeZoneNameStyleShortDaylightSaving = 3; - static const int NSTimeZoneNameStyleGeneric = 4; - static const int NSTimeZoneNameStyleShortGeneric = 5; -} - -class NSLocale extends NSObject { - NSLocale._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSLocale] that points to the same underlying object as [other]. - static NSLocale castFrom(T other) { - return NSLocale._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSLocale] that wraps the given raw object pointer. - static NSLocale castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSLocale._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSLocale]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSLocale1); - } - - NSObject? objectForKey_(NSString key) { - final _ret = _lib._objc_msgSend_38(_id, _lib._sel_objectForKey_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSString? displayNameForKey_value_(NSString key, NSObject value) { - final _ret = _lib._objc_msgSend_185( - _id, _lib._sel_displayNameForKey_value_1, key._id, value._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSLocale initWithLocaleIdentifier_(NSString string) { - final _ret = _lib._objc_msgSend_31( - _id, _lib._sel_initWithLocaleIdentifier_1, string._id); - return NSLocale._(_ret, _lib, retain: true, release: true); - } - - NSLocale? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSLocale._(_ret, _lib, retain: true, release: true); - } - - NSString get localeIdentifier { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_localeIdentifier1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString localizedStringForLocaleIdentifier_(NSString localeIdentifier) { - final _ret = _lib._objc_msgSend_69(_id, - _lib._sel_localizedStringForLocaleIdentifier_1, localeIdentifier._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get languageCode { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_languageCode1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? localizedStringForLanguageCode_(NSString languageCode) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_localizedStringForLanguageCode_1, languageCode._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get languageIdentifier { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_languageIdentifier1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get countryCode { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_countryCode1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? localizedStringForCountryCode_(NSString countryCode) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_localizedStringForCountryCode_1, countryCode._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get regionCode { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_regionCode1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get scriptCode { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_scriptCode1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? localizedStringForScriptCode_(NSString scriptCode) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_localizedStringForScriptCode_1, scriptCode._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get variantCode { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_variantCode1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? localizedStringForVariantCode_(NSString variantCode) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_localizedStringForVariantCode_1, variantCode._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSCharacterSet get exemplarCharacterSet { - final _ret = _lib._objc_msgSend_187(_id, _lib._sel_exemplarCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - NSString get calendarIdentifier { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_calendarIdentifier1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? localizedStringForCalendarIdentifier_(NSString calendarIdentifier) { - final _ret = _lib._objc_msgSend_186( - _id, - _lib._sel_localizedStringForCalendarIdentifier_1, - calendarIdentifier._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get collationIdentifier { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_collationIdentifier1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? localizedStringForCollationIdentifier_( - NSString collationIdentifier) { - final _ret = _lib._objc_msgSend_186( - _id, - _lib._sel_localizedStringForCollationIdentifier_1, - collationIdentifier._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - bool get usesMetricSystem { - return _lib._objc_msgSend_12(_id, _lib._sel_usesMetricSystem1); - } - - NSString get decimalSeparator { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_decimalSeparator1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get groupingSeparator { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_groupingSeparator1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get currencySymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_currencySymbol1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get currencyCode { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_currencyCode1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? localizedStringForCurrencyCode_(NSString currencyCode) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_localizedStringForCurrencyCode_1, currencyCode._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get collatorIdentifier { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_collatorIdentifier1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? localizedStringForCollatorIdentifier_(NSString collatorIdentifier) { - final _ret = _lib._objc_msgSend_186( - _id, - _lib._sel_localizedStringForCollatorIdentifier_1, - collatorIdentifier._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get quotationBeginDelimiter { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_quotationBeginDelimiter1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get quotationEndDelimiter { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_quotationEndDelimiter1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get alternateQuotationBeginDelimiter { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_alternateQuotationBeginDelimiter1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get alternateQuotationEndDelimiter { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_alternateQuotationEndDelimiter1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSLocale getAutoupdatingCurrentLocale(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_197( - _lib._class_NSLocale1, _lib._sel_autoupdatingCurrentLocale1); - return NSLocale._(_ret, _lib, retain: true, release: true); - } - - static NSLocale getCurrentLocale(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_197(_lib._class_NSLocale1, _lib._sel_currentLocale1); - return NSLocale._(_ret, _lib, retain: true, release: true); - } - - static NSLocale getSystemLocale(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_197(_lib._class_NSLocale1, _lib._sel_systemLocale1); - return NSLocale._(_ret, _lib, retain: true, release: true); - } - - static NSLocale localeWithLocaleIdentifier_(AVFAudio _lib, NSString ident) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSLocale1, - _lib._sel_localeWithLocaleIdentifier_1, ident._id); - return NSLocale._(_ret, _lib, retain: true, release: true); - } - - @override - NSLocale init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSLocale._(_ret, _lib, retain: true, release: true); - } - - static NSArray getAvailableLocaleIdentifiers(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSLocale1, _lib._sel_availableLocaleIdentifiers1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray getISOLanguageCodes(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSLocale1, _lib._sel_ISOLanguageCodes1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray getISOCountryCodes(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSLocale1, _lib._sel_ISOCountryCodes1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray getISOCurrencyCodes(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSLocale1, _lib._sel_ISOCurrencyCodes1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray getCommonISOCurrencyCodes(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSLocale1, _lib._sel_commonISOCurrencyCodes1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray getPreferredLanguages(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSLocale1, _lib._sel_preferredLanguages1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary componentsFromLocaleIdentifier_( - AVFAudio _lib, NSString string) { - final _ret = _lib._objc_msgSend_198(_lib._class_NSLocale1, - _lib._sel_componentsFromLocaleIdentifier_1, string._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSString localeIdentifierFromComponents_( - AVFAudio _lib, NSDictionary dict) { - final _ret = _lib._objc_msgSend_199(_lib._class_NSLocale1, - _lib._sel_localeIdentifierFromComponents_1, dict._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString canonicalLocaleIdentifierFromString_( - AVFAudio _lib, NSString string) { - final _ret = _lib._objc_msgSend_69(_lib._class_NSLocale1, - _lib._sel_canonicalLocaleIdentifierFromString_1, string._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString canonicalLanguageIdentifierFromString_( - AVFAudio _lib, NSString string) { - final _ret = _lib._objc_msgSend_69(_lib._class_NSLocale1, - _lib._sel_canonicalLanguageIdentifierFromString_1, string._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? localeIdentifierFromWindowsLocaleCode_( - AVFAudio _lib, int lcid) { - final _ret = _lib._objc_msgSend_200(_lib._class_NSLocale1, - _lib._sel_localeIdentifierFromWindowsLocaleCode_1, lcid); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static int windowsLocaleCodeFromLocaleIdentifier_( - AVFAudio _lib, NSString localeIdentifier) { - return _lib._objc_msgSend_201( - _lib._class_NSLocale1, - _lib._sel_windowsLocaleCodeFromLocaleIdentifier_1, - localeIdentifier._id); - } - - static int characterDirectionForLanguage_( - AVFAudio _lib, NSString isoLangCode) { - return _lib._objc_msgSend_202(_lib._class_NSLocale1, - _lib._sel_characterDirectionForLanguage_1, isoLangCode._id); - } - - static int lineDirectionForLanguage_(AVFAudio _lib, NSString isoLangCode) { - return _lib._objc_msgSend_202(_lib._class_NSLocale1, - _lib._sel_lineDirectionForLanguage_1, isoLangCode._id); - } - - static NSLocale new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSLocale1, _lib._sel_new1); - return NSLocale._(_ret, _lib, retain: false, release: true); - } - - static NSLocale allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSLocale1, _lib._sel_allocWithZone_1, zone); - return NSLocale._(_ret, _lib, retain: false, release: true); - } - - static NSLocale alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSLocale1, _lib._sel_alloc1); - return NSLocale._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSLocale1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSLocale1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSLocale1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSLocale1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSLocale1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSLocale1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSLocale1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSLocale1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSLocale1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSCharacterSet extends NSObject { - NSCharacterSet._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSCharacterSet] that points to the same underlying object as [other]. - static NSCharacterSet castFrom(T other) { - return NSCharacterSet._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSCharacterSet] that wraps the given raw object pointer. - static NSCharacterSet castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCharacterSet._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSCharacterSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSCharacterSet1); - } - - static NSCharacterSet getControlCharacterSet(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_controlCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getWhitespaceCharacterSet(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_whitespaceCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getWhitespaceAndNewlineCharacterSet(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_187(_lib._class_NSCharacterSet1, - _lib._sel_whitespaceAndNewlineCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getDecimalDigitCharacterSet(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_decimalDigitCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getLetterCharacterSet(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_letterCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getLowercaseLetterCharacterSet(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_lowercaseLetterCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getUppercaseLetterCharacterSet(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_uppercaseLetterCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getNonBaseCharacterSet(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_nonBaseCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getAlphanumericCharacterSet(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_alphanumericCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getDecomposableCharacterSet(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_decomposableCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getIllegalCharacterSet(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_illegalCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getPunctuationCharacterSet(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_punctuationCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getCapitalizedLetterCharacterSet(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_capitalizedLetterCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getSymbolCharacterSet(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_symbolCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getNewlineCharacterSet(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_newlineCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: false, release: true); - } - - static NSCharacterSet characterSetWithRange_(AVFAudio _lib, _NSRange aRange) { - final _ret = _lib._objc_msgSend_188( - _lib._class_NSCharacterSet1, _lib._sel_characterSetWithRange_1, aRange); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet characterSetWithCharactersInString_( - AVFAudio _lib, NSString aString) { - final _ret = _lib._objc_msgSend_189(_lib._class_NSCharacterSet1, - _lib._sel_characterSetWithCharactersInString_1, aString._id); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet characterSetWithBitmapRepresentation_( - AVFAudio _lib, NSData data) { - final _ret = _lib._objc_msgSend_190(_lib._class_NSCharacterSet1, - _lib._sel_characterSetWithBitmapRepresentation_1, data._id); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet? characterSetWithContentsOfFile_( - AVFAudio _lib, NSString fName) { - final _ret = _lib._objc_msgSend_191(_lib._class_NSCharacterSet1, - _lib._sel_characterSetWithContentsOfFile_1, fName._id); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - NSCharacterSet initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_192(_id, _lib._sel_initWithCoder_1, coder._id); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - bool characterIsMember_(int aCharacter) { - return _lib._objc_msgSend_193( - _id, _lib._sel_characterIsMember_1, aCharacter); - } - - NSData get bitmapRepresentation { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_bitmapRepresentation1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - NSCharacterSet get invertedSet { - final _ret = _lib._objc_msgSend_187(_id, _lib._sel_invertedSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - bool longCharacterIsMember_(int theLongChar) { - return _lib._objc_msgSend_194( - _id, _lib._sel_longCharacterIsMember_1, theLongChar); - } - - bool isSupersetOfSet_(NSCharacterSet theOtherSet) { - return _lib._objc_msgSend_195( - _id, _lib._sel_isSupersetOfSet_1, theOtherSet._id); - } - - bool hasMemberInPlane_(int thePlane) { - return _lib._objc_msgSend_196(_id, _lib._sel_hasMemberInPlane_1, thePlane); - } - - static NSCharacterSet getURLUserAllowedCharacterSet(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_URLUserAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getURLPasswordAllowedCharacterSet(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_URLPasswordAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getURLHostAllowedCharacterSet(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_URLHostAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getURLPathAllowedCharacterSet(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_URLPathAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getURLQueryAllowedCharacterSet(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_URLQueryAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getURLFragmentAllowedCharacterSet(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_URLFragmentAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSCharacterSet init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_new1); - return NSCharacterSet._(_ret, _lib, retain: false, release: true); - } - - static NSCharacterSet allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSCharacterSet1, _lib._sel_allocWithZone_1, zone); - return NSCharacterSet._(_ret, _lib, retain: false, release: true); - } - - static NSCharacterSet alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_alloc1); - return NSCharacterSet._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSCharacterSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSCharacterSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSCharacterSet1, - _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSCharacterSet1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSCharacterSet1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSCharacterSet1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSCharacterSet1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSCharacterSet1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSCharacterSet1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -abstract class NSLocaleLanguageDirection { - static const int NSLocaleLanguageDirectionUnknown = 0; - static const int NSLocaleLanguageDirectionLeftToRight = 1; - static const int NSLocaleLanguageDirectionRightToLeft = 2; - static const int NSLocaleLanguageDirectionTopToBottom = 3; - static const int NSLocaleLanguageDirectionBottomToTop = 4; -} - -abstract class NSURLBookmarkCreationOptions { - static const int NSURLBookmarkCreationPreferFileIDResolution = 256; - static const int NSURLBookmarkCreationMinimalBookmark = 512; - static const int NSURLBookmarkCreationSuitableForBookmarkFile = 1024; - static const int NSURLBookmarkCreationWithSecurityScope = 2048; - static const int NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; - static const int NSURLBookmarkCreationWithoutImplicitSecurityScope = - 536870912; -} - -abstract class NSURLBookmarkResolutionOptions { - static const int NSURLBookmarkResolutionWithoutUI = 256; - static const int NSURLBookmarkResolutionWithoutMounting = 512; - static const int NSURLBookmarkResolutionWithSecurityScope = 1024; - static const int NSURLBookmarkResolutionWithoutImplicitStartAccessing = 32768; -} - -class NSURLHandle extends NSObject { - NSURLHandle._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLHandle] that points to the same underlying object as [other]. - static NSURLHandle castFrom(T other) { - return NSURLHandle._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSURLHandle] that wraps the given raw object pointer. - static NSURLHandle castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLHandle._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSURLHandle]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLHandle1); - } - - static void registerURLHandleClass_( - AVFAudio _lib, NSObject anURLHandleSubclass) { - _lib._objc_msgSend_15(_lib._class_NSURLHandle1, - _lib._sel_registerURLHandleClass_1, anURLHandleSubclass._id); - } - - static NSObject URLHandleClassForURL_(AVFAudio _lib, NSURL anURL) { - final _ret = _lib._objc_msgSend_262( - _lib._class_NSURLHandle1, _lib._sel_URLHandleClassForURL_1, anURL._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - int status() { - return _lib._objc_msgSend_263(_id, _lib._sel_status1); - } - - NSString failureReason() { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_failureReason1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - void addClient_(NSObject client) { - _lib._objc_msgSend_15(_id, _lib._sel_addClient_1, client._id); - } - - void removeClient_(NSObject client) { - _lib._objc_msgSend_15(_id, _lib._sel_removeClient_1, client._id); - } - - void loadInBackground() { - _lib._objc_msgSend_1(_id, _lib._sel_loadInBackground1); - } - - void cancelLoadInBackground() { - _lib._objc_msgSend_1(_id, _lib._sel_cancelLoadInBackground1); - } - - NSData resourceData() { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_resourceData1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - NSData availableResourceData() { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_availableResourceData1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - int expectedResourceDataSize() { - return _lib._objc_msgSend_238(_id, _lib._sel_expectedResourceDataSize1); - } - - void flushCachedData() { - _lib._objc_msgSend_1(_id, _lib._sel_flushCachedData1); - } - - void backgroundLoadDidFailWithReason_(NSString reason) { - _lib._objc_msgSend_247( - _id, _lib._sel_backgroundLoadDidFailWithReason_1, reason._id); - } - - void didLoadBytes_loadComplete_(NSData newBytes, bool yorn) { - _lib._objc_msgSend_264( - _id, _lib._sel_didLoadBytes_loadComplete_1, newBytes._id, yorn); - } - - static bool canInitWithURL_(AVFAudio _lib, NSURL anURL) { - return _lib._objc_msgSend_265( - _lib._class_NSURLHandle1, _lib._sel_canInitWithURL_1, anURL._id); - } - - static NSURLHandle cachedHandleForURL_(AVFAudio _lib, NSURL anURL) { - final _ret = _lib._objc_msgSend_266( - _lib._class_NSURLHandle1, _lib._sel_cachedHandleForURL_1, anURL._id); - return NSURLHandle._(_ret, _lib, retain: true, release: true); - } - - NSObject initWithURL_cached_(NSURL anURL, bool willCache) { - final _ret = _lib._objc_msgSend_267( - _id, _lib._sel_initWithURL_cached_1, anURL._id, willCache); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject propertyForKey_(NSString propertyKey) { - final _ret = - _lib._objc_msgSend_31(_id, _lib._sel_propertyForKey_1, propertyKey._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject propertyForKeyIfAvailable_(NSString propertyKey) { - final _ret = _lib._objc_msgSend_31( - _id, _lib._sel_propertyForKeyIfAvailable_1, propertyKey._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - bool writeProperty_forKey_(NSObject propertyValue, NSString propertyKey) { - return _lib._objc_msgSend_261(_id, _lib._sel_writeProperty_forKey_1, - propertyValue._id, propertyKey._id); - } - - bool writeData_(NSData data) { - return _lib._objc_msgSend_24(_id, _lib._sel_writeData_1, data._id); - } - - NSData loadInForeground() { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_loadInForeground1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - void beginLoadInBackground() { - _lib._objc_msgSend_1(_id, _lib._sel_beginLoadInBackground1); - } - - void endLoadInBackground() { - _lib._objc_msgSend_1(_id, _lib._sel_endLoadInBackground1); - } - - @override - NSURLHandle init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLHandle._(_ret, _lib, retain: true, release: true); - } - - static NSURLHandle new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_new1); - return NSURLHandle._(_ret, _lib, retain: false, release: true); - } - - static NSURLHandle allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLHandle1, _lib._sel_allocWithZone_1, zone); - return NSURLHandle._(_ret, _lib, retain: false, release: true); - } - - static NSURLHandle alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_alloc1); - return NSURLHandle._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLHandle1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLHandle1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLHandle1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLHandle1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLHandle1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLHandle1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLHandle1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSURLHandle1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLHandle1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -abstract class NSURLHandleStatus { - static const int NSURLHandleNotLoaded = 0; - static const int NSURLHandleLoadSucceeded = 1; - static const int NSURLHandleLoadInProgress = 2; - static const int NSURLHandleLoadFailed = 3; -} - -abstract class NSDataWritingOptions { - static const int NSDataWritingAtomic = 1; - static const int NSDataWritingWithoutOverwriting = 2; - static const int NSDataWritingFileProtectionNone = 268435456; - static const int NSDataWritingFileProtectionComplete = 536870912; - static const int NSDataWritingFileProtectionCompleteUnlessOpen = 805306368; - static const int - NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication = - 1073741824; - static const int NSDataWritingFileProtectionCompleteWhenUserInactive = - 1342177280; - static const int NSDataWritingFileProtectionMask = 4026531840; - static const int NSAtomicWrite = 1; -} - -abstract class NSDataSearchOptions { - static const int NSDataSearchBackwards = 1; - static const int NSDataSearchAnchored = 2; -} - -void _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, _NSRange, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( - void Function(ffi.Pointer, _NSRange, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ffiVoid_NSRange_bool castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ffiVoid_NSRange_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.fromFunction(AVFAudio lib, - void Function(ffi.Pointer, _NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(arg0, arg1, arg2))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.listener(AVFAudio lib, - void Function(ffi.Pointer, _NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(arg0, arg1, arg2))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - _NSRange, ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - _NSRange, ffi.Pointer)>()(_id, arg0, arg1, arg2); -} - -abstract class NSDataReadingOptions { - static const int NSDataReadingMappedIfSafe = 1; - static const int NSDataReadingUncached = 2; - static const int NSDataReadingMappedAlways = 8; - static const int NSDataReadingMapped = 1; - static const int NSMappedRead = 1; - static const int NSUncachedRead = 2; -} - -void _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, ffi.UnsignedLong arg1)>>() - .asFunction, int)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistry = - , int)>{}; -int _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_registerClosure( - void Function(ffi.Pointer, int) fn) { - final id = ++_ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) => - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, ffi.UnsignedLong arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer, ffi.UnsignedLong)>( - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong.fromFunction( - AVFAudio lib, void Function(ffi.Pointer, int) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer, ffi.UnsignedLong)>( - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_registerClosure( - (ffi.Pointer arg0, int arg1) => fn(arg0, arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong.listener( - AVFAudio lib, void Function(ffi.Pointer, int) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.UnsignedLong)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_registerClosure( - (ffi.Pointer arg0, int arg1) => fn(arg0, arg1))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.UnsignedLong)>? _dartFuncListenerTrampoline; - - void call(ffi.Pointer arg0, int arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.UnsignedLong arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - int)>()(_id, arg0, arg1); -} - -abstract class NSDataBase64DecodingOptions { - static const int NSDataBase64DecodingIgnoreUnknownCharacters = 1; -} - -abstract class NSDataBase64EncodingOptions { - static const int NSDataBase64Encoding64CharacterLineLength = 1; - static const int NSDataBase64Encoding76CharacterLineLength = 2; - static const int NSDataBase64EncodingEndLineWithCarriageReturn = 16; - static const int NSDataBase64EncodingEndLineWithLineFeed = 32; -} - -abstract class NSDataCompressionAlgorithm { - static const int NSDataCompressionAlgorithmLZFSE = 0; - static const int NSDataCompressionAlgorithmLZ4 = 1; - static const int NSDataCompressionAlgorithmLZMA = 2; - static const int NSDataCompressionAlgorithmZlib = 3; -} - -abstract class NSDecodingFailurePolicy { - static const int NSDecodingFailurePolicyRaiseException = 0; - static const int NSDecodingFailurePolicySetErrorAndReturn = 1; -} - -abstract class NSStringCompareOptions { - static const int NSCaseInsensitiveSearch = 1; - static const int NSLiteralSearch = 2; - static const int NSBackwardsSearch = 4; - static const int NSAnchoredSearch = 8; - static const int NSNumericSearch = 64; - static const int NSDiacriticInsensitiveSearch = 128; - static const int NSWidthInsensitiveSearch = 256; - static const int NSForcedOrderingSearch = 512; - static const int NSRegularExpressionSearch = 1024; -} - -abstract class NSStringEnumerationOptions { - static const int NSStringEnumerationByLines = 0; - static const int NSStringEnumerationByParagraphs = 1; - static const int NSStringEnumerationByComposedCharacterSequences = 2; - static const int NSStringEnumerationByWords = 3; - static const int NSStringEnumerationBySentences = 4; - static const int NSStringEnumerationByCaretPositions = 5; - static const int NSStringEnumerationByDeletionClusters = 6; - static const int NSStringEnumerationReverse = 256; - static const int NSStringEnumerationSubstringNotRequired = 512; - static const int NSStringEnumerationLocalized = 1024; -} - -void _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - _NSRange arg2, - ffi.Pointer arg3) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, - _NSRange arg2, ffi.Pointer arg3)>>() - .asFunction< - void Function(ffi.Pointer, _NSRange, _NSRange, - ffi.Pointer)>()(arg0, arg1, arg2, arg3); -final _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry = , _NSRange, _NSRange, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( - void Function(ffi.Pointer, _NSRange, _NSRange, - ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - _NSRange arg2, - ffi.Pointer arg3) => - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2, arg3); - -class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, - _NSRange arg2, ffi.Pointer arg3)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.fromFunction(AVFAudio lib, - void Function(NSString?, _NSRange, _NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, _NSRange arg2, - ffi.Pointer arg3) => - fn(arg0.address == 0 ? null : NSString._(arg0, lib, retain: true, release: true), arg1, arg2, arg3))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.listener(AVFAudio lib, - void Function(NSString?, _NSRange, _NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - _NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, _NSRange arg2, - ffi.Pointer arg3) => - fn(arg0.address == 0 ? null : NSString._(arg0, lib, retain: true, release: true), arg1, arg2, arg3))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - _NSRange, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSString? arg0, _NSRange arg1, _NSRange arg2, - ffi.Pointer arg3) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - _NSRange arg2, - ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - _NSRange, - ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1, arg2, arg3); -} - -void _ObjCBlock_ffiVoid_NSString_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer, ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_NSString_bool_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSString_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSString_bool_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSString_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSString_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSString_bool_closureRegistry[block.ref.target.address]!( - arg0, arg1); - -class ObjCBlock_ffiVoid_NSString_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSString_bool._(ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSString_bool castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSString_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSString_bool.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib - ._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSString_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSString_bool.fromFunction( - AVFAudio lib, void Function(NSString, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSString_bool_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - NSString._(arg0, lib, retain: true, release: true), - arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSString_bool.listener( - AVFAudio lib, void Function(NSString, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSString_bool_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(NSString._(arg0, lib, retain: true, release: true), - arg1))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSString arg0, ffi.Pointer arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1); -} - -abstract class NSStringEncodingConversionOptions { - static const int NSStringEncodingConversionAllowLossy = 1; - static const int NSStringEncodingConversionExternalRepresentation = 2; -} - -void _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.UnsignedLong arg1)>>() - .asFunction, int)>()( - arg0, arg1); -final _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistry = - , int)>{}; -int _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_registerClosure( - void Function(ffi.Pointer, int) fn) { - final id = - ++_ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1) => - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong - extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.UnsignedLong arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.UnsignedLong)>( - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong.fromFunction( - AVFAudio lib, void Function(ffi.Pointer, int) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.UnsignedLong)>( - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_registerClosure( - (ffi.Pointer arg0, int arg1) => - fn(arg0, arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong.listener( - AVFAudio lib, void Function(ffi.Pointer, int) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.UnsignedLong)>.listener( - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_registerClosure( - (ffi.Pointer arg0, int arg1) => - fn(arg0, arg1))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.UnsignedLong)>? _dartFuncListenerTrampoline; - - void call(ffi.Pointer arg0, int arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.UnsignedLong arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - int)>()(_id, arg0, arg1); -} - -abstract class NSLinguisticTaggerOptions { - static const int NSLinguisticTaggerOmitWords = 1; - static const int NSLinguisticTaggerOmitPunctuation = 2; - static const int NSLinguisticTaggerOmitWhitespace = 4; - static const int NSLinguisticTaggerOmitOther = 8; - static const int NSLinguisticTaggerJoinNames = 16; -} - -class NSOrthography extends NSObject { - NSOrthography._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSOrthography] that points to the same underlying object as [other]. - static NSOrthography castFrom(T other) { - return NSOrthography._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSOrthography] that wraps the given raw object pointer. - static NSOrthography castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOrthography._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSOrthography]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSOrthography1); - } - - NSString get dominantScript { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_dominantScript1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSDictionary get languageMap { - final _ret = _lib._objc_msgSend_181(_id, _lib._sel_languageMap1); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSOrthography initWithDominantScript_languageMap_( - NSString script, NSDictionary map) { - final _ret = _lib._objc_msgSend_400(_id, - _lib._sel_initWithDominantScript_languageMap_1, script._id, map._id); - return NSOrthography._(_ret, _lib, retain: true, release: true); - } - - NSOrthography? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSOrthography._(_ret, _lib, retain: true, release: true); - } - - NSArray? languagesForScript_(NSString script) { - final _ret = - _lib._objc_msgSend_132(_id, _lib._sel_languagesForScript_1, script._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSString? dominantLanguageForScript_(NSString script) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_dominantLanguageForScript_1, script._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get dominantLanguage { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_dominantLanguage1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSArray get allScripts { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_allScripts1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray get allLanguages { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_allLanguages1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSOrthography defaultOrthographyForLanguage_( - AVFAudio _lib, NSString language) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSOrthography1, - _lib._sel_defaultOrthographyForLanguage_1, language._id); - return NSOrthography._(_ret, _lib, retain: true, release: true); - } - - static NSOrthography orthographyWithDominantScript_languageMap_( - AVFAudio _lib, NSString script, NSDictionary map) { - final _ret = _lib._objc_msgSend_400( - _lib._class_NSOrthography1, - _lib._sel_orthographyWithDominantScript_languageMap_1, - script._id, - map._id); - return NSOrthography._(_ret, _lib, retain: true, release: true); - } - - @override - NSOrthography init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSOrthography._(_ret, _lib, retain: true, release: true); - } - - static NSOrthography new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOrthography1, _lib._sel_new1); - return NSOrthography._(_ret, _lib, retain: false, release: true); - } - - static NSOrthography allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSOrthography1, _lib._sel_allocWithZone_1, zone); - return NSOrthography._(_ret, _lib, retain: false, release: true); - } - - static NSOrthography alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOrthography1, _lib._sel_alloc1); - return NSOrthography._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSOrthography1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSOrthography1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSOrthography1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSOrthography1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSOrthography1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSOrthography1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSOrthography1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSOrthography1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOrthography1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -void _ObjCBlock_ffiVoid_ObjCObject_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer, ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_ObjCObject_bool_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ObjCObject_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_ObjCObject_bool_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_ObjCObject_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_ObjCObject_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ObjCObject_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_ObjCObject_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_ObjCObject_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ObjCObject_bool._(ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ObjCObject_bool castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ObjCObject_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_bool.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib - ._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_bool.fromFunction( - AVFAudio lib, void Function(NSObject, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_bool_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - NSObject._(arg0, lib, retain: true, release: true), - arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ObjCObject_bool.listener( - AVFAudio lib, void Function(NSObject, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ObjCObject_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_bool_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(NSObject._(arg0, lib, retain: true, release: true), - arg1))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSObject arg0, ffi.Pointer arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1); -} - -bool _ObjCBlock_bool_ObjCObject_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function( - ffi.Pointer, ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_bool_ObjCObject_bool_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_bool_ObjCObject_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_bool_ObjCObject_bool_registerClosure( - bool Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_bool_ObjCObject_bool_closureRegistryIndex; - _ObjCBlock_bool_ObjCObject_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_ObjCObject_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_bool_ObjCObject_bool_closureRegistry[block.ref.target.address]!( - arg0, arg1); - -class ObjCBlock_bool_ObjCObject_bool extends _ObjCBlockBase { - ObjCBlock_bool_ObjCObject_bool._(ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_bool_ObjCObject_bool castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_bool_ObjCObject_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_bool.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_bool_fnPtrTrampoline, false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_bool.fromFunction( - AVFAudio lib, bool Function(NSObject, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_bool_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_ObjCObject_bool_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(NSObject._(arg0, lib, retain: true, release: true), arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSObject arg0, ffi.Pointer arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1); -} - -class NSFileManager extends NSObject { - NSFileManager._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSFileManager] that points to the same underlying object as [other]. - static NSFileManager castFrom(T other) { - return NSFileManager._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSFileManager] that wraps the given raw object pointer. - static NSFileManager castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSFileManager._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSFileManager]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSFileManager1); - } - - static NSFileManager getDefaultManager(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_431( - _lib._class_NSFileManager1, _lib._sel_defaultManager1); - return NSFileManager._(_ret, _lib, retain: true, release: true); - } - - NSArray? mountedVolumeURLsIncludingResourceValuesForKeys_options_( - NSArray? propertyKeys, int options) { - final _ret = _lib._objc_msgSend_432( - _id, - _lib._sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_1, - propertyKeys?._id ?? ffi.nullptr, - options); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - void unmountVolumeAtURL_options_completionHandler_( - NSURL url, int mask, ObjCBlock_ffiVoid_NSError completionHandler) { - _lib._objc_msgSend_433( - _id, - _lib._sel_unmountVolumeAtURL_options_completionHandler_1, - url._id, - mask, - completionHandler._id); - } - - NSArray? contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_( - NSURL url, - NSArray? keys, - int mask, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_434( - _id, - _lib._sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_1, - url._id, - keys?._id ?? ffi.nullptr, - mask, - error); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray URLsForDirectory_inDomains_(int directory, int domainMask) { - final _ret = _lib._objc_msgSend_435( - _id, _lib._sel_URLsForDirectory_inDomains_1, directory, domainMask); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSURL? URLForDirectory_inDomain_appropriateForURL_create_error_( - int directory, - int domain, - NSURL? url, - bool shouldCreate, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_436( - _id, - _lib._sel_URLForDirectory_inDomain_appropriateForURL_create_error_1, - directory, - domain, - url?._id ?? ffi.nullptr, - shouldCreate, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - bool getRelationship_ofDirectoryAtURL_toItemAtURL_error_( - ffi.Pointer outRelationship, - NSURL directoryURL, - NSURL otherURL, - ffi.Pointer> error) { - return _lib._objc_msgSend_437( - _id, - _lib._sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_1, - outRelationship, - directoryURL._id, - otherURL._id, - error); - } - - bool getRelationship_ofDirectory_inDomain_toItemAtURL_error_( - ffi.Pointer outRelationship, - int directory, - int domainMask, - NSURL url, - ffi.Pointer> error) { - return _lib._objc_msgSend_438( - _id, - _lib._sel_getRelationship_ofDirectory_inDomain_toItemAtURL_error_1, - outRelationship, - directory, - domainMask, - url._id, - error); - } - - bool createDirectoryAtURL_withIntermediateDirectories_attributes_error_( - NSURL url, - bool createIntermediates, - NSDictionary? attributes, - ffi.Pointer> error) { - return _lib._objc_msgSend_439( - _id, - _lib._sel_createDirectoryAtURL_withIntermediateDirectories_attributes_error_1, - url._id, - createIntermediates, - attributes?._id ?? ffi.nullptr, - error); - } - - bool createSymbolicLinkAtURL_withDestinationURL_error_( - NSURL url, NSURL destURL, ffi.Pointer> error) { - return _lib._objc_msgSend_440( - _id, - _lib._sel_createSymbolicLinkAtURL_withDestinationURL_error_1, - url._id, - destURL._id, - error); - } - - NSObject? get delegate { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - set delegate(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); - } - - bool setAttributes_ofItemAtPath_error_(NSDictionary attributes, NSString path, - ffi.Pointer> error) { - return _lib._objc_msgSend_441( - _id, - _lib._sel_setAttributes_ofItemAtPath_error_1, - attributes._id, - path._id, - error); - } - - bool createDirectoryAtPath_withIntermediateDirectories_attributes_error_( - NSString path, - bool createIntermediates, - NSDictionary? attributes, - ffi.Pointer> error) { - return _lib._objc_msgSend_442( - _id, - _lib._sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_1, - path._id, - createIntermediates, - attributes?._id ?? ffi.nullptr, - error); - } - - NSArray? contentsOfDirectoryAtPath_error_( - NSString path, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_443( - _id, _lib._sel_contentsOfDirectoryAtPath_error_1, path._id, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray? subpathsOfDirectoryAtPath_error_( - NSString path, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_443( - _id, _lib._sel_subpathsOfDirectoryAtPath_error_1, path._id, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? attributesOfItemAtPath_error_( - NSString path, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_444( - _id, _lib._sel_attributesOfItemAtPath_error_1, path._id, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? attributesOfFileSystemForPath_error_( - NSString path, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_444( - _id, _lib._sel_attributesOfFileSystemForPath_error_1, path._id, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - bool createSymbolicLinkAtPath_withDestinationPath_error_(NSString path, - NSString destPath, ffi.Pointer> error) { - return _lib._objc_msgSend_445( - _id, - _lib._sel_createSymbolicLinkAtPath_withDestinationPath_error_1, - path._id, - destPath._id, - error); - } - - NSString? destinationOfSymbolicLinkAtPath_error_( - NSString path, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_446(_id, - _lib._sel_destinationOfSymbolicLinkAtPath_error_1, path._id, error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - bool copyItemAtPath_toPath_error_(NSString srcPath, NSString dstPath, - ffi.Pointer> error) { - return _lib._objc_msgSend_445(_id, _lib._sel_copyItemAtPath_toPath_error_1, - srcPath._id, dstPath._id, error); - } - - bool moveItemAtPath_toPath_error_(NSString srcPath, NSString dstPath, - ffi.Pointer> error) { - return _lib._objc_msgSend_445(_id, _lib._sel_moveItemAtPath_toPath_error_1, - srcPath._id, dstPath._id, error); - } - - bool linkItemAtPath_toPath_error_(NSString srcPath, NSString dstPath, - ffi.Pointer> error) { - return _lib._objc_msgSend_445(_id, _lib._sel_linkItemAtPath_toPath_error_1, - srcPath._id, dstPath._id, error); - } - - bool removeItemAtPath_error_( - NSString path, ffi.Pointer> error) { - return _lib._objc_msgSend_447( - _id, _lib._sel_removeItemAtPath_error_1, path._id, error); - } - - bool copyItemAtURL_toURL_error_( - NSURL srcURL, NSURL dstURL, ffi.Pointer> error) { - return _lib._objc_msgSend_440(_id, _lib._sel_copyItemAtURL_toURL_error_1, - srcURL._id, dstURL._id, error); - } - - bool moveItemAtURL_toURL_error_( - NSURL srcURL, NSURL dstURL, ffi.Pointer> error) { - return _lib._objc_msgSend_440(_id, _lib._sel_moveItemAtURL_toURL_error_1, - srcURL._id, dstURL._id, error); - } - - bool linkItemAtURL_toURL_error_( - NSURL srcURL, NSURL dstURL, ffi.Pointer> error) { - return _lib._objc_msgSend_440(_id, _lib._sel_linkItemAtURL_toURL_error_1, - srcURL._id, dstURL._id, error); - } - - bool removeItemAtURL_error_( - NSURL URL, ffi.Pointer> error) { - return _lib._objc_msgSend_89( - _id, _lib._sel_removeItemAtURL_error_1, URL._id, error); - } - - bool trashItemAtURL_resultingItemURL_error_( - NSURL url, - ffi.Pointer> outResultingURL, - ffi.Pointer> error) { - return _lib._objc_msgSend_448( - _id, - _lib._sel_trashItemAtURL_resultingItemURL_error_1, - url._id, - outResultingURL, - error); - } - - NSDictionary? fileAttributesAtPath_traverseLink_(NSString path, bool yorn) { - final _ret = _lib._objc_msgSend_449( - _id, _lib._sel_fileAttributesAtPath_traverseLink_1, path._id, yorn); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - bool changeFileAttributes_atPath_(NSDictionary attributes, NSString path) { - return _lib._objc_msgSend_450( - _id, _lib._sel_changeFileAttributes_atPath_1, attributes._id, path._id); - } - - NSArray? directoryContentsAtPath_(NSString path) { - final _ret = _lib._objc_msgSend_132( - _id, _lib._sel_directoryContentsAtPath_1, path._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? fileSystemAttributesAtPath_(NSString path) { - final _ret = _lib._objc_msgSend_156( - _id, _lib._sel_fileSystemAttributesAtPath_1, path._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSString? pathContentOfSymbolicLinkAtPath_(NSString path) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_pathContentOfSymbolicLinkAtPath_1, path._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - bool createSymbolicLinkAtPath_pathContent_( - NSString path, NSString otherpath) { - return _lib._objc_msgSend_451( - _id, - _lib._sel_createSymbolicLinkAtPath_pathContent_1, - path._id, - otherpath._id); - } - - bool createDirectoryAtPath_attributes_( - NSString path, NSDictionary attributes) { - return _lib._objc_msgSend_452(_id, - _lib._sel_createDirectoryAtPath_attributes_1, path._id, attributes._id); - } - - bool linkPath_toPath_handler_( - NSString src, NSString dest, NSObject? handler) { - return _lib._objc_msgSend_453(_id, _lib._sel_linkPath_toPath_handler_1, - src._id, dest._id, handler?._id ?? ffi.nullptr); - } - - bool copyPath_toPath_handler_( - NSString src, NSString dest, NSObject? handler) { - return _lib._objc_msgSend_453(_id, _lib._sel_copyPath_toPath_handler_1, - src._id, dest._id, handler?._id ?? ffi.nullptr); - } - - bool movePath_toPath_handler_( - NSString src, NSString dest, NSObject? handler) { - return _lib._objc_msgSend_453(_id, _lib._sel_movePath_toPath_handler_1, - src._id, dest._id, handler?._id ?? ffi.nullptr); - } - - bool removeFileAtPath_handler_(NSString path, NSObject? handler) { - return _lib._objc_msgSend_454(_id, _lib._sel_removeFileAtPath_handler_1, - path._id, handler?._id ?? ffi.nullptr); - } - - NSString get currentDirectoryPath { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_currentDirectoryPath1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - bool changeCurrentDirectoryPath_(NSString path) { - return _lib._objc_msgSend_64( - _id, _lib._sel_changeCurrentDirectoryPath_1, path._id); - } - - bool fileExistsAtPath_(NSString path) { - return _lib._objc_msgSend_64(_id, _lib._sel_fileExistsAtPath_1, path._id); - } - - bool fileExistsAtPath_isDirectory_( - NSString path, ffi.Pointer isDirectory) { - return _lib._objc_msgSend_455( - _id, _lib._sel_fileExistsAtPath_isDirectory_1, path._id, isDirectory); - } - - bool isReadableFileAtPath_(NSString path) { - return _lib._objc_msgSend_64( - _id, _lib._sel_isReadableFileAtPath_1, path._id); - } - - bool isWritableFileAtPath_(NSString path) { - return _lib._objc_msgSend_64( - _id, _lib._sel_isWritableFileAtPath_1, path._id); - } - - bool isExecutableFileAtPath_(NSString path) { - return _lib._objc_msgSend_64( - _id, _lib._sel_isExecutableFileAtPath_1, path._id); - } - - bool isDeletableFileAtPath_(NSString path) { - return _lib._objc_msgSend_64( - _id, _lib._sel_isDeletableFileAtPath_1, path._id); - } - - bool contentsEqualAtPath_andPath_(NSString path1, NSString path2) { - return _lib._objc_msgSend_451( - _id, _lib._sel_contentsEqualAtPath_andPath_1, path1._id, path2._id); - } - - NSString displayNameAtPath_(NSString path) { - final _ret = - _lib._objc_msgSend_69(_id, _lib._sel_displayNameAtPath_1, path._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSArray? componentsToDisplayForPath_(NSString path) { - final _ret = _lib._objc_msgSend_132( - _id, _lib._sel_componentsToDisplayForPath_1, path._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSObject? enumeratorAtPath_(NSString path) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_enumeratorAtPath_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_( - NSURL url, - NSArray? keys, - int mask, - ObjCBlock_bool_NSURL_NSError? handler) { - final _ret = _lib._objc_msgSend_456( - _id, - _lib._sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_1, - url._id, - keys?._id ?? ffi.nullptr, - mask, - handler?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSArray? subpathsAtPath_(NSString path) { - final _ret = - _lib._objc_msgSend_132(_id, _lib._sel_subpathsAtPath_1, path._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSData? contentsAtPath_(NSString path) { - final _ret = - _lib._objc_msgSend_457(_id, _lib._sel_contentsAtPath_1, path._id); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - bool createFileAtPath_contents_attributes_( - NSString path, NSData? data, NSDictionary? attr) { - return _lib._objc_msgSend_458( - _id, - _lib._sel_createFileAtPath_contents_attributes_1, - path._id, - data?._id ?? ffi.nullptr, - attr?._id ?? ffi.nullptr); - } - - ffi.Pointer fileSystemRepresentationWithPath_(NSString path) { - return _lib._objc_msgSend_459( - _id, _lib._sel_fileSystemRepresentationWithPath_1, path._id); - } - - NSString stringWithFileSystemRepresentation_length_( - ffi.Pointer str, int len) { - final _ret = _lib._objc_msgSend_460( - _id, _lib._sel_stringWithFileSystemRepresentation_length_1, str, len); - return NSString._(_ret, _lib, retain: true, release: true); - } - - bool - replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_( - NSURL originalItemURL, - NSURL newItemURL, - NSString? backupItemName, - int options, - ffi.Pointer> resultingURL, - ffi.Pointer> error) { - return _lib._objc_msgSend_461( - _id, - _lib._sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_1, - originalItemURL._id, - newItemURL._id, - backupItemName?._id ?? ffi.nullptr, - options, - resultingURL, - error); - } - - bool setUbiquitous_itemAtURL_destinationURL_error_(bool flag, NSURL url, - NSURL destinationURL, ffi.Pointer> error) { - return _lib._objc_msgSend_462( - _id, - _lib._sel_setUbiquitous_itemAtURL_destinationURL_error_1, - flag, - url._id, - destinationURL._id, - error); - } - - bool isUbiquitousItemAtURL_(NSURL url) { - return _lib._objc_msgSend_265( - _id, _lib._sel_isUbiquitousItemAtURL_1, url._id); - } - - bool startDownloadingUbiquitousItemAtURL_error_( - NSURL url, ffi.Pointer> error) { - return _lib._objc_msgSend_89(_id, - _lib._sel_startDownloadingUbiquitousItemAtURL_error_1, url._id, error); - } - - bool evictUbiquitousItemAtURL_error_( - NSURL url, ffi.Pointer> error) { - return _lib._objc_msgSend_89( - _id, _lib._sel_evictUbiquitousItemAtURL_error_1, url._id, error); - } - - NSURL? URLForUbiquityContainerIdentifier_(NSString? containerIdentifier) { - final _ret = _lib._objc_msgSend_463( - _id, - _lib._sel_URLForUbiquityContainerIdentifier_1, - containerIdentifier?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? URLForPublishingUbiquitousItemAtURL_expirationDate_error_( - NSURL url, - ffi.Pointer> outDate, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_464( - _id, - _lib._sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_1, - url._id, - outDate, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSObject? get ubiquityIdentityToken { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_ubiquityIdentityToken1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void getFileProviderServicesForItemAtURL_completionHandler_( - NSURL url, ObjCBlock_ffiVoid_NSDictionary_NSError completionHandler) { - _lib._objc_msgSend_465( - _id, - _lib._sel_getFileProviderServicesForItemAtURL_completionHandler_1, - url._id, - completionHandler._id); - } - - NSURL? containerURLForSecurityApplicationGroupIdentifier_( - NSString groupIdentifier) { - final _ret = _lib._objc_msgSend_257( - _id, - _lib._sel_containerURLForSecurityApplicationGroupIdentifier_1, - groupIdentifier._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL get homeDirectoryForCurrentUser { - final _ret = - _lib._objc_msgSend_466(_id, _lib._sel_homeDirectoryForCurrentUser1); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL get temporaryDirectory { - final _ret = _lib._objc_msgSend_466(_id, _lib._sel_temporaryDirectory1); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? homeDirectoryForUser_(NSString userName) { - final _ret = _lib._objc_msgSend_257( - _id, _lib._sel_homeDirectoryForUser_1, userName._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - @override - NSFileManager init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSFileManager._(_ret, _lib, retain: true, release: true); - } - - static NSFileManager new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFileManager1, _lib._sel_new1); - return NSFileManager._(_ret, _lib, retain: false, release: true); - } - - static NSFileManager allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSFileManager1, _lib._sel_allocWithZone_1, zone); - return NSFileManager._(_ret, _lib, retain: false, release: true); - } - - static NSFileManager alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFileManager1, _lib._sel_alloc1); - return NSFileManager._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSFileManager1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSFileManager1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSFileManager1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSFileManager1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSFileManager1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSFileManager1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSFileManager1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSFileManager1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSFileManager1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -abstract class NSVolumeEnumerationOptions { - static const int NSVolumeEnumerationSkipHiddenVolumes = 2; - static const int NSVolumeEnumerationProduceFileReferenceURLs = 4; -} - -abstract class NSFileManagerUnmountOptions { - static const int NSFileManagerUnmountAllPartitionsAndEjectDisk = 1; - static const int NSFileManagerUnmountWithoutUI = 2; -} - -void _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSError_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSError_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSError_closureRegistry[block.ref.target.address]!(arg0); - -class ObjCBlock_ffiVoid_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSError._(ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSError castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSError._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSError.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi - .NativeFunction arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSError.fromFunction( - AVFAudio lib, void Function(NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSError_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSError._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSError.listener(AVFAudio lib, void Function(NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSError_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSError._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(NSError? arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); -} - -abstract class NSDirectoryEnumerationOptions { - static const int NSDirectoryEnumerationSkipsSubdirectoryDescendants = 1; - static const int NSDirectoryEnumerationSkipsPackageDescendants = 2; - static const int NSDirectoryEnumerationSkipsHiddenFiles = 4; - static const int NSDirectoryEnumerationIncludesDirectoriesPostOrder = 8; - static const int NSDirectoryEnumerationProducesRelativePathURLs = 16; -} - -abstract class NSSearchPathDirectory { - static const int NSApplicationDirectory = 1; - static const int NSDemoApplicationDirectory = 2; - static const int NSDeveloperApplicationDirectory = 3; - static const int NSAdminApplicationDirectory = 4; - static const int NSLibraryDirectory = 5; - static const int NSDeveloperDirectory = 6; - static const int NSUserDirectory = 7; - static const int NSDocumentationDirectory = 8; - static const int NSDocumentDirectory = 9; - static const int NSCoreServiceDirectory = 10; - static const int NSAutosavedInformationDirectory = 11; - static const int NSDesktopDirectory = 12; - static const int NSCachesDirectory = 13; - static const int NSApplicationSupportDirectory = 14; - static const int NSDownloadsDirectory = 15; - static const int NSInputMethodsDirectory = 16; - static const int NSMoviesDirectory = 17; - static const int NSMusicDirectory = 18; - static const int NSPicturesDirectory = 19; - static const int NSPrinterDescriptionDirectory = 20; - static const int NSSharedPublicDirectory = 21; - static const int NSPreferencePanesDirectory = 22; - static const int NSApplicationScriptsDirectory = 23; - static const int NSItemReplacementDirectory = 99; - static const int NSAllApplicationsDirectory = 100; - static const int NSAllLibrariesDirectory = 101; - static const int NSTrashDirectory = 102; -} - -abstract class NSSearchPathDomainMask { - static const int NSUserDomainMask = 1; - static const int NSLocalDomainMask = 2; - static const int NSNetworkDomainMask = 4; - static const int NSSystemDomainMask = 8; - static const int NSAllDomainsMask = 65535; -} - -abstract class NSURLRelationship { - static const int NSURLRelationshipContains = 0; - static const int NSURLRelationshipSame = 1; - static const int NSURLRelationshipOther = 2; -} - -bool _ObjCBlock_bool_NSURL_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_bool_NSURL_NSError_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_bool_NSURL_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_bool_NSURL_NSError_registerClosure( - bool Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_bool_NSURL_NSError_closureRegistryIndex; - _ObjCBlock_bool_NSURL_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_NSURL_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_bool_NSURL_NSError_closureRegistry[block.ref.target.address]!( - arg0, arg1); - -class ObjCBlock_bool_NSURL_NSError extends _ObjCBlockBase { - ObjCBlock_bool_NSURL_NSError._(ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_bool_NSURL_NSError castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_bool_NSURL_NSError._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_NSURL_NSError.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer arg0, ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_NSURL_NSError_fnPtrTrampoline, false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_NSURL_NSError.fromFunction(AVFAudio lib, bool Function(NSURL, NSError) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_bool_NSURL_NSError_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_NSURL_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - NSURL._(arg0, lib, retain: true, release: true), - NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSURL arg0, NSError arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1._id); -} - -abstract class NSFileManagerItemReplacementOptions { - static const int NSFileManagerItemReplacementUsingNewMetadataOnly = 1; - static const int NSFileManagerItemReplacementWithoutDeletingBackupItem = 2; -} - -void _ObjCBlock_ffiVoid_NSDictionary_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_NSDictionary_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSDictionary_NSError._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSDictionary_NSError castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSDictionary_NSError._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSDictionary_NSError.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDictionary_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSDictionary_NSError.fromFunction( - AVFAudio lib, void Function(NSDictionary?, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSDictionary._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSDictionary_NSError.listener( - AVFAudio lib, void Function(NSDictionary?, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi - .NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSDictionary._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSDictionary? arg0, NSError? arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); -} - -class NSMutableArray extends NSArray { - NSMutableArray._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSMutableArray] that points to the same underlying object as [other]. - static NSMutableArray castFrom(T other) { - return NSMutableArray._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSMutableArray] that wraps the given raw object pointer. - static NSMutableArray castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableArray._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableArray]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableArray1); - } - - void addObject_(NSObject anObject) { - _lib._objc_msgSend_15(_id, _lib._sel_addObject_1, anObject._id); - } - - void insertObject_atIndex_(NSObject anObject, int index) { - _lib._objc_msgSend_469( - _id, _lib._sel_insertObject_atIndex_1, anObject._id, index); - } - - void removeLastObject() { - _lib._objc_msgSend_1(_id, _lib._sel_removeLastObject1); - } - - void removeObjectAtIndex_(int index) { - _lib._objc_msgSend_470(_id, _lib._sel_removeObjectAtIndex_1, index); - } - - void replaceObjectAtIndex_withObject_(int index, NSObject anObject) { - _lib._objc_msgSend_471( - _id, _lib._sel_replaceObjectAtIndex_withObject_1, index, anObject._id); - } - - @override - NSMutableArray init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - NSMutableArray initWithCapacity_(int numItems) { - final _ret = - _lib._objc_msgSend_65(_id, _lib._sel_initWithCapacity_1, numItems); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableArray? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - void addObjectsFromArray_(NSArray otherArray) { - _lib._objc_msgSend_472( - _id, _lib._sel_addObjectsFromArray_1, otherArray._id); - } - - void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { - _lib._objc_msgSend_473( - _id, _lib._sel_exchangeObjectAtIndex_withObjectAtIndex_1, idx1, idx2); - } - - void removeAllObjects() { - _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); - } - - void removeObject_inRange_(NSObject anObject, _NSRange range) { - _lib._objc_msgSend_474( - _id, _lib._sel_removeObject_inRange_1, anObject._id, range); - } - - void removeObject_(NSObject anObject) { - _lib._objc_msgSend_15(_id, _lib._sel_removeObject_1, anObject._id); - } - - void removeObjectIdenticalTo_inRange_(NSObject anObject, _NSRange range) { - _lib._objc_msgSend_474( - _id, _lib._sel_removeObjectIdenticalTo_inRange_1, anObject._id, range); - } - - void removeObjectIdenticalTo_(NSObject anObject) { - _lib._objc_msgSend_15( - _id, _lib._sel_removeObjectIdenticalTo_1, anObject._id); - } - - void removeObjectsFromIndices_numIndices_( - ffi.Pointer indices, int cnt) { - _lib._objc_msgSend_475( - _id, _lib._sel_removeObjectsFromIndices_numIndices_1, indices, cnt); - } - - void removeObjectsInArray_(NSArray otherArray) { - _lib._objc_msgSend_472( - _id, _lib._sel_removeObjectsInArray_1, otherArray._id); - } - - void removeObjectsInRange_(_NSRange range) { - _lib._objc_msgSend_476(_id, _lib._sel_removeObjectsInRange_1, range); - } - - void replaceObjectsInRange_withObjectsFromArray_range_( - _NSRange range, NSArray otherArray, _NSRange otherRange) { - _lib._objc_msgSend_477( - _id, - _lib._sel_replaceObjectsInRange_withObjectsFromArray_range_1, - range, - otherArray._id, - otherRange); - } - - void replaceObjectsInRange_withObjectsFromArray_( - _NSRange range, NSArray otherArray) { - _lib._objc_msgSend_478( - _id, - _lib._sel_replaceObjectsInRange_withObjectsFromArray_1, - range, - otherArray._id); - } - - void setArray_(NSArray otherArray) { - _lib._objc_msgSend_472(_id, _lib._sel_setArray_1, otherArray._id); - } - - void sortUsingFunction_context_( - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - compare, - ffi.Pointer context) { - _lib._objc_msgSend_479( - _id, _lib._sel_sortUsingFunction_context_1, compare, context); - } - - void sortUsingSelector_(ffi.Pointer comparator) { - _lib._objc_msgSend_7(_id, _lib._sel_sortUsingSelector_1, comparator); - } - - void insertObjects_atIndexes_(NSArray objects, NSIndexSet indexes) { - _lib._objc_msgSend_480( - _id, _lib._sel_insertObjects_atIndexes_1, objects._id, indexes._id); - } - - void removeObjectsAtIndexes_(NSIndexSet indexes) { - _lib._objc_msgSend_481( - _id, _lib._sel_removeObjectsAtIndexes_1, indexes._id); - } - - void replaceObjectsAtIndexes_withObjects_( - NSIndexSet indexes, NSArray objects) { - _lib._objc_msgSend_482(_id, _lib._sel_replaceObjectsAtIndexes_withObjects_1, - indexes._id, objects._id); - } - - void setObject_atIndexedSubscript_(NSObject obj, int idx) { - _lib._objc_msgSend_469( - _id, _lib._sel_setObject_atIndexedSubscript_1, obj._id, idx); - } - - void sortUsingComparator_( - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { - _lib._objc_msgSend_483(_id, _lib._sel_sortUsingComparator_1, cmptr._id); - } - - void sortWithOptions_usingComparator_( - int opts, ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { - _lib._objc_msgSend_484( - _id, _lib._sel_sortWithOptions_usingComparator_1, opts, cmptr._id); - } - - static NSMutableArray arrayWithCapacity_(AVFAudio _lib, int numItems) { - final _ret = _lib._objc_msgSend_65( - _lib._class_NSMutableArray1, _lib._sel_arrayWithCapacity_1, numItems); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray? arrayWithContentsOfFile_( - AVFAudio _lib, NSString path) { - final _ret = _lib._objc_msgSend_485(_lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray? arrayWithContentsOfURL_(AVFAudio _lib, NSURL url) { - final _ret = _lib._objc_msgSend_486(_lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - NSMutableArray? initWithContentsOfFile_(NSString path) { - final _ret = _lib._objc_msgSend_485( - _id, _lib._sel_initWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - NSMutableArray? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_486(_id, _lib._sel_initWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - void applyDifference_(NSObject difference) { - _lib._objc_msgSend_15(_id, _lib._sel_applyDifference_1, difference._id); - } - - void sortUsingDescriptors_(NSArray sortDescriptors) { - _lib._objc_msgSend_472( - _id, _lib._sel_sortUsingDescriptors_1, sortDescriptors._id); - } - - void filterUsingPredicate_(NSPredicate predicate) { - _lib._objc_msgSend_487( - _id, _lib._sel_filterUsingPredicate_1, predicate._id); - } - - @override - NSMutableArray initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66( - _id, _lib._sel_initWithObjects_count_1, objects, cnt); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray array(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_array1); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray arrayWithObject_(AVFAudio _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_124( - _lib._class_NSMutableArray1, _lib._sel_arrayWithObject_1, anObject._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray arrayWithObjects_count_( - AVFAudio _lib, ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66(_lib._class_NSMutableArray1, - _lib._sel_arrayWithObjects_count_1, objects, cnt); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray arrayWithObjects_(AVFAudio _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_124(_lib._class_NSMutableArray1, - _lib._sel_arrayWithObjects_1, firstObj._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray arrayWithArray_(AVFAudio _lib, NSArray array) { - final _ret = _lib._objc_msgSend_125( - _lib._class_NSMutableArray1, _lib._sel_arrayWithArray_1, array._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableArray initWithObjects_(NSObject firstObj) { - final _ret = - _lib._objc_msgSend_124(_id, _lib._sel_initWithObjects_1, firstObj._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableArray initWithArray_(NSArray array) { - final _ret = - _lib._objc_msgSend_125(_id, _lib._sel_initWithArray_1, array._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableArray initWithArray_copyItems_(NSArray array, bool flag) { - final _ret = _lib._objc_msgSend_126( - _id, _lib._sel_initWithArray_copyItems_1, array._id, flag); - return NSMutableArray._(_ret, _lib, retain: false, release: true); - } - - static NSArray? arrayWithContentsOfURL_error_( - AVFAudio _lib, NSURL url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_127(_lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfURL_error_1, url._id, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_new1); - return NSMutableArray._(_ret, _lib, retain: false, release: true); - } - - static NSMutableArray allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMutableArray1, _lib._sel_allocWithZone_1, zone); - return NSMutableArray._(_ret, _lib, retain: false, release: true); - } - - static NSMutableArray alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_alloc1); - return NSMutableArray._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSMutableArray1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSMutableArray1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSMutableArray1, - _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableArray1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSMutableArray1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSMutableArray1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSMutableArray1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSMutableArray1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableArray1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSMutableOrderedSet extends NSOrderedSet { - NSMutableOrderedSet._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSMutableOrderedSet] that points to the same underlying object as [other]. - static NSMutableOrderedSet castFrom(T other) { - return NSMutableOrderedSet._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSMutableOrderedSet] that wraps the given raw object pointer. - static NSMutableOrderedSet castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableOrderedSet._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableOrderedSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableOrderedSet1); - } - - void insertObject_atIndex_(NSObject object, int idx) { - _lib._objc_msgSend_469( - _id, _lib._sel_insertObject_atIndex_1, object._id, idx); - } - - void removeObjectAtIndex_(int idx) { - _lib._objc_msgSend_470(_id, _lib._sel_removeObjectAtIndex_1, idx); - } - - void replaceObjectAtIndex_withObject_(int idx, NSObject object) { - _lib._objc_msgSend_471( - _id, _lib._sel_replaceObjectAtIndex_withObject_1, idx, object._id); - } - - @override - NSMutableOrderedSet? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableOrderedSet init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSMutableOrderedSet initWithCapacity_(int numItems) { - final _ret = - _lib._objc_msgSend_65(_id, _lib._sel_initWithCapacity_1, numItems); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - void addObject_(NSObject object) { - _lib._objc_msgSend_15(_id, _lib._sel_addObject_1, object._id); - } - - void addObjects_count_( - ffi.Pointer> objects, int count) { - _lib._objc_msgSend_500(_id, _lib._sel_addObjects_count_1, objects, count); - } - - void addObjectsFromArray_(NSArray array) { - _lib._objc_msgSend_472(_id, _lib._sel_addObjectsFromArray_1, array._id); - } - - void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { - _lib._objc_msgSend_473( - _id, _lib._sel_exchangeObjectAtIndex_withObjectAtIndex_1, idx1, idx2); - } - - void moveObjectsAtIndexes_toIndex_(NSIndexSet indexes, int idx) { - _lib._objc_msgSend_501( - _id, _lib._sel_moveObjectsAtIndexes_toIndex_1, indexes._id, idx); - } - - void insertObjects_atIndexes_(NSArray objects, NSIndexSet indexes) { - _lib._objc_msgSend_480( - _id, _lib._sel_insertObjects_atIndexes_1, objects._id, indexes._id); - } - - void setObject_atIndex_(NSObject obj, int idx) { - _lib._objc_msgSend_469(_id, _lib._sel_setObject_atIndex_1, obj._id, idx); - } - - void setObject_atIndexedSubscript_(NSObject obj, int idx) { - _lib._objc_msgSend_469( - _id, _lib._sel_setObject_atIndexedSubscript_1, obj._id, idx); - } - - void replaceObjectsInRange_withObjects_count_( - _NSRange range, ffi.Pointer> objects, int count) { - _lib._objc_msgSend_502( - _id, - _lib._sel_replaceObjectsInRange_withObjects_count_1, - range, - objects, - count); - } - - void replaceObjectsAtIndexes_withObjects_( - NSIndexSet indexes, NSArray objects) { - _lib._objc_msgSend_482(_id, _lib._sel_replaceObjectsAtIndexes_withObjects_1, - indexes._id, objects._id); - } - - void removeObjectsInRange_(_NSRange range) { - _lib._objc_msgSend_476(_id, _lib._sel_removeObjectsInRange_1, range); - } - - void removeObjectsAtIndexes_(NSIndexSet indexes) { - _lib._objc_msgSend_481( - _id, _lib._sel_removeObjectsAtIndexes_1, indexes._id); - } - - void removeAllObjects() { - _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); - } - - void removeObject_(NSObject object) { - _lib._objc_msgSend_15(_id, _lib._sel_removeObject_1, object._id); - } - - void removeObjectsInArray_(NSArray array) { - _lib._objc_msgSend_472(_id, _lib._sel_removeObjectsInArray_1, array._id); - } - - void intersectOrderedSet_(NSOrderedSet other) { - _lib._objc_msgSend_503(_id, _lib._sel_intersectOrderedSet_1, other._id); - } - - void minusOrderedSet_(NSOrderedSet other) { - _lib._objc_msgSend_503(_id, _lib._sel_minusOrderedSet_1, other._id); - } - - void unionOrderedSet_(NSOrderedSet other) { - _lib._objc_msgSend_503(_id, _lib._sel_unionOrderedSet_1, other._id); - } - - void intersectSet_(NSSet other) { - _lib._objc_msgSend_504(_id, _lib._sel_intersectSet_1, other._id); - } - - void minusSet_(NSSet other) { - _lib._objc_msgSend_504(_id, _lib._sel_minusSet_1, other._id); - } - - void unionSet_(NSSet other) { - _lib._objc_msgSend_504(_id, _lib._sel_unionSet_1, other._id); - } - - void sortUsingComparator_( - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { - _lib._objc_msgSend_483(_id, _lib._sel_sortUsingComparator_1, cmptr._id); - } - - void sortWithOptions_usingComparator_( - int opts, ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { - _lib._objc_msgSend_484( - _id, _lib._sel_sortWithOptions_usingComparator_1, opts, cmptr._id); - } - - void sortRange_options_usingComparator_(_NSRange range, int opts, - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { - _lib._objc_msgSend_505(_id, _lib._sel_sortRange_options_usingComparator_1, - range, opts, cmptr._id); - } - - static NSMutableOrderedSet orderedSetWithCapacity_( - AVFAudio _lib, int numItems) { - final _ret = _lib._objc_msgSend_65(_lib._class_NSMutableOrderedSet1, - _lib._sel_orderedSetWithCapacity_1, numItems); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - void applyDifference_(NSObject difference) { - _lib._objc_msgSend_15(_id, _lib._sel_applyDifference_1, difference._id); - } - - void sortUsingDescriptors_(NSArray sortDescriptors) { - _lib._objc_msgSend_472( - _id, _lib._sel_sortUsingDescriptors_1, sortDescriptors._id); - } - - void filterUsingPredicate_(NSPredicate p) { - _lib._objc_msgSend_487(_id, _lib._sel_filterUsingPredicate_1, p._id); - } - - @override - NSMutableOrderedSet initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66( - _id, _lib._sel_initWithObjects_count_1, objects, cnt); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSet(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableOrderedSet1, _lib._sel_orderedSet1); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithObject_( - AVFAudio _lib, NSObject object) { - final _ret = _lib._objc_msgSend_124(_lib._class_NSMutableOrderedSet1, - _lib._sel_orderedSetWithObject_1, object._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithObjects_count_( - AVFAudio _lib, ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66(_lib._class_NSMutableOrderedSet1, - _lib._sel_orderedSetWithObjects_count_1, objects, cnt); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithObjects_( - AVFAudio _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_124(_lib._class_NSMutableOrderedSet1, - _lib._sel_orderedSetWithObjects_1, firstObj._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithOrderedSet_( - AVFAudio _lib, NSOrderedSet set) { - final _ret = _lib._objc_msgSend_492(_lib._class_NSMutableOrderedSet1, - _lib._sel_orderedSetWithOrderedSet_1, set._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithOrderedSet_range_copyItems_( - AVFAudio _lib, NSOrderedSet set, _NSRange range, bool flag) { - final _ret = _lib._objc_msgSend_493( - _lib._class_NSMutableOrderedSet1, - _lib._sel_orderedSetWithOrderedSet_range_copyItems_1, - set._id, - range, - flag); - return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); - } - - static NSMutableOrderedSet orderedSetWithArray_( - AVFAudio _lib, NSArray array) { - final _ret = _lib._objc_msgSend_125(_lib._class_NSMutableOrderedSet1, - _lib._sel_orderedSetWithArray_1, array._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithArray_range_copyItems_( - AVFAudio _lib, NSArray array, _NSRange range, bool flag) { - final _ret = _lib._objc_msgSend_494( - _lib._class_NSMutableOrderedSet1, - _lib._sel_orderedSetWithArray_range_copyItems_1, - array._id, - range, - flag); - return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); - } - - static NSMutableOrderedSet orderedSetWithSet_(AVFAudio _lib, NSSet set) { - final _ret = _lib._objc_msgSend_411(_lib._class_NSMutableOrderedSet1, - _lib._sel_orderedSetWithSet_1, set._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithSet_copyItems_( - AVFAudio _lib, NSSet set, bool flag) { - final _ret = _lib._objc_msgSend_412(_lib._class_NSMutableOrderedSet1, - _lib._sel_orderedSetWithSet_copyItems_1, set._id, flag); - return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableOrderedSet initWithObject_(NSObject object) { - final _ret = - _lib._objc_msgSend_124(_id, _lib._sel_initWithObject_1, object._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableOrderedSet initWithObjects_(NSObject firstObj) { - final _ret = - _lib._objc_msgSend_124(_id, _lib._sel_initWithObjects_1, firstObj._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableOrderedSet initWithOrderedSet_(NSOrderedSet set) { - final _ret = - _lib._objc_msgSend_492(_id, _lib._sel_initWithOrderedSet_1, set._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableOrderedSet initWithOrderedSet_copyItems_( - NSOrderedSet set, bool flag) { - final _ret = _lib._objc_msgSend_495( - _id, _lib._sel_initWithOrderedSet_copyItems_1, set._id, flag); - return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableOrderedSet initWithOrderedSet_range_copyItems_( - NSOrderedSet set, _NSRange range, bool flag) { - final _ret = _lib._objc_msgSend_493(_id, - _lib._sel_initWithOrderedSet_range_copyItems_1, set._id, range, flag); - return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableOrderedSet initWithArray_(NSArray array) { - final _ret = - _lib._objc_msgSend_125(_id, _lib._sel_initWithArray_1, array._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableOrderedSet initWithArray_copyItems_(NSArray set, bool flag) { - final _ret = _lib._objc_msgSend_126( - _id, _lib._sel_initWithArray_copyItems_1, set._id, flag); - return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableOrderedSet initWithArray_range_copyItems_( - NSArray set, _NSRange range, bool flag) { - final _ret = _lib._objc_msgSend_494( - _id, _lib._sel_initWithArray_range_copyItems_1, set._id, range, flag); - return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableOrderedSet initWithSet_(NSSet set) { - final _ret = _lib._objc_msgSend_411(_id, _lib._sel_initWithSet_1, set._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableOrderedSet initWithSet_copyItems_(NSSet set, bool flag) { - final _ret = _lib._objc_msgSend_412( - _id, _lib._sel_initWithSet_copyItems_1, set._id, flag); - return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); - } - - static NSMutableOrderedSet new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableOrderedSet1, _lib._sel_new1); - return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); - } - - static NSMutableOrderedSet allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMutableOrderedSet1, _lib._sel_allocWithZone_1, zone); - return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); - } - - static NSMutableOrderedSet alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableOrderedSet1, _lib._sel_alloc1); - return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSMutableOrderedSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSMutableOrderedSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSMutableOrderedSet1, - _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableOrderedSet1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSMutableOrderedSet1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSMutableOrderedSet1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSMutableOrderedSet1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSMutableOrderedSet1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableOrderedSet1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSOrderedSet extends NSObject { - NSOrderedSet._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSOrderedSet] that points to the same underlying object as [other]. - static NSOrderedSet castFrom(T other) { - return NSOrderedSet._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSOrderedSet] that wraps the given raw object pointer. - static NSOrderedSet castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOrderedSet._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSOrderedSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSOrderedSet1); - } - - int get count { - return _lib._objc_msgSend_10(_id, _lib._sel_count1); - } - - NSObject objectAtIndex_(int idx) { - final _ret = _lib._objc_msgSend_65(_id, _lib._sel_objectAtIndex_1, idx); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - int indexOfObject_(NSObject object) { - return _lib._objc_msgSend_74(_id, _lib._sel_indexOfObject_1, object._id); - } - - @override - NSOrderedSet init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSOrderedSet initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66( - _id, _lib._sel_initWithObjects_count_1, objects, cnt); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSOrderedSet? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - void getObjects_range_( - ffi.Pointer> objects, _NSRange range) { - _lib._objc_msgSend_73(_id, _lib._sel_getObjects_range_1, objects, range); - } - - NSArray objectsAtIndexes_(NSIndexSet indexes) { - final _ret = - _lib._objc_msgSend_111(_id, _lib._sel_objectsAtIndexes_1, indexes._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSObject? get firstObject { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_firstObject1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? get lastObject { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_lastObject1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - bool isEqualToOrderedSet_(NSOrderedSet other) { - return _lib._objc_msgSend_489( - _id, _lib._sel_isEqualToOrderedSet_1, other._id); - } - - bool containsObject_(NSObject object) { - return _lib._objc_msgSend_0(_id, _lib._sel_containsObject_1, object._id); - } - - bool intersectsOrderedSet_(NSOrderedSet other) { - return _lib._objc_msgSend_489( - _id, _lib._sel_intersectsOrderedSet_1, other._id); - } - - bool intersectsSet_(NSSet set) { - return _lib._objc_msgSend_403(_id, _lib._sel_intersectsSet_1, set._id); - } - - bool isSubsetOfOrderedSet_(NSOrderedSet other) { - return _lib._objc_msgSend_489( - _id, _lib._sel_isSubsetOfOrderedSet_1, other._id); - } - - bool isSubsetOfSet_(NSSet set) { - return _lib._objc_msgSend_403(_id, _lib._sel_isSubsetOfSet_1, set._id); - } - - NSObject objectAtIndexedSubscript_(int idx) { - final _ret = - _lib._objc_msgSend_65(_id, _lib._sel_objectAtIndexedSubscript_1, idx); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSEnumerator objectEnumerator() { - final _ret = _lib._objc_msgSend_77(_id, _lib._sel_objectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } - - NSEnumerator reverseObjectEnumerator() { - final _ret = _lib._objc_msgSend_77(_id, _lib._sel_reverseObjectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } - - NSOrderedSet get reversedOrderedSet { - final _ret = _lib._objc_msgSend_490(_id, _lib._sel_reversedOrderedSet1); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSArray get array { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_array1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSSet get set1 { - final _ret = _lib._objc_msgSend_491(_id, _lib._sel_set1); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - void enumerateObjectsUsingBlock_( - ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool block) { - _lib._objc_msgSend_112( - _id, _lib._sel_enumerateObjectsUsingBlock_1, block._id); - } - - void enumerateObjectsWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool block) { - _lib._objc_msgSend_113(_id, - _lib._sel_enumerateObjectsWithOptions_usingBlock_1, opts, block._id); - } - - void enumerateObjectsAtIndexes_options_usingBlock_(NSIndexSet s, int opts, - ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool block) { - _lib._objc_msgSend_114( - _id, - _lib._sel_enumerateObjectsAtIndexes_options_usingBlock_1, - s._id, - opts, - block._id); - } - - int indexOfObjectPassingTest_( - ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - return _lib._objc_msgSend_115( - _id, _lib._sel_indexOfObjectPassingTest_1, predicate._id); - } - - int indexOfObjectWithOptions_passingTest_( - int opts, ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - return _lib._objc_msgSend_116(_id, - _lib._sel_indexOfObjectWithOptions_passingTest_1, opts, predicate._id); - } - - int indexOfObjectAtIndexes_options_passingTest_(NSIndexSet s, int opts, - ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - return _lib._objc_msgSend_117( - _id, - _lib._sel_indexOfObjectAtIndexes_options_passingTest_1, - s._id, - opts, - predicate._id); - } - - NSIndexSet indexesOfObjectsPassingTest_( - ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _lib._objc_msgSend_118( - _id, _lib._sel_indexesOfObjectsPassingTest_1, predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet indexesOfObjectsWithOptions_passingTest_( - int opts, ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _lib._objc_msgSend_119( - _id, - _lib._sel_indexesOfObjectsWithOptions_passingTest_1, - opts, - predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_(NSIndexSet s, - int opts, ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _lib._objc_msgSend_120( - _id, - _lib._sel_indexesOfObjectsAtIndexes_options_passingTest_1, - s._id, - opts, - predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - int indexOfObject_inSortedRange_options_usingComparator_( - NSObject object, - _NSRange range, - int opts, - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmp) { - return _lib._objc_msgSend_123( - _id, - _lib._sel_indexOfObject_inSortedRange_options_usingComparator_1, - object._id, - range, - opts, - cmp._id); - } - - NSArray sortedArrayUsingComparator_( - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { - final _ret = _lib._objc_msgSend_121( - _id, _lib._sel_sortedArrayUsingComparator_1, cmptr._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray sortedArrayWithOptions_usingComparator_( - int opts, ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { - final _ret = _lib._objc_msgSend_122(_id, - _lib._sel_sortedArrayWithOptions_usingComparator_1, opts, cmptr._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSString get description { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _lib._objc_msgSend_70( - _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithLocale_indent_(NSObject? locale, int level) { - final _ret = _lib._objc_msgSend_71( - _id, - _lib._sel_descriptionWithLocale_indent_1, - locale?._id ?? ffi.nullptr, - level); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSOrderedSet orderedSet(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOrderedSet1, _lib._sel_orderedSet1); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithObject_(AVFAudio _lib, NSObject object) { - final _ret = _lib._objc_msgSend_124(_lib._class_NSOrderedSet1, - _lib._sel_orderedSetWithObject_1, object._id); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithObjects_count_( - AVFAudio _lib, ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66(_lib._class_NSOrderedSet1, - _lib._sel_orderedSetWithObjects_count_1, objects, cnt); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithObjects_(AVFAudio _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_124(_lib._class_NSOrderedSet1, - _lib._sel_orderedSetWithObjects_1, firstObj._id); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithOrderedSet_( - AVFAudio _lib, NSOrderedSet set) { - final _ret = _lib._objc_msgSend_492(_lib._class_NSOrderedSet1, - _lib._sel_orderedSetWithOrderedSet_1, set._id); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithOrderedSet_range_copyItems_( - AVFAudio _lib, NSOrderedSet set, _NSRange range, bool flag) { - final _ret = _lib._objc_msgSend_493( - _lib._class_NSOrderedSet1, - _lib._sel_orderedSetWithOrderedSet_range_copyItems_1, - set._id, - range, - flag); - return NSOrderedSet._(_ret, _lib, retain: false, release: true); - } - - static NSOrderedSet orderedSetWithArray_(AVFAudio _lib, NSArray array) { - final _ret = _lib._objc_msgSend_125( - _lib._class_NSOrderedSet1, _lib._sel_orderedSetWithArray_1, array._id); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithArray_range_copyItems_( - AVFAudio _lib, NSArray array, _NSRange range, bool flag) { - final _ret = _lib._objc_msgSend_494( - _lib._class_NSOrderedSet1, - _lib._sel_orderedSetWithArray_range_copyItems_1, - array._id, - range, - flag); - return NSOrderedSet._(_ret, _lib, retain: false, release: true); - } - - static NSOrderedSet orderedSetWithSet_(AVFAudio _lib, NSSet set) { - final _ret = _lib._objc_msgSend_411( - _lib._class_NSOrderedSet1, _lib._sel_orderedSetWithSet_1, set._id); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithSet_copyItems_( - AVFAudio _lib, NSSet set, bool flag) { - final _ret = _lib._objc_msgSend_412(_lib._class_NSOrderedSet1, - _lib._sel_orderedSetWithSet_copyItems_1, set._id, flag); - return NSOrderedSet._(_ret, _lib, retain: false, release: true); - } - - NSOrderedSet initWithObject_(NSObject object) { - final _ret = - _lib._objc_msgSend_124(_id, _lib._sel_initWithObject_1, object._id); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSOrderedSet initWithObjects_(NSObject firstObj) { - final _ret = - _lib._objc_msgSend_124(_id, _lib._sel_initWithObjects_1, firstObj._id); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSOrderedSet initWithOrderedSet_(NSOrderedSet set) { - final _ret = - _lib._objc_msgSend_492(_id, _lib._sel_initWithOrderedSet_1, set._id); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSOrderedSet initWithOrderedSet_copyItems_(NSOrderedSet set, bool flag) { - final _ret = _lib._objc_msgSend_495( - _id, _lib._sel_initWithOrderedSet_copyItems_1, set._id, flag); - return NSOrderedSet._(_ret, _lib, retain: false, release: true); - } - - NSOrderedSet initWithOrderedSet_range_copyItems_( - NSOrderedSet set, _NSRange range, bool flag) { - final _ret = _lib._objc_msgSend_493(_id, - _lib._sel_initWithOrderedSet_range_copyItems_1, set._id, range, flag); - return NSOrderedSet._(_ret, _lib, retain: false, release: true); - } - - NSOrderedSet initWithArray_(NSArray array) { - final _ret = - _lib._objc_msgSend_125(_id, _lib._sel_initWithArray_1, array._id); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSOrderedSet initWithArray_copyItems_(NSArray set, bool flag) { - final _ret = _lib._objc_msgSend_126( - _id, _lib._sel_initWithArray_copyItems_1, set._id, flag); - return NSOrderedSet._(_ret, _lib, retain: false, release: true); - } - - NSOrderedSet initWithArray_range_copyItems_( - NSArray set, _NSRange range, bool flag) { - final _ret = _lib._objc_msgSend_494( - _id, _lib._sel_initWithArray_range_copyItems_1, set._id, range, flag); - return NSOrderedSet._(_ret, _lib, retain: false, release: true); - } - - NSOrderedSet initWithSet_(NSSet set) { - final _ret = _lib._objc_msgSend_411(_id, _lib._sel_initWithSet_1, set._id); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSOrderedSet initWithSet_copyItems_(NSSet set, bool flag) { - final _ret = _lib._objc_msgSend_412( - _id, _lib._sel_initWithSet_copyItems_1, set._id, flag); - return NSOrderedSet._(_ret, _lib, retain: false, release: true); - } - - NSObject differenceFromOrderedSet_withOptions_usingEquivalenceTest_( - NSOrderedSet other, - int options, - ObjCBlock_bool_ObjCObject_ObjCObject block) { - final _ret = _lib._objc_msgSend_496( - _id, - _lib._sel_differenceFromOrderedSet_withOptions_usingEquivalenceTest_1, - other._id, - options, - block._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject differenceFromOrderedSet_withOptions_( - NSOrderedSet other, int options) { - final _ret = _lib._objc_msgSend_497(_id, - _lib._sel_differenceFromOrderedSet_withOptions_1, other._id, options); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject differenceFromOrderedSet_(NSOrderedSet other) { - final _ret = _lib._objc_msgSend_492( - _id, _lib._sel_differenceFromOrderedSet_1, other._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSOrderedSet? orderedSetByApplyingDifference_(NSObject difference) { - final _ret = _lib._objc_msgSend_498( - _id, _lib._sel_orderedSetByApplyingDifference_1, difference._id); - return _ret.address == 0 - ? null - : NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSObject valueForKey_(NSString key) { - final _ret = _lib._objc_msgSend_31(_id, _lib._sel_valueForKey_1, key._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - @override - void setValue_forKey_(NSObject? value, NSString key) { - _lib._objc_msgSend_135( - _id, _lib._sel_setValue_forKey_1, value?._id ?? ffi.nullptr, key._id); - } - - @override - void addObserver_forKeyPath_options_context_(NSObject observer, - NSString keyPath, int options, ffi.Pointer context) { - _lib._objc_msgSend_139( - _id, - _lib._sel_addObserver_forKeyPath_options_context_1, - observer._id, - keyPath._id, - options, - context); - } - - @override - void removeObserver_forKeyPath_context_( - NSObject observer, NSString keyPath, ffi.Pointer context) { - _lib._objc_msgSend_140(_id, _lib._sel_removeObserver_forKeyPath_context_1, - observer._id, keyPath._id, context); - } - - @override - void removeObserver_forKeyPath_(NSObject observer, NSString keyPath) { - _lib._objc_msgSend_141( - _id, _lib._sel_removeObserver_forKeyPath_1, observer._id, keyPath._id); - } - - NSArray sortedArrayUsingDescriptors_(NSArray sortDescriptors) { - final _ret = _lib._objc_msgSend_68( - _id, _lib._sel_sortedArrayUsingDescriptors_1, sortDescriptors._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSOrderedSet filteredOrderedSetUsingPredicate_(NSPredicate p) { - final _ret = _lib._objc_msgSend_499( - _id, _lib._sel_filteredOrderedSetUsingPredicate_1, p._id); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSOrderedSet new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOrderedSet1, _lib._sel_new1); - return NSOrderedSet._(_ret, _lib, retain: false, release: true); - } - - static NSOrderedSet allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSOrderedSet1, _lib._sel_allocWithZone_1, zone); - return NSOrderedSet._(_ret, _lib, retain: false, release: true); - } - - static NSOrderedSet alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOrderedSet1, _lib._sel_alloc1); - return NSOrderedSet._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSOrderedSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSOrderedSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSOrderedSet1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSOrderedSet1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSOrderedSet1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSOrderedSet1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSOrderedSet1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSOrderedSet1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOrderedSet1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSMutableSet extends NSSet { - NSMutableSet._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSMutableSet] that points to the same underlying object as [other]. - static NSMutableSet castFrom(T other) { - return NSMutableSet._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSMutableSet] that wraps the given raw object pointer. - static NSMutableSet castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableSet._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSMutableSet1); - } - - void addObject_(NSObject object) { - _lib._objc_msgSend_15(_id, _lib._sel_addObject_1, object._id); - } - - void removeObject_(NSObject object) { - _lib._objc_msgSend_15(_id, _lib._sel_removeObject_1, object._id); - } - - @override - NSMutableSet? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableSet init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - NSMutableSet initWithCapacity_(int numItems) { - final _ret = - _lib._objc_msgSend_65(_id, _lib._sel_initWithCapacity_1, numItems); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - void addObjectsFromArray_(NSArray array) { - _lib._objc_msgSend_472(_id, _lib._sel_addObjectsFromArray_1, array._id); - } - - void intersectSet_(NSSet otherSet) { - _lib._objc_msgSend_504(_id, _lib._sel_intersectSet_1, otherSet._id); - } - - void minusSet_(NSSet otherSet) { - _lib._objc_msgSend_504(_id, _lib._sel_minusSet_1, otherSet._id); - } - - void removeAllObjects() { - _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); - } - - void unionSet_(NSSet otherSet) { - _lib._objc_msgSend_504(_id, _lib._sel_unionSet_1, otherSet._id); - } - - void setSet_(NSSet otherSet) { - _lib._objc_msgSend_504(_id, _lib._sel_setSet_1, otherSet._id); - } - - static NSMutableSet setWithCapacity_(AVFAudio _lib, int numItems) { - final _ret = _lib._objc_msgSend_65( - _lib._class_NSMutableSet1, _lib._sel_setWithCapacity_1, numItems); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - void filterUsingPredicate_(NSPredicate predicate) { - _lib._objc_msgSend_487( - _id, _lib._sel_filterUsingPredicate_1, predicate._id); - } - - @override - NSMutableSet initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66( - _id, _lib._sel_initWithObjects_count_1, objects, cnt); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableSet set1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableSet1, _lib._sel_set1); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableSet setWithObject_(AVFAudio _lib, NSObject object) { - final _ret = _lib._objc_msgSend_124( - _lib._class_NSMutableSet1, _lib._sel_setWithObject_1, object._id); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableSet setWithObjects_count_( - AVFAudio _lib, ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66(_lib._class_NSMutableSet1, - _lib._sel_setWithObjects_count_1, objects, cnt); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableSet setWithObjects_(AVFAudio _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_124( - _lib._class_NSMutableSet1, _lib._sel_setWithObjects_1, firstObj._id); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableSet setWithSet_(AVFAudio _lib, NSSet set) { - final _ret = _lib._objc_msgSend_411( - _lib._class_NSMutableSet1, _lib._sel_setWithSet_1, set._id); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableSet setWithArray_(AVFAudio _lib, NSArray array) { - final _ret = _lib._objc_msgSend_125( - _lib._class_NSMutableSet1, _lib._sel_setWithArray_1, array._id); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableSet initWithObjects_(NSObject firstObj) { - final _ret = - _lib._objc_msgSend_124(_id, _lib._sel_initWithObjects_1, firstObj._id); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableSet initWithSet_(NSSet set) { - final _ret = _lib._objc_msgSend_411(_id, _lib._sel_initWithSet_1, set._id); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableSet initWithSet_copyItems_(NSSet set, bool flag) { - final _ret = _lib._objc_msgSend_412( - _id, _lib._sel_initWithSet_copyItems_1, set._id, flag); - return NSMutableSet._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableSet initWithArray_(NSArray array) { - final _ret = - _lib._objc_msgSend_125(_id, _lib._sel_initWithArray_1, array._id); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableSet new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableSet1, _lib._sel_new1); - return NSMutableSet._(_ret, _lib, retain: false, release: true); - } - - static NSMutableSet allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMutableSet1, _lib._sel_allocWithZone_1, zone); - return NSMutableSet._(_ret, _lib, retain: false, release: true); - } - - static NSMutableSet alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableSet1, _lib._sel_alloc1); - return NSMutableSet._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSMutableSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSMutableSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableSet1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableSet1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSMutableSet1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSMutableSet1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSMutableSet1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSMutableSet1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableSet1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -abstract class NSKeyValueChange { - static const int NSKeyValueChangeSetting = 1; - static const int NSKeyValueChangeInsertion = 2; - static const int NSKeyValueChangeRemoval = 3; - static const int NSKeyValueChangeReplacement = 4; -} - -abstract class NSKeyValueSetMutationKind { - static const int NSKeyValueUnionSetMutation = 1; - static const int NSKeyValueMinusSetMutation = 2; - static const int NSKeyValueIntersectSetMutation = 3; - static const int NSKeyValueSetSetMutation = 4; -} - -class NSKeyedArchiver extends NSCoder { - NSKeyedArchiver._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSKeyedArchiver] that points to the same underlying object as [other]. - static NSKeyedArchiver castFrom(T other) { - return NSKeyedArchiver._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSKeyedArchiver] that wraps the given raw object pointer. - static NSKeyedArchiver castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSKeyedArchiver._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSKeyedArchiver]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSKeyedArchiver1); - } - - NSKeyedArchiver initRequiringSecureCoding_(bool requiresSecureCoding) { - final _ret = _lib._objc_msgSend_514( - _id, _lib._sel_initRequiringSecureCoding_1, requiresSecureCoding); - return NSKeyedArchiver._(_ret, _lib, retain: true, release: true); - } - - static NSData? archivedDataWithRootObject_requiringSecureCoding_error_( - AVFAudio _lib, - NSObject object, - bool requiresSecureCoding, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_515( - _lib._class_NSKeyedArchiver1, - _lib._sel_archivedDataWithRootObject_requiringSecureCoding_error_1, - object._id, - requiresSecureCoding, - error); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - @override - NSKeyedArchiver init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSKeyedArchiver._(_ret, _lib, retain: true, release: true); - } - - NSKeyedArchiver initForWritingWithMutableData_(NSMutableData data) { - final _ret = _lib._objc_msgSend_521( - _id, _lib._sel_initForWritingWithMutableData_1, data._id); - return NSKeyedArchiver._(_ret, _lib, retain: true, release: true); - } - - static NSData archivedDataWithRootObject_( - AVFAudio _lib, NSObject rootObject) { - final _ret = _lib._objc_msgSend_522(_lib._class_NSKeyedArchiver1, - _lib._sel_archivedDataWithRootObject_1, rootObject._id); - return NSData._(_ret, _lib, retain: true, release: true); - } - - static bool archiveRootObject_toFile_( - AVFAudio _lib, NSObject rootObject, NSString path) { - return _lib._objc_msgSend_261(_lib._class_NSKeyedArchiver1, - _lib._sel_archiveRootObject_toFile_1, rootObject._id, path._id); - } - - NSObject? get delegate { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - set delegate(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); - } - - int get outputFormat { - return _lib._objc_msgSend_523(_id, _lib._sel_outputFormat1); - } - - set outputFormat(int value) { - return _lib._objc_msgSend_524(_id, _lib._sel_setOutputFormat_1, value); - } - - NSData get encodedData { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_encodedData1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - void finishEncoding() { - _lib._objc_msgSend_1(_id, _lib._sel_finishEncoding1); - } - - static void setClassName_forClass_( - AVFAudio _lib, NSString? codedName, NSObject cls) { - _lib._objc_msgSend_525( - _lib._class_NSKeyedArchiver1, - _lib._sel_setClassName_forClass_1, - codedName?._id ?? ffi.nullptr, - cls._id); - } - - static NSString? classNameForClass_(AVFAudio _lib, NSObject cls) { - final _ret = _lib._objc_msgSend_526( - _lib._class_NSKeyedArchiver1, _lib._sel_classNameForClass_1, cls._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - @override - void encodeObject_forKey_(NSObject? object, NSString key) { - _lib._objc_msgSend_135(_id, _lib._sel_encodeObject_forKey_1, - object?._id ?? ffi.nullptr, key._id); - } - - @override - void encodeConditionalObject_forKey_(NSObject? object, NSString key) { - _lib._objc_msgSend_135(_id, _lib._sel_encodeConditionalObject_forKey_1, - object?._id ?? ffi.nullptr, key._id); - } - - @override - void encodeBool_forKey_(bool value, NSString key) { - _lib._objc_msgSend_296(_id, _lib._sel_encodeBool_forKey_1, value, key._id); - } - - @override - void encodeInt_forKey_(int value, NSString key) { - _lib._objc_msgSend_297(_id, _lib._sel_encodeInt_forKey_1, value, key._id); - } - - @override - void encodeInt32_forKey_(int value, NSString key) { - _lib._objc_msgSend_298(_id, _lib._sel_encodeInt32_forKey_1, value, key._id); - } - - @override - void encodeInt64_forKey_(int value, NSString key) { - _lib._objc_msgSend_299(_id, _lib._sel_encodeInt64_forKey_1, value, key._id); - } - - @override - void encodeFloat_forKey_(double value, NSString key) { - _lib._objc_msgSend_300(_id, _lib._sel_encodeFloat_forKey_1, value, key._id); - } - - @override - void encodeDouble_forKey_(double value, NSString key) { - _lib._objc_msgSend_301( - _id, _lib._sel_encodeDouble_forKey_1, value, key._id); - } - - @override - void encodeBytes_length_forKey_( - ffi.Pointer bytes, int length, NSString key) { - _lib._objc_msgSend_302( - _id, _lib._sel_encodeBytes_length_forKey_1, bytes, length, key._id); - } - - @override - bool get requiresSecureCoding { - return _lib._objc_msgSend_12(_id, _lib._sel_requiresSecureCoding1); - } - - set requiresSecureCoding(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setRequiresSecureCoding_1, value); - } - - static NSKeyedArchiver new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSKeyedArchiver1, _lib._sel_new1); - return NSKeyedArchiver._(_ret, _lib, retain: false, release: true); - } - - static NSKeyedArchiver allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSKeyedArchiver1, _lib._sel_allocWithZone_1, zone); - return NSKeyedArchiver._(_ret, _lib, retain: false, release: true); - } - - static NSKeyedArchiver alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSKeyedArchiver1, _lib._sel_alloc1); - return NSKeyedArchiver._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSKeyedArchiver1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSKeyedArchiver1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSKeyedArchiver1, - _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSKeyedArchiver1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSKeyedArchiver1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSKeyedArchiver1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSKeyedArchiver1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSKeyedArchiver1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSKeyedArchiver1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSMutableData extends NSData { - NSMutableData._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSMutableData] that points to the same underlying object as [other]. - static NSMutableData castFrom(T other) { - return NSMutableData._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSMutableData] that wraps the given raw object pointer. - static NSMutableData castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableData._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSMutableData1); - } - - ffi.Pointer get mutableBytes { - return _lib._objc_msgSend_20(_id, _lib._sel_mutableBytes1); - } - - @override - int get length { - return _lib._objc_msgSend_10(_id, _lib._sel_length1); - } - - set length(int value) { - return _lib._objc_msgSend_516(_id, _lib._sel_setLength_1, value); - } - - void appendBytes_length_(ffi.Pointer bytes, int length) { - _lib._objc_msgSend_22(_id, _lib._sel_appendBytes_length_1, bytes, length); - } - - void appendData_(NSData other) { - _lib._objc_msgSend_285(_id, _lib._sel_appendData_1, other._id); - } - - void increaseLengthBy_(int extraLength) { - _lib._objc_msgSend_470(_id, _lib._sel_increaseLengthBy_1, extraLength); - } - - void replaceBytesInRange_withBytes_( - _NSRange range, ffi.Pointer bytes) { - _lib._objc_msgSend_517( - _id, _lib._sel_replaceBytesInRange_withBytes_1, range, bytes); - } - - void resetBytesInRange_(_NSRange range) { - _lib._objc_msgSend_476(_id, _lib._sel_resetBytesInRange_1, range); - } - - void setData_(NSData data) { - _lib._objc_msgSend_285(_id, _lib._sel_setData_1, data._id); - } - - void replaceBytesInRange_withBytes_length_(_NSRange range, - ffi.Pointer replacementBytes, int replacementLength) { - _lib._objc_msgSend_518( - _id, - _lib._sel_replaceBytesInRange_withBytes_length_1, - range, - replacementBytes, - replacementLength); - } - - static NSMutableData? dataWithCapacity_(AVFAudio _lib, int aNumItems) { - final _ret = _lib._objc_msgSend_519( - _lib._class_NSMutableData1, _lib._sel_dataWithCapacity_1, aNumItems); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData? dataWithLength_(AVFAudio _lib, int length) { - final _ret = _lib._objc_msgSend_519( - _lib._class_NSMutableData1, _lib._sel_dataWithLength_1, length); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - NSMutableData? initWithCapacity_(int capacity) { - final _ret = - _lib._objc_msgSend_519(_id, _lib._sel_initWithCapacity_1, capacity); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - NSMutableData? initWithLength_(int length) { - final _ret = - _lib._objc_msgSend_519(_id, _lib._sel_initWithLength_1, length); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - bool decompressUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - return _lib._objc_msgSend_520( - _id, _lib._sel_decompressUsingAlgorithm_error_1, algorithm, error); - } - - bool compressUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - return _lib._objc_msgSend_520( - _id, _lib._sel_compressUsingAlgorithm_error_1, algorithm, error); - } - - static NSMutableData data(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_data1); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData dataWithBytes_length_( - AVFAudio _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_273(_lib._class_NSMutableData1, - _lib._sel_dataWithBytes_length_1, bytes, length); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData dataWithBytesNoCopy_length_( - AVFAudio _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_273(_lib._class_NSMutableData1, - _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - static NSMutableData dataWithBytesNoCopy_length_freeWhenDone_( - AVFAudio _lib, ffi.Pointer bytes, int length, bool b) { - final _ret = _lib._objc_msgSend_274(_lib._class_NSMutableData1, - _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - static NSMutableData? dataWithContentsOfFile_options_error_( - AVFAudio _lib, - NSString path, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_275( - _lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfFile_options_error_1, - path._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData? dataWithContentsOfURL_options_error_( - AVFAudio _lib, - NSURL url, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_276( - _lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfURL_options_error_1, - url._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData? dataWithContentsOfFile_(AVFAudio _lib, NSString path) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData? dataWithContentsOfURL_(AVFAudio _lib, NSURL url) { - final _ret = _lib._objc_msgSend_277( - _lib._class_NSMutableData1, _lib._sel_dataWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData initWithBytes_length_(ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_273( - _id, _lib._sel_initWithBytes_length_1, bytes, length); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData initWithBytesNoCopy_length_( - ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_273( - _id, _lib._sel_initWithBytesNoCopy_length_1, bytes, length); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableData initWithBytesNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool b) { - final _ret = _lib._objc_msgSend_274(_id, - _lib._sel_initWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableData initWithBytesNoCopy_length_deallocator_( - ffi.Pointer bytes, - int length, - ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { - final _ret = _lib._objc_msgSend_278( - _id, - _lib._sel_initWithBytesNoCopy_length_deallocator_1, - bytes, - length, - deallocator?._id ?? ffi.nullptr); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableData? initWithContentsOfFile_options_error_(NSString path, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_275( - _id, - _lib._sel_initWithContentsOfFile_options_error_1, - path._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData? initWithContentsOfURL_options_error_(NSURL url, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_276( - _id, - _lib._sel_initWithContentsOfURL_options_error_1, - url._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData? initWithContentsOfFile_(NSString path) { - final _ret = _lib._objc_msgSend_38( - _id, _lib._sel_initWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_277(_id, _lib._sel_initWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData initWithData_(NSData data) { - final _ret = - _lib._objc_msgSend_279(_id, _lib._sel_initWithData_1, data._id); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData dataWithData_(AVFAudio _lib, NSData data) { - final _ret = _lib._objc_msgSend_279( - _lib._class_NSMutableData1, _lib._sel_dataWithData_1, data._id); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData? initWithBase64EncodedString_options_( - NSString base64String, int options) { - final _ret = _lib._objc_msgSend_280( - _id, - _lib._sel_initWithBase64EncodedString_options_1, - base64String._id, - options); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData? initWithBase64EncodedData_options_( - NSData base64Data, int options) { - final _ret = _lib._objc_msgSend_282(_id, - _lib._sel_initWithBase64EncodedData_options_1, base64Data._id, options); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData? decompressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_284(_id, - _lib._sel_decompressedDataUsingAlgorithm_error_1, algorithm, error); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData? compressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_284( - _id, _lib._sel_compressedDataUsingAlgorithm_error_1, algorithm, error); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSObject? dataWithContentsOfMappedFile_(AVFAudio _lib, NSString path) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfMappedFile_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_new1); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - static NSMutableData allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMutableData1, _lib._sel_allocWithZone_1, zone); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - static NSMutableData alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_alloc1); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSMutableData1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSMutableData1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableData1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableData1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSMutableData1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSMutableData1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSMutableData1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSMutableData1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableData1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -abstract class NSPropertyListFormat { - static const int NSPropertyListOpenStepFormat = 1; - static const int NSPropertyListXMLFormat_v1_0 = 100; - static const int NSPropertyListBinaryFormat_v1_0 = 200; -} - -class NSThread extends NSObject { - NSThread._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSThread] that points to the same underlying object as [other]. - static NSThread castFrom(T other) { - return NSThread._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSThread] that wraps the given raw object pointer. - static NSThread castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSThread._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSThread]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSThread1); - } - - static NSThread getCurrentThread(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_531(_lib._class_NSThread1, _lib._sel_currentThread1); - return NSThread._(_ret, _lib, retain: true, release: true); - } - - static void detachNewThreadWithBlock_( - AVFAudio _lib, ObjCBlock_ffiVoid block) { - _lib._objc_msgSend_532( - _lib._class_NSThread1, _lib._sel_detachNewThreadWithBlock_1, block._id); - } - - static void detachNewThreadSelector_toTarget_withObject_(AVFAudio _lib, - ffi.Pointer selector, NSObject target, NSObject? argument) { - _lib._objc_msgSend_533( - _lib._class_NSThread1, - _lib._sel_detachNewThreadSelector_toTarget_withObject_1, - selector, - target._id, - argument?._id ?? ffi.nullptr); - } - - static bool isMultiThreaded(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSThread1, _lib._sel_isMultiThreaded1); - } - - NSMutableDictionary get threadDictionary { - final _ret = _lib._objc_msgSend_539(_id, _lib._sel_threadDictionary1); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static void sleepUntilDate_(AVFAudio _lib, NSDate date) { - _lib._objc_msgSend_540( - _lib._class_NSThread1, _lib._sel_sleepUntilDate_1, date._id); - } - - static void sleepForTimeInterval_(AVFAudio _lib, double ti) { - _lib._objc_msgSend_541( - _lib._class_NSThread1, _lib._sel_sleepForTimeInterval_1, ti); - } - - static void exit(AVFAudio _lib) { - _lib._objc_msgSend_1(_lib._class_NSThread1, _lib._sel_exit1); - } - - double get threadPriority { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_threadPriority1) - : _lib._objc_msgSend_165(_id, _lib._sel_threadPriority1); - } - - set threadPriority(double value) { - return _lib._objc_msgSend_542(_id, _lib._sel_setThreadPriority_1, value); - } - - int get qualityOfService { - return _lib._objc_msgSend_543(_id, _lib._sel_qualityOfService1); - } - - set qualityOfService(int value) { - return _lib._objc_msgSend_544(_id, _lib._sel_setQualityOfService_1, value); - } - - static NSArray getCallStackReturnAddresses(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSThread1, _lib._sel_callStackReturnAddresses1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray getCallStackSymbols(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSThread1, _lib._sel_callStackSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSString? get name { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_name1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - set name(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); - } - - int get stackSize { - return _lib._objc_msgSend_10(_id, _lib._sel_stackSize1); - } - - set stackSize(int value) { - return _lib._objc_msgSend_516(_id, _lib._sel_setStackSize_1, value); - } - - bool get isMainThread { - return _lib._objc_msgSend_12(_id, _lib._sel_isMainThread1); - } - - static NSThread getMainThread(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_531(_lib._class_NSThread1, _lib._sel_mainThread1); - return NSThread._(_ret, _lib, retain: true, release: true); - } - - @override - NSThread init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSThread._(_ret, _lib, retain: true, release: true); - } - - NSThread initWithTarget_selector_object_( - NSObject target, ffi.Pointer selector, NSObject? argument) { - final _ret = _lib._objc_msgSend_546( - _id, - _lib._sel_initWithTarget_selector_object_1, - target._id, - selector, - argument?._id ?? ffi.nullptr); - return NSThread._(_ret, _lib, retain: true, release: true); - } - - NSThread initWithBlock_(ObjCBlock_ffiVoid block) { - final _ret = - _lib._objc_msgSend_547(_id, _lib._sel_initWithBlock_1, block._id); - return NSThread._(_ret, _lib, retain: true, release: true); - } - - bool get executing { - return _lib._objc_msgSend_12(_id, _lib._sel_isExecuting1); - } - - bool get finished { - return _lib._objc_msgSend_12(_id, _lib._sel_isFinished1); - } - - bool get cancelled { - return _lib._objc_msgSend_12(_id, _lib._sel_isCancelled1); - } - - void cancel() { - _lib._objc_msgSend_1(_id, _lib._sel_cancel1); - } - - void start() { - _lib._objc_msgSend_1(_id, _lib._sel_start1); - } - - void main() { - _lib._objc_msgSend_1(_id, _lib._sel_main1); - } - - static NSThread new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSThread1, _lib._sel_new1); - return NSThread._(_ret, _lib, retain: false, release: true); - } - - static NSThread allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSThread1, _lib._sel_allocWithZone_1, zone); - return NSThread._(_ret, _lib, retain: false, release: true); - } - - static NSThread alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSThread1, _lib._sel_alloc1); - return NSThread._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSThread1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSThread1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSThread1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSThread1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSThread1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSThread1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSThread1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSThread1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSThread1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -void _ObjCBlock_ffiVoid_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, -) => - block.ref.target - .cast>() - .asFunction()(); -final _ObjCBlock_ffiVoid_closureRegistry = {}; -int _ObjCBlock_ffiVoid_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_registerClosure(void Function() fn) { - final id = ++_ObjCBlock_ffiVoid_closureRegistryIndex; - _ObjCBlock_ffiVoid_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, -) => - _ObjCBlock_ffiVoid_closureRegistry[block.ref.target.address]!(); - -class ObjCBlock_ffiVoid extends _ObjCBlockBase { - ObjCBlock_ffiVoid._(ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid._(pointer, lib, retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid.fromFunctionPointer( - AVFAudio lib, ffi.Pointer> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_ffiVoid_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid.fromFunction(AVFAudio lib, void Function() fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_ffiVoid_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_registerClosure(() => fn())), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid.listener(AVFAudio lib, void Function() fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>)>.listener( - _ObjCBlock_ffiVoid_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_registerClosure(() => fn())), - lib); - static ffi.NativeCallable)>? - _dartFuncListenerTrampoline; - - void call() => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>>() - .asFunction)>()( - _id, - ); -} - -class NSMutableDictionary extends NSDictionary { - NSMutableDictionary._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSMutableDictionary] that points to the same underlying object as [other]. - static NSMutableDictionary castFrom(T other) { - return NSMutableDictionary._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSMutableDictionary] that wraps the given raw object pointer. - static NSMutableDictionary castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableDictionary._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableDictionary]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableDictionary1); - } - - void removeObjectForKey_(NSObject aKey) { - _lib._objc_msgSend_15(_id, _lib._sel_removeObjectForKey_1, aKey._id); - } - - void setObject_forKey_(NSObject anObject, NSObject aKey) { - _lib._objc_msgSend_534( - _id, _lib._sel_setObject_forKey_1, anObject._id, aKey._id); - } - - @override - NSMutableDictionary init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - NSMutableDictionary initWithCapacity_(int numItems) { - final _ret = - _lib._objc_msgSend_65(_id, _lib._sel_initWithCapacity_1, numItems); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableDictionary? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - void addEntriesFromDictionary_(NSDictionary otherDictionary) { - _lib._objc_msgSend_509( - _id, _lib._sel_addEntriesFromDictionary_1, otherDictionary._id); - } - - void removeAllObjects() { - _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); - } - - void removeObjectsForKeys_(NSArray keyArray) { - _lib._objc_msgSend_472(_id, _lib._sel_removeObjectsForKeys_1, keyArray._id); - } - - void setDictionary_(NSDictionary otherDictionary) { - _lib._objc_msgSend_509(_id, _lib._sel_setDictionary_1, otherDictionary._id); - } - - void setObject_forKeyedSubscript_(NSObject? obj, NSObject key) { - _lib._objc_msgSend_535(_id, _lib._sel_setObject_forKeyedSubscript_1, - obj?._id ?? ffi.nullptr, key._id); - } - - static NSMutableDictionary dictionaryWithCapacity_( - AVFAudio _lib, int numItems) { - final _ret = _lib._objc_msgSend_65(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithCapacity_1, numItems); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary? dictionaryWithContentsOfFile_( - AVFAudio _lib, NSString path) { - final _ret = _lib._objc_msgSend_536(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary? dictionaryWithContentsOfURL_( - AVFAudio _lib, NSURL url) { - final _ret = _lib._objc_msgSend_537(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - NSMutableDictionary? initWithContentsOfFile_(NSString path) { - final _ret = _lib._objc_msgSend_536( - _id, _lib._sel_initWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - NSMutableDictionary? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_537(_id, _lib._sel_initWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithSharedKeySet_( - AVFAudio _lib, NSObject keyset) { - final _ret = _lib._objc_msgSend_538(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithSharedKeySet_1, keyset._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - void setValue_forKey_(NSObject? value, NSString key) { - _lib._objc_msgSend_135( - _id, _lib._sel_setValue_forKey_1, value?._id ?? ffi.nullptr, key._id); - } - - @override - NSMutableDictionary initWithObjects_forKeys_count_( - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _lib._objc_msgSend_147( - _id, _lib._sel_initWithObjects_forKeys_count_1, objects, keys, cnt); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionary(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableDictionary1, _lib._sel_dictionary1); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObject_forKey_( - AVFAudio _lib, NSObject object, NSObject key) { - final _ret = _lib._objc_msgSend_158(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObjects_forKeys_count_( - AVFAudio _lib, - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _lib._objc_msgSend_147(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObjectsAndKeys_( - AVFAudio _lib, NSObject firstObject) { - final _ret = _lib._objc_msgSend_124(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithDictionary_( - AVFAudio _lib, NSDictionary dict) { - final _ret = _lib._objc_msgSend_159(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithDictionary_1, dict._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObjects_forKeys_( - AVFAudio _lib, NSArray objects, NSArray keys) { - final _ret = _lib._objc_msgSend_160(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_1, objects._id, keys._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableDictionary initWithObjectsAndKeys_(NSObject firstObject) { - final _ret = _lib._objc_msgSend_124( - _id, _lib._sel_initWithObjectsAndKeys_1, firstObject._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableDictionary initWithDictionary_(NSDictionary otherDictionary) { - final _ret = _lib._objc_msgSend_159( - _id, _lib._sel_initWithDictionary_1, otherDictionary._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableDictionary initWithDictionary_copyItems_( - NSDictionary otherDictionary, bool flag) { - final _ret = _lib._objc_msgSend_161(_id, - _lib._sel_initWithDictionary_copyItems_1, otherDictionary._id, flag); - return NSMutableDictionary._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableDictionary initWithObjects_forKeys_(NSArray objects, NSArray keys) { - final _ret = _lib._objc_msgSend_160( - _id, _lib._sel_initWithObjects_forKeys_1, objects._id, keys._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary? dictionaryWithContentsOfURL_error_( - AVFAudio _lib, NSURL url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_162(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithContentsOfURL_error_1, url._id, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSObject sharedKeySetForKeys_(AVFAudio _lib, NSArray keys) { - final _ret = _lib._objc_msgSend_125(_lib._class_NSMutableDictionary1, - _lib._sel_sharedKeySetForKeys_1, keys._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableDictionary1, _lib._sel_new1); - return NSMutableDictionary._(_ret, _lib, retain: false, release: true); - } - - static NSMutableDictionary allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMutableDictionary1, _lib._sel_allocWithZone_1, zone); - return NSMutableDictionary._(_ret, _lib, retain: false, release: true); - } - - static NSMutableDictionary alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableDictionary1, _lib._sel_alloc1); - return NSMutableDictionary._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSMutableDictionary1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSMutableDictionary1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSMutableDictionary1, - _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableDictionary1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSMutableDictionary1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSMutableDictionary1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSMutableDictionary1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSMutableDictionary1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableDictionary1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_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; -} - -class NSArchiver extends NSCoder { - NSArchiver._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSArchiver] that points to the same underlying object as [other]. - static NSArchiver castFrom(T other) { - return NSArchiver._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSArchiver] that wraps the given raw object pointer. - static NSArchiver castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSArchiver._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSArchiver]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSArchiver1); - } - - NSArchiver initForWritingWithMutableData_(NSMutableData mdata) { - final _ret = _lib._objc_msgSend_521( - _id, _lib._sel_initForWritingWithMutableData_1, mdata._id); - return NSArchiver._(_ret, _lib, retain: true, release: true); - } - - NSMutableData get archiverData { - final _ret = _lib._objc_msgSend_550(_id, _lib._sel_archiverData1); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - void encodeRootObject_(NSObject rootObject) { - _lib._objc_msgSend_15(_id, _lib._sel_encodeRootObject_1, rootObject._id); - } - - @override - void encodeConditionalObject_(NSObject? object) { - _lib._objc_msgSend_289( - _id, _lib._sel_encodeConditionalObject_1, object?._id ?? ffi.nullptr); - } - - static NSData archivedDataWithRootObject_( - AVFAudio _lib, NSObject rootObject) { - final _ret = _lib._objc_msgSend_522(_lib._class_NSArchiver1, - _lib._sel_archivedDataWithRootObject_1, rootObject._id); - return NSData._(_ret, _lib, retain: true, release: true); - } - - static bool archiveRootObject_toFile_( - AVFAudio _lib, NSObject rootObject, NSString path) { - return _lib._objc_msgSend_261(_lib._class_NSArchiver1, - _lib._sel_archiveRootObject_toFile_1, rootObject._id, path._id); - } - - void encodeClassName_intoClassName_( - NSString trueName, NSString inArchiveName) { - _lib._objc_msgSend_551(_id, _lib._sel_encodeClassName_intoClassName_1, - trueName._id, inArchiveName._id); - } - - NSString? classNameEncodedForTrueClassName_(NSString trueName) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_classNameEncodedForTrueClassName_1, trueName._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - void replaceObject_withObject_(NSObject object, NSObject newObject) { - _lib._objc_msgSend_534( - _id, _lib._sel_replaceObject_withObject_1, object._id, newObject._id); - } - - @override - NSArchiver init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSArchiver._(_ret, _lib, retain: true, release: true); - } - - static NSArchiver new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArchiver1, _lib._sel_new1); - return NSArchiver._(_ret, _lib, retain: false, release: true); - } - - static NSArchiver allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSArchiver1, _lib._sel_allocWithZone_1, zone); - return NSArchiver._(_ret, _lib, retain: false, release: true); - } - - static NSArchiver alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSArchiver1, _lib._sel_alloc1); - return NSArchiver._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSArchiver1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSArchiver1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSArchiver1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSArchiver1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSArchiver1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSArchiver1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSArchiver1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSArchiver1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSArchiver1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSPortCoder extends NSCoder { - NSPortCoder._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSPortCoder] that points to the same underlying object as [other]. - static NSPortCoder castFrom(T other) { - return NSPortCoder._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSPortCoder] that wraps the given raw object pointer. - static NSPortCoder castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPortCoder._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSPortCoder]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSPortCoder1); - } - - bool isBycopy() { - return _lib._objc_msgSend_12(_id, _lib._sel_isBycopy1); - } - - bool isByref() { - return _lib._objc_msgSend_12(_id, _lib._sel_isByref1); - } - - void encodePortObject_(NSPort aport) { - _lib._objc_msgSend_593(_id, _lib._sel_encodePortObject_1, aport._id); - } - - NSPort? decodePortObject() { - final _ret = _lib._objc_msgSend_594(_id, _lib._sel_decodePortObject1); - return _ret.address == 0 - ? null - : NSPort._(_ret, _lib, retain: true, release: true); - } - - NSConnection? connection() { - final _ret = _lib._objc_msgSend_595(_id, _lib._sel_connection1); - return _ret.address == 0 - ? null - : NSConnection._(_ret, _lib, retain: true, release: true); - } - - static NSObject portCoderWithReceivePort_sendPort_components_( - AVFAudio _lib, NSPort? rcvPort, NSPort? sndPort, NSArray? comps) { - final _ret = _lib._objc_msgSend_596( - _lib._class_NSPortCoder1, - _lib._sel_portCoderWithReceivePort_sendPort_components_1, - rcvPort?._id ?? ffi.nullptr, - sndPort?._id ?? ffi.nullptr, - comps?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject initWithReceivePort_sendPort_components_( - NSPort? rcvPort, NSPort? sndPort, NSArray? comps) { - final _ret = _lib._objc_msgSend_596( - _id, - _lib._sel_initWithReceivePort_sendPort_components_1, - rcvPort?._id ?? ffi.nullptr, - sndPort?._id ?? ffi.nullptr, - comps?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - void dispatch() { - _lib._objc_msgSend_1(_id, _lib._sel_dispatch1); - } - - @override - NSPortCoder init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSPortCoder._(_ret, _lib, retain: true, release: true); - } - - static NSPortCoder new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSPortCoder1, _lib._sel_new1); - return NSPortCoder._(_ret, _lib, retain: false, release: true); - } - - static NSPortCoder allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSPortCoder1, _lib._sel_allocWithZone_1, zone); - return NSPortCoder._(_ret, _lib, retain: false, release: true); - } - - static NSPortCoder alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPortCoder1, _lib._sel_alloc1); - return NSPortCoder._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSPortCoder1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSPortCoder1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSPortCoder1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSPortCoder1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSPortCoder1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSPortCoder1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSPortCoder1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSPortCoder1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSPortCoder1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSPort extends NSObject { - NSPort._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSPort] that points to the same underlying object as [other]. - static NSPort castFrom(T other) { - return NSPort._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSPort] that wraps the given raw object pointer. - static NSPort castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPort._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSPort]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSPort1); - } - - static NSPort port(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_553(_lib._class_NSPort1, _lib._sel_port1); - return NSPort._(_ret, _lib, retain: true, release: true); - } - - void invalidate() { - _lib._objc_msgSend_1(_id, _lib._sel_invalidate1); - } - - bool get valid { - return _lib._objc_msgSend_12(_id, _lib._sel_isValid1); - } - - void setDelegate_(NSObject? anObject) { - _lib._objc_msgSend_289( - _id, _lib._sel_setDelegate_1, anObject?._id ?? ffi.nullptr); - } - - NSObject? delegate() { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void scheduleInRunLoop_forMode_(NSRunLoop runLoop, NSString mode) { - _lib._objc_msgSend_569( - _id, _lib._sel_scheduleInRunLoop_forMode_1, runLoop._id, mode._id); - } - - void removeFromRunLoop_forMode_(NSRunLoop runLoop, NSString mode) { - _lib._objc_msgSend_569( - _id, _lib._sel_removeFromRunLoop_forMode_1, runLoop._id, mode._id); - } - - int get reservedSpaceLength { - return _lib._objc_msgSend_10(_id, _lib._sel_reservedSpaceLength1); - } - - bool sendBeforeDate_components_from_reserved_( - NSDate limitDate, - NSMutableArray? components, - NSPort? receivePort, - int headerSpaceReserved) { - return _lib._objc_msgSend_570( - _id, - _lib._sel_sendBeforeDate_components_from_reserved_1, - limitDate._id, - components?._id ?? ffi.nullptr, - receivePort?._id ?? ffi.nullptr, - headerSpaceReserved); - } - - bool sendBeforeDate_msgid_components_from_reserved_( - NSDate limitDate, - int msgID, - NSMutableArray? components, - NSPort? receivePort, - int headerSpaceReserved) { - return _lib._objc_msgSend_571( - _id, - _lib._sel_sendBeforeDate_msgid_components_from_reserved_1, - limitDate._id, - msgID, - components?._id ?? ffi.nullptr, - receivePort?._id ?? ffi.nullptr, - headerSpaceReserved); - } - - void addConnection_toRunLoop_forMode_( - NSConnection conn, NSRunLoop runLoop, NSString mode) { - _lib._objc_msgSend_592(_id, _lib._sel_addConnection_toRunLoop_forMode_1, - conn._id, runLoop._id, mode._id); - } - - void removeConnection_fromRunLoop_forMode_( - NSConnection conn, NSRunLoop runLoop, NSString mode) { - _lib._objc_msgSend_592( - _id, - _lib._sel_removeConnection_fromRunLoop_forMode_1, - conn._id, - runLoop._id, - mode._id); - } - - @override - NSPort init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSPort._(_ret, _lib, retain: true, release: true); - } - - static NSPort new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSPort1, _lib._sel_new1); - return NSPort._(_ret, _lib, retain: false, release: true); - } - - static NSPort allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSPort1, _lib._sel_allocWithZone_1, zone); - return NSPort._(_ret, _lib, retain: false, release: true); - } - - static NSPort alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSPort1, _lib._sel_alloc1); - return NSPort._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSPort1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSPort1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSPort1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSPort1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSPort1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSPort1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSPort1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSPort1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSPort1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSRunLoop extends NSObject { - NSRunLoop._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSRunLoop] that points to the same underlying object as [other]. - static NSRunLoop castFrom(T other) { - return NSRunLoop._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSRunLoop] that wraps the given raw object pointer. - static NSRunLoop castFromPointer(AVFAudio 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); - } - - static NSRunLoop getCurrentRunLoop(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_554( - _lib._class_NSRunLoop1, _lib._sel_currentRunLoop1); - return NSRunLoop._(_ret, _lib, retain: true, release: true); - } - - static NSRunLoop getMainRunLoop(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_554(_lib._class_NSRunLoop1, _lib._sel_mainRunLoop1); - return NSRunLoop._(_ret, _lib, retain: true, release: true); - } - - NSString? get currentMode { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_currentMode1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - ffi.Pointer<__CFRunLoop> getCFRunLoop() { - return _lib._objc_msgSend_555(_id, _lib._sel_getCFRunLoop1); - } - - void addTimer_forMode_(NSTimer timer, NSString mode) { - _lib._objc_msgSend_562( - _id, _lib._sel_addTimer_forMode_1, timer._id, mode._id); - } - - void addPort_forMode_(NSPort aPort, NSString mode) { - _lib._objc_msgSend_563( - _id, _lib._sel_addPort_forMode_1, aPort._id, mode._id); - } - - void removePort_forMode_(NSPort aPort, NSString mode) { - _lib._objc_msgSend_563( - _id, _lib._sel_removePort_forMode_1, aPort._id, mode._id); - } - - NSDate? limitDateForMode_(NSString mode) { - final _ret = - _lib._objc_msgSend_564(_id, _lib._sel_limitDateForMode_1, mode._id); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - void acceptInputForMode_beforeDate_(NSString mode, NSDate limitDate) { - _lib._objc_msgSend_565(_id, _lib._sel_acceptInputForMode_beforeDate_1, - mode._id, limitDate._id); - } - - void run() { - _lib._objc_msgSend_1(_id, _lib._sel_run1); - } - - void runUntilDate_(NSDate limitDate) { - _lib._objc_msgSend_540(_id, _lib._sel_runUntilDate_1, limitDate._id); - } - - bool runMode_beforeDate_(NSString mode, NSDate limitDate) { - return _lib._objc_msgSend_566( - _id, _lib._sel_runMode_beforeDate_1, mode._id, limitDate._id); - } - - void configureAsServer() { - _lib._objc_msgSend_1(_id, _lib._sel_configureAsServer1); - } - - void performInModes_block_(NSArray modes, ObjCBlock_ffiVoid block) { - _lib._objc_msgSend_567( - _id, _lib._sel_performInModes_block_1, modes._id, block._id); - } - - void performBlock_(ObjCBlock_ffiVoid block) { - _lib._objc_msgSend_532(_id, _lib._sel_performBlock_1, block._id); - } - - void performSelector_target_argument_order_modes_( - ffi.Pointer aSelector, - NSObject target, - NSObject? arg, - int order, - NSArray modes) { - _lib._objc_msgSend_568( - _id, - _lib._sel_performSelector_target_argument_order_modes_1, - aSelector, - target._id, - arg?._id ?? ffi.nullptr, - order, - modes._id); - } - - void cancelPerformSelector_target_argument_( - ffi.Pointer aSelector, NSObject target, NSObject? arg) { - _lib._objc_msgSend_533( - _id, - _lib._sel_cancelPerformSelector_target_argument_1, - aSelector, - target._id, - arg?._id ?? ffi.nullptr); - } - - void cancelPerformSelectorsWithTarget_(NSObject target) { - _lib._objc_msgSend_15( - _id, _lib._sel_cancelPerformSelectorsWithTarget_1, target._id); - } - - @override - NSRunLoop init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSRunLoop._(_ret, _lib, retain: true, release: true); - } - - static NSRunLoop new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSRunLoop1, _lib._sel_new1); - return NSRunLoop._(_ret, _lib, retain: false, release: true); - } - - static NSRunLoop allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSRunLoop1, _lib._sel_allocWithZone_1, zone); - return NSRunLoop._(_ret, _lib, retain: false, release: true); - } - - static NSRunLoop alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSRunLoop1, _lib._sel_alloc1); - return NSRunLoop._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSRunLoop1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSRunLoop1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSRunLoop1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSRunLoop1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSRunLoop1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSRunLoop1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSRunLoop1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSRunLoop1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSRunLoop1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -final class __CFRunLoop extends ffi.Opaque {} - -class NSTimer extends NSObject { - NSTimer._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSTimer] that points to the same underlying object as [other]. - static NSTimer castFrom(T other) { - return NSTimer._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSTimer] that wraps the given raw object pointer. - static NSTimer castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSTimer._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSTimer]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSTimer1); - } - - static NSTimer timerWithTimeInterval_invocation_repeats_( - AVFAudio _lib, double ti, NSInvocation invocation, bool yesOrNo) { - final _ret = _lib._objc_msgSend_556( - _lib._class_NSTimer1, - _lib._sel_timerWithTimeInterval_invocation_repeats_1, - ti, - invocation._id, - yesOrNo); - return NSTimer._(_ret, _lib, retain: true, release: true); - } - - static NSTimer scheduledTimerWithTimeInterval_invocation_repeats_( - AVFAudio _lib, double ti, NSInvocation invocation, bool yesOrNo) { - final _ret = _lib._objc_msgSend_556( - _lib._class_NSTimer1, - _lib._sel_scheduledTimerWithTimeInterval_invocation_repeats_1, - ti, - invocation._id, - yesOrNo); - return NSTimer._(_ret, _lib, retain: true, release: true); - } - - static NSTimer timerWithTimeInterval_target_selector_userInfo_repeats_( - AVFAudio _lib, - double ti, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? userInfo, - bool yesOrNo) { - final _ret = _lib._objc_msgSend_557( - _lib._class_NSTimer1, - _lib._sel_timerWithTimeInterval_target_selector_userInfo_repeats_1, - ti, - aTarget._id, - aSelector, - userInfo?._id ?? ffi.nullptr, - yesOrNo); - return NSTimer._(_ret, _lib, retain: true, release: true); - } - - static NSTimer - scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_( - AVFAudio _lib, - double ti, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? userInfo, - bool yesOrNo) { - final _ret = _lib._objc_msgSend_557( - _lib._class_NSTimer1, - _lib._sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_1, - ti, - aTarget._id, - aSelector, - userInfo?._id ?? ffi.nullptr, - yesOrNo); - return NSTimer._(_ret, _lib, retain: true, release: true); - } - - static NSTimer timerWithTimeInterval_repeats_block_(AVFAudio _lib, - double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { - final _ret = _lib._objc_msgSend_558( - _lib._class_NSTimer1, - _lib._sel_timerWithTimeInterval_repeats_block_1, - interval, - repeats, - block._id); - return NSTimer._(_ret, _lib, retain: true, release: true); - } - - static NSTimer scheduledTimerWithTimeInterval_repeats_block_(AVFAudio _lib, - double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { - final _ret = _lib._objc_msgSend_558( - _lib._class_NSTimer1, - _lib._sel_scheduledTimerWithTimeInterval_repeats_block_1, - interval, - repeats, - block._id); - return NSTimer._(_ret, _lib, retain: true, release: true); - } - - NSTimer initWithFireDate_interval_repeats_block_(NSDate date, double interval, - bool repeats, ObjCBlock_ffiVoid_NSTimer block) { - final _ret = _lib._objc_msgSend_559( - _id, - _lib._sel_initWithFireDate_interval_repeats_block_1, - date._id, - interval, - repeats, - block._id); - return NSTimer._(_ret, _lib, retain: true, release: true); - } - - NSTimer initWithFireDate_interval_target_selector_userInfo_repeats_( - NSDate date, - double ti, - NSObject t, - ffi.Pointer s, - NSObject? ui, - bool rep) { - final _ret = _lib._objc_msgSend_560( - _id, - _lib._sel_initWithFireDate_interval_target_selector_userInfo_repeats_1, - date._id, - ti, - t._id, - s, - ui?._id ?? ffi.nullptr, - rep); - return NSTimer._(_ret, _lib, retain: true, release: true); - } - - void fire() { - _lib._objc_msgSend_1(_id, _lib._sel_fire1); - } - - NSDate get fireDate { - final _ret = _lib._objc_msgSend_172(_id, _lib._sel_fireDate1); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - set fireDate(NSDate value) { - return _lib._objc_msgSend_561(_id, _lib._sel_setFireDate_1, value._id); - } - - double get timeInterval { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_timeInterval1) - : _lib._objc_msgSend_165(_id, _lib._sel_timeInterval1); - } - - double get tolerance { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_tolerance1) - : _lib._objc_msgSend_165(_id, _lib._sel_tolerance1); - } - - set tolerance(double value) { - return _lib._objc_msgSend_542(_id, _lib._sel_setTolerance_1, value); - } - - void invalidate() { - _lib._objc_msgSend_1(_id, _lib._sel_invalidate1); - } - - bool get valid { - return _lib._objc_msgSend_12(_id, _lib._sel_isValid1); - } - - NSObject? get userInfo { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_userInfo1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - @override - NSTimer init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSTimer._(_ret, _lib, retain: true, release: true); - } - - static NSTimer new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSTimer1, _lib._sel_new1); - return NSTimer._(_ret, _lib, retain: false, release: true); - } - - static NSTimer allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSTimer1, _lib._sel_allocWithZone_1, zone); - return NSTimer._(_ret, _lib, retain: false, release: true); - } - - static NSTimer alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSTimer1, _lib._sel_alloc1); - return NSTimer._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSTimer1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSTimer1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSTimer1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSTimer1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSTimer1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSTimer1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSTimer1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSTimer1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSTimer1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -void _ObjCBlock_ffiVoid_NSTimer_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSTimer_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSTimer_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSTimer_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSTimer_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSTimer_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSTimer_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSTimer_closureRegistry[block.ref.target.address]!(arg0); - -class ObjCBlock_ffiVoid_NSTimer extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSTimer._(ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSTimer castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSTimer._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSTimer.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi - .NativeFunction arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTimer_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSTimer.fromFunction( - AVFAudio lib, void Function(NSTimer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTimer_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSTimer_registerClosure( - (ffi.Pointer arg0) => - fn(NSTimer._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSTimer.listener(AVFAudio lib, void Function(NSTimer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSTimer_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSTimer_registerClosure( - (ffi.Pointer arg0) => - fn(NSTimer._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; +// +// Generated by `package:ffigen`. +// ignore_for_file: type=lint +import 'package:ffi/ffi.dart' as pkg_ffi; +import 'package:objective_c/objective_c.dart' as objc; +import 'dart:ffi' as ffi; - void call(NSTimer arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0._id); +abstract class NSBinarySearchingOptions { + static const int NSBinarySearchingFirstEqual = 256; + static const int NSBinarySearchingLastEqual = 512; + static const int NSBinarySearchingInsertionIndex = 1024; } -class NSConnection extends NSObject { - NSConnection._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSConnection] that points to the same underlying object as [other]. - static NSConnection castFrom(T other) { - return NSConnection._(other._id, other._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; +} - /// Returns a [NSConnection] that wraps the given raw object pointer. - static NSConnection castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSConnection._(other, lib, retain: retain, release: release); - } +class NSBundle extends objc.NSObject { + NSBundle._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSConnection]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSConnection1); - } + /// Constructs a [NSBundle] that points to the same underlying object as [other]. + NSBundle.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSDictionary get statistics { - final _ret = _lib._objc_msgSend_181(_id, _lib._sel_statistics1); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSBundle] that wraps the given raw object pointer. + NSBundle.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static NSArray allConnections(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSConnection1, _lib._sel_allConnections1); - return NSArray._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSBundle]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSBundle); } - static NSConnection defaultConnection(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_572( - _lib._class_NSConnection1, _lib._sel_defaultConnection1); - return NSConnection._(_ret, _lib, retain: true, release: true); + static NSBundle getMainBundle() { + final _ret = _objc_msgSend_1(_class_NSBundle, _sel_mainBundle); + return NSBundle.castFromPointer(_ret, retain: true, release: true); } - static NSConnection? connectionWithRegisteredName_host_( - AVFAudio _lib, NSString name, NSString? hostName) { - final _ret = _lib._objc_msgSend_573( - _lib._class_NSConnection1, - _lib._sel_connectionWithRegisteredName_host_1, - name._id, - hostName?._id ?? ffi.nullptr); + static NSBundle? bundleWithPath_(objc.NSString path) { + final _ret = + _objc_msgSend_2(_class_NSBundle, _sel_bundleWithPath_, path.pointer); return _ret.address == 0 ? null - : NSConnection._(_ret, _lib, retain: true, release: true); + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - static NSConnection? connectionWithRegisteredName_host_usingNameServer_( - AVFAudio _lib, - NSString name, - NSString? hostName, - NSPortNameServer server) { - final _ret = _lib._objc_msgSend_578( - _lib._class_NSConnection1, - _lib._sel_connectionWithRegisteredName_host_usingNameServer_1, - name._id, - hostName?._id ?? ffi.nullptr, - server._id); + NSBundle? initWithPath_(objc.NSString path) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_initWithPath_, path.pointer); return _ret.address == 0 ? null - : NSConnection._(_ret, _lib, retain: true, release: true); + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - static NSDistantObject? rootProxyForConnectionWithRegisteredName_host_( - AVFAudio _lib, NSString name, NSString? hostName) { - final _ret = _lib._objc_msgSend_583( - _lib._class_NSConnection1, - _lib._sel_rootProxyForConnectionWithRegisteredName_host_1, - name._id, - hostName?._id ?? ffi.nullptr); + static NSBundle? bundleWithURL_(objc.NSURL url) { + final _ret = + _objc_msgSend_3(_class_NSBundle, _sel_bundleWithURL_, url.pointer); return _ret.address == 0 ? null - : NSDistantObject._(_ret, _lib, retain: true, release: true); + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - static NSDistantObject? - rootProxyForConnectionWithRegisteredName_host_usingNameServer_( - AVFAudio _lib, - NSString name, - NSString? hostName, - NSPortNameServer server) { - final _ret = _lib._objc_msgSend_584( - _lib._class_NSConnection1, - _lib._sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_1, - name._id, - hostName?._id ?? ffi.nullptr, - server._id); + NSBundle? initWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_3(this.pointer, _sel_initWithURL_, url.pointer); return _ret.address == 0 ? null - : NSDistantObject._(_ret, _lib, retain: true, release: true); + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - static NSConnection? serviceConnectionWithName_rootObject_usingNameServer_( - AVFAudio _lib, NSString name, NSObject root, NSPortNameServer server) { - final _ret = _lib._objc_msgSend_585( - _lib._class_NSConnection1, - _lib._sel_serviceConnectionWithName_rootObject_usingNameServer_1, - name._id, - root._id, - server._id); - return _ret.address == 0 - ? null - : NSConnection._(_ret, _lib, retain: true, release: true); + static NSBundle bundleForClass_(objc.NSObject aClass) { + final _ret = + _objc_msgSend_4(_class_NSBundle, _sel_bundleForClass_, aClass.pointer); + return NSBundle.castFromPointer(_ret, retain: true, release: true); } - static NSConnection? serviceConnectionWithName_rootObject_( - AVFAudio _lib, NSString name, NSObject root) { - final _ret = _lib._objc_msgSend_586(_lib._class_NSConnection1, - _lib._sel_serviceConnectionWithName_rootObject_1, name._id, root._id); + static NSBundle? bundleWithIdentifier_(objc.NSString identifier) { + final _ret = _objc_msgSend_5( + _class_NSBundle, _sel_bundleWithIdentifier_, identifier.pointer); return _ret.address == 0 ? null - : NSConnection._(_ret, _lib, retain: true, release: true); + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - double get requestTimeout { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_requestTimeout1) - : _lib._objc_msgSend_165(_id, _lib._sel_requestTimeout1); + static objc.NSArray getAllBundles() { + final _ret = _objc_msgSend_6(_class_NSBundle, _sel_allBundles); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set requestTimeout(double value) { - return _lib._objc_msgSend_542(_id, _lib._sel_setRequestTimeout_1, value); + static objc.NSArray getAllFrameworks() { + final _ret = _objc_msgSend_6(_class_NSBundle, _sel_allFrameworks); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - double get replyTimeout { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_replyTimeout1) - : _lib._objc_msgSend_165(_id, _lib._sel_replyTimeout1); + bool load() { + return _objc_msgSend_7(this.pointer, _sel_load); } - set replyTimeout(double value) { - return _lib._objc_msgSend_542(_id, _lib._sel_setReplyTimeout_1, value); + bool get loaded { + return _objc_msgSend_7(this.pointer, _sel_isLoaded); } - NSObject? get rootObject { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_rootObject1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + bool unload() { + return _objc_msgSend_7(this.pointer, _sel_unload); } - set rootObject(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setRootObject_1, value?._id ?? ffi.nullptr); + bool preflightAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_8(this.pointer, _sel_preflightAndReturnError_, error); } - NSObject? get delegate { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + bool loadAndReturnError_(ffi.Pointer> error) { + return _objc_msgSend_8(this.pointer, _sel_loadAndReturnError_, error); } - set delegate(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); + objc.NSURL get bundleURL { + final _ret = _objc_msgSend_9(this.pointer, _sel_bundleURL); + return objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - bool get independentConversationQueueing { - return _lib._objc_msgSend_12( - _id, _lib._sel_independentConversationQueueing1); + objc.NSURL? get resourceURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_resourceURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - set independentConversationQueueing(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setIndependentConversationQueueing_1, value); + objc.NSURL? get executableURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_executableURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - bool get valid { - return _lib._objc_msgSend_12(_id, _lib._sel_isValid1); + objc.NSURL? URLForAuxiliaryExecutable_(objc.NSString executableName) { + final _ret = _objc_msgSend_11( + this.pointer, _sel_URLForAuxiliaryExecutable_, executableName.pointer); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSDistantObject get rootProxy { - final _ret = _lib._objc_msgSend_587(_id, _lib._sel_rootProxy1); - return NSDistantObject._(_ret, _lib, retain: true, release: true); + objc.NSURL? get privateFrameworksURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_privateFrameworksURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void invalidate() { - _lib._objc_msgSend_1(_id, _lib._sel_invalidate1); + objc.NSURL? get sharedFrameworksURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_sharedFrameworksURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void addRequestMode_(NSString rmode) { - _lib._objc_msgSend_247(_id, _lib._sel_addRequestMode_1, rmode._id); + objc.NSURL? get sharedSupportURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_sharedSupportURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void removeRequestMode_(NSString rmode) { - _lib._objc_msgSend_247(_id, _lib._sel_removeRequestMode_1, rmode._id); + objc.NSURL? get builtInPlugInsURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_builtInPlugInsURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSArray get requestModes { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_requestModes1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSURL? get appStoreReceiptURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_appStoreReceiptURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - bool registerName_(NSString? name) { - return _lib._objc_msgSend_588( - _id, _lib._sel_registerName_1, name?._id ?? ffi.nullptr); + objc.NSString get bundlePath { + final _ret = _objc_msgSend_12(this.pointer, _sel_bundlePath); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool registerName_withNameServer_(NSString? name, NSPortNameServer server) { - return _lib._objc_msgSend_589(_id, _lib._sel_registerName_withNameServer_1, - name?._id ?? ffi.nullptr, server._id); + objc.NSString? get resourcePath { + final _ret = _objc_msgSend_13(this.pointer, _sel_resourcePath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSConnection? connectionWithReceivePort_sendPort_( - AVFAudio _lib, NSPort? receivePort, NSPort? sendPort) { - final _ret = _lib._objc_msgSend_590( - _lib._class_NSConnection1, - _lib._sel_connectionWithReceivePort_sendPort_1, - receivePort?._id ?? ffi.nullptr, - sendPort?._id ?? ffi.nullptr); + objc.NSString? get executablePath { + final _ret = _objc_msgSend_13(this.pointer, _sel_executablePath); return _ret.address == 0 ? null - : NSConnection._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject? currentConversation(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_17( - _lib._class_NSConnection1, _lib._sel_currentConversation1); + objc.NSString? pathForAuxiliaryExecutable_(objc.NSString executableName) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_pathForAuxiliaryExecutable_, executableName.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSConnection? initWithReceivePort_sendPort_( - NSPort? receivePort, NSPort? sendPort) { - final _ret = _lib._objc_msgSend_590( - _id, - _lib._sel_initWithReceivePort_sendPort_1, - receivePort?._id ?? ffi.nullptr, - sendPort?._id ?? ffi.nullptr); + objc.NSString? get privateFrameworksPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_privateFrameworksPath); return _ret.address == 0 ? null - : NSConnection._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSPort get sendPort { - final _ret = _lib._objc_msgSend_553(_id, _lib._sel_sendPort1); - return NSPort._(_ret, _lib, retain: true, release: true); + objc.NSString? get sharedFrameworksPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_sharedFrameworksPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSPort get receivePort { - final _ret = _lib._objc_msgSend_553(_id, _lib._sel_receivePort1); - return NSPort._(_ret, _lib, retain: true, release: true); + objc.NSString? get sharedSupportPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_sharedSupportPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void enableMultipleThreads() { - _lib._objc_msgSend_1(_id, _lib._sel_enableMultipleThreads1); + objc.NSString? get builtInPlugInsPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_builtInPlugInsPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool get multipleThreadsEnabled { - return _lib._objc_msgSend_12(_id, _lib._sel_multipleThreadsEnabled1); + static objc.NSURL? URLForResource_withExtension_subdirectory_inBundleWithURL_( + objc.NSString? name, + objc.NSString? ext, + objc.NSString? subpath, + objc.NSURL bundleURL) { + final _ret = _objc_msgSend_15( + _class_NSBundle, + _sel_URLForResource_withExtension_subdirectory_inBundleWithURL_, + name?.pointer ?? ffi.nullptr, + ext?.pointer ?? ffi.nullptr, + subpath?.pointer ?? ffi.nullptr, + bundleURL.pointer); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void addRunLoop_(NSRunLoop runloop) { - _lib._objc_msgSend_591(_id, _lib._sel_addRunLoop_1, runloop._id); + static objc.NSArray? + URLsForResourcesWithExtension_subdirectory_inBundleWithURL_( + objc.NSString? ext, objc.NSString? subpath, objc.NSURL bundleURL) { + final _ret = _objc_msgSend_16( + _class_NSBundle, + _sel_URLsForResourcesWithExtension_subdirectory_inBundleWithURL_, + ext?.pointer ?? ffi.nullptr, + subpath?.pointer ?? ffi.nullptr, + bundleURL.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void removeRunLoop_(NSRunLoop runloop) { - _lib._objc_msgSend_591(_id, _lib._sel_removeRunLoop_1, runloop._id); + objc.NSURL? URLForResource_withExtension_( + objc.NSString? name, objc.NSString? ext) { + final _ret = _objc_msgSend_17( + this.pointer, + _sel_URLForResource_withExtension_, + name?.pointer ?? ffi.nullptr, + ext?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void runInNewThread() { - _lib._objc_msgSend_1(_id, _lib._sel_runInNewThread1); + objc.NSURL? URLForResource_withExtension_subdirectory_( + objc.NSString? name, objc.NSString? ext, objc.NSString? subpath) { + final _ret = _objc_msgSend_18( + this.pointer, + _sel_URLForResource_withExtension_subdirectory_, + name?.pointer ?? ffi.nullptr, + ext?.pointer ?? ffi.nullptr, + subpath?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSArray get remoteObjects { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_remoteObjects1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSURL? URLForResource_withExtension_subdirectory_localization_( + objc.NSString? name, + objc.NSString? ext, + objc.NSString? subpath, + objc.NSString? localizationName) { + final _ret = _objc_msgSend_19( + this.pointer, + _sel_URLForResource_withExtension_subdirectory_localization_, + name?.pointer ?? ffi.nullptr, + ext?.pointer ?? ffi.nullptr, + subpath?.pointer ?? ffi.nullptr, + localizationName?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSArray get localObjects { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_localObjects1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSArray? URLsForResourcesWithExtension_subdirectory_( + objc.NSString? ext, objc.NSString? subpath) { + final _ret = _objc_msgSend_20( + this.pointer, + _sel_URLsForResourcesWithExtension_subdirectory_, + ext?.pointer ?? ffi.nullptr, + subpath?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void dispatchWithComponents_(NSArray components) { - _lib._objc_msgSend_472( - _id, _lib._sel_dispatchWithComponents_1, components._id); + objc.NSArray? URLsForResourcesWithExtension_subdirectory_localization_( + objc.NSString? ext, + objc.NSString? subpath, + objc.NSString? localizationName) { + final _ret = _objc_msgSend_21( + this.pointer, + _sel_URLsForResourcesWithExtension_subdirectory_localization_, + ext?.pointer ?? ffi.nullptr, + subpath?.pointer ?? ffi.nullptr, + localizationName?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - @override - NSConnection init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSConnection._(_ret, _lib, retain: true, release: true); + static objc.NSString? pathForResource_ofType_inDirectory_( + objc.NSString? name, objc.NSString? ext, objc.NSString bundlePath) { + final _ret = _objc_msgSend_22( + _class_NSBundle, + _sel_pathForResource_ofType_inDirectory_, + name?.pointer ?? ffi.nullptr, + ext?.pointer ?? ffi.nullptr, + bundlePath.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSConnection new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSConnection1, _lib._sel_new1); - return NSConnection._(_ret, _lib, retain: false, release: true); + static objc.NSArray pathsForResourcesOfType_inDirectory_( + objc.NSString? ext, objc.NSString bundlePath) { + final _ret = _objc_msgSend_23( + _class_NSBundle, + _sel_pathsForResourcesOfType_inDirectory_, + ext?.pointer ?? ffi.nullptr, + bundlePath.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSConnection allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSConnection1, _lib._sel_allocWithZone_1, zone); - return NSConnection._(_ret, _lib, retain: false, release: true); + objc.NSString? pathForResource_ofType_( + objc.NSString? name, objc.NSString? ext) { + final _ret = _objc_msgSend_24(this.pointer, _sel_pathForResource_ofType_, + name?.pointer ?? ffi.nullptr, ext?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSConnection alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSConnection1, _lib._sel_alloc1); - return NSConnection._(_ret, _lib, retain: false, release: true); + objc.NSString? pathForResource_ofType_inDirectory_forLocalization_( + objc.NSString? name, + objc.NSString? ext, + objc.NSString? subpath, + objc.NSString? localizationName) { + final _ret = _objc_msgSend_25( + this.pointer, + _sel_pathForResource_ofType_inDirectory_forLocalization_, + name?.pointer ?? ffi.nullptr, + ext?.pointer ?? ffi.nullptr, + subpath?.pointer ?? ffi.nullptr, + localizationName?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSConnection1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + objc.NSArray pathsForResourcesOfType_inDirectory_forLocalization_( + objc.NSString? ext, + objc.NSString? subpath, + objc.NSString? localizationName) { + final _ret = _objc_msgSend_26( + this.pointer, + _sel_pathsForResourcesOfType_inDirectory_forLocalization_, + ext?.pointer ?? ffi.nullptr, + subpath?.pointer ?? ffi.nullptr, + localizationName?.pointer ?? ffi.nullptr); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSConnection1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + objc.NSString localizedStringForKey_value_table_( + objc.NSString key, objc.NSString? value, objc.NSString? tableName) { + final _ret = _objc_msgSend_27( + this.pointer, + _sel_localizedStringForKey_value_table_, + key.pointer, + value?.pointer ?? ffi.nullptr, + tableName?.pointer ?? ffi.nullptr); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSConnection1, _lib._sel_accessInstanceVariablesDirectly1); + NSAttributedString localizedAttributedStringForKey_value_table_( + objc.NSString key, objc.NSString? value, objc.NSString? tableName) { + final _ret = _objc_msgSend_64( + this.pointer, + _sel_localizedAttributedStringForKey_value_table_, + key.pointer, + value?.pointer ?? ffi.nullptr, + tableName?.pointer ?? ffi.nullptr); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSConnection1, _lib._sel_useStoredAccessor1); + objc.NSString? get bundleIdentifier { + final _ret = _objc_msgSend_13(this.pointer, _sel_bundleIdentifier); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSConnection1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + objc.NSDictionary? get infoDictionary { + final _ret = _objc_msgSend_65(this.pointer, _sel_infoDictionary); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSConnection1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + objc.NSDictionary? get localizedInfoDictionary { + final _ret = _objc_msgSend_65(this.pointer, _sel_localizedInfoDictionary); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSConnection1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSObject? objectForInfoDictionaryKey_(objc.NSString key) { + final _ret = _objc_msgSend_2( + this.pointer, _sel_objectForInfoDictionaryKey_, key.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSConnection1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSObject? classNamed_(objc.NSString className) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_classNamed_, className.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSConnection1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSObject? get principalClass { + final _ret = _objc_msgSend_66(this.pointer, _sel_principalClass); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } -} - -class NSPortNameServer extends NSObject { - NSPortNameServer._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSPortNameServer] that points to the same underlying object as [other]. - static NSPortNameServer castFrom(T other) { - return NSPortNameServer._(other._id, other._lib, - retain: true, release: true); + objc.NSArray get preferredLocalizations { + final _ret = _objc_msgSend_6(this.pointer, _sel_preferredLocalizations); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSPortNameServer] that wraps the given raw object pointer. - static NSPortNameServer castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPortNameServer._(other, lib, retain: retain, release: release); + objc.NSArray get localizations { + final _ret = _objc_msgSend_6(this.pointer, _sel_localizations); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSPortNameServer]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSPortNameServer1); + objc.NSString? get developmentLocalization { + final _ret = _objc_msgSend_13(this.pointer, _sel_developmentLocalization); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSPortNameServer systemDefaultPortNameServer(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_574( - _lib._class_NSPortNameServer1, _lib._sel_systemDefaultPortNameServer1); - return NSPortNameServer._(_ret, _lib, retain: true, release: true); + static objc.NSArray preferredLocalizationsFromArray_( + objc.NSArray localizationsArray) { + final _ret = _objc_msgSend_67(_class_NSBundle, + _sel_preferredLocalizationsFromArray_, localizationsArray.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSPort? portForName_(NSString name) { - final _ret = _lib._objc_msgSend_575(_id, _lib._sel_portForName_1, name._id); - return _ret.address == 0 - ? null - : NSPort._(_ret, _lib, retain: true, release: true); + static objc.NSArray preferredLocalizationsFromArray_forPreferences_( + objc.NSArray localizationsArray, objc.NSArray? preferencesArray) { + final _ret = _objc_msgSend_68( + _class_NSBundle, + _sel_preferredLocalizationsFromArray_forPreferences_, + localizationsArray.pointer, + preferencesArray?.pointer ?? ffi.nullptr); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSPort? portForName_host_(NSString name, NSString? host) { - final _ret = _lib._objc_msgSend_576( - _id, _lib._sel_portForName_host_1, name._id, host?._id ?? ffi.nullptr); + objc.NSArray? get executableArchitectures { + final _ret = _objc_msgSend_69(this.pointer, _sel_executableArchitectures); return _ret.address == 0 ? null - : NSPort._(_ret, _lib, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool registerPort_name_(NSPort port, NSString name) { - return _lib._objc_msgSend_577( - _id, _lib._sel_registerPort_name_1, port._id, name._id); + void setPreservationPriority_forTags_(double priority, objc.NSSet tags) { + _objc_msgSend_70(this.pointer, _sel_setPreservationPriority_forTags_, + priority, tags.pointer); } - bool removePortForName_(NSString name) { - return _lib._objc_msgSend_64(_id, _lib._sel_removePortForName_1, name._id); + double preservationPriorityForTag_(objc.NSString tag) { + return objc.useMsgSendVariants + ? _objc_msgSend_71Fpret( + this.pointer, _sel_preservationPriorityForTag_, tag.pointer) + : _objc_msgSend_71( + this.pointer, _sel_preservationPriorityForTag_, tag.pointer); } @override - NSPortNameServer init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSPortNameServer._(_ret, _lib, retain: true, release: true); + NSBundle init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSBundle.castFromPointer(_ret, retain: true, release: true); } - static NSPortNameServer new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPortNameServer1, _lib._sel_new1); - return NSPortNameServer._(_ret, _lib, retain: false, release: true); + static NSBundle new1() { + final _ret = _objc_msgSend_40(_class_NSBundle, _sel_new); + return NSBundle.castFromPointer(_ret, retain: false, release: true); } - static NSPortNameServer allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSPortNameServer1, _lib._sel_allocWithZone_1, zone); - return NSPortNameServer._(_ret, _lib, retain: false, release: true); + static NSBundle allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSBundle, _sel_allocWithZone_, zone); + return NSBundle.castFromPointer(_ret, retain: false, release: true); } - static NSPortNameServer alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPortNameServer1, _lib._sel_alloc1); - return NSPortNameServer._(_ret, _lib, retain: false, release: true); + static NSBundle alloc() { + final _ret = _objc_msgSend_40(_class_NSBundle, _sel_alloc); + return NSBundle.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSPortNameServer1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSBundle, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSPortNameServer1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSBundle, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSPortNameServer1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSBundle, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSPortNameServer1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSBundle, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSPortNameServer1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSBundle, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSPortNameServer1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSBundle, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSPortNameServer1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSPortNameServer1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSBundle, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSBundle, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSBundle, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSBundle = objc.getClass("NSBundle"); +late final _sel_mainBundle = objc.registerName("mainBundle"); +final _objc_msgSend_1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +typedef instancetype = ffi.Pointer; +typedef Dartinstancetype = objc.NSObject; +late final _sel_bundleWithPath_ = objc.registerName("bundleWithPath:"); +final _objc_msgSend_2 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithPath_ = objc.registerName("initWithPath:"); +late final _sel_bundleWithURL_ = objc.registerName("bundleWithURL:"); +final _objc_msgSend_3 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithURL_ = objc.registerName("initWithURL:"); +late final _sel_bundleForClass_ = objc.registerName("bundleForClass:"); +final _objc_msgSend_4 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_bundleWithIdentifier_ = + objc.registerName("bundleWithIdentifier:"); +final _objc_msgSend_5 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_allBundles = objc.registerName("allBundles"); +final _objc_msgSend_6 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_allFrameworks = objc.registerName("allFrameworks"); +late final _sel_load = objc.registerName("load"); +final _objc_msgSend_7 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isLoaded = objc.registerName("isLoaded"); +late final _sel_unload = objc.registerName("unload"); +late final _sel_preflightAndReturnError_ = + objc.registerName("preflightAndReturnError:"); +final _objc_msgSend_8 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_loadAndReturnError_ = objc.registerName("loadAndReturnError:"); +late final _sel_bundleURL = objc.registerName("bundleURL"); +final _objc_msgSend_9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_resourceURL = objc.registerName("resourceURL"); +final _objc_msgSend_10 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_executableURL = objc.registerName("executableURL"); +late final _sel_URLForAuxiliaryExecutable_ = + objc.registerName("URLForAuxiliaryExecutable:"); +final _objc_msgSend_11 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_privateFrameworksURL = + objc.registerName("privateFrameworksURL"); +late final _sel_sharedFrameworksURL = objc.registerName("sharedFrameworksURL"); +late final _sel_sharedSupportURL = objc.registerName("sharedSupportURL"); +late final _sel_builtInPlugInsURL = objc.registerName("builtInPlugInsURL"); +late final _sel_appStoreReceiptURL = objc.registerName("appStoreReceiptURL"); +late final _sel_bundlePath = objc.registerName("bundlePath"); +final _objc_msgSend_12 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_resourcePath = objc.registerName("resourcePath"); +final _objc_msgSend_13 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_executablePath = objc.registerName("executablePath"); +late final _sel_pathForAuxiliaryExecutable_ = + objc.registerName("pathForAuxiliaryExecutable:"); +final _objc_msgSend_14 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_privateFrameworksPath = + objc.registerName("privateFrameworksPath"); +late final _sel_sharedFrameworksPath = + objc.registerName("sharedFrameworksPath"); +late final _sel_sharedSupportPath = objc.registerName("sharedSupportPath"); +late final _sel_builtInPlugInsPath = objc.registerName("builtInPlugInsPath"); +late final _sel_URLForResource_withExtension_subdirectory_inBundleWithURL_ = + objc.registerName( + "URLForResource:withExtension:subdirectory:inBundleWithURL:"); +final _objc_msgSend_15 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_URLsForResourcesWithExtension_subdirectory_inBundleWithURL_ = + objc.registerName( + "URLsForResourcesWithExtension:subdirectory:inBundleWithURL:"); +final _objc_msgSend_16 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_URLForResource_withExtension_ = + objc.registerName("URLForResource:withExtension:"); +final _objc_msgSend_17 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_URLForResource_withExtension_subdirectory_ = + objc.registerName("URLForResource:withExtension:subdirectory:"); +final _objc_msgSend_18 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_URLForResource_withExtension_subdirectory_localization_ = objc + .registerName("URLForResource:withExtension:subdirectory:localization:"); +final _objc_msgSend_19 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_URLsForResourcesWithExtension_subdirectory_ = + objc.registerName("URLsForResourcesWithExtension:subdirectory:"); +final _objc_msgSend_20 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_URLsForResourcesWithExtension_subdirectory_localization_ = objc + .registerName("URLsForResourcesWithExtension:subdirectory:localization:"); +final _objc_msgSend_21 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_pathForResource_ofType_inDirectory_ = + objc.registerName("pathForResource:ofType:inDirectory:"); +final _objc_msgSend_22 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_pathsForResourcesOfType_inDirectory_ = + objc.registerName("pathsForResourcesOfType:inDirectory:"); +final _objc_msgSend_23 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_pathForResource_ofType_ = + objc.registerName("pathForResource:ofType:"); +final _objc_msgSend_24 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_pathForResource_ofType_inDirectory_forLocalization_ = + objc.registerName("pathForResource:ofType:inDirectory:forLocalization:"); +final _objc_msgSend_25 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_pathsForResourcesOfType_inDirectory_forLocalization_ = + objc.registerName("pathsForResourcesOfType:inDirectory:forLocalization:"); +final _objc_msgSend_26 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_localizedStringForKey_value_table_ = + objc.registerName("localizedStringForKey:value:table:"); +final _objc_msgSend_27 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +class NSAttributedString extends objc.NSObject { + NSAttributedString._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSPortNameServer1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} + /// Constructs a [NSAttributedString] that points to the same underlying object as [other]. + NSAttributedString.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); -class NSDistantObject extends NSProxy { - NSDistantObject._(ffi.Pointer id, AVFAudio lib, + /// Constructs a [NSAttributedString] that wraps the given raw object pointer. + NSAttributedString.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : this._(other, retain: retain, release: release); - /// Returns a [NSDistantObject] that points to the same underlying object as [other]. - static NSDistantObject castFrom(T other) { - return NSDistantObject._(other._id, other._lib, - retain: true, release: true); + /// Returns whether [obj] is an instance of [NSAttributedString]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSAttributedString); } - /// Returns a [NSDistantObject] that wraps the given raw object pointer. - static NSDistantObject castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDistantObject._(other, lib, retain: retain, release: release); + objc.NSString get string { + final _ret = _objc_msgSend_12(this.pointer, _sel_string); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSDistantObject]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSDistantObject1); + objc.NSDictionary attributesAtIndex_effectiveRange_( + int location, ffi.Pointer<_NSRange> range) { + final _ret = _objc_msgSend_28( + this.pointer, _sel_attributesAtIndex_effectiveRange_, location, range); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSObject? proxyWithTarget_connection_( - AVFAudio _lib, NSObject target, NSConnection connection) { - final _ret = _lib._objc_msgSend_580(_lib._class_NSDistantObject1, - _lib._sel_proxyWithTarget_connection_1, target._id, connection._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + int get length { + return _objc_msgSend_29(this.pointer, _sel_length); } - NSDistantObject? initWithTarget_connection_( - NSObject target, NSConnection connection) { - final _ret = _lib._objc_msgSend_580( - _id, _lib._sel_initWithTarget_connection_1, target._id, connection._id); + objc.NSObject? attribute_atIndex_effectiveRange_( + objc.NSString attrName, int location, ffi.Pointer<_NSRange> range) { + final _ret = _objc_msgSend_30( + this.pointer, + _sel_attribute_atIndex_effectiveRange_, + attrName.pointer, + location, + range); return _ret.address == 0 ? null - : NSDistantObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject proxyWithLocal_connection_( - AVFAudio _lib, NSObject target, NSConnection connection) { - final _ret = _lib._objc_msgSend_581(_lib._class_NSDistantObject1, - _lib._sel_proxyWithLocal_connection_1, target._id, connection._id); - return NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSDistantObject initWithLocal_connection_( - NSObject target, NSConnection connection) { - final _ret = _lib._objc_msgSend_581( - _id, _lib._sel_initWithLocal_connection_1, target._id, connection._id); - return NSDistantObject._(_ret, _lib, retain: true, release: true); + NSAttributedString attributedSubstringFromRange_(_NSRange range) { + final _ret = _objc_msgSend_31( + this.pointer, _sel_attributedSubstringFromRange_, range); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSDistantObject? initWithCoder_(NSCoder inCoder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, inCoder._id); + objc.NSDictionary attributesAtIndex_longestEffectiveRange_inRange_( + int location, ffi.Pointer<_NSRange> range, _NSRange rangeLimit) { + final _ret = _objc_msgSend_32( + this.pointer, + _sel_attributesAtIndex_longestEffectiveRange_inRange_, + location, + range, + rangeLimit); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject? attribute_atIndex_longestEffectiveRange_inRange_( + objc.NSString attrName, + int location, + ffi.Pointer<_NSRange> range, + _NSRange rangeLimit) { + final _ret = _objc_msgSend_33( + this.pointer, + _sel_attribute_atIndex_longestEffectiveRange_inRange_, + attrName.pointer, + location, + range, + rangeLimit); return _ret.address == 0 ? null - : NSDistantObject._(_ret, _lib, retain: true, release: true); - } - - void setProtocolForProxy_(Protocol? proto) { - _lib._objc_msgSend_582( - _id, _lib._sel_setProtocolForProxy_1, proto?._id ?? ffi.nullptr); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSConnection get connectionForProxy { - final _ret = _lib._objc_msgSend_572(_id, _lib._sel_connectionForProxy1); - return NSConnection._(_ret, _lib, retain: true, release: true); + bool isEqualToAttributedString_(NSAttributedString other) { + return _objc_msgSend_34( + this.pointer, _sel_isEqualToAttributedString_, other.pointer); } - static NSObject alloc(AVFAudio _lib) { + NSAttributedString initWithString_(objc.NSString str) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSDistantObject1, _lib._sel_alloc1); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - static bool respondsToSelector_( - AVFAudio _lib, ffi.Pointer aSelector) { - return _lib._objc_msgSend_4(_lib._class_NSDistantObject1, - _lib._sel_respondsToSelector_1, aSelector); - } -} - -class NSProxy extends _ObjCWrapper { - NSProxy._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSProxy] that points to the same underlying object as [other]. - static NSProxy castFrom(T other) { - return NSProxy._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSProxy] that wraps the given raw object pointer. - static NSProxy castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSProxy._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSProxy]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSProxy1); + _objc_msgSend_35(this.pointer, _sel_initWithString_, str.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSObject alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSProxy1, _lib._sel_alloc1); - return NSObject._(_ret, _lib, retain: false, release: true); + NSAttributedString initWithString_attributes_( + objc.NSString str, objc.NSDictionary? attrs) { + final _ret = _objc_msgSend_36(this.pointer, _sel_initWithString_attributes_, + str.pointer, attrs?.pointer ?? ffi.nullptr); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSObject allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSProxy1, _lib._sel_allocWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); + NSAttributedString initWithAttributedString_(NSAttributedString attrStr) { + final _ret = _objc_msgSend_37( + this.pointer, _sel_initWithAttributedString_, attrStr.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSObject class1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSProxy1, _lib._sel_class1); - return NSObject._(_ret, _lib, retain: true, release: true); + void enumerateAttributesInRange_options_usingBlock_(_NSRange enumerationRange, + int opts, ObjCBlock_ffiVoid_NSDictionary_NSRange_bool block) { + _objc_msgSend_38( + this.pointer, + _sel_enumerateAttributesInRange_options_usingBlock_, + enumerationRange, + opts, + block.pointer); } - void forwardInvocation_(NSInvocation invocation) { - _lib._objc_msgSend_421(_id, _lib._sel_forwardInvocation_1, invocation._id); + void enumerateAttribute_inRange_options_usingBlock_( + objc.NSString attrName, + _NSRange enumerationRange, + int opts, + ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool block) { + _objc_msgSend_39( + this.pointer, + _sel_enumerateAttribute_inRange_options_usingBlock_, + attrName.pointer, + enumerationRange, + opts, + block.pointer); } - NSMethodSignature? methodSignatureForSelector_(ffi.Pointer sel) { - final _ret = _lib._objc_msgSend_579( - _id, _lib._sel_methodSignatureForSelector_1, sel); + NSAttributedString? + initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( + objc.NSURL markdownFile, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_53( + this.pointer, + _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_, + markdownFile.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, + error); return _ret.address == 0 ? null - : NSMethodSignature._(_ret, _lib, retain: true, release: true); - } - - void dealloc() { - _lib._objc_msgSend_1(_id, _lib._sel_dealloc1); + : NSAttributedString.castFromPointer(_ret, retain: true, release: true); } - void finalize() { - _lib._objc_msgSend_1(_id, _lib._sel_finalize1); - } - - NSString get description { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get debugDescription { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_debugDescription1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static bool respondsToSelector_( - AVFAudio _lib, ffi.Pointer aSelector) { - return _lib._objc_msgSend_4( - _lib._class_NSProxy1, _lib._sel_respondsToSelector_1, aSelector); - } - - bool allowsWeakReference() { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsWeakReference1); + NSAttributedString? initWithMarkdown_options_baseURL_error_( + objc.NSData markdown, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_54( + this.pointer, + _sel_initWithMarkdown_options_baseURL_error_, + markdown.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSAttributedString.castFromPointer(_ret, retain: true, release: true); } - bool retainWeakReference() { - return _lib._objc_msgSend_12(_id, _lib._sel_retainWeakReference1); + NSAttributedString? initWithMarkdownString_options_baseURL_error_( + objc.NSString markdownString, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_55( + this.pointer, + _sel_initWithMarkdownString_options_baseURL_error_, + markdownString.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSAttributedString.castFromPointer(_ret, retain: true, release: true); } -} - -class NSClassDescription extends NSObject { - NSClassDescription._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSClassDescription] that points to the same underlying object as [other]. - static NSClassDescription castFrom(T other) { - return NSClassDescription._(other._id, other._lib, + NSAttributedString initWithFormat_options_locale_( + NSAttributedString format, int options, objc.NSLocale? locale) { + final _ret = _objc_msgSend_56( + this.pointer, + _sel_initWithFormat_options_locale_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr); + return NSAttributedString.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSClassDescription] that wraps the given raw object pointer. - static NSClassDescription castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSClassDescription._(other, lib, retain: retain, release: release); + NSAttributedString initWithFormat_options_locale_arguments_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + ffi.Pointer<__va_list_tag> arguments) { + final _ret = _objc_msgSend_57( + this.pointer, + _sel_initWithFormat_options_locale_arguments_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr, + arguments); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSClassDescription]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSClassDescription1); + static NSAttributedString localizedAttributedStringWithFormat_( + NSAttributedString format) { + final _ret = _objc_msgSend_37(_class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_, format.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static void registerClassDescription_forClass_( - AVFAudio _lib, NSClassDescription description, NSObject aClass) { - _lib._objc_msgSend_598( - _lib._class_NSClassDescription1, - _lib._sel_registerClassDescription_forClass_1, - description._id, - aClass._id); + static NSAttributedString localizedAttributedStringWithFormat_options_( + NSAttributedString format, int options) { + final _ret = _objc_msgSend_58( + _class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_options_, + format.pointer, + options); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static void invalidateClassDescriptionCache(AVFAudio _lib) { - _lib._objc_msgSend_1(_lib._class_NSClassDescription1, - _lib._sel_invalidateClassDescriptionCache1); + NSAttributedString initWithFormat_options_locale_context_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + objc.NSDictionary context) { + final _ret = _objc_msgSend_59( + this.pointer, + _sel_initWithFormat_options_locale_context_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr, + context.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSClassDescription? classDescriptionForClass_( - AVFAudio _lib, NSObject aClass) { - final _ret = _lib._objc_msgSend_599(_lib._class_NSClassDescription1, - _lib._sel_classDescriptionForClass_1, aClass._id); - return _ret.address == 0 - ? null - : NSClassDescription._(_ret, _lib, retain: true, release: true); + NSAttributedString initWithFormat_options_locale_context_arguments_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + objc.NSDictionary context, + ffi.Pointer<__va_list_tag> arguments) { + final _ret = _objc_msgSend_60( + this.pointer, + _sel_initWithFormat_options_locale_context_arguments_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr, + context.pointer, + arguments); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - @override - NSArray get attributeKeys { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_attributeKeys1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSAttributedString localizedAttributedStringWithFormat_context_( + NSAttributedString format, objc.NSDictionary context) { + final _ret = _objc_msgSend_61( + _class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_context_, + format.pointer, + context.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - @override - NSArray get toOneRelationshipKeys { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_toOneRelationshipKeys1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSAttributedString + localizedAttributedStringWithFormat_options_context_( + NSAttributedString format, int options, objc.NSDictionary context) { + final _ret = _objc_msgSend_62( + _class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_options_context_, + format.pointer, + options, + context.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - @override - NSArray get toManyRelationshipKeys { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_toManyRelationshipKeys1); - return NSArray._(_ret, _lib, retain: true, release: true); + NSAttributedString attributedStringByInflectingString() { + final _ret = + _objc_msgSend_63(this.pointer, _sel_attributedStringByInflectingString); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } @override - NSString? inverseForRelationshipKey_(NSString relationshipKey) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_inverseForRelationshipKey_1, relationshipKey._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + NSAttributedString init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - @override - NSClassDescription init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSClassDescription._(_ret, _lib, retain: true, release: true); + static NSAttributedString new1() { + final _ret = _objc_msgSend_40(_class_NSAttributedString, _sel_new); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } - static NSClassDescription new1(AVFAudio _lib) { + static NSAttributedString allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSClassDescription1, _lib._sel_new1); - return NSClassDescription._(_ret, _lib, retain: false, release: true); - } - - static NSClassDescription allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSClassDescription1, _lib._sel_allocWithZone_1, zone); - return NSClassDescription._(_ret, _lib, retain: false, release: true); + _objc_msgSend_47(_class_NSAttributedString, _sel_allocWithZone_, zone); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } - static NSClassDescription alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSClassDescription1, _lib._sel_alloc1); - return NSClassDescription._(_ret, _lib, retain: false, release: true); + static NSAttributedString alloc() { + final _ret = _objc_msgSend_40(_class_NSAttributedString, _sel_alloc); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSClassDescription1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSAttributedString, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSClassDescription1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSAttributedString, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSClassDescription1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSAttributedString, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSClassDescription1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSAttributedString, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSClassDescription1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSAttributedString, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSClassDescription1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSAttributedString, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSClassDescription1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSAttributedString, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSClassDescription1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSAttributedString, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSClassDescription1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSAttributedString, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -class NSScriptObjectSpecifier extends NSObject { - NSScriptObjectSpecifier._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +late final _class_NSAttributedString = objc.getClass("NSAttributedString"); +late final _sel_string = objc.registerName("string"); - /// Returns a [NSScriptObjectSpecifier] that points to the same underlying object as [other]. - static NSScriptObjectSpecifier castFrom(T other) { - return NSScriptObjectSpecifier._(other._id, other._lib, - retain: true, release: true); - } +final class _NSRange extends ffi.Struct { + @ffi.UnsignedLong() + external int location; - /// Returns a [NSScriptObjectSpecifier] that wraps the given raw object pointer. - static NSScriptObjectSpecifier castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSScriptObjectSpecifier._(other, lib, - retain: retain, release: release); - } + @ffi.UnsignedLong() + external int length; +} - /// Returns whether [obj] is an instance of [NSScriptObjectSpecifier]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSScriptObjectSpecifier1); - } +late final _sel_attributesAtIndex_effectiveRange_ = + objc.registerName("attributesAtIndex:effectiveRange:"); +final _objc_msgSend_28 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer<_NSRange>)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_NSRange>)>(); +late final _sel_length = objc.registerName("length"); +final _objc_msgSend_29 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_attribute_atIndex_effectiveRange_ = + objc.registerName("attribute:atIndex:effectiveRange:"); +final _objc_msgSend_30 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer<_NSRange>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_NSRange>)>(); +late final _sel_attributedSubstringFromRange_ = + objc.registerName("attributedSubstringFromRange:"); +final _objc_msgSend_31 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_attributesAtIndex_longestEffectiveRange_inRange_ = + objc.registerName("attributesAtIndex:longestEffectiveRange:inRange:"); +final _objc_msgSend_32 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer<_NSRange>, + _NSRange)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_NSRange>, + _NSRange)>(); +late final _sel_attribute_atIndex_longestEffectiveRange_inRange_ = + objc.registerName("attribute:atIndex:longestEffectiveRange:inRange:"); +final _objc_msgSend_33 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer<_NSRange>, + _NSRange)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_NSRange>, + _NSRange)>(); +late final _sel_isEqualToAttributedString_ = + objc.registerName("isEqualToAttributedString:"); +final _objc_msgSend_34 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithString_ = objc.registerName("initWithString:"); +final _objc_msgSend_35 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithString_attributes_ = + objc.registerName("initWithString:attributes:"); +final _objc_msgSend_36 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithAttributedString_ = + objc.registerName("initWithAttributedString:"); +final _objc_msgSend_37 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - static NSScriptObjectSpecifier? objectSpecifierWithDescriptor_( - AVFAudio _lib, NSAppleEventDescriptor descriptor) { - final _ret = _lib._objc_msgSend_624(_lib._class_NSScriptObjectSpecifier1, - _lib._sel_objectSpecifierWithDescriptor_1, descriptor._id); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); - } +abstract class NSAttributedStringEnumerationOptions { + static const int NSAttributedStringEnumerationReverse = 2; + static const int + NSAttributedStringEnumerationLongestEffectiveRangeNotRequired = 1048576; +} - NSScriptObjectSpecifier initWithContainerSpecifier_key_( - NSScriptObjectSpecifier container, NSString property) { - final _ret = _lib._objc_msgSend_625( - _id, - _lib._sel_initWithContainerSpecifier_key_1, - container._id, - property._id); - return NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + _NSRange arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, _NSRange, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( + void Function( + ffi.Pointer, _NSRange, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - NSScriptObjectSpecifier - initWithContainerClassDescription_containerSpecifier_key_( - NSScriptClassDescription classDesc, - NSScriptObjectSpecifier? container, - NSString property) { - final _ret = _lib._objc_msgSend_645( - _id, - _lib._sel_initWithContainerClassDescription_containerSpecifier_key_1, - classDesc._id, - container?._id ?? ffi.nullptr, - property._id); - return NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); - NSScriptObjectSpecifier? initWithCoder_(NSCoder inCoder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, inCoder._id); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock_ffiVoid_NSDictionary_NSRange_bool extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSDictionary_NSRange_bool._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); - NSScriptObjectSpecifier? get childSpecifier { - final _ret = _lib._objc_msgSend_632(_id, _lib._sel_childSpecifier1); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSDictionary_NSRange_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSDictionary_NSRange_bool._(pointer, + retain: retain, release: release); } - set childSpecifier(NSScriptObjectSpecifier? value) { - return _lib._objc_msgSend_633( - _id, _lib._sel_setChildSpecifier_1, value?._id ?? ffi.nullptr); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSDictionary_NSRange_bool.fromFunctionPointer( + ffi.Pointer< + ffi + .NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + _NSRange arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - NSScriptObjectSpecifier? get containerSpecifier { - final _ret = _lib._objc_msgSend_632(_id, _lib._sel_containerSpecifier1); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSDictionary_NSRange_bool.fromFunction( + void Function(objc.NSDictionary, _NSRange, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + fn(objc.NSDictionary.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.Pointer? _dartFuncTrampoline; - set containerSpecifier(NSScriptObjectSpecifier? value) { - return _lib._objc_msgSend_633( - _id, _lib._sel_setContainerSpecifier_1, value?._id ?? ffi.nullptr); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSDictionary_NSRange_bool.listener( + void Function(objc.NSDictionary, _NSRange, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + fn(objc.NSDictionary.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>? _dartFuncListenerTrampoline; - bool get containerIsObjectBeingTested { - return _lib._objc_msgSend_12(_id, _lib._sel_containerIsObjectBeingTested1); - } + void call( + objc.NSDictionary arg0, _NSRange arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>()(pointer, arg0.pointer, arg1, arg2); +} + +late final _sel_enumerateAttributesInRange_options_usingBlock_ = + objc.registerName("enumerateAttributesInRange:options:usingBlock:"); +final _objc_msgSend_38 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + _NSRange arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, _NSRange, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_registerClosure( + void Function( + ffi.Pointer, _NSRange, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - set containerIsObjectBeingTested(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setContainerIsObjectBeingTested_1, value); - } +void _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); - bool get containerIsRangeContainerObject { - return _lib._objc_msgSend_12( - _id, _lib._sel_containerIsRangeContainerObject1); - } +class ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); - set containerIsRangeContainerObject(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setContainerIsRangeContainerObject_1, value); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool._(pointer, + retain: retain, release: release); } - NSString get key { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_key1); - return NSString._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + _NSRange arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - set key(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setKey_1, value._id); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool.fromFunction( + void Function(objc.NSObject?, _NSRange, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : objc.NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.Pointer? _dartFuncTrampoline; - NSScriptClassDescription? get containerClassDescription { - final _ret = - _lib._objc_msgSend_628(_id, _lib._sel_containerClassDescription1); - return _ret.address == 0 - ? null - : NSScriptClassDescription._(_ret, _lib, retain: true, release: true); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool.listener( + void Function(objc.NSObject?, _NSRange, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : objc.NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(objc.NSObject? arg0, _NSRange arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr, arg1, arg2); +} + +late final _sel_enumerateAttribute_inRange_options_usingBlock_ = + objc.registerName("enumerateAttribute:inRange:options:usingBlock:"); +final _objc_msgSend_39 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); + +class NSAttributedStringMarkdownParsingOptions extends objc.NSObject { + NSAttributedStringMarkdownParsingOptions._( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSAttributedStringMarkdownParsingOptions] that points to the same underlying object as [other]. + NSAttributedStringMarkdownParsingOptions.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSAttributedStringMarkdownParsingOptions] that wraps the given raw object pointer. + NSAttributedStringMarkdownParsingOptions.castFromPointer( + ffi.Pointer other, + {bool retain = false, + bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSAttributedStringMarkdownParsingOptions]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, + _class_NSAttributedStringMarkdownParsingOptions); } - set containerClassDescription(NSScriptClassDescription? value) { - return _lib._objc_msgSend_647(_id, _lib._sel_setContainerClassDescription_1, - value?._id ?? ffi.nullptr); + @override + NSAttributedStringMarkdownParsingOptions init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: true, release: true); } - NSScriptClassDescription? get keyClassDescription { - final _ret = _lib._objc_msgSend_628(_id, _lib._sel_keyClassDescription1); - return _ret.address == 0 - ? null - : NSScriptClassDescription._(_ret, _lib, retain: true, release: true); + bool get allowsExtendedAttributes { + return _objc_msgSend_7(this.pointer, _sel_allowsExtendedAttributes); } - ffi.Pointer indicesOfObjectsByEvaluatingWithContainer_count_( - NSObject container, ffi.Pointer count) { - return _lib._objc_msgSend_648( - _id, - _lib._sel_indicesOfObjectsByEvaluatingWithContainer_count_1, - container._id, - count); + set allowsExtendedAttributes(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAllowsExtendedAttributes_, value); } - NSObject? objectsByEvaluatingWithContainers_(NSObject containers) { - final _ret = _lib._objc_msgSend_16( - _id, _lib._sel_objectsByEvaluatingWithContainers_1, containers._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + int get interpretedSyntax { + return _objc_msgSend_42(this.pointer, _sel_interpretedSyntax); } - NSObject? get objectsByEvaluatingSpecifier { - final _ret = - _lib._objc_msgSend_17(_id, _lib._sel_objectsByEvaluatingSpecifier1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + set interpretedSyntax(int value) { + return _objc_msgSend_43(this.pointer, _sel_setInterpretedSyntax_, value); } - int get evaluationErrorNumber { - return _lib._objc_msgSend_83(_id, _lib._sel_evaluationErrorNumber1); + int get failurePolicy { + return _objc_msgSend_44(this.pointer, _sel_failurePolicy); } - set evaluationErrorNumber(int value) { - return _lib._objc_msgSend_635( - _id, _lib._sel_setEvaluationErrorNumber_1, value); + set failurePolicy(int value) { + return _objc_msgSend_45(this.pointer, _sel_setFailurePolicy_, value); } - NSScriptObjectSpecifier? get evaluationErrorSpecifier { - final _ret = - _lib._objc_msgSend_632(_id, _lib._sel_evaluationErrorSpecifier1); + objc.NSString? get languageCode { + final _ret = _objc_msgSend_13(this.pointer, _sel_languageCode); return _ret.address == 0 ? null - : NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSAppleEventDescriptor? get descriptor { - final _ret = _lib._objc_msgSend_636(_id, _lib._sel_descriptor1); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + set languageCode(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setLanguageCode_, value?.pointer ?? ffi.nullptr); } - @override - NSScriptObjectSpecifier init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); + bool get appliesSourcePositionAttributes { + return _objc_msgSend_7(this.pointer, _sel_appliesSourcePositionAttributes); + } + + set appliesSourcePositionAttributes(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAppliesSourcePositionAttributes_, value); } - static NSScriptObjectSpecifier new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSScriptObjectSpecifier1, _lib._sel_new1); - return NSScriptObjectSpecifier._(_ret, _lib, retain: false, release: true); + static NSAttributedStringMarkdownParsingOptions new1() { + final _ret = _objc_msgSend_40( + _class_NSAttributedStringMarkdownParsingOptions, _sel_new); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: false, release: true); } - static NSScriptObjectSpecifier allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSScriptObjectSpecifier1, _lib._sel_allocWithZone_1, zone); - return NSScriptObjectSpecifier._(_ret, _lib, retain: false, release: true); + static NSAttributedStringMarkdownParsingOptions allocWithZone_( + ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_allocWithZone_, + zone); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: false, release: true); } - static NSScriptObjectSpecifier alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSScriptObjectSpecifier1, _lib._sel_alloc1); - return NSScriptObjectSpecifier._(_ret, _lib, retain: false, release: true); + static NSAttributedStringMarkdownParsingOptions alloc() { + final _ret = _objc_msgSend_40( + _class_NSAttributedStringMarkdownParsingOptions, _sel_alloc); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSScriptObjectSpecifier1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSScriptObjectSpecifier1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSAttributedStringMarkdownParsingOptions, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSScriptObjectSpecifier1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7(_class_NSAttributedStringMarkdownParsingOptions, + _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSScriptObjectSpecifier1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSAttributedStringMarkdownParsingOptions, + _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSScriptObjectSpecifier1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_keyPathsForValuesAffectingValueForKey_, + key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSScriptObjectSpecifier1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSAttributedStringMarkdownParsingOptions, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSScriptObjectSpecifier1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSAttributedStringMarkdownParsingOptions = + objc.getClass("NSAttributedStringMarkdownParsingOptions"); +late final _sel_init = objc.registerName("init"); +final _objc_msgSend_40 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_allowsExtendedAttributes = + objc.registerName("allowsExtendedAttributes"); +late final _sel_setAllowsExtendedAttributes_ = + objc.registerName("setAllowsExtendedAttributes:"); +final _objc_msgSend_41 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, bool)>(); - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSScriptObjectSpecifier1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } +abstract class NSAttributedStringMarkdownInterpretedSyntax { + static const int NSAttributedStringMarkdownInterpretedSyntaxFull = 0; + static const int NSAttributedStringMarkdownInterpretedSyntaxInlineOnly = 1; + static const int + NSAttributedStringMarkdownInterpretedSyntaxInlineOnlyPreservingWhitespace = + 2; +} - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSScriptObjectSpecifier1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +late final _sel_interpretedSyntax = objc.registerName("interpretedSyntax"); +final _objc_msgSend_42 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setInterpretedSyntax_ = + objc.registerName("setInterpretedSyntax:"); +final _objc_msgSend_43 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); + +abstract class NSAttributedStringMarkdownParsingFailurePolicy { + static const int NSAttributedStringMarkdownParsingFailureReturnError = 0; + static const int + NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible = + 1; } -class NSAppleEventDescriptor extends NSObject { - NSAppleEventDescriptor._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +late final _sel_failurePolicy = objc.registerName("failurePolicy"); +final _objc_msgSend_44 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setFailurePolicy_ = objc.registerName("setFailurePolicy:"); +final _objc_msgSend_45 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_languageCode = objc.registerName("languageCode"); +late final _sel_setLanguageCode_ = objc.registerName("setLanguageCode:"); +final _objc_msgSend_46 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_appliesSourcePositionAttributes = + objc.registerName("appliesSourcePositionAttributes"); +late final _sel_setAppliesSourcePositionAttributes_ = + objc.registerName("setAppliesSourcePositionAttributes:"); +late final _sel_new = objc.registerName("new"); - /// Returns a [NSAppleEventDescriptor] that points to the same underlying object as [other]. - static NSAppleEventDescriptor castFrom(T other) { - return NSAppleEventDescriptor._(other._id, other._lib, - retain: true, release: true); - } +final class _NSZone extends ffi.Opaque {} - /// Returns a [NSAppleEventDescriptor] that wraps the given raw object pointer. - static NSAppleEventDescriptor castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSAppleEventDescriptor._(other, lib, - retain: retain, release: release); - } +late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); +final _objc_msgSend_47 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_NSZone>)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_NSZone>)>(); +late final _sel_alloc = objc.registerName("alloc"); +late final _sel_cancelPreviousPerformRequestsWithTarget_selector_object_ = objc + .registerName("cancelPreviousPerformRequestsWithTarget:selector:object:"); +final _objc_msgSend_48 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_cancelPreviousPerformRequestsWithTarget_ = + objc.registerName("cancelPreviousPerformRequestsWithTarget:"); +final _objc_msgSend_49 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_accessInstanceVariablesDirectly = + objc.registerName("accessInstanceVariablesDirectly"); +late final _sel_useStoredAccessor = objc.registerName("useStoredAccessor"); +late final _sel_keyPathsForValuesAffectingValueForKey_ = + objc.registerName("keyPathsForValuesAffectingValueForKey:"); +final _objc_msgSend_50 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_automaticallyNotifiesObserversForKey_ = + objc.registerName("automaticallyNotifiesObserversForKey:"); +final _objc_msgSend_51 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setKeys_triggerChangeNotificationsForDependentKey_ = + objc.registerName("setKeys:triggerChangeNotificationsForDependentKey:"); +final _objc_msgSend_52 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_classFallbacksForKeyedArchiver = + objc.registerName("classFallbacksForKeyedArchiver"); +late final _sel_classForKeyedUnarchiver = + objc.registerName("classForKeyedUnarchiver"); +final _objc_msgSend_0 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); +late final _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_ = + objc.registerName( + "initWithContentsOfMarkdownFileAtURL:options:baseURL:error:"); +final _objc_msgSend_53 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_initWithMarkdown_options_baseURL_error_ = + objc.registerName("initWithMarkdown:options:baseURL:error:"); +final _objc_msgSend_54 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_initWithMarkdownString_options_baseURL_error_ = + objc.registerName("initWithMarkdownString:options:baseURL:error:"); +final _objc_msgSend_55 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - /// Returns whether [obj] is an instance of [NSAppleEventDescriptor]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSAppleEventDescriptor1); - } +abstract class NSAttributedStringFormattingOptions { + static const int + NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging = 1; + static const int NSAttributedStringFormattingApplyReplacementIndexAttribute = + 2; +} - static NSAppleEventDescriptor nullDescriptor(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_601( - _lib._class_NSAppleEventDescriptor1, _lib._sel_nullDescriptor1); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); - } +late final _sel_initWithFormat_options_locale_ = + objc.registerName("initWithFormat:options:locale:"); +final _objc_msgSend_56 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); - static NSAppleEventDescriptor? descriptorWithDescriptorType_bytes_length_( - AVFAudio _lib, - int descriptorType, - ffi.Pointer bytes, - int byteCount) { - final _ret = _lib._objc_msgSend_602( - _lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithDescriptorType_bytes_length_1, - descriptorType, - bytes, - byteCount); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); +final class __va_list_tag extends ffi.Struct { + @ffi.UnsignedInt() + external int gp_offset; + + @ffi.UnsignedInt() + external int fp_offset; + + external ffi.Pointer overflow_arg_area; + + external ffi.Pointer reg_save_area; +} + +late final _sel_initWithFormat_options_locale_arguments_ = + objc.registerName("initWithFormat:options:locale:arguments:"); +final _objc_msgSend_57 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>(); +late final _sel_localizedAttributedStringWithFormat_ = + objc.registerName("localizedAttributedStringWithFormat:"); +late final _sel_localizedAttributedStringWithFormat_options_ = + objc.registerName("localizedAttributedStringWithFormat:options:"); +final _objc_msgSend_58 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_initWithFormat_options_locale_context_ = + objc.registerName("initWithFormat:options:locale:context:"); +final _objc_msgSend_59 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithFormat_options_locale_context_arguments_ = + objc.registerName("initWithFormat:options:locale:context:arguments:"); +final _objc_msgSend_60 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>(); +late final _sel_localizedAttributedStringWithFormat_context_ = + objc.registerName("localizedAttributedStringWithFormat:context:"); +final _objc_msgSend_61 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_localizedAttributedStringWithFormat_options_context_ = + objc.registerName("localizedAttributedStringWithFormat:options:context:"); +final _objc_msgSend_62 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_attributedStringByInflectingString = + objc.registerName("attributedStringByInflectingString"); +final _objc_msgSend_63 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_localizedAttributedStringForKey_value_table_ = + objc.registerName("localizedAttributedStringForKey:value:table:"); +final _objc_msgSend_64 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_bundleIdentifier = objc.registerName("bundleIdentifier"); +late final _sel_infoDictionary = objc.registerName("infoDictionary"); +final _objc_msgSend_65 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_localizedInfoDictionary = + objc.registerName("localizedInfoDictionary"); +late final _sel_objectForInfoDictionaryKey_ = + objc.registerName("objectForInfoDictionaryKey:"); +late final _sel_classNamed_ = objc.registerName("classNamed:"); +late final _sel_principalClass = objc.registerName("principalClass"); +final _objc_msgSend_66 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_preferredLocalizations = + objc.registerName("preferredLocalizations"); +late final _sel_localizations = objc.registerName("localizations"); +late final _sel_developmentLocalization = + objc.registerName("developmentLocalization"); +late final _sel_preferredLocalizationsFromArray_ = + objc.registerName("preferredLocalizationsFromArray:"); +final _objc_msgSend_67 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_preferredLocalizationsFromArray_forPreferences_ = + objc.registerName("preferredLocalizationsFromArray:forPreferences:"); +final _objc_msgSend_68 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_executableArchitectures = + objc.registerName("executableArchitectures"); +final _objc_msgSend_69 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setPreservationPriority_forTags_ = + objc.registerName("setPreservationPriority:forTags:"); +final _objc_msgSend_70 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer)>(); +late final _sel_preservationPriorityForTag_ = + objc.registerName("preservationPriorityForTag:"); +final _objc_msgSend_71 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_71Fpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class NSMutableAttributedString extends NSAttributedString { + NSMutableAttributedString._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSMutableAttributedString] that points to the same underlying object as [other]. + NSMutableAttributedString.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSMutableAttributedString] that wraps the given raw object pointer. + NSMutableAttributedString.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSMutableAttributedString]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMutableAttributedString); } - static NSAppleEventDescriptor? descriptorWithDescriptorType_data_( - AVFAudio _lib, int descriptorType, NSData? data) { - final _ret = _lib._objc_msgSend_603( - _lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithDescriptorType_data_1, - descriptorType, - data?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void replaceCharactersInRange_withString_(_NSRange range, objc.NSString str) { + _objc_msgSend_72(this.pointer, _sel_replaceCharactersInRange_withString_, + range, str.pointer); } - static NSAppleEventDescriptor descriptorWithBoolean_( - AVFAudio _lib, int boolean) { - final _ret = _lib._objc_msgSend_604(_lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithBoolean_1, boolean); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void setAttributes_range_(objc.NSDictionary? attrs, _NSRange range) { + _objc_msgSend_73(this.pointer, _sel_setAttributes_range_, + attrs?.pointer ?? ffi.nullptr, range); } - static NSAppleEventDescriptor descriptorWithEnumCode_( - AVFAudio _lib, int enumerator) { - final _ret = _lib._objc_msgSend_605(_lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithEnumCode_1, enumerator); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + objc.NSMutableString get mutableString { + final _ret = _objc_msgSend_74(this.pointer, _sel_mutableString); + return objc.NSMutableString.castFromPointer(_ret, + retain: true, release: true); } - static NSAppleEventDescriptor descriptorWithInt32_( - AVFAudio _lib, int signedInt) { - final _ret = _lib._objc_msgSend_606(_lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithInt32_1, signedInt); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void addAttribute_value_range_( + objc.NSString name, objc.NSObject value, _NSRange range) { + _objc_msgSend_75(this.pointer, _sel_addAttribute_value_range_, name.pointer, + value.pointer, range); } - static NSAppleEventDescriptor descriptorWithDouble_( - AVFAudio _lib, double doubleValue) { - final _ret = _lib._objc_msgSend_607(_lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithDouble_1, doubleValue); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void addAttributes_range_(objc.NSDictionary attrs, _NSRange range) { + _objc_msgSend_76( + this.pointer, _sel_addAttributes_range_, attrs.pointer, range); } - static NSAppleEventDescriptor descriptorWithTypeCode_( - AVFAudio _lib, int typeCode) { - final _ret = _lib._objc_msgSend_605(_lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithTypeCode_1, typeCode); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void removeAttribute_range_(objc.NSString name, _NSRange range) { + _objc_msgSend_77( + this.pointer, _sel_removeAttribute_range_, name.pointer, range); } - static NSAppleEventDescriptor descriptorWithString_( - AVFAudio _lib, NSString string) { - final _ret = _lib._objc_msgSend_608(_lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithString_1, string._id); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void replaceCharactersInRange_withAttributedString_( + _NSRange range, NSAttributedString attrString) { + _objc_msgSend_78( + this.pointer, + _sel_replaceCharactersInRange_withAttributedString_, + range, + attrString.pointer); } - static NSAppleEventDescriptor descriptorWithDate_( - AVFAudio _lib, NSDate date) { - final _ret = _lib._objc_msgSend_609(_lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithDate_1, date._id); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void insertAttributedString_atIndex_(NSAttributedString attrString, int loc) { + _objc_msgSend_79(this.pointer, _sel_insertAttributedString_atIndex_, + attrString.pointer, loc); } - static NSAppleEventDescriptor descriptorWithFileURL_( - AVFAudio _lib, NSURL fileURL) { - final _ret = _lib._objc_msgSend_610(_lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithFileURL_1, fileURL._id); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void appendAttributedString_(NSAttributedString attrString) { + _objc_msgSend_80( + this.pointer, _sel_appendAttributedString_, attrString.pointer); } - static NSAppleEventDescriptor - appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_( - AVFAudio _lib, - int eventClass, - int eventID, - NSAppleEventDescriptor? targetDescriptor, - int returnID, - int transactionID) { - final _ret = _lib._objc_msgSend_611( - _lib._class_NSAppleEventDescriptor1, - _lib._sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_1, - eventClass, - eventID, - targetDescriptor?._id ?? ffi.nullptr, - returnID, - transactionID); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void deleteCharactersInRange_(_NSRange range) { + _objc_msgSend_81(this.pointer, _sel_deleteCharactersInRange_, range); } - static NSAppleEventDescriptor listDescriptor(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_601( - _lib._class_NSAppleEventDescriptor1, _lib._sel_listDescriptor1); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void setAttributedString_(NSAttributedString attrString) { + _objc_msgSend_80( + this.pointer, _sel_setAttributedString_, attrString.pointer); } - static NSAppleEventDescriptor recordDescriptor(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_601( - _lib._class_NSAppleEventDescriptor1, _lib._sel_recordDescriptor1); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void beginEditing() { + _objc_msgSend_82(this.pointer, _sel_beginEditing); } - static NSAppleEventDescriptor currentProcessDescriptor(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_601(_lib._class_NSAppleEventDescriptor1, - _lib._sel_currentProcessDescriptor1); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void endEditing() { + _objc_msgSend_82(this.pointer, _sel_endEditing); } - static NSAppleEventDescriptor descriptorWithProcessIdentifier_( - AVFAudio _lib, int processIdentifier) { - final _ret = _lib._objc_msgSend_606(_lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithProcessIdentifier_1, processIdentifier); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void appendLocalizedFormat_(NSAttributedString format) { + _objc_msgSend_80(this.pointer, _sel_appendLocalizedFormat_, format.pointer); } - static NSAppleEventDescriptor descriptorWithBundleIdentifier_( - AVFAudio _lib, NSString bundleIdentifier) { - final _ret = _lib._objc_msgSend_608(_lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithBundleIdentifier_1, bundleIdentifier._id); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + @override + NSMutableAttributedString initWithString_(objc.NSString str) { + final _ret = + _objc_msgSend_35(this.pointer, _sel_initWithString_, str.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSAppleEventDescriptor descriptorWithApplicationURL_( - AVFAudio _lib, NSURL applicationURL) { - final _ret = _lib._objc_msgSend_610(_lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithApplicationURL_1, applicationURL._id); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + @override + NSMutableAttributedString initWithString_attributes_( + objc.NSString str, objc.NSDictionary? attrs) { + final _ret = _objc_msgSend_36(this.pointer, _sel_initWithString_attributes_, + str.pointer, attrs?.pointer ?? ffi.nullptr); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSAppleEventDescriptor initWithAEDescNoCopy_(ffi.Pointer aeDesc) { - final _ret = - _lib._objc_msgSend_612(_id, _lib._sel_initWithAEDescNoCopy_1, aeDesc); - return NSAppleEventDescriptor._(_ret, _lib, retain: false, release: true); + @override + NSMutableAttributedString initWithAttributedString_( + NSAttributedString attrStr) { + final _ret = _objc_msgSend_37( + this.pointer, _sel_initWithAttributedString_, attrStr.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSAppleEventDescriptor? initWithDescriptorType_bytes_length_( - int descriptorType, ffi.Pointer bytes, int byteCount) { - final _ret = _lib._objc_msgSend_613( - _id, - _lib._sel_initWithDescriptorType_bytes_length_1, - descriptorType, - bytes, - byteCount); + @override + NSMutableAttributedString? + initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( + objc.NSURL markdownFile, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_53( + this.pointer, + _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_, + markdownFile.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, + error); return _ret.address == 0 ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + : NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSAppleEventDescriptor? initWithDescriptorType_data_( - int descriptorType, NSData? data) { - final _ret = _lib._objc_msgSend_614( - _id, - _lib._sel_initWithDescriptorType_data_1, - descriptorType, - data?._id ?? ffi.nullptr); + @override + NSMutableAttributedString? initWithMarkdown_options_baseURL_error_( + objc.NSData markdown, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_54( + this.pointer, + _sel_initWithMarkdown_options_baseURL_error_, + markdown.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, + error); return _ret.address == 0 ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); - } - - NSAppleEventDescriptor - initWithEventClass_eventID_targetDescriptor_returnID_transactionID_( - int eventClass, - int eventID, - NSAppleEventDescriptor? targetDescriptor, - int returnID, - int transactionID) { - final _ret = _lib._objc_msgSend_615( - _id, - _lib._sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_1, - eventClass, - eventID, - targetDescriptor?._id ?? ffi.nullptr, - returnID, - transactionID); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); - } - - NSAppleEventDescriptor initListDescriptor() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_initListDescriptor1); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + : NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSAppleEventDescriptor initRecordDescriptor() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_initRecordDescriptor1); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + @override + NSMutableAttributedString? initWithMarkdownString_options_baseURL_error_( + objc.NSString markdownString, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_55( + this.pointer, + _sel_initWithMarkdownString_options_baseURL_error_, + markdownString.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - ffi.Pointer get aeDesc { - return _lib._objc_msgSend_616(_id, _lib._sel_aeDesc1); + @override + NSMutableAttributedString initWithFormat_options_locale_( + NSAttributedString format, int options, objc.NSLocale? locale) { + final _ret = _objc_msgSend_56( + this.pointer, + _sel_initWithFormat_options_locale_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - int get descriptorType { - return _lib._objc_msgSend_214(_id, _lib._sel_descriptorType1); + @override + NSMutableAttributedString initWithFormat_options_locale_arguments_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + ffi.Pointer<__va_list_tag> arguments) { + final _ret = _objc_msgSend_57( + this.pointer, + _sel_initWithFormat_options_locale_arguments_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr, + arguments); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSData get data { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_data1); - return NSData._(_ret, _lib, retain: true, release: true); + static NSMutableAttributedString localizedAttributedStringWithFormat_( + NSAttributedString format) { + final _ret = _objc_msgSend_37(_class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_, format.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - int get booleanValue { - return _lib._objc_msgSend_234(_id, _lib._sel_booleanValue1); + static NSMutableAttributedString localizedAttributedStringWithFormat_options_( + NSAttributedString format, int options) { + final _ret = _objc_msgSend_58( + _class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_options_, + format.pointer, + options); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - int get enumCodeValue { - return _lib._objc_msgSend_214(_id, _lib._sel_enumCodeValue1); + @override + NSMutableAttributedString initWithFormat_options_locale_context_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + objc.NSDictionary context) { + final _ret = _objc_msgSend_59( + this.pointer, + _sel_initWithFormat_options_locale_context_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr, + context.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - int get int32Value { - return _lib._objc_msgSend_237(_id, _lib._sel_int32Value1); + @override + NSMutableAttributedString initWithFormat_options_locale_context_arguments_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + objc.NSDictionary context, + ffi.Pointer<__va_list_tag> arguments) { + final _ret = _objc_msgSend_60( + this.pointer, + _sel_initWithFormat_options_locale_context_arguments_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr, + context.pointer, + arguments); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - double get doubleValue { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_doubleValue1) - : _lib._objc_msgSend_165(_id, _lib._sel_doubleValue1); + static NSMutableAttributedString localizedAttributedStringWithFormat_context_( + NSAttributedString format, objc.NSDictionary context) { + final _ret = _objc_msgSend_61( + _class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_context_, + format.pointer, + context.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - int get typeCodeValue { - return _lib._objc_msgSend_214(_id, _lib._sel_typeCodeValue1); + static NSMutableAttributedString + localizedAttributedStringWithFormat_options_context_( + NSAttributedString format, int options, objc.NSDictionary context) { + final _ret = _objc_msgSend_62( + _class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_options_context_, + format.pointer, + options, + context.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSString? get stringValue { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_stringValue1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + @override + NSMutableAttributedString init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSDate? get dateValue { - final _ret = _lib._objc_msgSend_183(_id, _lib._sel_dateValue1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + static NSMutableAttributedString new1() { + final _ret = _objc_msgSend_40(_class_NSMutableAttributedString, _sel_new); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } - NSURL? get fileURLValue { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_fileURLValue1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static NSMutableAttributedString allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSMutableAttributedString, _sel_allocWithZone_, zone); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } - int get eventClass { - return _lib._objc_msgSend_214(_id, _lib._sel_eventClass1); + static NSMutableAttributedString alloc() { + final _ret = _objc_msgSend_40(_class_NSMutableAttributedString, _sel_alloc); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } - int get eventID { - return _lib._objc_msgSend_214(_id, _lib._sel_eventID1); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSMutableAttributedString, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - int get returnID { - return _lib._objc_msgSend_235(_id, _lib._sel_returnID1); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSMutableAttributedString, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - int get transactionID { - return _lib._objc_msgSend_237(_id, _lib._sel_transactionID1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSMutableAttributedString, _sel_accessInstanceVariablesDirectly); } - void setParamDescriptor_forKeyword_( - NSAppleEventDescriptor descriptor, int keyword) { - _lib._objc_msgSend_617(_id, _lib._sel_setParamDescriptor_forKeyword_1, - descriptor._id, keyword); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSMutableAttributedString, _sel_useStoredAccessor); } - NSAppleEventDescriptor? paramDescriptorForKeyword_(int keyword) { - final _ret = _lib._objc_msgSend_618( - _id, _lib._sel_paramDescriptorForKeyword_1, keyword); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSMutableAttributedString, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - void removeParamDescriptorWithKeyword_(int keyword) { - _lib._objc_msgSend_619( - _id, _lib._sel_removeParamDescriptorWithKeyword_1, keyword); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSMutableAttributedString, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - void setAttributeDescriptor_forKeyword_( - NSAppleEventDescriptor descriptor, int keyword) { - _lib._objc_msgSend_617(_id, _lib._sel_setAttributeDescriptor_forKeyword_1, - descriptor._id, keyword); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSMutableAttributedString, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSMutableAttributedString, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSMutableAttributedString, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSMutableAttributedString = + objc.getClass("NSMutableAttributedString"); +late final _sel_replaceCharactersInRange_withString_ = + objc.registerName("replaceCharactersInRange:withString:"); +final _objc_msgSend_72 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_setAttributes_range_ = + objc.registerName("setAttributes:range:"); +final _objc_msgSend_73 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); +late final _sel_mutableString = objc.registerName("mutableString"); +final _objc_msgSend_74 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_addAttribute_value_range_ = + objc.registerName("addAttribute:value:range:"); +final _objc_msgSend_75 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); +late final _sel_addAttributes_range_ = + objc.registerName("addAttributes:range:"); +final _objc_msgSend_76 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); +late final _sel_removeAttribute_range_ = + objc.registerName("removeAttribute:range:"); +final _objc_msgSend_77 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); +late final _sel_replaceCharactersInRange_withAttributedString_ = + objc.registerName("replaceCharactersInRange:withAttributedString:"); +final _objc_msgSend_78 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_insertAttributedString_atIndex_ = + objc.registerName("insertAttributedString:atIndex:"); +final _objc_msgSend_79 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_appendAttributedString_ = + objc.registerName("appendAttributedString:"); +final _objc_msgSend_80 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_deleteCharactersInRange_ = + objc.registerName("deleteCharactersInRange:"); +final _objc_msgSend_81 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_setAttributedString_ = + objc.registerName("setAttributedString:"); +late final _sel_beginEditing = objc.registerName("beginEditing"); +final _objc_msgSend_82 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_endEditing = objc.registerName("endEditing"); +late final _sel_appendLocalizedFormat_ = + objc.registerName("appendLocalizedFormat:"); - NSAppleEventDescriptor? attributeDescriptorForKeyword_(int keyword) { - final _ret = _lib._objc_msgSend_618( - _id, _lib._sel_attributeDescriptorForKeyword_1, keyword); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); - } +class NSDateFormatter extends NSFormatter { + NSDateFormatter._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSAppleEventDescriptor? sendEventWithOptions_timeout_error_(int sendOptions, - double timeoutInSeconds, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_620( - _id, - _lib._sel_sendEventWithOptions_timeout_error_1, - sendOptions, - timeoutInSeconds, - error); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSDateFormatter] that points to the same underlying object as [other]. + NSDateFormatter.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - bool get isRecordDescriptor { - return _lib._objc_msgSend_12(_id, _lib._sel_isRecordDescriptor1); - } + /// Constructs a [NSDateFormatter] that wraps the given raw object pointer. + NSDateFormatter.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - int get numberOfItems { - return _lib._objc_msgSend_83(_id, _lib._sel_numberOfItems1); + /// Returns whether [obj] is an instance of [NSDateFormatter]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSDateFormatter); } - void insertDescriptor_atIndex_(NSAppleEventDescriptor descriptor, int index) { - _lib._objc_msgSend_621( - _id, _lib._sel_insertDescriptor_atIndex_1, descriptor._id, index); + int get formattingContext { + return _objc_msgSend_89(this.pointer, _sel_formattingContext); } - NSAppleEventDescriptor? descriptorAtIndex_(int index) { - final _ret = - _lib._objc_msgSend_622(_id, _lib._sel_descriptorAtIndex_1, index); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + set formattingContext(int value) { + return _objc_msgSend_90(this.pointer, _sel_setFormattingContext_, value); } - void removeDescriptorAtIndex_(int index) { - _lib._objc_msgSend_423(_id, _lib._sel_removeDescriptorAtIndex_1, index); + bool getObjectValue_forString_range_error_( + ffi.Pointer> obj, + objc.NSString string, + ffi.Pointer<_NSRange> rangep, + ffi.Pointer> error) { + return _objc_msgSend_91( + this.pointer, + _sel_getObjectValue_forString_range_error_, + obj, + string.pointer, + rangep, + error); } - void setDescriptor_forKeyword_( - NSAppleEventDescriptor descriptor, int keyword) { - _lib._objc_msgSend_617( - _id, _lib._sel_setDescriptor_forKeyword_1, descriptor._id, keyword); + objc.NSString stringFromDate_(objc.NSDate date) { + final _ret = + _objc_msgSend_92(this.pointer, _sel_stringFromDate_, date.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSAppleEventDescriptor? descriptorForKeyword_(int keyword) { + objc.NSDate? dateFromString_(objc.NSString string) { final _ret = - _lib._objc_msgSend_618(_id, _lib._sel_descriptorForKeyword_1, keyword); + _objc_msgSend_93(this.pointer, _sel_dateFromString_, string.pointer); return _ret.address == 0 ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); - } - - void removeDescriptorWithKeyword_(int keyword) { - _lib._objc_msgSend_619( - _id, _lib._sel_removeDescriptorWithKeyword_1, keyword); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - int keywordForDescriptorAtIndex_(int index) { - return _lib._objc_msgSend_623( - _id, _lib._sel_keywordForDescriptorAtIndex_1, index); + static objc.NSString localizedStringFromDate_dateStyle_timeStyle_( + objc.NSDate date, int dstyle, int tstyle) { + final _ret = _objc_msgSend_94( + _class_NSDateFormatter, + _sel_localizedStringFromDate_dateStyle_timeStyle_, + date.pointer, + dstyle, + tstyle); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSAppleEventDescriptor? coerceToDescriptorType_(int descriptorType) { - final _ret = _lib._objc_msgSend_618( - _id, _lib._sel_coerceToDescriptorType_1, descriptorType); + static objc.NSString? dateFormatFromTemplate_options_locale_( + objc.NSString tmplate, int opts, objc.NSLocale? locale) { + final _ret = _objc_msgSend_95( + _class_NSDateFormatter, + _sel_dateFormatFromTemplate_options_locale_, + tmplate.pointer, + opts, + locale?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSAppleEventDescriptor init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + static int getDefaultFormatterBehavior() { + return _objc_msgSend_96( + _class_NSDateFormatter, _sel_defaultFormatterBehavior); } - static NSAppleEventDescriptor new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSAppleEventDescriptor1, _lib._sel_new1); - return NSAppleEventDescriptor._(_ret, _lib, retain: false, release: true); + static void setDefaultFormatterBehavior(int value) { + return _objc_msgSend_97( + _class_NSDateFormatter, _sel_setDefaultFormatterBehavior_, value); } - static NSAppleEventDescriptor allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSAppleEventDescriptor1, _lib._sel_allocWithZone_1, zone); - return NSAppleEventDescriptor._(_ret, _lib, retain: false, release: true); + void setLocalizedDateFormatFromTemplate_(objc.NSString dateFormatTemplate) { + _objc_msgSend_98(this.pointer, _sel_setLocalizedDateFormatFromTemplate_, + dateFormatTemplate.pointer); } - static NSAppleEventDescriptor alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSAppleEventDescriptor1, _lib._sel_alloc1); - return NSAppleEventDescriptor._(_ret, _lib, retain: false, release: true); + objc.NSString get dateFormat { + final _ret = _objc_msgSend_12(this.pointer, _sel_dateFormat); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSAppleEventDescriptor1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + set dateFormat(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setDateFormat_, value.pointer); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSAppleEventDescriptor1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + int get dateStyle { + return _objc_msgSend_100(this.pointer, _sel_dateStyle); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSAppleEventDescriptor1, - _lib._sel_accessInstanceVariablesDirectly1); + set dateStyle(int value) { + return _objc_msgSend_101(this.pointer, _sel_setDateStyle_, value); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSAppleEventDescriptor1, _lib._sel_useStoredAccessor1); + int get timeStyle { + return _objc_msgSend_100(this.pointer, _sel_timeStyle); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSAppleEventDescriptor1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + set timeStyle(int value) { + return _objc_msgSend_101(this.pointer, _sel_setTimeStyle_, value); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSAppleEventDescriptor1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + objc.NSLocale get locale { + final _ret = _objc_msgSend_102(this.pointer, _sel_locale); + return objc.NSLocale.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSAppleEventDescriptor1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + set locale(objc.NSLocale value) { + return _objc_msgSend_103(this.pointer, _sel_setLocale_, value.pointer); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSAppleEventDescriptor1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool get generatesCalendarDates { + return _objc_msgSend_7(this.pointer, _sel_generatesCalendarDates); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSAppleEventDescriptor1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + set generatesCalendarDates(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setGeneratesCalendarDates_, value); } -} - -@ffi.Packed(2) -final class AEDesc extends ffi.Struct { - @ffi.UnsignedInt() - external int descriptorType; - - external ffi.Pointer> dataHandle; -} - -final class OpaqueAEDataStorageType extends ffi.Opaque {} -abstract class NSAppleEventSendOptions { - static const int NSAppleEventSendNoReply = 1; - static const int NSAppleEventSendQueueReply = 2; - static const int NSAppleEventSendWaitForReply = 3; - static const int NSAppleEventSendNeverInteract = 16; - static const int NSAppleEventSendCanInteract = 32; - static const int NSAppleEventSendAlwaysInteract = 48; - static const int NSAppleEventSendCanSwitchLayer = 64; - static const int NSAppleEventSendDontRecord = 4096; - static const int NSAppleEventSendDontExecute = 8192; - static const int NSAppleEventSendDontAnnotate = 65536; - static const int NSAppleEventSendDefaultOptions = 35; -} + int get formatterBehavior { + return _objc_msgSend_96(this.pointer, _sel_formatterBehavior); + } -class NSScriptClassDescription extends NSClassDescription { - NSScriptClassDescription._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + set formatterBehavior(int value) { + return _objc_msgSend_97(this.pointer, _sel_setFormatterBehavior_, value); + } - /// Returns a [NSScriptClassDescription] that points to the same underlying object as [other]. - static NSScriptClassDescription castFrom(T other) { - return NSScriptClassDescription._(other._id, other._lib, - retain: true, release: true); + NSTimeZone get timeZone { + final _ret = _objc_msgSend_110(this.pointer, _sel_timeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSScriptClassDescription] that wraps the given raw object pointer. - static NSScriptClassDescription castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSScriptClassDescription._(other, lib, - retain: retain, release: release); + set timeZone(NSTimeZone value) { + return _objc_msgSend_111(this.pointer, _sel_setTimeZone_, value.pointer); } - /// Returns whether [obj] is an instance of [NSScriptClassDescription]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSScriptClassDescription1); + NSCalendar get calendar { + final _ret = _objc_msgSend_121(this.pointer, _sel_calendar); + return NSCalendar.castFromPointer(_ret, retain: true, release: true); } - static NSScriptClassDescription? classDescriptionForClass_( - AVFAudio _lib, NSObject aClass) { - final _ret = _lib._objc_msgSend_626(_lib._class_NSScriptClassDescription1, - _lib._sel_classDescriptionForClass_1, aClass._id); - return _ret.address == 0 - ? null - : NSScriptClassDescription._(_ret, _lib, retain: true, release: true); + set calendar(NSCalendar value) { + return _objc_msgSend_161(this.pointer, _sel_setCalendar_, value.pointer); } - NSScriptClassDescription? initWithSuiteName_className_dictionary_( - NSString suiteName, NSString className, NSDictionary? classDeclaration) { - final _ret = _lib._objc_msgSend_627( - _id, - _lib._sel_initWithSuiteName_className_dictionary_1, - suiteName._id, - className._id, - classDeclaration?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSScriptClassDescription._(_ret, _lib, retain: true, release: true); + bool get lenient { + return _objc_msgSend_7(this.pointer, _sel_isLenient); } - NSString? get suiteName { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_suiteName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + set lenient(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setLenient_, value); } - NSString? get className { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_className1); + objc.NSDate? get twoDigitStartDate { + final _ret = _objc_msgSend_116(this.pointer, _sel_twoDigitStartDate); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - NSString? get implementationClassName { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_implementationClassName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + set twoDigitStartDate(objc.NSDate? value) { + return _objc_msgSend_162(this.pointer, _sel_setTwoDigitStartDate_, + value?.pointer ?? ffi.nullptr); } - NSScriptClassDescription? get superclassDescription { - final _ret = _lib._objc_msgSend_628(_id, _lib._sel_superclassDescription1); + objc.NSDate? get defaultDate { + final _ret = _objc_msgSend_116(this.pointer, _sel_defaultDate); return _ret.address == 0 ? null - : NSScriptClassDescription._(_ret, _lib, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - int get appleEventCode { - return _lib._objc_msgSend_214(_id, _lib._sel_appleEventCode1); + set defaultDate(objc.NSDate? value) { + return _objc_msgSend_162( + this.pointer, _sel_setDefaultDate_, value?.pointer ?? ffi.nullptr); } - bool matchesAppleEventCode_(int appleEventCode) { - return _lib._objc_msgSend_194( - _id, _lib._sel_matchesAppleEventCode_1, appleEventCode); + objc.NSArray get eraSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_eraSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool supportsCommand_(NSScriptCommandDescription commandDescription) { - return _lib._objc_msgSend_641( - _id, _lib._sel_supportsCommand_1, commandDescription._id); + set eraSymbols(objc.NSArray value) { + return _objc_msgSend_163(this.pointer, _sel_setEraSymbols_, value.pointer); } - ffi.Pointer selectorForCommand_( - NSScriptCommandDescription commandDescription) { - return _lib._objc_msgSend_642( - _id, _lib._sel_selectorForCommand_1, commandDescription._id); + objc.NSArray get monthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_monthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString? typeForKey_(NSString key) { - final _ret = _lib._objc_msgSend_186(_id, _lib._sel_typeForKey_1, key._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + set monthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setMonthSymbols_, value.pointer); } - NSScriptClassDescription? classDescriptionForKey_(NSString key) { - final _ret = _lib._objc_msgSend_643( - _id, _lib._sel_classDescriptionForKey_1, key._id); - return _ret.address == 0 - ? null - : NSScriptClassDescription._(_ret, _lib, retain: true, release: true); + objc.NSArray get shortMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int appleEventCodeForKey_(NSString key) { - return _lib._objc_msgSend_629( - _id, _lib._sel_appleEventCodeForKey_1, key._id); + set shortMonthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortMonthSymbols_, value.pointer); } - NSString? keyWithAppleEventCode_(int appleEventCode) { - final _ret = _lib._objc_msgSend_644( - _id, _lib._sel_keyWithAppleEventCode_1, appleEventCode); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + objc.NSArray get weekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_weekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString? get defaultSubcontainerAttributeKey { - final _ret = - _lib._objc_msgSend_44(_id, _lib._sel_defaultSubcontainerAttributeKey1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + set weekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setWeekdaySymbols_, value.pointer); } - bool isLocationRequiredToCreateForKey_(NSString toManyRelationshipKey) { - return _lib._objc_msgSend_64( - _id, - _lib._sel_isLocationRequiredToCreateForKey_1, - toManyRelationshipKey._id); + objc.NSArray get shortWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool hasPropertyForKey_(NSString key) { - return _lib._objc_msgSend_64(_id, _lib._sel_hasPropertyForKey_1, key._id); + set shortWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortWeekdaySymbols_, value.pointer); } - bool hasOrderedToManyRelationshipForKey_(NSString key) { - return _lib._objc_msgSend_64( - _id, _lib._sel_hasOrderedToManyRelationshipForKey_1, key._id); + objc.NSString get AMSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_AMSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool hasReadablePropertyForKey_(NSString key) { - return _lib._objc_msgSend_64( - _id, _lib._sel_hasReadablePropertyForKey_1, key._id); + set AMSymbol(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setAMSymbol_, value.pointer); } - bool hasWritablePropertyForKey_(NSString key) { - return _lib._objc_msgSend_64( - _id, _lib._sel_hasWritablePropertyForKey_1, key._id); + objc.NSString get PMSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_PMSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool isReadOnlyKey_(NSString key) { - return _lib._objc_msgSend_64(_id, _lib._sel_isReadOnlyKey_1, key._id); + set PMSymbol(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setPMSymbol_, value.pointer); } - static void registerClassDescription_forClass_( - AVFAudio _lib, NSClassDescription description, NSObject aClass) { - _lib._objc_msgSend_598( - _lib._class_NSScriptClassDescription1, - _lib._sel_registerClassDescription_forClass_1, - description._id, - aClass._id); + objc.NSArray get longEraSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_longEraSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static void invalidateClassDescriptionCache(AVFAudio _lib) { - _lib._objc_msgSend_1(_lib._class_NSScriptClassDescription1, - _lib._sel_invalidateClassDescriptionCache1); + set longEraSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setLongEraSymbols_, value.pointer); } - @override - NSScriptClassDescription init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSScriptClassDescription._(_ret, _lib, retain: true, release: true); + objc.NSArray get veryShortMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_veryShortMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSScriptClassDescription new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSScriptClassDescription1, _lib._sel_new1); - return NSScriptClassDescription._(_ret, _lib, retain: false, release: true); + set veryShortMonthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setVeryShortMonthSymbols_, value.pointer); } - static NSScriptClassDescription allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSScriptClassDescription1, _lib._sel_allocWithZone_1, zone); - return NSScriptClassDescription._(_ret, _lib, retain: false, release: true); + objc.NSArray get standaloneMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSScriptClassDescription alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSScriptClassDescription1, _lib._sel_alloc1); - return NSScriptClassDescription._(_ret, _lib, retain: false, release: true); + set standaloneMonthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setStandaloneMonthSymbols_, value.pointer); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSScriptClassDescription1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + objc.NSArray get shortStandaloneMonthSymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_shortStandaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSScriptClassDescription1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + set shortStandaloneMonthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortStandaloneMonthSymbols_, value.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSScriptClassDescription1, - _lib._sel_accessInstanceVariablesDirectly1); + objc.NSArray get veryShortStandaloneMonthSymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_veryShortStandaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSScriptClassDescription1, _lib._sel_useStoredAccessor1); + set veryShortStandaloneMonthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setVeryShortStandaloneMonthSymbols_, value.pointer); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSScriptClassDescription1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + objc.NSArray get veryShortWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_veryShortWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSScriptClassDescription1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + set veryShortWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setVeryShortWeekdaySymbols_, value.pointer); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSScriptClassDescription1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray get standaloneWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSScriptClassDescription1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + set standaloneWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setStandaloneWeekdaySymbols_, value.pointer); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSScriptClassDescription1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSArray get shortStandaloneWeekdaySymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_shortStandaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } -} - -class NSScriptCommandDescription extends NSObject { - NSScriptCommandDescription._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSScriptCommandDescription] that points to the same underlying object as [other]. - static NSScriptCommandDescription castFrom(T other) { - return NSScriptCommandDescription._(other._id, other._lib, - retain: true, release: true); + set shortStandaloneWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortStandaloneWeekdaySymbols_, value.pointer); } - /// Returns a [NSScriptCommandDescription] that wraps the given raw object pointer. - static NSScriptCommandDescription castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSScriptCommandDescription._(other, lib, - retain: retain, release: release); + objc.NSArray get veryShortStandaloneWeekdaySymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_veryShortStandaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSScriptCommandDescription]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSScriptCommandDescription1); + set veryShortStandaloneWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163(this.pointer, + _sel_setVeryShortStandaloneWeekdaySymbols_, value.pointer); } - @override - NSObject init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSArray get quarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_quarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSScriptCommandDescription? initWithSuiteName_commandName_dictionary_( - NSString suiteName, - NSString commandName, - NSDictionary? commandDeclaration) { - final _ret = _lib._objc_msgSend_627( - _id, - _lib._sel_initWithSuiteName_commandName_dictionary_1, - suiteName._id, - commandName._id, - commandDeclaration?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSScriptCommandDescription._(_ret, _lib, retain: true, release: true); + set quarterSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setQuarterSymbols_, value.pointer); } - NSScriptCommandDescription? initWithCoder_(NSCoder inCoder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, inCoder._id); - return _ret.address == 0 - ? null - : NSScriptCommandDescription._(_ret, _lib, retain: true, release: true); + objc.NSArray get shortQuarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString get suiteName { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_suiteName1); - return NSString._(_ret, _lib, retain: true, release: true); + set shortQuarterSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortQuarterSymbols_, value.pointer); } - NSString get commandName { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_commandName1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSArray get standaloneQuarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int get appleEventClassCode { - return _lib._objc_msgSend_214(_id, _lib._sel_appleEventClassCode1); + set standaloneQuarterSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setStandaloneQuarterSymbols_, value.pointer); } - int get appleEventCode { - return _lib._objc_msgSend_214(_id, _lib._sel_appleEventCode1); + objc.NSArray get shortStandaloneQuarterSymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_shortStandaloneQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString get commandClassName { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_commandClassName1); - return NSString._(_ret, _lib, retain: true, release: true); + set shortStandaloneQuarterSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortStandaloneQuarterSymbols_, value.pointer); } - NSString? get returnType { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_returnType1); + objc.NSDate? get gregorianStartDate { + final _ret = _objc_msgSend_116(this.pointer, _sel_gregorianStartDate); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - int get appleEventCodeForReturnType { - return _lib._objc_msgSend_214(_id, _lib._sel_appleEventCodeForReturnType1); - } - - NSArray get argumentNames { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_argumentNames1); - return NSArray._(_ret, _lib, retain: true, release: true); + set gregorianStartDate(objc.NSDate? value) { + return _objc_msgSend_162(this.pointer, _sel_setGregorianStartDate_, + value?.pointer ?? ffi.nullptr); } - NSString? typeForArgumentWithName_(NSString argumentName) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_typeForArgumentWithName_1, argumentName._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + bool get doesRelativeDateFormatting { + return _objc_msgSend_7(this.pointer, _sel_doesRelativeDateFormatting); } - int appleEventCodeForArgumentWithName_(NSString argumentName) { - return _lib._objc_msgSend_629( - _id, _lib._sel_appleEventCodeForArgumentWithName_1, argumentName._id); + set doesRelativeDateFormatting(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setDoesRelativeDateFormatting_, value); } - bool isOptionalArgumentWithName_(NSString argumentName) { - return _lib._objc_msgSend_64( - _id, _lib._sel_isOptionalArgumentWithName_1, argumentName._id); + objc.NSObject initWithDateFormat_allowNaturalLanguage_( + objc.NSString format, bool flag) { + final _ret = _objc_msgSend_164(this.pointer, + _sel_initWithDateFormat_allowNaturalLanguage_, format.pointer, flag); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSScriptCommand createCommandInstance() { - final _ret = _lib._objc_msgSend_639(_id, _lib._sel_createCommandInstance1); - return NSScriptCommand._(_ret, _lib, retain: true, release: true); + bool allowsNaturalLanguage() { + return _objc_msgSend_7(this.pointer, _sel_allowsNaturalLanguage); } - NSScriptCommand createCommandInstanceWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_640( - _id, _lib._sel_createCommandInstanceWithZone_1, zone); - return NSScriptCommand._(_ret, _lib, retain: true, release: true); + @override + NSDateFormatter init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSDateFormatter.castFromPointer(_ret, retain: true, release: true); } - static NSScriptCommandDescription new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSScriptCommandDescription1, _lib._sel_new1); - return NSScriptCommandDescription._(_ret, _lib, - retain: false, release: true); + static NSDateFormatter new1() { + final _ret = _objc_msgSend_40(_class_NSDateFormatter, _sel_new); + return NSDateFormatter.castFromPointer(_ret, retain: false, release: true); } - static NSScriptCommandDescription allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3(_lib._class_NSScriptCommandDescription1, - _lib._sel_allocWithZone_1, zone); - return NSScriptCommandDescription._(_ret, _lib, - retain: false, release: true); + static NSDateFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSDateFormatter, _sel_allocWithZone_, zone); + return NSDateFormatter.castFromPointer(_ret, retain: false, release: true); } - static NSScriptCommandDescription alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSScriptCommandDescription1, _lib._sel_alloc1); - return NSScriptCommandDescription._(_ret, _lib, - retain: false, release: true); + static NSDateFormatter alloc() { + final _ret = _objc_msgSend_40(_class_NSDateFormatter, _sel_alloc); + return NSDateFormatter.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSScriptCommandDescription1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSDateFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSScriptCommandDescription1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSDateFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSScriptCommandDescription1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSDateFormatter, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSScriptCommandDescription1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSDateFormatter, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSScriptCommandDescription1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSDateFormatter, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSScriptCommandDescription1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSDateFormatter, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSScriptCommandDescription1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSDateFormatter, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSScriptCommandDescription1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSDateFormatter, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSScriptCommandDescription1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSDateFormatter, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -class NSScriptCommand extends NSObject { - NSScriptCommand._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +late final _class_NSDateFormatter = objc.getClass("NSDateFormatter"); - /// Returns a [NSScriptCommand] that points to the same underlying object as [other]. - static NSScriptCommand castFrom(T other) { - return NSScriptCommand._(other._id, other._lib, - retain: true, release: true); - } +class NSFormatter extends objc.NSObject { + NSFormatter._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSScriptCommand] that wraps the given raw object pointer. - static NSScriptCommand castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSScriptCommand._(other, lib, retain: retain, release: release); - } + /// Constructs a [NSFormatter] that points to the same underlying object as [other]. + NSFormatter.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns whether [obj] is an instance of [NSScriptCommand]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSScriptCommand1); - } + /// Constructs a [NSFormatter] that wraps the given raw object pointer. + NSFormatter.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - NSScriptCommand initWithCommandDescription_( - NSScriptCommandDescription commandDef) { - final _ret = _lib._objc_msgSend_630( - _id, _lib._sel_initWithCommandDescription_1, commandDef._id); - return NSScriptCommand._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSFormatter]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSFormatter); } - NSScriptCommand? initWithCoder_(NSCoder inCoder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, inCoder._id); + objc.NSString? stringForObjectValue_(objc.NSObject? obj) { + final _ret = _objc_msgSend_83( + this.pointer, _sel_stringForObjectValue_, obj?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSScriptCommand._(_ret, _lib, retain: true, release: true); - } - - NSScriptCommandDescription get commandDescription { - final _ret = _lib._objc_msgSend_631(_id, _lib._sel_commandDescription1); - return NSScriptCommandDescription._(_ret, _lib, - retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSObject? get directParameter { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_directParameter1); + NSAttributedString? attributedStringForObjectValue_withDefaultAttributes_( + objc.NSObject obj, objc.NSDictionary? attrs) { + final _ret = _objc_msgSend_84( + this.pointer, + _sel_attributedStringForObjectValue_withDefaultAttributes_, + obj.pointer, + attrs?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - set directParameter(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setDirectParameter_1, value?._id ?? ffi.nullptr); + : NSAttributedString.castFromPointer(_ret, retain: true, release: true); } - NSScriptObjectSpecifier? get receiversSpecifier { - final _ret = _lib._objc_msgSend_632(_id, _lib._sel_receiversSpecifier1); + objc.NSString? editingStringForObjectValue_(objc.NSObject obj) { + final _ret = _objc_msgSend_85( + this.pointer, _sel_editingStringForObjectValue_, obj.pointer); return _ret.address == 0 ? null - : NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set receiversSpecifier(NSScriptObjectSpecifier? value) { - return _lib._objc_msgSend_633( - _id, _lib._sel_setReceiversSpecifier_1, value?._id ?? ffi.nullptr); + bool getObjectValue_forString_errorDescription_( + ffi.Pointer> obj, + objc.NSString string, + ffi.Pointer> error) { + return _objc_msgSend_86( + this.pointer, + _sel_getObjectValue_forString_errorDescription_, + obj, + string.pointer, + error); } - NSObject? get evaluatedReceivers { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_evaluatedReceivers1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + bool isPartialStringValid_newEditingString_errorDescription_( + objc.NSString partialString, + ffi.Pointer> newString, + ffi.Pointer> error) { + return _objc_msgSend_87( + this.pointer, + _sel_isPartialStringValid_newEditingString_errorDescription_, + partialString.pointer, + newString, + error); } - NSDictionary? get arguments { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_arguments1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + bool + isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_( + ffi.Pointer> partialStringPtr, + ffi.Pointer<_NSRange> proposedSelRangePtr, + objc.NSString origString, + _NSRange origSelRange, + ffi.Pointer> error) { + return _objc_msgSend_88( + this.pointer, + _sel_isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_, + partialStringPtr, + proposedSelRangePtr, + origString.pointer, + origSelRange, + error); } - set arguments(NSDictionary? value) { - return _lib._objc_msgSend_634( - _id, _lib._sel_setArguments_1, value?._id ?? ffi.nullptr); + @override + NSFormatter init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSFormatter.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get evaluatedArguments { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_evaluatedArguments1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + static NSFormatter new1() { + final _ret = _objc_msgSend_40(_class_NSFormatter, _sel_new); + return NSFormatter.castFromPointer(_ret, retain: false, release: true); } - bool get wellFormed { - return _lib._objc_msgSend_12(_id, _lib._sel_isWellFormed1); + static NSFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSFormatter, _sel_allocWithZone_, zone); + return NSFormatter.castFromPointer(_ret, retain: false, release: true); } - NSObject? performDefaultImplementation() { - final _ret = - _lib._objc_msgSend_17(_id, _lib._sel_performDefaultImplementation1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + static NSFormatter alloc() { + final _ret = _objc_msgSend_40(_class_NSFormatter, _sel_alloc); + return NSFormatter.castFromPointer(_ret, retain: false, release: true); } - NSObject? executeCommand() { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_executeCommand1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - int get scriptErrorNumber { - return _lib._objc_msgSend_83(_id, _lib._sel_scriptErrorNumber1); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - set scriptErrorNumber(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setScriptErrorNumber_1, value); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSFormatter, _sel_accessInstanceVariablesDirectly); } - NSAppleEventDescriptor? get scriptErrorOffendingObjectDescriptor { - final _ret = _lib._objc_msgSend_636( - _id, _lib._sel_scriptErrorOffendingObjectDescriptor1); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSFormatter, _sel_useStoredAccessor); } - set scriptErrorOffendingObjectDescriptor(NSAppleEventDescriptor? value) { - return _lib._objc_msgSend_637( - _id, - _lib._sel_setScriptErrorOffendingObjectDescriptor_1, - value?._id ?? ffi.nullptr); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSFormatter, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSAppleEventDescriptor? get scriptErrorExpectedTypeDescriptor { - final _ret = _lib._objc_msgSend_636( - _id, _lib._sel_scriptErrorExpectedTypeDescriptor1); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSFormatter, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - set scriptErrorExpectedTypeDescriptor(NSAppleEventDescriptor? value) { - return _lib._objc_msgSend_637( - _id, - _lib._sel_setScriptErrorExpectedTypeDescriptor_1, - value?._id ?? ffi.nullptr); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSFormatter, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSFormatter, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSFormatter, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSFormatter = objc.getClass("NSFormatter"); +late final _sel_stringForObjectValue_ = + objc.registerName("stringForObjectValue:"); +final _objc_msgSend_83 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_attributedStringForObjectValue_withDefaultAttributes_ = + objc.registerName("attributedStringForObjectValue:withDefaultAttributes:"); +final _objc_msgSend_84 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_editingStringForObjectValue_ = + objc.registerName("editingStringForObjectValue:"); +final _objc_msgSend_85 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_getObjectValue_forString_errorDescription_ = + objc.registerName("getObjectValue:forString:errorDescription:"); +final _objc_msgSend_86 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_isPartialStringValid_newEditingString_errorDescription_ = objc + .registerName("isPartialStringValid:newEditingString:errorDescription:"); +final _objc_msgSend_87 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); +late final _sel_isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_ = + objc.registerName( + "isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription:"); +final _objc_msgSend_88 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer<_NSRange>, + ffi.Pointer, + _NSRange, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer<_NSRange>, + ffi.Pointer, + _NSRange, + ffi.Pointer>)>(); + +abstract class NSFormattingContext { + static const int NSFormattingContextUnknown = 0; + static const int NSFormattingContextDynamic = 1; + static const int NSFormattingContextStandalone = 2; + static const int NSFormattingContextListItem = 3; + static const int NSFormattingContextBeginningOfSentence = 4; + static const int NSFormattingContextMiddleOfSentence = 5; +} + +late final _sel_formattingContext = objc.registerName("formattingContext"); +final _objc_msgSend_89 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setFormattingContext_ = + objc.registerName("setFormattingContext:"); +final _objc_msgSend_90 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_getObjectValue_forString_range_error_ = + objc.registerName("getObjectValue:forString:range:error:"); +final _objc_msgSend_91 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer<_NSRange>, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer<_NSRange>, + ffi.Pointer>)>(); +late final _sel_stringFromDate_ = objc.registerName("stringFromDate:"); +final _objc_msgSend_92 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dateFromString_ = objc.registerName("dateFromString:"); +final _objc_msgSend_93 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSDateFormatterStyle { + static const int NSDateFormatterNoStyle = 0; + static const int NSDateFormatterShortStyle = 1; + static const int NSDateFormatterMediumStyle = 2; + static const int NSDateFormatterLongStyle = 3; + static const int NSDateFormatterFullStyle = 4; +} + +late final _sel_localizedStringFromDate_dateStyle_timeStyle_ = + objc.registerName("localizedStringFromDate:dateStyle:timeStyle:"); +final _objc_msgSend_94 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int)>(); +late final _sel_dateFormatFromTemplate_options_locale_ = + objc.registerName("dateFormatFromTemplate:options:locale:"); +final _objc_msgSend_95 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + +abstract class NSDateFormatterBehavior { + static const int NSDateFormatterBehaviorDefault = 0; + static const int NSDateFormatterBehavior10_0 = 1000; + static const int NSDateFormatterBehavior10_4 = 1040; +} + +late final _sel_defaultFormatterBehavior = + objc.registerName("defaultFormatterBehavior"); +final _objc_msgSend_96 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDefaultFormatterBehavior_ = + objc.registerName("setDefaultFormatterBehavior:"); +final _objc_msgSend_97 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setLocalizedDateFormatFromTemplate_ = + objc.registerName("setLocalizedDateFormatFromTemplate:"); +final _objc_msgSend_98 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dateFormat = objc.registerName("dateFormat"); +late final _sel_setDateFormat_ = objc.registerName("setDateFormat:"); +final _objc_msgSend_99 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dateStyle = objc.registerName("dateStyle"); +final _objc_msgSend_100 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDateStyle_ = objc.registerName("setDateStyle:"); +final _objc_msgSend_101 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_timeStyle = objc.registerName("timeStyle"); +late final _sel_setTimeStyle_ = objc.registerName("setTimeStyle:"); +late final _sel_locale = objc.registerName("locale"); +final _objc_msgSend_102 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setLocale_ = objc.registerName("setLocale:"); +final _objc_msgSend_103 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_generatesCalendarDates = + objc.registerName("generatesCalendarDates"); +late final _sel_setGeneratesCalendarDates_ = + objc.registerName("setGeneratesCalendarDates:"); +late final _sel_formatterBehavior = objc.registerName("formatterBehavior"); +late final _sel_setFormatterBehavior_ = + objc.registerName("setFormatterBehavior:"); + +class NSTimeZone extends objc.NSObject { + NSTimeZone._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSTimeZone] that points to the same underlying object as [other]. + NSTimeZone.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSTimeZone] that wraps the given raw object pointer. + NSTimeZone.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSTimeZone]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSTimeZone); } - NSString? get scriptErrorString { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_scriptErrorString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + objc.NSString get name { + final _ret = _objc_msgSend_12(this.pointer, _sel_name); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set scriptErrorString(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setScriptErrorString_1, value?._id ?? ffi.nullptr); + objc.NSData get data { + final _ret = _objc_msgSend_104(this.pointer, _sel_data); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - static NSScriptCommand? currentCommand(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_638( - _lib._class_NSScriptCommand1, _lib._sel_currentCommand1); - return _ret.address == 0 - ? null - : NSScriptCommand._(_ret, _lib, retain: true, release: true); + int secondsFromGMTForDate_(objc.NSDate aDate) { + return _objc_msgSend_105( + this.pointer, _sel_secondsFromGMTForDate_, aDate.pointer); } - NSAppleEventDescriptor? get appleEvent { - final _ret = _lib._objc_msgSend_636(_id, _lib._sel_appleEvent1); + objc.NSString? abbreviationForDate_(objc.NSDate aDate) { + final _ret = _objc_msgSend_106( + this.pointer, _sel_abbreviationForDate_, aDate.pointer); return _ret.address == 0 ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void suspendExecution() { - _lib._objc_msgSend_1(_id, _lib._sel_suspendExecution1); + bool isDaylightSavingTimeForDate_(objc.NSDate aDate) { + return _objc_msgSend_107( + this.pointer, _sel_isDaylightSavingTimeForDate_, aDate.pointer); } - void resumeExecutionWithResult_(NSObject? result) { - _lib._objc_msgSend_289( - _id, _lib._sel_resumeExecutionWithResult_1, result?._id ?? ffi.nullptr); + double daylightSavingTimeOffsetForDate_(objc.NSDate aDate) { + return objc.useMsgSendVariants + ? _objc_msgSend_108Fpret( + this.pointer, _sel_daylightSavingTimeOffsetForDate_, aDate.pointer) + : _objc_msgSend_108( + this.pointer, _sel_daylightSavingTimeOffsetForDate_, aDate.pointer); } - @override - NSScriptCommand init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSScriptCommand._(_ret, _lib, retain: true, release: true); + objc.NSDate? nextDaylightSavingTimeTransitionAfterDate_(objc.NSDate aDate) { + final _ret = _objc_msgSend_109(this.pointer, + _sel_nextDaylightSavingTimeTransitionAfterDate_, aDate.pointer); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - static NSScriptCommand new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSScriptCommand1, _lib._sel_new1); - return NSScriptCommand._(_ret, _lib, retain: false, release: true); + static NSTimeZone getSystemTimeZone() { + final _ret = _objc_msgSend_110(_class_NSTimeZone, _sel_systemTimeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - static NSScriptCommand allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSScriptCommand1, _lib._sel_allocWithZone_1, zone); - return NSScriptCommand._(_ret, _lib, retain: false, release: true); + static void resetSystemTimeZone() { + _objc_msgSend_82(_class_NSTimeZone, _sel_resetSystemTimeZone); } - static NSScriptCommand alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSScriptCommand1, _lib._sel_alloc1); - return NSScriptCommand._(_ret, _lib, retain: false, release: true); + static NSTimeZone getDefaultTimeZone() { + final _ret = _objc_msgSend_110(_class_NSTimeZone, _sel_defaultTimeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSScriptCommand1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static void setDefaultTimeZone(NSTimeZone value) { + return _objc_msgSend_111( + _class_NSTimeZone, _sel_setDefaultTimeZone_, value.pointer); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSScriptCommand1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static NSTimeZone getLocalTimeZone() { + final _ret = _objc_msgSend_110(_class_NSTimeZone, _sel_localTimeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSScriptCommand1, - _lib._sel_accessInstanceVariablesDirectly1); + static objc.NSArray getKnownTimeZoneNames() { + final _ret = _objc_msgSend_6(_class_NSTimeZone, _sel_knownTimeZoneNames); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSScriptCommand1, _lib._sel_useStoredAccessor1); + static objc.NSDictionary getAbbreviationDictionary() { + final _ret = + _objc_msgSend_112(_class_NSTimeZone, _sel_abbreviationDictionary); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSScriptCommand1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static void setAbbreviationDictionary(objc.NSDictionary value) { + return _objc_msgSend_113( + _class_NSTimeZone, _sel_setAbbreviationDictionary_, value.pointer); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSScriptCommand1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static objc.NSString getTimeZoneDataVersion() { + final _ret = _objc_msgSend_12(_class_NSTimeZone, _sel_timeZoneDataVersion); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSScriptCommand1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + int get secondsFromGMT { + return _objc_msgSend_114(this.pointer, _sel_secondsFromGMT); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSScriptCommand1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSString? get abbreviation { + final _ret = _objc_msgSend_13(this.pointer, _sel_abbreviation); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSScriptCommand1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + bool get daylightSavingTime { + return _objc_msgSend_7(this.pointer, _sel_isDaylightSavingTime); } -} - -class NSItemProvider extends NSObject { - NSItemProvider._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSItemProvider] that points to the same underlying object as [other]. - static NSItemProvider castFrom(T other) { - return NSItemProvider._(other._id, other._lib, retain: true, release: true); + double get daylightSavingTimeOffset { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_daylightSavingTimeOffset) + : _objc_msgSend_115(this.pointer, _sel_daylightSavingTimeOffset); } - /// Returns a [NSItemProvider] that wraps the given raw object pointer. - static NSItemProvider castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSItemProvider._(other, lib, retain: retain, release: release); + objc.NSDate? get nextDaylightSavingTimeTransition { + final _ret = + _objc_msgSend_116(this.pointer, _sel_nextDaylightSavingTimeTransition); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// 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); + objc.NSString get description { + final _ret = _objc_msgSend_12(this.pointer, _sel_description); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSItemProvider init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSItemProvider._(_ret, _lib, retain: true, release: true); - } - - void registerDataRepresentationForTypeIdentifier_visibility_loadHandler_( - NSString typeIdentifier, - int visibility, - ObjCBlock_NSProgress_ffiVoidNSDataNSError loadHandler) { - _lib._objc_msgSend_673( - _id, - _lib._sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1, - typeIdentifier._id, - visibility, - loadHandler._id); - } - - void - registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_( - NSString typeIdentifier, - int fileOptions, - int visibility, - ObjCBlock_NSProgress_ffiVoidNSURLboolNSError loadHandler) { - _lib._objc_msgSend_674( - _id, - _lib._sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1, - typeIdentifier._id, - fileOptions, - visibility, - loadHandler._id); - } - - NSArray get registeredTypeIdentifiers { - final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_registeredTypeIdentifiers1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool isEqualToTimeZone_(NSTimeZone aTimeZone) { + return _objc_msgSend_117( + this.pointer, _sel_isEqualToTimeZone_, aTimeZone.pointer); } - NSArray registeredTypeIdentifiersWithFileOptions_(int fileOptions) { - final _ret = _lib._objc_msgSend_675( - _id, _lib._sel_registeredTypeIdentifiersWithFileOptions_1, fileOptions); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSString? localizedName_locale_(int style, objc.NSLocale? locale) { + final _ret = _objc_msgSend_118(this.pointer, _sel_localizedName_locale_, + style, locale?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool hasItemConformingToTypeIdentifier_(NSString typeIdentifier) { - return _lib._objc_msgSend_64( - _id, _lib._sel_hasItemConformingToTypeIdentifier_1, typeIdentifier._id); + static NSTimeZone? timeZoneWithName_(objc.NSString tzName) { + final _ret = _objc_msgSend_2( + _class_NSTimeZone, _sel_timeZoneWithName_, tzName.pointer); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - bool hasRepresentationConformingToTypeIdentifier_fileOptions_( - NSString typeIdentifier, int fileOptions) { - return _lib._objc_msgSend_676( - _id, - _lib._sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1, - typeIdentifier._id, - fileOptions); + static NSTimeZone? timeZoneWithName_data_( + objc.NSString tzName, objc.NSData? aData) { + final _ret = _objc_msgSend_119( + _class_NSTimeZone, + _sel_timeZoneWithName_data_, + tzName.pointer, + aData?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - NSProgress loadDataRepresentationForTypeIdentifier_completionHandler_( - NSString typeIdentifier, - ObjCBlock_ffiVoid_NSData_NSError completionHandler) { - final _ret = _lib._objc_msgSend_677( - _id, - _lib._sel_loadDataRepresentationForTypeIdentifier_completionHandler_1, - typeIdentifier._id, - completionHandler._id); - return NSProgress._(_ret, _lib, retain: true, release: true); + NSTimeZone? initWithName_(objc.NSString tzName) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_initWithName_, tzName.pointer); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - NSProgress loadFileRepresentationForTypeIdentifier_completionHandler_( - NSString typeIdentifier, - ObjCBlock_ffiVoid_NSURL_NSError completionHandler) { - final _ret = _lib._objc_msgSend_678( - _id, - _lib._sel_loadFileRepresentationForTypeIdentifier_completionHandler_1, - typeIdentifier._id, - completionHandler._id); - return NSProgress._(_ret, _lib, retain: true, release: true); + NSTimeZone? initWithName_data_(objc.NSString tzName, objc.NSData? aData) { + final _ret = _objc_msgSend_119(this.pointer, _sel_initWithName_data_, + tzName.pointer, aData?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - NSProgress loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_( - NSString typeIdentifier, - ObjCBlock_ffiVoid_NSURL_bool_NSError completionHandler) { - final _ret = _lib._objc_msgSend_679( - _id, - _lib._sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1, - typeIdentifier._id, - completionHandler._id); - return NSProgress._(_ret, _lib, retain: true, release: true); + static NSTimeZone timeZoneForSecondsFromGMT_(int seconds) { + final _ret = _objc_msgSend_120( + _class_NSTimeZone, _sel_timeZoneForSecondsFromGMT_, seconds); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - NSString? get suggestedName { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_suggestedName1); + static NSTimeZone? timeZoneWithAbbreviation_(objc.NSString abbreviation) { + final _ret = _objc_msgSend_2(_class_NSTimeZone, + _sel_timeZoneWithAbbreviation_, abbreviation.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - set suggestedName(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setSuggestedName_1, value?._id ?? ffi.nullptr); + @override + NSTimeZone init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - NSItemProvider initWithObject_(NSObject object) { - final _ret = - _lib._objc_msgSend_124(_id, _lib._sel_initWithObject_1, object._id); - return NSItemProvider._(_ret, _lib, retain: true, release: true); + static NSTimeZone new1() { + final _ret = _objc_msgSend_40(_class_NSTimeZone, _sel_new); + return NSTimeZone.castFromPointer(_ret, retain: false, release: true); } - void registerObject_visibility_(NSObject object, int visibility) { - _lib._objc_msgSend_680( - _id, _lib._sel_registerObject_visibility_1, object._id, visibility); + static NSTimeZone allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSTimeZone, _sel_allocWithZone_, zone); + return NSTimeZone.castFromPointer(_ret, retain: false, release: true); } - void registerObjectOfClass_visibility_loadHandler_( - NSObject aClass, - int visibility, - ObjCBlock_NSProgress_ffiVoidObjCObjectNSError loadHandler) { - _lib._objc_msgSend_681( - _id, - _lib._sel_registerObjectOfClass_visibility_loadHandler_1, - aClass._id, - visibility, - loadHandler._id); + static NSTimeZone alloc() { + final _ret = _objc_msgSend_40(_class_NSTimeZone, _sel_alloc); + return NSTimeZone.castFromPointer(_ret, retain: false, release: true); } - bool canLoadObjectOfClass_(NSObject aClass) { - return _lib._objc_msgSend_0( - _id, _lib._sel_canLoadObjectOfClass_1, aClass._id); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSTimeZone, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSProgress loadObjectOfClass_completionHandler_( - NSObject aClass, ObjCBlock_ffiVoid_ObjCObject_NSError completionHandler) { - final _ret = _lib._objc_msgSend_682( - _id, - _lib._sel_loadObjectOfClass_completionHandler_1, - aClass._id, - completionHandler._id); - return NSProgress._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSTimeZone, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSItemProvider initWithItem_typeIdentifier_( - NSObject? item, NSString? typeIdentifier) { - final _ret = _lib._objc_msgSend_683( - _id, - _lib._sel_initWithItem_typeIdentifier_1, - item?._id ?? ffi.nullptr, - typeIdentifier?._id ?? ffi.nullptr); - return NSItemProvider._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSTimeZone, _sel_accessInstanceVariablesDirectly); } - NSItemProvider? initWithContentsOfURL_(NSURL fileURL) { - final _ret = _lib._objc_msgSend_277( - _id, _lib._sel_initWithContentsOfURL_1, fileURL._id); - return _ret.address == 0 - ? null - : NSItemProvider._(_ret, _lib, retain: true, release: true); - } - - void registerItemForTypeIdentifier_loadHandler_( - NSString typeIdentifier, - ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary - loadHandler) { - _lib._objc_msgSend_684( - _id, - _lib._sel_registerItemForTypeIdentifier_loadHandler_1, - typeIdentifier._id, - loadHandler._id); - } - - void loadItemForTypeIdentifier_options_completionHandler_( - NSString typeIdentifier, - NSDictionary? options, - ObjCBlock_ffiVoid_ObjCObject_NSError1? completionHandler) { - _lib._objc_msgSend_685( - _id, - _lib._sel_loadItemForTypeIdentifier_options_completionHandler_1, - typeIdentifier._id, - options?._id ?? ffi.nullptr, - completionHandler?._id ?? ffi.nullptr); - } - - ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary? - get previewImageHandler { - final _ret = _lib._objc_msgSend_686(_id, _lib._sel_previewImageHandler1); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary._( - _ret, _lib, - retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSTimeZone, _sel_useStoredAccessor); } - set previewImageHandler( - ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary? - value) { - return _lib._objc_msgSend_687( - _id, _lib._sel_setPreviewImageHandler_1, value?._id ?? ffi.nullptr); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSTimeZone, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - void loadPreviewImageWithOptions_completionHandler_(NSDictionary options, - ObjCBlock_ffiVoid_ObjCObject_NSError1 completionHandler) { - _lib._objc_msgSend_688( - _id, - _lib._sel_loadPreviewImageWithOptions_completionHandler_1, - options._id, - completionHandler._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSTimeZone, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static NSItemProvider new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSItemProvider1, _lib._sel_new1); - return NSItemProvider._(_ret, _lib, retain: false, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSTimeZone, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSTimeZone, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSTimeZone, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSTimeZone = objc.getClass("NSTimeZone"); +late final _sel_name = objc.registerName("name"); +late final _sel_data = objc.registerName("data"); +final _objc_msgSend_104 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_secondsFromGMTForDate_ = + objc.registerName("secondsFromGMTForDate:"); +final _objc_msgSend_105 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_abbreviationForDate_ = + objc.registerName("abbreviationForDate:"); +final _objc_msgSend_106 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isDaylightSavingTimeForDate_ = + objc.registerName("isDaylightSavingTimeForDate:"); +final _objc_msgSend_107 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_daylightSavingTimeOffsetForDate_ = + objc.registerName("daylightSavingTimeOffsetForDate:"); +final _objc_msgSend_108 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_108Fpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_nextDaylightSavingTimeTransitionAfterDate_ = + objc.registerName("nextDaylightSavingTimeTransitionAfterDate:"); +final _objc_msgSend_109 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_systemTimeZone = objc.registerName("systemTimeZone"); +final _objc_msgSend_110 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_resetSystemTimeZone = objc.registerName("resetSystemTimeZone"); +late final _sel_defaultTimeZone = objc.registerName("defaultTimeZone"); +late final _sel_setDefaultTimeZone_ = objc.registerName("setDefaultTimeZone:"); +final _objc_msgSend_111 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_localTimeZone = objc.registerName("localTimeZone"); +late final _sel_knownTimeZoneNames = objc.registerName("knownTimeZoneNames"); +late final _sel_abbreviationDictionary = + objc.registerName("abbreviationDictionary"); +final _objc_msgSend_112 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setAbbreviationDictionary_ = + objc.registerName("setAbbreviationDictionary:"); +final _objc_msgSend_113 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_timeZoneDataVersion = objc.registerName("timeZoneDataVersion"); +late final _sel_secondsFromGMT = objc.registerName("secondsFromGMT"); +final _objc_msgSend_114 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_abbreviation = objc.registerName("abbreviation"); +late final _sel_isDaylightSavingTime = + objc.registerName("isDaylightSavingTime"); +late final _sel_daylightSavingTimeOffset = + objc.registerName("daylightSavingTimeOffset"); +final _objc_msgSend_115 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_115Fpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_nextDaylightSavingTimeTransition = + objc.registerName("nextDaylightSavingTimeTransition"); +final _objc_msgSend_116 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_description = objc.registerName("description"); +late final _sel_isEqualToTimeZone_ = objc.registerName("isEqualToTimeZone:"); +final _objc_msgSend_117 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSTimeZoneNameStyle { + static const int NSTimeZoneNameStyleStandard = 0; + static const int NSTimeZoneNameStyleShortStandard = 1; + static const int NSTimeZoneNameStyleDaylightSaving = 2; + static const int NSTimeZoneNameStyleShortDaylightSaving = 3; + static const int NSTimeZoneNameStyleGeneric = 4; + static const int NSTimeZoneNameStyleShortGeneric = 5; +} + +late final _sel_localizedName_locale_ = + objc.registerName("localizedName:locale:"); +final _objc_msgSend_118 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_timeZoneWithName_ = objc.registerName("timeZoneWithName:"); +late final _sel_timeZoneWithName_data_ = + objc.registerName("timeZoneWithName:data:"); +final _objc_msgSend_119 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithName_ = objc.registerName("initWithName:"); +late final _sel_initWithName_data_ = objc.registerName("initWithName:data:"); +late final _sel_timeZoneForSecondsFromGMT_ = + objc.registerName("timeZoneForSecondsFromGMT:"); +final _objc_msgSend_120 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_timeZoneWithAbbreviation_ = + objc.registerName("timeZoneWithAbbreviation:"); +late final _sel_timeZone = objc.registerName("timeZone"); +late final _sel_setTimeZone_ = objc.registerName("setTimeZone:"); + +class NSCalendar extends objc.NSObject { + NSCalendar._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSCalendar] that points to the same underlying object as [other]. + NSCalendar.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSCalendar] that wraps the given raw object pointer. + NSCalendar.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSCalendar]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSCalendar); } - static NSItemProvider allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSItemProvider1, _lib._sel_allocWithZone_1, zone); - return NSItemProvider._(_ret, _lib, retain: false, release: true); + static NSCalendar getCurrentCalendar() { + final _ret = _objc_msgSend_121(_class_NSCalendar, _sel_currentCalendar); + return NSCalendar.castFromPointer(_ret, retain: true, release: true); } - static NSItemProvider alloc(AVFAudio _lib) { + static NSCalendar getAutoupdatingCurrentCalendar() { final _ret = - _lib._objc_msgSend_2(_lib._class_NSItemProvider1, _lib._sel_alloc1); - return NSItemProvider._(_ret, _lib, retain: false, release: true); + _objc_msgSend_121(_class_NSCalendar, _sel_autoupdatingCurrentCalendar); + return NSCalendar.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSItemProvider1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static NSCalendar? calendarWithIdentifier_( + objc.NSString calendarIdentifierConstant) { + final _ret = _objc_msgSend_122(_class_NSCalendar, + _sel_calendarWithIdentifier_, calendarIdentifierConstant.pointer); + return _ret.address == 0 + ? null + : NSCalendar.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSItemProvider1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + @override + NSCalendar init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSCalendar.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSItemProvider1, - _lib._sel_accessInstanceVariablesDirectly1); + objc.NSObject? initWithCalendarIdentifier_(objc.NSString ident) { + final _ret = _objc_msgSend_2( + this.pointer, _sel_initWithCalendarIdentifier_, ident.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSItemProvider1, _lib._sel_useStoredAccessor1); + objc.NSString get calendarIdentifier { + final _ret = _objc_msgSend_12(this.pointer, _sel_calendarIdentifier); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSItemProvider1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + objc.NSLocale? get locale { + final _ret = _objc_msgSend_123(this.pointer, _sel_locale); + return _ret.address == 0 + ? null + : objc.NSLocale.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSItemProvider1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + set locale(objc.NSLocale? value) { + return _objc_msgSend_124( + this.pointer, _sel_setLocale_, value?.pointer ?? ffi.nullptr); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSItemProvider1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + NSTimeZone get timeZone { + final _ret = _objc_msgSend_110(this.pointer, _sel_timeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSItemProvider1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + set timeZone(NSTimeZone value) { + return _objc_msgSend_111(this.pointer, _sel_setTimeZone_, value.pointer); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSItemProvider1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + int get firstWeekday { + return _objc_msgSend_29(this.pointer, _sel_firstWeekday); } -} - -abstract class NSItemProviderRepresentationVisibility { - static const int NSItemProviderRepresentationVisibilityAll = 0; - static const int NSItemProviderRepresentationVisibilityTeam = 1; - static const int NSItemProviderRepresentationVisibilityGroup = 2; - static const int NSItemProviderRepresentationVisibilityOwnProcess = 3; -} - -ffi.Pointer< - ObjCObject> _ObjCBlock_NSProgress_ffiVoidNSDataNSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock>)>()(arg0); -final _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry = - Function(ffi.Pointer<_ObjCBlock>)>{}; -int _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_registerClosure( - ffi.Pointer Function(ffi.Pointer<_ObjCBlock>) fn) { - final id = ++_ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistryIndex; - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry[ - block.ref.target.address]!(arg0); -class ObjCBlock_NSProgress_ffiVoidNSDataNSError extends _ObjCBlockBase { - ObjCBlock_NSProgress_ffiVoidNSDataNSError._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_NSProgress_ffiVoidNSDataNSError castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_NSProgress_ffiVoidNSDataNSError._(pointer, lib, - retain: retain, release: release); + set firstWeekday(int value) { + return _objc_msgSend_125(this.pointer, _sel_setFirstWeekday_, value); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSProgress_ffiVoidNSDataNSError.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSProgress_ffiVoidNSDataNSError.fromFunction( - AVFAudio lib, NSProgress? Function(ObjCBlock_ffiVoid_NSData_NSError) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureTrampoline) - .cast(), - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_registerClosure( - (ffi.Pointer<_ObjCBlock> arg0) => - fn(ObjCBlock_ffiVoid_NSData_NSError._(arg0, lib, retain: true, release: true)) - ?.retainAndReturnPointer() ?? - ffi.nullptr)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - NSProgress? call(ObjCBlock_ffiVoid_NSData_NSError arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>() - (_id, arg0._id) - .address == - 0 - ? null - : NSProgress._( - _id.ref.invoke - .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>()(_id, arg0._id), - _lib, - retain: false, - release: true); -} - -class NSProgress extends NSObject { - NSProgress._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + int get minimumDaysInFirstWeek { + return _objc_msgSend_29(this.pointer, _sel_minimumDaysInFirstWeek); + } - /// 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); + set minimumDaysInFirstWeek(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMinimumDaysInFirstWeek_, value); } - /// Returns a [NSProgress] that wraps the given raw object pointer. - static NSProgress castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSProgress._(other, lib, retain: retain, release: release); + objc.NSArray get eraSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_eraSymbols); + return objc.NSArray.castFromPointer(_ret, 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); + objc.NSArray get longEraSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_longEraSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSProgress? currentProgress(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_659( - _lib._class_NSProgress1, _lib._sel_currentProgress1); - return _ret.address == 0 - ? null - : NSProgress._(_ret, _lib, retain: true, release: true); + objc.NSArray get monthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_monthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSProgress progressWithTotalUnitCount_(AVFAudio _lib, int unitCount) { - final _ret = _lib._objc_msgSend_660(_lib._class_NSProgress1, - _lib._sel_progressWithTotalUnitCount_1, unitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); + objc.NSArray get shortMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSProgress discreteProgressWithTotalUnitCount_( - AVFAudio _lib, int unitCount) { - final _ret = _lib._objc_msgSend_660(_lib._class_NSProgress1, - _lib._sel_discreteProgressWithTotalUnitCount_1, unitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); + objc.NSArray get veryShortMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_veryShortMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( - AVFAudio _lib, - int unitCount, - NSProgress parent, - int portionOfParentTotalUnitCount) { - final _ret = _lib._objc_msgSend_661( - _lib._class_NSProgress1, - _lib._sel_progressWithTotalUnitCount_parent_pendingUnitCount_1, - unitCount, - parent._id, - portionOfParentTotalUnitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); + objc.NSArray get standaloneMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSProgress initWithParent_userInfo_( - NSProgress? parentProgressOrNil, NSObject? userInfoOrNil) { - final _ret = _lib._objc_msgSend_662( - _id, - _lib._sel_initWithParent_userInfo_1, - parentProgressOrNil?._id ?? ffi.nullptr, - userInfoOrNil?._id ?? ffi.nullptr); - return NSProgress._(_ret, _lib, retain: true, release: true); + objc.NSArray get shortStandaloneMonthSymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_shortStandaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void becomeCurrentWithPendingUnitCount_(int unitCount) { - _lib._objc_msgSend_663( - _id, _lib._sel_becomeCurrentWithPendingUnitCount_1, unitCount); + objc.NSArray get veryShortStandaloneMonthSymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_veryShortStandaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void performAsCurrentWithPendingUnitCount_usingBlock_( - int unitCount, ObjCBlock_ffiVoid work) { - _lib._objc_msgSend_664( - _id, - _lib._sel_performAsCurrentWithPendingUnitCount_usingBlock_1, - unitCount, - work._id); + objc.NSArray get weekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_weekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void resignCurrent() { - _lib._objc_msgSend_1(_id, _lib._sel_resignCurrent1); + objc.NSArray get shortWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void addChild_withPendingUnitCount_(NSProgress child, int inUnitCount) { - _lib._objc_msgSend_665( - _id, _lib._sel_addChild_withPendingUnitCount_1, child._id, inUnitCount); + objc.NSArray get veryShortWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_veryShortWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int get totalUnitCount { - return _lib._objc_msgSend_666(_id, _lib._sel_totalUnitCount1); + objc.NSArray get standaloneWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set totalUnitCount(int value) { - return _lib._objc_msgSend_667(_id, _lib._sel_setTotalUnitCount_1, value); + objc.NSArray get shortStandaloneWeekdaySymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_shortStandaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int get completedUnitCount { - return _lib._objc_msgSend_666(_id, _lib._sel_completedUnitCount1); + objc.NSArray get veryShortStandaloneWeekdaySymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_veryShortStandaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set completedUnitCount(int value) { - return _lib._objc_msgSend_667( - _id, _lib._sel_setCompletedUnitCount_1, value); + objc.NSArray get quarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_quarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString get localizedDescription { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_localizedDescription1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSArray get shortQuarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set localizedDescription(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setLocalizedDescription_1, value._id); + objc.NSArray get standaloneQuarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString get localizedAdditionalDescription { + objc.NSArray get shortStandaloneQuarterSymbols { final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_localizedAdditionalDescription1); - return NSString._(_ret, _lib, retain: true, release: true); + _objc_msgSend_6(this.pointer, _sel_shortStandaloneQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set localizedAdditionalDescription(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setLocalizedAdditionalDescription_1, value._id); + objc.NSString get AMSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_AMSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool get cancellable { - return _lib._objc_msgSend_12(_id, _lib._sel_isCancellable1); + objc.NSString get PMSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_PMSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set cancellable(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setCancellable_1, value); + void minimumRangeOfUnit_(ffi.Pointer<_NSRange> stret, int unit) { + objc.useMsgSendVariants + ? _objc_msgSend_126Stret( + stret, this.pointer, _sel_minimumRangeOfUnit_, unit) + : stret.ref = + _objc_msgSend_126(this.pointer, _sel_minimumRangeOfUnit_, unit); } - bool get pausable { - return _lib._objc_msgSend_12(_id, _lib._sel_isPausable1); + void maximumRangeOfUnit_(ffi.Pointer<_NSRange> stret, int unit) { + objc.useMsgSendVariants + ? _objc_msgSend_126Stret( + stret, this.pointer, _sel_maximumRangeOfUnit_, unit) + : stret.ref = + _objc_msgSend_126(this.pointer, _sel_maximumRangeOfUnit_, unit); } - set pausable(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setPausable_1, value); + void rangeOfUnit_inUnit_forDate_( + ffi.Pointer<_NSRange> stret, int smaller, int larger, objc.NSDate date) { + objc.useMsgSendVariants + ? _objc_msgSend_127Stret(stret, this.pointer, + _sel_rangeOfUnit_inUnit_forDate_, smaller, larger, date.pointer) + : stret.ref = _objc_msgSend_127(this.pointer, + _sel_rangeOfUnit_inUnit_forDate_, smaller, larger, date.pointer); } - bool get cancelled { - return _lib._objc_msgSend_12(_id, _lib._sel_isCancelled1); + int ordinalityOfUnit_inUnit_forDate_( + int smaller, int larger, objc.NSDate date) { + return _objc_msgSend_128(this.pointer, + _sel_ordinalityOfUnit_inUnit_forDate_, smaller, larger, date.pointer); } - bool get paused { - return _lib._objc_msgSend_12(_id, _lib._sel_isPaused1); + bool rangeOfUnit_startDate_interval_forDate_( + int unit, + ffi.Pointer> datep, + ffi.Pointer tip, + objc.NSDate date) { + return _objc_msgSend_129( + this.pointer, + _sel_rangeOfUnit_startDate_interval_forDate_, + unit, + datep, + tip, + date.pointer); } - ObjCBlock_ffiVoid? get cancellationHandler { - final _ret = _lib._objc_msgSend_668(_id, _lib._sel_cancellationHandler1); + objc.NSDate? dateFromComponents_(NSDateComponents comps) { + final _ret = _objc_msgSend_139( + this.pointer, _sel_dateFromComponents_, comps.pointer); return _ret.address == 0 ? null - : ObjCBlock_ffiVoid._(_ret, _lib, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - set cancellationHandler(ObjCBlock_ffiVoid? value) { - return _lib._objc_msgSend_669( - _id, _lib._sel_setCancellationHandler_1, value?._id ?? ffi.nullptr); + NSDateComponents components_fromDate_(int unitFlags, objc.NSDate date) { + final _ret = _objc_msgSend_140( + this.pointer, _sel_components_fromDate_, unitFlags, date.pointer); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } - ObjCBlock_ffiVoid? get pausingHandler { - final _ret = _lib._objc_msgSend_668(_id, _lib._sel_pausingHandler1); + objc.NSDate? dateByAddingComponents_toDate_options_( + NSDateComponents comps, objc.NSDate date, int opts) { + final _ret = _objc_msgSend_141( + this.pointer, + _sel_dateByAddingComponents_toDate_options_, + comps.pointer, + date.pointer, + opts); return _ret.address == 0 ? null - : ObjCBlock_ffiVoid._(_ret, _lib, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - set pausingHandler(ObjCBlock_ffiVoid? value) { - return _lib._objc_msgSend_669( - _id, _lib._sel_setPausingHandler_1, value?._id ?? ffi.nullptr); + NSDateComponents components_fromDate_toDate_options_(int unitFlags, + objc.NSDate startingDate, objc.NSDate resultDate, int opts) { + final _ret = _objc_msgSend_142( + this.pointer, + _sel_components_fromDate_toDate_options_, + unitFlags, + startingDate.pointer, + resultDate.pointer, + opts); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } - ObjCBlock_ffiVoid? get resumingHandler { - final _ret = _lib._objc_msgSend_668(_id, _lib._sel_resumingHandler1); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid._(_ret, _lib, retain: true, release: true); + void getEra_year_month_day_fromDate_( + ffi.Pointer eraValuePointer, + ffi.Pointer yearValuePointer, + ffi.Pointer monthValuePointer, + ffi.Pointer dayValuePointer, + objc.NSDate date) { + _objc_msgSend_143( + this.pointer, + _sel_getEra_year_month_day_fromDate_, + eraValuePointer, + yearValuePointer, + monthValuePointer, + dayValuePointer, + date.pointer); } - set resumingHandler(ObjCBlock_ffiVoid? value) { - return _lib._objc_msgSend_669( - _id, _lib._sel_setResumingHandler_1, value?._id ?? ffi.nullptr); + void getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_( + ffi.Pointer eraValuePointer, + ffi.Pointer yearValuePointer, + ffi.Pointer weekValuePointer, + ffi.Pointer weekdayValuePointer, + objc.NSDate date) { + _objc_msgSend_143( + this.pointer, + _sel_getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_, + eraValuePointer, + yearValuePointer, + weekValuePointer, + weekdayValuePointer, + date.pointer); } - void setUserInfoObject_forKey_(NSObject? objectOrNil, NSString key) { - _lib._objc_msgSend_135(_id, _lib._sel_setUserInfoObject_forKey_1, - objectOrNil?._id ?? ffi.nullptr, key._id); + void getHour_minute_second_nanosecond_fromDate_( + ffi.Pointer hourValuePointer, + ffi.Pointer minuteValuePointer, + ffi.Pointer secondValuePointer, + ffi.Pointer nanosecondValuePointer, + objc.NSDate date) { + _objc_msgSend_143( + this.pointer, + _sel_getHour_minute_second_nanosecond_fromDate_, + hourValuePointer, + minuteValuePointer, + secondValuePointer, + nanosecondValuePointer, + date.pointer); } - bool get indeterminate { - return _lib._objc_msgSend_12(_id, _lib._sel_isIndeterminate1); + int component_fromDate_(int unit, objc.NSDate date) { + return _objc_msgSend_144( + this.pointer, _sel_component_fromDate_, unit, date.pointer); } - double get fractionCompleted { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_fractionCompleted1) - : _lib._objc_msgSend_165(_id, _lib._sel_fractionCompleted1); + objc.NSDate? dateWithEra_year_month_day_hour_minute_second_nanosecond_( + int eraValue, + int yearValue, + int monthValue, + int dayValue, + int hourValue, + int minuteValue, + int secondValue, + int nanosecondValue) { + final _ret = _objc_msgSend_145( + this.pointer, + _sel_dateWithEra_year_month_day_hour_minute_second_nanosecond_, + eraValue, + yearValue, + monthValue, + dayValue, + hourValue, + minuteValue, + secondValue, + nanosecondValue); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - bool get finished { - return _lib._objc_msgSend_12(_id, _lib._sel_isFinished1); + objc.NSDate? + dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_( + int eraValue, + int yearValue, + int weekValue, + int weekdayValue, + int hourValue, + int minuteValue, + int secondValue, + int nanosecondValue) { + final _ret = _objc_msgSend_145( + this.pointer, + _sel_dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_, + eraValue, + yearValue, + weekValue, + weekdayValue, + hourValue, + minuteValue, + secondValue, + nanosecondValue); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - void cancel() { - _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + objc.NSDate startOfDayForDate_(objc.NSDate date) { + final _ret = + _objc_msgSend_146(this.pointer, _sel_startOfDayForDate_, date.pointer); + return objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - void pause() { - _lib._objc_msgSend_1(_id, _lib._sel_pause1); + NSDateComponents componentsInTimeZone_fromDate_( + NSTimeZone timezone, objc.NSDate date) { + final _ret = _objc_msgSend_147(this.pointer, + _sel_componentsInTimeZone_fromDate_, timezone.pointer, date.pointer); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } - void resume() { - _lib._objc_msgSend_1(_id, _lib._sel_resume1); + int compareDate_toDate_toUnitGranularity_( + objc.NSDate date1, objc.NSDate date2, int unit) { + return _objc_msgSend_148( + this.pointer, + _sel_compareDate_toDate_toUnitGranularity_, + date1.pointer, + date2.pointer, + unit); } - NSObject get userInfo { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_userInfo1); - return NSObject._(_ret, _lib, retain: true, release: true); + bool isDate_equalToDate_toUnitGranularity_( + objc.NSDate date1, objc.NSDate date2, int unit) { + return _objc_msgSend_149( + this.pointer, + _sel_isDate_equalToDate_toUnitGranularity_, + date1.pointer, + date2.pointer, + unit); } - NSString? get kind { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_kind1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + bool isDate_inSameDayAsDate_(objc.NSDate date1, objc.NSDate date2) { + return _objc_msgSend_150(this.pointer, _sel_isDate_inSameDayAsDate_, + date1.pointer, date2.pointer); } - set kind(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setKind_1, value?._id ?? ffi.nullptr); + bool isDateInToday_(objc.NSDate date) { + return _objc_msgSend_107(this.pointer, _sel_isDateInToday_, date.pointer); } - NSNumber? get estimatedTimeRemaining { - final _ret = _lib._objc_msgSend_215(_id, _lib._sel_estimatedTimeRemaining1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + bool isDateInYesterday_(objc.NSDate date) { + return _objc_msgSend_107( + this.pointer, _sel_isDateInYesterday_, date.pointer); } - set estimatedTimeRemaining(NSNumber? value) { - return _lib._objc_msgSend_670( - _id, _lib._sel_setEstimatedTimeRemaining_1, value?._id ?? ffi.nullptr); + bool isDateInTomorrow_(objc.NSDate date) { + return _objc_msgSend_107( + this.pointer, _sel_isDateInTomorrow_, date.pointer); } - NSNumber? get throughput { - final _ret = _lib._objc_msgSend_215(_id, _lib._sel_throughput1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + bool isDateInWeekend_(objc.NSDate date) { + return _objc_msgSend_107(this.pointer, _sel_isDateInWeekend_, date.pointer); } - set throughput(NSNumber? value) { - return _lib._objc_msgSend_670( - _id, _lib._sel_setThroughput_1, value?._id ?? ffi.nullptr); + bool rangeOfWeekendStartDate_interval_containingDate_( + ffi.Pointer> datep, + ffi.Pointer tip, + objc.NSDate date) { + return _objc_msgSend_151( + this.pointer, + _sel_rangeOfWeekendStartDate_interval_containingDate_, + datep, + tip, + date.pointer); } - NSString? get fileOperationKind { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_fileOperationKind1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + bool nextWeekendStartDate_interval_options_afterDate_( + ffi.Pointer> datep, + ffi.Pointer tip, + int options, + objc.NSDate date) { + return _objc_msgSend_152( + this.pointer, + _sel_nextWeekendStartDate_interval_options_afterDate_, + datep, + tip, + options, + date.pointer); } - set fileOperationKind(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setFileOperationKind_1, value?._id ?? ffi.nullptr); + NSDateComponents components_fromDateComponents_toDateComponents_options_( + int unitFlags, + NSDateComponents startingDateComp, + NSDateComponents resultDateComp, + int options) { + final _ret = _objc_msgSend_153( + this.pointer, + _sel_components_fromDateComponents_toDateComponents_options_, + unitFlags, + startingDateComp.pointer, + resultDateComp.pointer, + options); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } - NSURL? get fileURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_fileURL1); + objc.NSDate? dateByAddingUnit_value_toDate_options_( + int unit, int value, objc.NSDate date, int options) { + final _ret = _objc_msgSend_154( + this.pointer, + _sel_dateByAddingUnit_value_toDate_options_, + unit, + value, + date.pointer, + options); return _ret.address == 0 ? null - : NSURL._(_ret, _lib, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - set fileURL(NSURL? value) { - return _lib._objc_msgSend_671( - _id, _lib._sel_setFileURL_1, value?._id ?? ffi.nullptr); + void enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_( + objc.NSDate start, + NSDateComponents comps, + int opts, + ObjCBlock_ffiVoid_NSDate_bool_bool block) { + _objc_msgSend_155( + this.pointer, + _sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_, + start.pointer, + comps.pointer, + opts, + block.pointer); } - NSNumber? get fileTotalCount { - final _ret = _lib._objc_msgSend_215(_id, _lib._sel_fileTotalCount1); + objc.NSDate? nextDateAfterDate_matchingComponents_options_( + objc.NSDate date, NSDateComponents comps, int options) { + final _ret = _objc_msgSend_156( + this.pointer, + _sel_nextDateAfterDate_matchingComponents_options_, + date.pointer, + comps.pointer, + options); return _ret.address == 0 ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } - - set fileTotalCount(NSNumber? value) { - return _lib._objc_msgSend_670( - _id, _lib._sel_setFileTotalCount_1, value?._id ?? ffi.nullptr); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - NSNumber? get fileCompletedCount { - final _ret = _lib._objc_msgSend_215(_id, _lib._sel_fileCompletedCount1); + objc.NSDate? nextDateAfterDate_matchingUnit_value_options_( + objc.NSDate date, int unit, int value, int options) { + final _ret = _objc_msgSend_157( + this.pointer, + _sel_nextDateAfterDate_matchingUnit_value_options_, + date.pointer, + unit, + value, + options); return _ret.address == 0 ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } - - set fileCompletedCount(NSNumber? value) { - return _lib._objc_msgSend_670( - _id, _lib._sel_setFileCompletedCount_1, value?._id ?? ffi.nullptr); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - void publish() { - _lib._objc_msgSend_1(_id, _lib._sel_publish1); - } - - void unpublish() { - _lib._objc_msgSend_1(_id, _lib._sel_unpublish1); - } - - static NSObject addSubscriberForFileURL_withPublishingHandler_(AVFAudio _lib, - NSURL url, ObjCBlock_ffiVoid_NSProgress publishingHandler) { - final _ret = _lib._objc_msgSend_672( - _lib._class_NSProgress1, - _lib._sel_addSubscriberForFileURL_withPublishingHandler_1, - url._id, - publishingHandler._id); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSDate? nextDateAfterDate_matchingHour_minute_second_options_( + objc.NSDate date, + int hourValue, + int minuteValue, + int secondValue, + int options) { + final _ret = _objc_msgSend_158( + this.pointer, + _sel_nextDateAfterDate_matchingHour_minute_second_options_, + date.pointer, + hourValue, + minuteValue, + secondValue, + options); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - static void removeSubscriber_(AVFAudio _lib, NSObject subscriber) { - _lib._objc_msgSend_15( - _lib._class_NSProgress1, _lib._sel_removeSubscriber_1, subscriber._id); + objc.NSDate? dateBySettingUnit_value_ofDate_options_( + int unit, int v, objc.NSDate date, int opts) { + final _ret = _objc_msgSend_154( + this.pointer, + _sel_dateBySettingUnit_value_ofDate_options_, + unit, + v, + date.pointer, + opts); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - bool get old { - return _lib._objc_msgSend_12(_id, _lib._sel_isOld1); + objc.NSDate? dateBySettingHour_minute_second_ofDate_options_( + int h, int m, int s, objc.NSDate date, int opts) { + final _ret = _objc_msgSend_159( + this.pointer, + _sel_dateBySettingHour_minute_second_ofDate_options_, + h, + m, + s, + date.pointer, + opts); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - @override - NSProgress init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSProgress._(_ret, _lib, retain: true, release: true); + bool date_matchesComponents_(objc.NSDate date, NSDateComponents components) { + return _objc_msgSend_160(this.pointer, _sel_date_matchesComponents_, + date.pointer, components.pointer); } - static NSProgress new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_new1); - return NSProgress._(_ret, _lib, retain: false, release: true); + static NSCalendar new1() { + final _ret = _objc_msgSend_40(_class_NSCalendar, _sel_new); + return NSCalendar.castFromPointer(_ret, retain: false, release: true); } - static NSProgress allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSProgress1, _lib._sel_allocWithZone_1, zone); - return NSProgress._(_ret, _lib, retain: false, release: true); + static NSCalendar allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSCalendar, _sel_allocWithZone_, zone); + return NSCalendar.castFromPointer(_ret, retain: false, release: true); } - static NSProgress alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_alloc1); - return NSProgress._(_ret, _lib, retain: false, release: true); + static NSCalendar alloc() { + final _ret = _objc_msgSend_40(_class_NSCalendar, _sel_alloc); + return NSCalendar.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSProgress1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSCalendar, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSProgress1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSCalendar, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSProgress1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSCalendar, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSProgress1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSCalendar, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSProgress1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSCalendar, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSProgress1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSCalendar, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSProgress1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSProgress1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSCalendar, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSCalendar, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSCalendar, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSCalendar = objc.getClass("NSCalendar"); +late final _sel_currentCalendar = objc.registerName("currentCalendar"); +final _objc_msgSend_121 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_autoupdatingCurrentCalendar = + objc.registerName("autoupdatingCurrentCalendar"); +late final _sel_calendarWithIdentifier_ = + objc.registerName("calendarWithIdentifier:"); +final _objc_msgSend_122 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithCalendarIdentifier_ = + objc.registerName("initWithCalendarIdentifier:"); +late final _sel_calendarIdentifier = objc.registerName("calendarIdentifier"); +final _objc_msgSend_123 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_124 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_firstWeekday = objc.registerName("firstWeekday"); +late final _sel_setFirstWeekday_ = objc.registerName("setFirstWeekday:"); +final _objc_msgSend_125 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_minimumDaysInFirstWeek = + objc.registerName("minimumDaysInFirstWeek"); +late final _sel_setMinimumDaysInFirstWeek_ = + objc.registerName("setMinimumDaysInFirstWeek:"); +late final _sel_eraSymbols = objc.registerName("eraSymbols"); +late final _sel_longEraSymbols = objc.registerName("longEraSymbols"); +late final _sel_monthSymbols = objc.registerName("monthSymbols"); +late final _sel_shortMonthSymbols = objc.registerName("shortMonthSymbols"); +late final _sel_veryShortMonthSymbols = + objc.registerName("veryShortMonthSymbols"); +late final _sel_standaloneMonthSymbols = + objc.registerName("standaloneMonthSymbols"); +late final _sel_shortStandaloneMonthSymbols = + objc.registerName("shortStandaloneMonthSymbols"); +late final _sel_veryShortStandaloneMonthSymbols = + objc.registerName("veryShortStandaloneMonthSymbols"); +late final _sel_weekdaySymbols = objc.registerName("weekdaySymbols"); +late final _sel_shortWeekdaySymbols = objc.registerName("shortWeekdaySymbols"); +late final _sel_veryShortWeekdaySymbols = + objc.registerName("veryShortWeekdaySymbols"); +late final _sel_standaloneWeekdaySymbols = + objc.registerName("standaloneWeekdaySymbols"); +late final _sel_shortStandaloneWeekdaySymbols = + objc.registerName("shortStandaloneWeekdaySymbols"); +late final _sel_veryShortStandaloneWeekdaySymbols = + objc.registerName("veryShortStandaloneWeekdaySymbols"); +late final _sel_quarterSymbols = objc.registerName("quarterSymbols"); +late final _sel_shortQuarterSymbols = objc.registerName("shortQuarterSymbols"); +late final _sel_standaloneQuarterSymbols = + objc.registerName("standaloneQuarterSymbols"); +late final _sel_shortStandaloneQuarterSymbols = + objc.registerName("shortStandaloneQuarterSymbols"); +late final _sel_AMSymbol = objc.registerName("AMSymbol"); +late final _sel_PMSymbol = objc.registerName("PMSymbol"); - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSProgress1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +abstract class NSCalendarUnit { + static const int NSCalendarUnitEra = 2; + static const int NSCalendarUnitYear = 4; + static const int NSCalendarUnitMonth = 8; + static const int NSCalendarUnitDay = 16; + static const int NSCalendarUnitHour = 32; + static const int NSCalendarUnitMinute = 64; + static const int NSCalendarUnitSecond = 128; + static const int NSCalendarUnitWeekday = 512; + static const int NSCalendarUnitWeekdayOrdinal = 1024; + static const int NSCalendarUnitQuarter = 2048; + static const int NSCalendarUnitWeekOfMonth = 4096; + static const int NSCalendarUnitWeekOfYear = 8192; + static const int NSCalendarUnitYearForWeekOfYear = 16384; + static const int NSCalendarUnitNanosecond = 32768; + static const int NSCalendarUnitCalendar = 1048576; + static const int NSCalendarUnitTimeZone = 2097152; + static const int NSEraCalendarUnit = 2; + static const int NSYearCalendarUnit = 4; + static const int NSMonthCalendarUnit = 8; + static const int NSDayCalendarUnit = 16; + static const int NSHourCalendarUnit = 32; + static const int NSMinuteCalendarUnit = 64; + static const int NSSecondCalendarUnit = 128; + static const int NSWeekCalendarUnit = 256; + static const int NSWeekdayCalendarUnit = 512; + static const int NSWeekdayOrdinalCalendarUnit = 1024; + static const int NSQuarterCalendarUnit = 2048; + static const int NSWeekOfMonthCalendarUnit = 4096; + static const int NSWeekOfYearCalendarUnit = 8192; + static const int NSYearForWeekOfYearCalendarUnit = 16384; + static const int NSCalendarCalendarUnit = 1048576; + static const int NSTimeZoneCalendarUnit = 2097152; } -ffi.Pointer<_ObjCBlock> _ObjCBlock_ffiVoid_NSProgress_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer<_ObjCBlock> Function(ffi.Pointer)>()(arg0); -final _ObjCBlock_ffiVoid_NSProgress_closureRegistry = - Function(ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSProgress_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSProgress_registerClosure( - ffi.Pointer<_ObjCBlock> Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSProgress_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSProgress_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +late final _sel_minimumRangeOfUnit_ = objc.registerName("minimumRangeOfUnit:"); +final _objc_msgSend_126 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_126Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_maximumRangeOfUnit_ = objc.registerName("maximumRangeOfUnit:"); +late final _sel_rangeOfUnit_inUnit_forDate_ = + objc.registerName("rangeOfUnit:inUnit:forDate:"); +final _objc_msgSend_127 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); +final _objc_msgSend_127Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); +late final _sel_ordinalityOfUnit_inUnit_forDate_ = + objc.registerName("ordinalityOfUnit:inUnit:forDate:"); +final _objc_msgSend_128 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); +late final _sel_rangeOfUnit_startDate_interval_forDate_ = + objc.registerName("rangeOfUnit:startDate:interval:forDate:"); +final _objc_msgSend_129 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>(); + +class NSDateComponents extends objc.NSObject { + NSDateComponents._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); -ffi.Pointer<_ObjCBlock> _ObjCBlock_ffiVoid_NSProgress_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSProgress_closureRegistry[block.ref.target.address]!( - arg0); + /// Constructs a [NSDateComponents] that points to the same underlying object as [other]. + NSDateComponents.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); -class ObjCBlock_ffiVoid_NSProgress extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSProgress._(ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + /// Constructs a [NSDateComponents] that wraps the given raw object pointer. + NSDateComponents.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSProgress castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSProgress._(pointer, lib, - retain: retain, release: release); + /// Returns whether [obj] is an instance of [NSDateComponents]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSDateComponents); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSProgress.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSProgress_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSProgress.fromFunction( - AVFAudio lib, ObjCBlock_ffiVoid? Function(NSProgress) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSProgress_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSProgress_registerClosure( - (ffi.Pointer arg0) => - fn(NSProgress._(arg0, lib, retain: true, release: true)) - ?.retainAndReturnPointer() ?? - ffi.nullptr)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - ObjCBlock_ffiVoid? call(NSProgress arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>() - (_id, arg0._id) - .address == - 0 - ? null - : ObjCBlock_ffiVoid._( - _id.ref.invoke - .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>()(_id, arg0._id), - _lib, - retain: false, - release: true); -} - -void _ObjCBlock_ffiVoid_NSData_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSData_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSData_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_NSData_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSData_NSError._(ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSData_NSError castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSData_NSError._(pointer, lib, - retain: retain, release: release); + NSCalendar? get calendar { + final _ret = _objc_msgSend_130(this.pointer, _sel_calendar); + return _ret.address == 0 + ? null + : NSCalendar.castFromPointer(_ret, retain: true, release: true); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSData_NSError.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + set calendar(NSCalendar? value) { + return _objc_msgSend_131( + this.pointer, _sel_setCalendar_, value?.pointer ?? ffi.nullptr); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSData_NSError.fromFunction( - AVFAudio lib, void Function(NSData?, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSData._(arg0, lib, retain: true, release: true), - arg1.address == 0 - ? null - : NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + NSTimeZone? get timeZone { + final _ret = _objc_msgSend_132(this.pointer, _sel_timeZone); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSData_NSError.listener( - AVFAudio lib, void Function(NSData?, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSData._(arg0, lib, retain: true, release: true), - arg1.address == 0 - ? null - : NSError._(arg1, lib, - retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + set timeZone(NSTimeZone? value) { + return _objc_msgSend_133( + this.pointer, _sel_setTimeZone_, value?.pointer ?? ffi.nullptr); + } - void call(NSData? arg0, NSError? arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); -} + int get era { + return _objc_msgSend_114(this.pointer, _sel_era); + } -abstract class NSItemProviderFileOptions { - static const int NSItemProviderFileOptionOpenInPlace = 1; -} + set era(int value) { + return _objc_msgSend_134(this.pointer, _sel_setEra_, value); + } -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>)>()(arg0); -final _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry = - Function(ffi.Pointer<_ObjCBlock>)>{}; -int _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_registerClosure( - ffi.Pointer Function(ffi.Pointer<_ObjCBlock>) fn) { - final id = - ++_ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistryIndex; - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + int get year { + return _objc_msgSend_114(this.pointer, _sel_year); + } -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry[ - block.ref.target.address]!(arg0); + set year(int value) { + return _objc_msgSend_134(this.pointer, _sel_setYear_, value); + } -class ObjCBlock_NSProgress_ffiVoidNSURLboolNSError extends _ObjCBlockBase { - ObjCBlock_NSProgress_ffiVoidNSURLboolNSError._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + int get month { + return _objc_msgSend_114(this.pointer, _sel_month); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_NSProgress_ffiVoidNSURLboolNSError castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_NSProgress_ffiVoidNSURLboolNSError._(pointer, lib, - retain: retain, release: release); + set month(int value) { + return _objc_msgSend_134(this.pointer, _sel_setMonth_, value); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSProgress_ffiVoidNSURLboolNSError.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + int get day { + return _objc_msgSend_114(this.pointer, _sel_day); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSProgress_ffiVoidNSURLboolNSError.fromFunction(AVFAudio lib, - NSProgress? Function(ObjCBlock_ffiVoid_NSURL_bool_NSError) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureTrampoline) - .cast(), - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_registerClosure( - (ffi.Pointer<_ObjCBlock> arg0) => - fn(ObjCBlock_ffiVoid_NSURL_bool_NSError._(arg0, lib, retain: true, release: true)) - ?.retainAndReturnPointer() ?? - ffi.nullptr)), - lib); - static ffi.Pointer? _dartFuncTrampoline; + set day(int value) { + return _objc_msgSend_134(this.pointer, _sel_setDay_, value); + } - NSProgress? call(ObjCBlock_ffiVoid_NSURL_bool_NSError arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>() - (_id, arg0._id) - .address == - 0 - ? null - : NSProgress._( - _id.ref.invoke - .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>()(_id, arg0._id), - _lib, - retain: false, - release: true); -} + int get hour { + return _objc_msgSend_114(this.pointer, _sel_hour); + } -void _ObjCBlock_ffiVoid_NSURL_bool_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, bool, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry = , bool, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( - void Function(ffi.Pointer, bool, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + set hour(int value) { + return _objc_msgSend_134(this.pointer, _sel_setHour_, value); + } -void _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); + int get minute { + return _objc_msgSend_114(this.pointer, _sel_minute); + } -class ObjCBlock_ffiVoid_NSURL_bool_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSURL_bool_NSError._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + set minute(int value) { + return _objc_msgSend_134(this.pointer, _sel_setMinute_, value); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSURL_bool_NSError castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSURL_bool_NSError._(pointer, lib, - retain: retain, release: release); + int get second { + return _objc_msgSend_114(this.pointer, _sel_second); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURL_bool_NSError.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_bool_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + set second(int value) { + return _objc_msgSend_134(this.pointer, _sel_setSecond_, value); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURL_bool_NSError.fromFunction( - AVFAudio lib, void Function(NSURL?, bool, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Bool, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( - (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn( - arg0.address == 0 - ? null - : NSURL._(arg0, lib, retain: true, release: true), - arg1, - arg2.address == 0 - ? null - : NSError._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + int get nanosecond { + return _objc_msgSend_114(this.pointer, _sel_nanosecond); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSURL_bool_NSError.listener( - AVFAudio lib, void Function(NSURL?, bool, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Bool, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( - (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn( - arg0.address == 0 - ? null - : NSURL._(arg0, lib, retain: true, release: true), - arg1, - arg2.address == 0 - ? null - : NSError._(arg2, lib, - retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Bool, ffi.Pointer)>? _dartFuncListenerTrampoline; + set nanosecond(int value) { + return _objc_msgSend_134(this.pointer, _sel_setNanosecond_, value); + } - void call(NSURL? arg0, bool arg1, NSError? arg2) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - bool, ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1, arg2?._id ?? ffi.nullptr); -} + int get weekday { + return _objc_msgSend_114(this.pointer, _sel_weekday); + } -void _ObjCBlock_ffiVoid_NSURL_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSURL_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + set weekday(int value) { + return _objc_msgSend_134(this.pointer, _sel_setWeekday_, value); + } -void _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry[block.ref.target.address]!( - arg0, arg1); + int get weekdayOrdinal { + return _objc_msgSend_114(this.pointer, _sel_weekdayOrdinal); + } -class ObjCBlock_ffiVoid_NSURL_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSURL_NSError._(ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + set weekdayOrdinal(int value) { + return _objc_msgSend_134(this.pointer, _sel_setWeekdayOrdinal_, value); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSURL_NSError castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSURL_NSError._(pointer, lib, - retain: retain, release: release); + int get quarter { + return _objc_msgSend_114(this.pointer, _sel_quarter); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURL_NSError.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + set quarter(int value) { + return _objc_msgSend_134(this.pointer, _sel_setQuarter_, value); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURL_NSError.fromFunction( - AVFAudio lib, void Function(NSURL?, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSURL._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + int get weekOfMonth { + return _objc_msgSend_114(this.pointer, _sel_weekOfMonth); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSURL_NSError.listener( - AVFAudio lib, void Function(NSURL?, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSURL._(arg0, lib, retain: true, release: true), - arg1.address == 0 - ? null - : NSError._(arg1, lib, - retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + set weekOfMonth(int value) { + return _objc_msgSend_134(this.pointer, _sel_setWeekOfMonth_, value); + } - void call(NSURL? arg0, NSError? arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); -} + int get weekOfYear { + return _objc_msgSend_114(this.pointer, _sel_weekOfYear); + } -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>)>()(arg0); -final _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistry = - Function(ffi.Pointer<_ObjCBlock>)>{}; -int _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_registerClosure( - ffi.Pointer Function(ffi.Pointer<_ObjCBlock>) fn) { - final id = - ++_ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistryIndex; - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + set weekOfYear(int value) { + return _objc_msgSend_134(this.pointer, _sel_setWeekOfYear_, value); + } -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistry[ - block.ref.target.address]!(arg0); + int get yearForWeekOfYear { + return _objc_msgSend_114(this.pointer, _sel_yearForWeekOfYear); + } -class ObjCBlock_NSProgress_ffiVoidObjCObjectNSError extends _ObjCBlockBase { - ObjCBlock_NSProgress_ffiVoidObjCObjectNSError._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + set yearForWeekOfYear(int value) { + return _objc_msgSend_134(this.pointer, _sel_setYearForWeekOfYear_, value); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_NSProgress_ffiVoidObjCObjectNSError castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_NSProgress_ffiVoidObjCObjectNSError._(pointer, lib, - retain: retain, release: release); + bool get leapMonth { + return _objc_msgSend_7(this.pointer, _sel_isLeapMonth); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSProgress_ffiVoidObjCObjectNSError.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + set leapMonth(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setLeapMonth_, value); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSProgress_ffiVoidObjCObjectNSError.fromFunction(AVFAudio lib, - NSProgress? Function(ObjCBlock_ffiVoid_ObjCObject_NSError) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureTrampoline) - .cast(), - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_registerClosure( - (ffi.Pointer<_ObjCBlock> arg0) => - fn(ObjCBlock_ffiVoid_ObjCObject_NSError._(arg0, lib, retain: true, release: true)) - ?.retainAndReturnPointer() ?? - ffi.nullptr)), - lib); - static ffi.Pointer? _dartFuncTrampoline; + objc.NSDate? get date { + final _ret = _objc_msgSend_116(this.pointer, _sel_date); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + } - NSProgress? call(ObjCBlock_ffiVoid_ObjCObject_NSError arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>() - (_id, arg0._id) - .address == - 0 - ? null - : NSProgress._( - _id.ref.invoke - .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>()(_id, arg0._id), - _lib, - retain: false, - release: true); -} + int week() { + return _objc_msgSend_114(this.pointer, _sel_week); + } -void _ObjCBlock_ffiVoid_ObjCObject_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_ObjCObject_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + void setWeek_(int v) { + _objc_msgSend_135(this.pointer, _sel_setWeek_, v); + } -void _ObjCBlock_ffiVoid_ObjCObject_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1); + void setValue_forComponent_(int value, int unit) { + _objc_msgSend_136(this.pointer, _sel_setValue_forComponent_, value, unit); + } -class ObjCBlock_ffiVoid_ObjCObject_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ObjCObject_NSError._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + int valueForComponent_(int unit) { + return _objc_msgSend_137(this.pointer, _sel_valueForComponent_, unit); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ObjCObject_NSError castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ObjCObject_NSError._(pointer, lib, - retain: retain, release: release); + bool get validDate { + return _objc_msgSend_7(this.pointer, _sel_isValidDate); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_NSError.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + bool isValidDateInCalendar_(NSCalendar calendar) { + return _objc_msgSend_138( + this.pointer, _sel_isValidDateInCalendar_, calendar.pointer); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_NSError.fromFunction(AVFAudio lib, void Function(NSObject?, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSObject._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + @override + NSDateComponents init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ObjCObject_NSError.listener( - AVFAudio lib, void Function(NSObject?, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ObjCObject_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSObject._(arg0, lib, - retain: true, release: true), - arg1.address == 0 - ? null - : NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + static NSDateComponents new1() { + final _ret = _objc_msgSend_40(_class_NSDateComponents, _sel_new); + return NSDateComponents.castFromPointer(_ret, retain: false, release: true); + } - void call(NSObject? arg0, NSError? arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); -} + static NSDateComponents allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSDateComponents, _sel_allocWithZone_, zone); + return NSDateComponents.castFromPointer(_ret, retain: false, release: true); + } -void - _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureRegistry = - , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_registerClosure( - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureRegistry[ - id] = fn; - return ffi.Pointer.fromAddress(id); -} + static NSDateComponents alloc() { + final _ret = _objc_msgSend_40(_class_NSDateComponents, _sel_alloc); + return NSDateComponents.castFromPointer(_ret, retain: false, release: true); + } -void _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSDateComponents, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } -class ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary - extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSDateComponents, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary - castFromPointer(AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary._( - pointer, lib, - retain: retain, release: release); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSDateComponents, _sel_accessInstanceVariablesDirectly); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSDateComponents, _sel_useStoredAccessor); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary.fromFunction( - AVFAudio lib, - void Function(ObjCBlock_ffiVoid_ObjCObject_NSError1, NSObject, NSDictionary) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_registerClosure( - (ffi.Pointer<_ObjCBlock> arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - ObjCBlock_ffiVoid_ObjCObject_NSError1._(arg0, lib, retain: true, release: true), - NSObject._(arg1, lib, retain: true, release: true), - NSDictionary._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSDateComponents, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary.listener( - AVFAudio lib, - void Function(ObjCBlock_ffiVoid_ObjCObject_NSError1, NSObject, NSDictionary) - fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable, ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_registerClosure( - (ffi.Pointer<_ObjCBlock> arg0, ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - ObjCBlock_ffiVoid_ObjCObject_NSError1._(arg0, lib, retain: true, release: true), - NSObject._(arg1, lib, retain: true, release: true), - NSDictionary._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(ObjCBlock_ffiVoid_ObjCObject_NSError1 arg0, NSObject arg1, - NSDictionary arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>()( - _id, arg0._id, arg1._id, arg2._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSDateComponents, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSDateComponents, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSDateComponents, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSDateComponents, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSDateComponents = objc.getClass("NSDateComponents"); +late final _sel_calendar = objc.registerName("calendar"); +final _objc_msgSend_130 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCalendar_ = objc.registerName("setCalendar:"); +final _objc_msgSend_131 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_132 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_133 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_era = objc.registerName("era"); +late final _sel_setEra_ = objc.registerName("setEra:"); +final _objc_msgSend_134 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_year = objc.registerName("year"); +late final _sel_setYear_ = objc.registerName("setYear:"); +late final _sel_month = objc.registerName("month"); +late final _sel_setMonth_ = objc.registerName("setMonth:"); +late final _sel_day = objc.registerName("day"); +late final _sel_setDay_ = objc.registerName("setDay:"); +late final _sel_hour = objc.registerName("hour"); +late final _sel_setHour_ = objc.registerName("setHour:"); +late final _sel_minute = objc.registerName("minute"); +late final _sel_setMinute_ = objc.registerName("setMinute:"); +late final _sel_second = objc.registerName("second"); +late final _sel_setSecond_ = objc.registerName("setSecond:"); +late final _sel_nanosecond = objc.registerName("nanosecond"); +late final _sel_setNanosecond_ = objc.registerName("setNanosecond:"); +late final _sel_weekday = objc.registerName("weekday"); +late final _sel_setWeekday_ = objc.registerName("setWeekday:"); +late final _sel_weekdayOrdinal = objc.registerName("weekdayOrdinal"); +late final _sel_setWeekdayOrdinal_ = objc.registerName("setWeekdayOrdinal:"); +late final _sel_quarter = objc.registerName("quarter"); +late final _sel_setQuarter_ = objc.registerName("setQuarter:"); +late final _sel_weekOfMonth = objc.registerName("weekOfMonth"); +late final _sel_setWeekOfMonth_ = objc.registerName("setWeekOfMonth:"); +late final _sel_weekOfYear = objc.registerName("weekOfYear"); +late final _sel_setWeekOfYear_ = objc.registerName("setWeekOfYear:"); +late final _sel_yearForWeekOfYear = objc.registerName("yearForWeekOfYear"); +late final _sel_setYearForWeekOfYear_ = + objc.registerName("setYearForWeekOfYear:"); +late final _sel_isLeapMonth = objc.registerName("isLeapMonth"); +late final _sel_setLeapMonth_ = objc.registerName("setLeapMonth:"); +late final _sel_date = objc.registerName("date"); +late final _sel_week = objc.registerName("week"); +late final _sel_setWeek_ = objc.registerName("setWeek:"); +final _objc_msgSend_135 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setValue_forComponent_ = + objc.registerName("setValue:forComponent:"); +final _objc_msgSend_136 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Long, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int, int)>(); +late final _sel_valueForComponent_ = objc.registerName("valueForComponent:"); +final _objc_msgSend_137 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_isValidDate = objc.registerName("isValidDate"); +late final _sel_isValidDateInCalendar_ = + objc.registerName("isValidDateInCalendar:"); +final _objc_msgSend_138 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dateFromComponents_ = objc.registerName("dateFromComponents:"); +final _objc_msgSend_139 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_components_fromDate_ = + objc.registerName("components:fromDate:"); +final _objc_msgSend_140 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + +abstract class NSCalendarOptions { + static const int NSCalendarWrapComponents = 1; + static const int NSCalendarMatchStrictly = 2; + static const int NSCalendarSearchBackwards = 4; + static const int NSCalendarMatchPreviousTimePreservingSmallerUnits = 256; + static const int NSCalendarMatchNextTimePreservingSmallerUnits = 512; + static const int NSCalendarMatchNextTime = 1024; + static const int NSCalendarMatchFirst = 4096; + static const int NSCalendarMatchLast = 8192; +} + +late final _sel_dateByAddingComponents_toDate_options_ = + objc.registerName("dateByAddingComponents:toDate:options:"); +final _objc_msgSend_141 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_components_fromDate_toDate_options_ = + objc.registerName("components:fromDate:toDate:options:"); +final _objc_msgSend_142 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_getEra_year_month_day_fromDate_ = + objc.registerName("getEra:year:month:day:fromDate:"); +final _objc_msgSend_143 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_ = + objc.registerName("getEra:yearForWeekOfYear:weekOfYear:weekday:fromDate:"); +late final _sel_getHour_minute_second_nanosecond_fromDate_ = + objc.registerName("getHour:minute:second:nanosecond:fromDate:"); +late final _sel_component_fromDate_ = objc.registerName("component:fromDate:"); +final _objc_msgSend_144 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_dateWithEra_year_month_day_hour_minute_second_nanosecond_ = objc + .registerName("dateWithEra:year:month:day:hour:minute:second:nanosecond:"); +final _objc_msgSend_145 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + int, + int, + int, + int, + int, + int)>(); +late final _sel_dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_ = + objc.registerName( + "dateWithEra:yearForWeekOfYear:weekOfYear:weekday:hour:minute:second:nanosecond:"); +late final _sel_startOfDayForDate_ = objc.registerName("startOfDayForDate:"); +final _objc_msgSend_146 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_componentsInTimeZone_fromDate_ = + objc.registerName("componentsInTimeZone:fromDate:"); +final _objc_msgSend_147 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +abstract class NSComparisonResult { + static const int NSOrderedAscending = -1; + static const int NSOrderedSame = 0; + static const int NSOrderedDescending = 1; } -void _ObjCBlock_ffiVoid_ObjCObject_NSError1_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => +late final _sel_compareDate_toDate_toUnitGranularity_ = + objc.registerName("compareDate:toDate:toUnitGranularity:"); +final _objc_msgSend_148 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_isDate_equalToDate_toUnitGranularity_ = + objc.registerName("isDate:equalToDate:toUnitGranularity:"); +final _objc_msgSend_149 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_isDate_inSameDayAsDate_ = + objc.registerName("isDate:inSameDayAsDate:"); +final _objc_msgSend_150 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_isDateInToday_ = objc.registerName("isDateInToday:"); +late final _sel_isDateInYesterday_ = objc.registerName("isDateInYesterday:"); +late final _sel_isDateInTomorrow_ = objc.registerName("isDateInTomorrow:"); +late final _sel_isDateInWeekend_ = objc.registerName("isDateInWeekend:"); +late final _sel_rangeOfWeekendStartDate_interval_containingDate_ = + objc.registerName("rangeOfWeekendStartDate:interval:containingDate:"); +final _objc_msgSend_151 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_nextWeekendStartDate_interval_options_afterDate_ = + objc.registerName("nextWeekendStartDate:interval:options:afterDate:"); +final _objc_msgSend_152 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_components_fromDateComponents_toDateComponents_options_ = objc + .registerName("components:fromDateComponents:toDateComponents:options:"); +final _objc_msgSend_153 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_dateByAddingUnit_value_toDate_options_ = + objc.registerName("dateByAddingUnit:value:toDate:options:"); +final _objc_msgSend_154 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Long, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer, + int)>(); +void _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() + ffi.Void Function(ffi.Pointer arg0, + ffi.Bool arg1, ffi.Pointer arg2)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_ObjCObject_NSError1_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistryIndex; - _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistry[id] = fn; + void Function(ffi.Pointer, bool, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry = , bool, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( + void Function(ffi.Pointer, bool, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistry[ - block.ref.target.address]!(arg0, arg1); +void _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock_ffiVoid_ObjCObject_NSError1 extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ObjCObject_NSError1._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, +class ObjCBlock_ffiVoid_NSDate_bool_bool extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSDate_bool_bool._(ffi.Pointer pointer, {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ObjCObject_NSError1 castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ObjCObject_NSError1._(pointer, lib, + static ObjCBlock_ffiVoid_NSDate_bool_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSDate_bool_bool._(pointer, retain: retain, release: release); } @@ -55720,24 +6310,22 @@ class ObjCBlock_ffiVoid_ObjCObject_NSError1 extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_NSError1.fromFunctionPointer( - AVFAudio lib, + ObjCBlock_ffiVoid_NSDate_bool_bool.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> + ffi.Void Function(ffi.Pointer arg0, + ffi.Bool arg1, ffi.Pointer arg2)>> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_NSError1_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. @@ -55745,21 +6333,21 @@ class ObjCBlock_ffiVoid_ObjCObject_NSError1 extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_NSError1.fromFunction(AVFAudio lib, void Function(NSObject?, NSError) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_NSError1_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSObject._(arg0, lib, retain: true, release: true), - NSError._(arg1, lib, retain: true, release: true)))), - lib); + ObjCBlock_ffiVoid_NSDate_bool_bool.fromFunction( + void Function(objc.NSDate?, bool, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( + (ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : objc.NSDate.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -55771,4489 +6359,6121 @@ class ObjCBlock_ffiVoid_ObjCObject_NSError1 extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ObjCObject_NSError1.listener( - AVFAudio lib, void Function(NSObject?, NSError) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi - .NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_NSError1_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSObject._(arg0, lib, retain: true, release: true), - NSError._(arg1, lib, retain: true, release: true)))), - lib); + ObjCBlock_ffiVoid_NSDate_bool_bool.listener( + void Function(objc.NSDate?, bool, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( + (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : objc.NSDate.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>? _dartFuncListenerTrampoline; - void call(NSObject? arg0, NSError arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1._id); -} + void call(objc.NSDate? arg0, bool arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr, arg1, arg2); +} + +late final _sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_ = + objc.registerName( + "enumerateDatesStartingAfterDate:matchingComponents:options:usingBlock:"); +final _objc_msgSend_155 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_nextDateAfterDate_matchingComponents_options_ = + objc.registerName("nextDateAfterDate:matchingComponents:options:"); +final _objc_msgSend_156 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_nextDateAfterDate_matchingUnit_value_options_ = + objc.registerName("nextDateAfterDate:matchingUnit:value:options:"); +final _objc_msgSend_157 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Long, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + int)>(); +late final _sel_nextDateAfterDate_matchingHour_minute_second_options_ = + objc.registerName("nextDateAfterDate:matchingHour:minute:second:options:"); +final _objc_msgSend_158 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + int, + int)>(); +late final _sel_dateBySettingUnit_value_ofDate_options_ = + objc.registerName("dateBySettingUnit:value:ofDate:options:"); +late final _sel_dateBySettingHour_minute_second_ofDate_options_ = + objc.registerName("dateBySettingHour:minute:second:ofDate:options:"); +final _objc_msgSend_159 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + int, + ffi.Pointer, + int)>(); +late final _sel_date_matchesComponents_ = + objc.registerName("date:matchesComponents:"); +final _objc_msgSend_160 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +final _objc_msgSend_161 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isLenient = objc.registerName("isLenient"); +late final _sel_setLenient_ = objc.registerName("setLenient:"); +late final _sel_twoDigitStartDate = objc.registerName("twoDigitStartDate"); +late final _sel_setTwoDigitStartDate_ = + objc.registerName("setTwoDigitStartDate:"); +final _objc_msgSend_162 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_defaultDate = objc.registerName("defaultDate"); +late final _sel_setDefaultDate_ = objc.registerName("setDefaultDate:"); +late final _sel_setEraSymbols_ = objc.registerName("setEraSymbols:"); +final _objc_msgSend_163 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setMonthSymbols_ = objc.registerName("setMonthSymbols:"); +late final _sel_setShortMonthSymbols_ = + objc.registerName("setShortMonthSymbols:"); +late final _sel_setWeekdaySymbols_ = objc.registerName("setWeekdaySymbols:"); +late final _sel_setShortWeekdaySymbols_ = + objc.registerName("setShortWeekdaySymbols:"); +late final _sel_setAMSymbol_ = objc.registerName("setAMSymbol:"); +late final _sel_setPMSymbol_ = objc.registerName("setPMSymbol:"); +late final _sel_setLongEraSymbols_ = objc.registerName("setLongEraSymbols:"); +late final _sel_setVeryShortMonthSymbols_ = + objc.registerName("setVeryShortMonthSymbols:"); +late final _sel_setStandaloneMonthSymbols_ = + objc.registerName("setStandaloneMonthSymbols:"); +late final _sel_setShortStandaloneMonthSymbols_ = + objc.registerName("setShortStandaloneMonthSymbols:"); +late final _sel_setVeryShortStandaloneMonthSymbols_ = + objc.registerName("setVeryShortStandaloneMonthSymbols:"); +late final _sel_setVeryShortWeekdaySymbols_ = + objc.registerName("setVeryShortWeekdaySymbols:"); +late final _sel_setStandaloneWeekdaySymbols_ = + objc.registerName("setStandaloneWeekdaySymbols:"); +late final _sel_setShortStandaloneWeekdaySymbols_ = + objc.registerName("setShortStandaloneWeekdaySymbols:"); +late final _sel_setVeryShortStandaloneWeekdaySymbols_ = + objc.registerName("setVeryShortStandaloneWeekdaySymbols:"); +late final _sel_setQuarterSymbols_ = objc.registerName("setQuarterSymbols:"); +late final _sel_setShortQuarterSymbols_ = + objc.registerName("setShortQuarterSymbols:"); +late final _sel_setStandaloneQuarterSymbols_ = + objc.registerName("setStandaloneQuarterSymbols:"); +late final _sel_setShortStandaloneQuarterSymbols_ = + objc.registerName("setShortStandaloneQuarterSymbols:"); +late final _sel_gregorianStartDate = objc.registerName("gregorianStartDate"); +late final _sel_setGregorianStartDate_ = + objc.registerName("setGregorianStartDate:"); +late final _sel_doesRelativeDateFormatting = + objc.registerName("doesRelativeDateFormatting"); +late final _sel_setDoesRelativeDateFormatting_ = + objc.registerName("setDoesRelativeDateFormatting:"); +late final _sel_initWithDateFormat_allowNaturalLanguage_ = + objc.registerName("initWithDateFormat:allowNaturalLanguage:"); +final _objc_msgSend_164 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_allowsNaturalLanguage = + objc.registerName("allowsNaturalLanguage"); -class NSMutableString extends NSString { - NSMutableString._(ffi.Pointer id, AVFAudio lib, +class NSNumberFormatter extends NSFormatter { + NSNumberFormatter._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [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); + /// Constructs a [NSNumberFormatter] that points to the same underlying object as [other]. + NSNumberFormatter.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSNumberFormatter] that wraps the given raw object pointer. + NSNumberFormatter.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSNumberFormatter]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSNumberFormatter); } - /// Returns a [NSMutableString] that wraps the given raw object pointer. - static NSMutableString castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableString._(other, lib, retain: retain, release: release); + int get formattingContext { + return _objc_msgSend_89(this.pointer, _sel_formattingContext); } - /// 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); + set formattingContext(int value) { + return _objc_msgSend_90(this.pointer, _sel_setFormattingContext_, value); } - void replaceCharactersInRange_withString_(_NSRange range, NSString aString) { - _lib._objc_msgSend_689(_id, _lib._sel_replaceCharactersInRange_withString_1, - range, aString._id); + bool getObjectValue_forString_range_error_( + ffi.Pointer> obj, + objc.NSString string, + ffi.Pointer<_NSRange> rangep, + ffi.Pointer> error) { + return _objc_msgSend_91( + this.pointer, + _sel_getObjectValue_forString_range_error_, + obj, + string.pointer, + rangep, + error); } - void insertString_atIndex_(NSString aString, int loc) { - _lib._objc_msgSend_690( - _id, _lib._sel_insertString_atIndex_1, aString._id, loc); + objc.NSString? stringFromNumber_(objc.NSNumber number) { + final _ret = + _objc_msgSend_165(this.pointer, _sel_stringFromNumber_, number.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void deleteCharactersInRange_(_NSRange range) { - _lib._objc_msgSend_476(_id, _lib._sel_deleteCharactersInRange_1, range); + objc.NSNumber? numberFromString_(objc.NSString string) { + final _ret = + _objc_msgSend_166(this.pointer, _sel_numberFromString_, string.pointer); + return _ret.address == 0 + ? null + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } - void appendString_(NSString aString) { - _lib._objc_msgSend_247(_id, _lib._sel_appendString_1, aString._id); + static objc.NSString localizedStringFromNumber_numberStyle_( + objc.NSNumber num, int nstyle) { + final _ret = _objc_msgSend_167(_class_NSNumberFormatter, + _sel_localizedStringFromNumber_numberStyle_, num.pointer, nstyle); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void appendFormat_(NSString format) { - _lib._objc_msgSend_247(_id, _lib._sel_appendFormat_1, format._id); + static int defaultFormatterBehavior() { + return _objc_msgSend_168( + _class_NSNumberFormatter, _sel_defaultFormatterBehavior); } - void setString_(NSString aString) { - _lib._objc_msgSend_247(_id, _lib._sel_setString_1, aString._id); + static void setDefaultFormatterBehavior_(int behavior) { + _objc_msgSend_169( + _class_NSNumberFormatter, _sel_setDefaultFormatterBehavior_, behavior); } - int replaceOccurrencesOfString_withString_options_range_(NSString target, - NSString replacement, int options, _NSRange searchRange) { - return _lib._objc_msgSend_691( - _id, - _lib._sel_replaceOccurrencesOfString_withString_options_range_1, - target._id, - replacement._id, - options, - searchRange); + int get numberStyle { + return _objc_msgSend_170(this.pointer, _sel_numberStyle); } - bool applyTransform_reverse_range_updatedRange_(NSString transform, - bool reverse, _NSRange range, ffi.Pointer<_NSRange> resultingRange) { - return _lib._objc_msgSend_692( - _id, - _lib._sel_applyTransform_reverse_range_updatedRange_1, - transform._id, - reverse, - range, - resultingRange); + set numberStyle(int value) { + return _objc_msgSend_171(this.pointer, _sel_setNumberStyle_, value); + } + + objc.NSLocale get locale { + final _ret = _objc_msgSend_102(this.pointer, _sel_locale); + return objc.NSLocale.castFromPointer(_ret, retain: true, release: true); + } + + set locale(objc.NSLocale value) { + return _objc_msgSend_103(this.pointer, _sel_setLocale_, value.pointer); + } + + bool get generatesDecimalNumbers { + return _objc_msgSend_7(this.pointer, _sel_generatesDecimalNumbers); + } + + set generatesDecimalNumbers(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setGeneratesDecimalNumbers_, value); + } + + int get formatterBehavior { + return _objc_msgSend_168(this.pointer, _sel_formatterBehavior); + } + + set formatterBehavior(int value) { + return _objc_msgSend_172(this.pointer, _sel_setFormatterBehavior_, value); + } + + objc.NSString get negativeFormat { + final _ret = _objc_msgSend_12(this.pointer, _sel_negativeFormat); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set negativeFormat(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setNegativeFormat_, value.pointer); } - NSMutableString initWithCapacity_(int capacity) { + objc.NSDictionary? get textAttributesForNegativeValues { final _ret = - _lib._objc_msgSend_693(_id, _lib._sel_initWithCapacity_1, capacity); - return NSMutableString._(_ret, _lib, retain: true, release: true); + _objc_msgSend_65(this.pointer, _sel_textAttributesForNegativeValues); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSMutableString stringWithCapacity_(AVFAudio _lib, int capacity) { - final _ret = _lib._objc_msgSend_693( - _lib._class_NSMutableString1, _lib._sel_stringWithCapacity_1, capacity); - return NSMutableString._(_ret, _lib, retain: true, release: true); + set textAttributesForNegativeValues(objc.NSDictionary? value) { + return _objc_msgSend_173( + this.pointer, + _sel_setTextAttributesForNegativeValues_, + value?.pointer ?? ffi.nullptr); } - @override - NSMutableString init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableString._(_ret, _lib, retain: true, release: true); + objc.NSString get positiveFormat { + final _ret = _objc_msgSend_12(this.pointer, _sel_positiveFormat); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString? initWithCoder_(NSCoder coder) { + set positiveFormat(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPositiveFormat_, value.pointer); + } + + objc.NSDictionary? get textAttributesForPositiveValues { final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); + _objc_msgSend_65(this.pointer, _sel_textAttributesForPositiveValues); return _ret.address == 0 ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static ffi.Pointer getAvailableStringEncodings( - AVFAudio _lib) { - return _lib._objc_msgSend_357( - _lib._class_NSMutableString1, _lib._sel_availableStringEncodings1); + set textAttributesForPositiveValues(objc.NSDictionary? value) { + return _objc_msgSend_173( + this.pointer, + _sel_setTextAttributesForPositiveValues_, + value?.pointer ?? ffi.nullptr); } - static NSString localizedNameOfStringEncoding_(AVFAudio _lib, int encoding) { - final _ret = _lib._objc_msgSend_332(_lib._class_NSMutableString1, - _lib._sel_localizedNameOfStringEncoding_1, encoding); - return NSString._(_ret, _lib, retain: true, release: true); + bool get allowsFloats { + return _objc_msgSend_7(this.pointer, _sel_allowsFloats); } - static int getDefaultCStringEncoding(AVFAudio _lib) { - return _lib._objc_msgSend_10( - _lib._class_NSMutableString1, _lib._sel_defaultCStringEncoding1); + set allowsFloats(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setAllowsFloats_, value); } - @override - NSMutableString initWithCharactersNoCopy_length_freeWhenDone_( - ffi.Pointer characters, int length, bool freeBuffer) { - final _ret = _lib._objc_msgSend_369( - _id, - _lib._sel_initWithCharactersNoCopy_length_freeWhenDone_1, - characters, - length, - freeBuffer); - return NSMutableString._(_ret, _lib, retain: false, release: true); + objc.NSString get decimalSeparator { + final _ret = _objc_msgSend_12(this.pointer, _sel_decimalSeparator); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString initWithCharactersNoCopy_length_deallocator_( - ffi.Pointer chars, - int len, - ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong? deallocator) { - final _ret = _lib._objc_msgSend_370( - _id, - _lib._sel_initWithCharactersNoCopy_length_deallocator_1, - chars, - len, - deallocator?._id ?? ffi.nullptr); - return NSMutableString._(_ret, _lib, retain: false, release: true); + set decimalSeparator(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setDecimalSeparator_, value.pointer); } - @override - NSMutableString initWithCharacters_length_( - ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_371( - _id, _lib._sel_initWithCharacters_length_1, characters, length); - return NSMutableString._(_ret, _lib, retain: true, release: true); + bool get alwaysShowsDecimalSeparator { + return _objc_msgSend_7(this.pointer, _sel_alwaysShowsDecimalSeparator); } - @override - NSMutableString? initWithUTF8String_( - ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_372( - _id, _lib._sel_initWithUTF8String_1, nullTerminatedCString); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + set alwaysShowsDecimalSeparator(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAlwaysShowsDecimalSeparator_, value); } - @override - NSMutableString initWithString_(NSString aString) { - final _ret = - _lib._objc_msgSend_31(_id, _lib._sel_initWithString_1, aString._id); - return NSMutableString._(_ret, _lib, retain: true, release: true); + objc.NSString get currencyDecimalSeparator { + final _ret = _objc_msgSend_12(this.pointer, _sel_currencyDecimalSeparator); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString initWithFormat_(NSString format) { - final _ret = - _lib._objc_msgSend_31(_id, _lib._sel_initWithFormat_1, format._id); - return NSMutableString._(_ret, _lib, retain: true, release: true); + set currencyDecimalSeparator(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setCurrencyDecimalSeparator_, value.pointer); } - @override - NSMutableString initWithFormat_arguments_( - NSString format, ffi.Pointer<__va_list_tag> argList) { - final _ret = _lib._objc_msgSend_373( - _id, _lib._sel_initWithFormat_arguments_1, format._id, argList); - return NSMutableString._(_ret, _lib, retain: true, release: true); + bool get usesGroupingSeparator { + return _objc_msgSend_7(this.pointer, _sel_usesGroupingSeparator); } - @override - NSMutableString initWithFormat_locale_(NSString format, NSObject? locale) { - final _ret = _lib._objc_msgSend_374(_id, _lib._sel_initWithFormat_locale_1, - format._id, locale?._id ?? ffi.nullptr); - return NSMutableString._(_ret, _lib, retain: true, release: true); + set usesGroupingSeparator(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setUsesGroupingSeparator_, value); } - @override - NSMutableString initWithFormat_locale_arguments_( - NSString format, NSObject? locale, ffi.Pointer<__va_list_tag> argList) { - final _ret = _lib._objc_msgSend_375( - _id, - _lib._sel_initWithFormat_locale_arguments_1, - format._id, - locale?._id ?? ffi.nullptr, - argList); - return NSMutableString._(_ret, _lib, retain: true, release: true); + objc.NSString get groupingSeparator { + final _ret = _objc_msgSend_12(this.pointer, _sel_groupingSeparator); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString? initWithValidatedFormat_validFormatSpecifiers_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_376( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + set groupingSeparator(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setGroupingSeparator_, value.pointer); } - @override - NSMutableString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_377( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1, - format._id, - validFormatSpecifiers._id, - locale?._id ?? ffi.nullptr, - error); + objc.NSString? get zeroSymbol { + final _ret = _objc_msgSend_13(this.pointer, _sel_zeroSymbol); return _ret.address == 0 ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString? - initWithValidatedFormat_validFormatSpecifiers_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer<__va_list_tag> argList, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_378( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1, - format._id, - validFormatSpecifiers._id, - argList, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + set zeroSymbol(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setZeroSymbol_, value?.pointer ?? ffi.nullptr); } - @override - NSMutableString? - initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - ffi.Pointer<__va_list_tag> argList, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_379( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1, - format._id, - validFormatSpecifiers._id, - locale?._id ?? ffi.nullptr, - argList, - error); + objc.NSDictionary? get textAttributesForZero { + final _ret = _objc_msgSend_65(this.pointer, _sel_textAttributesForZero); return _ret.address == 0 ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString? initWithData_encoding_(NSData data, int encoding) { - final _ret = _lib._objc_msgSend_380( - _id, _lib._sel_initWithData_encoding_1, data._id, encoding); + set textAttributesForZero(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setTextAttributesForZero_, + value?.pointer ?? ffi.nullptr); + } + + objc.NSString get nilSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_nilSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set nilSymbol(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setNilSymbol_, value.pointer); + } + + objc.NSDictionary? get textAttributesForNil { + final _ret = _objc_msgSend_65(this.pointer, _sel_textAttributesForNil); return _ret.address == 0 ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString? initWithBytes_length_encoding_( - ffi.Pointer bytes, int len, int encoding) { - final _ret = _lib._objc_msgSend_381( - _id, _lib._sel_initWithBytes_length_encoding_1, bytes, len, encoding); + set textAttributesForNil(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setTextAttributesForNil_, + value?.pointer ?? ffi.nullptr); + } + + objc.NSString get notANumberSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_notANumberSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set notANumberSymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setNotANumberSymbol_, value.pointer); + } + + objc.NSDictionary? get textAttributesForNotANumber { + final _ret = + _objc_msgSend_65(this.pointer, _sel_textAttributesForNotANumber); return _ret.address == 0 ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString? initWithBytesNoCopy_length_encoding_freeWhenDone_( - ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { - final _ret = _lib._objc_msgSend_382( - _id, - _lib._sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1, - bytes, - len, - encoding, - freeBuffer); + set textAttributesForNotANumber(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setTextAttributesForNotANumber_, + value?.pointer ?? ffi.nullptr); + } + + objc.NSString get positiveInfinitySymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_positiveInfinitySymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set positiveInfinitySymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPositiveInfinitySymbol_, value.pointer); + } + + objc.NSDictionary? get textAttributesForPositiveInfinity { + final _ret = + _objc_msgSend_65(this.pointer, _sel_textAttributesForPositiveInfinity); return _ret.address == 0 ? null - : NSMutableString._(_ret, _lib, retain: false, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString? initWithBytesNoCopy_length_encoding_deallocator_( - ffi.Pointer bytes, - int len, - int encoding, - ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { - final _ret = _lib._objc_msgSend_383( - _id, - _lib._sel_initWithBytesNoCopy_length_encoding_deallocator_1, - bytes, - len, - encoding, - deallocator?._id ?? ffi.nullptr); + set textAttributesForPositiveInfinity(objc.NSDictionary? value) { + return _objc_msgSend_173( + this.pointer, + _sel_setTextAttributesForPositiveInfinity_, + value?.pointer ?? ffi.nullptr); + } + + objc.NSString get negativeInfinitySymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_negativeInfinitySymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set negativeInfinitySymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setNegativeInfinitySymbol_, value.pointer); + } + + objc.NSDictionary? get textAttributesForNegativeInfinity { + final _ret = + _objc_msgSend_65(this.pointer, _sel_textAttributesForNegativeInfinity); return _ret.address == 0 ? null - : NSMutableString._(_ret, _lib, retain: false, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + set textAttributesForNegativeInfinity(objc.NSDictionary? value) { + return _objc_msgSend_173( + this.pointer, + _sel_setTextAttributesForNegativeInfinity_, + value?.pointer ?? ffi.nullptr); + } + + objc.NSString get positivePrefix { + final _ret = _objc_msgSend_12(this.pointer, _sel_positivePrefix); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set positivePrefix(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPositivePrefix_, value.pointer); + } + + objc.NSString get positiveSuffix { + final _ret = _objc_msgSend_12(this.pointer, _sel_positiveSuffix); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set positiveSuffix(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPositiveSuffix_, value.pointer); + } + + objc.NSString get negativePrefix { + final _ret = _objc_msgSend_12(this.pointer, _sel_negativePrefix); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set negativePrefix(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setNegativePrefix_, value.pointer); } - static NSMutableString string(AVFAudio _lib) { + objc.NSString get negativeSuffix { + final _ret = _objc_msgSend_12(this.pointer, _sel_negativeSuffix); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set negativeSuffix(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setNegativeSuffix_, value.pointer); + } + + objc.NSString get currencyCode { + final _ret = _objc_msgSend_12(this.pointer, _sel_currencyCode); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set currencyCode(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setCurrencyCode_, value.pointer); + } + + objc.NSString get currencySymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_currencySymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set currencySymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setCurrencySymbol_, value.pointer); + } + + objc.NSString get internationalCurrencySymbol { final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_string1); - return NSMutableString._(_ret, _lib, retain: true, release: true); + _objc_msgSend_12(this.pointer, _sel_internationalCurrencySymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSMutableString stringWithString_(AVFAudio _lib, NSString string) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSMutableString1, _lib._sel_stringWithString_1, string._id); - return NSMutableString._(_ret, _lib, retain: true, release: true); + set internationalCurrencySymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setInternationalCurrencySymbol_, value.pointer); } - static NSMutableString stringWithCharacters_length_( - AVFAudio _lib, ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_371(_lib._class_NSMutableString1, - _lib._sel_stringWithCharacters_length_1, characters, length); - return NSMutableString._(_ret, _lib, retain: true, release: true); + objc.NSString get percentSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_percentSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSMutableString? stringWithUTF8String_( - AVFAudio _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_372(_lib._class_NSMutableString1, - _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + set percentSymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPercentSymbol_, value.pointer); } - static NSMutableString stringWithFormat_(AVFAudio _lib, NSString format) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSMutableString1, _lib._sel_stringWithFormat_1, format._id); - return NSMutableString._(_ret, _lib, retain: true, release: true); + objc.NSString get perMillSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_perMillSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSMutableString localizedStringWithFormat_( - AVFAudio _lib, NSString format) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSMutableString1, - _lib._sel_localizedStringWithFormat_1, format._id); - return NSMutableString._(_ret, _lib, retain: true, release: true); + set perMillSymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPerMillSymbol_, value.pointer); } - static NSMutableString? - stringWithValidatedFormat_validFormatSpecifiers_error_( - AVFAudio _lib, - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_376( - _lib._class_NSMutableString1, - _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); - } - - static NSMutableString? - localizedStringWithValidatedFormat_validFormatSpecifiers_error_( - AVFAudio _lib, - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_376( - _lib._class_NSMutableString1, - _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + objc.NSString get minusSign { + final _ret = _objc_msgSend_12(this.pointer, _sel_minusSign); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString? initWithCString_encoding_( - ffi.Pointer nullTerminatedCString, int encoding) { - final _ret = _lib._objc_msgSend_384(_id, - _lib._sel_initWithCString_encoding_1, nullTerminatedCString, encoding); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + set minusSign(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setMinusSign_, value.pointer); } - static NSMutableString? stringWithCString_encoding_( - AVFAudio _lib, ffi.Pointer cString, int enc) { - final _ret = _lib._objc_msgSend_384(_lib._class_NSMutableString1, - _lib._sel_stringWithCString_encoding_1, cString, enc); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + objc.NSString get plusSign { + final _ret = _objc_msgSend_12(this.pointer, _sel_plusSign); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString? initWithContentsOfURL_encoding_error_( - NSURL url, int enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_385(_id, - _lib._sel_initWithContentsOfURL_encoding_error_1, url._id, enc, error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + set plusSign(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setPlusSign_, value.pointer); } - @override - NSMutableString? initWithContentsOfFile_encoding_error_( - NSString path, int enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_386( - _id, - _lib._sel_initWithContentsOfFile_encoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + objc.NSString get exponentSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_exponentSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSMutableString? stringWithContentsOfURL_encoding_error_(AVFAudio _lib, - NSURL url, int enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_385( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfURL_encoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); - } - - static NSMutableString? stringWithContentsOfFile_encoding_error_( - AVFAudio _lib, - NSString path, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_386( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfFile_encoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + set exponentSymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setExponentSymbol_, value.pointer); } - @override - NSMutableString? initWithContentsOfURL_usedEncoding_error_( - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_387( - _id, - _lib._sel_initWithContentsOfURL_usedEncoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + int get groupingSize { + return _objc_msgSend_29(this.pointer, _sel_groupingSize); } - @override - NSMutableString? initWithContentsOfFile_usedEncoding_error_( - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_388( - _id, - _lib._sel_initWithContentsOfFile_usedEncoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); - } - - static NSMutableString? stringWithContentsOfURL_usedEncoding_error_( - AVFAudio _lib, - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_387( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); - } - - static NSMutableString? stringWithContentsOfFile_usedEncoding_error_( - AVFAudio _lib, - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_388( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); - } - - static int - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - AVFAudio _lib, - NSData data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_389( - _lib._class_NSMutableString1, - _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data._id, - opts?._id ?? ffi.nullptr, - string, - usedLossyConversion); - } - - static NSObject? stringWithContentsOfFile_(AVFAudio _lib, NSString path) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + set groupingSize(int value) { + return _objc_msgSend_125(this.pointer, _sel_setGroupingSize_, value); } - static NSObject? stringWithContentsOfURL_(AVFAudio _lib, NSURL url) { - final _ret = _lib._objc_msgSend_277(_lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + int get secondaryGroupingSize { + return _objc_msgSend_29(this.pointer, _sel_secondaryGroupingSize); } - static NSObject? stringWithCString_length_( - AVFAudio _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_384(_lib._class_NSMutableString1, - _lib._sel_stringWithCString_length_1, bytes, length); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + set secondaryGroupingSize(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setSecondaryGroupingSize_, value); } - static NSObject? stringWithCString_( - AVFAudio _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_372( - _lib._class_NSMutableString1, _lib._sel_stringWithCString_1, bytes); + objc.NSNumber? get multiplier { + final _ret = _objc_msgSend_174(this.pointer, _sel_multiplier); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } - static NSString pathWithComponents_(AVFAudio _lib, NSArray components) { - final _ret = _lib._objc_msgSend_396(_lib._class_NSMutableString1, - _lib._sel_pathWithComponents_1, components._id); - return NSString._(_ret, _lib, retain: true, release: true); + set multiplier(objc.NSNumber? value) { + return _objc_msgSend_175( + this.pointer, _sel_setMultiplier_, value?.pointer ?? ffi.nullptr); } - static NSMutableString new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_new1); - return NSMutableString._(_ret, _lib, retain: false, release: true); + int get formatWidth { + return _objc_msgSend_29(this.pointer, _sel_formatWidth); } - static NSMutableString allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMutableString1, _lib._sel_allocWithZone_1, zone); - return NSMutableString._(_ret, _lib, retain: false, release: true); + set formatWidth(int value) { + return _objc_msgSend_125(this.pointer, _sel_setFormatWidth_, value); } - static NSMutableString alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_alloc1); - return NSMutableString._(_ret, _lib, retain: false, release: true); + objc.NSString get paddingCharacter { + final _ret = _objc_msgSend_12(this.pointer, _sel_paddingCharacter); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSMutableString1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + set paddingCharacter(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPaddingCharacter_, value.pointer); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSMutableString1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + int get paddingPosition { + return _objc_msgSend_176(this.pointer, _sel_paddingPosition); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSMutableString1, - _lib._sel_accessInstanceVariablesDirectly1); + set paddingPosition(int value) { + return _objc_msgSend_177(this.pointer, _sel_setPaddingPosition_, value); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableString1, _lib._sel_useStoredAccessor1); + int get roundingMode { + return _objc_msgSend_178(this.pointer, _sel_roundingMode); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSMutableString1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + set roundingMode(int value) { + return _objc_msgSend_179(this.pointer, _sel_setRoundingMode_, value); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSMutableString1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + objc.NSNumber get roundingIncrement { + final _ret = _objc_msgSend_180(this.pointer, _sel_roundingIncrement); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSMutableString1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + set roundingIncrement(objc.NSNumber value) { + return _objc_msgSend_181( + this.pointer, _sel_setRoundingIncrement_, value.pointer); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSMutableString1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + int get minimumIntegerDigits { + return _objc_msgSend_29(this.pointer, _sel_minimumIntegerDigits); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableString1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + set minimumIntegerDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMinimumIntegerDigits_, value); } -} -class NSNotification extends NSObject { - NSNotification._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + int get maximumIntegerDigits { + return _objc_msgSend_29(this.pointer, _sel_maximumIntegerDigits); + } - /// 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); + set maximumIntegerDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMaximumIntegerDigits_, value); } - /// Returns a [NSNotification] that wraps the given raw object pointer. - static NSNotification castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNotification._(other, lib, retain: retain, release: release); + int get minimumFractionDigits { + return _objc_msgSend_29(this.pointer, _sel_minimumFractionDigits); } - /// 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); + set minimumFractionDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMinimumFractionDigits_, value); } - NSString get name { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_name1); - return NSString._(_ret, _lib, retain: true, release: true); + int get maximumFractionDigits { + return _objc_msgSend_29(this.pointer, _sel_maximumFractionDigits); } - NSObject? get object { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_object1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + set maximumFractionDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMaximumFractionDigits_, value); } - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_userInfo1); + objc.NSNumber? get minimum { + final _ret = _objc_msgSend_174(this.pointer, _sel_minimum); return _ret.address == 0 ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } - NSNotification initWithName_object_userInfo_( - NSString name, NSObject? object, NSDictionary? userInfo) { - final _ret = _lib._objc_msgSend_694( - _id, - _lib._sel_initWithName_object_userInfo_1, - name._id, - object?._id ?? ffi.nullptr, - userInfo?._id ?? ffi.nullptr); - return NSNotification._(_ret, _lib, retain: true, release: true); + set minimum(objc.NSNumber? value) { + return _objc_msgSend_175( + this.pointer, _sel_setMinimum_, value?.pointer ?? ffi.nullptr); } - NSNotification? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); + objc.NSNumber? get maximum { + final _ret = _objc_msgSend_174(this.pointer, _sel_maximum); return _ret.address == 0 ? null - : NSNotification._(_ret, _lib, retain: true, release: true); + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } - static NSNotification notificationWithName_object_( - AVFAudio _lib, NSString aName, NSObject? anObject) { - final _ret = _lib._objc_msgSend_374( - _lib._class_NSNotification1, - _lib._sel_notificationWithName_object_1, - aName._id, - anObject?._id ?? ffi.nullptr); - return NSNotification._(_ret, _lib, retain: true, release: true); + set maximum(objc.NSNumber? value) { + return _objc_msgSend_175( + this.pointer, _sel_setMaximum_, value?.pointer ?? ffi.nullptr); } - static NSNotification notificationWithName_object_userInfo_(AVFAudio _lib, - NSString aName, NSObject? anObject, NSDictionary? aUserInfo) { - final _ret = _lib._objc_msgSend_694( - _lib._class_NSNotification1, - _lib._sel_notificationWithName_object_userInfo_1, - aName._id, - anObject?._id ?? ffi.nullptr, - aUserInfo?._id ?? ffi.nullptr); - return NSNotification._(_ret, _lib, retain: true, release: true); + objc.NSString get currencyGroupingSeparator { + final _ret = _objc_msgSend_12(this.pointer, _sel_currencyGroupingSeparator); + return objc.NSString.castFromPointer(_ret, 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); + set currencyGroupingSeparator(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setCurrencyGroupingSeparator_, value.pointer); } - static NSNotification new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_new1); - return NSNotification._(_ret, _lib, retain: false, release: true); + bool get lenient { + return _objc_msgSend_7(this.pointer, _sel_isLenient); } - static NSNotification allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSNotification1, _lib._sel_allocWithZone_1, zone); - return NSNotification._(_ret, _lib, retain: false, release: true); + set lenient(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setLenient_, value); } - static NSNotification alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_alloc1); - return NSNotification._(_ret, _lib, retain: false, release: true); + bool get usesSignificantDigits { + return _objc_msgSend_7(this.pointer, _sel_usesSignificantDigits); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSNotification1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + set usesSignificantDigits(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setUsesSignificantDigits_, value); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSNotification1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + int get minimumSignificantDigits { + return _objc_msgSend_29(this.pointer, _sel_minimumSignificantDigits); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSNotification1, - _lib._sel_accessInstanceVariablesDirectly1); + set minimumSignificantDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMinimumSignificantDigits_, value); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSNotification1, _lib._sel_useStoredAccessor1); + int get maximumSignificantDigits { + return _objc_msgSend_29(this.pointer, _sel_maximumSignificantDigits); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSNotification1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + set maximumSignificantDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMaximumSignificantDigits_, value); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSNotification1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + bool get partialStringValidationEnabled { + return _objc_msgSend_7(this.pointer, _sel_isPartialStringValidationEnabled); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSNotification1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + set partialStringValidationEnabled(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setPartialStringValidationEnabled_, value); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSNotification1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool get hasThousandSeparators { + return _objc_msgSend_7(this.pointer, _sel_hasThousandSeparators); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSNotification1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + set hasThousandSeparators(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setHasThousandSeparators_, value); } -} - -class NSBundle extends NSObject { - NSBundle._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSBundle] that points to the same underlying object as [other]. - static NSBundle castFrom(T other) { - return NSBundle._(other._id, other._lib, retain: true, release: true); + objc.NSString get thousandSeparator { + final _ret = _objc_msgSend_12(this.pointer, _sel_thousandSeparator); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSBundle] that wraps the given raw object pointer. - static NSBundle castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSBundle._(other, lib, retain: retain, release: release); + set thousandSeparator(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setThousandSeparator_, value.pointer); } - /// Returns whether [obj] is an instance of [NSBundle]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSBundle1); + bool get localizesFormat { + return _objc_msgSend_7(this.pointer, _sel_localizesFormat); } - static NSBundle getMainBundle(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_695(_lib._class_NSBundle1, _lib._sel_mainBundle1); - return NSBundle._(_ret, _lib, retain: true, release: true); + set localizesFormat(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setLocalizesFormat_, value); } - static NSBundle? bundleWithPath_(AVFAudio _lib, NSString path) { - final _ret = _lib._objc_msgSend_38( - _lib._class_NSBundle1, _lib._sel_bundleWithPath_1, path._id); - return _ret.address == 0 - ? null - : NSBundle._(_ret, _lib, retain: true, release: true); + objc.NSString get format { + final _ret = _objc_msgSend_12(this.pointer, _sel_format); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSBundle? initWithPath_(NSString path) { - final _ret = _lib._objc_msgSend_38(_id, _lib._sel_initWithPath_1, path._id); - return _ret.address == 0 - ? null - : NSBundle._(_ret, _lib, retain: true, release: true); + set format(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setFormat_, value.pointer); } - static NSBundle? bundleWithURL_(AVFAudio _lib, NSURL url) { - final _ret = _lib._objc_msgSend_277( - _lib._class_NSBundle1, _lib._sel_bundleWithURL_1, url._id); - return _ret.address == 0 - ? null - : NSBundle._(_ret, _lib, retain: true, release: true); + NSAttributedString get attributedStringForZero { + final _ret = _objc_msgSend_63(this.pointer, _sel_attributedStringForZero); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSBundle? initWithURL_(NSURL url) { - final _ret = _lib._objc_msgSend_277(_id, _lib._sel_initWithURL_1, url._id); - return _ret.address == 0 - ? null - : NSBundle._(_ret, _lib, retain: true, release: true); + set attributedStringForZero(NSAttributedString value) { + return _objc_msgSend_182( + this.pointer, _sel_setAttributedStringForZero_, value.pointer); } - static NSBundle bundleForClass_(AVFAudio _lib, NSObject aClass) { - final _ret = _lib._objc_msgSend_696( - _lib._class_NSBundle1, _lib._sel_bundleForClass_1, aClass._id); - return NSBundle._(_ret, _lib, retain: true, release: true); + NSAttributedString get attributedStringForNil { + final _ret = _objc_msgSend_63(this.pointer, _sel_attributedStringForNil); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSBundle? bundleWithIdentifier_(AVFAudio _lib, NSString identifier) { - final _ret = _lib._objc_msgSend_697(_lib._class_NSBundle1, - _lib._sel_bundleWithIdentifier_1, identifier._id); - return _ret.address == 0 - ? null - : NSBundle._(_ret, _lib, retain: true, release: true); + set attributedStringForNil(NSAttributedString value) { + return _objc_msgSend_182( + this.pointer, _sel_setAttributedStringForNil_, value.pointer); } - static NSArray getAllBundles(AVFAudio _lib) { + NSAttributedString get attributedStringForNotANumber { final _ret = - _lib._objc_msgSend_85(_lib._class_NSBundle1, _lib._sel_allBundles1); - return NSArray._(_ret, _lib, retain: true, release: true); + _objc_msgSend_63(this.pointer, _sel_attributedStringForNotANumber); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSArray getAllFrameworks(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_85(_lib._class_NSBundle1, _lib._sel_allFrameworks1); - return NSArray._(_ret, _lib, retain: true, release: true); + set attributedStringForNotANumber(NSAttributedString value) { + return _objc_msgSend_182( + this.pointer, _sel_setAttributedStringForNotANumber_, value.pointer); } - bool load() { - return _lib._objc_msgSend_12(_id, _lib._sel_load1); + NSDecimalNumberHandler get roundingBehavior { + final _ret = _objc_msgSend_183(this.pointer, _sel_roundingBehavior); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); } - bool get loaded { - return _lib._objc_msgSend_12(_id, _lib._sel_isLoaded1); + set roundingBehavior(NSDecimalNumberHandler value) { + return _objc_msgSend_185( + this.pointer, _sel_setRoundingBehavior_, value.pointer); } - bool unload() { - return _lib._objc_msgSend_12(_id, _lib._sel_unload1); + @override + NSNumberFormatter init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSNumberFormatter.castFromPointer(_ret, retain: true, release: true); } - bool preflightAndReturnError_(ffi.Pointer> error) { - return _lib._objc_msgSend_255( - _id, _lib._sel_preflightAndReturnError_1, error); + static NSNumberFormatter new1() { + final _ret = _objc_msgSend_40(_class_NSNumberFormatter, _sel_new); + return NSNumberFormatter.castFromPointer(_ret, + retain: false, release: true); } - bool loadAndReturnError_(ffi.Pointer> error) { - return _lib._objc_msgSend_255(_id, _lib._sel_loadAndReturnError_1, error); + static NSNumberFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSNumberFormatter, _sel_allocWithZone_, zone); + return NSNumberFormatter.castFromPointer(_ret, + retain: false, release: true); } - NSURL get bundleURL { - final _ret = _lib._objc_msgSend_466(_id, _lib._sel_bundleURL1); - return NSURL._(_ret, _lib, retain: true, release: true); + static NSNumberFormatter alloc() { + final _ret = _objc_msgSend_40(_class_NSNumberFormatter, _sel_alloc); + return NSNumberFormatter.castFromPointer(_ret, + retain: false, release: true); } - NSURL? get resourceURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_resourceURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSNumberFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSURL? get executableURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_executableURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSNumberFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSURL? URLForAuxiliaryExecutable_(NSString executableName) { - final _ret = _lib._objc_msgSend_257( - _id, _lib._sel_URLForAuxiliaryExecutable_1, executableName._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSNumberFormatter, _sel_accessInstanceVariablesDirectly); } - NSURL? get privateFrameworksURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_privateFrameworksURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSNumberFormatter, _sel_useStoredAccessor); } - NSURL? get sharedFrameworksURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_sharedFrameworksURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSNumberFormatter, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSURL? get sharedSupportURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_sharedSupportURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSNumberFormatter, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSURL? get builtInPlugInsURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_builtInPlugInsURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSNumberFormatter, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSNumberFormatter, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSNumberFormatter, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSNumberFormatter = objc.getClass("NSNumberFormatter"); +late final _sel_stringFromNumber_ = objc.registerName("stringFromNumber:"); +final _objc_msgSend_165 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_numberFromString_ = objc.registerName("numberFromString:"); +final _objc_msgSend_166 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - NSURL? get appStoreReceiptURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_appStoreReceiptURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } +abstract class NSNumberFormatterStyle { + static const int NSNumberFormatterNoStyle = 0; + static const int NSNumberFormatterDecimalStyle = 1; + static const int NSNumberFormatterCurrencyStyle = 2; + static const int NSNumberFormatterPercentStyle = 3; + static const int NSNumberFormatterScientificStyle = 4; + static const int NSNumberFormatterSpellOutStyle = 5; + static const int NSNumberFormatterOrdinalStyle = 6; + static const int NSNumberFormatterCurrencyISOCodeStyle = 8; + static const int NSNumberFormatterCurrencyPluralStyle = 9; + static const int NSNumberFormatterCurrencyAccountingStyle = 10; +} - NSString get bundlePath { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_bundlePath1); - return NSString._(_ret, _lib, retain: true, release: true); - } +late final _sel_localizedStringFromNumber_numberStyle_ = + objc.registerName("localizedStringFromNumber:numberStyle:"); +final _objc_msgSend_167 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); - NSString? get resourcePath { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_resourcePath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); +abstract class NSNumberFormatterBehavior { + static const int NSNumberFormatterBehaviorDefault = 0; + static const int NSNumberFormatterBehavior10_0 = 1000; + static const int NSNumberFormatterBehavior10_4 = 1040; +} + +final _objc_msgSend_168 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_169 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_numberStyle = objc.registerName("numberStyle"); +final _objc_msgSend_170 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setNumberStyle_ = objc.registerName("setNumberStyle:"); +final _objc_msgSend_171 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_generatesDecimalNumbers = + objc.registerName("generatesDecimalNumbers"); +late final _sel_setGeneratesDecimalNumbers_ = + objc.registerName("setGeneratesDecimalNumbers:"); +final _objc_msgSend_172 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_negativeFormat = objc.registerName("negativeFormat"); +late final _sel_setNegativeFormat_ = objc.registerName("setNegativeFormat:"); +late final _sel_textAttributesForNegativeValues = + objc.registerName("textAttributesForNegativeValues"); +late final _sel_setTextAttributesForNegativeValues_ = + objc.registerName("setTextAttributesForNegativeValues:"); +final _objc_msgSend_173 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_positiveFormat = objc.registerName("positiveFormat"); +late final _sel_setPositiveFormat_ = objc.registerName("setPositiveFormat:"); +late final _sel_textAttributesForPositiveValues = + objc.registerName("textAttributesForPositiveValues"); +late final _sel_setTextAttributesForPositiveValues_ = + objc.registerName("setTextAttributesForPositiveValues:"); +late final _sel_allowsFloats = objc.registerName("allowsFloats"); +late final _sel_setAllowsFloats_ = objc.registerName("setAllowsFloats:"); +late final _sel_decimalSeparator = objc.registerName("decimalSeparator"); +late final _sel_setDecimalSeparator_ = + objc.registerName("setDecimalSeparator:"); +late final _sel_alwaysShowsDecimalSeparator = + objc.registerName("alwaysShowsDecimalSeparator"); +late final _sel_setAlwaysShowsDecimalSeparator_ = + objc.registerName("setAlwaysShowsDecimalSeparator:"); +late final _sel_currencyDecimalSeparator = + objc.registerName("currencyDecimalSeparator"); +late final _sel_setCurrencyDecimalSeparator_ = + objc.registerName("setCurrencyDecimalSeparator:"); +late final _sel_usesGroupingSeparator = + objc.registerName("usesGroupingSeparator"); +late final _sel_setUsesGroupingSeparator_ = + objc.registerName("setUsesGroupingSeparator:"); +late final _sel_groupingSeparator = objc.registerName("groupingSeparator"); +late final _sel_setGroupingSeparator_ = + objc.registerName("setGroupingSeparator:"); +late final _sel_zeroSymbol = objc.registerName("zeroSymbol"); +late final _sel_setZeroSymbol_ = objc.registerName("setZeroSymbol:"); +late final _sel_textAttributesForZero = + objc.registerName("textAttributesForZero"); +late final _sel_setTextAttributesForZero_ = + objc.registerName("setTextAttributesForZero:"); +late final _sel_nilSymbol = objc.registerName("nilSymbol"); +late final _sel_setNilSymbol_ = objc.registerName("setNilSymbol:"); +late final _sel_textAttributesForNil = + objc.registerName("textAttributesForNil"); +late final _sel_setTextAttributesForNil_ = + objc.registerName("setTextAttributesForNil:"); +late final _sel_notANumberSymbol = objc.registerName("notANumberSymbol"); +late final _sel_setNotANumberSymbol_ = + objc.registerName("setNotANumberSymbol:"); +late final _sel_textAttributesForNotANumber = + objc.registerName("textAttributesForNotANumber"); +late final _sel_setTextAttributesForNotANumber_ = + objc.registerName("setTextAttributesForNotANumber:"); +late final _sel_positiveInfinitySymbol = + objc.registerName("positiveInfinitySymbol"); +late final _sel_setPositiveInfinitySymbol_ = + objc.registerName("setPositiveInfinitySymbol:"); +late final _sel_textAttributesForPositiveInfinity = + objc.registerName("textAttributesForPositiveInfinity"); +late final _sel_setTextAttributesForPositiveInfinity_ = + objc.registerName("setTextAttributesForPositiveInfinity:"); +late final _sel_negativeInfinitySymbol = + objc.registerName("negativeInfinitySymbol"); +late final _sel_setNegativeInfinitySymbol_ = + objc.registerName("setNegativeInfinitySymbol:"); +late final _sel_textAttributesForNegativeInfinity = + objc.registerName("textAttributesForNegativeInfinity"); +late final _sel_setTextAttributesForNegativeInfinity_ = + objc.registerName("setTextAttributesForNegativeInfinity:"); +late final _sel_positivePrefix = objc.registerName("positivePrefix"); +late final _sel_setPositivePrefix_ = objc.registerName("setPositivePrefix:"); +late final _sel_positiveSuffix = objc.registerName("positiveSuffix"); +late final _sel_setPositiveSuffix_ = objc.registerName("setPositiveSuffix:"); +late final _sel_negativePrefix = objc.registerName("negativePrefix"); +late final _sel_setNegativePrefix_ = objc.registerName("setNegativePrefix:"); +late final _sel_negativeSuffix = objc.registerName("negativeSuffix"); +late final _sel_setNegativeSuffix_ = objc.registerName("setNegativeSuffix:"); +late final _sel_currencyCode = objc.registerName("currencyCode"); +late final _sel_setCurrencyCode_ = objc.registerName("setCurrencyCode:"); +late final _sel_currencySymbol = objc.registerName("currencySymbol"); +late final _sel_setCurrencySymbol_ = objc.registerName("setCurrencySymbol:"); +late final _sel_internationalCurrencySymbol = + objc.registerName("internationalCurrencySymbol"); +late final _sel_setInternationalCurrencySymbol_ = + objc.registerName("setInternationalCurrencySymbol:"); +late final _sel_percentSymbol = objc.registerName("percentSymbol"); +late final _sel_setPercentSymbol_ = objc.registerName("setPercentSymbol:"); +late final _sel_perMillSymbol = objc.registerName("perMillSymbol"); +late final _sel_setPerMillSymbol_ = objc.registerName("setPerMillSymbol:"); +late final _sel_minusSign = objc.registerName("minusSign"); +late final _sel_setMinusSign_ = objc.registerName("setMinusSign:"); +late final _sel_plusSign = objc.registerName("plusSign"); +late final _sel_setPlusSign_ = objc.registerName("setPlusSign:"); +late final _sel_exponentSymbol = objc.registerName("exponentSymbol"); +late final _sel_setExponentSymbol_ = objc.registerName("setExponentSymbol:"); +late final _sel_groupingSize = objc.registerName("groupingSize"); +late final _sel_setGroupingSize_ = objc.registerName("setGroupingSize:"); +late final _sel_secondaryGroupingSize = + objc.registerName("secondaryGroupingSize"); +late final _sel_setSecondaryGroupingSize_ = + objc.registerName("setSecondaryGroupingSize:"); +late final _sel_multiplier = objc.registerName("multiplier"); +final _objc_msgSend_174 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setMultiplier_ = objc.registerName("setMultiplier:"); +final _objc_msgSend_175 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_formatWidth = objc.registerName("formatWidth"); +late final _sel_setFormatWidth_ = objc.registerName("setFormatWidth:"); +late final _sel_paddingCharacter = objc.registerName("paddingCharacter"); +late final _sel_setPaddingCharacter_ = + objc.registerName("setPaddingCharacter:"); + +abstract class NSNumberFormatterPadPosition { + static const int NSNumberFormatterPadBeforePrefix = 0; + static const int NSNumberFormatterPadAfterPrefix = 1; + static const int NSNumberFormatterPadBeforeSuffix = 2; + static const int NSNumberFormatterPadAfterSuffix = 3; +} + +late final _sel_paddingPosition = objc.registerName("paddingPosition"); +final _objc_msgSend_176 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setPaddingPosition_ = objc.registerName("setPaddingPosition:"); +final _objc_msgSend_177 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); + +abstract class NSNumberFormatterRoundingMode { + static const int NSNumberFormatterRoundCeiling = 0; + static const int NSNumberFormatterRoundFloor = 1; + static const int NSNumberFormatterRoundDown = 2; + static const int NSNumberFormatterRoundUp = 3; + static const int NSNumberFormatterRoundHalfEven = 4; + static const int NSNumberFormatterRoundHalfDown = 5; + static const int NSNumberFormatterRoundHalfUp = 6; +} + +late final _sel_roundingMode = objc.registerName("roundingMode"); +final _objc_msgSend_178 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setRoundingMode_ = objc.registerName("setRoundingMode:"); +final _objc_msgSend_179 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_roundingIncrement = objc.registerName("roundingIncrement"); +final _objc_msgSend_180 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setRoundingIncrement_ = + objc.registerName("setRoundingIncrement:"); +final _objc_msgSend_181 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_minimumIntegerDigits = + objc.registerName("minimumIntegerDigits"); +late final _sel_setMinimumIntegerDigits_ = + objc.registerName("setMinimumIntegerDigits:"); +late final _sel_maximumIntegerDigits = + objc.registerName("maximumIntegerDigits"); +late final _sel_setMaximumIntegerDigits_ = + objc.registerName("setMaximumIntegerDigits:"); +late final _sel_minimumFractionDigits = + objc.registerName("minimumFractionDigits"); +late final _sel_setMinimumFractionDigits_ = + objc.registerName("setMinimumFractionDigits:"); +late final _sel_maximumFractionDigits = + objc.registerName("maximumFractionDigits"); +late final _sel_setMaximumFractionDigits_ = + objc.registerName("setMaximumFractionDigits:"); +late final _sel_minimum = objc.registerName("minimum"); +late final _sel_setMinimum_ = objc.registerName("setMinimum:"); +late final _sel_maximum = objc.registerName("maximum"); +late final _sel_setMaximum_ = objc.registerName("setMaximum:"); +late final _sel_currencyGroupingSeparator = + objc.registerName("currencyGroupingSeparator"); +late final _sel_setCurrencyGroupingSeparator_ = + objc.registerName("setCurrencyGroupingSeparator:"); +late final _sel_usesSignificantDigits = + objc.registerName("usesSignificantDigits"); +late final _sel_setUsesSignificantDigits_ = + objc.registerName("setUsesSignificantDigits:"); +late final _sel_minimumSignificantDigits = + objc.registerName("minimumSignificantDigits"); +late final _sel_setMinimumSignificantDigits_ = + objc.registerName("setMinimumSignificantDigits:"); +late final _sel_maximumSignificantDigits = + objc.registerName("maximumSignificantDigits"); +late final _sel_setMaximumSignificantDigits_ = + objc.registerName("setMaximumSignificantDigits:"); +late final _sel_isPartialStringValidationEnabled = + objc.registerName("isPartialStringValidationEnabled"); +late final _sel_setPartialStringValidationEnabled_ = + objc.registerName("setPartialStringValidationEnabled:"); +late final _sel_hasThousandSeparators = + objc.registerName("hasThousandSeparators"); +late final _sel_setHasThousandSeparators_ = + objc.registerName("setHasThousandSeparators:"); +late final _sel_thousandSeparator = objc.registerName("thousandSeparator"); +late final _sel_setThousandSeparator_ = + objc.registerName("setThousandSeparator:"); +late final _sel_localizesFormat = objc.registerName("localizesFormat"); +late final _sel_setLocalizesFormat_ = objc.registerName("setLocalizesFormat:"); +late final _sel_format = objc.registerName("format"); +late final _sel_setFormat_ = objc.registerName("setFormat:"); +late final _sel_attributedStringForZero = + objc.registerName("attributedStringForZero"); +late final _sel_setAttributedStringForZero_ = + objc.registerName("setAttributedStringForZero:"); +final _objc_msgSend_182 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_attributedStringForNil = + objc.registerName("attributedStringForNil"); +late final _sel_setAttributedStringForNil_ = + objc.registerName("setAttributedStringForNil:"); +late final _sel_attributedStringForNotANumber = + objc.registerName("attributedStringForNotANumber"); +late final _sel_setAttributedStringForNotANumber_ = + objc.registerName("setAttributedStringForNotANumber:"); + +class NSDecimalNumberHandler extends objc.NSObject { + NSDecimalNumberHandler._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSDecimalNumberHandler] that points to the same underlying object as [other]. + NSDecimalNumberHandler.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSDecimalNumberHandler] that wraps the given raw object pointer. + NSDecimalNumberHandler.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSDecimalNumberHandler]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSDecimalNumberHandler); } - NSString? get executablePath { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_executablePath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static NSDecimalNumberHandler getDefaultDecimalNumberHandler() { + final _ret = _objc_msgSend_183( + _class_NSDecimalNumberHandler, _sel_defaultDecimalNumberHandler); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); } - NSString? pathForAuxiliaryExecutable_(NSString executableName) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_pathForAuxiliaryExecutable_1, executableName._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + NSDecimalNumberHandler + initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( + int roundingMode, + int scale, + bool exact, + bool overflow, + bool underflow, + bool divideByZero) { + final _ret = _objc_msgSend_184( + this.pointer, + _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_, + roundingMode, + scale, + exact, + overflow, + underflow, + divideByZero); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); } - NSString? get privateFrameworksPath { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_privateFrameworksPath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static NSDecimalNumberHandler + decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( + int roundingMode, + int scale, + bool exact, + bool overflow, + bool underflow, + bool divideByZero) { + final _ret = _objc_msgSend_184( + _class_NSDecimalNumberHandler, + _sel_decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_, + roundingMode, + scale, + exact, + overflow, + underflow, + divideByZero); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); } - NSString? get sharedFrameworksPath { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_sharedFrameworksPath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + @override + NSDecimalNumberHandler init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); } - NSString? get sharedSupportPath { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_sharedSupportPath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static NSDecimalNumberHandler new1() { + final _ret = _objc_msgSend_40(_class_NSDecimalNumberHandler, _sel_new); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: false, release: true); } - NSString? get builtInPlugInsPath { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_builtInPlugInsPath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSURL? URLForResource_withExtension_subdirectory_inBundleWithURL_( - AVFAudio _lib, - NSString? name, - NSString? ext, - NSString? subpath, - NSURL bundleURL) { - final _ret = _lib._objc_msgSend_698( - _lib._class_NSBundle1, - _lib._sel_URLForResource_withExtension_subdirectory_inBundleWithURL_1, - name?._id ?? ffi.nullptr, - ext?._id ?? ffi.nullptr, - subpath?._id ?? ffi.nullptr, - bundleURL._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static NSDecimalNumberHandler allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSDecimalNumberHandler, _sel_allocWithZone_, zone); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: false, release: true); } - static NSArray? URLsForResourcesWithExtension_subdirectory_inBundleWithURL_( - AVFAudio _lib, NSString? ext, NSString? subpath, NSURL bundleURL) { - final _ret = _lib._objc_msgSend_699( - _lib._class_NSBundle1, - _lib._sel_URLsForResourcesWithExtension_subdirectory_inBundleWithURL_1, - ext?._id ?? ffi.nullptr, - subpath?._id ?? ffi.nullptr, - bundleURL._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + static NSDecimalNumberHandler alloc() { + final _ret = _objc_msgSend_40(_class_NSDecimalNumberHandler, _sel_alloc); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: false, release: true); } - NSURL? URLForResource_withExtension_(NSString? name, NSString? ext) { - final _ret = _lib._objc_msgSend_700( - _id, - _lib._sel_URLForResource_withExtension_1, - name?._id ?? ffi.nullptr, - ext?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSDecimalNumberHandler, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSURL? URLForResource_withExtension_subdirectory_( - NSString? name, NSString? ext, NSString? subpath) { - final _ret = _lib._objc_msgSend_701( - _id, - _lib._sel_URLForResource_withExtension_subdirectory_1, - name?._id ?? ffi.nullptr, - ext?._id ?? ffi.nullptr, - subpath?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? URLForResource_withExtension_subdirectory_localization_(NSString? name, - NSString? ext, NSString? subpath, NSString? localizationName) { - final _ret = _lib._objc_msgSend_702( - _id, - _lib._sel_URLForResource_withExtension_subdirectory_localization_1, - name?._id ?? ffi.nullptr, - ext?._id ?? ffi.nullptr, - subpath?._id ?? ffi.nullptr, - localizationName?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSDecimalNumberHandler, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSArray? URLsForResourcesWithExtension_subdirectory_( - NSString? ext, NSString? subpath) { - final _ret = _lib._objc_msgSend_703( - _id, - _lib._sel_URLsForResourcesWithExtension_subdirectory_1, - ext?._id ?? ffi.nullptr, - subpath?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSDecimalNumberHandler, _sel_accessInstanceVariablesDirectly); } - NSArray? URLsForResourcesWithExtension_subdirectory_localization_( - NSString? ext, NSString? subpath, NSString? localizationName) { - final _ret = _lib._objc_msgSend_704( - _id, - _lib._sel_URLsForResourcesWithExtension_subdirectory_localization_1, - ext?._id ?? ffi.nullptr, - subpath?._id ?? ffi.nullptr, - localizationName?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSDecimalNumberHandler, _sel_useStoredAccessor); } - static NSString? pathForResource_ofType_inDirectory_( - AVFAudio _lib, NSString? name, NSString? ext, NSString bundlePath) { - final _ret = _lib._objc_msgSend_705( - _lib._class_NSBundle1, - _lib._sel_pathForResource_ofType_inDirectory_1, - name?._id ?? ffi.nullptr, - ext?._id ?? ffi.nullptr, - bundlePath._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSDecimalNumberHandler, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static NSArray pathsForResourcesOfType_inDirectory_( - AVFAudio _lib, NSString? ext, NSString bundlePath) { - final _ret = _lib._objc_msgSend_706( - _lib._class_NSBundle1, - _lib._sel_pathsForResourcesOfType_inDirectory_1, - ext?._id ?? ffi.nullptr, - bundlePath._id); - return NSArray._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSDecimalNumberHandler, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSString? pathForResource_ofType_(NSString? name, NSString? ext) { - final _ret = _lib._objc_msgSend_707(_id, _lib._sel_pathForResource_ofType_1, - name?._id ?? ffi.nullptr, ext?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? pathForResource_ofType_inDirectory_forLocalization_(NSString? name, - NSString? ext, NSString? subpath, NSString? localizationName) { - final _ret = _lib._objc_msgSend_708( - _id, - _lib._sel_pathForResource_ofType_inDirectory_forLocalization_1, - name?._id ?? ffi.nullptr, - ext?._id ?? ffi.nullptr, - subpath?._id ?? ffi.nullptr, - localizationName?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSDecimalNumberHandler, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - NSArray pathsForResourcesOfType_inDirectory_forLocalization_( - NSString? ext, NSString? subpath, NSString? localizationName) { - final _ret = _lib._objc_msgSend_709( - _id, - _lib._sel_pathsForResourcesOfType_inDirectory_forLocalization_1, - ext?._id ?? ffi.nullptr, - subpath?._id ?? ffi.nullptr, - localizationName?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSDecimalNumberHandler, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString localizedStringForKey_value_table_( - NSString key, NSString? value, NSString? tableName) { - final _ret = _lib._objc_msgSend_710( - _id, - _lib._sel_localizedStringForKey_value_table_1, - key._id, - value?._id ?? ffi.nullptr, - tableName?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSDecimalNumberHandler, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - NSAttributedString localizedAttributedStringForKey_value_table_( - NSString key, NSString? value, NSString? tableName) { - final _ret = _lib._objc_msgSend_736( - _id, - _lib._sel_localizedAttributedStringForKey_value_table_1, - key._id, - value?._id ?? ffi.nullptr, - tableName?._id ?? ffi.nullptr); - return NSAttributedString._(_ret, _lib, retain: true, release: true); - } - - NSString? get bundleIdentifier { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_bundleIdentifier1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); +late final _class_NSDecimalNumberHandler = + objc.getClass("NSDecimalNumberHandler"); +late final _sel_defaultDecimalNumberHandler = + objc.registerName("defaultDecimalNumberHandler"); +final _objc_msgSend_183 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSRoundingMode { + static const int NSRoundPlain = 0; + static const int NSRoundDown = 1; + static const int NSRoundUp = 2; + static const int NSRoundBankers = 3; +} + +late final _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_ = + objc.registerName( + "initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:"); +final _objc_msgSend_184 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Short, + ffi.Bool, + ffi.Bool, + ffi.Bool, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + bool, + bool, + bool, + bool)>(); +late final _sel_decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_ = + objc.registerName( + "decimalNumberHandlerWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:"); +late final _sel_roundingBehavior = objc.registerName("roundingBehavior"); +late final _sel_setRoundingBehavior_ = + objc.registerName("setRoundingBehavior:"); +final _objc_msgSend_185 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSLocaleLanguageDirection { + static const int NSLocaleLanguageDirectionUnknown = 0; + static const int NSLocaleLanguageDirectionLeftToRight = 1; + static const int NSLocaleLanguageDirectionRightToLeft = 2; + static const int NSLocaleLanguageDirectionTopToBottom = 3; + static const int NSLocaleLanguageDirectionBottomToTop = 4; +} + +class NSScanner extends objc.NSObject { + NSScanner._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSScanner] that points to the same underlying object as [other]. + NSScanner.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSScanner] that wraps the given raw object pointer. + NSScanner.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSScanner]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSScanner); } - NSDictionary? get infoDictionary { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_infoDictionary1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + objc.NSString get string { + final _ret = _objc_msgSend_12(this.pointer, _sel_string); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get localizedInfoDictionary { - final _ret = - _lib._objc_msgSend_390(_id, _lib._sel_localizedInfoDictionary1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + int get scanLocation { + return _objc_msgSend_29(this.pointer, _sel_scanLocation); } - NSObject? objectForInfoDictionaryKey_(NSString key) { - final _ret = _lib._objc_msgSend_38( - _id, _lib._sel_objectForInfoDictionaryKey_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + set scanLocation(int value) { + return _objc_msgSend_125(this.pointer, _sel_setScanLocation_, value); } - NSObject? classNamed_(NSString className) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_classNamed_1, className._id); + objc.NSCharacterSet? get charactersToBeSkipped { + final _ret = _objc_msgSend_186(this.pointer, _sel_charactersToBeSkipped); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSCharacterSet.castFromPointer(_ret, + retain: true, release: true); } - NSObject? get principalClass { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_principalClass1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + set charactersToBeSkipped(objc.NSCharacterSet? value) { + return _objc_msgSend_187(this.pointer, _sel_setCharactersToBeSkipped_, + value?.pointer ?? ffi.nullptr); } - NSArray get preferredLocalizations { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_preferredLocalizations1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool get caseSensitive { + return _objc_msgSend_7(this.pointer, _sel_caseSensitive); } - NSArray get localizations { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_localizations1); - return NSArray._(_ret, _lib, retain: true, release: true); + set caseSensitive(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setCaseSensitive_, value); } - NSString? get developmentLocalization { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_developmentLocalization1); + objc.NSObject? get locale { + final _ret = _objc_msgSend_66(this.pointer, _sel_locale); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSArray preferredLocalizationsFromArray_( - AVFAudio _lib, NSArray localizationsArray) { - final _ret = _lib._objc_msgSend_68(_lib._class_NSBundle1, - _lib._sel_preferredLocalizationsFromArray_1, localizationsArray._id); - return NSArray._(_ret, _lib, retain: true, release: true); + set locale(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setLocale_, value?.pointer ?? ffi.nullptr); } - static NSArray preferredLocalizationsFromArray_forPreferences_( - AVFAudio _lib, NSArray localizationsArray, NSArray? preferencesArray) { - final _ret = _lib._objc_msgSend_737( - _lib._class_NSBundle1, - _lib._sel_preferredLocalizationsFromArray_forPreferences_1, - localizationsArray._id, - preferencesArray?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + NSScanner initWithString_(objc.NSString string) { + final _ret = + _objc_msgSend_35(this.pointer, _sel_initWithString_, string.pointer); + return NSScanner.castFromPointer(_ret, retain: true, release: true); } - NSArray? get executableArchitectures { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_executableArchitectures1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + bool scanInt_(ffi.Pointer result) { + return _objc_msgSend_189(this.pointer, _sel_scanInt_, result); } - void setPreservationPriority_forTags_(double priority, NSSet tags) { - _lib._objc_msgSend_738( - _id, _lib._sel_setPreservationPriority_forTags_1, priority, tags._id); + bool scanInteger_(ffi.Pointer result) { + return _objc_msgSend_190(this.pointer, _sel_scanInteger_, result); } - double preservationPriorityForTag_(NSString tag) { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_308_fpret( - _id, _lib._sel_preservationPriorityForTag_1, tag._id) - : _lib._objc_msgSend_308( - _id, _lib._sel_preservationPriorityForTag_1, tag._id); + bool scanLongLong_(ffi.Pointer result) { + return _objc_msgSend_191(this.pointer, _sel_scanLongLong_, result); } - @override - NSBundle init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSBundle._(_ret, _lib, retain: true, release: true); + bool scanUnsignedLongLong_(ffi.Pointer result) { + return _objc_msgSend_192(this.pointer, _sel_scanUnsignedLongLong_, result); } - static NSBundle new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSBundle1, _lib._sel_new1); - return NSBundle._(_ret, _lib, retain: false, release: true); + bool scanFloat_(ffi.Pointer result) { + return _objc_msgSend_193(this.pointer, _sel_scanFloat_, result); } - static NSBundle allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSBundle1, _lib._sel_allocWithZone_1, zone); - return NSBundle._(_ret, _lib, retain: false, release: true); + bool scanDouble_(ffi.Pointer result) { + return _objc_msgSend_194(this.pointer, _sel_scanDouble_, result); } - static NSBundle alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSBundle1, _lib._sel_alloc1); - return NSBundle._(_ret, _lib, retain: false, release: true); + bool scanHexInt_(ffi.Pointer result) { + return _objc_msgSend_195(this.pointer, _sel_scanHexInt_, result); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSBundle1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + bool scanHexLongLong_(ffi.Pointer result) { + return _objc_msgSend_192(this.pointer, _sel_scanHexLongLong_, result); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSBundle1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + bool scanHexFloat_(ffi.Pointer result) { + return _objc_msgSend_193(this.pointer, _sel_scanHexFloat_, result); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSBundle1, _lib._sel_accessInstanceVariablesDirectly1); + bool scanHexDouble_(ffi.Pointer result) { + return _objc_msgSend_194(this.pointer, _sel_scanHexDouble_, result); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSBundle1, _lib._sel_useStoredAccessor1); + bool scanString_intoString_( + objc.NSString string, ffi.Pointer> result) { + return _objc_msgSend_196( + this.pointer, _sel_scanString_intoString_, string.pointer, result); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSBundle1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + bool scanCharactersFromSet_intoString_(objc.NSCharacterSet set, + ffi.Pointer> result) { + return _objc_msgSend_197(this.pointer, + _sel_scanCharactersFromSet_intoString_, set.pointer, result); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSBundle1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + bool scanUpToString_intoString_( + objc.NSString string, ffi.Pointer> result) { + return _objc_msgSend_196( + this.pointer, _sel_scanUpToString_intoString_, string.pointer, result); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSBundle1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + bool scanUpToCharactersFromSet_intoString_(objc.NSCharacterSet set, + ffi.Pointer> result) { + return _objc_msgSend_197(this.pointer, + _sel_scanUpToCharactersFromSet_intoString_, set.pointer, result); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSBundle1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool get atEnd { + return _objc_msgSend_7(this.pointer, _sel_isAtEnd); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSBundle1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSScanner scannerWithString_(objc.NSString string) { + final _ret = _objc_msgSend_35( + _class_NSScanner, _sel_scannerWithString_, string.pointer); + return NSScanner.castFromPointer(_ret, retain: true, release: true); } -} - -class NSAttributedString extends NSObject { - NSAttributedString._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSAttributedString] that points to the same underlying object as [other]. - static NSAttributedString castFrom(T other) { - return NSAttributedString._(other._id, other._lib, - retain: true, release: true); + static objc.NSObject localizedScannerWithString_(objc.NSString string) { + final _ret = _objc_msgSend_35( + _class_NSScanner, _sel_localizedScannerWithString_, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSAttributedString] that wraps the given raw object pointer. - static NSAttributedString castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSAttributedString._(other, lib, retain: retain, release: release); + bool scanDecimal_(ffi.Pointer dcm) { + return _objc_msgSend_198(this.pointer, _sel_scanDecimal_, dcm); } - /// Returns whether [obj] is an instance of [NSAttributedString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSAttributedString1); + @override + NSScanner init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSScanner.castFromPointer(_ret, retain: true, release: true); } - NSString get string { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_string1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSScanner new1() { + final _ret = _objc_msgSend_40(_class_NSScanner, _sel_new); + return NSScanner.castFromPointer(_ret, retain: false, release: true); } - NSDictionary attributesAtIndex_effectiveRange_( - int location, ffi.Pointer<_NSRange> range) { - final _ret = _lib._objc_msgSend_711( - _id, _lib._sel_attributesAtIndex_effectiveRange_1, location, range); - return NSDictionary._(_ret, _lib, retain: true, release: true); + static NSScanner allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSScanner, _sel_allocWithZone_, zone); + return NSScanner.castFromPointer(_ret, retain: false, release: true); } - int get length { - return _lib._objc_msgSend_10(_id, _lib._sel_length1); + static NSScanner alloc() { + final _ret = _objc_msgSend_40(_class_NSScanner, _sel_alloc); + return NSScanner.castFromPointer(_ret, retain: false, release: true); } - NSObject? attribute_atIndex_effectiveRange_( - NSString attrName, int location, ffi.Pointer<_NSRange> range) { - final _ret = _lib._objc_msgSend_712( - _id, - _lib._sel_attribute_atIndex_effectiveRange_1, - attrName._id, - location, - range); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSScanner, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSAttributedString attributedSubstringFromRange_(_NSRange range) { - final _ret = _lib._objc_msgSend_713( - _id, _lib._sel_attributedSubstringFromRange_1, range); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSScanner, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSDictionary attributesAtIndex_longestEffectiveRange_inRange_( - int location, ffi.Pointer<_NSRange> range, _NSRange rangeLimit) { - final _ret = _lib._objc_msgSend_714( - _id, - _lib._sel_attributesAtIndex_longestEffectiveRange_inRange_1, - location, - range, - rangeLimit); - return NSDictionary._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSScanner, _sel_accessInstanceVariablesDirectly); } - NSObject? attribute_atIndex_longestEffectiveRange_inRange_(NSString attrName, - int location, ffi.Pointer<_NSRange> range, _NSRange rangeLimit) { - final _ret = _lib._objc_msgSend_715( - _id, - _lib._sel_attribute_atIndex_longestEffectiveRange_inRange_1, - attrName._id, - location, - range, - rangeLimit); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSScanner, _sel_useStoredAccessor); } - bool isEqualToAttributedString_(NSAttributedString other) { - return _lib._objc_msgSend_716( - _id, _lib._sel_isEqualToAttributedString_1, other._id); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSScanner, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSAttributedString initWithString_(NSString str) { - final _ret = - _lib._objc_msgSend_31(_id, _lib._sel_initWithString_1, str._id); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSScanner, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSAttributedString initWithString_attributes_( - NSString str, NSDictionary? attrs) { - final _ret = _lib._objc_msgSend_717( - _id, - _lib._sel_initWithString_attributes_1, - str._id, - attrs?._id ?? ffi.nullptr); - return NSAttributedString._(_ret, _lib, retain: true, release: true); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSScanner, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSScanner, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSScanner, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSScanner = objc.getClass("NSScanner"); +late final _sel_scanLocation = objc.registerName("scanLocation"); +late final _sel_setScanLocation_ = objc.registerName("setScanLocation:"); +late final _sel_charactersToBeSkipped = + objc.registerName("charactersToBeSkipped"); +final _objc_msgSend_186 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCharactersToBeSkipped_ = + objc.registerName("setCharactersToBeSkipped:"); +final _objc_msgSend_187 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_caseSensitive = objc.registerName("caseSensitive"); +late final _sel_setCaseSensitive_ = objc.registerName("setCaseSensitive:"); +final _objc_msgSend_188 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanInt_ = objc.registerName("scanInt:"); +final _objc_msgSend_189 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanInteger_ = objc.registerName("scanInteger:"); +final _objc_msgSend_190 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanLongLong_ = objc.registerName("scanLongLong:"); +final _objc_msgSend_191 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanUnsignedLongLong_ = + objc.registerName("scanUnsignedLongLong:"); +final _objc_msgSend_192 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_scanFloat_ = objc.registerName("scanFloat:"); +final _objc_msgSend_193 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanDouble_ = objc.registerName("scanDouble:"); +final _objc_msgSend_194 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanHexInt_ = objc.registerName("scanHexInt:"); +final _objc_msgSend_195 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanHexLongLong_ = objc.registerName("scanHexLongLong:"); +late final _sel_scanHexFloat_ = objc.registerName("scanHexFloat:"); +late final _sel_scanHexDouble_ = objc.registerName("scanHexDouble:"); +late final _sel_scanString_intoString_ = + objc.registerName("scanString:intoString:"); +final _objc_msgSend_196 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_scanCharactersFromSet_intoString_ = + objc.registerName("scanCharactersFromSet:intoString:"); +final _objc_msgSend_197 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_scanUpToString_intoString_ = + objc.registerName("scanUpToString:intoString:"); +late final _sel_scanUpToCharactersFromSet_intoString_ = + objc.registerName("scanUpToCharactersFromSet:intoString:"); +late final _sel_isAtEnd = objc.registerName("isAtEnd"); +late final _sel_scannerWithString_ = objc.registerName("scannerWithString:"); +late final _sel_localizedScannerWithString_ = + objc.registerName("localizedScannerWithString:"); - NSAttributedString initWithAttributedString_(NSAttributedString attrStr) { - final _ret = _lib._objc_msgSend_718( - _id, _lib._sel_initWithAttributedString_1, attrStr._id); - return NSAttributedString._(_ret, _lib, retain: true, release: true); - } +final class NSDecimal extends ffi.Opaque {} - void enumerateAttributesInRange_options_usingBlock_(_NSRange enumerationRange, - int opts, ObjCBlock_ffiVoid_NSDictionary_NSRange_bool block) { - _lib._objc_msgSend_719( - _id, - _lib._sel_enumerateAttributesInRange_options_usingBlock_1, - enumerationRange, - opts, - block._id); - } +late final _sel_scanDecimal_ = objc.registerName("scanDecimal:"); +final _objc_msgSend_198 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class NSException extends objc.NSObject { + NSException._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - void enumerateAttribute_inRange_options_usingBlock_( - NSString attrName, - _NSRange enumerationRange, - int opts, - ObjCBlock_ffiVoid_ObjCObject_NSRange_bool block) { - _lib._objc_msgSend_720( - _id, - _lib._sel_enumerateAttribute_inRange_options_usingBlock_1, - attrName._id, - enumerationRange, - opts, - block._id); - } + /// Constructs a [NSException] that points to the same underlying object as [other]. + NSException.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSAttributedString? - initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( - NSURL markdownFile, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_725( - _id, - _lib._sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_1, - markdownFile._id, - options?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSAttributedString._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSException] that wraps the given raw object pointer. + NSException.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - NSAttributedString? initWithMarkdown_options_baseURL_error_( - NSData markdown, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_726( - _id, - _lib._sel_initWithMarkdown_options_baseURL_error_1, - markdown._id, - options?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSAttributedString._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSException]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSException); } - NSAttributedString? initWithMarkdownString_options_baseURL_error_( - NSString markdownString, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_727( - _id, - _lib._sel_initWithMarkdownString_options_baseURL_error_1, - markdownString._id, - options?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSAttributedString._(_ret, _lib, retain: true, release: true); + static NSException exceptionWithName_reason_userInfo_( + objc.NSString name, objc.NSString? reason, objc.NSDictionary? userInfo) { + final _ret = _objc_msgSend_199( + _class_NSException, + _sel_exceptionWithName_reason_userInfo_, + name.pointer, + reason?.pointer ?? ffi.nullptr, + userInfo?.pointer ?? ffi.nullptr); + return NSException.castFromPointer(_ret, retain: true, release: true); } - NSAttributedString initWithFormat_options_locale_( - NSAttributedString format, int options, NSLocale? locale) { - final _ret = _lib._objc_msgSend_728( - _id, - _lib._sel_initWithFormat_options_locale_1, - format._id, - options, - locale?._id ?? ffi.nullptr); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + NSException initWithName_reason_userInfo_(objc.NSString aName, + objc.NSString? aReason, objc.NSDictionary? aUserInfo) { + final _ret = _objc_msgSend_200( + this.pointer, + _sel_initWithName_reason_userInfo_, + aName.pointer, + aReason?.pointer ?? ffi.nullptr, + aUserInfo?.pointer ?? ffi.nullptr); + return NSException.castFromPointer(_ret, retain: true, release: true); } - NSAttributedString initWithFormat_options_locale_arguments_( - NSAttributedString format, - int options, - NSLocale? locale, - ffi.Pointer<__va_list_tag> arguments) { - final _ret = _lib._objc_msgSend_729( - _id, - _lib._sel_initWithFormat_options_locale_arguments_1, - format._id, - options, - locale?._id ?? ffi.nullptr, - arguments); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + objc.NSString get name { + final _ret = _objc_msgSend_12(this.pointer, _sel_name); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSAttributedString localizedAttributedStringWithFormat_( - AVFAudio _lib, NSAttributedString format) { - final _ret = _lib._objc_msgSend_718(_lib._class_NSAttributedString1, - _lib._sel_localizedAttributedStringWithFormat_1, format._id); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + objc.NSString? get reason { + final _ret = _objc_msgSend_13(this.pointer, _sel_reason); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSAttributedString localizedAttributedStringWithFormat_options_( - AVFAudio _lib, NSAttributedString format, int options) { - final _ret = _lib._objc_msgSend_730( - _lib._class_NSAttributedString1, - _lib._sel_localizedAttributedStringWithFormat_options_1, - format._id, - options); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + objc.NSDictionary? get userInfo { + final _ret = _objc_msgSend_65(this.pointer, _sel_userInfo); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSAttributedString initWithFormat_options_locale_context_( - NSAttributedString format, - int options, - NSLocale? locale, - NSDictionary context) { - final _ret = _lib._objc_msgSend_731( - _id, - _lib._sel_initWithFormat_options_locale_context_1, - format._id, - options, - locale?._id ?? ffi.nullptr, - context._id); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + objc.NSArray get callStackReturnAddresses { + final _ret = _objc_msgSend_6(this.pointer, _sel_callStackReturnAddresses); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSAttributedString initWithFormat_options_locale_context_arguments_( - NSAttributedString format, - int options, - NSLocale? locale, - NSDictionary context, - ffi.Pointer<__va_list_tag> arguments) { - final _ret = _lib._objc_msgSend_732( - _id, - _lib._sel_initWithFormat_options_locale_context_arguments_1, - format._id, - options, - locale?._id ?? ffi.nullptr, - context._id, - arguments); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + objc.NSArray get callStackSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_callStackSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSAttributedString localizedAttributedStringWithFormat_context_( - AVFAudio _lib, NSAttributedString format, NSDictionary context) { - final _ret = _lib._objc_msgSend_733( - _lib._class_NSAttributedString1, - _lib._sel_localizedAttributedStringWithFormat_context_1, - format._id, - context._id); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + void raise() { + _objc_msgSend_82(this.pointer, _sel_raise); } - static NSAttributedString - localizedAttributedStringWithFormat_options_context_(AVFAudio _lib, - NSAttributedString format, int options, NSDictionary context) { - final _ret = _lib._objc_msgSend_734( - _lib._class_NSAttributedString1, - _lib._sel_localizedAttributedStringWithFormat_options_context_1, - format._id, - options, - context._id); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + static void raise_format_(objc.NSString name, objc.NSString format) { + _objc_msgSend_201( + _class_NSException, _sel_raise_format_, name.pointer, format.pointer); } - NSAttributedString attributedStringByInflectingString() { - final _ret = _lib._objc_msgSend_735( - _id, _lib._sel_attributedStringByInflectingString1); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + static void raise_format_arguments_(objc.NSString name, objc.NSString format, + ffi.Pointer<__va_list_tag> argList) { + _objc_msgSend_202(_class_NSException, _sel_raise_format_arguments_, + name.pointer, format.pointer, argList); } @override - NSAttributedString init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + NSException init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSException.castFromPointer(_ret, retain: true, release: true); } - static NSAttributedString new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSAttributedString1, _lib._sel_new1); - return NSAttributedString._(_ret, _lib, retain: false, release: true); + static NSException new1() { + final _ret = _objc_msgSend_40(_class_NSException, _sel_new); + return NSException.castFromPointer(_ret, retain: false, release: true); } - static NSAttributedString allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSAttributedString1, _lib._sel_allocWithZone_1, zone); - return NSAttributedString._(_ret, _lib, retain: false, release: true); + static NSException allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSException, _sel_allocWithZone_, zone); + return NSException.castFromPointer(_ret, retain: false, release: true); } - static NSAttributedString alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSAttributedString1, _lib._sel_alloc1); - return NSAttributedString._(_ret, _lib, retain: false, release: true); + static NSException alloc() { + final _ret = _objc_msgSend_40(_class_NSException, _sel_alloc); + return NSException.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSAttributedString1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSException, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSAttributedString1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSException, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSAttributedString1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSException, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSAttributedString1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSException, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSAttributedString1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSException, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSAttributedString1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSException, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSAttributedString1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSAttributedString1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSAttributedString1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -abstract class NSAttributedStringEnumerationOptions { - static const int NSAttributedStringEnumerationReverse = 2; - static const int - NSAttributedStringEnumerationLongestEffectiveRangeNotRequired = 1048576; -} - -void _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, _NSRange, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( - void Function(ffi.Pointer, _NSRange, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSException, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSException, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSException, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSException = objc.getClass("NSException"); +late final _sel_exceptionWithName_reason_userInfo_ = + objc.registerName("exceptionWithName:reason:userInfo:"); +final _objc_msgSend_199 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithName_reason_userInfo_ = + objc.registerName("initWithName:reason:userInfo:"); +final _objc_msgSend_200 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_reason = objc.registerName("reason"); +late final _sel_userInfo = objc.registerName("userInfo"); +late final _sel_callStackReturnAddresses = + objc.registerName("callStackReturnAddresses"); +late final _sel_callStackSymbols = objc.registerName("callStackSymbols"); +late final _sel_raise = objc.registerName("raise"); +late final _sel_raise_format_ = objc.registerName("raise:format:"); +final _objc_msgSend_201 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_raise_format_arguments_ = + objc.registerName("raise:format:arguments:"); +final _objc_msgSend_202 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>(); + +class NSRunLoop extends objc.NSObject { + NSRunLoop._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); -void _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); + /// Constructs a [NSRunLoop] that points to the same underlying object as [other]. + NSRunLoop.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); -class ObjCBlock_ffiVoid_NSDictionary_NSRange_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSDictionary_NSRange_bool._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + /// Constructs a [NSRunLoop] that wraps the given raw object pointer. + NSRunLoop.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSDictionary_NSRange_bool castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSDictionary_NSRange_bool._(pointer, lib, - retain: retain, release: release); + /// Returns whether [obj] is an instance of [NSRunLoop]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSRunLoop); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSDictionary_NSRange_bool.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSDictionary_NSRange_bool.fromFunction(AVFAudio lib, - void Function(NSDictionary, _NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(NSDictionary._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSDictionary_NSRange_bool.listener(AVFAudio lib, - void Function(NSDictionary, _NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(NSDictionary._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - _NSRange, ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSDictionary arg0, _NSRange arg1, ffi.Pointer arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - ffi.Pointer)>()(_id, arg0._id, arg1, arg2); -} - -void _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, _NSRange, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_registerClosure( - void Function(ffi.Pointer, _NSRange, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_ObjCObject_NSRange_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ObjCObject_NSRange_bool._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ObjCObject_NSRange_bool castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ObjCObject_NSRange_bool._(pointer, lib, - retain: retain, release: release); + static NSRunLoop getCurrentRunLoop() { + final _ret = _objc_msgSend_203(_class_NSRunLoop, _sel_currentRunLoop); + return NSRunLoop.castFromPointer(_ret, retain: true, release: true); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_NSRange_bool.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_NSRange_bool.fromFunction(AVFAudio lib, - void Function(NSObject?, _NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSObject._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ObjCObject_NSRange_bool.listener(AVFAudio lib, - void Function(NSObject?, _NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSObject._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - _NSRange, ffi.Pointer)>? _dartFuncListenerTrampoline; + static NSRunLoop getMainRunLoop() { + final _ret = _objc_msgSend_203(_class_NSRunLoop, _sel_mainRunLoop); + return NSRunLoop.castFromPointer(_ret, retain: true, release: true); + } - void call(NSObject? arg0, _NSRange arg1, ffi.Pointer arg2) => _id - .ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - _NSRange, ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1, arg2); -} + objc.NSString? get currentMode { + final _ret = _objc_msgSend_13(this.pointer, _sel_currentMode); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -class NSAttributedStringMarkdownParsingOptions extends NSObject { - NSAttributedStringMarkdownParsingOptions._( - ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + ffi.Pointer<__CFRunLoop> getCFRunLoop() { + return _objc_msgSend_204(this.pointer, _sel_getCFRunLoop); + } - /// Returns a [NSAttributedStringMarkdownParsingOptions] that points to the same underlying object as [other]. - static NSAttributedStringMarkdownParsingOptions - castFrom(T other) { - return NSAttributedStringMarkdownParsingOptions._(other._id, other._lib, - retain: true, release: true); + void addTimer_forMode_(NSTimer timer, objc.NSString mode) { + _objc_msgSend_213( + this.pointer, _sel_addTimer_forMode_, timer.pointer, mode.pointer); } - /// Returns a [NSAttributedStringMarkdownParsingOptions] that wraps the given raw object pointer. - static NSAttributedStringMarkdownParsingOptions castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSAttributedStringMarkdownParsingOptions._(other, lib, - retain: retain, release: release); + void addPort_forMode_(NSPort aPort, objc.NSString mode) { + _objc_msgSend_244( + this.pointer, _sel_addPort_forMode_, aPort.pointer, mode.pointer); } - /// Returns whether [obj] is an instance of [NSAttributedStringMarkdownParsingOptions]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSAttributedStringMarkdownParsingOptions1); + void removePort_forMode_(NSPort aPort, objc.NSString mode) { + _objc_msgSend_244( + this.pointer, _sel_removePort_forMode_, aPort.pointer, mode.pointer); } - @override - NSAttributedStringMarkdownParsingOptions init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSAttributedStringMarkdownParsingOptions._(_ret, _lib, - retain: true, release: true); + objc.NSDate? limitDateForMode_(objc.NSString mode) { + final _ret = + _objc_msgSend_93(this.pointer, _sel_limitDateForMode_, mode.pointer); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - bool get allowsExtendedAttributes { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsExtendedAttributes1); + void acceptInputForMode_beforeDate_( + objc.NSString mode, objc.NSDate limitDate) { + _objc_msgSend_245(this.pointer, _sel_acceptInputForMode_beforeDate_, + mode.pointer, limitDate.pointer); } - set allowsExtendedAttributes(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setAllowsExtendedAttributes_1, value); + void run() { + _objc_msgSend_82(this.pointer, _sel_run); } - int get interpretedSyntax { - return _lib._objc_msgSend_721(_id, _lib._sel_interpretedSyntax1); + void runUntilDate_(objc.NSDate limitDate) { + _objc_msgSend_246(this.pointer, _sel_runUntilDate_, limitDate.pointer); } - set interpretedSyntax(int value) { - return _lib._objc_msgSend_722(_id, _lib._sel_setInterpretedSyntax_1, value); + bool runMode_beforeDate_(objc.NSString mode, objc.NSDate limitDate) { + return _objc_msgSend_247(this.pointer, _sel_runMode_beforeDate_, + mode.pointer, limitDate.pointer); } - int get failurePolicy { - return _lib._objc_msgSend_723(_id, _lib._sel_failurePolicy1); + void configureAsServer() { + _objc_msgSend_82(this.pointer, _sel_configureAsServer); } - set failurePolicy(int value) { - return _lib._objc_msgSend_724(_id, _lib._sel_setFailurePolicy_1, value); + void performInModes_block_(objc.NSArray modes, ObjCBlock_ffiVoid block) { + _objc_msgSend_248( + this.pointer, _sel_performInModes_block_, modes.pointer, block.pointer); } - NSString? get languageCode { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_languageCode1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + void performBlock_(ObjCBlock_ffiVoid block) { + _objc_msgSend_249(this.pointer, _sel_performBlock_, block.pointer); } - set languageCode(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setLanguageCode_1, value?._id ?? ffi.nullptr); + void performSelector_target_argument_order_modes_( + ffi.Pointer aSelector, + objc.NSObject target, + objc.NSObject? arg, + int order, + objc.NSArray modes) { + _objc_msgSend_250( + this.pointer, + _sel_performSelector_target_argument_order_modes_, + aSelector, + target.pointer, + arg?.pointer ?? ffi.nullptr, + order, + modes.pointer); } - bool get appliesSourcePositionAttributes { - return _lib._objc_msgSend_12( - _id, _lib._sel_appliesSourcePositionAttributes1); + void cancelPerformSelector_target_argument_( + ffi.Pointer aSelector, + objc.NSObject target, + objc.NSObject? arg) { + _objc_msgSend_251(this.pointer, _sel_cancelPerformSelector_target_argument_, + aSelector, target.pointer, arg?.pointer ?? ffi.nullptr); } - set appliesSourcePositionAttributes(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setAppliesSourcePositionAttributes_1, value); + void cancelPerformSelectorsWithTarget_(objc.NSObject target) { + _objc_msgSend_49( + this.pointer, _sel_cancelPerformSelectorsWithTarget_, target.pointer); } - static NSAttributedStringMarkdownParsingOptions new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSAttributedStringMarkdownParsingOptions1, _lib._sel_new1); - return NSAttributedStringMarkdownParsingOptions._(_ret, _lib, - retain: false, release: true); + @override + NSRunLoop init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSRunLoop.castFromPointer(_ret, retain: true, release: true); } - static NSAttributedStringMarkdownParsingOptions allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSAttributedStringMarkdownParsingOptions1, - _lib._sel_allocWithZone_1, - zone); - return NSAttributedStringMarkdownParsingOptions._(_ret, _lib, - retain: false, release: true); + static NSRunLoop new1() { + final _ret = _objc_msgSend_40(_class_NSRunLoop, _sel_new); + return NSRunLoop.castFromPointer(_ret, retain: false, release: true); } - static NSAttributedStringMarkdownParsingOptions alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSAttributedStringMarkdownParsingOptions1, - _lib._sel_alloc1); - return NSAttributedStringMarkdownParsingOptions._(_ret, _lib, - retain: false, release: true); + static NSRunLoop allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSRunLoop, _sel_allocWithZone_, zone); + return NSRunLoop.castFromPointer(_ret, retain: false, release: true); + } + + static NSRunLoop alloc() { + final _ret = _objc_msgSend_40(_class_NSRunLoop, _sel_alloc); + return NSRunLoop.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSAttributedStringMarkdownParsingOptions1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSRunLoop, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSAttributedStringMarkdownParsingOptions1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSRunLoop, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSAttributedStringMarkdownParsingOptions1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSRunLoop, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSAttributedStringMarkdownParsingOptions1, - _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSRunLoop, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63( - _lib._class_NSAttributedStringMarkdownParsingOptions1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, - key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSRunLoop, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64( - _lib._class_NSAttributedStringMarkdownParsingOptions1, - _lib._sel_automaticallyNotifiesObserversForKey_1, - key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSRunLoop, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSAttributedStringMarkdownParsingOptions1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSRunLoop, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSAttributedStringMarkdownParsingOptions1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSRunLoop, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSAttributedStringMarkdownParsingOptions1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSRunLoop, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -abstract class NSAttributedStringMarkdownInterpretedSyntax { - static const int NSAttributedStringMarkdownInterpretedSyntaxFull = 0; - static const int NSAttributedStringMarkdownInterpretedSyntaxInlineOnly = 1; - static const int - NSAttributedStringMarkdownInterpretedSyntaxInlineOnlyPreservingWhitespace = - 2; -} +late final _class_NSRunLoop = objc.getClass("NSRunLoop"); +late final _sel_currentRunLoop = objc.registerName("currentRunLoop"); +final _objc_msgSend_203 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_mainRunLoop = objc.registerName("mainRunLoop"); +late final _sel_currentMode = objc.registerName("currentMode"); -abstract class NSAttributedStringMarkdownParsingFailurePolicy { - static const int NSAttributedStringMarkdownParsingFailureReturnError = 0; - static const int - NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible = - 1; -} +final class __CFRunLoop extends ffi.Opaque {} -abstract class NSAttributedStringFormattingOptions { - static const int - NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging = 1; - static const int NSAttributedStringFormattingApplyReplacementIndexAttribute = - 2; -} +late final _sel_getCFRunLoop = objc.registerName("getCFRunLoop"); +final _objc_msgSend_204 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer<__CFRunLoop> Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer<__CFRunLoop> Function( + ffi.Pointer, ffi.Pointer)>(); + +class NSTimer extends objc.NSObject { + NSTimer._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); -class NSMutableAttributedString extends NSAttributedString { - NSMutableAttributedString._(ffi.Pointer id, AVFAudio lib, + /// Constructs a [NSTimer] that points to the same underlying object as [other]. + NSTimer.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSTimer] that wraps the given raw object pointer. + NSTimer.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : this._(other, retain: retain, release: release); - /// Returns a [NSMutableAttributedString] that points to the same underlying object as [other]. - static NSMutableAttributedString castFrom(T other) { - return NSMutableAttributedString._(other._id, other._lib, - retain: true, release: true); + /// Returns whether [obj] is an instance of [NSTimer]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSTimer); } - /// Returns a [NSMutableAttributedString] that wraps the given raw object pointer. - static NSMutableAttributedString castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableAttributedString._(other, lib, - retain: retain, release: release); + static NSTimer timerWithTimeInterval_invocation_repeats_( + double ti, objc.NSInvocation invocation, bool yesOrNo) { + final _ret = _objc_msgSend_205( + _class_NSTimer, + _sel_timerWithTimeInterval_invocation_repeats_, + ti, + invocation.pointer, + yesOrNo); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSMutableAttributedString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableAttributedString1); + static NSTimer scheduledTimerWithTimeInterval_invocation_repeats_( + double ti, objc.NSInvocation invocation, bool yesOrNo) { + final _ret = _objc_msgSend_205( + _class_NSTimer, + _sel_scheduledTimerWithTimeInterval_invocation_repeats_, + ti, + invocation.pointer, + yesOrNo); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - void replaceCharactersInRange_withString_(_NSRange range, NSString str) { - _lib._objc_msgSend_689( - _id, _lib._sel_replaceCharactersInRange_withString_1, range, str._id); + static NSTimer timerWithTimeInterval_target_selector_userInfo_repeats_( + double ti, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? userInfo, + bool yesOrNo) { + final _ret = _objc_msgSend_206( + _class_NSTimer, + _sel_timerWithTimeInterval_target_selector_userInfo_repeats_, + ti, + aTarget.pointer, + aSelector, + userInfo?.pointer ?? ffi.nullptr, + yesOrNo); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - void setAttributes_range_(NSDictionary? attrs, _NSRange range) { - _lib._objc_msgSend_739( - _id, _lib._sel_setAttributes_range_1, attrs?._id ?? ffi.nullptr, range); + static NSTimer + scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_( + double ti, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? userInfo, + bool yesOrNo) { + final _ret = _objc_msgSend_206( + _class_NSTimer, + _sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_, + ti, + aTarget.pointer, + aSelector, + userInfo?.pointer ?? ffi.nullptr, + yesOrNo); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - NSMutableString get mutableString { - final _ret = _lib._objc_msgSend_740(_id, _lib._sel_mutableString1); - return NSMutableString._(_ret, _lib, retain: true, release: true); + static NSTimer timerWithTimeInterval_repeats_block_( + double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { + final _ret = _objc_msgSend_207( + _class_NSTimer, + _sel_timerWithTimeInterval_repeats_block_, + interval, + repeats, + block.pointer); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - void addAttribute_value_range_( - NSString name, NSObject value, _NSRange range) { - _lib._objc_msgSend_741( - _id, _lib._sel_addAttribute_value_range_1, name._id, value._id, range); + static NSTimer scheduledTimerWithTimeInterval_repeats_block_( + double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { + final _ret = _objc_msgSend_207( + _class_NSTimer, + _sel_scheduledTimerWithTimeInterval_repeats_block_, + interval, + repeats, + block.pointer); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - void addAttributes_range_(NSDictionary attrs, _NSRange range) { - _lib._objc_msgSend_742( - _id, _lib._sel_addAttributes_range_1, attrs._id, range); + NSTimer initWithFireDate_interval_repeats_block_(objc.NSDate date, + double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { + final _ret = _objc_msgSend_208( + this.pointer, + _sel_initWithFireDate_interval_repeats_block_, + date.pointer, + interval, + repeats, + block.pointer); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - void removeAttribute_range_(NSString name, _NSRange range) { - _lib._objc_msgSend_743( - _id, _lib._sel_removeAttribute_range_1, name._id, range); + NSTimer initWithFireDate_interval_target_selector_userInfo_repeats_( + objc.NSDate date, + double ti, + objc.NSObject t, + ffi.Pointer s, + objc.NSObject? ui, + bool rep) { + final _ret = _objc_msgSend_209( + this.pointer, + _sel_initWithFireDate_interval_target_selector_userInfo_repeats_, + date.pointer, + ti, + t.pointer, + s, + ui?.pointer ?? ffi.nullptr, + rep); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - void replaceCharactersInRange_withAttributedString_( - _NSRange range, NSAttributedString attrString) { - _lib._objc_msgSend_744( - _id, - _lib._sel_replaceCharactersInRange_withAttributedString_1, - range, - attrString._id); + void fire() { + _objc_msgSend_82(this.pointer, _sel_fire); } - void insertAttributedString_atIndex_(NSAttributedString attrString, int loc) { - _lib._objc_msgSend_745( - _id, _lib._sel_insertAttributedString_atIndex_1, attrString._id, loc); + objc.NSDate get fireDate { + final _ret = _objc_msgSend_210(this.pointer, _sel_fireDate); + return objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - void appendAttributedString_(NSAttributedString attrString) { - _lib._objc_msgSend_746( - _id, _lib._sel_appendAttributedString_1, attrString._id); + set fireDate(objc.NSDate value) { + return _objc_msgSend_211(this.pointer, _sel_setFireDate_, value.pointer); } - void deleteCharactersInRange_(_NSRange range) { - _lib._objc_msgSend_476(_id, _lib._sel_deleteCharactersInRange_1, range); + double get timeInterval { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_timeInterval) + : _objc_msgSend_115(this.pointer, _sel_timeInterval); } - void setAttributedString_(NSAttributedString attrString) { - _lib._objc_msgSend_746( - _id, _lib._sel_setAttributedString_1, attrString._id); + double get tolerance { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_tolerance) + : _objc_msgSend_115(this.pointer, _sel_tolerance); } - void beginEditing() { - _lib._objc_msgSend_1(_id, _lib._sel_beginEditing1); + set tolerance(double value) { + return _objc_msgSend_212(this.pointer, _sel_setTolerance_, value); } - void endEditing() { - _lib._objc_msgSend_1(_id, _lib._sel_endEditing1); + void invalidate() { + _objc_msgSend_82(this.pointer, _sel_invalidate); } - void appendLocalizedFormat_(NSAttributedString format) { - _lib._objc_msgSend_746(_id, _lib._sel_appendLocalizedFormat_1, format._id); + bool get valid { + return _objc_msgSend_7(this.pointer, _sel_isValid); } - @override - NSMutableAttributedString initWithString_(NSString str) { - final _ret = - _lib._objc_msgSend_31(_id, _lib._sel_initWithString_1, str._id); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + objc.NSObject? get userInfo { + final _ret = _objc_msgSend_66(this.pointer, _sel_userInfo); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } @override - NSMutableAttributedString initWithString_attributes_( - NSString str, NSDictionary? attrs) { - final _ret = _lib._objc_msgSend_717( - _id, - _lib._sel_initWithString_attributes_1, - str._id, - attrs?._id ?? ffi.nullptr); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + NSTimer init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableAttributedString initWithAttributedString_( - NSAttributedString attrStr) { - final _ret = _lib._objc_msgSend_718( - _id, _lib._sel_initWithAttributedString_1, attrStr._id); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + static NSTimer new1() { + final _ret = _objc_msgSend_40(_class_NSTimer, _sel_new); + return NSTimer.castFromPointer(_ret, retain: false, release: true); } - @override - NSMutableAttributedString? - initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( - NSURL markdownFile, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_725( - _id, - _lib._sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_1, - markdownFile._id, - options?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + static NSTimer allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSTimer, _sel_allocWithZone_, zone); + return NSTimer.castFromPointer(_ret, retain: false, release: true); } - @override - NSMutableAttributedString? initWithMarkdown_options_baseURL_error_( - NSData markdown, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_726( - _id, - _lib._sel_initWithMarkdown_options_baseURL_error_1, - markdown._id, - options?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + static NSTimer alloc() { + final _ret = _objc_msgSend_40(_class_NSTimer, _sel_alloc); + return NSTimer.castFromPointer(_ret, retain: false, release: true); } - @override - NSMutableAttributedString? initWithMarkdownString_options_baseURL_error_( - NSString markdownString, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_727( - _id, - _lib._sel_initWithMarkdownString_options_baseURL_error_1, - markdownString._id, - options?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSTimer, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - @override - NSMutableAttributedString initWithFormat_options_locale_( - NSAttributedString format, int options, NSLocale? locale) { - final _ret = _lib._objc_msgSend_728( - _id, - _lib._sel_initWithFormat_options_locale_1, - format._id, - options, - locale?._id ?? ffi.nullptr); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSTimer, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - @override - NSMutableAttributedString initWithFormat_options_locale_arguments_( - NSAttributedString format, - int options, - NSLocale? locale, - ffi.Pointer<__va_list_tag> arguments) { - final _ret = _lib._objc_msgSend_729( - _id, - _lib._sel_initWithFormat_options_locale_arguments_1, - format._id, - options, - locale?._id ?? ffi.nullptr, - arguments); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSTimer, _sel_accessInstanceVariablesDirectly); } - static NSMutableAttributedString localizedAttributedStringWithFormat_( - AVFAudio _lib, NSAttributedString format) { - final _ret = _lib._objc_msgSend_718(_lib._class_NSMutableAttributedString1, - _lib._sel_localizedAttributedStringWithFormat_1, format._id); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSTimer, _sel_useStoredAccessor); } - static NSMutableAttributedString localizedAttributedStringWithFormat_options_( - AVFAudio _lib, NSAttributedString format, int options) { - final _ret = _lib._objc_msgSend_730( - _lib._class_NSMutableAttributedString1, - _lib._sel_localizedAttributedStringWithFormat_options_1, - format._id, - options); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSTimer, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableAttributedString initWithFormat_options_locale_context_( - NSAttributedString format, - int options, - NSLocale? locale, - NSDictionary context) { - final _ret = _lib._objc_msgSend_731( - _id, - _lib._sel_initWithFormat_options_locale_context_1, - format._id, - options, - locale?._id ?? ffi.nullptr, - context._id); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSTimer, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - @override - NSMutableAttributedString initWithFormat_options_locale_context_arguments_( - NSAttributedString format, - int options, - NSLocale? locale, - NSDictionary context, - ffi.Pointer<__va_list_tag> arguments) { - final _ret = _lib._objc_msgSend_732( - _id, - _lib._sel_initWithFormat_options_locale_context_arguments_1, - format._id, - options, - locale?._id ?? ffi.nullptr, - context._id, - arguments); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSTimer, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSTimer, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40(_class_NSTimer, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSTimer = objc.getClass("NSTimer"); +late final _sel_timerWithTimeInterval_invocation_repeats_ = + objc.registerName("timerWithTimeInterval:invocation:repeats:"); +final _objc_msgSend_205 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer, + bool)>(); +late final _sel_scheduledTimerWithTimeInterval_invocation_repeats_ = + objc.registerName("scheduledTimerWithTimeInterval:invocation:repeats:"); +late final _sel_timerWithTimeInterval_target_selector_userInfo_repeats_ = objc + .registerName("timerWithTimeInterval:target:selector:userInfo:repeats:"); +final _objc_msgSend_206 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_ = + objc.registerName( + "scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:"); +void _ObjCBlock_ffiVoid_NSTimer_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSTimer_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSTimer_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSTimer_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSTimer_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSTimer_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSTimer_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSTimer_closureRegistry[block.ref.target.address]!(arg0); + +class ObjCBlock_ffiVoid_NSTimer extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSTimer._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSTimer castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSTimer._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSTimer.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTimer_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSTimer.fromFunction(void Function(NSTimer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTimer_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSTimer_registerClosure( + (ffi.Pointer arg0) => fn( + NSTimer.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSTimer.listener(void Function(NSTimer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSTimer_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSTimer_registerClosure( + (ffi.Pointer arg0) => fn( + NSTimer.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(NSTimer arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(pointer, arg0.pointer); +} + +late final _sel_timerWithTimeInterval_repeats_block_ = + objc.registerName("timerWithTimeInterval:repeats:block:"); +final _objc_msgSend_207 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Bool, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + double, + bool, + ffi.Pointer)>(); +late final _sel_scheduledTimerWithTimeInterval_repeats_block_ = + objc.registerName("scheduledTimerWithTimeInterval:repeats:block:"); +late final _sel_initWithFireDate_interval_repeats_block_ = + objc.registerName("initWithFireDate:interval:repeats:block:"); +final _objc_msgSend_208 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Bool, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + double, + bool, + ffi.Pointer)>(); +late final _sel_initWithFireDate_interval_target_selector_userInfo_repeats_ = + objc.registerName( + "initWithFireDate:interval:target:selector:userInfo:repeats:"); +final _objc_msgSend_209 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_fire = objc.registerName("fire"); +late final _sel_fireDate = objc.registerName("fireDate"); +final _objc_msgSend_210 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setFireDate_ = objc.registerName("setFireDate:"); +final _objc_msgSend_211 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_timeInterval = objc.registerName("timeInterval"); +late final _sel_tolerance = objc.registerName("tolerance"); +late final _sel_setTolerance_ = objc.registerName("setTolerance:"); +final _objc_msgSend_212 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, double)>(); +late final _sel_invalidate = objc.registerName("invalidate"); +late final _sel_isValid = objc.registerName("isValid"); +late final _sel_addTimer_forMode_ = objc.registerName("addTimer:forMode:"); +final _objc_msgSend_213 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +class NSPort extends objc.NSObject { + NSPort._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSPort] that points to the same underlying object as [other]. + NSPort.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSPort] that wraps the given raw object pointer. + NSPort.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSPort]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSPort); + } + + static NSPort port() { + final _ret = _objc_msgSend_214(_class_NSPort, _sel_port); + return NSPort.castFromPointer(_ret, retain: true, release: true); + } + + void invalidate() { + _objc_msgSend_82(this.pointer, _sel_invalidate); + } + + bool get valid { + return _objc_msgSend_7(this.pointer, _sel_isValid); } - static NSMutableAttributedString localizedAttributedStringWithFormat_context_( - AVFAudio _lib, NSAttributedString format, NSDictionary context) { - final _ret = _lib._objc_msgSend_733( - _lib._class_NSMutableAttributedString1, - _lib._sel_localizedAttributedStringWithFormat_context_1, - format._id, - context._id); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + void setDelegate_(objc.NSObject? anObject) { + _objc_msgSend_215( + this.pointer, _sel_setDelegate_, anObject?.pointer ?? ffi.nullptr); } - static NSMutableAttributedString - localizedAttributedStringWithFormat_options_context_(AVFAudio _lib, - NSAttributedString format, int options, NSDictionary context) { - final _ret = _lib._objc_msgSend_734( - _lib._class_NSMutableAttributedString1, - _lib._sel_localizedAttributedStringWithFormat_options_context_1, - format._id, - options, - context._id); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + objc.NSObject? delegate() { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableAttributedString init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + void scheduleInRunLoop_forMode_(NSRunLoop runLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_scheduleInRunLoop_forMode_, + runLoop.pointer, mode.pointer); } - static NSMutableAttributedString new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableAttributedString1, _lib._sel_new1); - return NSMutableAttributedString._(_ret, _lib, - retain: false, release: true); + void removeFromRunLoop_forMode_(NSRunLoop runLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_removeFromRunLoop_forMode_, + runLoop.pointer, mode.pointer); } - static NSMutableAttributedString allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3(_lib._class_NSMutableAttributedString1, - _lib._sel_allocWithZone_1, zone); - return NSMutableAttributedString._(_ret, _lib, - retain: false, release: true); + int get reservedSpaceLength { + return _objc_msgSend_29(this.pointer, _sel_reservedSpaceLength); } - static NSMutableAttributedString alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableAttributedString1, _lib._sel_alloc1); - return NSMutableAttributedString._(_ret, _lib, - retain: false, release: true); + bool sendBeforeDate_components_from_reserved_( + objc.NSDate limitDate, + objc.NSMutableArray? components, + NSPort? receivePort, + int headerSpaceReserved) { + return _objc_msgSend_217( + this.pointer, + _sel_sendBeforeDate_components_from_reserved_, + limitDate.pointer, + components?.pointer ?? ffi.nullptr, + receivePort?.pointer ?? ffi.nullptr, + headerSpaceReserved); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSMutableAttributedString1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + bool sendBeforeDate_msgid_components_from_reserved_( + objc.NSDate limitDate, + int msgID, + objc.NSMutableArray? components, + NSPort? receivePort, + int headerSpaceReserved) { + return _objc_msgSend_218( + this.pointer, + _sel_sendBeforeDate_msgid_components_from_reserved_, + limitDate.pointer, + msgID, + components?.pointer ?? ffi.nullptr, + receivePort?.pointer ?? ffi.nullptr, + headerSpaceReserved); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSMutableAttributedString1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + void addConnection_toRunLoop_forMode_( + NSConnection conn, NSRunLoop runLoop, objc.NSString mode) { + _objc_msgSend_243(this.pointer, _sel_addConnection_toRunLoop_forMode_, + conn.pointer, runLoop.pointer, mode.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSMutableAttributedString1, - _lib._sel_accessInstanceVariablesDirectly1); + void removeConnection_fromRunLoop_forMode_( + NSConnection conn, NSRunLoop runLoop, objc.NSString mode) { + _objc_msgSend_243(this.pointer, _sel_removeConnection_fromRunLoop_forMode_, + conn.pointer, runLoop.pointer, mode.pointer); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableAttributedString1, _lib._sel_useStoredAccessor1); + @override + NSPort init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSPort.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSMutableAttributedString1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static NSPort new1() { + final _ret = _objc_msgSend_40(_class_NSPort, _sel_new); + return NSPort.castFromPointer(_ret, retain: false, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSMutableAttributedString1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static NSPort allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSPort, _sel_allocWithZone_, zone); + return NSPort.castFromPointer(_ret, retain: false, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSMutableAttributedString1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static NSPort alloc() { + final _ret = _objc_msgSend_40(_class_NSPort, _sel_alloc); + return NSPort.castFromPointer(_ret, retain: false, release: true); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSMutableAttributedString1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSPort, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSMutableAttributedString1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSPort, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } -} -class NSDateFormatter extends NSFormatter { - NSDateFormatter._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7(_class_NSPort, _sel_accessInstanceVariablesDirectly); + } - /// Returns a [NSDateFormatter] that points to the same underlying object as [other]. - static NSDateFormatter castFrom(T other) { - return NSDateFormatter._(other._id, other._lib, - retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSPort, _sel_useStoredAccessor); } - /// Returns a [NSDateFormatter] that wraps the given raw object pointer. - static NSDateFormatter castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDateFormatter._(other, lib, retain: retain, release: release); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSPort, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSDateFormatter]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSDateFormatter1); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51( + _class_NSPort, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - int get formattingContext { - return _lib._objc_msgSend_752(_id, _lib._sel_formattingContext1); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSPort, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSPort, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40(_class_NSPort, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSPort = objc.getClass("NSPort"); +late final _sel_port = objc.registerName("port"); +final _objc_msgSend_214 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDelegate_ = objc.registerName("setDelegate:"); +final _objc_msgSend_215 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_delegate = objc.registerName("delegate"); +late final _sel_scheduleInRunLoop_forMode_ = + objc.registerName("scheduleInRunLoop:forMode:"); +final _objc_msgSend_216 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeFromRunLoop_forMode_ = + objc.registerName("removeFromRunLoop:forMode:"); +late final _sel_reservedSpaceLength = objc.registerName("reservedSpaceLength"); +late final _sel_sendBeforeDate_components_from_reserved_ = + objc.registerName("sendBeforeDate:components:from:reserved:"); +final _objc_msgSend_217 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_sendBeforeDate_msgid_components_from_reserved_ = + objc.registerName("sendBeforeDate:msgid:components:from:reserved:"); +final _objc_msgSend_218 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + int)>(); + +class NSConnection extends objc.NSObject { + NSConnection._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSConnection] that points to the same underlying object as [other]. + NSConnection.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSConnection] that wraps the given raw object pointer. + NSConnection.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSConnection]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSConnection); } - set formattingContext(int value) { - return _lib._objc_msgSend_753(_id, _lib._sel_setFormattingContext_1, value); + objc.NSDictionary get statistics { + final _ret = _objc_msgSend_112(this.pointer, _sel_statistics); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - bool getObjectValue_forString_range_error_( - ffi.Pointer> obj, - NSString string, - ffi.Pointer<_NSRange> rangep, - ffi.Pointer> error) { - return _lib._objc_msgSend_754( - _id, - _lib._sel_getObjectValue_forString_range_error_1, - obj, - string._id, - rangep, - error); + static objc.NSArray allConnections() { + final _ret = _objc_msgSend_6(_class_NSConnection, _sel_allConnections); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString stringFromDate_(NSDate date) { - final _ret = - _lib._objc_msgSend_755(_id, _lib._sel_stringFromDate_1, date._id); - return NSString._(_ret, _lib, retain: true, release: true); + static NSConnection defaultConnection() { + final _ret = _objc_msgSend_219(_class_NSConnection, _sel_defaultConnection); + return NSConnection.castFromPointer(_ret, retain: true, release: true); } - NSDate? dateFromString_(NSString string) { - final _ret = - _lib._objc_msgSend_564(_id, _lib._sel_dateFromString_1, string._id); + static NSConnection? connectionWithRegisteredName_host_( + objc.NSString name, objc.NSString? hostName) { + final _ret = _objc_msgSend_220( + _class_NSConnection, + _sel_connectionWithRegisteredName_host_, + name.pointer, + hostName?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : NSConnection.castFromPointer(_ret, retain: true, release: true); } - static NSString localizedStringFromDate_dateStyle_timeStyle_( - AVFAudio _lib, NSDate date, int dstyle, int tstyle) { - final _ret = _lib._objc_msgSend_756( - _lib._class_NSDateFormatter1, - _lib._sel_localizedStringFromDate_dateStyle_timeStyle_1, - date._id, - dstyle, - tstyle); - return NSString._(_ret, _lib, retain: true, release: true); + static NSConnection? connectionWithRegisteredName_host_usingNameServer_( + objc.NSString name, objc.NSString? hostName, NSPortNameServer server) { + final _ret = _objc_msgSend_225( + _class_NSConnection, + _sel_connectionWithRegisteredName_host_usingNameServer_, + name.pointer, + hostName?.pointer ?? ffi.nullptr, + server.pointer); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); } - static NSString? dateFormatFromTemplate_options_locale_( - AVFAudio _lib, NSString tmplate, int opts, NSLocale? locale) { - final _ret = _lib._objc_msgSend_757( - _lib._class_NSDateFormatter1, - _lib._sel_dateFormatFromTemplate_options_locale_1, - tmplate._id, - opts, - locale?._id ?? ffi.nullptr); + static NSDistantObject? rootProxyForConnectionWithRegisteredName_host_( + objc.NSString name, objc.NSString? hostName) { + final _ret = _objc_msgSend_233( + _class_NSConnection, + _sel_rootProxyForConnectionWithRegisteredName_host_, + name.pointer, + hostName?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSDistantObject.castFromPointer(_ret, retain: true, release: true); } - static int getDefaultFormatterBehavior(AVFAudio _lib) { - return _lib._objc_msgSend_758( - _lib._class_NSDateFormatter1, _lib._sel_defaultFormatterBehavior1); + static NSDistantObject? + rootProxyForConnectionWithRegisteredName_host_usingNameServer_( + objc.NSString name, + objc.NSString? hostName, + NSPortNameServer server) { + final _ret = _objc_msgSend_234( + _class_NSConnection, + _sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_, + name.pointer, + hostName?.pointer ?? ffi.nullptr, + server.pointer); + return _ret.address == 0 + ? null + : NSDistantObject.castFromPointer(_ret, retain: true, release: true); } - static void setDefaultFormatterBehavior(AVFAudio _lib, int value) { - return _lib._objc_msgSend_759(_lib._class_NSDateFormatter1, - _lib._sel_setDefaultFormatterBehavior_1, value); + static NSConnection? serviceConnectionWithName_rootObject_usingNameServer_( + objc.NSString name, objc.NSObject root, NSPortNameServer server) { + final _ret = _objc_msgSend_235( + _class_NSConnection, + _sel_serviceConnectionWithName_rootObject_usingNameServer_, + name.pointer, + root.pointer, + server.pointer); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); } - void setLocalizedDateFormatFromTemplate_(NSString dateFormatTemplate) { - _lib._objc_msgSend_247(_id, _lib._sel_setLocalizedDateFormatFromTemplate_1, - dateFormatTemplate._id); + static NSConnection? serviceConnectionWithName_rootObject_( + objc.NSString name, objc.NSObject root) { + final _ret = _objc_msgSend_236(_class_NSConnection, + _sel_serviceConnectionWithName_rootObject_, name.pointer, root.pointer); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); } - NSString get dateFormat { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_dateFormat1); - return NSString._(_ret, _lib, retain: true, release: true); + double get requestTimeout { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_requestTimeout) + : _objc_msgSend_115(this.pointer, _sel_requestTimeout); } - set dateFormat(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setDateFormat_1, value._id); + set requestTimeout(double value) { + return _objc_msgSend_212(this.pointer, _sel_setRequestTimeout_, value); } - int get dateStyle { - return _lib._objc_msgSend_760(_id, _lib._sel_dateStyle1); + double get replyTimeout { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_replyTimeout) + : _objc_msgSend_115(this.pointer, _sel_replyTimeout); } - set dateStyle(int value) { - return _lib._objc_msgSend_761(_id, _lib._sel_setDateStyle_1, value); + set replyTimeout(double value) { + return _objc_msgSend_212(this.pointer, _sel_setReplyTimeout_, value); } - int get timeStyle { - return _lib._objc_msgSend_760(_id, _lib._sel_timeStyle1); + objc.NSObject? get rootObject { + final _ret = _objc_msgSend_66(this.pointer, _sel_rootObject); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set timeStyle(int value) { - return _lib._objc_msgSend_761(_id, _lib._sel_setTimeStyle_1, value); + set rootObject(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setRootObject_, value?.pointer ?? ffi.nullptr); } - NSLocale get locale { - final _ret = _lib._objc_msgSend_197(_id, _lib._sel_locale1); - return NSLocale._(_ret, _lib, retain: true, release: true); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set locale(NSLocale value) { - return _lib._objc_msgSend_762(_id, _lib._sel_setLocale_1, value._id); + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } - bool get generatesCalendarDates { - return _lib._objc_msgSend_12(_id, _lib._sel_generatesCalendarDates1); + bool get independentConversationQueueing { + return _objc_msgSend_7(this.pointer, _sel_independentConversationQueueing); } - set generatesCalendarDates(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setGeneratesCalendarDates_1, value); + set independentConversationQueueing(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setIndependentConversationQueueing_, value); } - int get formatterBehavior { - return _lib._objc_msgSend_758(_id, _lib._sel_formatterBehavior1); + bool get valid { + return _objc_msgSend_7(this.pointer, _sel_isValid); } - set formatterBehavior(int value) { - return _lib._objc_msgSend_759(_id, _lib._sel_setFormatterBehavior_1, value); + NSDistantObject get rootProxy { + final _ret = _objc_msgSend_237(this.pointer, _sel_rootProxy); + return NSDistantObject.castFromPointer(_ret, retain: true, release: true); } - NSTimeZone get timeZone { - final _ret = _lib._objc_msgSend_179(_id, _lib._sel_timeZone1); - return NSTimeZone._(_ret, _lib, retain: true, release: true); + void invalidate() { + _objc_msgSend_82(this.pointer, _sel_invalidate); } - set timeZone(NSTimeZone value) { - return _lib._objc_msgSend_180(_id, _lib._sel_setTimeZone_1, value._id); + void addRequestMode_(objc.NSString rmode) { + _objc_msgSend_98(this.pointer, _sel_addRequestMode_, rmode.pointer); } - NSCalendar get calendar { - final _ret = _lib._objc_msgSend_763(_id, _lib._sel_calendar1); - return NSCalendar._(_ret, _lib, retain: true, release: true); + void removeRequestMode_(objc.NSString rmode) { + _objc_msgSend_98(this.pointer, _sel_removeRequestMode_, rmode.pointer); } - set calendar(NSCalendar value) { - return _lib._objc_msgSend_799(_id, _lib._sel_setCalendar_1, value._id); + objc.NSArray get requestModes { + final _ret = _objc_msgSend_6(this.pointer, _sel_requestModes); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool get lenient { - return _lib._objc_msgSend_12(_id, _lib._sel_isLenient1); + bool registerName_(objc.NSString? name) { + return _objc_msgSend_238( + this.pointer, _sel_registerName_, name?.pointer ?? ffi.nullptr); } - set lenient(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setLenient_1, value); + bool registerName_withNameServer_( + objc.NSString? name, NSPortNameServer server) { + return _objc_msgSend_239(this.pointer, _sel_registerName_withNameServer_, + name?.pointer ?? ffi.nullptr, server.pointer); } - NSDate? get twoDigitStartDate { - final _ret = _lib._objc_msgSend_183(_id, _lib._sel_twoDigitStartDate1); + static NSConnection? connectionWithReceivePort_sendPort_( + NSPort? receivePort, NSPort? sendPort) { + final _ret = _objc_msgSend_240( + _class_NSConnection, + _sel_connectionWithReceivePort_sendPort_, + receivePort?.pointer ?? ffi.nullptr, + sendPort?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : NSConnection.castFromPointer(_ret, retain: true, release: true); } - set twoDigitStartDate(NSDate? value) { - return _lib._objc_msgSend_800( - _id, _lib._sel_setTwoDigitStartDate_1, value?._id ?? ffi.nullptr); + static objc.NSObject? currentConversation() { + final _ret = + _objc_msgSend_66(_class_NSConnection, _sel_currentConversation); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSDate? get defaultDate { - final _ret = _lib._objc_msgSend_183(_id, _lib._sel_defaultDate1); + NSConnection? initWithReceivePort_sendPort_( + NSPort? receivePort, NSPort? sendPort) { + final _ret = _objc_msgSend_240( + this.pointer, + _sel_initWithReceivePort_sendPort_, + receivePort?.pointer ?? ffi.nullptr, + sendPort?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : NSConnection.castFromPointer(_ret, retain: true, release: true); } - set defaultDate(NSDate? value) { - return _lib._objc_msgSend_800( - _id, _lib._sel_setDefaultDate_1, value?._id ?? ffi.nullptr); + NSPort get sendPort { + final _ret = _objc_msgSend_214(this.pointer, _sel_sendPort); + return NSPort.castFromPointer(_ret, retain: true, release: true); } - NSArray get eraSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_eraSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + NSPort get receivePort { + final _ret = _objc_msgSend_214(this.pointer, _sel_receivePort); + return NSPort.castFromPointer(_ret, retain: true, release: true); } - set eraSymbols(NSArray value) { - return _lib._objc_msgSend_801(_id, _lib._sel_setEraSymbols_1, value._id); + void enableMultipleThreads() { + _objc_msgSend_82(this.pointer, _sel_enableMultipleThreads); } - NSArray get monthSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_monthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool get multipleThreadsEnabled { + return _objc_msgSend_7(this.pointer, _sel_multipleThreadsEnabled); } - set monthSymbols(NSArray value) { - return _lib._objc_msgSend_801(_id, _lib._sel_setMonthSymbols_1, value._id); + void addRunLoop_(NSRunLoop runloop) { + _objc_msgSend_241(this.pointer, _sel_addRunLoop_, runloop.pointer); } - NSArray get shortMonthSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_shortMonthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + void removeRunLoop_(NSRunLoop runloop) { + _objc_msgSend_241(this.pointer, _sel_removeRunLoop_, runloop.pointer); } - set shortMonthSymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setShortMonthSymbols_1, value._id); + void runInNewThread() { + _objc_msgSend_82(this.pointer, _sel_runInNewThread); } - NSArray get weekdaySymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_weekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSArray get remoteObjects { + final _ret = _objc_msgSend_6(this.pointer, _sel_remoteObjects); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set weekdaySymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setWeekdaySymbols_1, value._id); + objc.NSArray get localObjects { + final _ret = _objc_msgSend_6(this.pointer, _sel_localObjects); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSArray get shortWeekdaySymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_shortWeekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + void dispatchWithComponents_(objc.NSArray components) { + _objc_msgSend_242( + this.pointer, _sel_dispatchWithComponents_, components.pointer); } - set shortWeekdaySymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setShortWeekdaySymbols_1, value._id); + @override + NSConnection init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSConnection.castFromPointer(_ret, retain: true, release: true); } - NSString get AMSymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_AMSymbol1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSConnection new1() { + final _ret = _objc_msgSend_40(_class_NSConnection, _sel_new); + return NSConnection.castFromPointer(_ret, retain: false, release: true); } - set AMSymbol(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setAMSymbol_1, value._id); + static NSConnection allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSConnection, _sel_allocWithZone_, zone); + return NSConnection.castFromPointer(_ret, retain: false, release: true); } - NSString get PMSymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_PMSymbol1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSConnection alloc() { + final _ret = _objc_msgSend_40(_class_NSConnection, _sel_alloc); + return NSConnection.castFromPointer(_ret, retain: false, release: true); } - set PMSymbol(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setPMSymbol_1, value._id); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSConnection, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSArray get longEraSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_longEraSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSConnection, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - set longEraSymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setLongEraSymbols_1, value._id); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSConnection, _sel_accessInstanceVariablesDirectly); } - NSArray get veryShortMonthSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_veryShortMonthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSConnection, _sel_useStoredAccessor); } - set veryShortMonthSymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setVeryShortMonthSymbols_1, value._id); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSConnection, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSArray get standaloneMonthSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_standaloneMonthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSConnection, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - set standaloneMonthSymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setStandaloneMonthSymbols_1, value._id); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSConnection, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSConnection, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSConnection, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSConnection = objc.getClass("NSConnection"); +late final _sel_statistics = objc.registerName("statistics"); +late final _sel_allConnections = objc.registerName("allConnections"); +late final _sel_defaultConnection = objc.registerName("defaultConnection"); +final _objc_msgSend_219 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_connectionWithRegisteredName_host_ = + objc.registerName("connectionWithRegisteredName:host:"); +final _objc_msgSend_220 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +class NSPortNameServer extends objc.NSObject { + NSPortNameServer._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSArray get shortStandaloneMonthSymbols { - final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_shortStandaloneMonthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + /// Constructs a [NSPortNameServer] that points to the same underlying object as [other]. + NSPortNameServer.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSPortNameServer] that wraps the given raw object pointer. + NSPortNameServer.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSPortNameServer]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSPortNameServer); } - set shortStandaloneMonthSymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setShortStandaloneMonthSymbols_1, value._id); + static NSPortNameServer systemDefaultPortNameServer() { + final _ret = _objc_msgSend_221( + _class_NSPortNameServer, _sel_systemDefaultPortNameServer); + return NSPortNameServer.castFromPointer(_ret, retain: true, release: true); } - NSArray get veryShortStandaloneMonthSymbols { + NSPort? portForName_(objc.NSString name) { final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_veryShortStandaloneMonthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + _objc_msgSend_222(this.pointer, _sel_portForName_, name.pointer); + return _ret.address == 0 + ? null + : NSPort.castFromPointer(_ret, retain: true, release: true); } - set veryShortStandaloneMonthSymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setVeryShortStandaloneMonthSymbols_1, value._id); + NSPort? portForName_host_(objc.NSString name, objc.NSString? host) { + final _ret = _objc_msgSend_223(this.pointer, _sel_portForName_host_, + name.pointer, host?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSPort.castFromPointer(_ret, retain: true, release: true); } - NSArray get veryShortWeekdaySymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_veryShortWeekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool registerPort_name_(NSPort port, objc.NSString name) { + return _objc_msgSend_224( + this.pointer, _sel_registerPort_name_, port.pointer, name.pointer); } - set veryShortWeekdaySymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setVeryShortWeekdaySymbols_1, value._id); + bool removePortForName_(objc.NSString name) { + return _objc_msgSend_51( + this.pointer, _sel_removePortForName_, name.pointer); } - NSArray get standaloneWeekdaySymbols { - final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_standaloneWeekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + @override + NSPortNameServer init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSPortNameServer.castFromPointer(_ret, retain: true, release: true); } - set standaloneWeekdaySymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setStandaloneWeekdaySymbols_1, value._id); + static NSPortNameServer new1() { + final _ret = _objc_msgSend_40(_class_NSPortNameServer, _sel_new); + return NSPortNameServer.castFromPointer(_ret, retain: false, release: true); } - NSArray get shortStandaloneWeekdaySymbols { + static NSPortNameServer allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_shortStandaloneWeekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + _objc_msgSend_47(_class_NSPortNameServer, _sel_allocWithZone_, zone); + return NSPortNameServer.castFromPointer(_ret, retain: false, release: true); } - set shortStandaloneWeekdaySymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setShortStandaloneWeekdaySymbols_1, value._id); + static NSPortNameServer alloc() { + final _ret = _objc_msgSend_40(_class_NSPortNameServer, _sel_alloc); + return NSPortNameServer.castFromPointer(_ret, retain: false, release: true); } - NSArray get veryShortStandaloneWeekdaySymbols { - final _ret = _lib._objc_msgSend_85( - _id, _lib._sel_veryShortStandaloneWeekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSPortNameServer, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - set veryShortStandaloneWeekdaySymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setVeryShortStandaloneWeekdaySymbols_1, value._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSPortNameServer, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSArray get quarterSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_quarterSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSPortNameServer, _sel_accessInstanceVariablesDirectly); } - set quarterSymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setQuarterSymbols_1, value._id); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSPortNameServer, _sel_useStoredAccessor); } - NSArray get shortQuarterSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_shortQuarterSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSPortNameServer, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - set shortQuarterSymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setShortQuarterSymbols_1, value._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSPortNameServer, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSArray get standaloneQuarterSymbols { - final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_standaloneQuarterSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSPortNameServer, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSPortNameServer, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSPortNameServer, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSPortNameServer = objc.getClass("NSPortNameServer"); +late final _sel_systemDefaultPortNameServer = + objc.registerName("systemDefaultPortNameServer"); +final _objc_msgSend_221 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_portForName_ = objc.registerName("portForName:"); +final _objc_msgSend_222 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_portForName_host_ = objc.registerName("portForName:host:"); +final _objc_msgSend_223 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_registerPort_name_ = objc.registerName("registerPort:name:"); +final _objc_msgSend_224 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removePortForName_ = objc.registerName("removePortForName:"); +late final _sel_connectionWithRegisteredName_host_usingNameServer_ = + objc.registerName("connectionWithRegisteredName:host:usingNameServer:"); +final _objc_msgSend_225 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - set standaloneQuarterSymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setStandaloneQuarterSymbols_1, value._id); - } +class NSDistantObject extends NSProxy { + NSDistantObject._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSArray get shortStandaloneQuarterSymbols { - final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_shortStandaloneQuarterSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSDistantObject] that points to the same underlying object as [other]. + NSDistantObject.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSDistantObject] that wraps the given raw object pointer. + NSDistantObject.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - set shortStandaloneQuarterSymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setShortStandaloneQuarterSymbols_1, value._id); + /// Returns whether [obj] is an instance of [NSDistantObject]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSDistantObject); } - NSDate? get gregorianStartDate { - final _ret = _lib._objc_msgSend_183(_id, _lib._sel_gregorianStartDate1); + static objc.NSObject? proxyWithTarget_connection_( + objc.NSObject target, NSConnection connection) { + final _ret = _objc_msgSend_229(_class_NSDistantObject, + _sel_proxyWithTarget_connection_, target.pointer, connection.pointer); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set gregorianStartDate(NSDate? value) { - return _lib._objc_msgSend_800( - _id, _lib._sel_setGregorianStartDate_1, value?._id ?? ffi.nullptr); + NSDistantObject? initWithTarget_connection_( + objc.NSObject target, NSConnection connection) { + final _ret = _objc_msgSend_229(this.pointer, + _sel_initWithTarget_connection_, target.pointer, connection.pointer); + return _ret.address == 0 + ? null + : NSDistantObject.castFromPointer(_ret, retain: true, release: true); } - bool get doesRelativeDateFormatting { - return _lib._objc_msgSend_12(_id, _lib._sel_doesRelativeDateFormatting1); + static objc.NSObject proxyWithLocal_connection_( + objc.NSObject target, NSConnection connection) { + final _ret = _objc_msgSend_230(_class_NSDistantObject, + _sel_proxyWithLocal_connection_, target.pointer, connection.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set doesRelativeDateFormatting(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setDoesRelativeDateFormatting_1, value); + NSDistantObject initWithLocal_connection_( + objc.NSObject target, NSConnection connection) { + final _ret = _objc_msgSend_230(this.pointer, _sel_initWithLocal_connection_, + target.pointer, connection.pointer); + return NSDistantObject.castFromPointer(_ret, retain: true, release: true); } - NSObject initWithDateFormat_allowNaturalLanguage_( - NSString format, bool flag) { - final _ret = _lib._objc_msgSend_30(_id, - _lib._sel_initWithDateFormat_allowNaturalLanguage_1, format._id, flag); - return NSObject._(_ret, _lib, retain: true, release: true); + NSDistantObject? initWithCoder_(objc.NSCoder inCoder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, inCoder.pointer); + return _ret.address == 0 + ? null + : NSDistantObject.castFromPointer(_ret, retain: true, release: true); } - bool allowsNaturalLanguage() { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsNaturalLanguage1); + void setProtocolForProxy_(objc.Protocol? proto) { + _objc_msgSend_232( + this.pointer, _sel_setProtocolForProxy_, proto?.pointer ?? ffi.nullptr); } - @override - NSDateFormatter init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSDateFormatter._(_ret, _lib, retain: true, release: true); + NSConnection get connectionForProxy { + final _ret = _objc_msgSend_219(this.pointer, _sel_connectionForProxy); + return NSConnection.castFromPointer(_ret, retain: true, release: true); } - static NSDateFormatter new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDateFormatter1, _lib._sel_new1); - return NSDateFormatter._(_ret, _lib, retain: false, release: true); + static objc.NSObject alloc() { + final _ret = _objc_msgSend_40(_class_NSDistantObject, _sel_alloc); + return objc.NSObject.castFromPointer(_ret, retain: false, release: true); } - static NSDateFormatter allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSDateFormatter1, _lib._sel_allocWithZone_1, zone); - return NSDateFormatter._(_ret, _lib, retain: false, release: true); + static bool respondsToSelector_(ffi.Pointer aSelector) { + return _objc_msgSend_228( + _class_NSDistantObject, _sel_respondsToSelector_, aSelector); } +} - static NSDateFormatter alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDateFormatter1, _lib._sel_alloc1); - return NSDateFormatter._(_ret, _lib, retain: false, release: true); - } +late final _class_NSDistantObject = objc.getClass("NSDistantObject"); - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSDateFormatter1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } +class NSProxy extends objc.ObjCObjectBase { + NSProxy._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSDateFormatter1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } + /// Constructs a [NSProxy] that points to the same underlying object as [other]. + NSProxy.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSDateFormatter1, - _lib._sel_accessInstanceVariablesDirectly1); - } + /// Constructs a [NSProxy] that wraps the given raw object pointer. + NSProxy.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSDateFormatter1, _lib._sel_useStoredAccessor1); + /// Returns whether [obj] is an instance of [NSProxy]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSProxy); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSDateFormatter1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSObject alloc() { + final _ret = _objc_msgSend_40(_class_NSProxy, _sel_alloc); + return objc.NSObject.castFromPointer(_ret, retain: false, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSDateFormatter1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static objc.NSObject allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSProxy, _sel_allocWithZone_, zone); + return objc.NSObject.castFromPointer(_ret, retain: false, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSDateFormatter1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static objc.NSObject class1() { + final _ret = _objc_msgSend_40(_class_NSProxy, _sel_class); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSDateFormatter1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + void forwardInvocation_(objc.NSInvocation invocation) { + _objc_msgSend_226( + this.pointer, _sel_forwardInvocation_, invocation.pointer); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSDateFormatter1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSMethodSignature? methodSignatureForSelector_( + ffi.Pointer sel) { + final _ret = + _objc_msgSend_227(this.pointer, _sel_methodSignatureForSelector_, sel); + return _ret.address == 0 + ? null + : objc.NSMethodSignature.castFromPointer(_ret, + retain: true, release: true); } -} - -class NSFormatter extends NSObject { - NSFormatter._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSFormatter] that points to the same underlying object as [other]. - static NSFormatter castFrom(T other) { - return NSFormatter._(other._id, other._lib, retain: true, release: true); + void dealloc() { + _objc_msgSend_82(this.pointer, _sel_dealloc); } - /// Returns a [NSFormatter] that wraps the given raw object pointer. - static NSFormatter castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSFormatter._(other, lib, retain: retain, release: release); + void finalize() { + _objc_msgSend_82(this.pointer, _sel_finalize); } - /// Returns whether [obj] is an instance of [NSFormatter]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSFormatter1); + objc.NSString get description { + final _ret = _objc_msgSend_12(this.pointer, _sel_description); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? stringForObjectValue_(NSObject? obj) { - final _ret = _lib._objc_msgSend_747( - _id, _lib._sel_stringForObjectValue_1, obj?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + objc.NSString get debugDescription { + final _ret = _objc_msgSend_12(this.pointer, _sel_debugDescription); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSAttributedString? attributedStringForObjectValue_withDefaultAttributes_( - NSObject obj, NSDictionary? attrs) { - final _ret = _lib._objc_msgSend_748( - _id, - _lib._sel_attributedStringForObjectValue_withDefaultAttributes_1, - obj._id, - attrs?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSAttributedString._(_ret, _lib, retain: true, release: true); + static bool respondsToSelector_(ffi.Pointer aSelector) { + return _objc_msgSend_228( + _class_NSProxy, _sel_respondsToSelector_, aSelector); } - NSString? editingStringForObjectValue_(NSObject obj) { - final _ret = _lib._objc_msgSend_526( - _id, _lib._sel_editingStringForObjectValue_1, obj._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + bool allowsWeakReference() { + return _objc_msgSend_7(this.pointer, _sel_allowsWeakReference); } - bool getObjectValue_forString_errorDescription_( - ffi.Pointer> obj, - NSString string, - ffi.Pointer> error) { - return _lib._objc_msgSend_749( - _id, - _lib._sel_getObjectValue_forString_errorDescription_1, - obj, - string._id, - error); - } + bool retainWeakReference() { + return _objc_msgSend_7(this.pointer, _sel_retainWeakReference); + } +} + +late final _class_NSProxy = objc.getClass("NSProxy"); +late final _sel_class = objc.registerName("class"); +late final _sel_forwardInvocation_ = objc.registerName("forwardInvocation:"); +final _objc_msgSend_226 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_methodSignatureForSelector_ = + objc.registerName("methodSignatureForSelector:"); +final _objc_msgSend_227 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dealloc = objc.registerName("dealloc"); +late final _sel_finalize = objc.registerName("finalize"); +late final _sel_debugDescription = objc.registerName("debugDescription"); +late final _sel_respondsToSelector_ = objc.registerName("respondsToSelector:"); +final _objc_msgSend_228 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_allowsWeakReference = objc.registerName("allowsWeakReference"); +late final _sel_retainWeakReference = objc.registerName("retainWeakReference"); +late final _sel_proxyWithTarget_connection_ = + objc.registerName("proxyWithTarget:connection:"); +final _objc_msgSend_229 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithTarget_connection_ = + objc.registerName("initWithTarget:connection:"); +late final _sel_proxyWithLocal_connection_ = + objc.registerName("proxyWithLocal:connection:"); +final _objc_msgSend_230 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithLocal_connection_ = + objc.registerName("initWithLocal:connection:"); +late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); +final _objc_msgSend_231 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setProtocolForProxy_ = + objc.registerName("setProtocolForProxy:"); +final _objc_msgSend_232 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_connectionForProxy = objc.registerName("connectionForProxy"); +late final _sel_rootProxyForConnectionWithRegisteredName_host_ = + objc.registerName("rootProxyForConnectionWithRegisteredName:host:"); +final _objc_msgSend_233 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_ = + objc.registerName( + "rootProxyForConnectionWithRegisteredName:host:usingNameServer:"); +final _objc_msgSend_234 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_serviceConnectionWithName_rootObject_usingNameServer_ = + objc.registerName("serviceConnectionWithName:rootObject:usingNameServer:"); +final _objc_msgSend_235 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_serviceConnectionWithName_rootObject_ = + objc.registerName("serviceConnectionWithName:rootObject:"); +final _objc_msgSend_236 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_requestTimeout = objc.registerName("requestTimeout"); +late final _sel_setRequestTimeout_ = objc.registerName("setRequestTimeout:"); +late final _sel_replyTimeout = objc.registerName("replyTimeout"); +late final _sel_setReplyTimeout_ = objc.registerName("setReplyTimeout:"); +late final _sel_rootObject = objc.registerName("rootObject"); +late final _sel_setRootObject_ = objc.registerName("setRootObject:"); +late final _sel_independentConversationQueueing = + objc.registerName("independentConversationQueueing"); +late final _sel_setIndependentConversationQueueing_ = + objc.registerName("setIndependentConversationQueueing:"); +late final _sel_rootProxy = objc.registerName("rootProxy"); +final _objc_msgSend_237 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_addRequestMode_ = objc.registerName("addRequestMode:"); +late final _sel_removeRequestMode_ = objc.registerName("removeRequestMode:"); +late final _sel_requestModes = objc.registerName("requestModes"); +late final _sel_registerName_ = objc.registerName("registerName:"); +final _objc_msgSend_238 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_registerName_withNameServer_ = + objc.registerName("registerName:withNameServer:"); +final _objc_msgSend_239 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_connectionWithReceivePort_sendPort_ = + objc.registerName("connectionWithReceivePort:sendPort:"); +final _objc_msgSend_240 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_currentConversation = objc.registerName("currentConversation"); +late final _sel_initWithReceivePort_sendPort_ = + objc.registerName("initWithReceivePort:sendPort:"); +late final _sel_sendPort = objc.registerName("sendPort"); +late final _sel_receivePort = objc.registerName("receivePort"); +late final _sel_enableMultipleThreads = + objc.registerName("enableMultipleThreads"); +late final _sel_multipleThreadsEnabled = + objc.registerName("multipleThreadsEnabled"); +late final _sel_addRunLoop_ = objc.registerName("addRunLoop:"); +final _objc_msgSend_241 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_removeRunLoop_ = objc.registerName("removeRunLoop:"); +late final _sel_runInNewThread = objc.registerName("runInNewThread"); +late final _sel_remoteObjects = objc.registerName("remoteObjects"); +late final _sel_localObjects = objc.registerName("localObjects"); +late final _sel_dispatchWithComponents_ = + objc.registerName("dispatchWithComponents:"); +final _objc_msgSend_242 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_addConnection_toRunLoop_forMode_ = + objc.registerName("addConnection:toRunLoop:forMode:"); +final _objc_msgSend_243 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeConnection_fromRunLoop_forMode_ = + objc.registerName("removeConnection:fromRunLoop:forMode:"); +late final _sel_addPort_forMode_ = objc.registerName("addPort:forMode:"); +final _objc_msgSend_244 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removePort_forMode_ = objc.registerName("removePort:forMode:"); +late final _sel_limitDateForMode_ = objc.registerName("limitDateForMode:"); +late final _sel_acceptInputForMode_beforeDate_ = + objc.registerName("acceptInputForMode:beforeDate:"); +final _objc_msgSend_245 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_run = objc.registerName("run"); +late final _sel_runUntilDate_ = objc.registerName("runUntilDate:"); +final _objc_msgSend_246 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_runMode_beforeDate_ = objc.registerName("runMode:beforeDate:"); +final _objc_msgSend_247 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_configureAsServer = objc.registerName("configureAsServer"); +void _ObjCBlock_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, +) => + block.ref.target + .cast>() + .asFunction()(); +final _ObjCBlock_ffiVoid_closureRegistry = {}; +int _ObjCBlock_ffiVoid_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_registerClosure(void Function() fn) { + final id = ++_ObjCBlock_ffiVoid_closureRegistryIndex; + _ObjCBlock_ffiVoid_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - bool isPartialStringValid_newEditingString_errorDescription_( - NSString partialString, - ffi.Pointer> newString, - ffi.Pointer> error) { - return _lib._objc_msgSend_750( - _id, - _lib._sel_isPartialStringValid_newEditingString_errorDescription_1, - partialString._id, - newString, - error); - } +void _ObjCBlock_ffiVoid_closureTrampoline( + ffi.Pointer block, +) => + _ObjCBlock_ffiVoid_closureRegistry[block.ref.target.address]!(); - bool - isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_( - ffi.Pointer> partialStringPtr, - ffi.Pointer<_NSRange> proposedSelRangePtr, - NSString origString, - _NSRange origSelRange, - ffi.Pointer> error) { - return _lib._objc_msgSend_751( - _id, - _lib._sel_isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_1, - partialStringPtr, - proposedSelRangePtr, - origString._id, - origSelRange, - error); +class ObjCBlock_ffiVoid extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) { + return ObjCBlock_ffiVoid._(pointer, retain: retain, release: release); } - @override - NSFormatter init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSFormatter._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid.fromFunctionPointer( + ffi.Pointer> ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer)>( + _ObjCBlock_ffiVoid_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid.fromFunction(void Function() fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer)>( + _ObjCBlock_ffiVoid_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_registerClosure(() => fn()))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid.listener(void Function() fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_registerClosure(() => fn()))); + static ffi.NativeCallable)>? + _dartFuncListenerTrampoline; + + void call() => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block)>>() + .asFunction)>()( + pointer, + ); +} + +late final _sel_performInModes_block_ = + objc.registerName("performInModes:block:"); +final _objc_msgSend_248 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_performBlock_ = objc.registerName("performBlock:"); +final _objc_msgSend_249 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_performSelector_target_argument_order_modes_ = + objc.registerName("performSelector:target:argument:order:modes:"); +final _objc_msgSend_250 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_cancelPerformSelector_target_argument_ = + objc.registerName("cancelPerformSelector:target:argument:"); +final _objc_msgSend_251 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_cancelPerformSelectorsWithTarget_ = + objc.registerName("cancelPerformSelectorsWithTarget:"); + +class NSFileHandle extends objc.NSObject { + NSFileHandle._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - static NSFormatter new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSFormatter1, _lib._sel_new1); - return NSFormatter._(_ret, _lib, retain: false, release: true); - } + /// Constructs a [NSFileHandle] that points to the same underlying object as [other]. + NSFileHandle.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - static NSFormatter allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSFormatter1, _lib._sel_allocWithZone_1, zone); - return NSFormatter._(_ret, _lib, retain: false, release: true); - } + /// Constructs a [NSFileHandle] that wraps the given raw object pointer. + NSFileHandle.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static NSFormatter alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFormatter1, _lib._sel_alloc1); - return NSFormatter._(_ret, _lib, retain: false, release: true); + /// Returns whether [obj] is an instance of [NSFileHandle]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSFileHandle); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSFormatter1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + objc.NSData get availableData { + final _ret = _objc_msgSend_104(this.pointer, _sel_availableData); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSFormatter1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + NSFileHandle initWithFileDescriptor_closeOnDealloc_(int fd, bool closeopt) { + final _ret = _objc_msgSend_252(this.pointer, + _sel_initWithFileDescriptor_closeOnDealloc_, fd, closeopt); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSFormatter1, _lib._sel_accessInstanceVariablesDirectly1); + NSFileHandle? initWithCoder_(objc.NSCoder coder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSFormatter1, _lib._sel_useStoredAccessor1); + objc.NSData? readDataToEndOfFileAndReturnError_( + ffi.Pointer> error) { + final _ret = _objc_msgSend_253( + this.pointer, _sel_readDataToEndOfFileAndReturnError_, error); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSFormatter1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + objc.NSData? readDataUpToLength_error_( + int length, ffi.Pointer> error) { + final _ret = _objc_msgSend_254( + this.pointer, _sel_readDataUpToLength_error_, length, error); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSFormatter1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + bool writeData_error_( + objc.NSData data, ffi.Pointer> error) { + return _objc_msgSend_255( + this.pointer, _sel_writeData_error_, data.pointer, error); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSFormatter1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + bool getOffset_error_(ffi.Pointer offsetInFile, + ffi.Pointer> error) { + return _objc_msgSend_256( + this.pointer, _sel_getOffset_error_, offsetInFile, error); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSFormatter1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool seekToEndReturningOffset_error_( + ffi.Pointer offsetInFile, + ffi.Pointer> error) { + return _objc_msgSend_256(this.pointer, _sel_seekToEndReturningOffset_error_, + offsetInFile, error); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSFormatter1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + bool seekToOffset_error_( + int offset, ffi.Pointer> error) { + return _objc_msgSend_257( + this.pointer, _sel_seekToOffset_error_, offset, error); } -} - -abstract class NSFormattingContext { - static const int NSFormattingContextUnknown = 0; - static const int NSFormattingContextDynamic = 1; - static const int NSFormattingContextStandalone = 2; - static const int NSFormattingContextListItem = 3; - static const int NSFormattingContextBeginningOfSentence = 4; - static const int NSFormattingContextMiddleOfSentence = 5; -} - -abstract class NSDateFormatterStyle { - static const int NSDateFormatterNoStyle = 0; - static const int NSDateFormatterShortStyle = 1; - static const int NSDateFormatterMediumStyle = 2; - static const int NSDateFormatterLongStyle = 3; - static const int NSDateFormatterFullStyle = 4; -} -abstract class NSDateFormatterBehavior { - static const int NSDateFormatterBehaviorDefault = 0; - static const int NSDateFormatterBehavior10_0 = 1000; - static const int NSDateFormatterBehavior10_4 = 1040; -} + bool truncateAtOffset_error_( + int offset, ffi.Pointer> error) { + return _objc_msgSend_257( + this.pointer, _sel_truncateAtOffset_error_, offset, error); + } -class NSCalendar extends NSObject { - NSCalendar._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + bool synchronizeAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_8( + this.pointer, _sel_synchronizeAndReturnError_, error); + } - /// Returns a [NSCalendar] that points to the same underlying object as [other]. - static NSCalendar castFrom(T other) { - return NSCalendar._(other._id, other._lib, retain: true, release: true); + bool closeAndReturnError_(ffi.Pointer> error) { + return _objc_msgSend_8(this.pointer, _sel_closeAndReturnError_, error); } - /// Returns a [NSCalendar] that wraps the given raw object pointer. - static NSCalendar castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCalendar._(other, lib, retain: retain, release: release); + static NSFileHandle getFileHandleWithStandardInput() { + final _ret = _objc_msgSend_258( + _class_NSFileHandle, _sel_fileHandleWithStandardInput); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSCalendar]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSCalendar1); + static NSFileHandle getFileHandleWithStandardOutput() { + final _ret = _objc_msgSend_258( + _class_NSFileHandle, _sel_fileHandleWithStandardOutput); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - static NSCalendar getCurrentCalendar(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_763( - _lib._class_NSCalendar1, _lib._sel_currentCalendar1); - return NSCalendar._(_ret, _lib, retain: true, release: true); + static NSFileHandle getFileHandleWithStandardError() { + final _ret = _objc_msgSend_258( + _class_NSFileHandle, _sel_fileHandleWithStandardError); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - static NSCalendar getAutoupdatingCurrentCalendar(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_763( - _lib._class_NSCalendar1, _lib._sel_autoupdatingCurrentCalendar1); - return NSCalendar._(_ret, _lib, retain: true, release: true); + static NSFileHandle getFileHandleWithNullDevice() { + final _ret = + _objc_msgSend_258(_class_NSFileHandle, _sel_fileHandleWithNullDevice); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - static NSCalendar? calendarWithIdentifier_( - AVFAudio _lib, NSString calendarIdentifierConstant) { - final _ret = _lib._objc_msgSend_764(_lib._class_NSCalendar1, - _lib._sel_calendarWithIdentifier_1, calendarIdentifierConstant._id); + static NSFileHandle? fileHandleForReadingAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_2( + _class_NSFileHandle, _sel_fileHandleForReadingAtPath_, path.pointer); return _ret.address == 0 ? null - : NSCalendar._(_ret, _lib, retain: true, release: true); + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - @override - NSCalendar init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSCalendar._(_ret, _lib, retain: true, release: true); + static NSFileHandle? fileHandleForWritingAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_2( + _class_NSFileHandle, _sel_fileHandleForWritingAtPath_, path.pointer); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - NSObject? initWithCalendarIdentifier_(NSString ident) { - final _ret = _lib._objc_msgSend_38( - _id, _lib._sel_initWithCalendarIdentifier_1, ident._id); + static NSFileHandle? fileHandleForUpdatingAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_2( + _class_NSFileHandle, _sel_fileHandleForUpdatingAtPath_, path.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - NSString get calendarIdentifier { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_calendarIdentifier1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSFileHandle? fileHandleForReadingFromURL_error_( + objc.NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_259(_class_NSFileHandle, + _sel_fileHandleForReadingFromURL_error_, url.pointer, error); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - NSLocale? get locale { - final _ret = _lib._objc_msgSend_765(_id, _lib._sel_locale1); + static NSFileHandle? fileHandleForWritingToURL_error_( + objc.NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_259(_class_NSFileHandle, + _sel_fileHandleForWritingToURL_error_, url.pointer, error); return _ret.address == 0 ? null - : NSLocale._(_ret, _lib, retain: true, release: true); + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - set locale(NSLocale? value) { - return _lib._objc_msgSend_766( - _id, _lib._sel_setLocale_1, value?._id ?? ffi.nullptr); + static NSFileHandle? fileHandleForUpdatingURL_error_( + objc.NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_259(_class_NSFileHandle, + _sel_fileHandleForUpdatingURL_error_, url.pointer, error); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - NSTimeZone get timeZone { - final _ret = _lib._objc_msgSend_179(_id, _lib._sel_timeZone1); - return NSTimeZone._(_ret, _lib, retain: true, release: true); + void readInBackgroundAndNotifyForModes_(objc.NSArray? modes) { + _objc_msgSend_260(this.pointer, _sel_readInBackgroundAndNotifyForModes_, + modes?.pointer ?? ffi.nullptr); } - set timeZone(NSTimeZone value) { - return _lib._objc_msgSend_180(_id, _lib._sel_setTimeZone_1, value._id); + void readInBackgroundAndNotify() { + _objc_msgSend_82(this.pointer, _sel_readInBackgroundAndNotify); } - int get firstWeekday { - return _lib._objc_msgSend_10(_id, _lib._sel_firstWeekday1); + void readToEndOfFileInBackgroundAndNotifyForModes_(objc.NSArray? modes) { + _objc_msgSend_260( + this.pointer, + _sel_readToEndOfFileInBackgroundAndNotifyForModes_, + modes?.pointer ?? ffi.nullptr); } - set firstWeekday(int value) { - return _lib._objc_msgSend_516(_id, _lib._sel_setFirstWeekday_1, value); + void readToEndOfFileInBackgroundAndNotify() { + _objc_msgSend_82(this.pointer, _sel_readToEndOfFileInBackgroundAndNotify); } - int get minimumDaysInFirstWeek { - return _lib._objc_msgSend_10(_id, _lib._sel_minimumDaysInFirstWeek1); + void acceptConnectionInBackgroundAndNotifyForModes_(objc.NSArray? modes) { + _objc_msgSend_260( + this.pointer, + _sel_acceptConnectionInBackgroundAndNotifyForModes_, + modes?.pointer ?? ffi.nullptr); } - set minimumDaysInFirstWeek(int value) { - return _lib._objc_msgSend_516( - _id, _lib._sel_setMinimumDaysInFirstWeek_1, value); + void acceptConnectionInBackgroundAndNotify() { + _objc_msgSend_82(this.pointer, _sel_acceptConnectionInBackgroundAndNotify); } - NSArray get eraSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_eraSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + void waitForDataInBackgroundAndNotifyForModes_(objc.NSArray? modes) { + _objc_msgSend_260( + this.pointer, + _sel_waitForDataInBackgroundAndNotifyForModes_, + modes?.pointer ?? ffi.nullptr); } - NSArray get longEraSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_longEraSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + void waitForDataInBackgroundAndNotify() { + _objc_msgSend_82(this.pointer, _sel_waitForDataInBackgroundAndNotify); } - NSArray get monthSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_monthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + ObjCBlock_ffiVoid_NSFileHandle? get readabilityHandler { + final _ret = _objc_msgSend_261(this.pointer, _sel_readabilityHandler); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid_NSFileHandle.castFromPointer(_ret, + retain: true, release: true); } - NSArray get shortMonthSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_shortMonthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + set readabilityHandler(ObjCBlock_ffiVoid_NSFileHandle? value) { + return _objc_msgSend_262(this.pointer, _sel_setReadabilityHandler_, + value?.pointer ?? ffi.nullptr); } - NSArray get veryShortMonthSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_veryShortMonthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + ObjCBlock_ffiVoid_NSFileHandle? get writeabilityHandler { + final _ret = _objc_msgSend_261(this.pointer, _sel_writeabilityHandler); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid_NSFileHandle.castFromPointer(_ret, + retain: true, release: true); } - NSArray get standaloneMonthSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_standaloneMonthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + set writeabilityHandler(ObjCBlock_ffiVoid_NSFileHandle? value) { + return _objc_msgSend_262(this.pointer, _sel_setWriteabilityHandler_, + value?.pointer ?? ffi.nullptr); } - NSArray get shortStandaloneMonthSymbols { + NSFileHandle initWithFileDescriptor_(int fd) { final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_shortStandaloneMonthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + _objc_msgSend_263(this.pointer, _sel_initWithFileDescriptor_, fd); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - NSArray get veryShortStandaloneMonthSymbols { - final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_veryShortStandaloneMonthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + int get fileDescriptor { + return _objc_msgSend_264(this.pointer, _sel_fileDescriptor); } - NSArray get weekdaySymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_weekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSData readDataToEndOfFile() { + final _ret = _objc_msgSend_104(this.pointer, _sel_readDataToEndOfFile); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - NSArray get shortWeekdaySymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_shortWeekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSData readDataOfLength_(int length) { + final _ret = + _objc_msgSend_265(this.pointer, _sel_readDataOfLength_, length); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - NSArray get veryShortWeekdaySymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_veryShortWeekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + void writeData_(objc.NSData data) { + _objc_msgSend_266(this.pointer, _sel_writeData_, data.pointer); } - NSArray get standaloneWeekdaySymbols { - final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_standaloneWeekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + int get offsetInFile { + return _objc_msgSend_267(this.pointer, _sel_offsetInFile); } - NSArray get shortStandaloneWeekdaySymbols { - final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_shortStandaloneWeekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + int seekToEndOfFile() { + return _objc_msgSend_267(this.pointer, _sel_seekToEndOfFile); } - NSArray get veryShortStandaloneWeekdaySymbols { - final _ret = _lib._objc_msgSend_85( - _id, _lib._sel_veryShortStandaloneWeekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + void seekToFileOffset_(int offset) { + _objc_msgSend_268(this.pointer, _sel_seekToFileOffset_, offset); } - NSArray get quarterSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_quarterSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + void truncateFileAtOffset_(int offset) { + _objc_msgSend_268(this.pointer, _sel_truncateFileAtOffset_, offset); } - NSArray get shortQuarterSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_shortQuarterSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + void synchronizeFile() { + _objc_msgSend_82(this.pointer, _sel_synchronizeFile); } - NSArray get standaloneQuarterSymbols { - final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_standaloneQuarterSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + void closeFile() { + _objc_msgSend_82(this.pointer, _sel_closeFile); } - NSArray get shortStandaloneQuarterSymbols { - final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_shortStandaloneQuarterSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + @override + NSFileHandle init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - NSString get AMSymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_AMSymbol1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSFileHandle new1() { + final _ret = _objc_msgSend_40(_class_NSFileHandle, _sel_new); + return NSFileHandle.castFromPointer(_ret, retain: false, release: true); } - NSString get PMSymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_PMSymbol1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSFileHandle allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSFileHandle, _sel_allocWithZone_, zone); + return NSFileHandle.castFromPointer(_ret, retain: false, release: true); } - void minimumRangeOfUnit_(ffi.Pointer<_NSRange> stret, int unit) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_767_stret( - stret, _id, _lib._sel_minimumRangeOfUnit_1, unit) - : stret.ref = - _lib._objc_msgSend_767(_id, _lib._sel_minimumRangeOfUnit_1, unit); + static NSFileHandle alloc() { + final _ret = _objc_msgSend_40(_class_NSFileHandle, _sel_alloc); + return NSFileHandle.castFromPointer(_ret, retain: false, release: true); } - void maximumRangeOfUnit_(ffi.Pointer<_NSRange> stret, int unit) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_767_stret( - stret, _id, _lib._sel_maximumRangeOfUnit_1, unit) - : stret.ref = - _lib._objc_msgSend_767(_id, _lib._sel_maximumRangeOfUnit_1, unit); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSFileHandle, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - void rangeOfUnit_inUnit_forDate_( - ffi.Pointer<_NSRange> stret, int smaller, int larger, NSDate date) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_768_stret(stret, _id, - _lib._sel_rangeOfUnit_inUnit_forDate_1, smaller, larger, date._id) - : stret.ref = _lib._objc_msgSend_768(_id, - _lib._sel_rangeOfUnit_inUnit_forDate_1, smaller, larger, date._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSFileHandle, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - int ordinalityOfUnit_inUnit_forDate_(int smaller, int larger, NSDate date) { - return _lib._objc_msgSend_769(_id, - _lib._sel_ordinalityOfUnit_inUnit_forDate_1, smaller, larger, date._id); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSFileHandle, _sel_accessInstanceVariablesDirectly); } - bool rangeOfUnit_startDate_interval_forDate_( - int unit, - ffi.Pointer> datep, - ffi.Pointer tip, - NSDate date) { - return _lib._objc_msgSend_770( - _id, - _lib._sel_rangeOfUnit_startDate_interval_forDate_1, - unit, - datep, - tip, - date._id); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSFileHandle, _sel_useStoredAccessor); } - NSDate? dateFromComponents_(NSDateComponents comps) { - final _ret = - _lib._objc_msgSend_778(_id, _lib._sel_dateFromComponents_1, comps._id); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSFileHandle, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSDateComponents components_fromDate_(int unitFlags, NSDate date) { - final _ret = _lib._objc_msgSend_779( - _id, _lib._sel_components_fromDate_1, unitFlags, date._id); - return NSDateComponents._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSFileHandle, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSDate? dateByAddingComponents_toDate_options_( - NSDateComponents comps, NSDate date, int opts) { - final _ret = _lib._objc_msgSend_780( - _id, - _lib._sel_dateByAddingComponents_toDate_options_1, - comps._id, - date._id, - opts); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSFileHandle, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSFileHandle, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSFileHandle, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSFileHandle = objc.getClass("NSFileHandle"); +late final _sel_availableData = objc.registerName("availableData"); +late final _sel_initWithFileDescriptor_closeOnDealloc_ = + objc.registerName("initWithFileDescriptor:closeOnDealloc:"); +final _objc_msgSend_252 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Int, ffi.Bool)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int, bool)>(); +late final _sel_readDataToEndOfFileAndReturnError_ = + objc.registerName("readDataToEndOfFileAndReturnError:"); +final _objc_msgSend_253 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_readDataUpToLength_error_ = + objc.registerName("readDataUpToLength:error:"); +final _objc_msgSend_254 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_writeData_error_ = objc.registerName("writeData:error:"); +final _objc_msgSend_255 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_getOffset_error_ = objc.registerName("getOffset:error:"); +final _objc_msgSend_256 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_seekToEndReturningOffset_error_ = + objc.registerName("seekToEndReturningOffset:error:"); +late final _sel_seekToOffset_error_ = objc.registerName("seekToOffset:error:"); +final _objc_msgSend_257 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLongLong, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_truncateAtOffset_error_ = + objc.registerName("truncateAtOffset:error:"); +late final _sel_synchronizeAndReturnError_ = + objc.registerName("synchronizeAndReturnError:"); +late final _sel_closeAndReturnError_ = + objc.registerName("closeAndReturnError:"); +late final _sel_fileHandleWithStandardInput = + objc.registerName("fileHandleWithStandardInput"); +final _objc_msgSend_258 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_fileHandleWithStandardOutput = + objc.registerName("fileHandleWithStandardOutput"); +late final _sel_fileHandleWithStandardError = + objc.registerName("fileHandleWithStandardError"); +late final _sel_fileHandleWithNullDevice = + objc.registerName("fileHandleWithNullDevice"); +late final _sel_fileHandleForReadingAtPath_ = + objc.registerName("fileHandleForReadingAtPath:"); +late final _sel_fileHandleForWritingAtPath_ = + objc.registerName("fileHandleForWritingAtPath:"); +late final _sel_fileHandleForUpdatingAtPath_ = + objc.registerName("fileHandleForUpdatingAtPath:"); +late final _sel_fileHandleForReadingFromURL_error_ = + objc.registerName("fileHandleForReadingFromURL:error:"); +final _objc_msgSend_259 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_fileHandleForWritingToURL_error_ = + objc.registerName("fileHandleForWritingToURL:error:"); +late final _sel_fileHandleForUpdatingURL_error_ = + objc.registerName("fileHandleForUpdatingURL:error:"); +late final _sel_readInBackgroundAndNotifyForModes_ = + objc.registerName("readInBackgroundAndNotifyForModes:"); +final _objc_msgSend_260 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_readInBackgroundAndNotify = + objc.registerName("readInBackgroundAndNotify"); +late final _sel_readToEndOfFileInBackgroundAndNotifyForModes_ = + objc.registerName("readToEndOfFileInBackgroundAndNotifyForModes:"); +late final _sel_readToEndOfFileInBackgroundAndNotify = + objc.registerName("readToEndOfFileInBackgroundAndNotify"); +late final _sel_acceptConnectionInBackgroundAndNotifyForModes_ = + objc.registerName("acceptConnectionInBackgroundAndNotifyForModes:"); +late final _sel_acceptConnectionInBackgroundAndNotify = + objc.registerName("acceptConnectionInBackgroundAndNotify"); +late final _sel_waitForDataInBackgroundAndNotifyForModes_ = + objc.registerName("waitForDataInBackgroundAndNotifyForModes:"); +late final _sel_waitForDataInBackgroundAndNotify = + objc.registerName("waitForDataInBackgroundAndNotify"); +void _ObjCBlock_ffiVoid_NSFileHandle_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSFileHandle_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSFileHandle_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - NSDateComponents components_fromDate_toDate_options_( - int unitFlags, NSDate startingDate, NSDate resultDate, int opts) { - final _ret = _lib._objc_msgSend_781( - _id, - _lib._sel_components_fromDate_toDate_options_1, - unitFlags, - startingDate._id, - resultDate._id, - opts); - return NSDateComponents._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry[block.ref.target.address]!( + arg0); - void getEra_year_month_day_fromDate_( - ffi.Pointer eraValuePointer, - ffi.Pointer yearValuePointer, - ffi.Pointer monthValuePointer, - ffi.Pointer dayValuePointer, - NSDate date) { - _lib._objc_msgSend_782( - _id, - _lib._sel_getEra_year_month_day_fromDate_1, - eraValuePointer, - yearValuePointer, - monthValuePointer, - dayValuePointer, - date._id); - } +class ObjCBlock_ffiVoid_NSFileHandle extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSFileHandle._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); - void getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_( - ffi.Pointer eraValuePointer, - ffi.Pointer yearValuePointer, - ffi.Pointer weekValuePointer, - ffi.Pointer weekdayValuePointer, - NSDate date) { - _lib._objc_msgSend_782( - _id, - _lib._sel_getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_1, - eraValuePointer, - yearValuePointer, - weekValuePointer, - weekdayValuePointer, - date._id); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSFileHandle castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSFileHandle._(pointer, + retain: retain, release: release); } - void getHour_minute_second_nanosecond_fromDate_( - ffi.Pointer hourValuePointer, - ffi.Pointer minuteValuePointer, - ffi.Pointer secondValuePointer, - ffi.Pointer nanosecondValuePointer, - NSDate date) { - _lib._objc_msgSend_782( - _id, - _lib._sel_getHour_minute_second_nanosecond_fromDate_1, - hourValuePointer, - minuteValuePointer, - secondValuePointer, - nanosecondValuePointer, - date._id); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSFileHandle.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSFileHandle_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - int component_fromDate_(int unit, NSDate date) { - return _lib._objc_msgSend_783( - _id, _lib._sel_component_fromDate_1, unit, date._id); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSFileHandle.fromFunction(void Function(NSFileHandle) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( + (ffi.Pointer arg0) => fn( + NSFileHandle.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; - NSDate? dateWithEra_year_month_day_hour_minute_second_nanosecond_( - int eraValue, - int yearValue, - int monthValue, - int dayValue, - int hourValue, - int minuteValue, - int secondValue, - int nanosecondValue) { - final _ret = _lib._objc_msgSend_784( - _id, - _lib._sel_dateWithEra_year_month_day_hour_minute_second_nanosecond_1, - eraValue, - yearValue, - monthValue, - dayValue, - hourValue, - minuteValue, - secondValue, - nanosecondValue); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSFileHandle.listener(void Function(NSFileHandle) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( + (ffi.Pointer arg0) => fn( + NSFileHandle.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; - NSDate? - dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_( - int eraValue, - int yearValue, - int weekValue, - int weekdayValue, - int hourValue, - int minuteValue, - int secondValue, - int nanosecondValue) { - final _ret = _lib._objc_msgSend_784( - _id, - _lib._sel_dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_1, - eraValue, - yearValue, - weekValue, - weekdayValue, - hourValue, - minuteValue, - secondValue, - nanosecondValue); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } + void call(NSFileHandle arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(pointer, arg0.pointer); +} + +late final _sel_readabilityHandler = objc.registerName("readabilityHandler"); +final _objc_msgSend_261 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setReadabilityHandler_ = + objc.registerName("setReadabilityHandler:"); +final _objc_msgSend_262 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_writeabilityHandler = objc.registerName("writeabilityHandler"); +late final _sel_setWriteabilityHandler_ = + objc.registerName("setWriteabilityHandler:"); +late final _sel_initWithFileDescriptor_ = + objc.registerName("initWithFileDescriptor:"); +final _objc_msgSend_263 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_fileDescriptor = objc.registerName("fileDescriptor"); +final _objc_msgSend_264 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_readDataToEndOfFile = objc.registerName("readDataToEndOfFile"); +late final _sel_readDataOfLength_ = objc.registerName("readDataOfLength:"); +final _objc_msgSend_265 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_writeData_ = objc.registerName("writeData:"); +final _objc_msgSend_266 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_offsetInFile = objc.registerName("offsetInFile"); +final _objc_msgSend_267 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLongLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_seekToEndOfFile = objc.registerName("seekToEndOfFile"); +late final _sel_seekToFileOffset_ = objc.registerName("seekToFileOffset:"); +final _objc_msgSend_268 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLongLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_truncateFileAtOffset_ = + objc.registerName("truncateFileAtOffset:"); +late final _sel_synchronizeFile = objc.registerName("synchronizeFile"); +late final _sel_closeFile = objc.registerName("closeFile"); + +abstract class NSURLBookmarkCreationOptions { + static const int NSURLBookmarkCreationPreferFileIDResolution = 256; + static const int NSURLBookmarkCreationMinimalBookmark = 512; + static const int NSURLBookmarkCreationSuitableForBookmarkFile = 1024; + static const int NSURLBookmarkCreationWithSecurityScope = 2048; + static const int NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; + static const int NSURLBookmarkCreationWithoutImplicitSecurityScope = + 536870912; +} - NSDate startOfDayForDate_(NSDate date) { - final _ret = - _lib._objc_msgSend_168(_id, _lib._sel_startOfDayForDate_1, date._id); - return NSDate._(_ret, _lib, retain: true, release: true); - } +abstract class NSURLBookmarkResolutionOptions { + static const int NSURLBookmarkResolutionWithoutUI = 256; + static const int NSURLBookmarkResolutionWithoutMounting = 512; + static const int NSURLBookmarkResolutionWithSecurityScope = 1024; + static const int NSURLBookmarkResolutionWithoutImplicitStartAccessing = 32768; +} - NSDateComponents componentsInTimeZone_fromDate_( - NSTimeZone timezone, NSDate date) { - final _ret = _lib._objc_msgSend_785( - _id, _lib._sel_componentsInTimeZone_fromDate_1, timezone._id, date._id); - return NSDateComponents._(_ret, _lib, retain: true, release: true); - } +class NSFileManager extends objc.NSObject { + NSFileManager._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - int compareDate_toDate_toUnitGranularity_( - NSDate date1, NSDate date2, int unit) { - return _lib._objc_msgSend_786( - _id, - _lib._sel_compareDate_toDate_toUnitGranularity_1, - date1._id, - date2._id, - unit); + /// Constructs a [NSFileManager] that points to the same underlying object as [other]. + NSFileManager.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSFileManager] that wraps the given raw object pointer. + NSFileManager.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSFileManager]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSFileManager); } - bool isDate_equalToDate_toUnitGranularity_( - NSDate date1, NSDate date2, int unit) { - return _lib._objc_msgSend_787( - _id, - _lib._sel_isDate_equalToDate_toUnitGranularity_1, - date1._id, - date2._id, - unit); + static NSFileManager getDefaultManager() { + final _ret = _objc_msgSend_269(_class_NSFileManager, _sel_defaultManager); + return NSFileManager.castFromPointer(_ret, retain: true, release: true); } - bool isDate_inSameDayAsDate_(NSDate date1, NSDate date2) { - return _lib._objc_msgSend_788( - _id, _lib._sel_isDate_inSameDayAsDate_1, date1._id, date2._id); + objc.NSArray? mountedVolumeURLsIncludingResourceValuesForKeys_options_( + objc.NSArray? propertyKeys, int options) { + final _ret = _objc_msgSend_270( + this.pointer, + _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_, + propertyKeys?.pointer ?? ffi.nullptr, + options); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool isDateInToday_(NSDate date) { - return _lib._objc_msgSend_170(_id, _lib._sel_isDateInToday_1, date._id); + void unmountVolumeAtURL_options_completionHandler_( + objc.NSURL url, int mask, ObjCBlock_ffiVoid_NSError completionHandler) { + _objc_msgSend_271( + this.pointer, + _sel_unmountVolumeAtURL_options_completionHandler_, + url.pointer, + mask, + completionHandler.pointer); + } + + objc.NSArray? + contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_( + objc.NSURL url, + objc.NSArray? keys, + int mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_272( + this.pointer, + _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_, + url.pointer, + keys?.pointer ?? ffi.nullptr, + mask, + error); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool isDateInYesterday_(NSDate date) { - return _lib._objc_msgSend_170(_id, _lib._sel_isDateInYesterday_1, date._id); + objc.NSArray URLsForDirectory_inDomains_(int directory, int domainMask) { + final _ret = _objc_msgSend_273( + this.pointer, _sel_URLsForDirectory_inDomains_, directory, domainMask); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool isDateInTomorrow_(NSDate date) { - return _lib._objc_msgSend_170(_id, _lib._sel_isDateInTomorrow_1, date._id); + objc.NSURL? URLForDirectory_inDomain_appropriateForURL_create_error_( + int directory, + int domain, + objc.NSURL? url, + bool shouldCreate, + ffi.Pointer> error) { + final _ret = _objc_msgSend_274( + this.pointer, + _sel_URLForDirectory_inDomain_appropriateForURL_create_error_, + directory, + domain, + url?.pointer ?? ffi.nullptr, + shouldCreate, + error); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - bool isDateInWeekend_(NSDate date) { - return _lib._objc_msgSend_170(_id, _lib._sel_isDateInWeekend_1, date._id); + bool getRelationship_ofDirectoryAtURL_toItemAtURL_error_( + ffi.Pointer outRelationship, + objc.NSURL directoryURL, + objc.NSURL otherURL, + ffi.Pointer> error) { + return _objc_msgSend_275( + this.pointer, + _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_, + outRelationship, + directoryURL.pointer, + otherURL.pointer, + error); } - bool rangeOfWeekendStartDate_interval_containingDate_( - ffi.Pointer> datep, - ffi.Pointer tip, - NSDate date) { - return _lib._objc_msgSend_789( - _id, - _lib._sel_rangeOfWeekendStartDate_interval_containingDate_1, - datep, - tip, - date._id); + bool getRelationship_ofDirectory_inDomain_toItemAtURL_error_( + ffi.Pointer outRelationship, + int directory, + int domainMask, + objc.NSURL url, + ffi.Pointer> error) { + return _objc_msgSend_276( + this.pointer, + _sel_getRelationship_ofDirectory_inDomain_toItemAtURL_error_, + outRelationship, + directory, + domainMask, + url.pointer, + error); } - bool nextWeekendStartDate_interval_options_afterDate_( - ffi.Pointer> datep, - ffi.Pointer tip, - int options, - NSDate date) { - return _lib._objc_msgSend_790( - _id, - _lib._sel_nextWeekendStartDate_interval_options_afterDate_1, - datep, - tip, - options, - date._id); + bool createDirectoryAtURL_withIntermediateDirectories_attributes_error_( + objc.NSURL url, + bool createIntermediates, + objc.NSDictionary? attributes, + ffi.Pointer> error) { + return _objc_msgSend_277( + this.pointer, + _sel_createDirectoryAtURL_withIntermediateDirectories_attributes_error_, + url.pointer, + createIntermediates, + attributes?.pointer ?? ffi.nullptr, + error); } - NSDateComponents components_fromDateComponents_toDateComponents_options_( - int unitFlags, - NSDateComponents startingDateComp, - NSDateComponents resultDateComp, - int options) { - final _ret = _lib._objc_msgSend_791( - _id, - _lib._sel_components_fromDateComponents_toDateComponents_options_1, - unitFlags, - startingDateComp._id, - resultDateComp._id, - options); - return NSDateComponents._(_ret, _lib, retain: true, release: true); + bool createSymbolicLinkAtURL_withDestinationURL_error_(objc.NSURL url, + objc.NSURL destURL, ffi.Pointer> error) { + return _objc_msgSend_278( + this.pointer, + _sel_createSymbolicLinkAtURL_withDestinationURL_error_, + url.pointer, + destURL.pointer, + error); } - NSDate? dateByAddingUnit_value_toDate_options_( - int unit, int value, NSDate date, int options) { - final _ret = _lib._objc_msgSend_792( - _id, - _lib._sel_dateByAddingUnit_value_toDate_options_1, - unit, - value, - date._id, - options); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_( - NSDate start, - NSDateComponents comps, - int opts, - ObjCBlock_ffiVoid_NSDate_bool_bool block) { - _lib._objc_msgSend_793( - _id, - _lib._sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_1, - start._id, - comps._id, - opts, - block._id); + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } - NSDate? nextDateAfterDate_matchingComponents_options_( - NSDate date, NSDateComponents comps, int options) { - final _ret = _lib._objc_msgSend_794( - _id, - _lib._sel_nextDateAfterDate_matchingComponents_options_1, - date._id, - comps._id, - options); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + bool setAttributes_ofItemAtPath_error_(objc.NSDictionary attributes, + objc.NSString path, ffi.Pointer> error) { + return _objc_msgSend_279( + this.pointer, + _sel_setAttributes_ofItemAtPath_error_, + attributes.pointer, + path.pointer, + error); } - NSDate? nextDateAfterDate_matchingUnit_value_options_( - NSDate date, int unit, int value, int options) { - final _ret = _lib._objc_msgSend_795( - _id, - _lib._sel_nextDateAfterDate_matchingUnit_value_options_1, - date._id, - unit, - value, - options); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + bool createDirectoryAtPath_withIntermediateDirectories_attributes_error_( + objc.NSString path, + bool createIntermediates, + objc.NSDictionary? attributes, + ffi.Pointer> error) { + return _objc_msgSend_280( + this.pointer, + _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_, + path.pointer, + createIntermediates, + attributes?.pointer ?? ffi.nullptr, + error); } - NSDate? nextDateAfterDate_matchingHour_minute_second_options_(NSDate date, - int hourValue, int minuteValue, int secondValue, int options) { - final _ret = _lib._objc_msgSend_796( - _id, - _lib._sel_nextDateAfterDate_matchingHour_minute_second_options_1, - date._id, - hourValue, - minuteValue, - secondValue, - options); + objc.NSArray? contentsOfDirectoryAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_281(this.pointer, + _sel_contentsOfDirectoryAtPath_error_, path.pointer, error); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSDate? dateBySettingUnit_value_ofDate_options_( - int unit, int v, NSDate date, int opts) { - final _ret = _lib._objc_msgSend_792( - _id, - _lib._sel_dateBySettingUnit_value_ofDate_options_1, - unit, - v, - date._id, - opts); + objc.NSArray? subpathsOfDirectoryAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_281(this.pointer, + _sel_subpathsOfDirectoryAtPath_error_, path.pointer, error); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSDate? dateBySettingHour_minute_second_ofDate_options_( - int h, int m, int s, NSDate date, int opts) { - final _ret = _lib._objc_msgSend_797( - _id, - _lib._sel_dateBySettingHour_minute_second_ofDate_options_1, - h, - m, - s, - date._id, - opts); + objc.NSDictionary? attributesOfItemAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_282( + this.pointer, _sel_attributesOfItemAtPath_error_, path.pointer, error); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - bool date_matchesComponents_(NSDate date, NSDateComponents components) { - return _lib._objc_msgSend_798( - _id, _lib._sel_date_matchesComponents_1, date._id, components._id); - } - - static NSCalendar new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSCalendar1, _lib._sel_new1); - return NSCalendar._(_ret, _lib, retain: false, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSCalendar allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSCalendar1, _lib._sel_allocWithZone_1, zone); - return NSCalendar._(_ret, _lib, retain: false, release: true); + objc.NSDictionary? attributesOfFileSystemForPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_282(this.pointer, + _sel_attributesOfFileSystemForPath_error_, path.pointer, error); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSCalendar alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCalendar1, _lib._sel_alloc1); - return NSCalendar._(_ret, _lib, retain: false, release: true); + bool createSymbolicLinkAtPath_withDestinationPath_error_(objc.NSString path, + objc.NSString destPath, ffi.Pointer> error) { + return _objc_msgSend_283( + this.pointer, + _sel_createSymbolicLinkAtPath_withDestinationPath_error_, + path.pointer, + destPath.pointer, + error); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSCalendar1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + objc.NSString? destinationOfSymbolicLinkAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_284(this.pointer, + _sel_destinationOfSymbolicLinkAtPath_error_, path.pointer, error); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSCalendar1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + bool copyItemAtPath_toPath_error_(objc.NSString srcPath, + objc.NSString dstPath, ffi.Pointer> error) { + return _objc_msgSend_283(this.pointer, _sel_copyItemAtPath_toPath_error_, + srcPath.pointer, dstPath.pointer, error); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSCalendar1, _lib._sel_accessInstanceVariablesDirectly1); + bool moveItemAtPath_toPath_error_(objc.NSString srcPath, + objc.NSString dstPath, ffi.Pointer> error) { + return _objc_msgSend_283(this.pointer, _sel_moveItemAtPath_toPath_error_, + srcPath.pointer, dstPath.pointer, error); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSCalendar1, _lib._sel_useStoredAccessor1); + bool linkItemAtPath_toPath_error_(objc.NSString srcPath, + objc.NSString dstPath, ffi.Pointer> error) { + return _objc_msgSend_283(this.pointer, _sel_linkItemAtPath_toPath_error_, + srcPath.pointer, dstPath.pointer, error); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSCalendar1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + bool removeItemAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + return _objc_msgSend_285( + this.pointer, _sel_removeItemAtPath_error_, path.pointer, error); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSCalendar1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + bool copyItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, + ffi.Pointer> error) { + return _objc_msgSend_278(this.pointer, _sel_copyItemAtURL_toURL_error_, + srcURL.pointer, dstURL.pointer, error); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSCalendar1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + bool moveItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, + ffi.Pointer> error) { + return _objc_msgSend_278(this.pointer, _sel_moveItemAtURL_toURL_error_, + srcURL.pointer, dstURL.pointer, error); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSCalendar1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool linkItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, + ffi.Pointer> error) { + return _objc_msgSend_278(this.pointer, _sel_linkItemAtURL_toURL_error_, + srcURL.pointer, dstURL.pointer, error); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSCalendar1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + bool removeItemAtURL_error_( + objc.NSURL URL, ffi.Pointer> error) { + return _objc_msgSend_286( + this.pointer, _sel_removeItemAtURL_error_, URL.pointer, error); } -} - -abstract class NSCalendarUnit { - static const int NSCalendarUnitEra = 2; - static const int NSCalendarUnitYear = 4; - static const int NSCalendarUnitMonth = 8; - static const int NSCalendarUnitDay = 16; - static const int NSCalendarUnitHour = 32; - static const int NSCalendarUnitMinute = 64; - static const int NSCalendarUnitSecond = 128; - static const int NSCalendarUnitWeekday = 512; - static const int NSCalendarUnitWeekdayOrdinal = 1024; - static const int NSCalendarUnitQuarter = 2048; - static const int NSCalendarUnitWeekOfMonth = 4096; - static const int NSCalendarUnitWeekOfYear = 8192; - static const int NSCalendarUnitYearForWeekOfYear = 16384; - static const int NSCalendarUnitNanosecond = 32768; - static const int NSCalendarUnitCalendar = 1048576; - static const int NSCalendarUnitTimeZone = 2097152; - static const int NSEraCalendarUnit = 2; - static const int NSYearCalendarUnit = 4; - static const int NSMonthCalendarUnit = 8; - static const int NSDayCalendarUnit = 16; - static const int NSHourCalendarUnit = 32; - static const int NSMinuteCalendarUnit = 64; - static const int NSSecondCalendarUnit = 128; - static const int NSWeekCalendarUnit = 256; - static const int NSWeekdayCalendarUnit = 512; - static const int NSWeekdayOrdinalCalendarUnit = 1024; - static const int NSQuarterCalendarUnit = 2048; - static const int NSWeekOfMonthCalendarUnit = 4096; - static const int NSWeekOfYearCalendarUnit = 8192; - static const int NSYearForWeekOfYearCalendarUnit = 16384; - static const int NSCalendarCalendarUnit = 1048576; - static const int NSTimeZoneCalendarUnit = 2097152; -} - -class NSDateComponents extends NSObject { - NSDateComponents._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSDateComponents] that points to the same underlying object as [other]. - static NSDateComponents castFrom(T other) { - return NSDateComponents._(other._id, other._lib, - retain: true, release: true); + bool trashItemAtURL_resultingItemURL_error_( + objc.NSURL url, + ffi.Pointer> outResultingURL, + ffi.Pointer> error) { + return _objc_msgSend_287( + this.pointer, + _sel_trashItemAtURL_resultingItemURL_error_, + url.pointer, + outResultingURL, + error); } - /// Returns a [NSDateComponents] that wraps the given raw object pointer. - static NSDateComponents castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDateComponents._(other, lib, retain: retain, release: release); + objc.NSDictionary? fileAttributesAtPath_traverseLink_( + objc.NSString path, bool yorn) { + final _ret = _objc_msgSend_288(this.pointer, + _sel_fileAttributesAtPath_traverseLink_, path.pointer, yorn); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSDateComponents]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSDateComponents1); + bool changeFileAttributes_atPath_( + objc.NSDictionary attributes, objc.NSString path) { + return _objc_msgSend_289(this.pointer, _sel_changeFileAttributes_atPath_, + attributes.pointer, path.pointer); } - NSCalendar? get calendar { - final _ret = _lib._objc_msgSend_771(_id, _lib._sel_calendar1); + objc.NSArray? directoryContentsAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_290( + this.pointer, _sel_directoryContentsAtPath_, path.pointer); return _ret.address == 0 ? null - : NSCalendar._(_ret, _lib, retain: true, release: true); - } - - set calendar(NSCalendar? value) { - return _lib._objc_msgSend_772( - _id, _lib._sel_setCalendar_1, value?._id ?? ffi.nullptr); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSTimeZone? get timeZone { - final _ret = _lib._objc_msgSend_773(_id, _lib._sel_timeZone1); + objc.NSDictionary? fileSystemAttributesAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_291( + this.pointer, _sel_fileSystemAttributesAtPath_, path.pointer); return _ret.address == 0 ? null - : NSTimeZone._(_ret, _lib, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - set timeZone(NSTimeZone? value) { - return _lib._objc_msgSend_774( - _id, _lib._sel_setTimeZone_1, value?._id ?? ffi.nullptr); + objc.NSString? pathContentOfSymbolicLinkAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_pathContentOfSymbolicLinkAtPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int get era { - return _lib._objc_msgSend_83(_id, _lib._sel_era1); + bool createSymbolicLinkAtPath_pathContent_( + objc.NSString path, objc.NSString otherpath) { + return _objc_msgSend_292( + this.pointer, + _sel_createSymbolicLinkAtPath_pathContent_, + path.pointer, + otherpath.pointer); } - set era(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setEra_1, value); + bool createDirectoryAtPath_attributes_( + objc.NSString path, objc.NSDictionary attributes) { + return _objc_msgSend_293( + this.pointer, + _sel_createDirectoryAtPath_attributes_, + path.pointer, + attributes.pointer); } - int get year { - return _lib._objc_msgSend_83(_id, _lib._sel_year1); + bool linkPath_toPath_handler_( + objc.NSString src, objc.NSString dest, objc.NSObject? handler) { + return _objc_msgSend_294(this.pointer, _sel_linkPath_toPath_handler_, + src.pointer, dest.pointer, handler?.pointer ?? ffi.nullptr); } - set year(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setYear_1, value); + bool copyPath_toPath_handler_( + objc.NSString src, objc.NSString dest, objc.NSObject? handler) { + return _objc_msgSend_294(this.pointer, _sel_copyPath_toPath_handler_, + src.pointer, dest.pointer, handler?.pointer ?? ffi.nullptr); } - int get month { - return _lib._objc_msgSend_83(_id, _lib._sel_month1); + bool movePath_toPath_handler_( + objc.NSString src, objc.NSString dest, objc.NSObject? handler) { + return _objc_msgSend_294(this.pointer, _sel_movePath_toPath_handler_, + src.pointer, dest.pointer, handler?.pointer ?? ffi.nullptr); } - set month(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setMonth_1, value); + bool removeFileAtPath_handler_(objc.NSString path, objc.NSObject? handler) { + return _objc_msgSend_295(this.pointer, _sel_removeFileAtPath_handler_, + path.pointer, handler?.pointer ?? ffi.nullptr); } - int get day { - return _lib._objc_msgSend_83(_id, _lib._sel_day1); + objc.NSString get currentDirectoryPath { + final _ret = _objc_msgSend_12(this.pointer, _sel_currentDirectoryPath); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set day(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setDay_1, value); + bool changeCurrentDirectoryPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_changeCurrentDirectoryPath_, path.pointer); } - int get hour { - return _lib._objc_msgSend_83(_id, _lib._sel_hour1); + bool fileExistsAtPath_(objc.NSString path) { + return _objc_msgSend_51(this.pointer, _sel_fileExistsAtPath_, path.pointer); } - set hour(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setHour_1, value); + bool fileExistsAtPath_isDirectory_( + objc.NSString path, ffi.Pointer isDirectory) { + return _objc_msgSend_296(this.pointer, _sel_fileExistsAtPath_isDirectory_, + path.pointer, isDirectory); } - int get minute { - return _lib._objc_msgSend_83(_id, _lib._sel_minute1); + bool isReadableFileAtPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_isReadableFileAtPath_, path.pointer); } - set minute(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setMinute_1, value); + bool isWritableFileAtPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_isWritableFileAtPath_, path.pointer); } - int get second { - return _lib._objc_msgSend_83(_id, _lib._sel_second1); + bool isExecutableFileAtPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_isExecutableFileAtPath_, path.pointer); } - set second(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setSecond_1, value); + bool isDeletableFileAtPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_isDeletableFileAtPath_, path.pointer); } - int get nanosecond { - return _lib._objc_msgSend_83(_id, _lib._sel_nanosecond1); + bool contentsEqualAtPath_andPath_(objc.NSString path1, objc.NSString path2) { + return _objc_msgSend_292(this.pointer, _sel_contentsEqualAtPath_andPath_, + path1.pointer, path2.pointer); } - set nanosecond(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setNanosecond_1, value); + objc.NSString displayNameAtPath_(objc.NSString path) { + final _ret = + _objc_msgSend_297(this.pointer, _sel_displayNameAtPath_, path.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int get weekday { - return _lib._objc_msgSend_83(_id, _lib._sel_weekday1); + objc.NSArray? componentsToDisplayForPath_(objc.NSString path) { + final _ret = _objc_msgSend_290( + this.pointer, _sel_componentsToDisplayForPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set weekday(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setWeekday_1, value); + objc.NSObject? enumeratorAtPath_(objc.NSString path) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_enumeratorAtPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get weekdayOrdinal { - return _lib._objc_msgSend_83(_id, _lib._sel_weekdayOrdinal1); + objc.NSObject? + enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_( + objc.NSURL url, + objc.NSArray? keys, + int mask, + ObjCBlock_bool_NSURL_NSError? handler) { + final _ret = _objc_msgSend_298( + this.pointer, + _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_, + url.pointer, + keys?.pointer ?? ffi.nullptr, + mask, + handler?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set weekdayOrdinal(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setWeekdayOrdinal_1, value); + objc.NSArray? subpathsAtPath_(objc.NSString path) { + final _ret = + _objc_msgSend_290(this.pointer, _sel_subpathsAtPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int get quarter { - return _lib._objc_msgSend_83(_id, _lib._sel_quarter1); + objc.NSData? contentsAtPath_(objc.NSString path) { + final _ret = + _objc_msgSend_299(this.pointer, _sel_contentsAtPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - set quarter(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setQuarter_1, value); + bool createFileAtPath_contents_attributes_( + objc.NSString path, objc.NSData? data, objc.NSDictionary? attr) { + return _objc_msgSend_300( + this.pointer, + _sel_createFileAtPath_contents_attributes_, + path.pointer, + data?.pointer ?? ffi.nullptr, + attr?.pointer ?? ffi.nullptr); } - int get weekOfMonth { - return _lib._objc_msgSend_83(_id, _lib._sel_weekOfMonth1); + ffi.Pointer fileSystemRepresentationWithPath_(objc.NSString path) { + return _objc_msgSend_301( + this.pointer, _sel_fileSystemRepresentationWithPath_, path.pointer); } - set weekOfMonth(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setWeekOfMonth_1, value); + objc.NSString stringWithFileSystemRepresentation_length_( + ffi.Pointer str, int len) { + final _ret = _objc_msgSend_302(this.pointer, + _sel_stringWithFileSystemRepresentation_length_, str, len); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int get weekOfYear { - return _lib._objc_msgSend_83(_id, _lib._sel_weekOfYear1); + bool + replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_( + objc.NSURL originalItemURL, + objc.NSURL newItemURL, + objc.NSString? backupItemName, + int options, + ffi.Pointer> resultingURL, + ffi.Pointer> error) { + return _objc_msgSend_303( + this.pointer, + _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_, + originalItemURL.pointer, + newItemURL.pointer, + backupItemName?.pointer ?? ffi.nullptr, + options, + resultingURL, + error); } - set weekOfYear(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setWeekOfYear_1, value); + bool setUbiquitous_itemAtURL_destinationURL_error_( + bool flag, + objc.NSURL url, + objc.NSURL destinationURL, + ffi.Pointer> error) { + return _objc_msgSend_304( + this.pointer, + _sel_setUbiquitous_itemAtURL_destinationURL_error_, + flag, + url.pointer, + destinationURL.pointer, + error); } - int get yearForWeekOfYear { - return _lib._objc_msgSend_83(_id, _lib._sel_yearForWeekOfYear1); + bool isUbiquitousItemAtURL_(objc.NSURL url) { + return _objc_msgSend_305( + this.pointer, _sel_isUbiquitousItemAtURL_, url.pointer); } - set yearForWeekOfYear(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setYearForWeekOfYear_1, value); + bool startDownloadingUbiquitousItemAtURL_error_( + objc.NSURL url, ffi.Pointer> error) { + return _objc_msgSend_286(this.pointer, + _sel_startDownloadingUbiquitousItemAtURL_error_, url.pointer, error); } - bool get leapMonth { - return _lib._objc_msgSend_12(_id, _lib._sel_isLeapMonth1); + bool evictUbiquitousItemAtURL_error_( + objc.NSURL url, ffi.Pointer> error) { + return _objc_msgSend_286( + this.pointer, _sel_evictUbiquitousItemAtURL_error_, url.pointer, error); } - set leapMonth(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setLeapMonth_1, value); + objc.NSURL? URLForUbiquityContainerIdentifier_( + objc.NSString? containerIdentifier) { + final _ret = _objc_msgSend_306( + this.pointer, + _sel_URLForUbiquityContainerIdentifier_, + containerIdentifier?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSDate? get date { - final _ret = _lib._objc_msgSend_183(_id, _lib._sel_date1); + objc.NSURL? URLForPublishingUbiquitousItemAtURL_expirationDate_error_( + objc.NSURL url, + ffi.Pointer> outDate, + ffi.Pointer> error) { + final _ret = _objc_msgSend_307( + this.pointer, + _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_, + url.pointer, + outDate, + error); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - int week() { - return _lib._objc_msgSend_83(_id, _lib._sel_week1); + objc.NSObject? get ubiquityIdentityToken { + final _ret = _objc_msgSend_66(this.pointer, _sel_ubiquityIdentityToken); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void setWeek_(int v) { - _lib._objc_msgSend_423(_id, _lib._sel_setWeek_1, v); + void getFileProviderServicesForItemAtURL_completionHandler_(objc.NSURL url, + ObjCBlock_ffiVoid_NSDictionary_NSError completionHandler) { + _objc_msgSend_308( + this.pointer, + _sel_getFileProviderServicesForItemAtURL_completionHandler_, + url.pointer, + completionHandler.pointer); } - void setValue_forComponent_(int value, int unit) { - _lib._objc_msgSend_775(_id, _lib._sel_setValue_forComponent_1, value, unit); + objc.NSURL? containerURLForSecurityApplicationGroupIdentifier_( + objc.NSString groupIdentifier) { + final _ret = _objc_msgSend_11( + this.pointer, + _sel_containerURLForSecurityApplicationGroupIdentifier_, + groupIdentifier.pointer); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - int valueForComponent_(int unit) { - return _lib._objc_msgSend_776(_id, _lib._sel_valueForComponent_1, unit); + objc.NSURL get homeDirectoryForCurrentUser { + final _ret = + _objc_msgSend_9(this.pointer, _sel_homeDirectoryForCurrentUser); + return objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - bool get validDate { - return _lib._objc_msgSend_12(_id, _lib._sel_isValidDate1); + objc.NSURL get temporaryDirectory { + final _ret = _objc_msgSend_9(this.pointer, _sel_temporaryDirectory); + return objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - bool isValidDateInCalendar_(NSCalendar calendar) { - return _lib._objc_msgSend_777( - _id, _lib._sel_isValidDateInCalendar_1, calendar._id); + objc.NSURL? homeDirectoryForUser_(objc.NSString userName) { + final _ret = _objc_msgSend_11( + this.pointer, _sel_homeDirectoryForUser_, userName.pointer); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } @override - NSDateComponents init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSDateComponents._(_ret, _lib, retain: true, release: true); + NSFileManager init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSFileManager.castFromPointer(_ret, retain: true, release: true); } - static NSDateComponents new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDateComponents1, _lib._sel_new1); - return NSDateComponents._(_ret, _lib, retain: false, release: true); + static NSFileManager new1() { + final _ret = _objc_msgSend_40(_class_NSFileManager, _sel_new); + return NSFileManager.castFromPointer(_ret, retain: false, release: true); } - static NSDateComponents allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSDateComponents1, _lib._sel_allocWithZone_1, zone); - return NSDateComponents._(_ret, _lib, retain: false, release: true); + static NSFileManager allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSFileManager, _sel_allocWithZone_, zone); + return NSFileManager.castFromPointer(_ret, retain: false, release: true); } - static NSDateComponents alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDateComponents1, _lib._sel_alloc1); - return NSDateComponents._(_ret, _lib, retain: false, release: true); + static NSFileManager alloc() { + final _ret = _objc_msgSend_40(_class_NSFileManager, _sel_alloc); + return NSFileManager.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSDateComponents1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSFileManager, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSDateComponents1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSFileManager, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSDateComponents1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSFileManager, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSDateComponents1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSFileManager, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSDateComponents1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSFileManager, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSDateComponents1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSFileManager, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSDateComponents1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSFileManager, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSDateComponents1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSFileManager, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSDateComponents1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSFileManager, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -abstract class NSCalendarOptions { - static const int NSCalendarWrapComponents = 1; - static const int NSCalendarMatchStrictly = 2; - static const int NSCalendarSearchBackwards = 4; - static const int NSCalendarMatchPreviousTimePreservingSmallerUnits = 256; - static const int NSCalendarMatchNextTimePreservingSmallerUnits = 512; - static const int NSCalendarMatchNextTime = 1024; - static const int NSCalendarMatchFirst = 4096; - static const int NSCalendarMatchLast = 8192; +late final _class_NSFileManager = objc.getClass("NSFileManager"); +late final _sel_defaultManager = objc.registerName("defaultManager"); +final _objc_msgSend_269 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSVolumeEnumerationOptions { + static const int NSVolumeEnumerationSkipHiddenVolumes = 2; + static const int NSVolumeEnumerationProduceFileReferenceURLs = 4; } -void _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => +late final _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_ = objc + .registerName("mountedVolumeURLsIncludingResourceValuesForKeys:options:"); +final _objc_msgSend_270 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); + +abstract class NSFileManagerUnmountOptions { + static const int NSFileManagerUnmountAllPartitionsAndEjectDisk = 1; + static const int NSFileManagerUnmountWithoutUI = 2; +} + +void _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, bool, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry = , bool, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( - void Function(ffi.Pointer, bool, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry[id] = fn; + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSError_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSError_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); +void _ObjCBlock_ffiVoid_NSError_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSError_closureRegistry[block.ref.target.address]!(arg0); -class ObjCBlock_ffiVoid_NSDate_bool_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSDate_bool_bool._(ffi.Pointer<_ObjCBlock> id, AVFAudio lib, +class ObjCBlock_ffiVoid_NSError extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSError._(ffi.Pointer pointer, {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSDate_bool_bool castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSDate_bool_bool._(pointer, lib, + static ObjCBlock_ffiVoid_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSError._(pointer, retain: retain, release: release); } @@ -60262,25 +12482,18 @@ class ObjCBlock_ffiVoid_NSDate_bool_bool extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSDate_bool_bool.fromFunctionPointer( - AVFAudio lib, + ObjCBlock_ffiVoid_NSError.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>> + ffi.Void Function(ffi.Pointer arg0)>> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline) + .cast(), + ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. @@ -60288,23 +12501,18 @@ class ObjCBlock_ffiVoid_NSDate_bool_bool extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSDate_bool_bool.fromFunction( - AVFAudio lib, void Function(NSDate?, bool, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSDate._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); + ObjCBlock_ffiVoid_NSError.fromFunction(void Function(objc.NSError?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSError_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSError.castFromPointer(arg0, + retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -60316,1896 +12524,3558 @@ class ObjCBlock_ffiVoid_NSDate_bool_bool extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSDate_bool_bool.listener( - AVFAudio lib, void Function(NSDate?, bool, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSDate._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); + ObjCBlock_ffiVoid_NSError.listener(void Function(objc.NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSError_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSError.castFromPointer(arg0, retain: true, release: true))))); static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Bool, ffi.Pointer)>? _dartFuncListenerTrampoline; + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; - void call(NSDate? arg0, bool arg1, ffi.Pointer arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer, bool, ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1, arg2); + void call(objc.NSError? arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr); +} + +late final _sel_unmountVolumeAtURL_options_completionHandler_ = + objc.registerName("unmountVolumeAtURL:options:completionHandler:"); +final _objc_msgSend_271 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + +abstract class NSDirectoryEnumerationOptions { + static const int NSDirectoryEnumerationSkipsSubdirectoryDescendants = 1; + static const int NSDirectoryEnumerationSkipsPackageDescendants = 2; + static const int NSDirectoryEnumerationSkipsHiddenFiles = 4; + static const int NSDirectoryEnumerationIncludesDirectoriesPostOrder = 8; + static const int NSDirectoryEnumerationProducesRelativePathURLs = 16; } -class NSNumberFormatter extends NSFormatter { - NSNumberFormatter._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +late final _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_ = + objc.registerName( + "contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:"); +final _objc_msgSend_272 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - /// Returns a [NSNumberFormatter] that points to the same underlying object as [other]. - static NSNumberFormatter castFrom(T other) { - return NSNumberFormatter._(other._id, other._lib, - retain: true, release: true); - } +abstract class NSSearchPathDirectory { + static const int NSApplicationDirectory = 1; + static const int NSDemoApplicationDirectory = 2; + static const int NSDeveloperApplicationDirectory = 3; + static const int NSAdminApplicationDirectory = 4; + static const int NSLibraryDirectory = 5; + static const int NSDeveloperDirectory = 6; + static const int NSUserDirectory = 7; + static const int NSDocumentationDirectory = 8; + static const int NSDocumentDirectory = 9; + static const int NSCoreServiceDirectory = 10; + static const int NSAutosavedInformationDirectory = 11; + static const int NSDesktopDirectory = 12; + static const int NSCachesDirectory = 13; + static const int NSApplicationSupportDirectory = 14; + static const int NSDownloadsDirectory = 15; + static const int NSInputMethodsDirectory = 16; + static const int NSMoviesDirectory = 17; + static const int NSMusicDirectory = 18; + static const int NSPicturesDirectory = 19; + static const int NSPrinterDescriptionDirectory = 20; + static const int NSSharedPublicDirectory = 21; + static const int NSPreferencePanesDirectory = 22; + static const int NSApplicationScriptsDirectory = 23; + static const int NSItemReplacementDirectory = 99; + static const int NSAllApplicationsDirectory = 100; + static const int NSAllLibrariesDirectory = 101; + static const int NSTrashDirectory = 102; +} - /// Returns a [NSNumberFormatter] that wraps the given raw object pointer. - static NSNumberFormatter castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNumberFormatter._(other, lib, retain: retain, release: release); - } +abstract class NSSearchPathDomainMask { + static const int NSUserDomainMask = 1; + static const int NSLocalDomainMask = 2; + static const int NSNetworkDomainMask = 4; + static const int NSSystemDomainMask = 8; + static const int NSAllDomainsMask = 65535; +} - /// Returns whether [obj] is an instance of [NSNumberFormatter]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSNumberFormatter1); - } +late final _sel_URLsForDirectory_inDomains_ = + objc.registerName("URLsForDirectory:inDomains:"); +final _objc_msgSend_273 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, int)>(); +late final _sel_URLForDirectory_inDomain_appropriateForURL_create_error_ = objc + .registerName("URLForDirectory:inDomain:appropriateForURL:create:error:"); +final _objc_msgSend_274 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer, + ffi.Bool, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer, + bool, + ffi.Pointer>)>(); - int get formattingContext { - return _lib._objc_msgSend_752(_id, _lib._sel_formattingContext1); - } +abstract class NSURLRelationship { + static const int NSURLRelationshipContains = 0; + static const int NSURLRelationshipSame = 1; + static const int NSURLRelationshipOther = 2; +} - set formattingContext(int value) { - return _lib._objc_msgSend_753(_id, _lib._sel_setFormattingContext_1, value); - } +late final _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_ = + objc.registerName("getRelationship:ofDirectoryAtURL:toItemAtURL:error:"); +final _objc_msgSend_275 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_getRelationship_ofDirectory_inDomain_toItemAtURL_error_ = objc + .registerName("getRelationship:ofDirectory:inDomain:toItemAtURL:error:"); +final _objc_msgSend_276 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_createDirectoryAtURL_withIntermediateDirectories_attributes_error_ = + objc.registerName( + "createDirectoryAtURL:withIntermediateDirectories:attributes:error:"); +final _objc_msgSend_277 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_createSymbolicLinkAtURL_withDestinationURL_error_ = + objc.registerName("createSymbolicLinkAtURL:withDestinationURL:error:"); +final _objc_msgSend_278 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_setAttributes_ofItemAtPath_error_ = + objc.registerName("setAttributes:ofItemAtPath:error:"); +final _objc_msgSend_279 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_ = + objc.registerName( + "createDirectoryAtPath:withIntermediateDirectories:attributes:error:"); +final _objc_msgSend_280 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_contentsOfDirectoryAtPath_error_ = + objc.registerName("contentsOfDirectoryAtPath:error:"); +final _objc_msgSend_281 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_subpathsOfDirectoryAtPath_error_ = + objc.registerName("subpathsOfDirectoryAtPath:error:"); +late final _sel_attributesOfItemAtPath_error_ = + objc.registerName("attributesOfItemAtPath:error:"); +final _objc_msgSend_282 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_attributesOfFileSystemForPath_error_ = + objc.registerName("attributesOfFileSystemForPath:error:"); +late final _sel_createSymbolicLinkAtPath_withDestinationPath_error_ = + objc.registerName("createSymbolicLinkAtPath:withDestinationPath:error:"); +final _objc_msgSend_283 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_destinationOfSymbolicLinkAtPath_error_ = + objc.registerName("destinationOfSymbolicLinkAtPath:error:"); +final _objc_msgSend_284 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_copyItemAtPath_toPath_error_ = + objc.registerName("copyItemAtPath:toPath:error:"); +late final _sel_moveItemAtPath_toPath_error_ = + objc.registerName("moveItemAtPath:toPath:error:"); +late final _sel_linkItemAtPath_toPath_error_ = + objc.registerName("linkItemAtPath:toPath:error:"); +late final _sel_removeItemAtPath_error_ = + objc.registerName("removeItemAtPath:error:"); +final _objc_msgSend_285 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_copyItemAtURL_toURL_error_ = + objc.registerName("copyItemAtURL:toURL:error:"); +late final _sel_moveItemAtURL_toURL_error_ = + objc.registerName("moveItemAtURL:toURL:error:"); +late final _sel_linkItemAtURL_toURL_error_ = + objc.registerName("linkItemAtURL:toURL:error:"); +late final _sel_removeItemAtURL_error_ = + objc.registerName("removeItemAtURL:error:"); +final _objc_msgSend_286 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_trashItemAtURL_resultingItemURL_error_ = + objc.registerName("trashItemAtURL:resultingItemURL:error:"); +final _objc_msgSend_287 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); +late final _sel_fileAttributesAtPath_traverseLink_ = + objc.registerName("fileAttributesAtPath:traverseLink:"); +final _objc_msgSend_288 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_changeFileAttributes_atPath_ = + objc.registerName("changeFileAttributes:atPath:"); +final _objc_msgSend_289 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_directoryContentsAtPath_ = + objc.registerName("directoryContentsAtPath:"); +final _objc_msgSend_290 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_fileSystemAttributesAtPath_ = + objc.registerName("fileSystemAttributesAtPath:"); +final _objc_msgSend_291 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_pathContentOfSymbolicLinkAtPath_ = + objc.registerName("pathContentOfSymbolicLinkAtPath:"); +late final _sel_createSymbolicLinkAtPath_pathContent_ = + objc.registerName("createSymbolicLinkAtPath:pathContent:"); +final _objc_msgSend_292 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_createDirectoryAtPath_attributes_ = + objc.registerName("createDirectoryAtPath:attributes:"); +final _objc_msgSend_293 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_linkPath_toPath_handler_ = + objc.registerName("linkPath:toPath:handler:"); +final _objc_msgSend_294 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_copyPath_toPath_handler_ = + objc.registerName("copyPath:toPath:handler:"); +late final _sel_movePath_toPath_handler_ = + objc.registerName("movePath:toPath:handler:"); +late final _sel_removeFileAtPath_handler_ = + objc.registerName("removeFileAtPath:handler:"); +final _objc_msgSend_295 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_currentDirectoryPath = + objc.registerName("currentDirectoryPath"); +late final _sel_changeCurrentDirectoryPath_ = + objc.registerName("changeCurrentDirectoryPath:"); +late final _sel_fileExistsAtPath_ = objc.registerName("fileExistsAtPath:"); +late final _sel_fileExistsAtPath_isDirectory_ = + objc.registerName("fileExistsAtPath:isDirectory:"); +final _objc_msgSend_296 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_isReadableFileAtPath_ = + objc.registerName("isReadableFileAtPath:"); +late final _sel_isWritableFileAtPath_ = + objc.registerName("isWritableFileAtPath:"); +late final _sel_isExecutableFileAtPath_ = + objc.registerName("isExecutableFileAtPath:"); +late final _sel_isDeletableFileAtPath_ = + objc.registerName("isDeletableFileAtPath:"); +late final _sel_contentsEqualAtPath_andPath_ = + objc.registerName("contentsEqualAtPath:andPath:"); +late final _sel_displayNameAtPath_ = objc.registerName("displayNameAtPath:"); +final _objc_msgSend_297 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_componentsToDisplayForPath_ = + objc.registerName("componentsToDisplayForPath:"); +late final _sel_enumeratorAtPath_ = objc.registerName("enumeratorAtPath:"); +bool _ObjCBlock_bool_NSURL_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_bool_NSURL_NSError_closureRegistry = , ffi.Pointer)>{}; +int _ObjCBlock_bool_NSURL_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_bool_NSURL_NSError_registerClosure( + bool Function(ffi.Pointer, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_bool_NSURL_NSError_closureRegistryIndex; + _ObjCBlock_bool_NSURL_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - bool getObjectValue_forString_range_error_( - ffi.Pointer> obj, - NSString string, - ffi.Pointer<_NSRange> rangep, - ffi.Pointer> error) { - return _lib._objc_msgSend_754( - _id, - _lib._sel_getObjectValue_forString_range_error_1, - obj, - string._id, - rangep, - error); - } +bool _ObjCBlock_bool_NSURL_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_bool_NSURL_NSError_closureRegistry[block.ref.target.address]!( + arg0, arg1); - NSString? stringFromNumber_(NSNumber number) { - final _ret = - _lib._objc_msgSend_802(_id, _lib._sel_stringFromNumber_1, number._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock_bool_NSURL_NSError extends objc.ObjCBlockBase { + ObjCBlock_bool_NSURL_NSError._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); - NSNumber? numberFromString_(NSString string) { - final _ret = - _lib._objc_msgSend_803(_id, _lib._sel_numberFromString_1, string._id); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_bool_NSURL_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_bool_NSURL_NSError._(pointer, + retain: retain, release: release); } - static NSString localizedStringFromNumber_numberStyle_( - AVFAudio _lib, NSNumber num, int nstyle) { - final _ret = _lib._objc_msgSend_804(_lib._class_NSNumberFormatter1, - _lib._sel_localizedStringFromNumber_numberStyle_1, num._id, nstyle); - return NSString._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_NSURL_NSError.fromFunctionPointer( + ffi.Pointer arg0, ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_NSURL_NSError_fnPtrTrampoline, false) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - static int defaultFormatterBehavior(AVFAudio _lib) { - return _lib._objc_msgSend_805( - _lib._class_NSNumberFormatter1, _lib._sel_defaultFormatterBehavior1); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_NSURL_NSError.fromFunction(bool Function(objc.NSURL, objc.NSError) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_NSURL_NSError_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_NSURL_NSError_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(objc.NSURL.castFromPointer(arg0, retain: true, release: true), objc.NSError.castFromPointer(arg1, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; - static void setDefaultFormatterBehavior_(AVFAudio _lib, int behavior) { - _lib._objc_msgSend_806(_lib._class_NSNumberFormatter1, - _lib._sel_setDefaultFormatterBehavior_1, behavior); - } + bool call(objc.NSURL arg0, objc.NSError arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1.pointer); +} + +late final _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_ = + objc.registerName( + "enumeratorAtURL:includingPropertiesForKeys:options:errorHandler:"); +final _objc_msgSend_298 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_subpathsAtPath_ = objc.registerName("subpathsAtPath:"); +late final _sel_contentsAtPath_ = objc.registerName("contentsAtPath:"); +final _objc_msgSend_299 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_createFileAtPath_contents_attributes_ = + objc.registerName("createFileAtPath:contents:attributes:"); +final _objc_msgSend_300 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_fileSystemRepresentationWithPath_ = + objc.registerName("fileSystemRepresentationWithPath:"); +final _objc_msgSend_301 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_stringWithFileSystemRepresentation_length_ = + objc.registerName("stringWithFileSystemRepresentation:length:"); +final _objc_msgSend_302 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); - int get numberStyle { - return _lib._objc_msgSend_807(_id, _lib._sel_numberStyle1); - } +abstract class NSFileManagerItemReplacementOptions { + static const int NSFileManagerItemReplacementUsingNewMetadataOnly = 1; + static const int NSFileManagerItemReplacementWithoutDeletingBackupItem = 2; +} - set numberStyle(int value) { - return _lib._objc_msgSend_808(_id, _lib._sel_setNumberStyle_1, value); - } +late final _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_ = + objc.registerName( + "replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error:"); +final _objc_msgSend_303 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>)>(); +late final _sel_setUbiquitous_itemAtURL_destinationURL_error_ = + objc.registerName("setUbiquitous:itemAtURL:destinationURL:error:"); +final _objc_msgSend_304 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_isUbiquitousItemAtURL_ = + objc.registerName("isUbiquitousItemAtURL:"); +final _objc_msgSend_305 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_startDownloadingUbiquitousItemAtURL_error_ = + objc.registerName("startDownloadingUbiquitousItemAtURL:error:"); +late final _sel_evictUbiquitousItemAtURL_error_ = + objc.registerName("evictUbiquitousItemAtURL:error:"); +late final _sel_URLForUbiquityContainerIdentifier_ = + objc.registerName("URLForUbiquityContainerIdentifier:"); +final _objc_msgSend_306 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_ = objc + .registerName("URLForPublishingUbiquitousItemAtURL:expirationDate:error:"); +final _objc_msgSend_307 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); +late final _sel_ubiquityIdentityToken = + objc.registerName("ubiquityIdentityToken"); +void _ObjCBlock_ffiVoid_NSDictionary_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry = , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - NSLocale get locale { - final _ret = _lib._objc_msgSend_197(_id, _lib._sel_locale1); - return NSLocale._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1); - set locale(NSLocale value) { - return _lib._objc_msgSend_762(_id, _lib._sel_setLocale_1, value._id); - } +class ObjCBlock_ffiVoid_NSDictionary_NSError extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSDictionary_NSError._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); - bool get generatesDecimalNumbers { - return _lib._objc_msgSend_12(_id, _lib._sel_generatesDecimalNumbers1); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSDictionary_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSDictionary_NSError._(pointer, + retain: retain, release: release); } - set generatesDecimalNumbers(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setGeneratesDecimalNumbers_1, value); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSDictionary_NSError.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSError_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSDictionary_NSError.fromFunction( + void Function(objc.NSDictionary?, objc.NSError?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : objc.NSDictionary.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : objc.NSError.castFromPointer(arg1, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSDictionary_NSError.listener( + void Function(objc.NSDictionary?, objc.NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : objc.NSDictionary.castFromPointer(arg0, + retain: true, release: true), + arg1.address == 0 ? null : objc.NSError.castFromPointer(arg1, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(objc.NSDictionary? arg0, objc.NSError? arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr, arg1?.pointer ?? ffi.nullptr); +} + +late final _sel_getFileProviderServicesForItemAtURL_completionHandler_ = + objc.registerName("getFileProviderServicesForItemAtURL:completionHandler:"); +final _objc_msgSend_308 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_containerURLForSecurityApplicationGroupIdentifier_ = + objc.registerName("containerURLForSecurityApplicationGroupIdentifier:"); +late final _sel_homeDirectoryForCurrentUser = + objc.registerName("homeDirectoryForCurrentUser"); +late final _sel_temporaryDirectory = objc.registerName("temporaryDirectory"); +late final _sel_homeDirectoryForUser_ = + objc.registerName("homeDirectoryForUser:"); + +class NSHTTPCookieStorage extends objc.NSObject { + NSHTTPCookieStorage._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSHTTPCookieStorage] that points to the same underlying object as [other]. + NSHTTPCookieStorage.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - int get formatterBehavior { - return _lib._objc_msgSend_805(_id, _lib._sel_formatterBehavior1); - } + /// Constructs a [NSHTTPCookieStorage] that wraps the given raw object pointer. + NSHTTPCookieStorage.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - set formatterBehavior(int value) { - return _lib._objc_msgSend_809(_id, _lib._sel_setFormatterBehavior_1, value); + /// Returns whether [obj] is an instance of [NSHTTPCookieStorage]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSHTTPCookieStorage); } - NSString get negativeFormat { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_negativeFormat1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSHTTPCookieStorage getSharedHTTPCookieStorage() { + final _ret = _objc_msgSend_309( + _class_NSHTTPCookieStorage, _sel_sharedHTTPCookieStorage); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } - set negativeFormat(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setNegativeFormat_1, value._id); + static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( + objc.NSString identifier) { + final _ret = _objc_msgSend_310( + _class_NSHTTPCookieStorage, + _sel_sharedCookieStorageForGroupContainerIdentifier_, + identifier.pointer); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } - NSDictionary? get textAttributesForNegativeValues { - final _ret = - _lib._objc_msgSend_390(_id, _lib._sel_textAttributesForNegativeValues1); + objc.NSArray? get cookies { + final _ret = _objc_msgSend_69(this.pointer, _sel_cookies); return _ret.address == 0 ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set textAttributesForNegativeValues(NSDictionary? value) { - return _lib._objc_msgSend_634( - _id, - _lib._sel_setTextAttributesForNegativeValues_1, - value?._id ?? ffi.nullptr); + void setCookie_(NSHTTPCookie cookie) { + _objc_msgSend_315(this.pointer, _sel_setCookie_, cookie.pointer); } - NSString get positiveFormat { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_positiveFormat1); - return NSString._(_ret, _lib, retain: true, release: true); + void deleteCookie_(NSHTTPCookie cookie) { + _objc_msgSend_315(this.pointer, _sel_deleteCookie_, cookie.pointer); } - set positiveFormat(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setPositiveFormat_1, value._id); + void removeCookiesSinceDate_(objc.NSDate date) { + _objc_msgSend_246(this.pointer, _sel_removeCookiesSinceDate_, date.pointer); } - NSDictionary? get textAttributesForPositiveValues { + objc.NSArray? cookiesForURL_(objc.NSURL URL) { final _ret = - _lib._objc_msgSend_390(_id, _lib._sel_textAttributesForPositiveValues1); + _objc_msgSend_316(this.pointer, _sel_cookiesForURL_, URL.pointer); return _ret.address == 0 ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set textAttributesForPositiveValues(NSDictionary? value) { - return _lib._objc_msgSend_634( - _id, - _lib._sel_setTextAttributesForPositiveValues_1, - value?._id ?? ffi.nullptr); + void setCookies_forURL_mainDocumentURL_( + objc.NSArray cookies, objc.NSURL? URL, objc.NSURL? mainDocumentURL) { + _objc_msgSend_317( + this.pointer, + _sel_setCookies_forURL_mainDocumentURL_, + cookies.pointer, + URL?.pointer ?? ffi.nullptr, + mainDocumentURL?.pointer ?? ffi.nullptr); } - bool get allowsFloats { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsFloats1); + int get cookieAcceptPolicy { + return _objc_msgSend_318(this.pointer, _sel_cookieAcceptPolicy); } - set allowsFloats(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setAllowsFloats_1, value); + set cookieAcceptPolicy(int value) { + return _objc_msgSend_319(this.pointer, _sel_setCookieAcceptPolicy_, value); } - NSString get decimalSeparator { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_decimalSeparator1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSArray sortedCookiesUsingDescriptors_(objc.NSArray sortOrder) { + final _ret = _objc_msgSend_67( + this.pointer, _sel_sortedCookiesUsingDescriptors_, sortOrder.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set decimalSeparator(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setDecimalSeparator_1, value._id); + void storeCookies_forTask_(objc.NSArray cookies, NSURLSessionTask task) { + _objc_msgSend_353(this.pointer, _sel_storeCookies_forTask_, cookies.pointer, + task.pointer); } - bool get alwaysShowsDecimalSeparator { - return _lib._objc_msgSend_12(_id, _lib._sel_alwaysShowsDecimalSeparator1); + void getCookiesForTask_completionHandler_( + NSURLSessionTask task, ObjCBlock_ffiVoid_NSArray completionHandler) { + _objc_msgSend_354(this.pointer, _sel_getCookiesForTask_completionHandler_, + task.pointer, completionHandler.pointer); } - set alwaysShowsDecimalSeparator(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setAlwaysShowsDecimalSeparator_1, value); + @override + NSHTTPCookieStorage init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } - NSString get currencyDecimalSeparator { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_currencyDecimalSeparator1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSHTTPCookieStorage new1() { + final _ret = _objc_msgSend_40(_class_NSHTTPCookieStorage, _sel_new); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: false, release: true); } - set currencyDecimalSeparator(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setCurrencyDecimalSeparator_1, value._id); + static NSHTTPCookieStorage allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSHTTPCookieStorage, _sel_allocWithZone_, zone); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: false, release: true); } - bool get usesGroupingSeparator { - return _lib._objc_msgSend_12(_id, _lib._sel_usesGroupingSeparator1); + static NSHTTPCookieStorage alloc() { + final _ret = _objc_msgSend_40(_class_NSHTTPCookieStorage, _sel_alloc); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: false, release: true); } - set usesGroupingSeparator(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setUsesGroupingSeparator_1, value); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSHTTPCookieStorage, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSString get groupingSeparator { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_groupingSeparator1); - return NSString._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSHTTPCookieStorage, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - set groupingSeparator(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setGroupingSeparator_1, value._id); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSHTTPCookieStorage, _sel_accessInstanceVariablesDirectly); } - NSString? get zeroSymbol { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_zeroSymbol1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSHTTPCookieStorage, _sel_useStoredAccessor); } - set zeroSymbol(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setZeroSymbol_1, value?._id ?? ffi.nullptr); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSHTTPCookieStorage, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get textAttributesForZero { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_textAttributesForZero1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSHTTPCookieStorage, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - set textAttributesForZero(NSDictionary? value) { - return _lib._objc_msgSend_634( - _id, _lib._sel_setTextAttributesForZero_1, value?._id ?? ffi.nullptr); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSHTTPCookieStorage, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSHTTPCookieStorage, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSHTTPCookieStorage, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSHTTPCookieStorage = objc.getClass("NSHTTPCookieStorage"); +late final _sel_sharedHTTPCookieStorage = + objc.registerName("sharedHTTPCookieStorage"); +final _objc_msgSend_309 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_sharedCookieStorageForGroupContainerIdentifier_ = + objc.registerName("sharedCookieStorageForGroupContainerIdentifier:"); +final _objc_msgSend_310 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_cookies = objc.registerName("cookies"); + +class NSHTTPCookie extends objc.NSObject { + NSHTTPCookie._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSString get nilSymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_nilSymbol1); - return NSString._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSHTTPCookie] that points to the same underlying object as [other]. + NSHTTPCookie.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - set nilSymbol(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setNilSymbol_1, value._id); + /// Constructs a [NSHTTPCookie] that wraps the given raw object pointer. + NSHTTPCookie.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSHTTPCookie]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSHTTPCookie); } - NSDictionary? get textAttributesForNil { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_textAttributesForNil1); + NSHTTPCookie? initWithProperties_(objc.NSDictionary properties) { + final _ret = _objc_msgSend_311( + this.pointer, _sel_initWithProperties_, properties.pointer); return _ret.address == 0 ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - set textAttributesForNil(NSDictionary? value) { - return _lib._objc_msgSend_634( - _id, _lib._sel_setTextAttributesForNil_1, value?._id ?? ffi.nullptr); - } - - NSString get notANumberSymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_notANumberSymbol1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - set notANumberSymbol(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setNotANumberSymbol_1, value._id); + : NSHTTPCookie.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get textAttributesForNotANumber { - final _ret = - _lib._objc_msgSend_390(_id, _lib._sel_textAttributesForNotANumber1); + static NSHTTPCookie? cookieWithProperties_(objc.NSDictionary properties) { + final _ret = _objc_msgSend_312( + _class_NSHTTPCookie, _sel_cookieWithProperties_, properties.pointer); return _ret.address == 0 ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - set textAttributesForNotANumber(NSDictionary? value) { - return _lib._objc_msgSend_634(_id, - _lib._sel_setTextAttributesForNotANumber_1, value?._id ?? ffi.nullptr); + : NSHTTPCookie.castFromPointer(_ret, retain: true, release: true); } - NSString get positiveInfinitySymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_positiveInfinitySymbol1); - return NSString._(_ret, _lib, retain: true, release: true); + static objc.NSDictionary requestHeaderFieldsWithCookies_( + objc.NSArray cookies) { + final _ret = _objc_msgSend_313(_class_NSHTTPCookie, + _sel_requestHeaderFieldsWithCookies_, cookies.pointer); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - set positiveInfinitySymbol(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setPositiveInfinitySymbol_1, value._id); + static objc.NSArray cookiesWithResponseHeaderFields_forURL_( + objc.NSDictionary headerFields, objc.NSURL URL) { + final _ret = _objc_msgSend_314( + _class_NSHTTPCookie, + _sel_cookiesWithResponseHeaderFields_forURL_, + headerFields.pointer, + URL.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get textAttributesForPositiveInfinity { - final _ret = _lib._objc_msgSend_390( - _id, _lib._sel_textAttributesForPositiveInfinity1); + objc.NSDictionary? get properties { + final _ret = _objc_msgSend_65(this.pointer, _sel_properties); return _ret.address == 0 ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - set textAttributesForPositiveInfinity(NSDictionary? value) { - return _lib._objc_msgSend_634( - _id, - _lib._sel_setTextAttributesForPositiveInfinity_1, - value?._id ?? ffi.nullptr); + int get version { + return _objc_msgSend_29(this.pointer, _sel_version); } - NSString get negativeInfinitySymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_negativeInfinitySymbol1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSString get name { + final _ret = _objc_msgSend_12(this.pointer, _sel_name); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set negativeInfinitySymbol(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setNegativeInfinitySymbol_1, value._id); + objc.NSString get value { + final _ret = _objc_msgSend_12(this.pointer, _sel_value); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get textAttributesForNegativeInfinity { - final _ret = _lib._objc_msgSend_390( - _id, _lib._sel_textAttributesForNegativeInfinity1); + objc.NSDate? get expiresDate { + final _ret = _objc_msgSend_116(this.pointer, _sel_expiresDate); return _ret.address == 0 ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - set textAttributesForNegativeInfinity(NSDictionary? value) { - return _lib._objc_msgSend_634( - _id, - _lib._sel_setTextAttributesForNegativeInfinity_1, - value?._id ?? ffi.nullptr); - } - - NSString get positivePrefix { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_positivePrefix1); - return NSString._(_ret, _lib, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - set positivePrefix(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setPositivePrefix_1, value._id); + bool get sessionOnly { + return _objc_msgSend_7(this.pointer, _sel_isSessionOnly); } - NSString get positiveSuffix { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_positiveSuffix1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSString get domain { + final _ret = _objc_msgSend_12(this.pointer, _sel_domain); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set positiveSuffix(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setPositiveSuffix_1, value._id); + objc.NSString get path { + final _ret = _objc_msgSend_12(this.pointer, _sel_path); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString get negativePrefix { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_negativePrefix1); - return NSString._(_ret, _lib, retain: true, release: true); + bool get secure { + return _objc_msgSend_7(this.pointer, _sel_isSecure); } - set negativePrefix(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setNegativePrefix_1, value._id); + bool get HTTPOnly { + return _objc_msgSend_7(this.pointer, _sel_isHTTPOnly); } - NSString get negativeSuffix { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_negativeSuffix1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSString? get comment { + final _ret = _objc_msgSend_13(this.pointer, _sel_comment); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set negativeSuffix(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setNegativeSuffix_1, value._id); + objc.NSURL? get commentURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_commentURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSString get currencyCode { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_currencyCode1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSArray? get portList { + final _ret = _objc_msgSend_69(this.pointer, _sel_portList); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set currencyCode(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setCurrencyCode_1, value._id); + objc.NSString? get sameSitePolicy { + final _ret = _objc_msgSend_13(this.pointer, _sel_sameSitePolicy); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString get currencySymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_currencySymbol1); - return NSString._(_ret, _lib, retain: true, release: true); + @override + NSHTTPCookie init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSHTTPCookie.castFromPointer(_ret, retain: true, release: true); } - set currencySymbol(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setCurrencySymbol_1, value._id); + static NSHTTPCookie new1() { + final _ret = _objc_msgSend_40(_class_NSHTTPCookie, _sel_new); + return NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); } - NSString get internationalCurrencySymbol { + static NSHTTPCookie allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_internationalCurrencySymbol1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - set internationalCurrencySymbol(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setInternationalCurrencySymbol_1, value._id); + _objc_msgSend_47(_class_NSHTTPCookie, _sel_allocWithZone_, zone); + return NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); } - NSString get percentSymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_percentSymbol1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSHTTPCookie alloc() { + final _ret = _objc_msgSend_40(_class_NSHTTPCookie, _sel_alloc); + return NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); } - set percentSymbol(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setPercentSymbol_1, value._id); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSHTTPCookie, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSString get perMillSymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_perMillSymbol1); - return NSString._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSHTTPCookie, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - set perMillSymbol(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setPerMillSymbol_1, value._id); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSHTTPCookie, _sel_accessInstanceVariablesDirectly); } - NSString get minusSign { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_minusSign1); - return NSString._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSHTTPCookie, _sel_useStoredAccessor); } - set minusSign(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setMinusSign_1, value._id); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSHTTPCookie, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSString get plusSign { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_plusSign1); - return NSString._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSHTTPCookie, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - set plusSign(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setPlusSign_1, value._id); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSHTTPCookie, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSHTTPCookie, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSHTTPCookie, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSHTTPCookie = objc.getClass("NSHTTPCookie"); +late final _sel_initWithProperties_ = objc.registerName("initWithProperties:"); +final _objc_msgSend_311 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_cookieWithProperties_ = + objc.registerName("cookieWithProperties:"); +final _objc_msgSend_312 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_requestHeaderFieldsWithCookies_ = + objc.registerName("requestHeaderFieldsWithCookies:"); +final _objc_msgSend_313 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_cookiesWithResponseHeaderFields_forURL_ = + objc.registerName("cookiesWithResponseHeaderFields:forURL:"); +final _objc_msgSend_314 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_properties = objc.registerName("properties"); +late final _sel_version = objc.registerName("version"); +late final _sel_value = objc.registerName("value"); +late final _sel_expiresDate = objc.registerName("expiresDate"); +late final _sel_isSessionOnly = objc.registerName("isSessionOnly"); +late final _sel_domain = objc.registerName("domain"); +late final _sel_path = objc.registerName("path"); +late final _sel_isSecure = objc.registerName("isSecure"); +late final _sel_isHTTPOnly = objc.registerName("isHTTPOnly"); +late final _sel_comment = objc.registerName("comment"); +late final _sel_commentURL = objc.registerName("commentURL"); +late final _sel_portList = objc.registerName("portList"); +late final _sel_sameSitePolicy = objc.registerName("sameSitePolicy"); +late final _sel_setCookie_ = objc.registerName("setCookie:"); +final _objc_msgSend_315 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_deleteCookie_ = objc.registerName("deleteCookie:"); +late final _sel_removeCookiesSinceDate_ = + objc.registerName("removeCookiesSinceDate:"); +late final _sel_cookiesForURL_ = objc.registerName("cookiesForURL:"); +final _objc_msgSend_316 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCookies_forURL_mainDocumentURL_ = + objc.registerName("setCookies:forURL:mainDocumentURL:"); +final _objc_msgSend_317 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - NSString get exponentSymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_exponentSymbol1); - return NSString._(_ret, _lib, retain: true, release: true); - } +abstract class NSHTTPCookieAcceptPolicy { + static const int NSHTTPCookieAcceptPolicyAlways = 0; + static const int NSHTTPCookieAcceptPolicyNever = 1; + static const int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2; +} - set exponentSymbol(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setExponentSymbol_1, value._id); - } +late final _sel_cookieAcceptPolicy = objc.registerName("cookieAcceptPolicy"); +final _objc_msgSend_318 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCookieAcceptPolicy_ = + objc.registerName("setCookieAcceptPolicy:"); +final _objc_msgSend_319 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_sortedCookiesUsingDescriptors_ = + objc.registerName("sortedCookiesUsingDescriptors:"); + +class NSURLSessionTask extends objc.NSObject { + NSURLSessionTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - int get groupingSize { - return _lib._objc_msgSend_10(_id, _lib._sel_groupingSize1); - } + /// Constructs a [NSURLSessionTask] that points to the same underlying object as [other]. + NSURLSessionTask.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - set groupingSize(int value) { - return _lib._objc_msgSend_516(_id, _lib._sel_setGroupingSize_1, value); - } + /// Constructs a [NSURLSessionTask] that wraps the given raw object pointer. + NSURLSessionTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - int get secondaryGroupingSize { - return _lib._objc_msgSend_10(_id, _lib._sel_secondaryGroupingSize1); + /// Returns whether [obj] is an instance of [NSURLSessionTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionTask); } - set secondaryGroupingSize(int value) { - return _lib._objc_msgSend_516( - _id, _lib._sel_setSecondaryGroupingSize_1, value); + int get taskIdentifier { + return _objc_msgSend_29(this.pointer, _sel_taskIdentifier); } - NSNumber? get multiplier { - final _ret = _lib._objc_msgSend_215(_id, _lib._sel_multiplier1); + NSURLRequest? get originalRequest { + final _ret = _objc_msgSend_343(this.pointer, _sel_originalRequest); return _ret.address == 0 ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } - - set multiplier(NSNumber? value) { - return _lib._objc_msgSend_670( - _id, _lib._sel_setMultiplier_1, value?._id ?? ffi.nullptr); - } - - int get formatWidth { - return _lib._objc_msgSend_10(_id, _lib._sel_formatWidth1); - } - - set formatWidth(int value) { - return _lib._objc_msgSend_516(_id, _lib._sel_setFormatWidth_1, value); - } - - NSString get paddingCharacter { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_paddingCharacter1); - return NSString._(_ret, _lib, retain: true, release: true); + : NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - set paddingCharacter(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setPaddingCharacter_1, value._id); + NSURLRequest? get currentRequest { + final _ret = _objc_msgSend_343(this.pointer, _sel_currentRequest); + return _ret.address == 0 + ? null + : NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - int get paddingPosition { - return _lib._objc_msgSend_810(_id, _lib._sel_paddingPosition1); + NSURLResponse? get response { + final _ret = _objc_msgSend_346(this.pointer, _sel_response); + return _ret.address == 0 + ? null + : NSURLResponse.castFromPointer(_ret, retain: true, release: true); } - set paddingPosition(int value) { - return _lib._objc_msgSend_811(_id, _lib._sel_setPaddingPosition_1, value); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get roundingMode { - return _lib._objc_msgSend_812(_id, _lib._sel_roundingMode1); + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } - set roundingMode(int value) { - return _lib._objc_msgSend_813(_id, _lib._sel_setRoundingMode_1, value); + objc.NSProgress get progress { + final _ret = _objc_msgSend_347(this.pointer, _sel_progress); + return objc.NSProgress.castFromPointer(_ret, retain: true, release: true); } - NSNumber get roundingIncrement { - final _ret = _lib._objc_msgSend_814(_id, _lib._sel_roundingIncrement1); - return NSNumber._(_ret, _lib, retain: true, release: true); + objc.NSDate? get earliestBeginDate { + final _ret = _objc_msgSend_116(this.pointer, _sel_earliestBeginDate); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - set roundingIncrement(NSNumber value) { - return _lib._objc_msgSend_815( - _id, _lib._sel_setRoundingIncrement_1, value._id); + set earliestBeginDate(objc.NSDate? value) { + return _objc_msgSend_162(this.pointer, _sel_setEarliestBeginDate_, + value?.pointer ?? ffi.nullptr); } - int get minimumIntegerDigits { - return _lib._objc_msgSend_10(_id, _lib._sel_minimumIntegerDigits1); + int get countOfBytesClientExpectsToSend { + return _objc_msgSend_348( + this.pointer, _sel_countOfBytesClientExpectsToSend); } - set minimumIntegerDigits(int value) { - return _lib._objc_msgSend_516( - _id, _lib._sel_setMinimumIntegerDigits_1, value); + set countOfBytesClientExpectsToSend(int value) { + return _objc_msgSend_349( + this.pointer, _sel_setCountOfBytesClientExpectsToSend_, value); } - int get maximumIntegerDigits { - return _lib._objc_msgSend_10(_id, _lib._sel_maximumIntegerDigits1); + int get countOfBytesClientExpectsToReceive { + return _objc_msgSend_348( + this.pointer, _sel_countOfBytesClientExpectsToReceive); } - set maximumIntegerDigits(int value) { - return _lib._objc_msgSend_516( - _id, _lib._sel_setMaximumIntegerDigits_1, value); + set countOfBytesClientExpectsToReceive(int value) { + return _objc_msgSend_349( + this.pointer, _sel_setCountOfBytesClientExpectsToReceive_, value); } - int get minimumFractionDigits { - return _lib._objc_msgSend_10(_id, _lib._sel_minimumFractionDigits1); + int get countOfBytesSent { + return _objc_msgSend_348(this.pointer, _sel_countOfBytesSent); } - set minimumFractionDigits(int value) { - return _lib._objc_msgSend_516( - _id, _lib._sel_setMinimumFractionDigits_1, value); + int get countOfBytesReceived { + return _objc_msgSend_348(this.pointer, _sel_countOfBytesReceived); } - int get maximumFractionDigits { - return _lib._objc_msgSend_10(_id, _lib._sel_maximumFractionDigits1); + int get countOfBytesExpectedToSend { + return _objc_msgSend_348(this.pointer, _sel_countOfBytesExpectedToSend); } - set maximumFractionDigits(int value) { - return _lib._objc_msgSend_516( - _id, _lib._sel_setMaximumFractionDigits_1, value); + int get countOfBytesExpectedToReceive { + return _objc_msgSend_348(this.pointer, _sel_countOfBytesExpectedToReceive); } - NSNumber? get minimum { - final _ret = _lib._objc_msgSend_215(_id, _lib._sel_minimum1); + objc.NSString? get taskDescription { + final _ret = _objc_msgSend_13(this.pointer, _sel_taskDescription); return _ret.address == 0 ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } - - set minimum(NSNumber? value) { - return _lib._objc_msgSend_670( - _id, _lib._sel_setMinimum_1, value?._id ?? ffi.nullptr); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSNumber? get maximum { - final _ret = _lib._objc_msgSend_215(_id, _lib._sel_maximum1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + set taskDescription(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setTaskDescription_, value?.pointer ?? ffi.nullptr); } - set maximum(NSNumber? value) { - return _lib._objc_msgSend_670( - _id, _lib._sel_setMaximum_1, value?._id ?? ffi.nullptr); + void cancel() { + _objc_msgSend_82(this.pointer, _sel_cancel); } - NSString get currencyGroupingSeparator { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_currencyGroupingSeparator1); - return NSString._(_ret, _lib, retain: true, release: true); + int get state { + return _objc_msgSend_350(this.pointer, _sel_state); } - set currencyGroupingSeparator(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setCurrencyGroupingSeparator_1, value._id); + objc.NSError? get error { + final _ret = _objc_msgSend_328(this.pointer, _sel_error); + return _ret.address == 0 + ? null + : objc.NSError.castFromPointer(_ret, retain: true, release: true); } - bool get lenient { - return _lib._objc_msgSend_12(_id, _lib._sel_isLenient1); + void suspend() { + _objc_msgSend_82(this.pointer, _sel_suspend); } - set lenient(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setLenient_1, value); + void resume() { + _objc_msgSend_82(this.pointer, _sel_resume); } - bool get usesSignificantDigits { - return _lib._objc_msgSend_12(_id, _lib._sel_usesSignificantDigits1); + double get priority { + return objc.useMsgSendVariants + ? _objc_msgSend_351Fpret(this.pointer, _sel_priority) + : _objc_msgSend_351(this.pointer, _sel_priority); } - set usesSignificantDigits(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setUsesSignificantDigits_1, value); + set priority(double value) { + return _objc_msgSend_352(this.pointer, _sel_setPriority_, value); } - int get minimumSignificantDigits { - return _lib._objc_msgSend_10(_id, _lib._sel_minimumSignificantDigits1); + bool get prefersIncrementalDelivery { + return _objc_msgSend_7(this.pointer, _sel_prefersIncrementalDelivery); } - set minimumSignificantDigits(int value) { - return _lib._objc_msgSend_516( - _id, _lib._sel_setMinimumSignificantDigits_1, value); + set prefersIncrementalDelivery(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setPrefersIncrementalDelivery_, value); } - int get maximumSignificantDigits { - return _lib._objc_msgSend_10(_id, _lib._sel_maximumSignificantDigits1); + @override + NSURLSessionTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionTask.castFromPointer(_ret, retain: true, release: true); } - set maximumSignificantDigits(int value) { - return _lib._objc_msgSend_516( - _id, _lib._sel_setMaximumSignificantDigits_1, value); + static NSURLSessionTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionTask, _sel_new); + return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); } - bool get partialStringValidationEnabled { - return _lib._objc_msgSend_12( - _id, _lib._sel_isPartialStringValidationEnabled1); + static NSURLSessionTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLSessionTask, _sel_allocWithZone_, zone); + return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); } - set partialStringValidationEnabled(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setPartialStringValidationEnabled_1, value); + static NSURLSessionTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionTask, _sel_alloc); + return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); } - bool get hasThousandSeparators { - return _lib._objc_msgSend_12(_id, _lib._sel_hasThousandSeparators1); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - set hasThousandSeparators(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setHasThousandSeparators_1, value); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSString get thousandSeparator { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_thousandSeparator1); - return NSString._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLSessionTask, _sel_accessInstanceVariablesDirectly); } - set thousandSeparator(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setThousandSeparator_1, value._id); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLSessionTask, _sel_useStoredAccessor); } - bool get localizesFormat { - return _lib._objc_msgSend_12(_id, _lib._sel_localizesFormat1); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - set localizesFormat(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setLocalizesFormat_1, value); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionTask, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSString get format { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_format1); - return NSString._(_ret, _lib, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - set format(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setFormat_1, value._id); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSAttributedString get attributedStringForZero { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _lib._objc_msgSend_735(_id, _lib._sel_attributedStringForZero1); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + _objc_msgSend_40(_class_NSURLSessionTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - set attributedStringForZero(NSAttributedString value) { - return _lib._objc_msgSend_816( - _id, _lib._sel_setAttributedStringForZero_1, value._id); - } +late final _class_NSURLSessionTask = objc.getClass("NSURLSessionTask"); +late final _sel_taskIdentifier = objc.registerName("taskIdentifier"); - NSAttributedString get attributedStringForNil { - final _ret = _lib._objc_msgSend_735(_id, _lib._sel_attributedStringForNil1); - return NSAttributedString._(_ret, _lib, retain: true, release: true); - } +class NSURLRequest extends objc.NSObject { + NSURLRequest._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - set attributedStringForNil(NSAttributedString value) { - return _lib._objc_msgSend_816( - _id, _lib._sel_setAttributedStringForNil_1, value._id); - } + /// Constructs a [NSURLRequest] that points to the same underlying object as [other]. + NSURLRequest.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSAttributedString get attributedStringForNotANumber { - final _ret = - _lib._objc_msgSend_735(_id, _lib._sel_attributedStringForNotANumber1); - return NSAttributedString._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSURLRequest] that wraps the given raw object pointer. + NSURLRequest.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - set attributedStringForNotANumber(NSAttributedString value) { - return _lib._objc_msgSend_816( - _id, _lib._sel_setAttributedStringForNotANumber_1, value._id); + /// Returns whether [obj] is an instance of [NSURLRequest]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLRequest); } - NSDecimalNumberHandler get roundingBehavior { - final _ret = _lib._objc_msgSend_817(_id, _lib._sel_roundingBehavior1); - return NSDecimalNumberHandler._(_ret, _lib, retain: true, release: true); + static NSURLRequest requestWithURL_(objc.NSURL URL) { + final _ret = _objc_msgSend_320( + _class_NSURLRequest, _sel_requestWithURL_, URL.pointer); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - set roundingBehavior(NSDecimalNumberHandler value) { - return _lib._objc_msgSend_819( - _id, _lib._sel_setRoundingBehavior_1, value._id); + static bool getSupportsSecureCoding() { + return _objc_msgSend_7(_class_NSURLRequest, _sel_supportsSecureCoding); } - @override - NSNumberFormatter init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSNumberFormatter._(_ret, _lib, retain: true, release: true); + static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( + objc.NSURL URL, int cachePolicy, double timeoutInterval) { + final _ret = _objc_msgSend_321( + _class_NSURLRequest, + _sel_requestWithURL_cachePolicy_timeoutInterval_, + URL.pointer, + cachePolicy, + timeoutInterval); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - static NSNumberFormatter new1(AVFAudio _lib) { + NSURLRequest initWithURL_(objc.NSURL URL) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSNumberFormatter1, _lib._sel_new1); - return NSNumberFormatter._(_ret, _lib, retain: false, release: true); - } - - static NSNumberFormatter allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSNumberFormatter1, _lib._sel_allocWithZone_1, zone); - return NSNumberFormatter._(_ret, _lib, retain: false, release: true); + _objc_msgSend_320(this.pointer, _sel_initWithURL_, URL.pointer); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - static NSNumberFormatter alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSNumberFormatter1, _lib._sel_alloc1); - return NSNumberFormatter._(_ret, _lib, retain: false, release: true); + NSURLRequest initWithURL_cachePolicy_timeoutInterval_( + objc.NSURL URL, int cachePolicy, double timeoutInterval) { + final _ret = _objc_msgSend_321( + this.pointer, + _sel_initWithURL_cachePolicy_timeoutInterval_, + URL.pointer, + cachePolicy, + timeoutInterval); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSNumberFormatter1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + objc.NSURL? get URL { + final _ret = _objc_msgSend_10(this.pointer, _sel_URL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSNumberFormatter1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + int get cachePolicy { + return _objc_msgSend_322(this.pointer, _sel_cachePolicy); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSNumberFormatter1, - _lib._sel_accessInstanceVariablesDirectly1); + double get timeoutInterval { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_timeoutInterval) + : _objc_msgSend_115(this.pointer, _sel_timeoutInterval); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSNumberFormatter1, _lib._sel_useStoredAccessor1); + objc.NSURL? get mainDocumentURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_mainDocumentURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSNumberFormatter1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + int get networkServiceType { + return _objc_msgSend_323(this.pointer, _sel_networkServiceType); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSNumberFormatter1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + bool get allowsCellularAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsCellularAccess); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSNumberFormatter1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + bool get allowsExpensiveNetworkAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsExpensiveNetworkAccess); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSNumberFormatter1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool get allowsConstrainedNetworkAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsConstrainedNetworkAccess); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSNumberFormatter1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + bool get assumesHTTP3Capable { + return _objc_msgSend_7(this.pointer, _sel_assumesHTTP3Capable); } -} - -abstract class NSNumberFormatterStyle { - static const int NSNumberFormatterNoStyle = 0; - static const int NSNumberFormatterDecimalStyle = 1; - static const int NSNumberFormatterCurrencyStyle = 2; - static const int NSNumberFormatterPercentStyle = 3; - static const int NSNumberFormatterScientificStyle = 4; - static const int NSNumberFormatterSpellOutStyle = 5; - static const int NSNumberFormatterOrdinalStyle = 6; - static const int NSNumberFormatterCurrencyISOCodeStyle = 8; - static const int NSNumberFormatterCurrencyPluralStyle = 9; - static const int NSNumberFormatterCurrencyAccountingStyle = 10; -} - -abstract class NSNumberFormatterBehavior { - static const int NSNumberFormatterBehaviorDefault = 0; - static const int NSNumberFormatterBehavior10_0 = 1000; - static const int NSNumberFormatterBehavior10_4 = 1040; -} - -abstract class NSNumberFormatterPadPosition { - static const int NSNumberFormatterPadBeforePrefix = 0; - static const int NSNumberFormatterPadAfterPrefix = 1; - static const int NSNumberFormatterPadBeforeSuffix = 2; - static const int NSNumberFormatterPadAfterSuffix = 3; -} - -abstract class NSNumberFormatterRoundingMode { - static const int NSNumberFormatterRoundCeiling = 0; - static const int NSNumberFormatterRoundFloor = 1; - static const int NSNumberFormatterRoundDown = 2; - static const int NSNumberFormatterRoundUp = 3; - static const int NSNumberFormatterRoundHalfEven = 4; - static const int NSNumberFormatterRoundHalfDown = 5; - static const int NSNumberFormatterRoundHalfUp = 6; -} -class NSDecimalNumberHandler extends NSObject { - NSDecimalNumberHandler._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + int get attribution { + return _objc_msgSend_324(this.pointer, _sel_attribution); + } - /// Returns a [NSDecimalNumberHandler] that points to the same underlying object as [other]. - static NSDecimalNumberHandler castFrom(T other) { - return NSDecimalNumberHandler._(other._id, other._lib, - retain: true, release: true); + bool get requiresDNSSECValidation { + return _objc_msgSend_7(this.pointer, _sel_requiresDNSSECValidation); } - /// Returns a [NSDecimalNumberHandler] that wraps the given raw object pointer. - static NSDecimalNumberHandler castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDecimalNumberHandler._(other, lib, - retain: retain, release: release); + objc.NSString? get HTTPMethod { + final _ret = _objc_msgSend_13(this.pointer, _sel_HTTPMethod); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSDecimalNumberHandler]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSDecimalNumberHandler1); + objc.NSDictionary? get allHTTPHeaderFields { + final _ret = _objc_msgSend_65(this.pointer, _sel_allHTTPHeaderFields); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSDecimalNumberHandler getDefaultDecimalNumberHandler(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_817(_lib._class_NSDecimalNumberHandler1, - _lib._sel_defaultDecimalNumberHandler1); - return NSDecimalNumberHandler._(_ret, _lib, retain: true, release: true); + objc.NSString? valueForHTTPHeaderField_(objc.NSString field) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_valueForHTTPHeaderField_, field.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSDecimalNumberHandler - initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( - int roundingMode, - int scale, - bool exact, - bool overflow, - bool underflow, - bool divideByZero) { - final _ret = _lib._objc_msgSend_818( - _id, - _lib._sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_1, - roundingMode, - scale, - exact, - overflow, - underflow, - divideByZero); - return NSDecimalNumberHandler._(_ret, _lib, retain: true, release: true); + objc.NSData? get HTTPBody { + final _ret = _objc_msgSend_325(this.pointer, _sel_HTTPBody); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - static NSDecimalNumberHandler - decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( - AVFAudio _lib, - int roundingMode, - int scale, - bool exact, - bool overflow, - bool underflow, - bool divideByZero) { - final _ret = _lib._objc_msgSend_818( - _lib._class_NSDecimalNumberHandler1, - _lib._sel_decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_1, - roundingMode, - scale, - exact, - overflow, - underflow, - divideByZero); - return NSDecimalNumberHandler._(_ret, _lib, retain: true, release: true); + NSInputStream? get HTTPBodyStream { + final _ret = _objc_msgSend_342(this.pointer, _sel_HTTPBodyStream); + return _ret.address == 0 + ? null + : NSInputStream.castFromPointer(_ret, retain: true, release: true); + } + + bool get HTTPShouldHandleCookies { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldHandleCookies); + } + + bool get HTTPShouldUsePipelining { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldUsePipelining); } @override - NSDecimalNumberHandler init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSDecimalNumberHandler._(_ret, _lib, retain: true, release: true); + NSURLRequest init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - static NSDecimalNumberHandler new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSDecimalNumberHandler1, _lib._sel_new1); - return NSDecimalNumberHandler._(_ret, _lib, retain: false, release: true); + static NSURLRequest new1() { + final _ret = _objc_msgSend_40(_class_NSURLRequest, _sel_new); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } - static NSDecimalNumberHandler allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSDecimalNumberHandler1, _lib._sel_allocWithZone_1, zone); - return NSDecimalNumberHandler._(_ret, _lib, retain: false, release: true); + static NSURLRequest allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLRequest, _sel_allocWithZone_, zone); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } - static NSDecimalNumberHandler alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSDecimalNumberHandler1, _lib._sel_alloc1); - return NSDecimalNumberHandler._(_ret, _lib, retain: false, release: true); + static NSURLRequest alloc() { + final _ret = _objc_msgSend_40(_class_NSURLRequest, _sel_alloc); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSDecimalNumberHandler1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLRequest, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSDecimalNumberHandler1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLRequest, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSDecimalNumberHandler1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLRequest, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSDecimalNumberHandler1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLRequest, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSDecimalNumberHandler1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLRequest, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSDecimalNumberHandler1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLRequest, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSDecimalNumberHandler1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLRequest, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSDecimalNumberHandler1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLRequest, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDecimalNumberHandler1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLRequest, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -abstract class NSRoundingMode { - static const int NSRoundPlain = 0; - static const int NSRoundDown = 1; - static const int NSRoundUp = 2; - static const int NSRoundBankers = 3; +late final _class_NSURLRequest = objc.getClass("NSURLRequest"); +late final _sel_requestWithURL_ = objc.registerName("requestWithURL:"); +final _objc_msgSend_320 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_supportsSecureCoding = + objc.registerName("supportsSecureCoding"); + +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; +} + +late final _sel_requestWithURL_cachePolicy_timeoutInterval_ = + objc.registerName("requestWithURL:cachePolicy:timeoutInterval:"); +final _objc_msgSend_321 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Double)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + double)>(); +late final _sel_initWithURL_cachePolicy_timeoutInterval_ = + objc.registerName("initWithURL:cachePolicy:timeoutInterval:"); +late final _sel_URL = objc.registerName("URL"); +late final _sel_cachePolicy = objc.registerName("cachePolicy"); +final _objc_msgSend_322 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_timeoutInterval = objc.registerName("timeoutInterval"); +late final _sel_mainDocumentURL = objc.registerName("mainDocumentURL"); + +abstract class NSURLRequestNetworkServiceType { + static const int NSURLNetworkServiceTypeDefault = 0; + static const int NSURLNetworkServiceTypeVoIP = 1; + static const int NSURLNetworkServiceTypeVideo = 2; + static const int NSURLNetworkServiceTypeBackground = 3; + static const int NSURLNetworkServiceTypeVoice = 4; + static const int NSURLNetworkServiceTypeResponsiveData = 6; + static const int NSURLNetworkServiceTypeAVStreaming = 8; + static const int NSURLNetworkServiceTypeResponsiveAV = 9; + static const int NSURLNetworkServiceTypeCallSignaling = 11; +} + +late final _sel_networkServiceType = objc.registerName("networkServiceType"); +final _objc_msgSend_323 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_allowsCellularAccess = + objc.registerName("allowsCellularAccess"); +late final _sel_allowsExpensiveNetworkAccess = + objc.registerName("allowsExpensiveNetworkAccess"); +late final _sel_allowsConstrainedNetworkAccess = + objc.registerName("allowsConstrainedNetworkAccess"); +late final _sel_assumesHTTP3Capable = objc.registerName("assumesHTTP3Capable"); + +abstract class NSURLRequestAttribution { + static const int NSURLRequestAttributionDeveloper = 0; + static const int NSURLRequestAttributionUser = 1; } -class NSScanner extends NSObject { - NSScanner._(ffi.Pointer id, AVFAudio lib, +late final _sel_attribution = objc.registerName("attribution"); +final _objc_msgSend_324 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_requiresDNSSECValidation = + objc.registerName("requiresDNSSECValidation"); +late final _sel_HTTPMethod = objc.registerName("HTTPMethod"); +late final _sel_allHTTPHeaderFields = objc.registerName("allHTTPHeaderFields"); +late final _sel_valueForHTTPHeaderField_ = + objc.registerName("valueForHTTPHeaderField:"); +late final _sel_HTTPBody = objc.registerName("HTTPBody"); +final _objc_msgSend_325 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + +class NSInputStream extends NSStream { + NSInputStream._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSScanner] that points to the same underlying object as [other]. - static NSScanner castFrom(T other) { - return NSScanner._(other._id, other._lib, retain: true, release: true); - } + /// Constructs a [NSInputStream] that points to the same underlying object as [other]. + NSInputStream.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSScanner] that wraps the given raw object pointer. - static NSScanner castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSScanner._(other, lib, retain: retain, release: release); + /// Constructs a [NSInputStream] that wraps the given raw object pointer. + NSInputStream.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSInputStream]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSInputStream); } - /// Returns whether [obj] is an instance of [NSScanner]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSScanner1); + int read_maxLength_(ffi.Pointer buffer, int len) { + return _objc_msgSend_329(this.pointer, _sel_read_maxLength_, buffer, len); } - NSString get string { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_string1); - return NSString._(_ret, _lib, retain: true, release: true); + bool getBuffer_length_(ffi.Pointer> buffer, + ffi.Pointer len) { + return _objc_msgSend_339(this.pointer, _sel_getBuffer_length_, buffer, len); } - int get scanLocation { - return _lib._objc_msgSend_10(_id, _lib._sel_scanLocation1); + bool get hasBytesAvailable { + return _objc_msgSend_7(this.pointer, _sel_hasBytesAvailable); } - set scanLocation(int value) { - return _lib._objc_msgSend_516(_id, _lib._sel_setScanLocation_1, value); + NSInputStream initWithData_(objc.NSData data) { + final _ret = + _objc_msgSend_340(this.pointer, _sel_initWithData_, data.pointer); + return NSInputStream.castFromPointer(_ret, retain: true, release: true); } - NSCharacterSet? get charactersToBeSkipped { - final _ret = _lib._objc_msgSend_820(_id, _lib._sel_charactersToBeSkipped1); + NSInputStream? initWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_3(this.pointer, _sel_initWithURL_, url.pointer); return _ret.address == 0 ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + : NSInputStream.castFromPointer(_ret, retain: true, release: true); } - set charactersToBeSkipped(NSCharacterSet? value) { - return _lib._objc_msgSend_821( - _id, _lib._sel_setCharactersToBeSkipped_1, value?._id ?? ffi.nullptr); + NSInputStream? initWithFileAtPath_(objc.NSString path) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_initWithFileAtPath_, path.pointer); + return _ret.address == 0 + ? null + : NSInputStream.castFromPointer(_ret, retain: true, release: true); } - bool get caseSensitive { - return _lib._objc_msgSend_12(_id, _lib._sel_caseSensitive1); + static NSInputStream? inputStreamWithData_(objc.NSData data) { + final _ret = _objc_msgSend_341( + _class_NSInputStream, _sel_inputStreamWithData_, data.pointer); + return _ret.address == 0 + ? null + : NSInputStream.castFromPointer(_ret, retain: true, release: true); } - set caseSensitive(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setCaseSensitive_1, value); + static NSInputStream? inputStreamWithFileAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_2( + _class_NSInputStream, _sel_inputStreamWithFileAtPath_, path.pointer); + return _ret.address == 0 + ? null + : NSInputStream.castFromPointer(_ret, retain: true, release: true); } - NSObject? get locale { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_locale1); + static NSInputStream? inputStreamWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_3( + _class_NSInputStream, _sel_inputStreamWithURL_, url.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : NSInputStream.castFromPointer(_ret, retain: true, release: true); } - set locale(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setLocale_1, value?._id ?? ffi.nullptr); + static void getStreamsToHostWithName_port_inputStream_outputStream_( + objc.NSString hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_333( + _class_NSInputStream, + _sel_getStreamsToHostWithName_port_inputStream_outputStream_, + hostname.pointer, + port, + inputStream, + outputStream); } - NSScanner initWithString_(NSString string) { - final _ret = - _lib._objc_msgSend_31(_id, _lib._sel_initWithString_1, string._id); - return NSScanner._(_ret, _lib, retain: true, release: true); + static void getStreamsToHost_port_inputStream_outputStream_( + NSHost host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_337( + _class_NSInputStream, + _sel_getStreamsToHost_port_inputStream_outputStream_, + host.pointer, + port, + inputStream, + outputStream); } - bool scanInt_(ffi.Pointer result) { - return _lib._objc_msgSend_822(_id, _lib._sel_scanInt_1, result); + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_338( + _class_NSInputStream, + _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, + bufferSize, + inputStream, + outputStream); } - bool scanInteger_(ffi.Pointer result) { - return _lib._objc_msgSend_823(_id, _lib._sel_scanInteger_1, result); + @override + NSInputStream init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSInputStream.castFromPointer(_ret, retain: true, release: true); } - bool scanLongLong_(ffi.Pointer result) { - return _lib._objc_msgSend_824(_id, _lib._sel_scanLongLong_1, result); + static NSInputStream new1() { + final _ret = _objc_msgSend_40(_class_NSInputStream, _sel_new); + return NSInputStream.castFromPointer(_ret, retain: false, release: true); } - bool scanUnsignedLongLong_(ffi.Pointer result) { - return _lib._objc_msgSend_825( - _id, _lib._sel_scanUnsignedLongLong_1, result); + static NSInputStream allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSInputStream, _sel_allocWithZone_, zone); + return NSInputStream.castFromPointer(_ret, retain: false, release: true); } - bool scanFloat_(ffi.Pointer result) { - return _lib._objc_msgSend_826(_id, _lib._sel_scanFloat_1, result); + static NSInputStream alloc() { + final _ret = _objc_msgSend_40(_class_NSInputStream, _sel_alloc); + return NSInputStream.castFromPointer(_ret, retain: false, release: true); } - bool scanDouble_(ffi.Pointer result) { - return _lib._objc_msgSend_827(_id, _lib._sel_scanDouble_1, result); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSInputStream, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - bool scanHexInt_(ffi.Pointer result) { - return _lib._objc_msgSend_828(_id, _lib._sel_scanHexInt_1, result); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSInputStream, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - bool scanHexLongLong_(ffi.Pointer result) { - return _lib._objc_msgSend_825(_id, _lib._sel_scanHexLongLong_1, result); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSInputStream, _sel_accessInstanceVariablesDirectly); } - bool scanHexFloat_(ffi.Pointer result) { - return _lib._objc_msgSend_826(_id, _lib._sel_scanHexFloat_1, result); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSInputStream, _sel_useStoredAccessor); } - bool scanHexDouble_(ffi.Pointer result) { - return _lib._objc_msgSend_827(_id, _lib._sel_scanHexDouble_1, result); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSInputStream, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - bool scanString_intoString_( - NSString string, ffi.Pointer> result) { - return _lib._objc_msgSend_829( - _id, _lib._sel_scanString_intoString_1, string._id, result); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSInputStream, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - bool scanCharactersFromSet_intoString_( - NSCharacterSet set, ffi.Pointer> result) { - return _lib._objc_msgSend_830( - _id, _lib._sel_scanCharactersFromSet_intoString_1, set._id, result); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSInputStream, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - bool scanUpToString_intoString_( - NSString string, ffi.Pointer> result) { - return _lib._objc_msgSend_829( - _id, _lib._sel_scanUpToString_intoString_1, string._id, result); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSInputStream, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool scanUpToCharactersFromSet_intoString_( - NSCharacterSet set, ffi.Pointer> result) { - return _lib._objc_msgSend_830( - _id, _lib._sel_scanUpToCharactersFromSet_intoString_1, set._id, result); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSInputStream, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - bool get atEnd { - return _lib._objc_msgSend_12(_id, _lib._sel_isAtEnd1); - } +late final _class_NSInputStream = objc.getClass("NSInputStream"); - static NSScanner scannerWithString_(AVFAudio _lib, NSString string) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSScanner1, _lib._sel_scannerWithString_1, string._id); - return NSScanner._(_ret, _lib, retain: true, release: true); - } +class NSStream extends objc.NSObject { + NSStream._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - static NSObject localizedScannerWithString_(AVFAudio _lib, NSString string) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSScanner1, - _lib._sel_localizedScannerWithString_1, string._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSStream] that points to the same underlying object as [other]. + NSStream.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - bool scanDecimal_(ffi.Pointer dcm) { - return _lib._objc_msgSend_831(_id, _lib._sel_scanDecimal_1, dcm); - } + /// Constructs a [NSStream] that wraps the given raw object pointer. + NSStream.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - @override - NSScanner init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSScanner._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSStream]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSStream); } - static NSScanner new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSScanner1, _lib._sel_new1); - return NSScanner._(_ret, _lib, retain: false, release: true); + void open() { + _objc_msgSend_82(this.pointer, _sel_open); } - static NSScanner allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSScanner1, _lib._sel_allocWithZone_1, zone); - return NSScanner._(_ret, _lib, retain: false, release: true); + void close() { + _objc_msgSend_82(this.pointer, _sel_close); } - static NSScanner alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSScanner1, _lib._sel_alloc1); - return NSScanner._(_ret, _lib, retain: false, release: true); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSScanner1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSScanner1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + objc.NSObject? propertyForKey_(objc.NSString key) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_propertyForKey_, key.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSScanner1, _lib._sel_accessInstanceVariablesDirectly1); + bool setProperty_forKey_(objc.NSObject? property, objc.NSString key) { + return _objc_msgSend_326(this.pointer, _sel_setProperty_forKey_, + property?.pointer ?? ffi.nullptr, key.pointer); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSScanner1, _lib._sel_useStoredAccessor1); + void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_scheduleInRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSScanner1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_removeFromRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSScanner1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + int get streamStatus { + return _objc_msgSend_327(this.pointer, _sel_streamStatus); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSScanner1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSError? get streamError { + final _ret = _objc_msgSend_328(this.pointer, _sel_streamError); + return _ret.address == 0 + ? null + : objc.NSError.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSScanner1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static void getStreamsToHostWithName_port_inputStream_outputStream_( + objc.NSString hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_333( + _class_NSStream, + _sel_getStreamsToHostWithName_port_inputStream_outputStream_, + hostname.pointer, + port, + inputStream, + outputStream); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSScanner1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static void getStreamsToHost_port_inputStream_outputStream_( + NSHost host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_337( + _class_NSStream, + _sel_getStreamsToHost_port_inputStream_outputStream_, + host.pointer, + port, + inputStream, + outputStream); } -} - -final class NSDecimal extends ffi.Opaque {} - -class NSException extends NSObject { - NSException._(ffi.Pointer id, AVFAudio 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); + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_338( + _class_NSStream, + _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, + bufferSize, + inputStream, + outputStream); } - /// Returns a [NSException] that wraps the given raw object pointer. - static NSException castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSException._(other, lib, retain: retain, release: release); + @override + NSStream init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSStream.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSException]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSException1); + static NSStream new1() { + final _ret = _objc_msgSend_40(_class_NSStream, _sel_new); + return NSStream.castFromPointer(_ret, retain: false, release: true); } - static NSException exceptionWithName_reason_userInfo_( - AVFAudio _lib, NSString name, NSString? reason, NSDictionary? userInfo) { - final _ret = _lib._objc_msgSend_832( - _lib._class_NSException1, - _lib._sel_exceptionWithName_reason_userInfo_1, - name._id, - reason?._id ?? ffi.nullptr, - userInfo?._id ?? ffi.nullptr); - return NSException._(_ret, _lib, retain: true, release: true); - } - - NSException initWithName_reason_userInfo_( - NSString aName, NSString? aReason, NSDictionary? aUserInfo) { - final _ret = _lib._objc_msgSend_833( - _id, - _lib._sel_initWithName_reason_userInfo_1, - aName._id, - aReason?._id ?? ffi.nullptr, - aUserInfo?._id ?? ffi.nullptr); - return NSException._(_ret, _lib, retain: true, release: true); - } - - NSString get name { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_name1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get reason { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_reason1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static NSStream allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSStream, _sel_allocWithZone_, zone); + return NSStream.castFromPointer(_ret, retain: false, release: true); } - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_userInfo1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + static NSStream alloc() { + final _ret = _objc_msgSend_40(_class_NSStream, _sel_alloc); + return NSStream.castFromPointer(_ret, retain: false, release: true); } - NSArray get callStackReturnAddresses { - final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_callStackReturnAddresses1); - return NSArray._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSStream, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSArray get callStackSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_callStackSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSStream, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - void raise() { - _lib._objc_msgSend_1(_id, _lib._sel_raise1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSStream, _sel_accessInstanceVariablesDirectly); } - static void raise_format_(AVFAudio _lib, NSString name, NSString format) { - _lib._objc_msgSend_551(_lib._class_NSException1, _lib._sel_raise_format_1, - name._id, format._id); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSStream, _sel_useStoredAccessor); } - static void raise_format_arguments_(AVFAudio _lib, NSString name, - NSString format, ffi.Pointer<__va_list_tag> argList) { - _lib._objc_msgSend_834(_lib._class_NSException1, - _lib._sel_raise_format_arguments_1, name._id, format._id, argList); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSStream, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - @override - NSException init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSException._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSStream, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static NSException new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_new1); - return NSException._(_ret, _lib, retain: false, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSStream, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSException allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSException1, _lib._sel_allocWithZone_1, zone); - return NSException._(_ret, _lib, retain: false, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSStream, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSException alloc(AVFAudio _lib) { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_alloc1); - return NSException._(_ret, _lib, retain: false, release: true); + _objc_msgSend_40(_class_NSStream, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSException1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); +late final _class_NSStream = objc.getClass("NSStream"); +late final _sel_open = objc.registerName("open"); +late final _sel_close = objc.registerName("close"); +late final _sel_propertyForKey_ = objc.registerName("propertyForKey:"); +late final _sel_setProperty_forKey_ = objc.registerName("setProperty:forKey:"); +final _objc_msgSend_326 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +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; +} + +late final _sel_streamStatus = objc.registerName("streamStatus"); +final _objc_msgSend_327 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_streamError = objc.registerName("streamError"); +final _objc_msgSend_328 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + +class NSOutputStream extends NSStream { + NSOutputStream._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSOutputStream] that points to the same underlying object as [other]. + NSOutputStream.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSOutputStream] that wraps the given raw object pointer. + NSOutputStream.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSOutputStream]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSOutputStream); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSException1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + int write_maxLength_(ffi.Pointer buffer, int len) { + return _objc_msgSend_329(this.pointer, _sel_write_maxLength_, buffer, len); + } + + bool get hasSpaceAvailable { + return _objc_msgSend_7(this.pointer, _sel_hasSpaceAvailable); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSException1, _lib._sel_accessInstanceVariablesDirectly1); + NSOutputStream initToMemory() { + final _ret = _objc_msgSend_40(this.pointer, _sel_initToMemory); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSException1, _lib._sel_useStoredAccessor1); + NSOutputStream initToBuffer_capacity_( + ffi.Pointer buffer, int capacity) { + final _ret = _objc_msgSend_330( + this.pointer, _sel_initToBuffer_capacity_, buffer, capacity); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSException1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + NSOutputStream? initWithURL_append_(objc.NSURL url, bool shouldAppend) { + final _ret = _objc_msgSend_331( + this.pointer, _sel_initWithURL_append_, url.pointer, shouldAppend); + return _ret.address == 0 + ? null + : NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSException1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + NSOutputStream? initToFileAtPath_append_( + objc.NSString path, bool shouldAppend) { + final _ret = _objc_msgSend_332(this.pointer, _sel_initToFileAtPath_append_, + path.pointer, shouldAppend); + return _ret.address == 0 + ? null + : NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSException1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static NSOutputStream outputStreamToMemory() { + final _ret = + _objc_msgSend_40(_class_NSOutputStream, _sel_outputStreamToMemory); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSException1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSOutputStream outputStreamToBuffer_capacity_( + ffi.Pointer buffer, int capacity) { + final _ret = _objc_msgSend_330(_class_NSOutputStream, + _sel_outputStreamToBuffer_capacity_, buffer, capacity); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSException1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSOutputStream outputStreamToFileAtPath_append_( + objc.NSString path, bool shouldAppend) { + final _ret = _objc_msgSend_164(_class_NSOutputStream, + _sel_outputStreamToFileAtPath_append_, path.pointer, shouldAppend); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } -} -class NSFileHandle extends NSObject { - NSFileHandle._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + static NSOutputStream? outputStreamWithURL_append_( + objc.NSURL url, bool shouldAppend) { + final _ret = _objc_msgSend_331(_class_NSOutputStream, + _sel_outputStreamWithURL_append_, url.pointer, shouldAppend); + return _ret.address == 0 + ? null + : NSOutputStream.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a [NSFileHandle] that points to the same underlying object as [other]. - static NSFileHandle castFrom(T other) { - return NSFileHandle._(other._id, other._lib, retain: true, release: true); + static void getStreamsToHostWithName_port_inputStream_outputStream_( + objc.NSString hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_333( + _class_NSOutputStream, + _sel_getStreamsToHostWithName_port_inputStream_outputStream_, + hostname.pointer, + port, + inputStream, + outputStream); } - /// Returns a [NSFileHandle] that wraps the given raw object pointer. - static NSFileHandle castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSFileHandle._(other, lib, retain: retain, release: release); + static void getStreamsToHost_port_inputStream_outputStream_( + NSHost host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_337( + _class_NSOutputStream, + _sel_getStreamsToHost_port_inputStream_outputStream_, + host.pointer, + port, + inputStream, + outputStream); } - /// Returns whether [obj] is an instance of [NSFileHandle]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSFileHandle1); + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_338( + _class_NSOutputStream, + _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, + bufferSize, + inputStream, + outputStream); } - NSData get availableData { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_availableData1); - return NSData._(_ret, _lib, retain: true, release: true); + @override + NSOutputStream init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - NSFileHandle initWithFileDescriptor_closeOnDealloc_(int fd, bool closeopt) { - final _ret = _lib._objc_msgSend_835( - _id, _lib._sel_initWithFileDescriptor_closeOnDealloc_1, fd, closeopt); - return NSFileHandle._(_ret, _lib, retain: true, release: true); + static NSOutputStream new1() { + final _ret = _objc_msgSend_40(_class_NSOutputStream, _sel_new); + return NSOutputStream.castFromPointer(_ret, retain: false, release: true); } - NSFileHandle? initWithCoder_(NSCoder coder) { + static NSOutputStream allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSFileHandle._(_ret, _lib, retain: true, release: true); + _objc_msgSend_47(_class_NSOutputStream, _sel_allocWithZone_, zone); + return NSOutputStream.castFromPointer(_ret, retain: false, release: true); } - NSData? readDataToEndOfFileAndReturnError_( - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_836( - _id, _lib._sel_readDataToEndOfFileAndReturnError_1, error); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + static NSOutputStream alloc() { + final _ret = _objc_msgSend_40(_class_NSOutputStream, _sel_alloc); + return NSOutputStream.castFromPointer(_ret, retain: false, release: true); } - NSData? readDataUpToLength_error_( - int length, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_837( - _id, _lib._sel_readDataUpToLength_error_1, length, error); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSOutputStream, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - bool writeData_error_( - NSData data, ffi.Pointer> error) { - return _lib._objc_msgSend_838( - _id, _lib._sel_writeData_error_1, data._id, error); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSOutputStream, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - bool getOffset_error_(ffi.Pointer offsetInFile, - ffi.Pointer> error) { - return _lib._objc_msgSend_839( - _id, _lib._sel_getOffset_error_1, offsetInFile, error); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSOutputStream, _sel_accessInstanceVariablesDirectly); } - bool seekToEndReturningOffset_error_( - ffi.Pointer offsetInFile, - ffi.Pointer> error) { - return _lib._objc_msgSend_839( - _id, _lib._sel_seekToEndReturningOffset_error_1, offsetInFile, error); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSOutputStream, _sel_useStoredAccessor); } - bool seekToOffset_error_( - int offset, ffi.Pointer> error) { - return _lib._objc_msgSend_840( - _id, _lib._sel_seekToOffset_error_1, offset, error); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSOutputStream, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - bool truncateAtOffset_error_( - int offset, ffi.Pointer> error) { - return _lib._objc_msgSend_840( - _id, _lib._sel_truncateAtOffset_error_1, offset, error); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSOutputStream, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - bool synchronizeAndReturnError_(ffi.Pointer> error) { - return _lib._objc_msgSend_255( - _id, _lib._sel_synchronizeAndReturnError_1, error); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSOutputStream, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSOutputStream, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSOutputStream, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSOutputStream = objc.getClass("NSOutputStream"); +late final _sel_write_maxLength_ = objc.registerName("write:maxLength:"); +final _objc_msgSend_329 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); +late final _sel_hasSpaceAvailable = objc.registerName("hasSpaceAvailable"); +late final _sel_initToMemory = objc.registerName("initToMemory"); +late final _sel_initToBuffer_capacity_ = + objc.registerName("initToBuffer:capacity:"); +final _objc_msgSend_330 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); +late final _sel_initWithURL_append_ = objc.registerName("initWithURL:append:"); +final _objc_msgSend_331 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_initToFileAtPath_append_ = + objc.registerName("initToFileAtPath:append:"); +final _objc_msgSend_332 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_outputStreamToMemory = + objc.registerName("outputStreamToMemory"); +late final _sel_outputStreamToBuffer_capacity_ = + objc.registerName("outputStreamToBuffer:capacity:"); +late final _sel_outputStreamToFileAtPath_append_ = + objc.registerName("outputStreamToFileAtPath:append:"); +late final _sel_outputStreamWithURL_append_ = + objc.registerName("outputStreamWithURL:append:"); +late final _sel_getStreamsToHostWithName_port_inputStream_outputStream_ = objc + .registerName("getStreamsToHostWithName:port:inputStream:outputStream:"); +final _objc_msgSend_333 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer>, + ffi.Pointer>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>)>(); + +class NSHost extends objc.NSObject { + NSHost._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - bool closeAndReturnError_(ffi.Pointer> error) { - return _lib._objc_msgSend_255(_id, _lib._sel_closeAndReturnError_1, error); - } + /// Constructs a [NSHost] that points to the same underlying object as [other]. + NSHost.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSHost] that wraps the given raw object pointer. + NSHost.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static NSFileHandle getFileHandleWithStandardInput(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_841( - _lib._class_NSFileHandle1, _lib._sel_fileHandleWithStandardInput1); - return NSFileHandle._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSHost]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSHost); } - static NSFileHandle getFileHandleWithStandardOutput(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_841( - _lib._class_NSFileHandle1, _lib._sel_fileHandleWithStandardOutput1); - return NSFileHandle._(_ret, _lib, retain: true, release: true); + static NSHost currentHost() { + final _ret = _objc_msgSend_40(_class_NSHost, _sel_currentHost); + return NSHost.castFromPointer(_ret, retain: true, release: true); } - static NSFileHandle getFileHandleWithStandardError(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_841( - _lib._class_NSFileHandle1, _lib._sel_fileHandleWithStandardError1); - return NSFileHandle._(_ret, _lib, retain: true, release: true); + static NSHost hostWithName_(objc.NSString? name) { + final _ret = _objc_msgSend_334( + _class_NSHost, _sel_hostWithName_, name?.pointer ?? ffi.nullptr); + return NSHost.castFromPointer(_ret, retain: true, release: true); } - static NSFileHandle getFileHandleWithNullDevice(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_841( - _lib._class_NSFileHandle1, _lib._sel_fileHandleWithNullDevice1); - return NSFileHandle._(_ret, _lib, retain: true, release: true); + static NSHost hostWithAddress_(objc.NSString address) { + final _ret = + _objc_msgSend_35(_class_NSHost, _sel_hostWithAddress_, address.pointer); + return NSHost.castFromPointer(_ret, retain: true, release: true); } - static NSFileHandle? fileHandleForReadingAtPath_( - AVFAudio _lib, NSString path) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSFileHandle1, - _lib._sel_fileHandleForReadingAtPath_1, path._id); - return _ret.address == 0 - ? null - : NSFileHandle._(_ret, _lib, retain: true, release: true); + bool isEqualToHost_(NSHost aHost) { + return _objc_msgSend_335(this.pointer, _sel_isEqualToHost_, aHost.pointer); } - static NSFileHandle? fileHandleForWritingAtPath_( - AVFAudio _lib, NSString path) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSFileHandle1, - _lib._sel_fileHandleForWritingAtPath_1, path._id); + objc.NSString? get name { + final _ret = _objc_msgSend_13(this.pointer, _sel_name); return _ret.address == 0 ? null - : NSFileHandle._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSFileHandle? fileHandleForUpdatingAtPath_( - AVFAudio _lib, NSString path) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSFileHandle1, - _lib._sel_fileHandleForUpdatingAtPath_1, path._id); - return _ret.address == 0 - ? null - : NSFileHandle._(_ret, _lib, retain: true, release: true); + objc.NSArray get names { + final _ret = _objc_msgSend_6(this.pointer, _sel_names); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSFileHandle? fileHandleForReadingFromURL_error_( - AVFAudio _lib, NSURL url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_842(_lib._class_NSFileHandle1, - _lib._sel_fileHandleForReadingFromURL_error_1, url._id, error); + objc.NSString? get address { + final _ret = _objc_msgSend_13(this.pointer, _sel_address); return _ret.address == 0 ? null - : NSFileHandle._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSFileHandle? fileHandleForWritingToURL_error_( - AVFAudio _lib, NSURL url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_842(_lib._class_NSFileHandle1, - _lib._sel_fileHandleForWritingToURL_error_1, url._id, error); - return _ret.address == 0 - ? null - : NSFileHandle._(_ret, _lib, retain: true, release: true); + objc.NSArray get addresses { + final _ret = _objc_msgSend_6(this.pointer, _sel_addresses); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSFileHandle? fileHandleForUpdatingURL_error_( - AVFAudio _lib, NSURL url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_842(_lib._class_NSFileHandle1, - _lib._sel_fileHandleForUpdatingURL_error_1, url._id, error); + objc.NSString? get localizedName { + final _ret = _objc_msgSend_13(this.pointer, _sel_localizedName); return _ret.address == 0 ? null - : NSFileHandle._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void readInBackgroundAndNotifyForModes_(NSArray? modes) { - _lib._objc_msgSend_843(_id, _lib._sel_readInBackgroundAndNotifyForModes_1, - modes?._id ?? ffi.nullptr); + static void setHostCacheEnabled_(bool flag) { + _objc_msgSend_336(_class_NSHost, _sel_setHostCacheEnabled_, flag); } - void readInBackgroundAndNotify() { - _lib._objc_msgSend_1(_id, _lib._sel_readInBackgroundAndNotify1); + static bool isHostCacheEnabled() { + return _objc_msgSend_7(_class_NSHost, _sel_isHostCacheEnabled); } - void readToEndOfFileInBackgroundAndNotifyForModes_(NSArray? modes) { - _lib._objc_msgSend_843( - _id, - _lib._sel_readToEndOfFileInBackgroundAndNotifyForModes_1, - modes?._id ?? ffi.nullptr); + static void flushHostCache() { + _objc_msgSend_82(_class_NSHost, _sel_flushHostCache); } - void readToEndOfFileInBackgroundAndNotify() { - _lib._objc_msgSend_1(_id, _lib._sel_readToEndOfFileInBackgroundAndNotify1); + @override + NSHost init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSHost.castFromPointer(_ret, retain: true, release: true); } - void acceptConnectionInBackgroundAndNotifyForModes_(NSArray? modes) { - _lib._objc_msgSend_843( - _id, - _lib._sel_acceptConnectionInBackgroundAndNotifyForModes_1, - modes?._id ?? ffi.nullptr); + static NSHost new1() { + final _ret = _objc_msgSend_40(_class_NSHost, _sel_new); + return NSHost.castFromPointer(_ret, retain: false, release: true); } - void acceptConnectionInBackgroundAndNotify() { - _lib._objc_msgSend_1(_id, _lib._sel_acceptConnectionInBackgroundAndNotify1); + static NSHost allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSHost, _sel_allocWithZone_, zone); + return NSHost.castFromPointer(_ret, retain: false, release: true); } - void waitForDataInBackgroundAndNotifyForModes_(NSArray? modes) { - _lib._objc_msgSend_843( - _id, - _lib._sel_waitForDataInBackgroundAndNotifyForModes_1, - modes?._id ?? ffi.nullptr); + static NSHost alloc() { + final _ret = _objc_msgSend_40(_class_NSHost, _sel_alloc); + return NSHost.castFromPointer(_ret, retain: false, release: true); } - void waitForDataInBackgroundAndNotify() { - _lib._objc_msgSend_1(_id, _lib._sel_waitForDataInBackgroundAndNotify1); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSHost, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - ObjCBlock_ffiVoid_NSFileHandle? get readabilityHandler { - final _ret = _lib._objc_msgSend_844(_id, _lib._sel_readabilityHandler1); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid_NSFileHandle._(_ret, _lib, - retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSHost, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - set readabilityHandler(ObjCBlock_ffiVoid_NSFileHandle? value) { - return _lib._objc_msgSend_845( - _id, _lib._sel_setReadabilityHandler_1, value?._id ?? ffi.nullptr); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7(_class_NSHost, _sel_accessInstanceVariablesDirectly); } - ObjCBlock_ffiVoid_NSFileHandle? get writeabilityHandler { - final _ret = _lib._objc_msgSend_844(_id, _lib._sel_writeabilityHandler1); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid_NSFileHandle._(_ret, _lib, - retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSHost, _sel_useStoredAccessor); } - set writeabilityHandler(ObjCBlock_ffiVoid_NSFileHandle? value) { - return _lib._objc_msgSend_845( - _id, _lib._sel_setWriteabilityHandler_1, value?._id ?? ffi.nullptr); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSHost, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSFileHandle initWithFileDescriptor_(int fd) { - final _ret = - _lib._objc_msgSend_846(_id, _lib._sel_initWithFileDescriptor_1, fd); - return NSFileHandle._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51( + _class_NSHost, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - int get fileDescriptor { - return _lib._objc_msgSend_237(_id, _lib._sel_fileDescriptor1); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSHost, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSHost, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40(_class_NSHost, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSHost = objc.getClass("NSHost"); +late final _sel_currentHost = objc.registerName("currentHost"); +late final _sel_hostWithName_ = objc.registerName("hostWithName:"); +final _objc_msgSend_334 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_hostWithAddress_ = objc.registerName("hostWithAddress:"); +late final _sel_isEqualToHost_ = objc.registerName("isEqualToHost:"); +final _objc_msgSend_335 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_names = objc.registerName("names"); +late final _sel_address = objc.registerName("address"); +late final _sel_addresses = objc.registerName("addresses"); +late final _sel_localizedName = objc.registerName("localizedName"); +late final _sel_setHostCacheEnabled_ = + objc.registerName("setHostCacheEnabled:"); +final _objc_msgSend_336 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, bool)>(); +late final _sel_isHostCacheEnabled = objc.registerName("isHostCacheEnabled"); +late final _sel_flushHostCache = objc.registerName("flushHostCache"); +late final _sel_getStreamsToHost_port_inputStream_outputStream_ = + objc.registerName("getStreamsToHost:port:inputStream:outputStream:"); +final _objc_msgSend_337 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer>, + ffi.Pointer>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>)>(); +late final _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_ = objc + .registerName("getBoundStreamsWithBufferSize:inputStream:outputStream:"); +final _objc_msgSend_338 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer>, + ffi.Pointer>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>)>(); +late final _sel_read_maxLength_ = objc.registerName("read:maxLength:"); +late final _sel_getBuffer_length_ = objc.registerName("getBuffer:length:"); +final _objc_msgSend_339 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>(); +late final _sel_hasBytesAvailable = objc.registerName("hasBytesAvailable"); +late final _sel_initWithData_ = objc.registerName("initWithData:"); +final _objc_msgSend_340 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithFileAtPath_ = objc.registerName("initWithFileAtPath:"); +late final _sel_inputStreamWithData_ = + objc.registerName("inputStreamWithData:"); +final _objc_msgSend_341 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_inputStreamWithFileAtPath_ = + objc.registerName("inputStreamWithFileAtPath:"); +late final _sel_inputStreamWithURL_ = objc.registerName("inputStreamWithURL:"); +late final _sel_HTTPBodyStream = objc.registerName("HTTPBodyStream"); +final _objc_msgSend_342 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_HTTPShouldHandleCookies = + objc.registerName("HTTPShouldHandleCookies"); +late final _sel_HTTPShouldUsePipelining = + objc.registerName("HTTPShouldUsePipelining"); +late final _sel_originalRequest = objc.registerName("originalRequest"); +final _objc_msgSend_343 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_currentRequest = objc.registerName("currentRequest"); + +class NSURLResponse extends objc.NSObject { + NSURLResponse._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSData readDataToEndOfFile() { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_readDataToEndOfFile1); - return NSData._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSURLResponse] that points to the same underlying object as [other]. + NSURLResponse.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSData readDataOfLength_(int length) { - final _ret = - _lib._objc_msgSend_847(_id, _lib._sel_readDataOfLength_1, length); - return NSData._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSURLResponse] that wraps the given raw object pointer. + NSURLResponse.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - void writeData_(NSData data) { - _lib._objc_msgSend_285(_id, _lib._sel_writeData_1, data._id); + /// Returns whether [obj] is an instance of [NSURLResponse]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLResponse); } - int get offsetInFile { - return _lib._objc_msgSend_164(_id, _lib._sel_offsetInFile1); + NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( + objc.NSURL URL, + objc.NSString? MIMEType, + int length, + objc.NSString? name) { + final _ret = _objc_msgSend_344( + this.pointer, + _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_, + URL.pointer, + MIMEType?.pointer ?? ffi.nullptr, + length, + name?.pointer ?? ffi.nullptr); + return NSURLResponse.castFromPointer(_ret, retain: true, release: true); } - int seekToEndOfFile() { - return _lib._objc_msgSend_164(_id, _lib._sel_seekToEndOfFile1); + objc.NSURL? get URL { + final _ret = _objc_msgSend_10(this.pointer, _sel_URL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void seekToFileOffset_(int offset) { - _lib._objc_msgSend_848(_id, _lib._sel_seekToFileOffset_1, offset); + objc.NSString? get MIMEType { + final _ret = _objc_msgSend_13(this.pointer, _sel_MIMEType); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void truncateFileAtOffset_(int offset) { - _lib._objc_msgSend_848(_id, _lib._sel_truncateFileAtOffset_1, offset); + int get expectedContentLength { + return _objc_msgSend_345(this.pointer, _sel_expectedContentLength); } - void synchronizeFile() { - _lib._objc_msgSend_1(_id, _lib._sel_synchronizeFile1); + objc.NSString? get textEncodingName { + final _ret = _objc_msgSend_13(this.pointer, _sel_textEncodingName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void closeFile() { - _lib._objc_msgSend_1(_id, _lib._sel_closeFile1); + objc.NSString? get suggestedFilename { + final _ret = _objc_msgSend_13(this.pointer, _sel_suggestedFilename); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } @override - NSFileHandle init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSFileHandle._(_ret, _lib, retain: true, release: true); + NSURLResponse init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLResponse.castFromPointer(_ret, retain: true, release: true); } - static NSFileHandle new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFileHandle1, _lib._sel_new1); - return NSFileHandle._(_ret, _lib, retain: false, release: true); + static NSURLResponse new1() { + final _ret = _objc_msgSend_40(_class_NSURLResponse, _sel_new); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } - static NSFileHandle allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSFileHandle1, _lib._sel_allocWithZone_1, zone); - return NSFileHandle._(_ret, _lib, retain: false, release: true); + static NSURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLResponse, _sel_allocWithZone_, zone); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } - static NSFileHandle alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFileHandle1, _lib._sel_alloc1); - return NSFileHandle._(_ret, _lib, retain: false, release: true); + static NSURLResponse alloc() { + final _ret = _objc_msgSend_40(_class_NSURLResponse, _sel_alloc); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSFileHandle1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLResponse, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSFileHandle1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLResponse, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSFileHandle1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLResponse, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSFileHandle1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLResponse, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSFileHandle1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLResponse, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSFileHandle1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLResponse, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSFileHandle1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLResponse, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLResponse, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLResponse, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSURLResponse = objc.getClass("NSURLResponse"); +late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_ = + objc.registerName( + "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); +final _objc_msgSend_344 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_MIMEType = objc.registerName("MIMEType"); +late final _sel_expectedContentLength = + objc.registerName("expectedContentLength"); +final _objc_msgSend_345 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.LongLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_textEncodingName = objc.registerName("textEncodingName"); +late final _sel_suggestedFilename = objc.registerName("suggestedFilename"); +late final _sel_response = objc.registerName("response"); +final _objc_msgSend_346 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_progress = objc.registerName("progress"); +final _objc_msgSend_347 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_earliestBeginDate = objc.registerName("earliestBeginDate"); +late final _sel_setEarliestBeginDate_ = + objc.registerName("setEarliestBeginDate:"); +late final _sel_countOfBytesClientExpectsToSend = + objc.registerName("countOfBytesClientExpectsToSend"); +final _objc_msgSend_348 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int64 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCountOfBytesClientExpectsToSend_ = + objc.registerName("setCountOfBytesClientExpectsToSend:"); +final _objc_msgSend_349 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int64)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_countOfBytesClientExpectsToReceive = + objc.registerName("countOfBytesClientExpectsToReceive"); +late final _sel_setCountOfBytesClientExpectsToReceive_ = + objc.registerName("setCountOfBytesClientExpectsToReceive:"); +late final _sel_countOfBytesSent = objc.registerName("countOfBytesSent"); +late final _sel_countOfBytesReceived = + objc.registerName("countOfBytesReceived"); +late final _sel_countOfBytesExpectedToSend = + objc.registerName("countOfBytesExpectedToSend"); +late final _sel_countOfBytesExpectedToReceive = + objc.registerName("countOfBytesExpectedToReceive"); +late final _sel_taskDescription = objc.registerName("taskDescription"); +late final _sel_setTaskDescription_ = objc.registerName("setTaskDescription:"); +late final _sel_cancel = objc.registerName("cancel"); - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSFileHandle1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSFileHandle1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +abstract class NSURLSessionTaskState { + static const int NSURLSessionTaskStateRunning = 0; + static const int NSURLSessionTaskStateSuspended = 1; + static const int NSURLSessionTaskStateCanceling = 2; + static const int NSURLSessionTaskStateCompleted = 3; } -void _ObjCBlock_ffiVoid_NSFileHandle_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => +late final _sel_state = objc.registerName("state"); +final _objc_msgSend_350 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_error = objc.registerName("error"); +late final _sel_suspend = objc.registerName("suspend"); +late final _sel_resume = objc.registerName("resume"); +late final _sel_priority = objc.registerName("priority"); +final _objc_msgSend_351 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_351Fpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setPriority_ = objc.registerName("setPriority:"); +final _objc_msgSend_352 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Float)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, double)>(); +late final _sel_prefersIncrementalDelivery = + objc.registerName("prefersIncrementalDelivery"); +late final _sel_setPrefersIncrementalDelivery_ = + objc.registerName("setPrefersIncrementalDelivery:"); +late final _sel_storeCookies_forTask_ = + objc.registerName("storeCookies:forTask:"); +final _objc_msgSend_353 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => block.ref.target .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSFileHandle_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSFileHandle_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry[id] = fn; + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSArray_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSArray_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSArray_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSArray_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSArray_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry[block.ref.target.address]!( - arg0); +void _ObjCBlock_ffiVoid_NSArray_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSArray_closureRegistry[block.ref.target.address]!(arg0); -class ObjCBlock_ffiVoid_NSFileHandle extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSFileHandle._(ffi.Pointer<_ObjCBlock> id, AVFAudio lib, +class ObjCBlock_ffiVoid_NSArray extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSArray._(ffi.Pointer pointer, {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSFileHandle castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSFileHandle._(pointer, lib, + static ObjCBlock_ffiVoid_NSArray castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSArray._(pointer, retain: retain, release: release); } @@ -62214,21 +16084,18 @@ class ObjCBlock_ffiVoid_NSFileHandle extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSFileHandle.fromFunctionPointer( - AVFAudio lib, + ObjCBlock_ffiVoid_NSArray.fromFunctionPointer( ffi.Pointer< - ffi - .NativeFunction arg0)>> + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSFileHandle_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline) + .cast(), + ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. @@ -62236,20 +16103,18 @@ class ObjCBlock_ffiVoid_NSFileHandle extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSFileHandle.fromFunction( - AVFAudio lib, void Function(NSFileHandle) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSFileHandle_registerClosure((ffi - .Pointer - arg0) => - fn(NSFileHandle._(arg0, lib, retain: true, release: true)))), - lib); + ObjCBlock_ffiVoid_NSArray.fromFunction(void Function(objc.NSArray?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSArray_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSArray.castFromPointer(arg0, + retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -62261,4123 +16126,6859 @@ class ObjCBlock_ffiVoid_NSFileHandle extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSFileHandle.listener( - AVFAudio lib, void Function(NSFileHandle) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( - (ffi.Pointer arg0) => fn(NSFileHandle._( - arg0, lib, - retain: true, release: true)))), - lib); + ObjCBlock_ffiVoid_NSArray.listener(void Function(objc.NSArray?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSArray_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSArray.castFromPointer(arg0, retain: true, release: true))))); static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? _dartFuncListenerTrampoline; - void call(NSFileHandle arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0._id); -} - -class NSHTTPCookieStorage extends NSObject { - NSHTTPCookieStorage._(ffi.Pointer id, AVFAudio lib, + void call(objc.NSArray? arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr); +} + +late final _sel_getCookiesForTask_completionHandler_ = + objc.registerName("getCookiesForTask:completionHandler:"); +final _objc_msgSend_354 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +class NSIndexPath extends objc.NSObject { + NSIndexPath._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSHTTPCookieStorage] that points to the same underlying object as [other]. - static NSHTTPCookieStorage castFrom(T other) { - return NSHTTPCookieStorage._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSHTTPCookieStorage] that wraps the given raw object pointer. - static NSHTTPCookieStorage castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHTTPCookieStorage._(other, lib, retain: retain, release: release); - } + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSHTTPCookieStorage]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSHTTPCookieStorage1); - } + /// Constructs a [NSIndexPath] that points to the same underlying object as [other]. + NSIndexPath.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - static NSHTTPCookieStorage getSharedHTTPCookieStorage(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_849( - _lib._class_NSHTTPCookieStorage1, _lib._sel_sharedHTTPCookieStorage1); - return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSIndexPath] that wraps the given raw object pointer. + NSIndexPath.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( - AVFAudio _lib, NSString identifier) { - final _ret = _lib._objc_msgSend_850( - _lib._class_NSHTTPCookieStorage1, - _lib._sel_sharedCookieStorageForGroupContainerIdentifier_1, - identifier._id); - return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSIndexPath]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSIndexPath); } - NSArray? get cookies { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_cookies1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + static NSIndexPath indexPathWithIndex_(int index) { + final _ret = + _objc_msgSend_355(_class_NSIndexPath, _sel_indexPathWithIndex_, index); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - void setCookie_(NSHTTPCookie cookie) { - _lib._objc_msgSend_854(_id, _lib._sel_setCookie_1, cookie._id); + static NSIndexPath indexPathWithIndexes_length_( + ffi.Pointer indexes, int length) { + final _ret = _objc_msgSend_356( + _class_NSIndexPath, _sel_indexPathWithIndexes_length_, indexes, length); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - void deleteCookie_(NSHTTPCookie cookie) { - _lib._objc_msgSend_854(_id, _lib._sel_deleteCookie_1, cookie._id); + NSIndexPath initWithIndexes_length_( + ffi.Pointer indexes, int length) { + final _ret = _objc_msgSend_356( + this.pointer, _sel_initWithIndexes_length_, indexes, length); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - void removeCookiesSinceDate_(NSDate date) { - _lib._objc_msgSend_540(_id, _lib._sel_removeCookiesSinceDate_1, date._id); + NSIndexPath initWithIndex_(int index) { + final _ret = _objc_msgSend_355(this.pointer, _sel_initWithIndex_, index); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - NSArray? cookiesForURL_(NSURL URL) { + NSIndexPath indexPathByAddingIndex_(int index) { final _ret = - _lib._objc_msgSend_133(_id, _lib._sel_cookiesForURL_1, URL._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + _objc_msgSend_357(this.pointer, _sel_indexPathByAddingIndex_, index); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - void setCookies_forURL_mainDocumentURL_( - NSArray cookies, NSURL? URL, NSURL? mainDocumentURL) { - _lib._objc_msgSend_855( - _id, - _lib._sel_setCookies_forURL_mainDocumentURL_1, - cookies._id, - URL?._id ?? ffi.nullptr, - mainDocumentURL?._id ?? ffi.nullptr); + NSIndexPath indexPathByRemovingLastIndex() { + final _ret = + _objc_msgSend_358(this.pointer, _sel_indexPathByRemovingLastIndex); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - int get cookieAcceptPolicy { - return _lib._objc_msgSend_856(_id, _lib._sel_cookieAcceptPolicy1); + int indexAtPosition_(int position) { + return _objc_msgSend_359(this.pointer, _sel_indexAtPosition_, position); } - set cookieAcceptPolicy(int value) { - return _lib._objc_msgSend_857( - _id, _lib._sel_setCookieAcceptPolicy_1, value); + int get length { + return _objc_msgSend_29(this.pointer, _sel_length); } - NSArray sortedCookiesUsingDescriptors_(NSArray sortOrder) { - final _ret = _lib._objc_msgSend_68( - _id, _lib._sel_sortedCookiesUsingDescriptors_1, sortOrder._id); - return NSArray._(_ret, _lib, retain: true, release: true); + void getIndexes_range_( + ffi.Pointer indexes, _NSRange positionRange) { + _objc_msgSend_360( + this.pointer, _sel_getIndexes_range_, indexes, positionRange); } - void storeCookies_forTask_(NSArray cookies, NSURLSessionTask task) { - _lib._objc_msgSend_882( - _id, _lib._sel_storeCookies_forTask_1, cookies._id, task._id); + int compare_(NSIndexPath otherObject) { + return _objc_msgSend_361(this.pointer, _sel_compare_, otherObject.pointer); } - void getCookiesForTask_completionHandler_( - NSURLSessionTask task, ObjCBlock_ffiVoid_NSArray completionHandler) { - _lib._objc_msgSend_883(_id, _lib._sel_getCookiesForTask_completionHandler_1, - task._id, completionHandler._id); + void getIndexes_(ffi.Pointer indexes) { + _objc_msgSend_362(this.pointer, _sel_getIndexes_, indexes); } @override - NSHTTPCookieStorage init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + NSIndexPath init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - static NSHTTPCookieStorage new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSHTTPCookieStorage1, _lib._sel_new1); - return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + static NSIndexPath new1() { + final _ret = _objc_msgSend_40(_class_NSIndexPath, _sel_new); + return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } - static NSHTTPCookieStorage allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSHTTPCookieStorage1, _lib._sel_allocWithZone_1, zone); - return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + static NSIndexPath allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSIndexPath, _sel_allocWithZone_, zone); + return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } - static NSHTTPCookieStorage alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSHTTPCookieStorage1, _lib._sel_alloc1); - return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + static NSIndexPath alloc() { + final _ret = _objc_msgSend_40(_class_NSIndexPath, _sel_alloc); + return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSHTTPCookieStorage1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSIndexPath, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSHTTPCookieStorage1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSIndexPath, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSHTTPCookieStorage1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSIndexPath, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSHTTPCookieStorage1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSIndexPath, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSHTTPCookieStorage1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSIndexPath, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSHTTPCookieStorage1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSIndexPath, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSHTTPCookieStorage1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSHTTPCookieStorage1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSIndexPath, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSIndexPath, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSIndexPath, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSIndexPath = objc.getClass("NSIndexPath"); +late final _sel_indexPathWithIndex_ = objc.registerName("indexPathWithIndex:"); +final _objc_msgSend_355 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_indexPathWithIndexes_length_ = + objc.registerName("indexPathWithIndexes:length:"); +final _objc_msgSend_356 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_initWithIndexes_length_ = + objc.registerName("initWithIndexes:length:"); +late final _sel_initWithIndex_ = objc.registerName("initWithIndex:"); +late final _sel_indexPathByAddingIndex_ = + objc.registerName("indexPathByAddingIndex:"); +final _objc_msgSend_357 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_indexPathByRemovingLastIndex = + objc.registerName("indexPathByRemovingLastIndex"); +final _objc_msgSend_358 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_indexAtPosition_ = objc.registerName("indexAtPosition:"); +final _objc_msgSend_359 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_getIndexes_range_ = objc.registerName("getIndexes:range:"); +final _objc_msgSend_360 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); +late final _sel_compare_ = objc.registerName("compare:"); +final _objc_msgSend_361 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_getIndexes_ = objc.registerName("getIndexes:"); +final _objc_msgSend_362 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class NSInflectionRule extends objc.NSObject { + NSInflectionRule._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSHTTPCookieStorage1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} + /// Constructs a [NSInflectionRule] that points to the same underlying object as [other]. + NSInflectionRule.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); -class NSHTTPCookie extends NSObject { - NSHTTPCookie._(ffi.Pointer id, AVFAudio lib, + /// Constructs a [NSInflectionRule] that wraps the given raw object pointer. + NSInflectionRule.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : this._(other, retain: retain, release: release); - /// Returns a [NSHTTPCookie] that points to the same underlying object as [other]. - static NSHTTPCookie castFrom(T other) { - return NSHTTPCookie._(other._id, other._lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSInflectionRule]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSInflectionRule); } - /// Returns a [NSHTTPCookie] that wraps the given raw object pointer. - static NSHTTPCookie castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHTTPCookie._(other, lib, retain: retain, release: release); + @override + objc.NSObject init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSHTTPCookie]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSHTTPCookie1); + static NSInflectionRule getAutomaticRule() { + final _ret = _objc_msgSend_363(_class_NSInflectionRule, _sel_automaticRule); + return NSInflectionRule.castFromPointer(_ret, retain: true, release: true); } - NSHTTPCookie? initWithProperties_(NSDictionary properties) { - final _ret = _lib._objc_msgSend_851( - _id, _lib._sel_initWithProperties_1, properties._id); - return _ret.address == 0 - ? null - : NSHTTPCookie._(_ret, _lib, retain: true, release: true); + static bool canInflectLanguage_(objc.NSString language) { + return _objc_msgSend_51( + _class_NSInflectionRule, _sel_canInflectLanguage_, language.pointer); } - static NSHTTPCookie? cookieWithProperties_( - AVFAudio _lib, NSDictionary properties) { - final _ret = _lib._objc_msgSend_852(_lib._class_NSHTTPCookie1, - _lib._sel_cookieWithProperties_1, properties._id); - return _ret.address == 0 - ? null - : NSHTTPCookie._(_ret, _lib, retain: true, release: true); + static bool getCanInflectPreferredLocalization() { + return _objc_msgSend_7( + _class_NSInflectionRule, _sel_canInflectPreferredLocalization); } - static NSDictionary requestHeaderFieldsWithCookies_( - AVFAudio _lib, NSArray cookies) { - final _ret = _lib._objc_msgSend_508(_lib._class_NSHTTPCookie1, - _lib._sel_requestHeaderFieldsWithCookies_1, cookies._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); + static NSInflectionRule new1() { + final _ret = _objc_msgSend_40(_class_NSInflectionRule, _sel_new); + return NSInflectionRule.castFromPointer(_ret, retain: false, release: true); } - static NSArray cookiesWithResponseHeaderFields_forURL_( - AVFAudio _lib, NSDictionary headerFields, NSURL URL) { - final _ret = _lib._objc_msgSend_853( - _lib._class_NSHTTPCookie1, - _lib._sel_cookiesWithResponseHeaderFields_forURL_1, - headerFields._id, - URL._id); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSInflectionRule allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSInflectionRule, _sel_allocWithZone_, zone); + return NSInflectionRule.castFromPointer(_ret, retain: false, release: true); } - NSDictionary? get properties { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_properties1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + static NSInflectionRule alloc() { + final _ret = _objc_msgSend_40(_class_NSInflectionRule, _sel_alloc); + return NSInflectionRule.castFromPointer(_ret, retain: false, release: true); } - int get version { - return _lib._objc_msgSend_10(_id, _lib._sel_version1); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSInflectionRule, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSString get name { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_name1); - return NSString._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSInflectionRule, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSString get value { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_value1); - return NSString._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSInflectionRule, _sel_accessInstanceVariablesDirectly); } - NSDate? get expiresDate { - final _ret = _lib._objc_msgSend_183(_id, _lib._sel_expiresDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSInflectionRule, _sel_useStoredAccessor); } - bool get sessionOnly { - return _lib._objc_msgSend_12(_id, _lib._sel_isSessionOnly1); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSInflectionRule, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSString get domain { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_domain1); - return NSString._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSInflectionRule, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSString get path { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_path1); - return NSString._(_ret, _lib, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSInflectionRule, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - bool get secure { - return _lib._objc_msgSend_12(_id, _lib._sel_isSecure1); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSInflectionRule, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool get HTTPOnly { - return _lib._objc_msgSend_12(_id, _lib._sel_isHTTPOnly1); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSInflectionRule, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - NSString? get comment { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_comment1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +late final _class_NSInflectionRule = objc.getClass("NSInflectionRule"); +late final _sel_automaticRule = objc.registerName("automaticRule"); +final _objc_msgSend_363 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_canInflectLanguage_ = objc.registerName("canInflectLanguage:"); +late final _sel_canInflectPreferredLocalization = + objc.registerName("canInflectPreferredLocalization"); - NSURL? get commentURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_commentURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); +class NSOrderedSet extends objc.NSObject { + NSOrderedSet._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSOrderedSet] that points to the same underlying object as [other]. + NSOrderedSet.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSOrderedSet] that wraps the given raw object pointer. + NSOrderedSet.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSOrderedSet]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSOrderedSet); } - NSArray? get portList { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_portList1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + int get count { + return _objc_msgSend_29(this.pointer, _sel_count); } - NSString? get sameSitePolicy { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_sameSitePolicy1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + objc.NSObject objectAtIndex_(int idx) { + final _ret = _objc_msgSend_355(this.pointer, _sel_objectAtIndex_, idx); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - @override - NSHTTPCookie init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSHTTPCookie._(_ret, _lib, retain: true, release: true); + int indexOfObject_(objc.NSObject object) { + return _objc_msgSend_364(this.pointer, _sel_indexOfObject_, object.pointer); } - static NSHTTPCookie new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSHTTPCookie1, _lib._sel_new1); - return NSHTTPCookie._(_ret, _lib, retain: false, release: true); + @override + NSOrderedSet init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static NSHTTPCookie allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSHTTPCookie1, _lib._sel_allocWithZone_1, zone); - return NSHTTPCookie._(_ret, _lib, retain: false, release: true); + NSOrderedSet initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_365( + this.pointer, _sel_initWithObjects_count_, objects, cnt); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static NSHTTPCookie alloc(AVFAudio _lib) { + NSOrderedSet? initWithCoder_(objc.NSCoder coder) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSHTTPCookie1, _lib._sel_alloc1); - return NSHTTPCookie._(_ret, _lib, retain: false, release: true); + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSHTTPCookie1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + void getObjects_range_( + ffi.Pointer> objects, _NSRange range) { + _objc_msgSend_366(this.pointer, _sel_getObjects_range_, objects, range); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSHTTPCookie1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + objc.NSArray objectsAtIndexes_(objc.NSIndexSet indexes) { + final _ret = _objc_msgSend_367( + this.pointer, _sel_objectsAtIndexes_, indexes.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSHTTPCookie1, _lib._sel_accessInstanceVariablesDirectly1); + objc.NSObject? get firstObject { + final _ret = _objc_msgSend_66(this.pointer, _sel_firstObject); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSHTTPCookie1, _lib._sel_useStoredAccessor1); + objc.NSObject? get lastObject { + final _ret = _objc_msgSend_66(this.pointer, _sel_lastObject); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSHTTPCookie1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + bool isEqualToOrderedSet_(NSOrderedSet other) { + return _objc_msgSend_368( + this.pointer, _sel_isEqualToOrderedSet_, other.pointer); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSHTTPCookie1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + bool containsObject_(objc.NSObject object) { + return _objc_msgSend_0(this.pointer, _sel_containsObject_, object.pointer); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSHTTPCookie1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + bool intersectsOrderedSet_(NSOrderedSet other) { + return _objc_msgSend_368( + this.pointer, _sel_intersectsOrderedSet_, other.pointer); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSHTTPCookie1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool intersectsSet_(objc.NSSet set) { + return _objc_msgSend_369(this.pointer, _sel_intersectsSet_, set.pointer); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSHTTPCookie1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + bool isSubsetOfOrderedSet_(NSOrderedSet other) { + return _objc_msgSend_368( + this.pointer, _sel_isSubsetOfOrderedSet_, other.pointer); } -} - -abstract class NSHTTPCookieAcceptPolicy { - static const int NSHTTPCookieAcceptPolicyAlways = 0; - static const int NSHTTPCookieAcceptPolicyNever = 1; - static const int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2; -} - -class NSURLSessionTask extends NSObject { - NSURLSessionTask._(ffi.Pointer id, AVFAudio 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); + bool isSubsetOfSet_(objc.NSSet set) { + return _objc_msgSend_369(this.pointer, _sel_isSubsetOfSet_, set.pointer); } - /// Returns a [NSURLSessionTask] that wraps the given raw object pointer. - static NSURLSessionTask castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionTask._(other, lib, retain: retain, release: release); + objc.NSObject objectAtIndexedSubscript_(int idx) { + final _ret = + _objc_msgSend_355(this.pointer, _sel_objectAtIndexedSubscript_, idx); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSURLSessionTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionTask1); + objc.NSEnumerator objectEnumerator() { + final _ret = _objc_msgSend_370(this.pointer, _sel_objectEnumerator); + return objc.NSEnumerator.castFromPointer(_ret, retain: true, release: true); } - int get taskIdentifier { - return _lib._objc_msgSend_10(_id, _lib._sel_taskIdentifier1); + objc.NSEnumerator reverseObjectEnumerator() { + final _ret = _objc_msgSend_370(this.pointer, _sel_reverseObjectEnumerator); + return objc.NSEnumerator.castFromPointer(_ret, retain: true, release: true); } - NSURLRequest? get originalRequest { - final _ret = _lib._objc_msgSend_876(_id, _lib._sel_originalRequest1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); + NSOrderedSet get reversedOrderedSet { + final _ret = _objc_msgSend_371(this.pointer, _sel_reversedOrderedSet); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - NSURLRequest? get currentRequest { - final _ret = _lib._objc_msgSend_876(_id, _lib._sel_currentRequest1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); + objc.NSArray get array { + final _ret = _objc_msgSend_6(this.pointer, _sel_array); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSURLResponse? get response { - final _ret = _lib._objc_msgSend_878(_id, _lib._sel_response1); - return _ret.address == 0 - ? null - : NSURLResponse._(_ret, _lib, retain: true, release: true); + objc.NSSet get set1 { + final _ret = _objc_msgSend_372(this.pointer, _sel_set); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSObject? get delegate { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + void enumerateObjectsUsingBlock_( + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { + _objc_msgSend_373( + this.pointer, _sel_enumerateObjectsUsingBlock_, block.pointer); } - set delegate(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); + void enumerateObjectsWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { + _objc_msgSend_374(this.pointer, + _sel_enumerateObjectsWithOptions_usingBlock_, opts, block.pointer); } - NSProgress get progress { - final _ret = _lib._objc_msgSend_879(_id, _lib._sel_progress1); - return NSProgress._(_ret, _lib, retain: true, release: true); + void enumerateObjectsAtIndexes_options_usingBlock_(objc.NSIndexSet s, + int opts, ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { + _objc_msgSend_375( + this.pointer, + _sel_enumerateObjectsAtIndexes_options_usingBlock_, + s.pointer, + opts, + block.pointer); } - NSDate? get earliestBeginDate { - final _ret = _lib._objc_msgSend_183(_id, _lib._sel_earliestBeginDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + int indexOfObjectPassingTest_( + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_376( + this.pointer, _sel_indexOfObjectPassingTest_, predicate.pointer); } - set earliestBeginDate(NSDate? value) { - return _lib._objc_msgSend_800( - _id, _lib._sel_setEarliestBeginDate_1, value?._id ?? ffi.nullptr); + int indexOfObjectWithOptions_passingTest_( + int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_377(this.pointer, + _sel_indexOfObjectWithOptions_passingTest_, opts, predicate.pointer); } - int get countOfBytesClientExpectsToSend { - return _lib._objc_msgSend_666( - _id, _lib._sel_countOfBytesClientExpectsToSend1); + int indexOfObjectAtIndexes_options_passingTest_(objc.NSIndexSet s, int opts, + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_378( + this.pointer, + _sel_indexOfObjectAtIndexes_options_passingTest_, + s.pointer, + opts, + predicate.pointer); } - set countOfBytesClientExpectsToSend(int value) { - return _lib._objc_msgSend_667( - _id, _lib._sel_setCountOfBytesClientExpectsToSend_1, value); + objc.NSIndexSet indexesOfObjectsPassingTest_( + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_379( + this.pointer, _sel_indexesOfObjectsPassingTest_, predicate.pointer); + return objc.NSIndexSet.castFromPointer(_ret, retain: true, release: true); } - int get countOfBytesClientExpectsToReceive { - return _lib._objc_msgSend_666( - _id, _lib._sel_countOfBytesClientExpectsToReceive1); + objc.NSIndexSet indexesOfObjectsWithOptions_passingTest_( + int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_380(this.pointer, + _sel_indexesOfObjectsWithOptions_passingTest_, opts, predicate.pointer); + return objc.NSIndexSet.castFromPointer(_ret, retain: true, release: true); } - set countOfBytesClientExpectsToReceive(int value) { - return _lib._objc_msgSend_667( - _id, _lib._sel_setCountOfBytesClientExpectsToReceive_1, value); + objc.NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_( + objc.NSIndexSet s, + int opts, + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_381( + this.pointer, + _sel_indexesOfObjectsAtIndexes_options_passingTest_, + s.pointer, + opts, + predicate.pointer); + return objc.NSIndexSet.castFromPointer(_ret, retain: true, release: true); } - int get countOfBytesSent { - return _lib._objc_msgSend_666(_id, _lib._sel_countOfBytesSent1); + int indexOfObject_inSortedRange_options_usingComparator_( + objc.NSObject object, + _NSRange range, + int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmp) { + return _objc_msgSend_382( + this.pointer, + _sel_indexOfObject_inSortedRange_options_usingComparator_, + object.pointer, + range, + opts, + cmp.pointer); } - int get countOfBytesReceived { - return _lib._objc_msgSend_666(_id, _lib._sel_countOfBytesReceived1); + objc.NSArray sortedArrayUsingComparator_( + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + final _ret = _objc_msgSend_383( + this.pointer, _sel_sortedArrayUsingComparator_, cmptr.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int get countOfBytesExpectedToSend { - return _lib._objc_msgSend_666(_id, _lib._sel_countOfBytesExpectedToSend1); + objc.NSArray sortedArrayWithOptions_usingComparator_(int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + final _ret = _objc_msgSend_384(this.pointer, + _sel_sortedArrayWithOptions_usingComparator_, opts, cmptr.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int get countOfBytesExpectedToReceive { - return _lib._objc_msgSend_666( - _id, _lib._sel_countOfBytesExpectedToReceive1); + objc.NSString get description { + final _ret = _objc_msgSend_12(this.pointer, _sel_description); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get taskDescription { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_taskDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + objc.NSString descriptionWithLocale_(objc.NSObject? locale) { + final _ret = _objc_msgSend_385(this.pointer, _sel_descriptionWithLocale_, + locale?.pointer ?? ffi.nullptr); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set taskDescription(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setTaskDescription_1, value?._id ?? ffi.nullptr); + objc.NSString descriptionWithLocale_indent_( + objc.NSObject? locale, int level) { + final _ret = _objc_msgSend_386( + this.pointer, + _sel_descriptionWithLocale_indent_, + locale?.pointer ?? ffi.nullptr, + level); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void cancel() { - _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + static NSOrderedSet orderedSet() { + final _ret = _objc_msgSend_40(_class_NSOrderedSet, _sel_orderedSet); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - int get state { - return _lib._objc_msgSend_880(_id, _lib._sel_state1); + static NSOrderedSet orderedSetWithObject_(objc.NSObject object) { + final _ret = _objc_msgSend_387( + _class_NSOrderedSet, _sel_orderedSetWithObject_, object.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - NSError? get error { - final _ret = _lib._objc_msgSend_322(_id, _lib._sel_error1); - return _ret.address == 0 - ? null - : NSError._(_ret, _lib, retain: true, release: true); + static NSOrderedSet orderedSetWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_365( + _class_NSOrderedSet, _sel_orderedSetWithObjects_count_, objects, cnt); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - void suspend() { - _lib._objc_msgSend_1(_id, _lib._sel_suspend1); + static NSOrderedSet orderedSetWithObjects_(objc.NSObject firstObj) { + final _ret = _objc_msgSend_387( + _class_NSOrderedSet, _sel_orderedSetWithObjects_, firstObj.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - void resume() { - _lib._objc_msgSend_1(_id, _lib._sel_resume1); + static NSOrderedSet orderedSetWithOrderedSet_(NSOrderedSet set) { + final _ret = _objc_msgSend_388( + _class_NSOrderedSet, _sel_orderedSetWithOrderedSet_, set.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - double get priority { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_239_fpret(_id, _lib._sel_priority1) - : _lib._objc_msgSend_239(_id, _lib._sel_priority1); + static NSOrderedSet orderedSetWithOrderedSet_range_copyItems_( + NSOrderedSet set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_389( + _class_NSOrderedSet, + _sel_orderedSetWithOrderedSet_range_copyItems_, + set.pointer, + range, + flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - set priority(double value) { - return _lib._objc_msgSend_881(_id, _lib._sel_setPriority_1, value); + static NSOrderedSet orderedSetWithArray_(objc.NSArray array) { + final _ret = _objc_msgSend_390( + _class_NSOrderedSet, _sel_orderedSetWithArray_, array.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - bool get prefersIncrementalDelivery { - return _lib._objc_msgSend_12(_id, _lib._sel_prefersIncrementalDelivery1); + static NSOrderedSet orderedSetWithArray_range_copyItems_( + objc.NSArray array, _NSRange range, bool flag) { + final _ret = _objc_msgSend_391(_class_NSOrderedSet, + _sel_orderedSetWithArray_range_copyItems_, array.pointer, range, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - set prefersIncrementalDelivery(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setPrefersIncrementalDelivery_1, value); + static NSOrderedSet orderedSetWithSet_(objc.NSSet set) { + final _ret = _objc_msgSend_392( + _class_NSOrderedSet, _sel_orderedSetWithSet_, set.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - @override - NSURLSessionTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionTask._(_ret, _lib, retain: true, release: true); + static NSOrderedSet orderedSetWithSet_copyItems_(objc.NSSet set, bool flag) { + final _ret = _objc_msgSend_393(_class_NSOrderedSet, + _sel_orderedSetWithSet_copyItems_, set.pointer, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - static NSURLSessionTask new1(AVFAudio _lib) { + NSOrderedSet initWithObject_(objc.NSObject object) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_new1); - return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + _objc_msgSend_387(this.pointer, _sel_initWithObject_, object.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionTask allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLSessionTask1, _lib._sel_allocWithZone_1, zone); - return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + NSOrderedSet initWithObjects_(objc.NSObject firstObj) { + final _ret = _objc_msgSend_387( + this.pointer, _sel_initWithObjects_, firstObj.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionTask alloc(AVFAudio _lib) { + NSOrderedSet initWithOrderedSet_(NSOrderedSet set) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_alloc1); - return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + _objc_msgSend_388(this.pointer, _sel_initWithOrderedSet_, set.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLSessionTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + NSOrderedSet initWithOrderedSet_copyItems_(NSOrderedSet set, bool flag) { + final _ret = _objc_msgSend_394( + this.pointer, _sel_initWithOrderedSet_copyItems_, set.pointer, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLSessionTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + NSOrderedSet initWithOrderedSet_range_copyItems_( + NSOrderedSet set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_389(this.pointer, + _sel_initWithOrderedSet_range_copyItems_, set.pointer, range, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLSessionTask1, - _lib._sel_accessInstanceVariablesDirectly1); + NSOrderedSet initWithArray_(objc.NSArray array) { + final _ret = + _objc_msgSend_390(this.pointer, _sel_initWithArray_, array.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLSessionTask1, _lib._sel_useStoredAccessor1); + NSOrderedSet initWithArray_copyItems_(objc.NSArray set, bool flag) { + final _ret = _objc_msgSend_395( + this.pointer, _sel_initWithArray_copyItems_, set.pointer, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLSessionTask1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + NSOrderedSet initWithArray_range_copyItems_( + objc.NSArray set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_391(this.pointer, + _sel_initWithArray_range_copyItems_, set.pointer, range, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLSessionTask1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + NSOrderedSet initWithSet_(objc.NSSet set) { + final _ret = + _objc_msgSend_392(this.pointer, _sel_initWithSet_, set.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLSessionTask1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + NSOrderedSet initWithSet_copyItems_(objc.NSSet set, bool flag) { + final _ret = _objc_msgSend_393( + this.pointer, _sel_initWithSet_copyItems_, set.pointer, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSURLSessionTask1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSObject differenceFromOrderedSet_withOptions_usingEquivalenceTest_( + NSOrderedSet other, + int options, + ObjCBlock_bool_objcObjCObject_objcObjCObject block) { + final _ret = _objc_msgSend_396( + this.pointer, + _sel_differenceFromOrderedSet_withOptions_usingEquivalenceTest_, + other.pointer, + options, + block.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionTask1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSObject differenceFromOrderedSet_withOptions_( + NSOrderedSet other, int options) { + final _ret = _objc_msgSend_397(this.pointer, + _sel_differenceFromOrderedSet_withOptions_, other.pointer, options); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } -} - -class NSURLRequest extends NSObject { - NSURLRequest._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSURLRequest] that points to the same underlying object as [other]. - static NSURLRequest castFrom(T other) { - return NSURLRequest._(other._id, other._lib, retain: true, release: true); + objc.NSObject differenceFromOrderedSet_(NSOrderedSet other) { + final _ret = _objc_msgSend_388( + this.pointer, _sel_differenceFromOrderedSet_, other.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSURLRequest] that wraps the given raw object pointer. - static NSURLRequest castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLRequest._(other, lib, retain: retain, release: release); + NSOrderedSet? orderedSetByApplyingDifference_(objc.NSObject difference) { + final _ret = _objc_msgSend_398( + this.pointer, _sel_orderedSetByApplyingDifference_, difference.pointer); + return _ret.address == 0 + ? null + : NSOrderedSet.castFromPointer(_ret, 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); + objc.NSObject valueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_35(this.pointer, _sel_valueForKey_, key.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSURLRequest requestWithURL_(AVFAudio _lib, NSURL URL) { - final _ret = _lib._objc_msgSend_262( - _lib._class_NSURLRequest1, _lib._sel_requestWithURL_1, URL._id); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + void setValue_forKey_(objc.NSObject? value, objc.NSString key) { + _objc_msgSend_399(this.pointer, _sel_setValue_forKey_, + value?.pointer ?? ffi.nullptr, key.pointer); } - static bool getSupportsSecureCoding(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLRequest1, _lib._sel_supportsSecureCoding1); + void addObserver_forKeyPath_options_context_(objc.NSObject observer, + objc.NSString keyPath, int options, ffi.Pointer context) { + _objc_msgSend_400( + this.pointer, + _sel_addObserver_forKeyPath_options_context_, + observer.pointer, + keyPath.pointer, + options, + context); } - static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( - AVFAudio _lib, NSURL URL, int cachePolicy, double timeoutInterval) { - final _ret = _lib._objc_msgSend_858( - _lib._class_NSURLRequest1, - _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, - URL._id, - cachePolicy, - timeoutInterval); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + void removeObserver_forKeyPath_context_(objc.NSObject observer, + objc.NSString keyPath, ffi.Pointer context) { + _objc_msgSend_401(this.pointer, _sel_removeObserver_forKeyPath_context_, + observer.pointer, keyPath.pointer, context); } - NSURLRequest initWithURL_(NSURL URL) { - final _ret = _lib._objc_msgSend_262(_id, _lib._sel_initWithURL_1, URL._id); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + void removeObserver_forKeyPath_( + objc.NSObject observer, objc.NSString keyPath) { + _objc_msgSend_402(this.pointer, _sel_removeObserver_forKeyPath_, + observer.pointer, keyPath.pointer); } - NSURLRequest initWithURL_cachePolicy_timeoutInterval_( - NSURL URL, int cachePolicy, double timeoutInterval) { - final _ret = _lib._objc_msgSend_858( - _id, - _lib._sel_initWithURL_cachePolicy_timeoutInterval_1, - URL._id, - cachePolicy, - timeoutInterval); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + objc.NSArray sortedArrayUsingDescriptors_(objc.NSArray sortDescriptors) { + final _ret = _objc_msgSend_67(this.pointer, + _sel_sortedArrayUsingDescriptors_, sortDescriptors.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSURL? get URL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + NSOrderedSet filteredOrderedSetUsingPredicate_(NSPredicate p) { + final _ret = _objc_msgSend_412( + this.pointer, _sel_filteredOrderedSetUsingPredicate_, p.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - int get cachePolicy { - return _lib._objc_msgSend_859(_id, _lib._sel_cachePolicy1); + static NSOrderedSet new1() { + final _ret = _objc_msgSend_40(_class_NSOrderedSet, _sel_new); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - double get timeoutInterval { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_timeoutInterval1) - : _lib._objc_msgSend_165(_id, _lib._sel_timeoutInterval1); + static NSOrderedSet allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSOrderedSet, _sel_allocWithZone_, zone); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - NSURL? get mainDocumentURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_mainDocumentURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static NSOrderedSet alloc() { + final _ret = _objc_msgSend_40(_class_NSOrderedSet, _sel_alloc); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - int get networkServiceType { - return _lib._objc_msgSend_860(_id, _lib._sel_networkServiceType1); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSOrderedSet, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - bool get allowsCellularAccess { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsCellularAccess1); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSOrderedSet, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsExpensiveNetworkAccess1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSOrderedSet, _sel_accessInstanceVariablesDirectly); } - bool get allowsConstrainedNetworkAccess { - return _lib._objc_msgSend_12( - _id, _lib._sel_allowsConstrainedNetworkAccess1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSOrderedSet, _sel_useStoredAccessor); } - bool get assumesHTTP3Capable { - return _lib._objc_msgSend_12(_id, _lib._sel_assumesHTTP3Capable1); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSOrderedSet, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - int get attribution { - return _lib._objc_msgSend_861(_id, _lib._sel_attribution1); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSOrderedSet, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - bool get requiresDNSSECValidation { - return _lib._objc_msgSend_12(_id, _lib._sel_requiresDNSSECValidation1); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSOrderedSet, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSOrderedSet, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSOrderedSet, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSOrderedSet = objc.getClass("NSOrderedSet"); +late final _sel_count = objc.registerName("count"); +late final _sel_objectAtIndex_ = objc.registerName("objectAtIndex:"); +late final _sel_indexOfObject_ = objc.registerName("indexOfObject:"); +final _objc_msgSend_364 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithObjects_count_ = + objc.registerName("initWithObjects:count:"); +final _objc_msgSend_365 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>(); +late final _sel_getObjects_range_ = objc.registerName("getObjects:range:"); +final _objc_msgSend_366 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + _NSRange)>(); +late final _sel_objectsAtIndexes_ = objc.registerName("objectsAtIndexes:"); +final _objc_msgSend_367 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_firstObject = objc.registerName("firstObject"); +late final _sel_lastObject = objc.registerName("lastObject"); +late final _sel_isEqualToOrderedSet_ = + objc.registerName("isEqualToOrderedSet:"); +final _objc_msgSend_368 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_containsObject_ = objc.registerName("containsObject:"); +late final _sel_intersectsOrderedSet_ = + objc.registerName("intersectsOrderedSet:"); +late final _sel_intersectsSet_ = objc.registerName("intersectsSet:"); +final _objc_msgSend_369 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isSubsetOfOrderedSet_ = + objc.registerName("isSubsetOfOrderedSet:"); +late final _sel_isSubsetOfSet_ = objc.registerName("isSubsetOfSet:"); +late final _sel_objectAtIndexedSubscript_ = + objc.registerName("objectAtIndexedSubscript:"); +late final _sel_objectEnumerator = objc.registerName("objectEnumerator"); +final _objc_msgSend_370 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_reverseObjectEnumerator = + objc.registerName("reverseObjectEnumerator"); +late final _sel_reversedOrderedSet = objc.registerName("reversedOrderedSet"); +final _objc_msgSend_371 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_array = objc.registerName("array"); +late final _sel_set = objc.registerName("set"); +final _objc_msgSend_372 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, int, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistry = + , int, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + void Function(ffi.Pointer, int, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[id] = + fn; + return ffi.Pointer.fromAddress(id); +} - NSString? get HTTPMethod { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_HTTPMethod1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); - NSDictionary? get allHTTPHeaderFields { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_allHTTPHeaderFields1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); - NSString? valueForHTTPHeaderField_(NSString field) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_valueForHTTPHeaderField_1, field._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool._(pointer, + retain: retain, release: release); } - NSData? get HTTPBody { - final _ret = _lib._objc_msgSend_286(_id, _lib._sel_HTTPBody1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - NSInputStream? get HTTPBodyStream { - final _ret = _lib._objc_msgSend_875(_id, _lib._sel_HTTPBodyStream1); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.fromFunction( + void Function(objc.NSObject, int, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(objc.NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.Pointer? _dartFuncTrampoline; - bool get HTTPShouldHandleCookies { - return _lib._objc_msgSend_12(_id, _lib._sel_HTTPShouldHandleCookies1); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.listener( + void Function(objc.NSObject, int, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(objc.NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(objc.NSObject arg0, int arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.UnsignedLong arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>()(pointer, arg0.pointer, arg1, arg2); +} + +late final _sel_enumerateObjectsUsingBlock_ = + objc.registerName("enumerateObjectsUsingBlock:"); +final _objc_msgSend_373 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSEnumerationOptions { + static const int NSEnumerationConcurrent = 1; + static const int NSEnumerationReverse = 2; +} + +late final _sel_enumerateObjectsWithOptions_usingBlock_ = + objc.registerName("enumerateObjectsWithOptions:usingBlock:"); +final _objc_msgSend_374 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_enumerateObjectsAtIndexes_options_usingBlock_ = + objc.registerName("enumerateObjectsAtIndexes:options:usingBlock:"); +final _objc_msgSend_375 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +bool _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>>() + .asFunction< + bool Function(ffi.Pointer, int, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistry = + , int, ffi.Pointer)>{}; +int _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + bool Function(ffi.Pointer, int, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex; + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool + extends objc.ObjCBlockBase { + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool._(pointer, + retain: retain, release: release); } - bool get HTTPShouldUsePipelining { - return _lib._objc_msgSend_12(_id, _lib._sel_HTTPShouldUsePipelining1); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline, + false) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool.fromFunction( + bool Function(objc.NSObject, int, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => + fn(objc.NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.Pointer? _dartFuncTrampoline; + + bool call(objc.NSObject arg0, int arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.UnsignedLong arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>()(pointer, arg0.pointer, arg1, arg2); +} + +late final _sel_indexOfObjectPassingTest_ = + objc.registerName("indexOfObjectPassingTest:"); +final _objc_msgSend_376 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_indexOfObjectWithOptions_passingTest_ = + objc.registerName("indexOfObjectWithOptions:passingTest:"); +final _objc_msgSend_377 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_indexOfObjectAtIndexes_options_passingTest_ = + objc.registerName("indexOfObjectAtIndexes:options:passingTest:"); +final _objc_msgSend_378 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_indexesOfObjectsPassingTest_ = + objc.registerName("indexesOfObjectsPassingTest:"); +final _objc_msgSend_379 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_indexesOfObjectsWithOptions_passingTest_ = + objc.registerName("indexesOfObjectsWithOptions:passingTest:"); +final _objc_msgSend_380 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_indexesOfObjectsAtIndexes_options_passingTest_ = + objc.registerName("indexesOfObjectsAtIndexes:options:passingTest:"); +final _objc_msgSend_381 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_registerClosure( + int Function(ffi.Pointer, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistryIndex; + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistry[ + id] = fn; + return ffi.Pointer.fromAddress(id); +} + +int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistry[ + block.ref.target.address]!(arg0, arg1); - @override - NSURLRequest init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject + extends objc.ObjCBlockBase { + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); - static NSURLRequest new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_new1); - return NSURLRequest._(_ret, _lib, retain: false, release: true); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) { + return ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject._(pointer, + retain: retain, release: release); } - static NSURLRequest allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLRequest1, _lib._sel_allocWithZone_1, zone); - return NSURLRequest._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_fnPtrTrampoline, + 0) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - static NSURLRequest alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_alloc1); - return NSURLRequest._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject.fromFunction( + int Function(objc.NSObject, objc.NSObject) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureTrampoline, 0) + .cast(), + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(objc.NSObject.castFromPointer(arg0, retain: true, release: true), objc.NSObject.castFromPointer(arg1, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLRequest1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } + int call(objc.NSObject arg0, objc.NSObject arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1.pointer); +} + +late final _sel_indexOfObject_inSortedRange_options_usingComparator_ = + objc.registerName("indexOfObject:inSortedRange:options:usingComparator:"); +final _objc_msgSend_382 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); +late final _sel_sortedArrayUsingComparator_ = + objc.registerName("sortedArrayUsingComparator:"); +final _objc_msgSend_383 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLRequest1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } +abstract class NSSortOptions { + static const int NSSortConcurrent = 1; + static const int NSSortStable = 16; +} - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLRequest1, _lib._sel_accessInstanceVariablesDirectly1); - } +late final _sel_sortedArrayWithOptions_usingComparator_ = + objc.registerName("sortedArrayWithOptions:usingComparator:"); +final _objc_msgSend_384 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_descriptionWithLocale_ = + objc.registerName("descriptionWithLocale:"); +final _objc_msgSend_385 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_descriptionWithLocale_indent_ = + objc.registerName("descriptionWithLocale:indent:"); +final _objc_msgSend_386 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_orderedSet = objc.registerName("orderedSet"); +late final _sel_orderedSetWithObject_ = + objc.registerName("orderedSetWithObject:"); +final _objc_msgSend_387 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_orderedSetWithObjects_count_ = + objc.registerName("orderedSetWithObjects:count:"); +late final _sel_orderedSetWithObjects_ = + objc.registerName("orderedSetWithObjects:"); +late final _sel_orderedSetWithOrderedSet_ = + objc.registerName("orderedSetWithOrderedSet:"); +final _objc_msgSend_388 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_orderedSetWithOrderedSet_range_copyItems_ = + objc.registerName("orderedSetWithOrderedSet:range:copyItems:"); +final _objc_msgSend_389 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + bool)>(); +late final _sel_orderedSetWithArray_ = + objc.registerName("orderedSetWithArray:"); +final _objc_msgSend_390 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_orderedSetWithArray_range_copyItems_ = + objc.registerName("orderedSetWithArray:range:copyItems:"); +final _objc_msgSend_391 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + bool)>(); +late final _sel_orderedSetWithSet_ = objc.registerName("orderedSetWithSet:"); +final _objc_msgSend_392 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_orderedSetWithSet_copyItems_ = + objc.registerName("orderedSetWithSet:copyItems:"); +final _objc_msgSend_393 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_initWithObject_ = objc.registerName("initWithObject:"); +late final _sel_initWithObjects_ = objc.registerName("initWithObjects:"); +late final _sel_initWithOrderedSet_ = objc.registerName("initWithOrderedSet:"); +late final _sel_initWithOrderedSet_copyItems_ = + objc.registerName("initWithOrderedSet:copyItems:"); +final _objc_msgSend_394 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_initWithOrderedSet_range_copyItems_ = + objc.registerName("initWithOrderedSet:range:copyItems:"); +late final _sel_initWithArray_ = objc.registerName("initWithArray:"); +late final _sel_initWithArray_copyItems_ = + objc.registerName("initWithArray:copyItems:"); +final _objc_msgSend_395 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_initWithArray_range_copyItems_ = + objc.registerName("initWithArray:range:copyItems:"); +late final _sel_initWithSet_ = objc.registerName("initWithSet:"); +late final _sel_initWithSet_copyItems_ = + objc.registerName("initWithSet:copyItems:"); - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLRequest1, _lib._sel_useStoredAccessor1); - } +abstract class NSOrderedCollectionDifferenceCalculationOptions { + static const int NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = + 1; + static const int NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = + 2; + static const int NSOrderedCollectionDifferenceCalculationInferMoves = 4; +} - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLRequest1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } +bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistry = , ffi.Pointer)>{}; +int _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_bool_objcObjCObject_objcObjCObject_registerClosure( + bool Function( + ffi.Pointer, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistryIndex; + _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLRequest1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } +bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistry[ + block.ref.target.address]!(arg0, arg1); - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLRequest1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } +class ObjCBlock_bool_objcObjCObject_objcObjCObject extends objc.ObjCBlockBase { + ObjCBlock_bool_objcObjCObject_objcObjCObject._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSURLRequest1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_bool_objcObjCObject_objcObjCObject castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_bool_objcObjCObject_objcObjCObject._(pointer, + retain: retain, release: release); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLRequest1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_objcObjCObject.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_objcObjCObject_fnPtrTrampoline, + false) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; -abstract class NSURLRequestCachePolicy { - static const int NSURLRequestUseProtocolCachePolicy = 0; - static const int NSURLRequestReloadIgnoringLocalCacheData = 1; - static const int NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4; - static const int NSURLRequestReloadIgnoringCacheData = 1; - static const int NSURLRequestReturnCacheDataElseLoad = 2; - static const int NSURLRequestReturnCacheDataDontLoad = 3; - static const int NSURLRequestReloadRevalidatingCacheData = 5; -} + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_objcObjCObject.fromFunction( + bool Function(objc.NSObject, objc.NSObject) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_objcObjCObject_objcObjCObject_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(objc.NSObject.castFromPointer(arg0, retain: true, release: true), objc.NSObject.castFromPointer(arg1, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; -abstract class NSURLRequestNetworkServiceType { - static const int NSURLNetworkServiceTypeDefault = 0; - static const int NSURLNetworkServiceTypeVoIP = 1; - static const int NSURLNetworkServiceTypeVideo = 2; - static const int NSURLNetworkServiceTypeBackground = 3; - static const int NSURLNetworkServiceTypeVoice = 4; - static const int NSURLNetworkServiceTypeResponsiveData = 6; - static const int NSURLNetworkServiceTypeAVStreaming = 8; - static const int NSURLNetworkServiceTypeResponsiveAV = 9; - static const int NSURLNetworkServiceTypeCallSignaling = 11; -} + bool call(objc.NSObject arg0, objc.NSObject arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1.pointer); +} + +late final _sel_differenceFromOrderedSet_withOptions_usingEquivalenceTest_ = + objc.registerName( + "differenceFromOrderedSet:withOptions:usingEquivalenceTest:"); +final _objc_msgSend_396 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_differenceFromOrderedSet_withOptions_ = + objc.registerName("differenceFromOrderedSet:withOptions:"); +final _objc_msgSend_397 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_differenceFromOrderedSet_ = + objc.registerName("differenceFromOrderedSet:"); +late final _sel_orderedSetByApplyingDifference_ = + objc.registerName("orderedSetByApplyingDifference:"); +final _objc_msgSend_398 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_valueForKey_ = objc.registerName("valueForKey:"); +late final _sel_setValue_forKey_ = objc.registerName("setValue:forKey:"); +final _objc_msgSend_399 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); -abstract class NSURLRequestAttribution { - static const int NSURLRequestAttributionDeveloper = 0; - static const int NSURLRequestAttributionUser = 1; +abstract class NSKeyValueObservingOptions { + static const int NSKeyValueObservingOptionNew = 1; + static const int NSKeyValueObservingOptionOld = 2; + static const int NSKeyValueObservingOptionInitial = 4; + static const int NSKeyValueObservingOptionPrior = 8; } -class NSInputStream extends NSStream { - NSInputStream._(ffi.Pointer id, AVFAudio lib, +late final _sel_addObserver_forKeyPath_options_context_ = + objc.registerName("addObserver:forKeyPath:options:context:"); +final _objc_msgSend_400 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_removeObserver_forKeyPath_context_ = + objc.registerName("removeObserver:forKeyPath:context:"); +final _objc_msgSend_401 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeObserver_forKeyPath_ = + objc.registerName("removeObserver:forKeyPath:"); +final _objc_msgSend_402 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_sortedArrayUsingDescriptors_ = + objc.registerName("sortedArrayUsingDescriptors:"); + +class NSPredicate extends objc.NSObject { + NSPredicate._(ffi.Pointer pointer, {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); - } + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSInputStream] that wraps the given raw object pointer. - static NSInputStream castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInputStream._(other, lib, retain: retain, release: release); - } + /// Constructs a [NSPredicate] that points to the same underlying object as [other]. + NSPredicate.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// 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); - } + /// Constructs a [NSPredicate] that wraps the given raw object pointer. + NSPredicate.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - int read_maxLength_(ffi.Pointer buffer, int len) { - return _lib._objc_msgSend_864(_id, _lib._sel_read_maxLength_1, buffer, len); + /// Returns whether [obj] is an instance of [NSPredicate]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSPredicate); } - bool getBuffer_length_(ffi.Pointer> buffer, - ffi.Pointer len) { - return _lib._objc_msgSend_873( - _id, _lib._sel_getBuffer_length_1, buffer, len); + static NSPredicate predicateWithFormat_argumentArray_( + objc.NSString predicateFormat, objc.NSArray? arguments) { + final _ret = _objc_msgSend_403( + _class_NSPredicate, + _sel_predicateWithFormat_argumentArray_, + predicateFormat.pointer, + arguments?.pointer ?? ffi.nullptr); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - bool get hasBytesAvailable { - return _lib._objc_msgSend_12(_id, _lib._sel_hasBytesAvailable1); + static NSPredicate predicateWithFormat_(objc.NSString predicateFormat) { + final _ret = _objc_msgSend_404( + _class_NSPredicate, _sel_predicateWithFormat_, predicateFormat.pointer); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - NSInputStream initWithData_(NSData data) { - final _ret = - _lib._objc_msgSend_279(_id, _lib._sel_initWithData_1, data._id); - return NSInputStream._(_ret, _lib, retain: true, release: true); + static NSPredicate predicateWithFormat_arguments_( + objc.NSString predicateFormat, ffi.Pointer<__va_list_tag> argList) { + final _ret = _objc_msgSend_405(_class_NSPredicate, + _sel_predicateWithFormat_arguments_, predicateFormat.pointer, argList); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - NSInputStream? initWithURL_(NSURL url) { - final _ret = _lib._objc_msgSend_277(_id, _lib._sel_initWithURL_1, url._id); + static NSPredicate? predicateFromMetadataQueryString_( + objc.NSString queryString) { + final _ret = _objc_msgSend_406(_class_NSPredicate, + _sel_predicateFromMetadataQueryString_, queryString.pointer); return _ret.address == 0 ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); + : NSPredicate.castFromPointer(_ret, retain: true, release: true); } - NSInputStream? initWithFileAtPath_(NSString path) { + static NSPredicate predicateWithValue_(bool value) { final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_initWithFileAtPath_1, path._id); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); + _objc_msgSend_407(_class_NSPredicate, _sel_predicateWithValue_, value); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - static NSInputStream? inputStreamWithData_(AVFAudio _lib, NSData data) { - final _ret = _lib._objc_msgSend_874( - _lib._class_NSInputStream1, _lib._sel_inputStreamWithData_1, data._id); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); + static NSPredicate predicateWithBlock_( + ObjCBlock_bool_objcObjCObject_NSDictionary block) { + final _ret = _objc_msgSend_408( + _class_NSPredicate, _sel_predicateWithBlock_, block.pointer); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - static NSInputStream? inputStreamWithFileAtPath_( - AVFAudio _lib, NSString path) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSInputStream1, - _lib._sel_inputStreamWithFileAtPath_1, path._id); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); + objc.NSString get predicateFormat { + final _ret = _objc_msgSend_12(this.pointer, _sel_predicateFormat); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSInputStream? inputStreamWithURL_(AVFAudio _lib, NSURL url) { - final _ret = _lib._objc_msgSend_277( - _lib._class_NSInputStream1, _lib._sel_inputStreamWithURL_1, url._id); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); + NSPredicate predicateWithSubstitutionVariables_(objc.NSDictionary variables) { + final _ret = _objc_msgSend_409(this.pointer, + _sel_predicateWithSubstitutionVariables_, variables.pointer); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - static void getStreamsToHostWithName_port_inputStream_outputStream_( - AVFAudio _lib, - NSString hostname, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_867( - _lib._class_NSInputStream1, - _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, - hostname._id, - port, - inputStream, - outputStream); + bool evaluateWithObject_(objc.NSObject? object) { + return _objc_msgSend_410( + this.pointer, _sel_evaluateWithObject_, object?.pointer ?? ffi.nullptr); } - static void getStreamsToHost_port_inputStream_outputStream_( - AVFAudio _lib, - NSHost host, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_871( - _lib._class_NSInputStream1, - _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, - host._id, - port, - inputStream, - outputStream); + bool evaluateWithObject_substitutionVariables_( + objc.NSObject? object, objc.NSDictionary? bindings) { + return _objc_msgSend_411( + this.pointer, + _sel_evaluateWithObject_substitutionVariables_, + object?.pointer ?? ffi.nullptr, + bindings?.pointer ?? ffi.nullptr); } - static void getBoundStreamsWithBufferSize_inputStream_outputStream_( - AVFAudio _lib, - int bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_872( - _lib._class_NSInputStream1, - _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, - bufferSize, - inputStream, - outputStream); + void allowEvaluation() { + _objc_msgSend_82(this.pointer, _sel_allowEvaluation); } @override - NSInputStream init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSInputStream._(_ret, _lib, retain: true, release: true); + NSPredicate init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - static NSInputStream new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSInputStream1, _lib._sel_new1); - return NSInputStream._(_ret, _lib, retain: false, release: true); + static NSPredicate new1() { + final _ret = _objc_msgSend_40(_class_NSPredicate, _sel_new); + return NSPredicate.castFromPointer(_ret, retain: false, release: true); } - static NSInputStream allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSInputStream1, _lib._sel_allocWithZone_1, zone); - return NSInputStream._(_ret, _lib, retain: false, release: true); + static NSPredicate allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSPredicate, _sel_allocWithZone_, zone); + return NSPredicate.castFromPointer(_ret, retain: false, release: true); } - static NSInputStream alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSInputStream1, _lib._sel_alloc1); - return NSInputStream._(_ret, _lib, retain: false, release: true); + static NSPredicate alloc() { + final _ret = _objc_msgSend_40(_class_NSPredicate, _sel_alloc); + return NSPredicate.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSInputStream1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSPredicate, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSInputStream1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSPredicate, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSInputStream1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSPredicate, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSInputStream1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSPredicate, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSInputStream1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSPredicate, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSInputStream1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSPredicate, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSInputStream1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSInputStream1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSInputStream1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSPredicate, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSPredicate, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSPredicate, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSPredicate = objc.getClass("NSPredicate"); +late final _sel_predicateWithFormat_argumentArray_ = + objc.registerName("predicateWithFormat:argumentArray:"); +final _objc_msgSend_403 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_predicateWithFormat_ = + objc.registerName("predicateWithFormat:"); +final _objc_msgSend_404 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_predicateWithFormat_arguments_ = + objc.registerName("predicateWithFormat:arguments:"); +final _objc_msgSend_405 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>(); +late final _sel_predicateFromMetadataQueryString_ = + objc.registerName("predicateFromMetadataQueryString:"); +final _objc_msgSend_406 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_predicateWithValue_ = objc.registerName("predicateWithValue:"); +final _objc_msgSend_407 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, bool)>(); +bool _ObjCBlock_bool_objcObjCObject_NSDictionary_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistry = , ffi.Pointer)>{}; +int _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_bool_objcObjCObject_NSDictionary_registerClosure( + bool Function( + ffi.Pointer, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistryIndex; + _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -class NSStream extends NSObject { - NSStream._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +bool _ObjCBlock_bool_objcObjCObject_NSDictionary_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistry[ + block.ref.target.address]!(arg0, arg1); - /// 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); - } +class ObjCBlock_bool_objcObjCObject_NSDictionary extends objc.ObjCBlockBase { + ObjCBlock_bool_objcObjCObject_NSDictionary._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); - /// Returns a [NSStream] that wraps the given raw object pointer. - static NSStream castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSStream._(other, lib, retain: retain, release: release); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_bool_objcObjCObject_NSDictionary castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_bool_objcObjCObject_NSDictionary._(pointer, + retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSStream]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSStream1); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_NSDictionary.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_NSDictionary_fnPtrTrampoline, + false) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - void open() { - _lib._objc_msgSend_1(_id, _lib._sel_open1); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_NSDictionary.fromFunction( + bool Function(objc.NSObject?, objc.NSDictionary?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_NSDictionary_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_objcObjCObject_NSDictionary_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : objc.NSObject.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : objc.NSDictionary.castFromPointer(arg1, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; - void close() { - _lib._objc_msgSend_1(_id, _lib._sel_close1); - } + bool call(objc.NSObject? arg0, objc.NSDictionary? arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr, arg1?.pointer ?? ffi.nullptr); +} + +late final _sel_predicateWithBlock_ = objc.registerName("predicateWithBlock:"); +final _objc_msgSend_408 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_predicateFormat = objc.registerName("predicateFormat"); +late final _sel_predicateWithSubstitutionVariables_ = + objc.registerName("predicateWithSubstitutionVariables:"); +final _objc_msgSend_409 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_evaluateWithObject_ = objc.registerName("evaluateWithObject:"); +final _objc_msgSend_410 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_evaluateWithObject_substitutionVariables_ = + objc.registerName("evaluateWithObject:substitutionVariables:"); +final _objc_msgSend_411 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_allowEvaluation = objc.registerName("allowEvaluation"); +late final _sel_filteredOrderedSetUsingPredicate_ = + objc.registerName("filteredOrderedSetUsingPredicate:"); +final _objc_msgSend_412 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - NSObject? get delegate { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } +class NSMutableOrderedSet extends NSOrderedSet { + NSMutableOrderedSet._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - set delegate(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); - } + /// Constructs a [NSMutableOrderedSet] that points to the same underlying object as [other]. + NSMutableOrderedSet.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSObject? propertyForKey_(NSString key) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_propertyForKey_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSMutableOrderedSet] that wraps the given raw object pointer. + NSMutableOrderedSet.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - bool setProperty_forKey_(NSObject? property, NSString key) { - return _lib._objc_msgSend_862(_id, _lib._sel_setProperty_forKey_1, - property?._id ?? ffi.nullptr, key._id); + /// Returns whether [obj] is an instance of [NSMutableOrderedSet]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMutableOrderedSet); } - void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _lib._objc_msgSend_569( - _id, _lib._sel_scheduleInRunLoop_forMode_1, aRunLoop._id, mode._id); + void insertObject_atIndex_(objc.NSObject object, int idx) { + _objc_msgSend_413( + this.pointer, _sel_insertObject_atIndex_, object.pointer, idx); } - void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _lib._objc_msgSend_569( - _id, _lib._sel_removeFromRunLoop_forMode_1, aRunLoop._id, mode._id); + void removeObjectAtIndex_(int idx) { + _objc_msgSend_414(this.pointer, _sel_removeObjectAtIndex_, idx); } - int get streamStatus { - return _lib._objc_msgSend_863(_id, _lib._sel_streamStatus1); + void replaceObjectAtIndex_withObject_(int idx, objc.NSObject object) { + _objc_msgSend_415(this.pointer, _sel_replaceObjectAtIndex_withObject_, idx, + object.pointer); } - NSError? get streamError { - final _ret = _lib._objc_msgSend_322(_id, _lib._sel_streamError1); + @override + NSMutableOrderedSet? initWithCoder_(objc.NSCoder coder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, coder.pointer); return _ret.address == 0 ? null - : NSError._(_ret, _lib, retain: true, release: true); - } - - static void getStreamsToHostWithName_port_inputStream_outputStream_( - AVFAudio _lib, - NSString hostname, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_867( - _lib._class_NSStream1, - _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, - hostname._id, - port, - inputStream, - outputStream); - } - - static void getStreamsToHost_port_inputStream_outputStream_( - AVFAudio _lib, - NSHost host, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_871( - _lib._class_NSStream1, - _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, - host._id, - port, - inputStream, - outputStream); - } - - static void getBoundStreamsWithBufferSize_inputStream_outputStream_( - AVFAudio _lib, - int bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_872( - _lib._class_NSStream1, - _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, - bufferSize, - inputStream, - outputStream); + : NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } @override - NSStream init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSStream._(_ret, _lib, retain: true, release: true); + NSMutableOrderedSet init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static NSStream new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSStream1, _lib._sel_new1); - return NSStream._(_ret, _lib, retain: false, release: true); + NSMutableOrderedSet initWithCapacity_(int numItems) { + final _ret = + _objc_msgSend_355(this.pointer, _sel_initWithCapacity_, numItems); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static NSStream allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSStream1, _lib._sel_allocWithZone_1, zone); - return NSStream._(_ret, _lib, retain: false, release: true); + void addObject_(objc.NSObject object) { + _objc_msgSend_49(this.pointer, _sel_addObject_, object.pointer); } - static NSStream alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSStream1, _lib._sel_alloc1); - return NSStream._(_ret, _lib, retain: false, release: true); + void addObjects_count_( + ffi.Pointer> objects, int count) { + _objc_msgSend_416(this.pointer, _sel_addObjects_count_, objects, count); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSStream1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + void addObjectsFromArray_(objc.NSArray array) { + _objc_msgSend_242(this.pointer, _sel_addObjectsFromArray_, array.pointer); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSStream1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { + _objc_msgSend_417(this.pointer, + _sel_exchangeObjectAtIndex_withObjectAtIndex_, idx1, idx2); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSStream1, _lib._sel_accessInstanceVariablesDirectly1); + void moveObjectsAtIndexes_toIndex_(objc.NSIndexSet indexes, int idx) { + _objc_msgSend_418( + this.pointer, _sel_moveObjectsAtIndexes_toIndex_, indexes.pointer, idx); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSStream1, _lib._sel_useStoredAccessor1); + void insertObjects_atIndexes_(objc.NSArray objects, objc.NSIndexSet indexes) { + _objc_msgSend_419(this.pointer, _sel_insertObjects_atIndexes_, + objects.pointer, indexes.pointer); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSStream1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + void setObject_atIndex_(objc.NSObject obj, int idx) { + _objc_msgSend_413(this.pointer, _sel_setObject_atIndex_, obj.pointer, idx); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSStream1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + void setObject_atIndexedSubscript_(objc.NSObject obj, int idx) { + _objc_msgSend_413( + this.pointer, _sel_setObject_atIndexedSubscript_, obj.pointer, idx); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSStream1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + void replaceObjectsInRange_withObjects_count_(_NSRange range, + ffi.Pointer> objects, int count) { + _objc_msgSend_420(this.pointer, + _sel_replaceObjectsInRange_withObjects_count_, range, objects, count); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSStream1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + void replaceObjectsAtIndexes_withObjects_( + objc.NSIndexSet indexes, objc.NSArray objects) { + _objc_msgSend_421(this.pointer, _sel_replaceObjectsAtIndexes_withObjects_, + indexes.pointer, objects.pointer); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSStream1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + void removeObjectsInRange_(_NSRange range) { + _objc_msgSend_81(this.pointer, _sel_removeObjectsInRange_, range); } -} - -abstract class NSStreamStatus { - static const int NSStreamStatusNotOpen = 0; - static const int NSStreamStatusOpening = 1; - static const int NSStreamStatusOpen = 2; - static const int NSStreamStatusReading = 3; - static const int NSStreamStatusWriting = 4; - static const int NSStreamStatusAtEnd = 5; - static const int NSStreamStatusClosed = 6; - static const int NSStreamStatusError = 7; -} -class NSOutputStream extends NSStream { - NSOutputStream._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + void removeObjectsAtIndexes_(objc.NSIndexSet indexes) { + _objc_msgSend_422( + this.pointer, _sel_removeObjectsAtIndexes_, indexes.pointer); + } - /// 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); + void removeAllObjects() { + _objc_msgSend_82(this.pointer, _sel_removeAllObjects); } - /// Returns a [NSOutputStream] that wraps the given raw object pointer. - static NSOutputStream castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOutputStream._(other, lib, retain: retain, release: release); + void removeObject_(objc.NSObject object) { + _objc_msgSend_49(this.pointer, _sel_removeObject_, object.pointer); } - /// Returns whether [obj] is an instance of [NSOutputStream]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSOutputStream1); + void removeObjectsInArray_(objc.NSArray array) { + _objc_msgSend_242(this.pointer, _sel_removeObjectsInArray_, array.pointer); } - int write_maxLength_(ffi.Pointer buffer, int len) { - return _lib._objc_msgSend_864( - _id, _lib._sel_write_maxLength_1, buffer, len); + void intersectOrderedSet_(NSOrderedSet other) { + _objc_msgSend_423(this.pointer, _sel_intersectOrderedSet_, other.pointer); } - bool get hasSpaceAvailable { - return _lib._objc_msgSend_12(_id, _lib._sel_hasSpaceAvailable1); + void minusOrderedSet_(NSOrderedSet other) { + _objc_msgSend_423(this.pointer, _sel_minusOrderedSet_, other.pointer); } - NSOutputStream initToMemory() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_initToMemory1); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + void unionOrderedSet_(NSOrderedSet other) { + _objc_msgSend_423(this.pointer, _sel_unionOrderedSet_, other.pointer); } - NSOutputStream initToBuffer_capacity_( - ffi.Pointer buffer, int capacity) { - final _ret = _lib._objc_msgSend_865( - _id, _lib._sel_initToBuffer_capacity_1, buffer, capacity); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + void intersectSet_(objc.NSSet other) { + _objc_msgSend_424(this.pointer, _sel_intersectSet_, other.pointer); } - NSOutputStream? initWithURL_append_(NSURL url, bool shouldAppend) { - final _ret = _lib._objc_msgSend_866( - _id, _lib._sel_initWithURL_append_1, url._id, shouldAppend); - return _ret.address == 0 - ? null - : NSOutputStream._(_ret, _lib, retain: true, release: true); + void minusSet_(objc.NSSet other) { + _objc_msgSend_424(this.pointer, _sel_minusSet_, other.pointer); } - NSOutputStream? initToFileAtPath_append_(NSString path, bool shouldAppend) { - final _ret = _lib._objc_msgSend_40( - _id, _lib._sel_initToFileAtPath_append_1, path._id, shouldAppend); - return _ret.address == 0 - ? null - : NSOutputStream._(_ret, _lib, retain: true, release: true); + void unionSet_(objc.NSSet other) { + _objc_msgSend_424(this.pointer, _sel_unionSet_, other.pointer); } - static NSOutputStream outputStreamToMemory(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOutputStream1, _lib._sel_outputStreamToMemory1); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + void sortUsingComparator_( + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + _objc_msgSend_425(this.pointer, _sel_sortUsingComparator_, cmptr.pointer); } - static NSOutputStream outputStreamToBuffer_capacity_( - AVFAudio _lib, ffi.Pointer buffer, int capacity) { - final _ret = _lib._objc_msgSend_865(_lib._class_NSOutputStream1, - _lib._sel_outputStreamToBuffer_capacity_1, buffer, capacity); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + void sortWithOptions_usingComparator_(int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + _objc_msgSend_426(this.pointer, _sel_sortWithOptions_usingComparator_, opts, + cmptr.pointer); } - static NSOutputStream outputStreamToFileAtPath_append_( - AVFAudio _lib, NSString path, bool shouldAppend) { - final _ret = _lib._objc_msgSend_30(_lib._class_NSOutputStream1, - _lib._sel_outputStreamToFileAtPath_append_1, path._id, shouldAppend); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + void sortRange_options_usingComparator_(_NSRange range, int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + _objc_msgSend_427(this.pointer, _sel_sortRange_options_usingComparator_, + range, opts, cmptr.pointer); } - static NSOutputStream? outputStreamWithURL_append_( - AVFAudio _lib, NSURL url, bool shouldAppend) { - final _ret = _lib._objc_msgSend_866(_lib._class_NSOutputStream1, - _lib._sel_outputStreamWithURL_append_1, url._id, shouldAppend); - return _ret.address == 0 - ? null - : NSOutputStream._(_ret, _lib, retain: true, release: true); + static NSMutableOrderedSet orderedSetWithCapacity_(int numItems) { + final _ret = _objc_msgSend_355( + _class_NSMutableOrderedSet, _sel_orderedSetWithCapacity_, numItems); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static void getStreamsToHostWithName_port_inputStream_outputStream_( - AVFAudio _lib, - NSString hostname, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_867( - _lib._class_NSOutputStream1, - _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, - hostname._id, - port, - inputStream, - outputStream); + void applyDifference_(objc.NSObject difference) { + _objc_msgSend_49(this.pointer, _sel_applyDifference_, difference.pointer); } - static void getStreamsToHost_port_inputStream_outputStream_( - AVFAudio _lib, - NSHost host, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_871( - _lib._class_NSOutputStream1, - _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, - host._id, - port, - inputStream, - outputStream); + void sortUsingDescriptors_(objc.NSArray sortDescriptors) { + _objc_msgSend_242( + this.pointer, _sel_sortUsingDescriptors_, sortDescriptors.pointer); } - static void getBoundStreamsWithBufferSize_inputStream_outputStream_( - AVFAudio _lib, - int bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_872( - _lib._class_NSOutputStream1, - _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, - bufferSize, - inputStream, - outputStream); + void filterUsingPredicate_(NSPredicate p) { + _objc_msgSend_428(this.pointer, _sel_filterUsingPredicate_, p.pointer); } @override - NSOutputStream init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + NSMutableOrderedSet initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_365( + this.pointer, _sel_initWithObjects_count_, objects, cnt); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static NSOutputStream new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOutputStream1, _lib._sel_new1); - return NSOutputStream._(_ret, _lib, retain: false, release: true); + static NSMutableOrderedSet orderedSet() { + final _ret = _objc_msgSend_40(_class_NSMutableOrderedSet, _sel_orderedSet); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static NSOutputStream allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSOutputStream1, _lib._sel_allocWithZone_1, zone); - return NSOutputStream._(_ret, _lib, retain: false, release: true); + static NSMutableOrderedSet orderedSetWithObject_(objc.NSObject object) { + final _ret = _objc_msgSend_387( + _class_NSMutableOrderedSet, _sel_orderedSetWithObject_, object.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static NSOutputStream alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOutputStream1, _lib._sel_alloc1); - return NSOutputStream._(_ret, _lib, retain: false, release: true); + static NSMutableOrderedSet orderedSetWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_365(_class_NSMutableOrderedSet, + _sel_orderedSetWithObjects_count_, objects, cnt); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSOutputStream1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static NSMutableOrderedSet orderedSetWithObjects_(objc.NSObject firstObj) { + final _ret = _objc_msgSend_387(_class_NSMutableOrderedSet, + _sel_orderedSetWithObjects_, firstObj.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSOutputStream1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static NSMutableOrderedSet orderedSetWithOrderedSet_(NSOrderedSet set) { + final _ret = _objc_msgSend_388(_class_NSMutableOrderedSet, + _sel_orderedSetWithOrderedSet_, set.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSOutputStream1, - _lib._sel_accessInstanceVariablesDirectly1); + static NSMutableOrderedSet orderedSetWithOrderedSet_range_copyItems_( + NSOrderedSet set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_389( + _class_NSMutableOrderedSet, + _sel_orderedSetWithOrderedSet_range_copyItems_, + set.pointer, + range, + flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSOutputStream1, _lib._sel_useStoredAccessor1); + static NSMutableOrderedSet orderedSetWithArray_(objc.NSArray array) { + final _ret = _objc_msgSend_390( + _class_NSMutableOrderedSet, _sel_orderedSetWithArray_, array.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSOutputStream1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static NSMutableOrderedSet orderedSetWithArray_range_copyItems_( + objc.NSArray array, _NSRange range, bool flag) { + final _ret = _objc_msgSend_391(_class_NSMutableOrderedSet, + _sel_orderedSetWithArray_range_copyItems_, array.pointer, range, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSOutputStream1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static NSMutableOrderedSet orderedSetWithSet_(objc.NSSet set) { + final _ret = _objc_msgSend_392( + _class_NSMutableOrderedSet, _sel_orderedSetWithSet_, set.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSOutputStream1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static NSMutableOrderedSet orderedSetWithSet_copyItems_( + objc.NSSet set, bool flag) { + final _ret = _objc_msgSend_393(_class_NSMutableOrderedSet, + _sel_orderedSetWithSet_copyItems_, set.pointer, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSOutputStream1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + @override + NSMutableOrderedSet initWithObject_(objc.NSObject object) { + final _ret = + _objc_msgSend_387(this.pointer, _sel_initWithObject_, object.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOutputStream1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + @override + NSMutableOrderedSet initWithObjects_(objc.NSObject firstObj) { + final _ret = _objc_msgSend_387( + this.pointer, _sel_initWithObjects_, firstObj.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } -} - -class NSHost extends NSObject { - NSHost._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSHost] that points to the same underlying object as [other]. - static NSHost castFrom(T other) { - return NSHost._(other._id, other._lib, retain: true, release: true); + @override + NSMutableOrderedSet initWithOrderedSet_(NSOrderedSet set) { + final _ret = + _objc_msgSend_388(this.pointer, _sel_initWithOrderedSet_, set.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - /// Returns a [NSHost] that wraps the given raw object pointer. - static NSHost castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHost._(other, lib, retain: retain, release: release); + @override + NSMutableOrderedSet initWithOrderedSet_copyItems_( + NSOrderedSet set, bool flag) { + final _ret = _objc_msgSend_394( + this.pointer, _sel_initWithOrderedSet_copyItems_, set.pointer, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - /// Returns whether [obj] is an instance of [NSHost]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSHost1); + @override + NSMutableOrderedSet initWithOrderedSet_range_copyItems_( + NSOrderedSet set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_389(this.pointer, + _sel_initWithOrderedSet_range_copyItems_, set.pointer, range, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - static NSHost currentHost(AVFAudio _lib) { + @override + NSMutableOrderedSet initWithArray_(objc.NSArray array) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSHost1, _lib._sel_currentHost1); - return NSHost._(_ret, _lib, retain: true, release: true); + _objc_msgSend_390(this.pointer, _sel_initWithArray_, array.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static NSHost hostWithName_(AVFAudio _lib, NSString? name) { - final _ret = _lib._objc_msgSend_868(_lib._class_NSHost1, - _lib._sel_hostWithName_1, name?._id ?? ffi.nullptr); - return NSHost._(_ret, _lib, retain: true, release: true); + @override + NSMutableOrderedSet initWithArray_copyItems_(objc.NSArray set, bool flag) { + final _ret = _objc_msgSend_395( + this.pointer, _sel_initWithArray_copyItems_, set.pointer, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - static NSHost hostWithAddress_(AVFAudio _lib, NSString address) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSHost1, _lib._sel_hostWithAddress_1, address._id); - return NSHost._(_ret, _lib, retain: true, release: true); + @override + NSMutableOrderedSet initWithArray_range_copyItems_( + objc.NSArray set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_391(this.pointer, + _sel_initWithArray_range_copyItems_, set.pointer, range, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - bool isEqualToHost_(NSHost aHost) { - return _lib._objc_msgSend_869(_id, _lib._sel_isEqualToHost_1, aHost._id); + @override + NSMutableOrderedSet initWithSet_(objc.NSSet set) { + final _ret = + _objc_msgSend_392(this.pointer, _sel_initWithSet_, set.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - NSString? get name { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_name1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + @override + NSMutableOrderedSet initWithSet_copyItems_(objc.NSSet set, bool flag) { + final _ret = _objc_msgSend_393( + this.pointer, _sel_initWithSet_copyItems_, set.pointer, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - NSArray get names { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_names1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSMutableOrderedSet new1() { + final _ret = _objc_msgSend_40(_class_NSMutableOrderedSet, _sel_new); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - NSString? get address { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_address1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static NSMutableOrderedSet allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSMutableOrderedSet, _sel_allocWithZone_, zone); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - NSArray get addresses { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_addresses1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSMutableOrderedSet alloc() { + final _ret = _objc_msgSend_40(_class_NSMutableOrderedSet, _sel_alloc); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - NSString? get localizedName { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_localizedName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSMutableOrderedSet, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - static void setHostCacheEnabled_(AVFAudio _lib, bool flag) { - _lib._objc_msgSend_870( - _lib._class_NSHost1, _lib._sel_setHostCacheEnabled_1, flag); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSMutableOrderedSet, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool isHostCacheEnabled(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSHost1, _lib._sel_isHostCacheEnabled1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSMutableOrderedSet, _sel_accessInstanceVariablesDirectly); } - static void flushHostCache(AVFAudio _lib) { - _lib._objc_msgSend_1(_lib._class_NSHost1, _lib._sel_flushHostCache1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSMutableOrderedSet, _sel_useStoredAccessor); } - @override - NSHost init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSHost._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSMutableOrderedSet, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static NSHost new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSHost1, _lib._sel_new1); - return NSHost._(_ret, _lib, retain: false, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSMutableOrderedSet, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static NSHost allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSHost1, _lib._sel_allocWithZone_1, zone); - return NSHost._(_ret, _lib, retain: false, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSMutableOrderedSet, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSMutableOrderedSet, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSMutableOrderedSet, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSMutableOrderedSet = objc.getClass("NSMutableOrderedSet"); +late final _sel_insertObject_atIndex_ = + objc.registerName("insertObject:atIndex:"); +final _objc_msgSend_413 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_removeObjectAtIndex_ = + objc.registerName("removeObjectAtIndex:"); +final _objc_msgSend_414 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_replaceObjectAtIndex_withObject_ = + objc.registerName("replaceObjectAtIndex:withObject:"); +final _objc_msgSend_415 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_initWithCapacity_ = objc.registerName("initWithCapacity:"); +late final _sel_addObject_ = objc.registerName("addObject:"); +late final _sel_addObjects_count_ = objc.registerName("addObjects:count:"); +final _objc_msgSend_416 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>(); +late final _sel_addObjectsFromArray_ = + objc.registerName("addObjectsFromArray:"); +late final _sel_exchangeObjectAtIndex_withObjectAtIndex_ = + objc.registerName("exchangeObjectAtIndex:withObjectAtIndex:"); +final _objc_msgSend_417 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int, int)>(); +late final _sel_moveObjectsAtIndexes_toIndex_ = + objc.registerName("moveObjectsAtIndexes:toIndex:"); +final _objc_msgSend_418 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_insertObjects_atIndexes_ = + objc.registerName("insertObjects:atIndexes:"); +final _objc_msgSend_419 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_setObject_atIndex_ = objc.registerName("setObject:atIndex:"); +late final _sel_setObject_atIndexedSubscript_ = + objc.registerName("setObject:atIndexedSubscript:"); +late final _sel_replaceObjectsInRange_withObjects_count_ = + objc.registerName("replaceObjectsInRange:withObjects:count:"); +final _objc_msgSend_420 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer>, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer>, + int)>(); +late final _sel_replaceObjectsAtIndexes_withObjects_ = + objc.registerName("replaceObjectsAtIndexes:withObjects:"); +final _objc_msgSend_421 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeObjectsInRange_ = + objc.registerName("removeObjectsInRange:"); +late final _sel_removeObjectsAtIndexes_ = + objc.registerName("removeObjectsAtIndexes:"); +final _objc_msgSend_422 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_removeAllObjects = objc.registerName("removeAllObjects"); +late final _sel_removeObject_ = objc.registerName("removeObject:"); +late final _sel_removeObjectsInArray_ = + objc.registerName("removeObjectsInArray:"); +late final _sel_intersectOrderedSet_ = + objc.registerName("intersectOrderedSet:"); +final _objc_msgSend_423 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_minusOrderedSet_ = objc.registerName("minusOrderedSet:"); +late final _sel_unionOrderedSet_ = objc.registerName("unionOrderedSet:"); +late final _sel_intersectSet_ = objc.registerName("intersectSet:"); +final _objc_msgSend_424 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_minusSet_ = objc.registerName("minusSet:"); +late final _sel_unionSet_ = objc.registerName("unionSet:"); +late final _sel_sortUsingComparator_ = + objc.registerName("sortUsingComparator:"); +final _objc_msgSend_425 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_sortWithOptions_usingComparator_ = + objc.registerName("sortWithOptions:usingComparator:"); +final _objc_msgSend_426 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_sortRange_options_usingComparator_ = + objc.registerName("sortRange:options:usingComparator:"); +final _objc_msgSend_427 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); +late final _sel_orderedSetWithCapacity_ = + objc.registerName("orderedSetWithCapacity:"); +late final _sel_applyDifference_ = objc.registerName("applyDifference:"); +late final _sel_sortUsingDescriptors_ = + objc.registerName("sortUsingDescriptors:"); +late final _sel_filterUsingPredicate_ = + objc.registerName("filterUsingPredicate:"); +final _objc_msgSend_428 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class NSMorphology extends objc.NSObject { + NSMorphology._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSMorphology] that points to the same underlying object as [other]. + NSMorphology.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSMorphology] that wraps the given raw object pointer. + NSMorphology.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSMorphology]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMorphology); } - static NSHost alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSHost1, _lib._sel_alloc1); - return NSHost._(_ret, _lib, retain: false, release: true); + int get grammaticalGender { + return _objc_msgSend_429(this.pointer, _sel_grammaticalGender); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSHost1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + set grammaticalGender(int value) { + return _objc_msgSend_430(this.pointer, _sel_setGrammaticalGender_, value); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSHost1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + int get partOfSpeech { + return _objc_msgSend_431(this.pointer, _sel_partOfSpeech); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSHost1, _lib._sel_accessInstanceVariablesDirectly1); + set partOfSpeech(int value) { + return _objc_msgSend_432(this.pointer, _sel_setPartOfSpeech_, value); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSHost1, _lib._sel_useStoredAccessor1); + int get number { + return _objc_msgSend_433(this.pointer, _sel_number); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSHost1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + set number(int value) { + return _objc_msgSend_434(this.pointer, _sel_setNumber_, value); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSHost1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + int get grammaticalCase { + return _objc_msgSend_435(this.pointer, _sel_grammaticalCase); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSHost1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + set grammaticalCase(int value) { + return _objc_msgSend_436(this.pointer, _sel_setGrammaticalCase_, value); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSHost1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + int get determination { + return _objc_msgSend_437(this.pointer, _sel_determination); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSHost1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + set determination(int value) { + return _objc_msgSend_438(this.pointer, _sel_setDetermination_, value); } -} -class NSURLResponse extends NSObject { - NSURLResponse._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + int get grammaticalPerson { + return _objc_msgSend_439(this.pointer, _sel_grammaticalPerson); + } - /// 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); + set grammaticalPerson(int value) { + return _objc_msgSend_440(this.pointer, _sel_setGrammaticalPerson_, value); } - /// Returns a [NSURLResponse] that wraps the given raw object pointer. - static NSURLResponse castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLResponse._(other, lib, retain: retain, release: release); + int get pronounType { + return _objc_msgSend_441(this.pointer, _sel_pronounType); } - /// 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); + set pronounType(int value) { + return _objc_msgSend_442(this.pointer, _sel_setPronounType_, value); } - NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( - NSURL URL, NSString? MIMEType, int length, NSString? name) { - final _ret = _lib._objc_msgSend_877( - _id, - _lib._sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1, - URL._id, - MIMEType?._id ?? ffi.nullptr, - length, - name?._id ?? ffi.nullptr); - return NSURLResponse._(_ret, _lib, retain: true, release: true); + int get definiteness { + return _objc_msgSend_443(this.pointer, _sel_definiteness); } - NSURL? get URL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + set definiteness(int value) { + return _objc_msgSend_444(this.pointer, _sel_setDefiniteness_, value); } - NSString? get MIMEType { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_MIMEType1); + NSMorphologyCustomPronoun? customPronounForLanguage_(objc.NSString language) { + final _ret = _objc_msgSend_446( + this.pointer, _sel_customPronounForLanguage_, language.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: true, release: true); } - int get expectedContentLength { - return _lib._objc_msgSend_238(_id, _lib._sel_expectedContentLength1); + bool setCustomPronoun_forLanguage_error_(NSMorphologyCustomPronoun? features, + objc.NSString language, ffi.Pointer> error) { + return _objc_msgSend_447( + this.pointer, + _sel_setCustomPronoun_forLanguage_error_, + features?.pointer ?? ffi.nullptr, + language.pointer, + error); } - NSString? get textEncodingName { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_textEncodingName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + bool get unspecified { + return _objc_msgSend_7(this.pointer, _sel_isUnspecified); } - NSString? get suggestedFilename { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_suggestedFilename1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static NSMorphology getUserMorphology() { + final _ret = _objc_msgSend_448(_class_NSMorphology, _sel_userMorphology); + return NSMorphology.castFromPointer(_ret, retain: true, release: true); } @override - NSURLResponse init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLResponse._(_ret, _lib, retain: true, release: true); + NSMorphology init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSMorphology.castFromPointer(_ret, retain: true, release: true); } - static NSURLResponse new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_new1); - return NSURLResponse._(_ret, _lib, retain: false, release: true); + static NSMorphology new1() { + final _ret = _objc_msgSend_40(_class_NSMorphology, _sel_new); + return NSMorphology.castFromPointer(_ret, retain: false, release: true); } - static NSURLResponse allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLResponse1, _lib._sel_allocWithZone_1, zone); - return NSURLResponse._(_ret, _lib, retain: false, release: true); + static NSMorphology allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSMorphology, _sel_allocWithZone_, zone); + return NSMorphology.castFromPointer(_ret, retain: false, release: true); } - static NSURLResponse alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_alloc1); - return NSURLResponse._(_ret, _lib, retain: false, release: true); + static NSMorphology alloc() { + final _ret = _objc_msgSend_40(_class_NSMorphology, _sel_alloc); + return NSMorphology.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLResponse1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSMorphology, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLResponse1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSMorphology, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLResponse1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSMorphology, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLResponse1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSMorphology, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLResponse1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSMorphology, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLResponse1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSMorphology, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLResponse1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSMorphology, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSURLResponse1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSMorphology, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLResponse1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSMorphology, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -abstract class NSURLSessionTaskState { - static const int NSURLSessionTaskStateRunning = 0; - static const int NSURLSessionTaskStateSuspended = 1; - static const int NSURLSessionTaskStateCanceling = 2; - static const int NSURLSessionTaskStateCompleted = 3; +late final _class_NSMorphology = objc.getClass("NSMorphology"); + +abstract class NSGrammaticalGender { + static const int NSGrammaticalGenderNotSet = 0; + static const int NSGrammaticalGenderFeminine = 1; + static const int NSGrammaticalGenderMasculine = 2; + static const int NSGrammaticalGenderNeuter = 3; } -void _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSArray_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSArray_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSArray_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSArray_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSArray_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +late final _sel_grammaticalGender = objc.registerName("grammaticalGender"); +final _objc_msgSend_429 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setGrammaticalGender_ = + objc.registerName("setGrammaticalGender:"); +final _objc_msgSend_430 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); + +abstract class NSGrammaticalPartOfSpeech { + static const int NSGrammaticalPartOfSpeechNotSet = 0; + static const int NSGrammaticalPartOfSpeechDeterminer = 1; + static const int NSGrammaticalPartOfSpeechPronoun = 2; + static const int NSGrammaticalPartOfSpeechLetter = 3; + static const int NSGrammaticalPartOfSpeechAdverb = 4; + static const int NSGrammaticalPartOfSpeechParticle = 5; + static const int NSGrammaticalPartOfSpeechAdjective = 6; + static const int NSGrammaticalPartOfSpeechAdposition = 7; + static const int NSGrammaticalPartOfSpeechVerb = 8; + static const int NSGrammaticalPartOfSpeechNoun = 9; + static const int NSGrammaticalPartOfSpeechConjunction = 10; + static const int NSGrammaticalPartOfSpeechNumeral = 11; + static const int NSGrammaticalPartOfSpeechInterjection = 12; + static const int NSGrammaticalPartOfSpeechPreposition = 13; + static const int NSGrammaticalPartOfSpeechAbbreviation = 14; +} + +late final _sel_partOfSpeech = objc.registerName("partOfSpeech"); +final _objc_msgSend_431 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setPartOfSpeech_ = objc.registerName("setPartOfSpeech:"); +final _objc_msgSend_432 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); + +abstract class NSGrammaticalNumber { + static const int NSGrammaticalNumberNotSet = 0; + static const int NSGrammaticalNumberSingular = 1; + static const int NSGrammaticalNumberZero = 2; + static const int NSGrammaticalNumberPlural = 3; + static const int NSGrammaticalNumberPluralTwo = 4; + static const int NSGrammaticalNumberPluralFew = 5; + static const int NSGrammaticalNumberPluralMany = 6; +} + +late final _sel_number = objc.registerName("number"); +final _objc_msgSend_433 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setNumber_ = objc.registerName("setNumber:"); +final _objc_msgSend_434 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); + +abstract class NSGrammaticalCase { + static const int NSGrammaticalCaseNotSet = 0; + static const int NSGrammaticalCaseNominative = 1; + static const int NSGrammaticalCaseAccusative = 2; + static const int NSGrammaticalCaseDative = 3; + static const int NSGrammaticalCaseGenitive = 4; + static const int NSGrammaticalCasePrepositional = 5; + static const int NSGrammaticalCaseAblative = 6; + static const int NSGrammaticalCaseAdessive = 7; + static const int NSGrammaticalCaseAllative = 8; + static const int NSGrammaticalCaseElative = 9; + static const int NSGrammaticalCaseIllative = 10; + static const int NSGrammaticalCaseEssive = 11; + static const int NSGrammaticalCaseInessive = 12; + static const int NSGrammaticalCaseLocative = 13; + static const int NSGrammaticalCaseTranslative = 14; } -void _ObjCBlock_ffiVoid_NSArray_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSArray_closureRegistry[block.ref.target.address]!(arg0); +late final _sel_grammaticalCase = objc.registerName("grammaticalCase"); +final _objc_msgSend_435 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setGrammaticalCase_ = objc.registerName("setGrammaticalCase:"); +final _objc_msgSend_436 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); -class ObjCBlock_ffiVoid_NSArray extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSArray._(ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); +abstract class NSGrammaticalDetermination { + static const int NSGrammaticalDeterminationNotSet = 0; + static const int NSGrammaticalDeterminationIndependent = 1; + static const int NSGrammaticalDeterminationDependent = 2; +} - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSArray castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSArray._(pointer, lib, - retain: retain, release: release); - } +late final _sel_determination = objc.registerName("determination"); +final _objc_msgSend_437 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDetermination_ = objc.registerName("setDetermination:"); +final _objc_msgSend_438 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSArray.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi - .NativeFunction arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +abstract class NSGrammaticalPerson { + static const int NSGrammaticalPersonNotSet = 0; + static const int NSGrammaticalPersonFirst = 1; + static const int NSGrammaticalPersonSecond = 2; + static const int NSGrammaticalPersonThird = 3; +} - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSArray.fromFunction( - AVFAudio lib, void Function(NSArray?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSArray_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSArray._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; +late final _sel_grammaticalPerson = objc.registerName("grammaticalPerson"); +final _objc_msgSend_439 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setGrammaticalPerson_ = + objc.registerName("setGrammaticalPerson:"); +final _objc_msgSend_440 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSArray.listener(AVFAudio lib, void Function(NSArray?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSArray_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSArray_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSArray._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; +abstract class NSGrammaticalPronounType { + static const int NSGrammaticalPronounTypeNotSet = 0; + static const int NSGrammaticalPronounTypePersonal = 1; + static const int NSGrammaticalPronounTypeReflexive = 2; + static const int NSGrammaticalPronounTypePossessive = 3; +} - void call(NSArray? arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); +late final _sel_pronounType = objc.registerName("pronounType"); +final _objc_msgSend_441 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setPronounType_ = objc.registerName("setPronounType:"); +final _objc_msgSend_442 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); + +abstract class NSGrammaticalDefiniteness { + static const int NSGrammaticalDefinitenessNotSet = 0; + static const int NSGrammaticalDefinitenessIndefinite = 1; + static const int NSGrammaticalDefinitenessDefinite = 2; } -class NSIndexPath extends NSObject { - NSIndexPath._(ffi.Pointer id, AVFAudio lib, +late final _sel_definiteness = objc.registerName("definiteness"); +final _objc_msgSend_443 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDefiniteness_ = objc.registerName("setDefiniteness:"); +final _objc_msgSend_444 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); + +class NSMorphologyCustomPronoun extends objc.NSObject { + NSMorphologyCustomPronoun._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSIndexPath] that points to the same underlying object as [other]. - static NSIndexPath castFrom(T other) { - return NSIndexPath._(other._id, other._lib, retain: true, release: true); - } + /// Constructs a [NSMorphologyCustomPronoun] that points to the same underlying object as [other]. + NSMorphologyCustomPronoun.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSIndexPath] that wraps the given raw object pointer. - static NSIndexPath castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSIndexPath._(other, lib, retain: retain, release: release); + /// Constructs a [NSMorphologyCustomPronoun] that wraps the given raw object pointer. + NSMorphologyCustomPronoun.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSMorphologyCustomPronoun]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMorphologyCustomPronoun); } - /// Returns whether [obj] is an instance of [NSIndexPath]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSIndexPath1); + static bool isSupportedForLanguage_(objc.NSString language) { + return _objc_msgSend_51(_class_NSMorphologyCustomPronoun, + _sel_isSupportedForLanguage_, language.pointer); } - static NSIndexPath indexPathWithIndex_(AVFAudio _lib, int index) { - final _ret = _lib._objc_msgSend_65( - _lib._class_NSIndexPath1, _lib._sel_indexPathWithIndex_1, index); - return NSIndexPath._(_ret, _lib, retain: true, release: true); + static objc.NSArray requiredKeysForLanguage_(objc.NSString language) { + final _ret = _objc_msgSend_445(_class_NSMorphologyCustomPronoun, + _sel_requiredKeysForLanguage_, language.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSIndexPath indexPathWithIndexes_length_( - AVFAudio _lib, ffi.Pointer indexes, int length) { - final _ret = _lib._objc_msgSend_884(_lib._class_NSIndexPath1, - _lib._sel_indexPathWithIndexes_length_1, indexes, length); - return NSIndexPath._(_ret, _lib, retain: true, release: true); + objc.NSString? get subjectForm { + final _ret = _objc_msgSend_13(this.pointer, _sel_subjectForm); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSIndexPath initWithIndexes_length_( - ffi.Pointer indexes, int length) { - final _ret = _lib._objc_msgSend_884( - _id, _lib._sel_initWithIndexes_length_1, indexes, length); - return NSIndexPath._(_ret, _lib, retain: true, release: true); + set subjectForm(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setSubjectForm_, value?.pointer ?? ffi.nullptr); } - NSIndexPath initWithIndex_(int index) { - final _ret = _lib._objc_msgSend_65(_id, _lib._sel_initWithIndex_1, index); - return NSIndexPath._(_ret, _lib, retain: true, release: true); + objc.NSString? get objectForm { + final _ret = _objc_msgSend_13(this.pointer, _sel_objectForm); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSIndexPath indexPathByAddingIndex_(int index) { - final _ret = - _lib._objc_msgSend_885(_id, _lib._sel_indexPathByAddingIndex_1, index); - return NSIndexPath._(_ret, _lib, retain: true, release: true); + set objectForm(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setObjectForm_, value?.pointer ?? ffi.nullptr); } - NSIndexPath indexPathByRemovingLastIndex() { - final _ret = - _lib._objc_msgSend_886(_id, _lib._sel_indexPathByRemovingLastIndex1); - return NSIndexPath._(_ret, _lib, retain: true, release: true); + objc.NSString? get possessiveForm { + final _ret = _objc_msgSend_13(this.pointer, _sel_possessiveForm); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int indexAtPosition_(int position) { - return _lib._objc_msgSend_94(_id, _lib._sel_indexAtPosition_1, position); + set possessiveForm(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setPossessiveForm_, value?.pointer ?? ffi.nullptr); } - int get length { - return _lib._objc_msgSend_10(_id, _lib._sel_length1); + objc.NSString? get possessiveAdjectiveForm { + final _ret = _objc_msgSend_13(this.pointer, _sel_possessiveAdjectiveForm); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void getIndexes_range_( - ffi.Pointer indexes, _NSRange positionRange) { - _lib._objc_msgSend_887( - _id, _lib._sel_getIndexes_range_1, indexes, positionRange); + set possessiveAdjectiveForm(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setPossessiveAdjectiveForm_, + value?.pointer ?? ffi.nullptr); } - int compare_(NSIndexPath otherObject) { - return _lib._objc_msgSend_888(_id, _lib._sel_compare_1, otherObject._id); + objc.NSString? get reflexiveForm { + final _ret = _objc_msgSend_13(this.pointer, _sel_reflexiveForm); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void getIndexes_(ffi.Pointer indexes) { - _lib._objc_msgSend_889(_id, _lib._sel_getIndexes_1, indexes); + set reflexiveForm(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setReflexiveForm_, value?.pointer ?? ffi.nullptr); } @override - NSIndexPath init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSIndexPath._(_ret, _lib, retain: true, release: true); + NSMorphologyCustomPronoun init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: true, release: true); } - static NSIndexPath new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSIndexPath1, _lib._sel_new1); - return NSIndexPath._(_ret, _lib, retain: false, release: true); + static NSMorphologyCustomPronoun new1() { + final _ret = _objc_msgSend_40(_class_NSMorphologyCustomPronoun, _sel_new); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: false, release: true); } - static NSIndexPath allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSIndexPath1, _lib._sel_allocWithZone_1, zone); - return NSIndexPath._(_ret, _lib, retain: false, release: true); + static NSMorphologyCustomPronoun allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSMorphologyCustomPronoun, _sel_allocWithZone_, zone); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: false, release: true); } - static NSIndexPath alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSIndexPath1, _lib._sel_alloc1); - return NSIndexPath._(_ret, _lib, retain: false, release: true); + static NSMorphologyCustomPronoun alloc() { + final _ret = _objc_msgSend_40(_class_NSMorphologyCustomPronoun, _sel_alloc); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSIndexPath1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSMorphologyCustomPronoun, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSIndexPath1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSMorphologyCustomPronoun, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSIndexPath1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSMorphologyCustomPronoun, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSIndexPath1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSMorphologyCustomPronoun, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSIndexPath1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSMorphologyCustomPronoun, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSIndexPath1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSMorphologyCustomPronoun, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSIndexPath1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSMorphologyCustomPronoun, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSMorphologyCustomPronoun, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSMorphologyCustomPronoun, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSMorphologyCustomPronoun = + objc.getClass("NSMorphologyCustomPronoun"); +late final _sel_isSupportedForLanguage_ = + objc.registerName("isSupportedForLanguage:"); +late final _sel_requiredKeysForLanguage_ = + objc.registerName("requiredKeysForLanguage:"); +final _objc_msgSend_445 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_subjectForm = objc.registerName("subjectForm"); +late final _sel_setSubjectForm_ = objc.registerName("setSubjectForm:"); +late final _sel_objectForm = objc.registerName("objectForm"); +late final _sel_setObjectForm_ = objc.registerName("setObjectForm:"); +late final _sel_possessiveForm = objc.registerName("possessiveForm"); +late final _sel_setPossessiveForm_ = objc.registerName("setPossessiveForm:"); +late final _sel_possessiveAdjectiveForm = + objc.registerName("possessiveAdjectiveForm"); +late final _sel_setPossessiveAdjectiveForm_ = + objc.registerName("setPossessiveAdjectiveForm:"); +late final _sel_reflexiveForm = objc.registerName("reflexiveForm"); +late final _sel_setReflexiveForm_ = objc.registerName("setReflexiveForm:"); +late final _sel_customPronounForLanguage_ = + objc.registerName("customPronounForLanguage:"); +final _objc_msgSend_446 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCustomPronoun_forLanguage_error_ = + objc.registerName("setCustomPronoun:forLanguage:error:"); +final _objc_msgSend_447 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_isUnspecified = objc.registerName("isUnspecified"); +late final _sel_userMorphology = objc.registerName("userMorphology"); +final _objc_msgSend_448 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + +class NSOperationQueue extends objc.NSObject { + NSOperationQueue._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSOperationQueue] that points to the same underlying object as [other]. + NSOperationQueue.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSOperationQueue] that wraps the given raw object pointer. + NSOperationQueue.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSOperationQueue]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSOperationQueue); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSIndexPath1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSProgress get progress { + final _ret = _objc_msgSend_347(this.pointer, _sel_progress); + return objc.NSProgress.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSIndexPath1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + void addOperation_(NSOperation op) { + _objc_msgSend_449(this.pointer, _sel_addOperation_, op.pointer); } -} -class NSInflectionRule extends NSObject { - NSInflectionRule._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + void addOperations_waitUntilFinished_(objc.NSArray ops, bool wait) { + _objc_msgSend_456( + this.pointer, _sel_addOperations_waitUntilFinished_, ops.pointer, wait); + } - /// Returns a [NSInflectionRule] that points to the same underlying object as [other]. - static NSInflectionRule castFrom(T other) { - return NSInflectionRule._(other._id, other._lib, - retain: true, release: true); + void addOperationWithBlock_(ObjCBlock_ffiVoid block) { + _objc_msgSend_249(this.pointer, _sel_addOperationWithBlock_, block.pointer); } - /// Returns a [NSInflectionRule] that wraps the given raw object pointer. - static NSInflectionRule castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInflectionRule._(other, lib, retain: retain, release: release); + void addBarrierBlock_(ObjCBlock_ffiVoid barrier) { + _objc_msgSend_249(this.pointer, _sel_addBarrierBlock_, barrier.pointer); } - /// Returns whether [obj] is an instance of [NSInflectionRule]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSInflectionRule1); + int get maxConcurrentOperationCount { + return _objc_msgSend_114(this.pointer, _sel_maxConcurrentOperationCount); } - @override - NSObject init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSObject._(_ret, _lib, retain: true, release: true); + set maxConcurrentOperationCount(int value) { + return _objc_msgSend_134( + this.pointer, _sel_setMaxConcurrentOperationCount_, value); } - static NSInflectionRule getAutomaticRule(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_890( - _lib._class_NSInflectionRule1, _lib._sel_automaticRule1); - return NSInflectionRule._(_ret, _lib, retain: true, release: true); + bool get suspended { + return _objc_msgSend_7(this.pointer, _sel_isSuspended); } - static bool canInflectLanguage_(AVFAudio _lib, NSString language) { - return _lib._objc_msgSend_64(_lib._class_NSInflectionRule1, - _lib._sel_canInflectLanguage_1, language._id); + set suspended(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setSuspended_, value); } - static bool getCanInflectPreferredLocalization(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSInflectionRule1, - _lib._sel_canInflectPreferredLocalization1); + objc.NSString? get name { + final _ret = _objc_msgSend_13(this.pointer, _sel_name); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSInflectionRule new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSInflectionRule1, _lib._sel_new1); - return NSInflectionRule._(_ret, _lib, retain: false, release: true); + set name(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); + } + + int get qualityOfService { + return _objc_msgSend_454(this.pointer, _sel_qualityOfService); } - static NSInflectionRule allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSInflectionRule1, _lib._sel_allocWithZone_1, zone); - return NSInflectionRule._(_ret, _lib, retain: false, release: true); + set qualityOfService(int value) { + return _objc_msgSend_455(this.pointer, _sel_setQualityOfService_, value); } - static NSInflectionRule alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSInflectionRule1, _lib._sel_alloc1); - return NSInflectionRule._(_ret, _lib, retain: false, release: true); + objc.NSObject? get underlyingQueue { + final _ret = _objc_msgSend_457(this.pointer, _sel_underlyingQueue); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSInflectionRule1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + set underlyingQueue(objc.NSObject? value) { + return _objc_msgSend_458( + this.pointer, _sel_setUnderlyingQueue_, value?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSInflectionRule1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + void cancelAllOperations() { + _objc_msgSend_82(this.pointer, _sel_cancelAllOperations); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSInflectionRule1, - _lib._sel_accessInstanceVariablesDirectly1); + void waitUntilAllOperationsAreFinished() { + _objc_msgSend_82(this.pointer, _sel_waitUntilAllOperationsAreFinished); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSInflectionRule1, _lib._sel_useStoredAccessor1); + static NSOperationQueue? getCurrentQueue() { + final _ret = _objc_msgSend_459(_class_NSOperationQueue, _sel_currentQueue); + return _ret.address == 0 + ? null + : NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSInflectionRule1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static NSOperationQueue getMainQueue() { + final _ret = _objc_msgSend_460(_class_NSOperationQueue, _sel_mainQueue); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSInflectionRule1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + objc.NSArray get operations { + final _ret = _objc_msgSend_6(this.pointer, _sel_operations); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSInflectionRule1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + int get operationCount { + return _objc_msgSend_29(this.pointer, _sel_operationCount); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSInflectionRule1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + @override + NSOperationQueue init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSInflectionRule1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSOperationQueue new1() { + final _ret = _objc_msgSend_40(_class_NSOperationQueue, _sel_new); + return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } -} -class NSMorphology extends NSObject { - NSMorphology._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + static NSOperationQueue allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSOperationQueue, _sel_allocWithZone_, zone); + return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); + } - /// Returns a [NSMorphology] that points to the same underlying object as [other]. - static NSMorphology castFrom(T other) { - return NSMorphology._(other._id, other._lib, retain: true, release: true); + static NSOperationQueue alloc() { + final _ret = _objc_msgSend_40(_class_NSOperationQueue, _sel_alloc); + return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } - /// Returns a [NSMorphology] that wraps the given raw object pointer. - static NSMorphology castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMorphology._(other, lib, retain: retain, release: release); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSOperationQueue, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - /// Returns whether [obj] is an instance of [NSMorphology]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSMorphology1); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSOperationQueue, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - int get grammaticalGender { - return _lib._objc_msgSend_891(_id, _lib._sel_grammaticalGender1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSOperationQueue, _sel_accessInstanceVariablesDirectly); } - set grammaticalGender(int value) { - return _lib._objc_msgSend_892(_id, _lib._sel_setGrammaticalGender_1, value); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSOperationQueue, _sel_useStoredAccessor); } - int get partOfSpeech { - return _lib._objc_msgSend_893(_id, _lib._sel_partOfSpeech1); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSOperationQueue, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - set partOfSpeech(int value) { - return _lib._objc_msgSend_894(_id, _lib._sel_setPartOfSpeech_1, value); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSOperationQueue, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - int get number { - return _lib._objc_msgSend_895(_id, _lib._sel_number1); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSOperationQueue, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - set number(int value) { - return _lib._objc_msgSend_896(_id, _lib._sel_setNumber_1, value); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSOperationQueue, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int get grammaticalCase { - return _lib._objc_msgSend_897(_id, _lib._sel_grammaticalCase1); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSOperationQueue, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - set grammaticalCase(int value) { - return _lib._objc_msgSend_898(_id, _lib._sel_setGrammaticalCase_1, value); +late final _class_NSOperationQueue = objc.getClass("NSOperationQueue"); + +class NSOperation extends objc.NSObject { + NSOperation._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSOperation] that points to the same underlying object as [other]. + NSOperation.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSOperation] that wraps the given raw object pointer. + NSOperation.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSOperation]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSOperation); } - int get determination { - return _lib._objc_msgSend_899(_id, _lib._sel_determination1); + void start() { + _objc_msgSend_82(this.pointer, _sel_start); } - set determination(int value) { - return _lib._objc_msgSend_900(_id, _lib._sel_setDetermination_1, value); + void main() { + _objc_msgSend_82(this.pointer, _sel_main); } - int get grammaticalPerson { - return _lib._objc_msgSend_901(_id, _lib._sel_grammaticalPerson1); + bool get cancelled { + return _objc_msgSend_7(this.pointer, _sel_isCancelled); } - set grammaticalPerson(int value) { - return _lib._objc_msgSend_902(_id, _lib._sel_setGrammaticalPerson_1, value); + void cancel() { + _objc_msgSend_82(this.pointer, _sel_cancel); } - int get pronounType { - return _lib._objc_msgSend_903(_id, _lib._sel_pronounType1); + bool get executing { + return _objc_msgSend_7(this.pointer, _sel_isExecuting); } - set pronounType(int value) { - return _lib._objc_msgSend_904(_id, _lib._sel_setPronounType_1, value); + bool get finished { + return _objc_msgSend_7(this.pointer, _sel_isFinished); } - int get definiteness { - return _lib._objc_msgSend_905(_id, _lib._sel_definiteness1); + bool get concurrent { + return _objc_msgSend_7(this.pointer, _sel_isConcurrent); } - set definiteness(int value) { - return _lib._objc_msgSend_906(_id, _lib._sel_setDefiniteness_1, value); + bool get asynchronous { + return _objc_msgSend_7(this.pointer, _sel_isAsynchronous); } - NSMorphologyCustomPronoun? customPronounForLanguage_(NSString language) { - final _ret = _lib._objc_msgSend_907( - _id, _lib._sel_customPronounForLanguage_1, language._id); - return _ret.address == 0 - ? null - : NSMorphologyCustomPronoun._(_ret, _lib, retain: true, release: true); + bool get ready { + return _objc_msgSend_7(this.pointer, _sel_isReady); } - bool setCustomPronoun_forLanguage_error_(NSMorphologyCustomPronoun? features, - NSString language, ffi.Pointer> error) { - return _lib._objc_msgSend_908( - _id, - _lib._sel_setCustomPronoun_forLanguage_error_1, - features?._id ?? ffi.nullptr, - language._id, - error); + void addDependency_(NSOperation op) { + _objc_msgSend_449(this.pointer, _sel_addDependency_, op.pointer); } - bool get unspecified { - return _lib._objc_msgSend_12(_id, _lib._sel_isUnspecified1); + void removeDependency_(NSOperation op) { + _objc_msgSend_449(this.pointer, _sel_removeDependency_, op.pointer); } - static NSMorphology getUserMorphology(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_909( - _lib._class_NSMorphology1, _lib._sel_userMorphology1); - return NSMorphology._(_ret, _lib, retain: true, release: true); + objc.NSArray get dependencies { + final _ret = _objc_msgSend_6(this.pointer, _sel_dependencies); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - @override - NSMorphology init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMorphology._(_ret, _lib, retain: true, release: true); + int get queuePriority { + return _objc_msgSend_450(this.pointer, _sel_queuePriority); } - static NSMorphology new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMorphology1, _lib._sel_new1); - return NSMorphology._(_ret, _lib, retain: false, release: true); + set queuePriority(int value) { + return _objc_msgSend_451(this.pointer, _sel_setQueuePriority_, value); } - static NSMorphology allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMorphology1, _lib._sel_allocWithZone_1, zone); - return NSMorphology._(_ret, _lib, retain: false, release: true); + ObjCBlock_ffiVoid? get completionBlock { + final _ret = _objc_msgSend_452(this.pointer, _sel_completionBlock); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); } - static NSMorphology alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMorphology1, _lib._sel_alloc1); - return NSMorphology._(_ret, _lib, retain: false, release: true); + set completionBlock(ObjCBlock_ffiVoid? value) { + return _objc_msgSend_453( + this.pointer, _sel_setCompletionBlock_, value?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSMorphology1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + void waitUntilFinished() { + _objc_msgSend_82(this.pointer, _sel_waitUntilFinished); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSMorphology1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + double get threadPriority { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_threadPriority) + : _objc_msgSend_115(this.pointer, _sel_threadPriority); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMorphology1, _lib._sel_accessInstanceVariablesDirectly1); + set threadPriority(double value) { + return _objc_msgSend_212(this.pointer, _sel_setThreadPriority_, value); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMorphology1, _lib._sel_useStoredAccessor1); + int get qualityOfService { + return _objc_msgSend_454(this.pointer, _sel_qualityOfService); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSMorphology1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + set qualityOfService(int value) { + return _objc_msgSend_455(this.pointer, _sel_setQualityOfService_, value); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSMorphology1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + objc.NSString? get name { + final _ret = _objc_msgSend_13(this.pointer, _sel_name); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSMorphology1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + set name(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSMorphology1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + @override + NSOperation init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSOperation.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMorphology1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSOperation new1() { + final _ret = _objc_msgSend_40(_class_NSOperation, _sel_new); + return NSOperation.castFromPointer(_ret, retain: false, release: true); } -} -abstract class NSGrammaticalGender { - static const int NSGrammaticalGenderNotSet = 0; - static const int NSGrammaticalGenderFeminine = 1; - static const int NSGrammaticalGenderMasculine = 2; - static const int NSGrammaticalGenderNeuter = 3; -} + static NSOperation allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSOperation, _sel_allocWithZone_, zone); + return NSOperation.castFromPointer(_ret, retain: false, release: true); + } -abstract class NSGrammaticalPartOfSpeech { - static const int NSGrammaticalPartOfSpeechNotSet = 0; - static const int NSGrammaticalPartOfSpeechDeterminer = 1; - static const int NSGrammaticalPartOfSpeechPronoun = 2; - static const int NSGrammaticalPartOfSpeechLetter = 3; - static const int NSGrammaticalPartOfSpeechAdverb = 4; - static const int NSGrammaticalPartOfSpeechParticle = 5; - static const int NSGrammaticalPartOfSpeechAdjective = 6; - static const int NSGrammaticalPartOfSpeechAdposition = 7; - static const int NSGrammaticalPartOfSpeechVerb = 8; - static const int NSGrammaticalPartOfSpeechNoun = 9; - static const int NSGrammaticalPartOfSpeechConjunction = 10; - static const int NSGrammaticalPartOfSpeechNumeral = 11; - static const int NSGrammaticalPartOfSpeechInterjection = 12; - static const int NSGrammaticalPartOfSpeechPreposition = 13; - static const int NSGrammaticalPartOfSpeechAbbreviation = 14; -} + static NSOperation alloc() { + final _ret = _objc_msgSend_40(_class_NSOperation, _sel_alloc); + return NSOperation.castFromPointer(_ret, retain: false, release: true); + } -abstract class NSGrammaticalNumber { - static const int NSGrammaticalNumberNotSet = 0; - static const int NSGrammaticalNumberSingular = 1; - static const int NSGrammaticalNumberZero = 2; - static const int NSGrammaticalNumberPlural = 3; - static const int NSGrammaticalNumberPluralTwo = 4; - static const int NSGrammaticalNumberPluralFew = 5; - static const int NSGrammaticalNumberPluralMany = 6; -} + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSOperation, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSOperation, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } -abstract class NSGrammaticalCase { - static const int NSGrammaticalCaseNotSet = 0; - static const int NSGrammaticalCaseNominative = 1; - static const int NSGrammaticalCaseAccusative = 2; - static const int NSGrammaticalCaseDative = 3; - static const int NSGrammaticalCaseGenitive = 4; - static const int NSGrammaticalCasePrepositional = 5; - static const int NSGrammaticalCaseAblative = 6; - static const int NSGrammaticalCaseAdessive = 7; - static const int NSGrammaticalCaseAllative = 8; - static const int NSGrammaticalCaseElative = 9; - static const int NSGrammaticalCaseIllative = 10; - static const int NSGrammaticalCaseEssive = 11; - static const int NSGrammaticalCaseInessive = 12; - static const int NSGrammaticalCaseLocative = 13; - static const int NSGrammaticalCaseTranslative = 14; -} + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSOperation, _sel_accessInstanceVariablesDirectly); + } -abstract class NSGrammaticalDetermination { - static const int NSGrammaticalDeterminationNotSet = 0; - static const int NSGrammaticalDeterminationIndependent = 1; - static const int NSGrammaticalDeterminationDependent = 2; -} + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSOperation, _sel_useStoredAccessor); + } -abstract class NSGrammaticalPerson { - static const int NSGrammaticalPersonNotSet = 0; - static const int NSGrammaticalPersonFirst = 1; - static const int NSGrammaticalPersonSecond = 2; - static const int NSGrammaticalPersonThird = 3; -} + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSOperation, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } -abstract class NSGrammaticalPronounType { - static const int NSGrammaticalPronounTypeNotSet = 0; - static const int NSGrammaticalPronounTypePersonal = 1; - static const int NSGrammaticalPronounTypeReflexive = 2; - static const int NSGrammaticalPronounTypePossessive = 3; + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSOperation, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSOperation, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSOperation, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSOperation, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSOperation = objc.getClass("NSOperation"); +late final _sel_start = objc.registerName("start"); +late final _sel_main = objc.registerName("main"); +late final _sel_isCancelled = objc.registerName("isCancelled"); +late final _sel_isExecuting = objc.registerName("isExecuting"); +late final _sel_isFinished = objc.registerName("isFinished"); +late final _sel_isConcurrent = objc.registerName("isConcurrent"); +late final _sel_isAsynchronous = objc.registerName("isAsynchronous"); +late final _sel_isReady = objc.registerName("isReady"); +late final _sel_addDependency_ = objc.registerName("addDependency:"); +final _objc_msgSend_449 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_removeDependency_ = objc.registerName("removeDependency:"); +late final _sel_dependencies = objc.registerName("dependencies"); + +abstract class NSOperationQueuePriority { + static const int NSOperationQueuePriorityVeryLow = -8; + static const int NSOperationQueuePriorityLow = -4; + static const int NSOperationQueuePriorityNormal = 0; + static const int NSOperationQueuePriorityHigh = 4; + static const int NSOperationQueuePriorityVeryHigh = 8; } -abstract class NSGrammaticalDefiniteness { - static const int NSGrammaticalDefinitenessNotSet = 0; - static const int NSGrammaticalDefinitenessIndefinite = 1; - static const int NSGrammaticalDefinitenessDefinite = 2; +late final _sel_queuePriority = objc.registerName("queuePriority"); +final _objc_msgSend_450 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setQueuePriority_ = objc.registerName("setQueuePriority:"); +final _objc_msgSend_451 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_completionBlock = objc.registerName("completionBlock"); +final _objc_msgSend_452 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCompletionBlock_ = objc.registerName("setCompletionBlock:"); +final _objc_msgSend_453 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_waitUntilFinished = objc.registerName("waitUntilFinished"); +late final _sel_threadPriority = objc.registerName("threadPriority"); +late final _sel_setThreadPriority_ = objc.registerName("setThreadPriority:"); + +abstract class NSQualityOfService { + static const int NSQualityOfServiceUserInteractive = 33; + static const int NSQualityOfServiceUserInitiated = 25; + static const int NSQualityOfServiceUtility = 17; + static const int NSQualityOfServiceBackground = 9; + static const int NSQualityOfServiceDefault = -1; } -class NSMorphologyCustomPronoun extends NSObject { - NSMorphologyCustomPronoun._(ffi.Pointer id, AVFAudio lib, +late final _sel_qualityOfService = objc.registerName("qualityOfService"); +final _objc_msgSend_454 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setQualityOfService_ = + objc.registerName("setQualityOfService:"); +final _objc_msgSend_455 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setName_ = objc.registerName("setName:"); +late final _sel_addOperation_ = objc.registerName("addOperation:"); +late final _sel_addOperations_waitUntilFinished_ = + objc.registerName("addOperations:waitUntilFinished:"); +final _objc_msgSend_456 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_addOperationWithBlock_ = + objc.registerName("addOperationWithBlock:"); +late final _sel_addBarrierBlock_ = objc.registerName("addBarrierBlock:"); +late final _sel_maxConcurrentOperationCount = + objc.registerName("maxConcurrentOperationCount"); +late final _sel_setMaxConcurrentOperationCount_ = + objc.registerName("setMaxConcurrentOperationCount:"); +late final _sel_isSuspended = objc.registerName("isSuspended"); +late final _sel_setSuspended_ = objc.registerName("setSuspended:"); +late final _sel_underlyingQueue = objc.registerName("underlyingQueue"); +final _objc_msgSend_457 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setUnderlyingQueue_ = objc.registerName("setUnderlyingQueue:"); +final _objc_msgSend_458 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_cancelAllOperations = objc.registerName("cancelAllOperations"); +late final _sel_waitUntilAllOperationsAreFinished = + objc.registerName("waitUntilAllOperationsAreFinished"); +late final _sel_currentQueue = objc.registerName("currentQueue"); +final _objc_msgSend_459 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_mainQueue = objc.registerName("mainQueue"); +final _objc_msgSend_460 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_operations = objc.registerName("operations"); +late final _sel_operationCount = objc.registerName("operationCount"); + +class NSOrthography extends objc.NSObject { + NSOrthography._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSMorphologyCustomPronoun] that points to the same underlying object as [other]. - static NSMorphologyCustomPronoun castFrom(T other) { - return NSMorphologyCustomPronoun._(other._id, other._lib, - retain: true, release: true); - } + /// Constructs a [NSOrthography] that points to the same underlying object as [other]. + NSOrthography.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSMorphologyCustomPronoun] that wraps the given raw object pointer. - static NSMorphologyCustomPronoun castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMorphologyCustomPronoun._(other, lib, - retain: retain, release: release); + /// Constructs a [NSOrthography] that wraps the given raw object pointer. + NSOrthography.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSOrthography]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSOrthography); } - /// Returns whether [obj] is an instance of [NSMorphologyCustomPronoun]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMorphologyCustomPronoun1); + objc.NSString get dominantScript { + final _ret = _objc_msgSend_12(this.pointer, _sel_dominantScript); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool isSupportedForLanguage_(AVFAudio _lib, NSString language) { - return _lib._objc_msgSend_64(_lib._class_NSMorphologyCustomPronoun1, - _lib._sel_isSupportedForLanguage_1, language._id); + objc.NSDictionary get languageMap { + final _ret = _objc_msgSend_112(this.pointer, _sel_languageMap); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSArray requiredKeysForLanguage_(AVFAudio _lib, NSString language) { - final _ret = _lib._objc_msgSend_358(_lib._class_NSMorphologyCustomPronoun1, - _lib._sel_requiredKeysForLanguage_1, language._id); - return NSArray._(_ret, _lib, retain: true, release: true); + NSOrthography initWithDominantScript_languageMap_( + objc.NSString script, objc.NSDictionary map) { + final _ret = _objc_msgSend_461(this.pointer, + _sel_initWithDominantScript_languageMap_, script.pointer, map.pointer); + return NSOrthography.castFromPointer(_ret, retain: true, release: true); } - NSString? get subjectForm { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_subjectForm1); + NSOrthography? initWithCoder_(objc.NSCoder coder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, coder.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSOrthography.castFromPointer(_ret, retain: true, release: true); } - set subjectForm(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setSubjectForm_1, value?._id ?? ffi.nullptr); - } - - NSString? get objectForm { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_objectForm1); + objc.NSArray? languagesForScript_(objc.NSString script) { + final _ret = _objc_msgSend_290( + this.pointer, _sel_languagesForScript_, script.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - set objectForm(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setObjectForm_1, value?._id ?? ffi.nullptr); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString? get possessiveForm { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_possessiveForm1); + objc.NSString? dominantLanguageForScript_(objc.NSString script) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_dominantLanguageForScript_, script.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set possessiveForm(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setPossessiveForm_1, value?._id ?? ffi.nullptr); + objc.NSString get dominantLanguage { + final _ret = _objc_msgSend_12(this.pointer, _sel_dominantLanguage); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get possessiveAdjectiveForm { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_possessiveAdjectiveForm1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + objc.NSArray get allScripts { + final _ret = _objc_msgSend_6(this.pointer, _sel_allScripts); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set possessiveAdjectiveForm(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setPossessiveAdjectiveForm_1, value?._id ?? ffi.nullptr); + objc.NSArray get allLanguages { + final _ret = _objc_msgSend_6(this.pointer, _sel_allLanguages); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString? get reflexiveForm { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_reflexiveForm1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static NSOrthography defaultOrthographyForLanguage_(objc.NSString language) { + final _ret = _objc_msgSend_35(_class_NSOrthography, + _sel_defaultOrthographyForLanguage_, language.pointer); + return NSOrthography.castFromPointer(_ret, retain: true, release: true); } - set reflexiveForm(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setReflexiveForm_1, value?._id ?? ffi.nullptr); + static NSOrthography orthographyWithDominantScript_languageMap_( + objc.NSString script, objc.NSDictionary map) { + final _ret = _objc_msgSend_461( + _class_NSOrthography, + _sel_orthographyWithDominantScript_languageMap_, + script.pointer, + map.pointer); + return NSOrthography.castFromPointer(_ret, retain: true, release: true); } @override - NSMorphologyCustomPronoun init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMorphologyCustomPronoun._(_ret, _lib, retain: true, release: true); + NSOrthography init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSOrthography.castFromPointer(_ret, retain: true, release: true); } - static NSMorphologyCustomPronoun new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMorphologyCustomPronoun1, _lib._sel_new1); - return NSMorphologyCustomPronoun._(_ret, _lib, - retain: false, release: true); + static NSOrthography new1() { + final _ret = _objc_msgSend_40(_class_NSOrthography, _sel_new); + return NSOrthography.castFromPointer(_ret, retain: false, release: true); } - static NSMorphologyCustomPronoun allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3(_lib._class_NSMorphologyCustomPronoun1, - _lib._sel_allocWithZone_1, zone); - return NSMorphologyCustomPronoun._(_ret, _lib, - retain: false, release: true); + static NSOrthography allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSOrthography, _sel_allocWithZone_, zone); + return NSOrthography.castFromPointer(_ret, retain: false, release: true); } - static NSMorphologyCustomPronoun alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMorphologyCustomPronoun1, _lib._sel_alloc1); - return NSMorphologyCustomPronoun._(_ret, _lib, - retain: false, release: true); + static NSOrthography alloc() { + final _ret = _objc_msgSend_40(_class_NSOrthography, _sel_alloc); + return NSOrthography.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSMorphologyCustomPronoun1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSOrthography, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSMorphologyCustomPronoun1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSOrthography, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSMorphologyCustomPronoun1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSOrthography, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMorphologyCustomPronoun1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSOrthography, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSMorphologyCustomPronoun1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSOrthography, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSMorphologyCustomPronoun1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSOrthography, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSMorphologyCustomPronoun1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSMorphologyCustomPronoun1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSOrthography, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSOrthography, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSOrthography, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSOrthography = objc.getClass("NSOrthography"); +late final _sel_dominantScript = objc.registerName("dominantScript"); +late final _sel_languageMap = objc.registerName("languageMap"); +late final _sel_initWithDominantScript_languageMap_ = + objc.registerName("initWithDominantScript:languageMap:"); +final _objc_msgSend_461 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_languagesForScript_ = objc.registerName("languagesForScript:"); +late final _sel_dominantLanguageForScript_ = + objc.registerName("dominantLanguageForScript:"); +late final _sel_dominantLanguage = objc.registerName("dominantLanguage"); +late final _sel_allScripts = objc.registerName("allScripts"); +late final _sel_allLanguages = objc.registerName("allLanguages"); +late final _sel_defaultOrthographyForLanguage_ = + objc.registerName("defaultOrthographyForLanguage:"); +late final _sel_orthographyWithDominantScript_languageMap_ = + objc.registerName("orthographyWithDominantScript:languageMap:"); + +class NSPointerArray extends objc.NSObject { + NSPointerArray._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSMorphologyCustomPronoun1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} + /// Constructs a [NSPointerArray] that points to the same underlying object as [other]. + NSPointerArray.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); -class NSOperationQueue extends NSObject { - NSOperationQueue._(ffi.Pointer id, AVFAudio lib, + /// Constructs a [NSPointerArray] that wraps the given raw object pointer. + NSPointerArray.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : this._(other, retain: retain, release: release); - /// Returns a [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 [obj] is an instance of [NSPointerArray]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSPointerArray); } - /// Returns a [NSOperationQueue] that wraps the given raw object pointer. - static NSOperationQueue castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOperationQueue._(other, lib, retain: retain, release: release); + NSPointerArray initWithOptions_(int options) { + final _ret = + _objc_msgSend_462(this.pointer, _sel_initWithOptions_, options); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSOperationQueue]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSOperationQueue1); + NSPointerArray initWithPointerFunctions_(NSPointerFunctions functions) { + final _ret = _objc_msgSend_476( + this.pointer, _sel_initWithPointerFunctions_, functions.pointer); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - NSProgress get progress { - final _ret = _lib._objc_msgSend_879(_id, _lib._sel_progress1); - return NSProgress._(_ret, _lib, retain: true, release: true); + static NSPointerArray pointerArrayWithOptions_(int options) { + final _ret = _objc_msgSend_477( + _class_NSPointerArray, _sel_pointerArrayWithOptions_, options); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - void addOperation_(NSOperation op) { - _lib._objc_msgSend_910(_id, _lib._sel_addOperation_1, op._id); + static NSPointerArray pointerArrayWithPointerFunctions_( + NSPointerFunctions functions) { + final _ret = _objc_msgSend_478(_class_NSPointerArray, + _sel_pointerArrayWithPointerFunctions_, functions.pointer); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - void addOperations_waitUntilFinished_(NSArray ops, bool wait) { - _lib._objc_msgSend_913( - _id, _lib._sel_addOperations_waitUntilFinished_1, ops._id, wait); + NSPointerFunctions get pointerFunctions { + final _ret = _objc_msgSend_479(this.pointer, _sel_pointerFunctions); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); } - void addOperationWithBlock_(ObjCBlock_ffiVoid block) { - _lib._objc_msgSend_532(_id, _lib._sel_addOperationWithBlock_1, block._id); + ffi.Pointer pointerAtIndex_(int index) { + return _objc_msgSend_480(this.pointer, _sel_pointerAtIndex_, index); } - void addBarrierBlock_(ObjCBlock_ffiVoid barrier) { - _lib._objc_msgSend_532(_id, _lib._sel_addBarrierBlock_1, barrier._id); + void addPointer_(ffi.Pointer pointer) { + _objc_msgSend_481(this.pointer, _sel_addPointer_, pointer); } - int get maxConcurrentOperationCount { - return _lib._objc_msgSend_83(_id, _lib._sel_maxConcurrentOperationCount1); + void removePointerAtIndex_(int index) { + _objc_msgSend_414(this.pointer, _sel_removePointerAtIndex_, index); } - set maxConcurrentOperationCount(int value) { - return _lib._objc_msgSend_635( - _id, _lib._sel_setMaxConcurrentOperationCount_1, value); + void insertPointer_atIndex_(ffi.Pointer item, int index) { + _objc_msgSend_482(this.pointer, _sel_insertPointer_atIndex_, item, index); } - bool get suspended { - return _lib._objc_msgSend_12(_id, _lib._sel_isSuspended1); + void replacePointerAtIndex_withPointer_( + int index, ffi.Pointer item) { + _objc_msgSend_483( + this.pointer, _sel_replacePointerAtIndex_withPointer_, index, item); } - set suspended(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setSuspended_1, value); + void compact() { + _objc_msgSend_82(this.pointer, _sel_compact); } - NSString? get name { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_name1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + int get count { + return _objc_msgSend_29(this.pointer, _sel_count); } - set name(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + set count(int value) { + return _objc_msgSend_125(this.pointer, _sel_setCount_, value); } - int get qualityOfService { - return _lib._objc_msgSend_543(_id, _lib._sel_qualityOfService1); + static objc.NSObject pointerArrayWithStrongObjects() { + final _ret = _objc_msgSend_40( + _class_NSPointerArray, _sel_pointerArrayWithStrongObjects); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set qualityOfService(int value) { - return _lib._objc_msgSend_544(_id, _lib._sel_setQualityOfService_1, value); + static objc.NSObject pointerArrayWithWeakObjects() { + final _ret = _objc_msgSend_40( + _class_NSPointerArray, _sel_pointerArrayWithWeakObjects); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - ffi.Pointer get underlyingQueue { - return _lib._objc_msgSend_914(_id, _lib._sel_underlyingQueue1); + static NSPointerArray strongObjectsPointerArray() { + final _ret = _objc_msgSend_484( + _class_NSPointerArray, _sel_strongObjectsPointerArray); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - set underlyingQueue(ffi.Pointer value) { - return _lib._objc_msgSend_915(_id, _lib._sel_setUnderlyingQueue_1, value); + static NSPointerArray weakObjectsPointerArray() { + final _ret = + _objc_msgSend_484(_class_NSPointerArray, _sel_weakObjectsPointerArray); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - void cancelAllOperations() { - _lib._objc_msgSend_1(_id, _lib._sel_cancelAllOperations1); + objc.NSArray get allObjects { + final _ret = _objc_msgSend_6(this.pointer, _sel_allObjects); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void waitUntilAllOperationsAreFinished() { - _lib._objc_msgSend_1(_id, _lib._sel_waitUntilAllOperationsAreFinished1); + @override + NSPointerArray init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - static NSOperationQueue? getCurrentQueue(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_916( - _lib._class_NSOperationQueue1, _lib._sel_currentQueue1); - return _ret.address == 0 - ? null - : NSOperationQueue._(_ret, _lib, retain: true, release: true); + static NSPointerArray new1() { + final _ret = _objc_msgSend_40(_class_NSPointerArray, _sel_new); + return NSPointerArray.castFromPointer(_ret, retain: false, release: true); } - static NSOperationQueue getMainQueue(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_917( - _lib._class_NSOperationQueue1, _lib._sel_mainQueue1); - return NSOperationQueue._(_ret, _lib, retain: true, release: true); + static NSPointerArray allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSPointerArray, _sel_allocWithZone_, zone); + return NSPointerArray.castFromPointer(_ret, retain: false, release: true); } - NSArray get operations { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_operations1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSPointerArray alloc() { + final _ret = _objc_msgSend_40(_class_NSPointerArray, _sel_alloc); + return NSPointerArray.castFromPointer(_ret, retain: false, release: true); } - int get operationCount { - return _lib._objc_msgSend_10(_id, _lib._sel_operationCount1); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSPointerArray, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - @override - NSOperationQueue init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSOperationQueue._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSPointerArray, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static NSOperationQueue new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_new1); - return NSOperationQueue._(_ret, _lib, retain: false, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSPointerArray, _sel_accessInstanceVariablesDirectly); } - static NSOperationQueue allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSOperationQueue1, _lib._sel_allocWithZone_1, zone); - return NSOperationQueue._(_ret, _lib, retain: false, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSPointerArray, _sel_useStoredAccessor); } - static NSOperationQueue alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_alloc1); - return NSOperationQueue._(_ret, _lib, retain: false, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSPointerArray, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSOperationQueue1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSPointerArray, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSOperationQueue1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSPointerArray, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSOperationQueue1, - _lib._sel_accessInstanceVariablesDirectly1); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSPointerArray, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSOperationQueue1, _lib._sel_useStoredAccessor1); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSPointerArray, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} + +late final _class_NSPointerArray = objc.getClass("NSPointerArray"); + +abstract class NSPointerFunctionsOptions { + static const int NSPointerFunctionsStrongMemory = 0; + static const int NSPointerFunctionsZeroingWeakMemory = 1; + static const int NSPointerFunctionsOpaqueMemory = 2; + static const int NSPointerFunctionsMallocMemory = 3; + static const int NSPointerFunctionsMachVirtualMemory = 4; + static const int NSPointerFunctionsWeakMemory = 5; + static const int NSPointerFunctionsObjectPersonality = 0; + static const int NSPointerFunctionsOpaquePersonality = 256; + static const int NSPointerFunctionsObjectPointerPersonality = 512; + static const int NSPointerFunctionsCStringPersonality = 768; + static const int NSPointerFunctionsStructPersonality = 1024; + static const int NSPointerFunctionsIntegerPersonality = 1280; + static const int NSPointerFunctionsCopyIn = 65536; +} + +late final _sel_initWithOptions_ = objc.registerName("initWithOptions:"); +final _objc_msgSend_462 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); + +class NSPointerFunctions extends objc.NSObject { + NSPointerFunctions._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSPointerFunctions] that points to the same underlying object as [other]. + NSPointerFunctions.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSOperationQueue1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + /// Constructs a [NSPointerFunctions] that wraps the given raw object pointer. + NSPointerFunctions.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSPointerFunctions]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSPointerFunctions); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSOperationQueue1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + NSPointerFunctions initWithOptions_(int options) { + final _ret = + _objc_msgSend_462(this.pointer, _sel_initWithOptions_, options); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSOperationQueue1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static NSPointerFunctions pointerFunctionsWithOptions_(int options) { + final _ret = _objc_msgSend_463( + _class_NSPointerFunctions, _sel_pointerFunctionsWithOptions_, options); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSOperationQueue1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>> + get hashFunction { + return _objc_msgSend_464(this.pointer, _sel_hashFunction); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOperationQueue1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + set hashFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + value) { + return _objc_msgSend_465(this.pointer, _sel_setHashFunction_, value); } -} -class NSOperation extends NSObject { - NSOperation._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>> + get isEqualFunction { + return _objc_msgSend_466(this.pointer, _sel_isEqualFunction); + } - /// 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); + set isEqualFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + value) { + return _objc_msgSend_467(this.pointer, _sel_setIsEqualFunction_, value); } - /// Returns a [NSOperation] that wraps the given raw object pointer. - static NSOperation castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOperation._(other, lib, retain: retain, release: release); + ffi.Pointer< + ffi.NativeFunction)>> + get sizeFunction { + return _objc_msgSend_468(this.pointer, _sel_sizeFunction); } - /// 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); + set sizeFunction( + ffi.Pointer< + ffi + .NativeFunction)>> + value) { + return _objc_msgSend_469(this.pointer, _sel_setSizeFunction_, value); } - void start() { - _lib._objc_msgSend_1(_id, _lib._sel_start1); + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> + get descriptionFunction { + return _objc_msgSend_470(this.pointer, _sel_descriptionFunction); } - void main() { - _lib._objc_msgSend_1(_id, _lib._sel_main1); + set descriptionFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> + value) { + return _objc_msgSend_471(this.pointer, _sel_setDescriptionFunction_, value); } - bool get cancelled { - return _lib._objc_msgSend_12(_id, _lib._sel_isCancelled1); + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>> + get relinquishFunction { + return _objc_msgSend_472(this.pointer, _sel_relinquishFunction); } - void cancel() { - _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + set relinquishFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + value) { + return _objc_msgSend_473(this.pointer, _sel_setRelinquishFunction_, value); } - bool get executing { - return _lib._objc_msgSend_12(_id, _lib._sel_isExecuting1); + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>, + ffi.Bool)>> get acquireFunction { + return _objc_msgSend_474(this.pointer, _sel_acquireFunction); } - bool get finished { - return _lib._objc_msgSend_12(_id, _lib._sel_isFinished1); + set acquireFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>, + ffi.Bool)>> + value) { + return _objc_msgSend_475(this.pointer, _sel_setAcquireFunction_, value); } - bool get concurrent { - return _lib._objc_msgSend_12(_id, _lib._sel_isConcurrent1); + bool get usesStrongWriteBarrier { + return _objc_msgSend_7(this.pointer, _sel_usesStrongWriteBarrier); } - bool get asynchronous { - return _lib._objc_msgSend_12(_id, _lib._sel_isAsynchronous1); + set usesStrongWriteBarrier(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setUsesStrongWriteBarrier_, value); } - bool get ready { - return _lib._objc_msgSend_12(_id, _lib._sel_isReady1); + bool get usesWeakReadAndWriteBarriers { + return _objc_msgSend_7(this.pointer, _sel_usesWeakReadAndWriteBarriers); } - void addDependency_(NSOperation op) { - _lib._objc_msgSend_910(_id, _lib._sel_addDependency_1, op._id); + set usesWeakReadAndWriteBarriers(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setUsesWeakReadAndWriteBarriers_, value); } - void removeDependency_(NSOperation op) { - _lib._objc_msgSend_910(_id, _lib._sel_removeDependency_1, op._id); + @override + NSPointerFunctions init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); } - NSArray get dependencies { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_dependencies1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSPointerFunctions new1() { + final _ret = _objc_msgSend_40(_class_NSPointerFunctions, _sel_new); + return NSPointerFunctions.castFromPointer(_ret, + retain: false, release: true); } - int get queuePriority { - return _lib._objc_msgSend_911(_id, _lib._sel_queuePriority1); + static NSPointerFunctions allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSPointerFunctions, _sel_allocWithZone_, zone); + return NSPointerFunctions.castFromPointer(_ret, + retain: false, release: true); } - set queuePriority(int value) { - return _lib._objc_msgSend_912(_id, _lib._sel_setQueuePriority_1, value); + static NSPointerFunctions alloc() { + final _ret = _objc_msgSend_40(_class_NSPointerFunctions, _sel_alloc); + return NSPointerFunctions.castFromPointer(_ret, + retain: false, release: true); } - ObjCBlock_ffiVoid? get completionBlock { - final _ret = _lib._objc_msgSend_668(_id, _lib._sel_completionBlock1); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSPointerFunctions, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - set completionBlock(ObjCBlock_ffiVoid? value) { - return _lib._objc_msgSend_669( - _id, _lib._sel_setCompletionBlock_1, value?._id ?? ffi.nullptr); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSPointerFunctions, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - void waitUntilFinished() { - _lib._objc_msgSend_1(_id, _lib._sel_waitUntilFinished1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSPointerFunctions, _sel_accessInstanceVariablesDirectly); } - double get threadPriority { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_threadPriority1) - : _lib._objc_msgSend_165(_id, _lib._sel_threadPriority1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSPointerFunctions, _sel_useStoredAccessor); } - set threadPriority(double value) { - return _lib._objc_msgSend_542(_id, _lib._sel_setThreadPriority_1, value); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSPointerFunctions, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - int get qualityOfService { - return _lib._objc_msgSend_543(_id, _lib._sel_qualityOfService1); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSPointerFunctions, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - set qualityOfService(int value) { - return _lib._objc_msgSend_544(_id, _lib._sel_setQualityOfService_1, value); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSPointerFunctions, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSPointerFunctions, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSPointerFunctions, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSPointerFunctions = objc.getClass("NSPointerFunctions"); +late final _sel_pointerFunctionsWithOptions_ = + objc.registerName("pointerFunctionsWithOptions:"); +final _objc_msgSend_463 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_hashFunction = objc.registerName("hashFunction"); +final _objc_msgSend_464 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer, ffi.Pointer)>>)>> Function( + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + Function(ffi.Pointer, ffi.Pointer)>(); +late final _sel_setHashFunction_ = objc.registerName("setHashFunction:"); +final _objc_msgSend_465 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>>)>(); +late final _sel_isEqualFunction = objc.registerName("isEqualFunction"); +final _objc_msgSend_466 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer, ffi.Pointer, ffi.Pointer)>>)>> Function( + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + Function(ffi.Pointer, ffi.Pointer)>(); +late final _sel_setIsEqualFunction_ = objc.registerName("setIsEqualFunction:"); +final _objc_msgSend_467 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>>)>(); +late final _sel_sizeFunction = objc.registerName("sizeFunction"); +final _objc_msgSend_468 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer)>> Function( + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>> + Function(ffi.Pointer, ffi.Pointer)>(); +late final _sel_setSizeFunction_ = objc.registerName("setSizeFunction:"); +final _objc_msgSend_469 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>(); +late final _sel_descriptionFunction = objc.registerName("descriptionFunction"); +final _objc_msgSend_470 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> Function( + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>> + Function(ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDescriptionFunction_ = + objc.registerName("setDescriptionFunction:"); +final _objc_msgSend_471 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>)>(); +late final _sel_relinquishFunction = objc.registerName("relinquishFunction"); +final _objc_msgSend_472 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer, ffi.Pointer)>>)>> Function( + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + Function(ffi.Pointer, ffi.Pointer)>(); +late final _sel_setRelinquishFunction_ = + objc.registerName("setRelinquishFunction:"); +final _objc_msgSend_473 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>>)>(); +late final _sel_acquireFunction = objc.registerName("acquireFunction"); +final _objc_msgSend_474 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>, ffi.Bool)>> Function( + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>, + ffi.Bool)>> + Function(ffi.Pointer, ffi.Pointer)>(); +late final _sel_setAcquireFunction_ = objc.registerName("setAcquireFunction:"); +final _objc_msgSend_475 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>, + ffi.Bool)>>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi + .NativeFunction)>>, + ffi.Bool)>>)>(); +late final _sel_usesStrongWriteBarrier = + objc.registerName("usesStrongWriteBarrier"); +late final _sel_setUsesStrongWriteBarrier_ = + objc.registerName("setUsesStrongWriteBarrier:"); +late final _sel_usesWeakReadAndWriteBarriers = + objc.registerName("usesWeakReadAndWriteBarriers"); +late final _sel_setUsesWeakReadAndWriteBarriers_ = + objc.registerName("setUsesWeakReadAndWriteBarriers:"); +late final _sel_initWithPointerFunctions_ = + objc.registerName("initWithPointerFunctions:"); +final _objc_msgSend_476 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_pointerArrayWithOptions_ = + objc.registerName("pointerArrayWithOptions:"); +final _objc_msgSend_477 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_pointerArrayWithPointerFunctions_ = + objc.registerName("pointerArrayWithPointerFunctions:"); +final _objc_msgSend_478 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_pointerFunctions = objc.registerName("pointerFunctions"); +final _objc_msgSend_479 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_pointerAtIndex_ = objc.registerName("pointerAtIndex:"); +final _objc_msgSend_480 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_addPointer_ = objc.registerName("addPointer:"); +final _objc_msgSend_481 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_removePointerAtIndex_ = + objc.registerName("removePointerAtIndex:"); +late final _sel_insertPointer_atIndex_ = + objc.registerName("insertPointer:atIndex:"); +final _objc_msgSend_482 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); +late final _sel_replacePointerAtIndex_withPointer_ = + objc.registerName("replacePointerAtIndex:withPointer:"); +final _objc_msgSend_483 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer)>(); +late final _sel_compact = objc.registerName("compact"); +late final _sel_setCount_ = objc.registerName("setCount:"); +late final _sel_pointerArrayWithStrongObjects = + objc.registerName("pointerArrayWithStrongObjects"); +late final _sel_pointerArrayWithWeakObjects = + objc.registerName("pointerArrayWithWeakObjects"); +late final _sel_strongObjectsPointerArray = + objc.registerName("strongObjectsPointerArray"); +final _objc_msgSend_484 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_weakObjectsPointerArray = + objc.registerName("weakObjectsPointerArray"); +late final _sel_allObjects = objc.registerName("allObjects"); + +class NSProcessInfo extends objc.NSObject { + NSProcessInfo._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSString? get name { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_name1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSProcessInfo] that points to the same underlying object as [other]. + NSProcessInfo.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - set name(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); - } + /// Constructs a [NSProcessInfo] that wraps the given raw object pointer. + NSProcessInfo.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - @override - NSOperation init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSOperation._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSProcessInfo]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSProcessInfo); } - static NSOperation new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_new1); - return NSOperation._(_ret, _lib, retain: false, release: true); + static NSProcessInfo getProcessInfo() { + final _ret = _objc_msgSend_485(_class_NSProcessInfo, _sel_processInfo); + return NSProcessInfo.castFromPointer(_ret, retain: true, release: true); } - static NSOperation allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSOperation1, _lib._sel_allocWithZone_1, zone); - return NSOperation._(_ret, _lib, retain: false, release: true); + objc.NSDictionary get environment { + final _ret = _objc_msgSend_112(this.pointer, _sel_environment); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSOperation alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_alloc1); - return NSOperation._(_ret, _lib, retain: false, release: true); + objc.NSArray get arguments { + final _ret = _objc_msgSend_6(this.pointer, _sel_arguments); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSOperation1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + objc.NSString get hostName { + final _ret = _objc_msgSend_12(this.pointer, _sel_hostName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSOperation1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + objc.NSString get processName { + final _ret = _objc_msgSend_12(this.pointer, _sel_processName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSOperation1, _lib._sel_accessInstanceVariablesDirectly1); + set processName(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setProcessName_, value.pointer); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSOperation1, _lib._sel_useStoredAccessor1); + int get processIdentifier { + return _objc_msgSend_264(this.pointer, _sel_processIdentifier); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSOperation1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + objc.NSString get globallyUniqueString { + final _ret = _objc_msgSend_12(this.pointer, _sel_globallyUniqueString); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSOperation1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + int operatingSystem() { + return _objc_msgSend_29(this.pointer, _sel_operatingSystem); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSOperation1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSString operatingSystemName() { + final _ret = _objc_msgSend_12(this.pointer, _sel_operatingSystemName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSOperation1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSString get operatingSystemVersionString { + final _ret = + _objc_msgSend_12(this.pointer, _sel_operatingSystemVersionString); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOperation1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + void getOperatingSystemVersion(ffi.Pointer stret) { + objc.useMsgSendVariants + ? _objc_msgSend_486Stret( + stret, this.pointer, _sel_operatingSystemVersion) + : stret.ref = + _objc_msgSend_486(this.pointer, _sel_operatingSystemVersion); } -} - -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; -} - -final class dispatch_queue_s extends ffi.Opaque {} - -class NSPointerArray extends NSObject { - NSPointerArray._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSPointerArray] that points to the same underlying object as [other]. - static NSPointerArray castFrom(T other) { - return NSPointerArray._(other._id, other._lib, retain: true, release: true); + int get processorCount { + return _objc_msgSend_29(this.pointer, _sel_processorCount); } - /// Returns a [NSPointerArray] that wraps the given raw object pointer. - static NSPointerArray castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPointerArray._(other, lib, retain: retain, release: release); + int get activeProcessorCount { + return _objc_msgSend_29(this.pointer, _sel_activeProcessorCount); } - /// Returns whether [obj] is an instance of [NSPointerArray]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSPointerArray1); + int get physicalMemory { + return _objc_msgSend_267(this.pointer, _sel_physicalMemory); } - NSPointerArray initWithOptions_(int options) { - final _ret = - _lib._objc_msgSend_918(_id, _lib._sel_initWithOptions_1, options); - return NSPointerArray._(_ret, _lib, retain: true, release: true); + bool isOperatingSystemAtLeastVersion_(NSOperatingSystemVersion version) { + return _objc_msgSend_487( + this.pointer, _sel_isOperatingSystemAtLeastVersion_, version); } - NSPointerArray initWithPointerFunctions_(NSPointerFunctions functions) { - final _ret = _lib._objc_msgSend_932( - _id, _lib._sel_initWithPointerFunctions_1, functions._id); - return NSPointerArray._(_ret, _lib, retain: true, release: true); + double get systemUptime { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_systemUptime) + : _objc_msgSend_115(this.pointer, _sel_systemUptime); } - static NSPointerArray pointerArrayWithOptions_(AVFAudio _lib, int options) { - final _ret = _lib._objc_msgSend_933(_lib._class_NSPointerArray1, - _lib._sel_pointerArrayWithOptions_1, options); - return NSPointerArray._(_ret, _lib, retain: true, release: true); + void disableSuddenTermination() { + _objc_msgSend_82(this.pointer, _sel_disableSuddenTermination); } - static NSPointerArray pointerArrayWithPointerFunctions_( - AVFAudio _lib, NSPointerFunctions functions) { - final _ret = _lib._objc_msgSend_934(_lib._class_NSPointerArray1, - _lib._sel_pointerArrayWithPointerFunctions_1, functions._id); - return NSPointerArray._(_ret, _lib, retain: true, release: true); + void enableSuddenTermination() { + _objc_msgSend_82(this.pointer, _sel_enableSuddenTermination); } - NSPointerFunctions get pointerFunctions { - final _ret = _lib._objc_msgSend_935(_id, _lib._sel_pointerFunctions1); - return NSPointerFunctions._(_ret, _lib, retain: true, release: true); + void disableAutomaticTermination_(objc.NSString reason) { + _objc_msgSend_98( + this.pointer, _sel_disableAutomaticTermination_, reason.pointer); } - ffi.Pointer pointerAtIndex_(int index) { - return _lib._objc_msgSend_936(_id, _lib._sel_pointerAtIndex_1, index); + void enableAutomaticTermination_(objc.NSString reason) { + _objc_msgSend_98( + this.pointer, _sel_enableAutomaticTermination_, reason.pointer); } - void addPointer_(ffi.Pointer pointer) { - _lib._objc_msgSend_52(_id, _lib._sel_addPointer_1, pointer); + bool get automaticTerminationSupportEnabled { + return _objc_msgSend_7( + this.pointer, _sel_automaticTerminationSupportEnabled); } - void removePointerAtIndex_(int index) { - _lib._objc_msgSend_470(_id, _lib._sel_removePointerAtIndex_1, index); + set automaticTerminationSupportEnabled(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAutomaticTerminationSupportEnabled_, value); } - void insertPointer_atIndex_(ffi.Pointer item, int index) { - _lib._objc_msgSend_22(_id, _lib._sel_insertPointer_atIndex_1, item, index); + objc.NSObject beginActivityWithOptions_reason_( + int options, objc.NSString reason) { + final _ret = _objc_msgSend_488(this.pointer, + _sel_beginActivityWithOptions_reason_, options, reason.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void replacePointerAtIndex_withPointer_( - int index, ffi.Pointer item) { - _lib._objc_msgSend_937( - _id, _lib._sel_replacePointerAtIndex_withPointer_1, index, item); + void endActivity_(objc.NSObject activity) { + _objc_msgSend_49(this.pointer, _sel_endActivity_, activity.pointer); } - void compact() { - _lib._objc_msgSend_1(_id, _lib._sel_compact1); + void performActivityWithOptions_reason_usingBlock_( + int options, objc.NSString reason, ObjCBlock_ffiVoid block) { + _objc_msgSend_489( + this.pointer, + _sel_performActivityWithOptions_reason_usingBlock_, + options, + reason.pointer, + block.pointer); } - int get count { - return _lib._objc_msgSend_10(_id, _lib._sel_count1); + void performExpiringActivityWithReason_usingBlock_( + objc.NSString reason, ObjCBlock_ffiVoid_bool block) { + _objc_msgSend_490( + this.pointer, + _sel_performExpiringActivityWithReason_usingBlock_, + reason.pointer, + block.pointer); } - set count(int value) { - return _lib._objc_msgSend_516(_id, _lib._sel_setCount_1, value); + objc.NSString get userName { + final _ret = _objc_msgSend_12(this.pointer, _sel_userName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject pointerArrayWithStrongObjects(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSPointerArray1, _lib._sel_pointerArrayWithStrongObjects1); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSString get fullUserName { + final _ret = _objc_msgSend_12(this.pointer, _sel_fullUserName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject pointerArrayWithWeakObjects(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSPointerArray1, _lib._sel_pointerArrayWithWeakObjects1); - return NSObject._(_ret, _lib, retain: true, release: true); + int get thermalState { + return _objc_msgSend_491(this.pointer, _sel_thermalState); } - static NSPointerArray strongObjectsPointerArray(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_938( - _lib._class_NSPointerArray1, _lib._sel_strongObjectsPointerArray1); - return NSPointerArray._(_ret, _lib, retain: true, release: true); + bool get lowPowerModeEnabled { + return _objc_msgSend_7(this.pointer, _sel_isLowPowerModeEnabled); } - static NSPointerArray weakObjectsPointerArray(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_938( - _lib._class_NSPointerArray1, _lib._sel_weakObjectsPointerArray1); - return NSPointerArray._(_ret, _lib, retain: true, release: true); + bool get macCatalystApp { + return _objc_msgSend_7(this.pointer, _sel_isMacCatalystApp); } - NSArray get allObjects { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_allObjects1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool get iOSAppOnMac { + return _objc_msgSend_7(this.pointer, _sel_isiOSAppOnMac); } @override - NSPointerArray init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSPointerArray._(_ret, _lib, retain: true, release: true); + NSProcessInfo init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSProcessInfo.castFromPointer(_ret, retain: true, release: true); } - static NSPointerArray new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPointerArray1, _lib._sel_new1); - return NSPointerArray._(_ret, _lib, retain: false, release: true); + static NSProcessInfo new1() { + final _ret = _objc_msgSend_40(_class_NSProcessInfo, _sel_new); + return NSProcessInfo.castFromPointer(_ret, retain: false, release: true); } - static NSPointerArray allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSPointerArray1, _lib._sel_allocWithZone_1, zone); - return NSPointerArray._(_ret, _lib, retain: false, release: true); + static NSProcessInfo allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSProcessInfo, _sel_allocWithZone_, zone); + return NSProcessInfo.castFromPointer(_ret, retain: false, release: true); } - static NSPointerArray alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPointerArray1, _lib._sel_alloc1); - return NSPointerArray._(_ret, _lib, retain: false, release: true); + static NSProcessInfo alloc() { + final _ret = _objc_msgSend_40(_class_NSProcessInfo, _sel_alloc); + return NSProcessInfo.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSPointerArray1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSProcessInfo, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSPointerArray1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSProcessInfo, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSPointerArray1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSProcessInfo, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSPointerArray1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSProcessInfo, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSPointerArray1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSProcessInfo, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSPointerArray1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSProcessInfo, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSPointerArray1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSProcessInfo, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSProcessInfo, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSProcessInfo, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSProcessInfo = objc.getClass("NSProcessInfo"); +late final _sel_processInfo = objc.registerName("processInfo"); +final _objc_msgSend_485 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_environment = objc.registerName("environment"); +late final _sel_arguments = objc.registerName("arguments"); +late final _sel_hostName = objc.registerName("hostName"); +late final _sel_processName = objc.registerName("processName"); +late final _sel_setProcessName_ = objc.registerName("setProcessName:"); +late final _sel_processIdentifier = objc.registerName("processIdentifier"); +late final _sel_globallyUniqueString = + objc.registerName("globallyUniqueString"); +late final _sel_operatingSystem = objc.registerName("operatingSystem"); +late final _sel_operatingSystemName = objc.registerName("operatingSystemName"); +late final _sel_operatingSystemVersionString = + objc.registerName("operatingSystemVersionString"); - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSPointerArray1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } +final class NSOperatingSystemVersion extends ffi.Struct { + @ffi.Long() + external int majorVersion; - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSPointerArray1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Long() + external int minorVersion; + + @ffi.Long() + external int patchVersion; } -abstract class NSPointerFunctionsOptions { - static const int NSPointerFunctionsStrongMemory = 0; - static const int NSPointerFunctionsZeroingWeakMemory = 1; - static const int NSPointerFunctionsOpaqueMemory = 2; - static const int NSPointerFunctionsMallocMemory = 3; - static const int NSPointerFunctionsMachVirtualMemory = 4; - static const int NSPointerFunctionsWeakMemory = 5; - static const int NSPointerFunctionsObjectPersonality = 0; - static const int NSPointerFunctionsOpaquePersonality = 256; - static const int NSPointerFunctionsObjectPointerPersonality = 512; - static const int NSPointerFunctionsCStringPersonality = 768; - static const int NSPointerFunctionsStructPersonality = 1024; - static const int NSPointerFunctionsIntegerPersonality = 1280; - static const int NSPointerFunctionsCopyIn = 65536; +late final _sel_operatingSystemVersion = + objc.registerName("operatingSystemVersion"); +final _objc_msgSend_486 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSOperatingSystemVersion Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + NSOperatingSystemVersion Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_486Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_processorCount = objc.registerName("processorCount"); +late final _sel_activeProcessorCount = + objc.registerName("activeProcessorCount"); +late final _sel_physicalMemory = objc.registerName("physicalMemory"); +late final _sel_isOperatingSystemAtLeastVersion_ = + objc.registerName("isOperatingSystemAtLeastVersion:"); +final _objc_msgSend_487 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, NSOperatingSystemVersion)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, NSOperatingSystemVersion)>(); +late final _sel_systemUptime = objc.registerName("systemUptime"); +late final _sel_disableSuddenTermination = + objc.registerName("disableSuddenTermination"); +late final _sel_enableSuddenTermination = + objc.registerName("enableSuddenTermination"); +late final _sel_disableAutomaticTermination_ = + objc.registerName("disableAutomaticTermination:"); +late final _sel_enableAutomaticTermination_ = + objc.registerName("enableAutomaticTermination:"); +late final _sel_automaticTerminationSupportEnabled = + objc.registerName("automaticTerminationSupportEnabled"); +late final _sel_setAutomaticTerminationSupportEnabled_ = + objc.registerName("setAutomaticTerminationSupportEnabled:"); + +abstract class NSActivityOptions { + static const int NSActivityIdleDisplaySleepDisabled = 1099511627776; + static const int NSActivityIdleSystemSleepDisabled = 1048576; + static const int NSActivitySuddenTerminationDisabled = 16384; + static const int NSActivityAutomaticTerminationDisabled = 32768; + static const int NSActivityAnimationTrackingEnabled = 35184372088832; + static const int NSActivityTrackingEnabled = 70368744177664; + static const int NSActivityUserInitiated = 16777215; + static const int NSActivityUserInitiatedAllowingIdleSystemSleep = 15728639; + static const int NSActivityBackground = 255; + static const int NSActivityLatencyCritical = 1095216660480; + static const int NSActivityUserInteractive = 1095233437695; } -class NSPointerFunctions extends NSObject { - NSPointerFunctions._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +late final _sel_beginActivityWithOptions_reason_ = + objc.registerName("beginActivityWithOptions:reason:"); +final _objc_msgSend_488 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_endActivity_ = objc.registerName("endActivity:"); +late final _sel_performActivityWithOptions_reason_usingBlock_ = + objc.registerName("performActivityWithOptions:reason:usingBlock:"); +final _objc_msgSend_489 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_bool_fnPtrTrampoline( + ffi.Pointer block, bool arg0) => + block.ref.target + .cast>() + .asFunction()(arg0); +final _ObjCBlock_ffiVoid_bool_closureRegistry = {}; +int _ObjCBlock_ffiVoid_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_bool_registerClosure( + void Function(bool) fn) { + final id = ++_ObjCBlock_ffiVoid_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - /// Returns a [NSPointerFunctions] that points to the same underlying object as [other]. - static NSPointerFunctions castFrom(T other) { - return NSPointerFunctions._(other._id, other._lib, - retain: true, release: true); - } +void _ObjCBlock_ffiVoid_bool_closureTrampoline( + ffi.Pointer block, bool arg0) => + _ObjCBlock_ffiVoid_bool_closureRegistry[block.ref.target.address]!(arg0); - /// Returns a [NSPointerFunctions] that wraps the given raw object pointer. - static NSPointerFunctions castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPointerFunctions._(other, lib, retain: retain, release: release); - } +class ObjCBlock_ffiVoid_bool extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_bool._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSPointerFunctions]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSPointerFunctions1); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_bool._(pointer, retain: retain, release: release); } - NSPointerFunctions initWithOptions_(int options) { - final _ret = - _lib._objc_msgSend_918(_id, _lib._sel_initWithOptions_1, options); - return NSPointerFunctions._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_bool.fromFunctionPointer( + ffi.Pointer> ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Bool)>(_ObjCBlock_ffiVoid_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - static NSPointerFunctions pointerFunctionsWithOptions_( - AVFAudio _lib, int options) { - final _ret = _lib._objc_msgSend_919(_lib._class_NSPointerFunctions1, - _lib._sel_pointerFunctionsWithOptions_1, options); - return NSPointerFunctions._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_bool.fromFunction(void Function(bool) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Bool)>(_ObjCBlock_ffiVoid_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_bool_registerClosure((bool arg0) => fn(arg0)))); + static ffi.Pointer? _dartFuncTrampoline; - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>)>> - get hashFunction { - return _lib._objc_msgSend_920(_id, _lib._sel_hashFunction1); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_bool.listener(void Function(bool) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Bool)>.listener( + _ObjCBlock_ffiVoid_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_bool_registerClosure((bool arg0) => fn(arg0)))); + static ffi + .NativeCallable, ffi.Bool)>? + _dartFuncListenerTrampoline; - set hashFunction( - ffi.Pointer< + void call(bool arg0) => pointer.ref.invoke + .cast< ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - value) { - return _lib._objc_msgSend_921(_id, _lib._sel_setHashFunction_1, value); - } + ffi.Void Function( + ffi.Pointer block, ffi.Bool arg0)>>() + .asFunction, bool)>()( + pointer, arg0); +} + +late final _sel_performExpiringActivityWithReason_usingBlock_ = + objc.registerName("performExpiringActivityWithReason:usingBlock:"); +final _objc_msgSend_490 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_userName = objc.registerName("userName"); +late final _sel_fullUserName = objc.registerName("fullUserName"); - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>)>> - get isEqualFunction { - return _lib._objc_msgSend_922(_id, _lib._sel_isEqualFunction1); - } +abstract class NSProcessInfoThermalState { + static const int NSProcessInfoThermalStateNominal = 0; + static const int NSProcessInfoThermalStateFair = 1; + static const int NSProcessInfoThermalStateSerious = 2; + static const int NSProcessInfoThermalStateCritical = 3; +} + +late final _sel_thermalState = objc.registerName("thermalState"); +final _objc_msgSend_491 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isLowPowerModeEnabled = + objc.registerName("isLowPowerModeEnabled"); +late final _sel_isMacCatalystApp = objc.registerName("isMacCatalystApp"); +late final _sel_isiOSAppOnMac = objc.registerName("isiOSAppOnMac"); + +class NSTextCheckingResult extends objc.NSObject { + NSTextCheckingResult._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSTextCheckingResult] that points to the same underlying object as [other]. + NSTextCheckingResult.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSTextCheckingResult] that wraps the given raw object pointer. + NSTextCheckingResult.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - set isEqualFunction( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - value) { - return _lib._objc_msgSend_923(_id, _lib._sel_setIsEqualFunction_1, value); + /// Returns whether [obj] is an instance of [NSTextCheckingResult]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSTextCheckingResult); } - ffi.Pointer< - ffi.NativeFunction)>> - get sizeFunction { - return _lib._objc_msgSend_924(_id, _lib._sel_sizeFunction1); + int get resultType { + return _objc_msgSend_492(this.pointer, _sel_resultType); } - set sizeFunction( - ffi.Pointer< - ffi - .NativeFunction)>> - value) { - return _lib._objc_msgSend_925(_id, _lib._sel_setSizeFunction_1, value); + void getRange(ffi.Pointer<_NSRange> stret) { + objc.useMsgSendVariants + ? _objc_msgSend_493Stret(stret, this.pointer, _sel_range) + : stret.ref = _objc_msgSend_493(this.pointer, _sel_range); } - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> - get descriptionFunction { - return _lib._objc_msgSend_926(_id, _lib._sel_descriptionFunction1); + NSOrthography? get orthography { + final _ret = _objc_msgSend_494(this.pointer, _sel_orthography); + return _ret.address == 0 + ? null + : NSOrthography.castFromPointer(_ret, retain: true, release: true); } - set descriptionFunction( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> - value) { - return _lib._objc_msgSend_927( - _id, _lib._sel_setDescriptionFunction_1, value); + objc.NSArray? get grammarDetails { + final _ret = _objc_msgSend_69(this.pointer, _sel_grammarDetails); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>)>> - get relinquishFunction { - return _lib._objc_msgSend_928(_id, _lib._sel_relinquishFunction1); + objc.NSDate? get date { + final _ret = _objc_msgSend_116(this.pointer, _sel_date); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - set relinquishFunction( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - value) { - return _lib._objc_msgSend_929( - _id, _lib._sel_setRelinquishFunction_1, value); + NSTimeZone? get timeZone { + final _ret = _objc_msgSend_132(this.pointer, _sel_timeZone); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>, - ffi.Bool)>> get acquireFunction { - return _lib._objc_msgSend_930(_id, _lib._sel_acquireFunction1); + double get duration { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_duration) + : _objc_msgSend_115(this.pointer, _sel_duration); } - set acquireFunction( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>, - ffi.Bool)>> - value) { - return _lib._objc_msgSend_931(_id, _lib._sel_setAcquireFunction_1, value); + objc.NSDictionary? get components { + final _ret = _objc_msgSend_65(this.pointer, _sel_components); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - bool get usesStrongWriteBarrier { - return _lib._objc_msgSend_12(_id, _lib._sel_usesStrongWriteBarrier1); + objc.NSURL? get URL { + final _ret = _objc_msgSend_10(this.pointer, _sel_URL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - set usesStrongWriteBarrier(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setUsesStrongWriteBarrier_1, value); + objc.NSString? get replacementString { + final _ret = _objc_msgSend_13(this.pointer, _sel_replacementString); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool get usesWeakReadAndWriteBarriers { - return _lib._objc_msgSend_12(_id, _lib._sel_usesWeakReadAndWriteBarriers1); + objc.NSArray? get alternativeStrings { + final _ret = _objc_msgSend_69(this.pointer, _sel_alternativeStrings); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set usesWeakReadAndWriteBarriers(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setUsesWeakReadAndWriteBarriers_1, value); + NSRegularExpression? get regularExpression { + final _ret = _objc_msgSend_506(this.pointer, _sel_regularExpression); + return _ret.address == 0 + ? null + : NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); } - @override - NSPointerFunctions init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSPointerFunctions._(_ret, _lib, retain: true, release: true); + objc.NSString? get phoneNumber { + final _ret = _objc_msgSend_13(this.pointer, _sel_phoneNumber); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSPointerFunctions new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPointerFunctions1, _lib._sel_new1); - return NSPointerFunctions._(_ret, _lib, retain: false, release: true); + int get numberOfRanges { + return _objc_msgSend_29(this.pointer, _sel_numberOfRanges); } - static NSPointerFunctions allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSPointerFunctions1, _lib._sel_allocWithZone_1, zone); - return NSPointerFunctions._(_ret, _lib, retain: false, release: true); + void rangeAtIndex_(ffi.Pointer<_NSRange> stret, int idx) { + objc.useMsgSendVariants + ? _objc_msgSend_507Stret(stret, this.pointer, _sel_rangeAtIndex_, idx) + : stret.ref = _objc_msgSend_507(this.pointer, _sel_rangeAtIndex_, idx); } - static NSPointerFunctions alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPointerFunctions1, _lib._sel_alloc1); - return NSPointerFunctions._(_ret, _lib, retain: false, release: true); + void rangeWithName_(ffi.Pointer<_NSRange> stret, objc.NSString name) { + objc.useMsgSendVariants + ? _objc_msgSend_508Stret( + stret, this.pointer, _sel_rangeWithName_, name.pointer) + : stret.ref = + _objc_msgSend_508(this.pointer, _sel_rangeWithName_, name.pointer); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSPointerFunctions1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + NSTextCheckingResult resultByAdjustingRangesWithOffset_(int offset) { + final _ret = _objc_msgSend_509( + this.pointer, _sel_resultByAdjustingRangesWithOffset_, offset); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSPointerFunctions1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + objc.NSDictionary? get addressComponents { + final _ret = _objc_msgSend_65(this.pointer, _sel_addressComponents); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSPointerFunctions1, - _lib._sel_accessInstanceVariablesDirectly1); + static NSTextCheckingResult orthographyCheckingResultWithRange_orthography_( + _NSRange range, NSOrthography orthography) { + final _ret = _objc_msgSend_510( + _class_NSTextCheckingResult, + _sel_orthographyCheckingResultWithRange_orthography_, + range, + orthography.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSPointerFunctions1, _lib._sel_useStoredAccessor1); + static NSTextCheckingResult spellCheckingResultWithRange_(_NSRange range) { + final _ret = _objc_msgSend_511( + _class_NSTextCheckingResult, _sel_spellCheckingResultWithRange_, range); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSPointerFunctions1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static NSTextCheckingResult grammarCheckingResultWithRange_details_( + _NSRange range, objc.NSArray details) { + final _ret = _objc_msgSend_512(_class_NSTextCheckingResult, + _sel_grammarCheckingResultWithRange_details_, range, details.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSPointerFunctions1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static NSTextCheckingResult dateCheckingResultWithRange_date_( + _NSRange range, objc.NSDate date) { + final _ret = _objc_msgSend_513(_class_NSTextCheckingResult, + _sel_dateCheckingResultWithRange_date_, range, date.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSPointerFunctions1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static NSTextCheckingResult + dateCheckingResultWithRange_date_timeZone_duration_(_NSRange range, + objc.NSDate date, NSTimeZone timeZone, double duration) { + final _ret = _objc_msgSend_514( + _class_NSTextCheckingResult, + _sel_dateCheckingResultWithRange_date_timeZone_duration_, + range, + date.pointer, + timeZone.pointer, + duration); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSPointerFunctions1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSTextCheckingResult addressCheckingResultWithRange_components_( + _NSRange range, objc.NSDictionary components) { + final _ret = _objc_msgSend_515( + _class_NSTextCheckingResult, + _sel_addressCheckingResultWithRange_components_, + range, + components.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSPointerFunctions1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSTextCheckingResult linkCheckingResultWithRange_URL_( + _NSRange range, objc.NSURL url) { + final _ret = _objc_msgSend_516(_class_NSTextCheckingResult, + _sel_linkCheckingResultWithRange_URL_, range, url.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } -} - -class NSProcessInfo extends NSObject { - NSProcessInfo._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSProcessInfo] that points to the same underlying object as [other]. - static NSProcessInfo castFrom(T other) { - return NSProcessInfo._(other._id, other._lib, retain: true, release: true); + static NSTextCheckingResult quoteCheckingResultWithRange_replacementString_( + _NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_517( + _class_NSTextCheckingResult, + _sel_quoteCheckingResultWithRange_replacementString_, + range, + replacementString.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - /// Returns a [NSProcessInfo] that wraps the given raw object pointer. - static NSProcessInfo castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSProcessInfo._(other, lib, retain: retain, release: release); + static NSTextCheckingResult dashCheckingResultWithRange_replacementString_( + _NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_517( + _class_NSTextCheckingResult, + _sel_dashCheckingResultWithRange_replacementString_, + range, + replacementString.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSProcessInfo]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSProcessInfo1); + static NSTextCheckingResult + replacementCheckingResultWithRange_replacementString_( + _NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_517( + _class_NSTextCheckingResult, + _sel_replacementCheckingResultWithRange_replacementString_, + range, + replacementString.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - static NSProcessInfo getProcessInfo(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_939( - _lib._class_NSProcessInfo1, _lib._sel_processInfo1); - return NSProcessInfo._(_ret, _lib, retain: true, release: true); + static NSTextCheckingResult + correctionCheckingResultWithRange_replacementString_( + _NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_517( + _class_NSTextCheckingResult, + _sel_correctionCheckingResultWithRange_replacementString_, + range, + replacementString.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - NSDictionary get environment { - final _ret = _lib._objc_msgSend_181(_id, _lib._sel_environment1); - return NSDictionary._(_ret, _lib, retain: true, release: true); + static NSTextCheckingResult + correctionCheckingResultWithRange_replacementString_alternativeStrings_( + _NSRange range, + objc.NSString replacementString, + objc.NSArray alternativeStrings) { + final _ret = _objc_msgSend_518( + _class_NSTextCheckingResult, + _sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_, + range, + replacementString.pointer, + alternativeStrings.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - NSArray get arguments { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_arguments1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSTextCheckingResult + regularExpressionCheckingResultWithRanges_count_regularExpression_( + ffi.Pointer<_NSRange> ranges, + int count, + NSRegularExpression regularExpression) { + final _ret = _objc_msgSend_519( + _class_NSTextCheckingResult, + _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_, + ranges, + count, + regularExpression.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - NSString get hostName { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_hostName1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSTextCheckingResult phoneNumberCheckingResultWithRange_phoneNumber_( + _NSRange range, objc.NSString phoneNumber) { + final _ret = _objc_msgSend_517( + _class_NSTextCheckingResult, + _sel_phoneNumberCheckingResultWithRange_phoneNumber_, + range, + phoneNumber.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - NSString get processName { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_processName1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSTextCheckingResult + transitInformationCheckingResultWithRange_components_( + _NSRange range, objc.NSDictionary components) { + final _ret = _objc_msgSend_515( + _class_NSTextCheckingResult, + _sel_transitInformationCheckingResultWithRange_components_, + range, + components.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - set processName(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setProcessName_1, value._id); + @override + NSTextCheckingResult init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - int get processIdentifier { - return _lib._objc_msgSend_237(_id, _lib._sel_processIdentifier1); + static NSTextCheckingResult new1() { + final _ret = _objc_msgSend_40(_class_NSTextCheckingResult, _sel_new); + return NSTextCheckingResult.castFromPointer(_ret, + retain: false, release: true); } - NSString get globallyUniqueString { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_globallyUniqueString1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSTextCheckingResult allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSTextCheckingResult, _sel_allocWithZone_, zone); + return NSTextCheckingResult.castFromPointer(_ret, + retain: false, release: true); } - int operatingSystem() { - return _lib._objc_msgSend_10(_id, _lib._sel_operatingSystem1); + static NSTextCheckingResult alloc() { + final _ret = _objc_msgSend_40(_class_NSTextCheckingResult, _sel_alloc); + return NSTextCheckingResult.castFromPointer(_ret, + retain: false, release: true); } - NSString operatingSystemName() { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_operatingSystemName1); - return NSString._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSTextCheckingResult, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSString get operatingSystemVersionString { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_operatingSystemVersionString1); - return NSString._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSTextCheckingResult, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - void getOperatingSystemVersion(ffi.Pointer stret) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_940_stret( - stret, _id, _lib._sel_operatingSystemVersion1) - : stret.ref = - _lib._objc_msgSend_940(_id, _lib._sel_operatingSystemVersion1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSTextCheckingResult, _sel_accessInstanceVariablesDirectly); } - int get processorCount { - return _lib._objc_msgSend_10(_id, _lib._sel_processorCount1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSTextCheckingResult, _sel_useStoredAccessor); } - int get activeProcessorCount { - return _lib._objc_msgSend_10(_id, _lib._sel_activeProcessorCount1); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSTextCheckingResult, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - int get physicalMemory { - return _lib._objc_msgSend_164(_id, _lib._sel_physicalMemory1); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSTextCheckingResult, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - bool isOperatingSystemAtLeastVersion_(NSOperatingSystemVersion version) { - return _lib._objc_msgSend_941( - _id, _lib._sel_isOperatingSystemAtLeastVersion_1, version); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSTextCheckingResult, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - double get systemUptime { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_systemUptime1) - : _lib._objc_msgSend_165(_id, _lib._sel_systemUptime1); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSTextCheckingResult, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void disableSuddenTermination() { - _lib._objc_msgSend_1(_id, _lib._sel_disableSuddenTermination1); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSTextCheckingResult, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - void enableSuddenTermination() { - _lib._objc_msgSend_1(_id, _lib._sel_enableSuddenTermination1); +late final _class_NSTextCheckingResult = objc.getClass("NSTextCheckingResult"); + +abstract class NSTextCheckingType { + static const int NSTextCheckingTypeOrthography = 1; + static const int NSTextCheckingTypeSpelling = 2; + static const int NSTextCheckingTypeGrammar = 4; + static const int NSTextCheckingTypeDate = 8; + static const int NSTextCheckingTypeAddress = 16; + static const int NSTextCheckingTypeLink = 32; + static const int NSTextCheckingTypeQuote = 64; + static const int NSTextCheckingTypeDash = 128; + static const int NSTextCheckingTypeReplacement = 256; + static const int NSTextCheckingTypeCorrection = 512; + static const int NSTextCheckingTypeRegularExpression = 1024; + static const int NSTextCheckingTypePhoneNumber = 2048; + static const int NSTextCheckingTypeTransitInformation = 4096; +} + +late final _sel_resultType = objc.registerName("resultType"); +final _objc_msgSend_492 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_range = objc.registerName("range"); +final _objc_msgSend_493 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_493Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer)>(); +late final _sel_orthography = objc.registerName("orthography"); +final _objc_msgSend_494 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_grammarDetails = objc.registerName("grammarDetails"); +late final _sel_duration = objc.registerName("duration"); +late final _sel_components = objc.registerName("components"); +late final _sel_replacementString = objc.registerName("replacementString"); +late final _sel_alternativeStrings = objc.registerName("alternativeStrings"); + +class NSRegularExpression extends objc.NSObject { + NSRegularExpression._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSRegularExpression] that points to the same underlying object as [other]. + NSRegularExpression.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSRegularExpression] that wraps the given raw object pointer. + NSRegularExpression.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSRegularExpression]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSRegularExpression); } - void disableAutomaticTermination_(NSString reason) { - _lib._objc_msgSend_247( - _id, _lib._sel_disableAutomaticTermination_1, reason._id); + static NSRegularExpression? regularExpressionWithPattern_options_error_( + objc.NSString pattern, + int options, + ffi.Pointer> error) { + final _ret = _objc_msgSend_495( + _class_NSRegularExpression, + _sel_regularExpressionWithPattern_options_error_, + pattern.pointer, + options, + error); + return _ret.address == 0 + ? null + : NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); } - void enableAutomaticTermination_(NSString reason) { - _lib._objc_msgSend_247( - _id, _lib._sel_enableAutomaticTermination_1, reason._id); + NSRegularExpression? initWithPattern_options_error_(objc.NSString pattern, + int options, ffi.Pointer> error) { + final _ret = _objc_msgSend_496(this.pointer, + _sel_initWithPattern_options_error_, pattern.pointer, options, error); + return _ret.address == 0 + ? null + : NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); } - bool get automaticTerminationSupportEnabled { - return _lib._objc_msgSend_12( - _id, _lib._sel_automaticTerminationSupportEnabled1); + objc.NSString get pattern { + final _ret = _objc_msgSend_12(this.pointer, _sel_pattern); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set automaticTerminationSupportEnabled(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setAutomaticTerminationSupportEnabled_1, value); + int get options { + return _objc_msgSend_497(this.pointer, _sel_options); } - NSObject beginActivityWithOptions_reason_(int options, NSString reason) { - final _ret = _lib._objc_msgSend_942( - _id, _lib._sel_beginActivityWithOptions_reason_1, options, reason._id); - return NSObject._(_ret, _lib, retain: true, release: true); + int get numberOfCaptureGroups { + return _objc_msgSend_29(this.pointer, _sel_numberOfCaptureGroups); } - void endActivity_(NSObject activity) { - _lib._objc_msgSend_15(_id, _lib._sel_endActivity_1, activity._id); + static objc.NSString escapedPatternForString_(objc.NSString string) { + final _ret = _objc_msgSend_297(_class_NSRegularExpression, + _sel_escapedPatternForString_, string.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void performActivityWithOptions_reason_usingBlock_( - int options, NSString reason, ObjCBlock_ffiVoid block) { - _lib._objc_msgSend_943( - _id, - _lib._sel_performActivityWithOptions_reason_usingBlock_1, + void enumerateMatchesInString_options_range_usingBlock_( + objc.NSString string, + int options, + _NSRange range, + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool block) { + _objc_msgSend_498( + this.pointer, + _sel_enumerateMatchesInString_options_range_usingBlock_, + string.pointer, options, - reason._id, - block._id); + range, + block.pointer); } - void performExpiringActivityWithReason_usingBlock_( - NSString reason, ObjCBlock_ffiVoid_bool block) { - _lib._objc_msgSend_944( - _id, - _lib._sel_performExpiringActivityWithReason_usingBlock_1, - reason._id, - block._id); + objc.NSArray matchesInString_options_range_( + objc.NSString string, int options, _NSRange range) { + final _ret = _objc_msgSend_499(this.pointer, + _sel_matchesInString_options_range_, string.pointer, options, range); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString get userName { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_userName1); - return NSString._(_ret, _lib, retain: true, release: true); + int numberOfMatchesInString_options_range_( + objc.NSString string, int options, _NSRange range) { + return _objc_msgSend_500( + this.pointer, + _sel_numberOfMatchesInString_options_range_, + string.pointer, + options, + range); } - NSString get fullUserName { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_fullUserName1); - return NSString._(_ret, _lib, retain: true, release: true); + NSTextCheckingResult? firstMatchInString_options_range_( + objc.NSString string, int options, _NSRange range) { + final _ret = _objc_msgSend_501(this.pointer, + _sel_firstMatchInString_options_range_, string.pointer, options, range); + return _ret.address == 0 + ? null + : NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - int get thermalState { - return _lib._objc_msgSend_945(_id, _lib._sel_thermalState1); + void rangeOfFirstMatchInString_options_range_(ffi.Pointer<_NSRange> stret, + objc.NSString string, int options, _NSRange range) { + objc.useMsgSendVariants + ? _objc_msgSend_502Stret( + stret, + this.pointer, + _sel_rangeOfFirstMatchInString_options_range_, + string.pointer, + options, + range) + : stret.ref = _objc_msgSend_502( + this.pointer, + _sel_rangeOfFirstMatchInString_options_range_, + string.pointer, + options, + range); } - bool get lowPowerModeEnabled { - return _lib._objc_msgSend_12(_id, _lib._sel_isLowPowerModeEnabled1); + objc.NSString stringByReplacingMatchesInString_options_range_withTemplate_( + objc.NSString string, int options, _NSRange range, objc.NSString templ) { + final _ret = _objc_msgSend_503( + this.pointer, + _sel_stringByReplacingMatchesInString_options_range_withTemplate_, + string.pointer, + options, + range, + templ.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool get macCatalystApp { - return _lib._objc_msgSend_12(_id, _lib._sel_isMacCatalystApp1); + int replaceMatchesInString_options_range_withTemplate_( + objc.NSMutableString string, + int options, + _NSRange range, + objc.NSString templ) { + return _objc_msgSend_504( + this.pointer, + _sel_replaceMatchesInString_options_range_withTemplate_, + string.pointer, + options, + range, + templ.pointer); + } + + objc.NSString replacementStringForResult_inString_offset_template_( + NSTextCheckingResult result, + objc.NSString string, + int offset, + objc.NSString templ) { + final _ret = _objc_msgSend_505( + this.pointer, + _sel_replacementStringForResult_inString_offset_template_, + result.pointer, + string.pointer, + offset, + templ.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool get iOSAppOnMac { - return _lib._objc_msgSend_12(_id, _lib._sel_isiOSAppOnMac1); + static objc.NSString escapedTemplateForString_(objc.NSString string) { + final _ret = _objc_msgSend_297(_class_NSRegularExpression, + _sel_escapedTemplateForString_, string.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } @override - NSProcessInfo init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSProcessInfo._(_ret, _lib, retain: true, release: true); + NSRegularExpression init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); } - static NSProcessInfo new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSProcessInfo1, _lib._sel_new1); - return NSProcessInfo._(_ret, _lib, retain: false, release: true); + static NSRegularExpression new1() { + final _ret = _objc_msgSend_40(_class_NSRegularExpression, _sel_new); + return NSRegularExpression.castFromPointer(_ret, + retain: false, release: true); } - static NSProcessInfo allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSProcessInfo1, _lib._sel_allocWithZone_1, zone); - return NSProcessInfo._(_ret, _lib, retain: false, release: true); + static NSRegularExpression allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSRegularExpression, _sel_allocWithZone_, zone); + return NSRegularExpression.castFromPointer(_ret, + retain: false, release: true); } - static NSProcessInfo alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSProcessInfo1, _lib._sel_alloc1); - return NSProcessInfo._(_ret, _lib, retain: false, release: true); + static NSRegularExpression alloc() { + final _ret = _objc_msgSend_40(_class_NSRegularExpression, _sel_alloc); + return NSRegularExpression.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSProcessInfo1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSRegularExpression, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSProcessInfo1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSRegularExpression, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSProcessInfo1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSRegularExpression, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSProcessInfo1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSRegularExpression, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSProcessInfo1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSRegularExpression, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSProcessInfo1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSRegularExpression, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSProcessInfo1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSRegularExpression, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSProcessInfo1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSRegularExpression, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSProcessInfo1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSRegularExpression, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -final class NSOperatingSystemVersion extends ffi.Struct { - @ffi.Long() - external int majorVersion; - - @ffi.Long() - external int minorVersion; +late final _class_NSRegularExpression = objc.getClass("NSRegularExpression"); - @ffi.Long() - external int patchVersion; +abstract class NSRegularExpressionOptions { + static const int NSRegularExpressionCaseInsensitive = 1; + static const int NSRegularExpressionAllowCommentsAndWhitespace = 2; + static const int NSRegularExpressionIgnoreMetacharacters = 4; + static const int NSRegularExpressionDotMatchesLineSeparators = 8; + static const int NSRegularExpressionAnchorsMatchLines = 16; + static const int NSRegularExpressionUseUnixLineSeparators = 32; + static const int NSRegularExpressionUseUnicodeWordBoundaries = 64; } -abstract class NSActivityOptions { - static const int NSActivityIdleDisplaySleepDisabled = 1099511627776; - static const int NSActivityIdleSystemSleepDisabled = 1048576; - static const int NSActivitySuddenTerminationDisabled = 16384; - static const int NSActivityAutomaticTerminationDisabled = 32768; - static const int NSActivityAnimationTrackingEnabled = 35184372088832; - static const int NSActivityTrackingEnabled = 70368744177664; - static const int NSActivityUserInitiated = 16777215; - static const int NSActivityUserInitiatedAllowingIdleSystemSleep = 15728639; - static const int NSActivityBackground = 255; - static const int NSActivityLatencyCritical = 1095216660480; - static const int NSActivityUserInteractive = 1095233437695; +late final _sel_regularExpressionWithPattern_options_error_ = + objc.registerName("regularExpressionWithPattern:options:error:"); +final _objc_msgSend_495 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_initWithPattern_options_error_ = + objc.registerName("initWithPattern:options:error:"); +final _objc_msgSend_496 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_pattern = objc.registerName("pattern"); +late final _sel_options = objc.registerName("options"); +final _objc_msgSend_497 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_numberOfCaptureGroups = + objc.registerName("numberOfCaptureGroups"); +late final _sel_escapedPatternForString_ = + objc.registerName("escapedPatternForString:"); + +abstract class NSMatchingOptions { + static const int NSMatchingReportProgress = 1; + static const int NSMatchingReportCompletion = 2; + static const int NSMatchingAnchored = 4; + static const int NSMatchingWithTransparentBounds = 8; + static const int NSMatchingWithoutAnchoringBounds = 16; } -void _ObjCBlock_ffiVoid_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, bool arg0) => - block.ref.target - .cast>() - .asFunction()(arg0); -final _ObjCBlock_ffiVoid_bool_closureRegistry = {}; -int _ObjCBlock_ffiVoid_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_bool_registerClosure( - void Function(bool) fn) { - final id = ++_ObjCBlock_ffiVoid_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_bool_closureRegistry[id] = fn; +void + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Int32 arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, int, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry = + , int, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( + void Function(ffi.Pointer, int, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry[ + id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, bool arg0) => - _ObjCBlock_ffiVoid_bool_closureRegistry[block.ref.target.address]!(arg0); +void _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock_ffiVoid_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_bool._(ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); +class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_bool castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_bool._(pointer, lib, - retain: retain, release: release); + static ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) { + return ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool._( + pointer, + retain: retain, + release: release); } /// Creates a block from a C function pointer. @@ -66385,16 +22986,22 @@ class ObjCBlock_ffiVoid_bool extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_bool.fromFunctionPointer(AVFAudio lib, - ffi.Pointer> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Bool)>(_ObjCBlock_ffiVoid_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Int32 arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. @@ -66402,17 +23009,21 @@ class ObjCBlock_ffiVoid_bool extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_bool.fromFunction(AVFAudio lib, void Function(bool) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Bool)>( - _ObjCBlock_ffiVoid_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_bool_registerClosure( - (bool arg0) => fn(arg0))), - lib); + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool.fromFunction( + void Function(NSTextCheckingResult?, int, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : NSTextCheckingResult.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -66424,770 +23035,1610 @@ class ObjCBlock_ffiVoid_bool extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_bool.listener(AVFAudio lib, void Function(bool) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Bool)>.listener( - _ObjCBlock_ffiVoid_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_bool_registerClosure( - (bool arg0) => fn(arg0))), - lib); - static ffi - .NativeCallable, ffi.Bool)>? - _dartFuncListenerTrampoline; + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool.listener( + void Function(NSTextCheckingResult?, int, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( + (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : NSTextCheckingResult.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>? _dartFuncListenerTrampoline; - void call(bool arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, ffi.Bool arg0)>>() - .asFunction, bool)>()(_id, arg0); + void call(NSTextCheckingResult? arg0, int arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Int32 arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr, arg1, arg2); } -abstract class NSProcessInfoThermalState { - static const int NSProcessInfoThermalStateNominal = 0; - static const int NSProcessInfoThermalStateFair = 1; - static const int NSProcessInfoThermalStateSerious = 2; - static const int NSProcessInfoThermalStateCritical = 3; +abstract class NSMatchingFlags { + static const int NSMatchingProgress = 1; + static const int NSMatchingCompleted = 2; + static const int NSMatchingHitEnd = 4; + static const int NSMatchingRequiredEnd = 8; + static const int NSMatchingInternalError = 16; } -class NSTextCheckingResult extends NSObject { - NSTextCheckingResult._(ffi.Pointer id, AVFAudio lib, +late final _sel_enumerateMatchesInString_options_range_usingBlock_ = + objc.registerName("enumerateMatchesInString:options:range:usingBlock:"); +final _objc_msgSend_498 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange, + ffi.Pointer)>(); +late final _sel_matchesInString_options_range_ = + objc.registerName("matchesInString:options:range:"); +final _objc_msgSend_499 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +late final _sel_numberOfMatchesInString_options_range_ = + objc.registerName("numberOfMatchesInString:options:range:"); +final _objc_msgSend_500 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +late final _sel_firstMatchInString_options_range_ = + objc.registerName("firstMatchInString:options:range:"); +final _objc_msgSend_501 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +late final _sel_rangeOfFirstMatchInString_options_range_ = + objc.registerName("rangeOfFirstMatchInString:options:range:"); +final _objc_msgSend_502 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +final _objc_msgSend_502Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +late final _sel_stringByReplacingMatchesInString_options_range_withTemplate_ = + objc.registerName( + "stringByReplacingMatchesInString:options:range:withTemplate:"); +final _objc_msgSend_503 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange, + ffi.Pointer)>(); +late final _sel_replaceMatchesInString_options_range_withTemplate_ = + objc.registerName("replaceMatchesInString:options:range:withTemplate:"); +final _objc_msgSend_504 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange, + ffi.Pointer)>(); +late final _sel_replacementStringForResult_inString_offset_template_ = + objc.registerName("replacementStringForResult:inString:offset:template:"); +final _objc_msgSend_505 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_escapedTemplateForString_ = + objc.registerName("escapedTemplateForString:"); +late final _sel_regularExpression = objc.registerName("regularExpression"); +final _objc_msgSend_506 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_phoneNumber = objc.registerName("phoneNumber"); +late final _sel_numberOfRanges = objc.registerName("numberOfRanges"); +late final _sel_rangeAtIndex_ = objc.registerName("rangeAtIndex:"); +final _objc_msgSend_507 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_507Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_rangeWithName_ = objc.registerName("rangeWithName:"); +final _objc_msgSend_508 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_508Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_resultByAdjustingRangesWithOffset_ = + objc.registerName("resultByAdjustingRangesWithOffset:"); +final _objc_msgSend_509 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_addressComponents = objc.registerName("addressComponents"); +late final _sel_orthographyCheckingResultWithRange_orthography_ = + objc.registerName("orthographyCheckingResultWithRange:orthography:"); +final _objc_msgSend_510 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_spellCheckingResultWithRange_ = + objc.registerName("spellCheckingResultWithRange:"); +final _objc_msgSend_511 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_grammarCheckingResultWithRange_details_ = + objc.registerName("grammarCheckingResultWithRange:details:"); +final _objc_msgSend_512 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_dateCheckingResultWithRange_date_ = + objc.registerName("dateCheckingResultWithRange:date:"); +final _objc_msgSend_513 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_dateCheckingResultWithRange_date_timeZone_duration_ = + objc.registerName("dateCheckingResultWithRange:date:timeZone:duration:"); +final _objc_msgSend_514 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.Pointer, + ffi.Double)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.Pointer, + double)>(); +late final _sel_addressCheckingResultWithRange_components_ = + objc.registerName("addressCheckingResultWithRange:components:"); +final _objc_msgSend_515 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_linkCheckingResultWithRange_URL_ = + objc.registerName("linkCheckingResultWithRange:URL:"); +final _objc_msgSend_516 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_quoteCheckingResultWithRange_replacementString_ = + objc.registerName("quoteCheckingResultWithRange:replacementString:"); +final _objc_msgSend_517 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_dashCheckingResultWithRange_replacementString_ = + objc.registerName("dashCheckingResultWithRange:replacementString:"); +late final _sel_replacementCheckingResultWithRange_replacementString_ = + objc.registerName("replacementCheckingResultWithRange:replacementString:"); +late final _sel_correctionCheckingResultWithRange_replacementString_ = + objc.registerName("correctionCheckingResultWithRange:replacementString:"); +late final _sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_ = + objc.registerName( + "correctionCheckingResultWithRange:replacementString:alternativeStrings:"); +final _objc_msgSend_518 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_ = + objc.registerName( + "regularExpressionCheckingResultWithRanges:count:regularExpression:"); +final _objc_msgSend_519 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_NSRange>, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_NSRange>, + int, + ffi.Pointer)>(); +late final _sel_phoneNumberCheckingResultWithRange_phoneNumber_ = + objc.registerName("phoneNumberCheckingResultWithRange:phoneNumber:"); +late final _sel_transitInformationCheckingResultWithRange_components_ = + objc.registerName("transitInformationCheckingResultWithRange:components:"); + +class NSURLCache extends objc.NSObject { + NSURLCache._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSTextCheckingResult] that points to the same underlying object as [other]. - static NSTextCheckingResult castFrom(T other) { - return NSTextCheckingResult._(other._id, other._lib, - retain: true, release: true); - } + /// Constructs a [NSURLCache] that points to the same underlying object as [other]. + NSURLCache.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSTextCheckingResult] that wraps the given raw object pointer. - static NSTextCheckingResult castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSTextCheckingResult._(other, lib, retain: retain, release: release); + /// Constructs a [NSURLCache] that wraps the given raw object pointer. + NSURLCache.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLCache]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSURLCache); } - /// Returns whether [obj] is an instance of [NSTextCheckingResult]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSTextCheckingResult1); + static NSURLCache getSharedURLCache() { + final _ret = _objc_msgSend_520(_class_NSURLCache, _sel_sharedURLCache); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); } - int get resultType { - return _lib._objc_msgSend_946(_id, _lib._sel_resultType1); + static void setSharedURLCache(NSURLCache value) { + return _objc_msgSend_521( + _class_NSURLCache, _sel_setSharedURLCache_, value.pointer); } - void getRange(ffi.Pointer<_NSRange> stret) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_54_stret(stret, _id, _lib._sel_range1) - : stret.ref = _lib._objc_msgSend_54(_id, _lib._sel_range1); + NSURLCache initWithMemoryCapacity_diskCapacity_diskPath_( + int memoryCapacity, int diskCapacity, objc.NSString? path) { + final _ret = _objc_msgSend_522( + this.pointer, + _sel_initWithMemoryCapacity_diskCapacity_diskPath_, + memoryCapacity, + diskCapacity, + path?.pointer ?? ffi.nullptr); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); } - NSOrthography? get orthography { - final _ret = _lib._objc_msgSend_947(_id, _lib._sel_orthography1); - return _ret.address == 0 - ? null - : NSOrthography._(_ret, _lib, retain: true, release: true); + NSURLCache initWithMemoryCapacity_diskCapacity_directoryURL_( + int memoryCapacity, int diskCapacity, objc.NSURL? directoryURL) { + final _ret = _objc_msgSend_523( + this.pointer, + _sel_initWithMemoryCapacity_diskCapacity_directoryURL_, + memoryCapacity, + diskCapacity, + directoryURL?.pointer ?? ffi.nullptr); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); } - NSArray? get grammarDetails { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_grammarDetails1); + NSCachedURLResponse? cachedResponseForRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_528( + this.pointer, _sel_cachedResponseForRequest_, request.pointer); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); + : NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } - NSDate? get date { - final _ret = _lib._objc_msgSend_183(_id, _lib._sel_date1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + void storeCachedResponse_forRequest_( + NSCachedURLResponse cachedResponse, NSURLRequest request) { + _objc_msgSend_529(this.pointer, _sel_storeCachedResponse_forRequest_, + cachedResponse.pointer, request.pointer); } - NSTimeZone? get timeZone { - final _ret = _lib._objc_msgSend_773(_id, _lib._sel_timeZone1); - return _ret.address == 0 - ? null - : NSTimeZone._(_ret, _lib, retain: true, release: true); + void removeCachedResponseForRequest_(NSURLRequest request) { + _objc_msgSend_530( + this.pointer, _sel_removeCachedResponseForRequest_, request.pointer); } - double get duration { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_duration1) - : _lib._objc_msgSend_165(_id, _lib._sel_duration1); + void removeAllCachedResponses() { + _objc_msgSend_82(this.pointer, _sel_removeAllCachedResponses); } - NSDictionary? get components { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_components1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + void removeCachedResponsesSinceDate_(objc.NSDate date) { + _objc_msgSend_246( + this.pointer, _sel_removeCachedResponsesSinceDate_, date.pointer); } - NSURL? get URL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + int get memoryCapacity { + return _objc_msgSend_29(this.pointer, _sel_memoryCapacity); } - NSString? get replacementString { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_replacementString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + set memoryCapacity(int value) { + return _objc_msgSend_125(this.pointer, _sel_setMemoryCapacity_, value); } - NSArray? get alternativeStrings { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_alternativeStrings1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + int get diskCapacity { + return _objc_msgSend_29(this.pointer, _sel_diskCapacity); } - NSRegularExpression? get regularExpression { - final _ret = _lib._objc_msgSend_959(_id, _lib._sel_regularExpression1); - return _ret.address == 0 - ? null - : NSRegularExpression._(_ret, _lib, retain: true, release: true); + set diskCapacity(int value) { + return _objc_msgSend_125(this.pointer, _sel_setDiskCapacity_, value); } - NSString? get phoneNumber { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_phoneNumber1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + int get currentMemoryUsage { + return _objc_msgSend_29(this.pointer, _sel_currentMemoryUsage); } - int get numberOfRanges { - return _lib._objc_msgSend_10(_id, _lib._sel_numberOfRanges1); + int get currentDiskUsage { + return _objc_msgSend_29(this.pointer, _sel_currentDiskUsage); } - void rangeAtIndex_(ffi.Pointer<_NSRange> stret, int idx) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_347_stret( - stret, _id, _lib._sel_rangeAtIndex_1, idx) - : stret.ref = - _lib._objc_msgSend_347(_id, _lib._sel_rangeAtIndex_1, idx); + void storeCachedResponse_forDataTask_( + NSCachedURLResponse cachedResponse, NSURLSessionDataTask dataTask) { + _objc_msgSend_531(this.pointer, _sel_storeCachedResponse_forDataTask_, + cachedResponse.pointer, dataTask.pointer); } - void rangeWithName_(ffi.Pointer<_NSRange> stret, NSString name) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_340_stret( - stret, _id, _lib._sel_rangeWithName_1, name._id) - : stret.ref = - _lib._objc_msgSend_340(_id, _lib._sel_rangeWithName_1, name._id); + void getCachedResponseForDataTask_completionHandler_( + NSURLSessionDataTask dataTask, + ObjCBlock_ffiVoid_NSCachedURLResponse completionHandler) { + _objc_msgSend_532( + this.pointer, + _sel_getCachedResponseForDataTask_completionHandler_, + dataTask.pointer, + completionHandler.pointer); } - NSTextCheckingResult resultByAdjustingRangesWithOffset_(int offset) { - final _ret = _lib._objc_msgSend_960( - _id, _lib._sel_resultByAdjustingRangesWithOffset_1, offset); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + void removeCachedResponseForDataTask_(NSURLSessionDataTask dataTask) { + _objc_msgSend_533( + this.pointer, _sel_removeCachedResponseForDataTask_, dataTask.pointer); } - NSDictionary? get addressComponents { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_addressComponents1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + @override + NSURLCache init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); } - static NSTextCheckingResult orthographyCheckingResultWithRange_orthography_( - AVFAudio _lib, _NSRange range, NSOrthography orthography) { - final _ret = _lib._objc_msgSend_961( - _lib._class_NSTextCheckingResult1, - _lib._sel_orthographyCheckingResultWithRange_orthography_1, - range, - orthography._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + static NSURLCache new1() { + final _ret = _objc_msgSend_40(_class_NSURLCache, _sel_new); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); } - static NSTextCheckingResult spellCheckingResultWithRange_( - AVFAudio _lib, _NSRange range) { - final _ret = _lib._objc_msgSend_962(_lib._class_NSTextCheckingResult1, - _lib._sel_spellCheckingResultWithRange_1, range); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + static NSURLCache allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSURLCache, _sel_allocWithZone_, zone); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); } - static NSTextCheckingResult grammarCheckingResultWithRange_details_( - AVFAudio _lib, _NSRange range, NSArray details) { - final _ret = _lib._objc_msgSend_963(_lib._class_NSTextCheckingResult1, - _lib._sel_grammarCheckingResultWithRange_details_1, range, details._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + static NSURLCache alloc() { + final _ret = _objc_msgSend_40(_class_NSURLCache, _sel_alloc); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); } - static NSTextCheckingResult dateCheckingResultWithRange_date_( - AVFAudio _lib, _NSRange range, NSDate date) { - final _ret = _lib._objc_msgSend_964(_lib._class_NSTextCheckingResult1, - _lib._sel_dateCheckingResultWithRange_date_1, range, date._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLCache, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - static NSTextCheckingResult - dateCheckingResultWithRange_date_timeZone_duration_(AVFAudio _lib, - _NSRange range, NSDate date, NSTimeZone timeZone, double duration) { - final _ret = _lib._objc_msgSend_965( - _lib._class_NSTextCheckingResult1, - _lib._sel_dateCheckingResultWithRange_date_timeZone_duration_1, - range, - date._id, - timeZone._id, - duration); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLCache, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static NSTextCheckingResult addressCheckingResultWithRange_components_( - AVFAudio _lib, _NSRange range, NSDictionary components) { - final _ret = _lib._objc_msgSend_966( - _lib._class_NSTextCheckingResult1, - _lib._sel_addressCheckingResultWithRange_components_1, - range, - components._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLCache, _sel_accessInstanceVariablesDirectly); } - static NSTextCheckingResult linkCheckingResultWithRange_URL_( - AVFAudio _lib, _NSRange range, NSURL url) { - final _ret = _lib._objc_msgSend_967(_lib._class_NSTextCheckingResult1, - _lib._sel_linkCheckingResultWithRange_URL_1, range, url._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLCache, _sel_useStoredAccessor); } - static NSTextCheckingResult quoteCheckingResultWithRange_replacementString_( - AVFAudio _lib, _NSRange range, NSString replacementString) { - final _ret = _lib._objc_msgSend_968( - _lib._class_NSTextCheckingResult1, - _lib._sel_quoteCheckingResultWithRange_replacementString_1, - range, - replacementString._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLCache, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static NSTextCheckingResult dashCheckingResultWithRange_replacementString_( - AVFAudio _lib, _NSRange range, NSString replacementString) { - final _ret = _lib._objc_msgSend_968( - _lib._class_NSTextCheckingResult1, - _lib._sel_dashCheckingResultWithRange_replacementString_1, - range, - replacementString._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLCache, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static NSTextCheckingResult - replacementCheckingResultWithRange_replacementString_( - AVFAudio _lib, _NSRange range, NSString replacementString) { - final _ret = _lib._objc_msgSend_968( - _lib._class_NSTextCheckingResult1, - _lib._sel_replacementCheckingResultWithRange_replacementString_1, - range, - replacementString._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLCache, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSURLCache, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLCache, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSURLCache = objc.getClass("NSURLCache"); +late final _sel_sharedURLCache = objc.registerName("sharedURLCache"); +final _objc_msgSend_520 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setSharedURLCache_ = objc.registerName("setSharedURLCache:"); +final _objc_msgSend_521 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithMemoryCapacity_diskCapacity_diskPath_ = + objc.registerName("initWithMemoryCapacity:diskCapacity:diskPath:"); +final _objc_msgSend_522 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); +late final _sel_initWithMemoryCapacity_diskCapacity_directoryURL_ = + objc.registerName("initWithMemoryCapacity:diskCapacity:directoryURL:"); +final _objc_msgSend_523 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); + +class NSCachedURLResponse extends objc.NSObject { + NSCachedURLResponse._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSCachedURLResponse] that points to the same underlying object as [other]. + NSCachedURLResponse.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSCachedURLResponse] that wraps the given raw object pointer. + NSCachedURLResponse.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSCachedURLResponse]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSCachedURLResponse); } - static NSTextCheckingResult - correctionCheckingResultWithRange_replacementString_( - AVFAudio _lib, _NSRange range, NSString replacementString) { - final _ret = _lib._objc_msgSend_968( - _lib._class_NSTextCheckingResult1, - _lib._sel_correctionCheckingResultWithRange_replacementString_1, - range, - replacementString._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + NSCachedURLResponse initWithResponse_data_( + NSURLResponse response, objc.NSData data) { + final _ret = _objc_msgSend_524(this.pointer, _sel_initWithResponse_data_, + response.pointer, data.pointer); + return NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } - static NSTextCheckingResult - correctionCheckingResultWithRange_replacementString_alternativeStrings_( - AVFAudio _lib, - _NSRange range, - NSString replacementString, - NSArray alternativeStrings) { - final _ret = _lib._objc_msgSend_969( - _lib._class_NSTextCheckingResult1, - _lib._sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_1, - range, - replacementString._id, - alternativeStrings._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + NSCachedURLResponse initWithResponse_data_userInfo_storagePolicy_( + NSURLResponse response, + objc.NSData data, + objc.NSDictionary? userInfo, + int storagePolicy) { + final _ret = _objc_msgSend_525( + this.pointer, + _sel_initWithResponse_data_userInfo_storagePolicy_, + response.pointer, + data.pointer, + userInfo?.pointer ?? ffi.nullptr, + storagePolicy); + return NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } - static NSTextCheckingResult - regularExpressionCheckingResultWithRanges_count_regularExpression_( - AVFAudio _lib, - ffi.Pointer<_NSRange> ranges, - int count, - NSRegularExpression regularExpression) { - final _ret = _lib._objc_msgSend_970( - _lib._class_NSTextCheckingResult1, - _lib._sel_regularExpressionCheckingResultWithRanges_count_regularExpression_1, - ranges, - count, - regularExpression._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + NSURLResponse get response { + final _ret = _objc_msgSend_526(this.pointer, _sel_response); + return NSURLResponse.castFromPointer(_ret, retain: true, release: true); } - static NSTextCheckingResult phoneNumberCheckingResultWithRange_phoneNumber_( - AVFAudio _lib, _NSRange range, NSString phoneNumber) { - final _ret = _lib._objc_msgSend_968( - _lib._class_NSTextCheckingResult1, - _lib._sel_phoneNumberCheckingResultWithRange_phoneNumber_1, - range, - phoneNumber._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + objc.NSData get data { + final _ret = _objc_msgSend_104(this.pointer, _sel_data); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - static NSTextCheckingResult - transitInformationCheckingResultWithRange_components_( - AVFAudio _lib, _NSRange range, NSDictionary components) { - final _ret = _lib._objc_msgSend_966( - _lib._class_NSTextCheckingResult1, - _lib._sel_transitInformationCheckingResultWithRange_components_1, - range, - components._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + objc.NSDictionary? get userInfo { + final _ret = _objc_msgSend_65(this.pointer, _sel_userInfo); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + int get storagePolicy { + return _objc_msgSend_527(this.pointer, _sel_storagePolicy); } @override - NSTextCheckingResult init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + NSCachedURLResponse init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } - static NSTextCheckingResult new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSTextCheckingResult1, _lib._sel_new1); - return NSTextCheckingResult._(_ret, _lib, retain: false, release: true); + static NSCachedURLResponse new1() { + final _ret = _objc_msgSend_40(_class_NSCachedURLResponse, _sel_new); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); } - static NSTextCheckingResult allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSTextCheckingResult1, _lib._sel_allocWithZone_1, zone); - return NSTextCheckingResult._(_ret, _lib, retain: false, release: true); + static NSCachedURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSCachedURLResponse, _sel_allocWithZone_, zone); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); } - static NSTextCheckingResult alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSTextCheckingResult1, _lib._sel_alloc1); - return NSTextCheckingResult._(_ret, _lib, retain: false, release: true); + static NSCachedURLResponse alloc() { + final _ret = _objc_msgSend_40(_class_NSCachedURLResponse, _sel_alloc); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSTextCheckingResult1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSCachedURLResponse, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSTextCheckingResult1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSCachedURLResponse, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSTextCheckingResult1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSCachedURLResponse, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSTextCheckingResult1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSCachedURLResponse, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSTextCheckingResult1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSCachedURLResponse, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSTextCheckingResult1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSCachedURLResponse, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSTextCheckingResult1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSCachedURLResponse, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSCachedURLResponse, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSCachedURLResponse, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSCachedURLResponse = objc.getClass("NSCachedURLResponse"); +late final _sel_initWithResponse_data_ = + objc.registerName("initWithResponse:data:"); +final _objc_msgSend_524 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSTextCheckingResult1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSTextCheckingResult1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +abstract class NSURLCacheStoragePolicy { + static const int NSURLCacheStorageAllowed = 0; + static const int NSURLCacheStorageAllowedInMemoryOnly = 1; + static const int NSURLCacheStorageNotAllowed = 2; } -abstract class NSTextCheckingType { - static const int NSTextCheckingTypeOrthography = 1; - static const int NSTextCheckingTypeSpelling = 2; - static const int NSTextCheckingTypeGrammar = 4; - static const int NSTextCheckingTypeDate = 8; - static const int NSTextCheckingTypeAddress = 16; - static const int NSTextCheckingTypeLink = 32; - static const int NSTextCheckingTypeQuote = 64; - static const int NSTextCheckingTypeDash = 128; - static const int NSTextCheckingTypeReplacement = 256; - static const int NSTextCheckingTypeCorrection = 512; - static const int NSTextCheckingTypeRegularExpression = 1024; - static const int NSTextCheckingTypePhoneNumber = 2048; - static const int NSTextCheckingTypeTransitInformation = 4096; -} +late final _sel_initWithResponse_data_userInfo_storagePolicy_ = + objc.registerName("initWithResponse:data:userInfo:storagePolicy:"); +final _objc_msgSend_525 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +final _objc_msgSend_526 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_storagePolicy = objc.registerName("storagePolicy"); +final _objc_msgSend_527 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_cachedResponseForRequest_ = + objc.registerName("cachedResponseForRequest:"); +final _objc_msgSend_528 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_storeCachedResponse_forRequest_ = + objc.registerName("storeCachedResponse:forRequest:"); +final _objc_msgSend_529 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeCachedResponseForRequest_ = + objc.registerName("removeCachedResponseForRequest:"); +final _objc_msgSend_530 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_removeAllCachedResponses = + objc.registerName("removeAllCachedResponses"); +late final _sel_removeCachedResponsesSinceDate_ = + objc.registerName("removeCachedResponsesSinceDate:"); +late final _sel_memoryCapacity = objc.registerName("memoryCapacity"); +late final _sel_setMemoryCapacity_ = objc.registerName("setMemoryCapacity:"); +late final _sel_diskCapacity = objc.registerName("diskCapacity"); +late final _sel_setDiskCapacity_ = objc.registerName("setDiskCapacity:"); +late final _sel_currentMemoryUsage = objc.registerName("currentMemoryUsage"); +late final _sel_currentDiskUsage = objc.registerName("currentDiskUsage"); + +class NSURLSessionDataTask extends NSURLSessionTask { + NSURLSessionDataTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLSessionDataTask] that points to the same underlying object as [other]. + NSURLSessionDataTask.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); -class NSRegularExpression extends NSObject { - NSRegularExpression._(ffi.Pointer id, AVFAudio lib, + /// Constructs a [NSURLSessionDataTask] that wraps the given raw object pointer. + NSURLSessionDataTask.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLSessionDataTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionDataTask); + } - /// Returns a [NSRegularExpression] that points to the same underlying object as [other]. - static NSRegularExpression castFrom(T other) { - return NSRegularExpression._(other._id, other._lib, + @override + NSURLSessionDataTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionDataTask.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSRegularExpression] that wraps the given raw object pointer. - static NSRegularExpression castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSRegularExpression._(other, lib, retain: retain, release: release); + static NSURLSessionDataTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionDataTask, _sel_new); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: false, release: true); } - /// Returns whether [obj] is an instance of [NSRegularExpression]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSRegularExpression1); + static NSURLSessionDataTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionDataTask, _sel_allocWithZone_, zone); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: false, release: true); } - static NSRegularExpression? regularExpressionWithPattern_options_error_( - AVFAudio _lib, - NSString pattern, - int options, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_948( - _lib._class_NSRegularExpression1, - _lib._sel_regularExpressionWithPattern_options_error_1, - pattern._id, - options, - error); - return _ret.address == 0 - ? null - : NSRegularExpression._(_ret, _lib, retain: true, release: true); + static NSURLSessionDataTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionDataTask, _sel_alloc); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: false, release: true); } - NSRegularExpression? initWithPattern_options_error_(NSString pattern, - int options, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_949(_id, - _lib._sel_initWithPattern_options_error_1, pattern._id, options, error); - return _ret.address == 0 - ? null - : NSRegularExpression._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionDataTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSString get pattern { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_pattern1); - return NSString._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionDataTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - int get options { - return _lib._objc_msgSend_950(_id, _lib._sel_options1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLSessionDataTask, _sel_accessInstanceVariablesDirectly); } - int get numberOfCaptureGroups { - return _lib._objc_msgSend_10(_id, _lib._sel_numberOfCaptureGroups1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLSessionDataTask, _sel_useStoredAccessor); } - static NSString escapedPatternForString_(AVFAudio _lib, NSString string) { - final _ret = _lib._objc_msgSend_69(_lib._class_NSRegularExpression1, - _lib._sel_escapedPatternForString_1, string._id); - return NSString._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionDataTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - void enumerateMatchesInString_options_range_usingBlock_( - NSString string, - int options, - _NSRange range, - ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool block) { - _lib._objc_msgSend_951( - _id, - _lib._sel_enumerateMatchesInString_options_range_usingBlock_1, - string._id, - options, - range, - block._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionDataTask, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSArray matchesInString_options_range_( - NSString string, int options, _NSRange range) { - final _ret = _lib._objc_msgSend_952(_id, - _lib._sel_matchesInString_options_range_1, string._id, options, range); - return NSArray._(_ret, _lib, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionDataTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionDataTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionDataTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSURLSessionDataTask = objc.getClass("NSURLSessionDataTask"); +late final _sel_storeCachedResponse_forDataTask_ = + objc.registerName("storeCachedResponse:forDataTask:"); +final _objc_msgSend_531 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry[ + block.ref.target.address]!(arg0); + +class ObjCBlock_ffiVoid_NSCachedURLResponse extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSCachedURLResponse._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSCachedURLResponse castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSCachedURLResponse._(pointer, + retain: retain, release: release); } - int numberOfMatchesInString_options_range_( - NSString string, int options, _NSRange range) { - return _lib._objc_msgSend_953( - _id, - _lib._sel_numberOfMatchesInString_options_range_1, - string._id, - options, - range); + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSCachedURLResponse.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSCachedURLResponse.fromFunction( + void Function(NSCachedURLResponse?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(arg0, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSCachedURLResponse.listener(void Function(NSCachedURLResponse?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(arg0, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(NSCachedURLResponse? arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr); +} + +late final _sel_getCachedResponseForDataTask_completionHandler_ = + objc.registerName("getCachedResponseForDataTask:completionHandler:"); +final _objc_msgSend_532 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeCachedResponseForDataTask_ = + objc.registerName("removeCachedResponseForDataTask:"); +final _objc_msgSend_533 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class NSURLConnection extends objc.NSObject { + NSURLConnection._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLConnection] that points to the same underlying object as [other]. + NSURLConnection.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSURLConnection] that wraps the given raw object pointer. + NSURLConnection.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLConnection]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLConnection); } - NSTextCheckingResult? firstMatchInString_options_range_( - NSString string, int options, _NSRange range) { - final _ret = _lib._objc_msgSend_954( - _id, - _lib._sel_firstMatchInString_options_range_1, - string._id, - options, - range); + NSURLConnection? initWithRequest_delegate_startImmediately_( + NSURLRequest request, objc.NSObject? delegate, bool startImmediately) { + final _ret = _objc_msgSend_534( + this.pointer, + _sel_initWithRequest_delegate_startImmediately_, + request.pointer, + delegate?.pointer ?? ffi.nullptr, + startImmediately); return _ret.address == 0 ? null - : NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + : NSURLConnection.castFromPointer(_ret, retain: true, release: true); } - void rangeOfFirstMatchInString_options_range_(ffi.Pointer<_NSRange> stret, - NSString string, int options, _NSRange range) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_955_stret( - stret, - _id, - _lib._sel_rangeOfFirstMatchInString_options_range_1, - string._id, - options, - range) - : stret.ref = _lib._objc_msgSend_955( - _id, - _lib._sel_rangeOfFirstMatchInString_options_range_1, - string._id, - options, - range); + NSURLConnection? initWithRequest_delegate_( + NSURLRequest request, objc.NSObject? delegate) { + final _ret = _objc_msgSend_535(this.pointer, _sel_initWithRequest_delegate_, + request.pointer, delegate?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSURLConnection.castFromPointer(_ret, retain: true, release: true); } - NSString stringByReplacingMatchesInString_options_range_withTemplate_( - NSString string, int options, _NSRange range, NSString templ) { - final _ret = _lib._objc_msgSend_956( - _id, - _lib._sel_stringByReplacingMatchesInString_options_range_withTemplate_1, - string._id, - options, - range, - templ._id); - return NSString._(_ret, _lib, retain: true, release: true); + static NSURLConnection? connectionWithRequest_delegate_( + NSURLRequest request, objc.NSObject? delegate) { + final _ret = _objc_msgSend_536( + _class_NSURLConnection, + _sel_connectionWithRequest_delegate_, + request.pointer, + delegate?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSURLConnection.castFromPointer(_ret, retain: true, release: true); } - int replaceMatchesInString_options_range_withTemplate_( - NSMutableString string, int options, _NSRange range, NSString templ) { - return _lib._objc_msgSend_957( - _id, - _lib._sel_replaceMatchesInString_options_range_withTemplate_1, - string._id, - options, - range, - templ._id); + NSURLRequest get originalRequest { + final _ret = _objc_msgSend_537(this.pointer, _sel_originalRequest); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - NSString replacementStringForResult_inString_offset_template_( - NSTextCheckingResult result, - NSString string, - int offset, - NSString templ) { - final _ret = _lib._objc_msgSend_958( - _id, - _lib._sel_replacementStringForResult_inString_offset_template_1, - result._id, - string._id, - offset, - templ._id); - return NSString._(_ret, _lib, retain: true, release: true); + NSURLRequest get currentRequest { + final _ret = _objc_msgSend_537(this.pointer, _sel_currentRequest); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - static NSString escapedTemplateForString_(AVFAudio _lib, NSString string) { - final _ret = _lib._objc_msgSend_69(_lib._class_NSRegularExpression1, - _lib._sel_escapedTemplateForString_1, string._id); - return NSString._(_ret, _lib, retain: true, release: true); + void start() { + _objc_msgSend_82(this.pointer, _sel_start); } - @override - NSRegularExpression init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSRegularExpression._(_ret, _lib, retain: true, release: true); + void cancel() { + _objc_msgSend_82(this.pointer, _sel_cancel); } - static NSRegularExpression new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSRegularExpression1, _lib._sel_new1); - return NSRegularExpression._(_ret, _lib, retain: false, release: true); + void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_scheduleInRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); } - static NSRegularExpression allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSRegularExpression1, _lib._sel_allocWithZone_1, zone); - return NSRegularExpression._(_ret, _lib, retain: false, release: true); + void unscheduleFromRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_unscheduleFromRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); } - static NSRegularExpression alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSRegularExpression1, _lib._sel_alloc1); - return NSRegularExpression._(_ret, _lib, retain: false, release: true); + void setDelegateQueue_(NSOperationQueue? queue) { + _objc_msgSend_538( + this.pointer, _sel_setDelegateQueue_, queue?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSRegularExpression1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static bool canHandleRequest_(NSURLRequest request) { + return _objc_msgSend_539( + _class_NSURLConnection, _sel_canHandleRequest_, request.pointer); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSRegularExpression1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static objc.NSData? sendSynchronousRequest_returningResponse_error_( + NSURLRequest request, + ffi.Pointer> response, + ffi.Pointer> error) { + final _ret = _objc_msgSend_540( + _class_NSURLConnection, + _sel_sendSynchronousRequest_returningResponse_error_, + request.pointer, + response, + error); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSRegularExpression1, - _lib._sel_accessInstanceVariablesDirectly1); + static void sendAsynchronousRequest_queue_completionHandler_( + NSURLRequest request, + NSOperationQueue queue, + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError handler) { + _objc_msgSend_541( + _class_NSURLConnection, + _sel_sendAsynchronousRequest_queue_completionHandler_, + request.pointer, + queue.pointer, + handler.pointer); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSRegularExpression1, _lib._sel_useStoredAccessor1); + @override + NSURLConnection init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLConnection.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSRegularExpression1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static NSURLConnection new1() { + final _ret = _objc_msgSend_40(_class_NSURLConnection, _sel_new); + return NSURLConnection.castFromPointer(_ret, retain: false, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSRegularExpression1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static NSURLConnection allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLConnection, _sel_allocWithZone_, zone); + return NSURLConnection.castFromPointer(_ret, retain: false, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSRegularExpression1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static NSURLConnection alloc() { + final _ret = _objc_msgSend_40(_class_NSURLConnection, _sel_alloc); + return NSURLConnection.castFromPointer(_ret, retain: false, release: true); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSRegularExpression1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLConnection, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSRegularExpression1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLConnection, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } -} -abstract class NSRegularExpressionOptions { - static const int NSRegularExpressionCaseInsensitive = 1; - static const int NSRegularExpressionAllowCommentsAndWhitespace = 2; - static const int NSRegularExpressionIgnoreMetacharacters = 4; - static const int NSRegularExpressionDotMatchesLineSeparators = 8; - static const int NSRegularExpressionAnchorsMatchLines = 16; - static const int NSRegularExpressionUseUnixLineSeparators = 32; - static const int NSRegularExpressionUseUnicodeWordBoundaries = 64; -} + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLConnection, _sel_accessInstanceVariablesDirectly); + } -abstract class NSMatchingOptions { - static const int NSMatchingReportProgress = 1; - static const int NSMatchingReportCompletion = 2; - static const int NSMatchingAnchored = 4; - static const int NSMatchingWithTransparentBounds = 8; - static const int NSMatchingWithoutAnchoringBounds = 16; -} + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLConnection, _sel_useStoredAccessor); + } -void - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Int32 arg1, ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, int, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry = - , int, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistryIndex = - 0; + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLConnection, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLConnection, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLConnection, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLConnection, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLConnection, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSURLConnection = objc.getClass("NSURLConnection"); +late final _sel_initWithRequest_delegate_startImmediately_ = + objc.registerName("initWithRequest:delegate:startImmediately:"); +final _objc_msgSend_534 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_initWithRequest_delegate_ = + objc.registerName("initWithRequest:delegate:"); +final _objc_msgSend_535 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_connectionWithRequest_delegate_ = + objc.registerName("connectionWithRequest:delegate:"); +final _objc_msgSend_536 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +final _objc_msgSend_537 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_unscheduleFromRunLoop_forMode_ = + objc.registerName("unscheduleFromRunLoop:forMode:"); +late final _sel_setDelegateQueue_ = objc.registerName("setDelegateQueue:"); +final _objc_msgSend_538 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_canHandleRequest_ = objc.registerName("canHandleRequest:"); +final _objc_msgSend_539 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_sendSynchronousRequest_returningResponse_error_ = + objc.registerName("sendSynchronousRequest:returningResponse:error:"); +final _objc_msgSend_540 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); +void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistryIndex = 0; ffi.Pointer - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( - void Function(ffi.Pointer, int, ffi.Pointer) fn) { + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer) + fn) { final id = - ++_ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry[ - id] = fn; + ++_ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry[ +void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry[ block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool - extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); +class ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool - castFromPointer(AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool._( - pointer, lib, + static ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError._(pointer, retain: retain, release: release); } @@ -67196,25 +24647,24 @@ class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool.fromFunctionPointer( - AVFAudio lib, + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Int32 arg1, ffi.Pointer arg2)>> + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline) + .cast(), + ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. @@ -67222,24 +24672,21 @@ class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool.fromFunction( - AVFAudio lib, - void Function(NSTextCheckingResult?, int, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline) + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.fromFunction( + void Function(NSURLResponse?, objc.NSData?, objc.NSError?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline) .cast(), - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( - (ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSTextCheckingResult._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 ? null : NSURLResponse.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : objc.NSData.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -67251,926 +24698,1127 @@ class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool.listener( - AVFAudio lib, - void Function(NSTextCheckingResult?, int, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline) + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.listener( + void Function(NSURLResponse?, objc.NSData?, objc.NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline) ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( - (ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSTextCheckingResult._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : NSURLResponse.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : objc.NSData.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))))); static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Int32, ffi.Pointer)>? _dartFuncListenerTrampoline; + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; - void call(NSTextCheckingResult? arg0, int arg1, ffi.Pointer arg2) => - _id.ref.invoke + void call(NSURLResponse? arg0, objc.NSData? arg1, objc.NSError? arg2) => + pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Int32 arg1, - ffi.Pointer arg2)>>() + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer, int, ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1, arg2); -} - -abstract class NSMatchingFlags { - static const int NSMatchingProgress = 1; - static const int NSMatchingCompleted = 2; - static const int NSMatchingHitEnd = 4; - static const int NSMatchingRequiredEnd = 8; - static const int NSMatchingInternalError = 16; -} - -class NSURLCache extends NSObject { - NSURLCache._(ffi.Pointer id, AVFAudio lib, + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, + arg0?.pointer ?? ffi.nullptr, + arg1?.pointer ?? ffi.nullptr, + arg2?.pointer ?? ffi.nullptr); +} + +late final _sel_sendAsynchronousRequest_queue_completionHandler_ = + objc.registerName("sendAsynchronousRequest:queue:completionHandler:"); +final _objc_msgSend_541 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +class NSURLCredential extends objc.NSObject { + NSURLCredential._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLCache] that points to the same underlying object as [other]. - static NSURLCache castFrom(T other) { - return NSURLCache._(other._id, other._lib, retain: true, release: true); - } + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLCache] that wraps the given raw object pointer. - static NSURLCache castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLCache._(other, lib, retain: retain, release: release); - } + /// Constructs a [NSURLCredential] that points to the same underlying object as [other]. + NSURLCredential.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns whether [obj] is an instance of [NSURLCache]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLCache1); - } + /// Constructs a [NSURLCredential] that wraps the given raw object pointer. + NSURLCredential.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static NSURLCache getSharedURLCache(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_971( - _lib._class_NSURLCache1, _lib._sel_sharedURLCache1); - return NSURLCache._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSURLCredential]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLCredential); } - static void setSharedURLCache(AVFAudio _lib, NSURLCache value) { - return _lib._objc_msgSend_972( - _lib._class_NSURLCache1, _lib._sel_setSharedURLCache_1, value._id); + int get persistence { + return _objc_msgSend_542(this.pointer, _sel_persistence); } - NSURLCache initWithMemoryCapacity_diskCapacity_diskPath_( - int memoryCapacity, int diskCapacity, NSString? path) { - final _ret = _lib._objc_msgSend_973( - _id, - _lib._sel_initWithMemoryCapacity_diskCapacity_diskPath_1, - memoryCapacity, - diskCapacity, - path?._id ?? ffi.nullptr); - return NSURLCache._(_ret, _lib, retain: true, release: true); + NSURLCredential initWithUser_password_persistence_( + objc.NSString user, objc.NSString password, int persistence) { + final _ret = _objc_msgSend_543( + this.pointer, + _sel_initWithUser_password_persistence_, + user.pointer, + password.pointer, + persistence); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } - NSURLCache initWithMemoryCapacity_diskCapacity_directoryURL_( - int memoryCapacity, int diskCapacity, NSURL? directoryURL) { - final _ret = _lib._objc_msgSend_974( - _id, - _lib._sel_initWithMemoryCapacity_diskCapacity_directoryURL_1, - memoryCapacity, - diskCapacity, - directoryURL?._id ?? ffi.nullptr); - return NSURLCache._(_ret, _lib, retain: true, release: true); + static NSURLCredential credentialWithUser_password_persistence_( + objc.NSString user, objc.NSString password, int persistence) { + final _ret = _objc_msgSend_544( + _class_NSURLCredential, + _sel_credentialWithUser_password_persistence_, + user.pointer, + password.pointer, + persistence); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } - NSCachedURLResponse? cachedResponseForRequest_(NSURLRequest request) { - final _ret = _lib._objc_msgSend_979( - _id, _lib._sel_cachedResponseForRequest_1, request._id); + objc.NSString? get user { + final _ret = _objc_msgSend_13(this.pointer, _sel_user); return _ret.address == 0 ? null - : NSCachedURLResponse._(_ret, _lib, retain: true, release: true); - } - - void storeCachedResponse_forRequest_( - NSCachedURLResponse cachedResponse, NSURLRequest request) { - _lib._objc_msgSend_980(_id, _lib._sel_storeCachedResponse_forRequest_1, - cachedResponse._id, request._id); - } - - void removeCachedResponseForRequest_(NSURLRequest request) { - _lib._objc_msgSend_981( - _id, _lib._sel_removeCachedResponseForRequest_1, request._id); - } - - void removeAllCachedResponses() { - _lib._objc_msgSend_1(_id, _lib._sel_removeAllCachedResponses1); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void removeCachedResponsesSinceDate_(NSDate date) { - _lib._objc_msgSend_540( - _id, _lib._sel_removeCachedResponsesSinceDate_1, date._id); - } - - int get memoryCapacity { - return _lib._objc_msgSend_10(_id, _lib._sel_memoryCapacity1); - } - - set memoryCapacity(int value) { - return _lib._objc_msgSend_516(_id, _lib._sel_setMemoryCapacity_1, value); + objc.NSString? get password { + final _ret = _objc_msgSend_13(this.pointer, _sel_password); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int get diskCapacity { - return _lib._objc_msgSend_10(_id, _lib._sel_diskCapacity1); + bool get hasPassword { + return _objc_msgSend_7(this.pointer, _sel_hasPassword); } - set diskCapacity(int value) { - return _lib._objc_msgSend_516(_id, _lib._sel_setDiskCapacity_1, value); + NSURLCredential initWithIdentity_certificates_persistence_( + ffi.Pointer<__SecIdentity> identity, + objc.NSArray? certArray, + int persistence) { + final _ret = _objc_msgSend_545( + this.pointer, + _sel_initWithIdentity_certificates_persistence_, + identity, + certArray?.pointer ?? ffi.nullptr, + persistence); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } - int get currentMemoryUsage { - return _lib._objc_msgSend_10(_id, _lib._sel_currentMemoryUsage1); + static NSURLCredential credentialWithIdentity_certificates_persistence_( + ffi.Pointer<__SecIdentity> identity, + objc.NSArray? certArray, + int persistence) { + final _ret = _objc_msgSend_546( + _class_NSURLCredential, + _sel_credentialWithIdentity_certificates_persistence_, + identity, + certArray?.pointer ?? ffi.nullptr, + persistence); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } - int get currentDiskUsage { - return _lib._objc_msgSend_10(_id, _lib._sel_currentDiskUsage1); + ffi.Pointer<__SecIdentity> get identity { + return _objc_msgSend_547(this.pointer, _sel_identity); } - void storeCachedResponse_forDataTask_( - NSCachedURLResponse cachedResponse, NSURLSessionDataTask dataTask) { - _lib._objc_msgSend_982(_id, _lib._sel_storeCachedResponse_forDataTask_1, - cachedResponse._id, dataTask._id); + objc.NSArray get certificates { + final _ret = _objc_msgSend_6(this.pointer, _sel_certificates); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void getCachedResponseForDataTask_completionHandler_( - NSURLSessionDataTask dataTask, - ObjCBlock_ffiVoid_NSCachedURLResponse completionHandler) { - _lib._objc_msgSend_983( - _id, - _lib._sel_getCachedResponseForDataTask_completionHandler_1, - dataTask._id, - completionHandler._id); + NSURLCredential initWithTrust_(ffi.Pointer<__SecTrust> trust) { + final _ret = _objc_msgSend_548(this.pointer, _sel_initWithTrust_, trust); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } - void removeCachedResponseForDataTask_(NSURLSessionDataTask dataTask) { - _lib._objc_msgSend_984( - _id, _lib._sel_removeCachedResponseForDataTask_1, dataTask._id); + static NSURLCredential credentialForTrust_(ffi.Pointer<__SecTrust> trust) { + final _ret = _objc_msgSend_549( + _class_NSURLCredential, _sel_credentialForTrust_, trust); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } @override - NSURLCache init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLCache._(_ret, _lib, retain: true, release: true); + NSURLCredential init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } - static NSURLCache new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLCache1, _lib._sel_new1); - return NSURLCache._(_ret, _lib, retain: false, release: true); + static NSURLCredential new1() { + final _ret = _objc_msgSend_40(_class_NSURLCredential, _sel_new); + return NSURLCredential.castFromPointer(_ret, retain: false, release: true); } - static NSURLCache allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLCache1, _lib._sel_allocWithZone_1, zone); - return NSURLCache._(_ret, _lib, retain: false, release: true); + static NSURLCredential allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLCredential, _sel_allocWithZone_, zone); + return NSURLCredential.castFromPointer(_ret, retain: false, release: true); } - static NSURLCache alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLCache1, _lib._sel_alloc1); - return NSURLCache._(_ret, _lib, retain: false, release: true); + static NSURLCredential alloc() { + final _ret = _objc_msgSend_40(_class_NSURLCredential, _sel_alloc); + return NSURLCredential.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLCache1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLCredential, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLCache1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLCredential, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLCache1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLCredential, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLCache1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLCredential, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLCache1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLCredential, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLCache1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLCredential, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLCache1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLCredential, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSURLCache1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLCredential, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLCache1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLCredential, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -class NSCachedURLResponse extends NSObject { - NSCachedURLResponse._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSCachedURLResponse] that points to the same underlying object as [other]. - static NSCachedURLResponse castFrom(T other) { - return NSCachedURLResponse._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSCachedURLResponse] that wraps the given raw object pointer. - static NSCachedURLResponse castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCachedURLResponse._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSCachedURLResponse]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSCachedURLResponse1); - } - - NSCachedURLResponse initWithResponse_data_( - NSURLResponse response, NSData data) { - final _ret = _lib._objc_msgSend_975( - _id, _lib._sel_initWithResponse_data_1, response._id, data._id); - return NSCachedURLResponse._(_ret, _lib, retain: true, release: true); - } +late final _class_NSURLCredential = objc.getClass("NSURLCredential"); - NSCachedURLResponse initWithResponse_data_userInfo_storagePolicy_( - NSURLResponse response, - NSData data, - NSDictionary? userInfo, - int storagePolicy) { - final _ret = _lib._objc_msgSend_976( - _id, - _lib._sel_initWithResponse_data_userInfo_storagePolicy_1, - response._id, - data._id, - userInfo?._id ?? ffi.nullptr, - storagePolicy); - return NSCachedURLResponse._(_ret, _lib, retain: true, release: true); - } +abstract class NSURLCredentialPersistence { + static const int NSURLCredentialPersistenceNone = 0; + static const int NSURLCredentialPersistenceForSession = 1; + static const int NSURLCredentialPersistencePermanent = 2; + static const int NSURLCredentialPersistenceSynchronizable = 3; +} - NSURLResponse get response { - final _ret = _lib._objc_msgSend_977(_id, _lib._sel_response1); - return NSURLResponse._(_ret, _lib, retain: true, release: true); - } +late final _sel_persistence = objc.registerName("persistence"); +final _objc_msgSend_542 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithUser_password_persistence_ = + objc.registerName("initWithUser:password:persistence:"); +final _objc_msgSend_543 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_credentialWithUser_password_persistence_ = + objc.registerName("credentialWithUser:password:persistence:"); +final _objc_msgSend_544 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_user = objc.registerName("user"); +late final _sel_password = objc.registerName("password"); +late final _sel_hasPassword = objc.registerName("hasPassword"); - NSData get data { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_data1); - return NSData._(_ret, _lib, retain: true, release: true); - } +final class __SecIdentity extends ffi.Opaque {} - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_userInfo1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } +late final _sel_initWithIdentity_certificates_persistence_ = + objc.registerName("initWithIdentity:certificates:persistence:"); +final _objc_msgSend_545 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__SecIdentity>, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__SecIdentity>, + ffi.Pointer, + int)>(); +late final _sel_credentialWithIdentity_certificates_persistence_ = + objc.registerName("credentialWithIdentity:certificates:persistence:"); +final _objc_msgSend_546 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__SecIdentity>, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__SecIdentity>, + ffi.Pointer, + int)>(); +late final _sel_identity = objc.registerName("identity"); +final _objc_msgSend_547 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer<__SecIdentity> Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer<__SecIdentity> Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_certificates = objc.registerName("certificates"); - int get storagePolicy { - return _lib._objc_msgSend_978(_id, _lib._sel_storagePolicy1); - } +final class __SecTrust extends ffi.Opaque {} - @override - NSCachedURLResponse init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSCachedURLResponse._(_ret, _lib, retain: true, release: true); - } +late final _sel_initWithTrust_ = objc.registerName("initWithTrust:"); +final _objc_msgSend_548 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<__SecTrust>)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<__SecTrust>)>(); +late final _sel_credentialForTrust_ = objc.registerName("credentialForTrust:"); +final _objc_msgSend_549 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<__SecTrust>)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<__SecTrust>)>(); + +class NSURLProtectionSpace extends objc.NSObject { + NSURLProtectionSpace._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - static NSCachedURLResponse new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCachedURLResponse1, _lib._sel_new1); - return NSCachedURLResponse._(_ret, _lib, retain: false, release: true); - } + /// Constructs a [NSURLProtectionSpace] that points to the same underlying object as [other]. + NSURLProtectionSpace.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - static NSCachedURLResponse allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSCachedURLResponse1, _lib._sel_allocWithZone_1, zone); - return NSCachedURLResponse._(_ret, _lib, retain: false, release: true); - } + /// Constructs a [NSURLProtectionSpace] that wraps the given raw object pointer. + NSURLProtectionSpace.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static NSCachedURLResponse alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSCachedURLResponse1, _lib._sel_alloc1); - return NSCachedURLResponse._(_ret, _lib, retain: false, release: true); + /// Returns whether [obj] is an instance of [NSURLProtectionSpace]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLProtectionSpace); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSCachedURLResponse1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + NSURLProtectionSpace initWithHost_port_protocol_realm_authenticationMethod_( + objc.NSString host, + int port, + objc.NSString? protocol, + objc.NSString? realm, + objc.NSString? authenticationMethod) { + final _ret = _objc_msgSend_550( + this.pointer, + _sel_initWithHost_port_protocol_realm_authenticationMethod_, + host.pointer, + port, + protocol?.pointer ?? ffi.nullptr, + realm?.pointer ?? ffi.nullptr, + authenticationMethod?.pointer ?? ffi.nullptr); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSCachedURLResponse1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + NSURLProtectionSpace initWithProxyHost_port_type_realm_authenticationMethod_( + objc.NSString host, + int port, + objc.NSString? type, + objc.NSString? realm, + objc.NSString? authenticationMethod) { + final _ret = _objc_msgSend_550( + this.pointer, + _sel_initWithProxyHost_port_type_realm_authenticationMethod_, + host.pointer, + port, + type?.pointer ?? ffi.nullptr, + realm?.pointer ?? ffi.nullptr, + authenticationMethod?.pointer ?? ffi.nullptr); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSCachedURLResponse1, - _lib._sel_accessInstanceVariablesDirectly1); + objc.NSString? get realm { + final _ret = _objc_msgSend_13(this.pointer, _sel_realm); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSCachedURLResponse1, _lib._sel_useStoredAccessor1); + bool get receivesCredentialSecurely { + return _objc_msgSend_7(this.pointer, _sel_receivesCredentialSecurely); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSCachedURLResponse1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + bool get isProxy { + return _objc_msgSend_7(this.pointer, _sel_isProxy); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSCachedURLResponse1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + objc.NSString get host { + final _ret = _objc_msgSend_12(this.pointer, _sel_host); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSCachedURLResponse1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + int get port { + return _objc_msgSend_114(this.pointer, _sel_port); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSCachedURLResponse1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSString? get proxyType { + final _ret = _objc_msgSend_13(this.pointer, _sel_proxyType); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSCachedURLResponse1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSString? get protocol { + final _ret = _objc_msgSend_13(this.pointer, _sel_protocol); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } -} - -abstract class NSURLCacheStoragePolicy { - static const int NSURLCacheStorageAllowed = 0; - static const int NSURLCacheStorageAllowedInMemoryOnly = 1; - static const int NSURLCacheStorageNotAllowed = 2; -} - -class NSURLSessionDataTask extends NSURLSessionTask { - NSURLSessionDataTask._(ffi.Pointer id, AVFAudio 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); + objc.NSString get authenticationMethod { + final _ret = _objc_msgSend_12(this.pointer, _sel_authenticationMethod); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSURLSessionDataTask] that wraps the given raw object pointer. - static NSURLSessionDataTask castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionDataTask._(other, lib, retain: retain, release: release); + objc.NSArray? get distinguishedNames { + final _ret = _objc_msgSend_69(this.pointer, _sel_distinguishedNames); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// 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); + ffi.Pointer<__SecTrust> get serverTrust { + return _objc_msgSend_551(this.pointer, _sel_serverTrust); } @override - NSURLSessionDataTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + NSURLProtectionSpace init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: true, release: true); } - static NSURLSessionDataTask new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionDataTask1, _lib._sel_new1); - return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); + static NSURLProtectionSpace new1() { + final _ret = _objc_msgSend_40(_class_NSURLProtectionSpace, _sel_new); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: false, release: true); } - static NSURLSessionDataTask allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLSessionDataTask1, _lib._sel_allocWithZone_1, zone); - return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); + static NSURLProtectionSpace allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLProtectionSpace, _sel_allocWithZone_, zone); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: false, release: true); } - static NSURLSessionDataTask alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionDataTask1, _lib._sel_alloc1); - return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); + static NSURLProtectionSpace alloc() { + final _ret = _objc_msgSend_40(_class_NSURLProtectionSpace, _sel_alloc); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLSessionDataTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLProtectionSpace, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLSessionDataTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLSessionDataTask1, - _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLSessionDataTask1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLSessionDataTask1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLSessionDataTask1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLSessionDataTask1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSURLSessionDataTask1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionDataTask1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -void _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry[ - block.ref.target.address]!(arg0); - -class ObjCBlock_ffiVoid_NSCachedURLResponse extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSCachedURLResponse._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSCachedURLResponse castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSCachedURLResponse._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSCachedURLResponse.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi - .NativeFunction arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSCachedURLResponse.fromFunction( - AVFAudio lib, void Function(NSCachedURLResponse?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSCachedURLResponse._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSCachedURLResponse.listener( - AVFAudio lib, void Function(NSCachedURLResponse?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( - (ffi.Pointer arg0) => fn( - arg0.address == 0 ? null : NSCachedURLResponse._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; + anArgument?.pointer ?? ffi.nullptr); + } - void call(NSCachedURLResponse? arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); -} + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLProtectionSpace, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } -class NSURLConnection extends NSObject { - NSURLConnection._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLProtectionSpace, _sel_accessInstanceVariablesDirectly); + } - /// Returns a [NSURLConnection] that points to the same underlying object as [other]. - static NSURLConnection castFrom(T other) { - return NSURLConnection._(other._id, other._lib, - retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLProtectionSpace, _sel_useStoredAccessor); } - /// Returns a [NSURLConnection] that wraps the given raw object pointer. - static NSURLConnection castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLConnection._(other, lib, retain: retain, release: release); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLProtectionSpace, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSURLConnection]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLConnection1); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLProtectionSpace, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSURLConnection? initWithRequest_delegate_startImmediately_( - NSURLRequest request, NSObject? delegate, bool startImmediately) { - final _ret = _lib._objc_msgSend_985( - _id, - _lib._sel_initWithRequest_delegate_startImmediately_1, - request._id, - delegate?._id ?? ffi.nullptr, - startImmediately); - return _ret.address == 0 - ? null - : NSURLConnection._(_ret, _lib, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLProtectionSpace, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLProtectionSpace, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLProtectionSpace, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSURLProtectionSpace = objc.getClass("NSURLProtectionSpace"); +late final _sel_initWithHost_port_protocol_realm_authenticationMethod_ = + objc.registerName("initWithHost:port:protocol:realm:authenticationMethod:"); +final _objc_msgSend_550 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithProxyHost_port_type_realm_authenticationMethod_ = objc + .registerName("initWithProxyHost:port:type:realm:authenticationMethod:"); +late final _sel_realm = objc.registerName("realm"); +late final _sel_receivesCredentialSecurely = + objc.registerName("receivesCredentialSecurely"); +late final _sel_isProxy = objc.registerName("isProxy"); +late final _sel_host = objc.registerName("host"); +late final _sel_proxyType = objc.registerName("proxyType"); +late final _sel_protocol = objc.registerName("protocol"); +late final _sel_authenticationMethod = + objc.registerName("authenticationMethod"); +late final _sel_distinguishedNames = objc.registerName("distinguishedNames"); +late final _sel_serverTrust = objc.registerName("serverTrust"); +final _objc_msgSend_551 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer<__SecTrust> Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer<__SecTrust> Function( + ffi.Pointer, ffi.Pointer)>(); + +class NSURLCredentialStorage extends objc.NSObject { + NSURLCredentialStorage._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLCredentialStorage] that points to the same underlying object as [other]. + NSURLCredentialStorage.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSURLCredentialStorage] that wraps the given raw object pointer. + NSURLCredentialStorage.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLCredentialStorage]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLCredentialStorage); } - NSURLConnection? initWithRequest_delegate_( - NSURLRequest request, NSObject? delegate) { - final _ret = _lib._objc_msgSend_986( - _id, - _lib._sel_initWithRequest_delegate_1, - request._id, - delegate?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURLConnection._(_ret, _lib, retain: true, release: true); + static NSURLCredentialStorage getSharedCredentialStorage() { + final _ret = _objc_msgSend_552( + _class_NSURLCredentialStorage, _sel_sharedCredentialStorage); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: true, release: true); } - static NSURLConnection? connectionWithRequest_delegate_( - AVFAudio _lib, NSURLRequest request, NSObject? delegate) { - final _ret = _lib._objc_msgSend_987( - _lib._class_NSURLConnection1, - _lib._sel_connectionWithRequest_delegate_1, - request._id, - delegate?._id ?? ffi.nullptr); + objc.NSDictionary? credentialsForProtectionSpace_( + NSURLProtectionSpace space) { + final _ret = _objc_msgSend_553( + this.pointer, _sel_credentialsForProtectionSpace_, space.pointer); return _ret.address == 0 ? null - : NSURLConnection._(_ret, _lib, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSURLRequest get originalRequest { - final _ret = _lib._objc_msgSend_988(_id, _lib._sel_originalRequest1); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + objc.NSDictionary get allCredentials { + final _ret = _objc_msgSend_112(this.pointer, _sel_allCredentials); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSURLRequest get currentRequest { - final _ret = _lib._objc_msgSend_988(_id, _lib._sel_currentRequest1); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + void setCredential_forProtectionSpace_( + NSURLCredential credential, NSURLProtectionSpace space) { + _objc_msgSend_554(this.pointer, _sel_setCredential_forProtectionSpace_, + credential.pointer, space.pointer); } - void start() { - _lib._objc_msgSend_1(_id, _lib._sel_start1); + void removeCredential_forProtectionSpace_( + NSURLCredential credential, NSURLProtectionSpace space) { + _objc_msgSend_554(this.pointer, _sel_removeCredential_forProtectionSpace_, + credential.pointer, space.pointer); } - void cancel() { - _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + void removeCredential_forProtectionSpace_options_(NSURLCredential credential, + NSURLProtectionSpace space, objc.NSDictionary? options) { + _objc_msgSend_555( + this.pointer, + _sel_removeCredential_forProtectionSpace_options_, + credential.pointer, + space.pointer, + options?.pointer ?? ffi.nullptr); } - void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _lib._objc_msgSend_569( - _id, _lib._sel_scheduleInRunLoop_forMode_1, aRunLoop._id, mode._id); + NSURLCredential? defaultCredentialForProtectionSpace_( + NSURLProtectionSpace space) { + final _ret = _objc_msgSend_556( + this.pointer, _sel_defaultCredentialForProtectionSpace_, space.pointer); + return _ret.address == 0 + ? null + : NSURLCredential.castFromPointer(_ret, retain: true, release: true); } - void unscheduleFromRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _lib._objc_msgSend_569( - _id, _lib._sel_unscheduleFromRunLoop_forMode_1, aRunLoop._id, mode._id); + void setDefaultCredential_forProtectionSpace_( + NSURLCredential credential, NSURLProtectionSpace space) { + _objc_msgSend_554( + this.pointer, + _sel_setDefaultCredential_forProtectionSpace_, + credential.pointer, + space.pointer); } - void setDelegateQueue_(NSOperationQueue? queue) { - _lib._objc_msgSend_989( - _id, _lib._sel_setDelegateQueue_1, queue?._id ?? ffi.nullptr); + void getCredentialsForProtectionSpace_task_completionHandler_( + NSURLProtectionSpace protectionSpace, + NSURLSessionTask task, + ObjCBlock_ffiVoid_NSDictionary completionHandler) { + _objc_msgSend_557( + this.pointer, + _sel_getCredentialsForProtectionSpace_task_completionHandler_, + protectionSpace.pointer, + task.pointer, + completionHandler.pointer); } - static bool canHandleRequest_(AVFAudio _lib, NSURLRequest request) { - return _lib._objc_msgSend_990(_lib._class_NSURLConnection1, - _lib._sel_canHandleRequest_1, request._id); + void setCredential_forProtectionSpace_task_(NSURLCredential credential, + NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { + _objc_msgSend_558(this.pointer, _sel_setCredential_forProtectionSpace_task_, + credential.pointer, protectionSpace.pointer, task.pointer); } - static NSData? sendSynchronousRequest_returningResponse_error_( - AVFAudio _lib, - NSURLRequest request, - ffi.Pointer> response, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_991( - _lib._class_NSURLConnection1, - _lib._sel_sendSynchronousRequest_returningResponse_error_1, - request._id, - response, - error); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + void removeCredential_forProtectionSpace_options_task_( + NSURLCredential credential, + NSURLProtectionSpace protectionSpace, + objc.NSDictionary? options, + NSURLSessionTask task) { + _objc_msgSend_559( + this.pointer, + _sel_removeCredential_forProtectionSpace_options_task_, + credential.pointer, + protectionSpace.pointer, + options?.pointer ?? ffi.nullptr, + task.pointer); } - static void sendAsynchronousRequest_queue_completionHandler_( - AVFAudio _lib, - NSURLRequest request, - NSOperationQueue queue, - ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError handler) { - _lib._objc_msgSend_992( - _lib._class_NSURLConnection1, - _lib._sel_sendAsynchronousRequest_queue_completionHandler_1, - request._id, - queue._id, - handler._id); + void getDefaultCredentialForProtectionSpace_task_completionHandler_( + NSURLProtectionSpace space, + NSURLSessionTask task, + ObjCBlock_ffiVoid_NSURLCredential completionHandler) { + _objc_msgSend_560( + this.pointer, + _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_, + space.pointer, + task.pointer, + completionHandler.pointer); + } + + void setDefaultCredential_forProtectionSpace_task_(NSURLCredential credential, + NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { + _objc_msgSend_558( + this.pointer, + _sel_setDefaultCredential_forProtectionSpace_task_, + credential.pointer, + protectionSpace.pointer, + task.pointer); } @override - NSURLConnection init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLConnection._(_ret, _lib, retain: true, release: true); + NSURLCredentialStorage init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: true, release: true); } - static NSURLConnection new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLConnection1, _lib._sel_new1); - return NSURLConnection._(_ret, _lib, retain: false, release: true); + static NSURLCredentialStorage new1() { + final _ret = _objc_msgSend_40(_class_NSURLCredentialStorage, _sel_new); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: false, release: true); } - static NSURLConnection allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLConnection1, _lib._sel_allocWithZone_1, zone); - return NSURLConnection._(_ret, _lib, retain: false, release: true); + static NSURLCredentialStorage allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLCredentialStorage, _sel_allocWithZone_, zone); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: false, release: true); } - static NSURLConnection alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLConnection1, _lib._sel_alloc1); - return NSURLConnection._(_ret, _lib, retain: false, release: true); + static NSURLCredentialStorage alloc() { + final _ret = _objc_msgSend_40(_class_NSURLCredentialStorage, _sel_alloc); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLConnection1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLCredentialStorage, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLConnection1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLCredentialStorage, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLConnection1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLCredentialStorage, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLConnection1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSURLCredentialStorage, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLConnection1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLCredentialStorage, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLConnection1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLCredentialStorage, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLConnection1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLCredentialStorage, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLCredentialStorage, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLCredentialStorage, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSURLCredentialStorage = + objc.getClass("NSURLCredentialStorage"); +late final _sel_sharedCredentialStorage = + objc.registerName("sharedCredentialStorage"); +final _objc_msgSend_552 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_credentialsForProtectionSpace_ = + objc.registerName("credentialsForProtectionSpace:"); +final _objc_msgSend_553 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_allCredentials = objc.registerName("allCredentials"); +late final _sel_setCredential_forProtectionSpace_ = + objc.registerName("setCredential:forProtectionSpace:"); +final _objc_msgSend_554 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeCredential_forProtectionSpace_ = + objc.registerName("removeCredential:forProtectionSpace:"); +late final _sel_removeCredential_forProtectionSpace_options_ = + objc.registerName("removeCredential:forProtectionSpace:options:"); +final _objc_msgSend_555 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_defaultCredentialForProtectionSpace_ = + objc.registerName("defaultCredentialForProtectionSpace:"); +final _objc_msgSend_556 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDefaultCredential_forProtectionSpace_ = + objc.registerName("setDefaultCredential:forProtectionSpace:"); +void _ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSDictionary_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSDictionary_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSDictionary_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSDictionary_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSURLConnection1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSDictionary_closureRegistry[block.ref.target.address]!( + arg0); + +class ObjCBlock_ffiVoid_NSDictionary extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSDictionary._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLConnection1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSDictionary castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSDictionary._(pointer, + retain: retain, release: release); } -} -void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSDictionary.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSDictionary.fromFunction(void Function(objc.NSDictionary?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSDictionary.castFromPointer(arg0, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSDictionary.listener(void Function(objc.NSDictionary?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSDictionary.castFromPointer(arg0, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(objc.NSDictionary? arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr); +} + +late final _sel_getCredentialsForProtectionSpace_task_completionHandler_ = objc + .registerName("getCredentialsForProtectionSpace:task:completionHandler:"); +final _objc_msgSend_557 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_setCredential_forProtectionSpace_task_ = + objc.registerName("setCredential:forProtectionSpace:task:"); +final _objc_msgSend_558 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeCredential_forProtectionSpace_options_task_ = + objc.registerName("removeCredential:forProtectionSpace:options:task:"); +final _objc_msgSend_559 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSURLCredential_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry[id] = fn; + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSURLCredential_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSURLCredential_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); +void _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry[ + block.ref.target.address]!(arg0); -class ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, +class ObjCBlock_ffiVoid_NSURLCredential extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSURLCredential._(ffi.Pointer pointer, {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError._(pointer, lib, + static ObjCBlock_ffiVoid_NSURLCredential castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSURLCredential._(pointer, retain: retain, release: release); } @@ -68179,27 +25827,18 @@ class ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.fromFunctionPointer( - AVFAudio lib, + ObjCBlock_ffiVoid_NSURLCredential.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> + ffi.Void Function(ffi.Pointer arg0)>> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLCredential_fnPtrTrampoline) + .cast(), + ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. @@ -68207,24 +25846,18 @@ class ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.fromFunction( - AVFAudio lib, void Function(NSURLResponse?, NSData?, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : NSURLResponse._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSData._(arg1, lib, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), - lib); + ObjCBlock_ffiVoid_NSURLCredential.fromFunction( + void Function(NSURLCredential?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSURLCredential.castFromPointer(arg0, retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -68236,2989 +25869,4914 @@ class ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.listener( - AVFAudio lib, void Function(NSURLResponse?, NSData?, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : NSURLResponse._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSData._(arg1, lib, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), - lib); + ObjCBlock_ffiVoid_NSURLCredential.listener(void Function(NSURLCredential?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSURLCredential.castFromPointer(arg0, retain: true, release: true))))); static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; - void call(NSURLResponse? arg0, NSData? arg1, NSError? arg2) => _id.ref.invoke + void call(NSURLCredential? arg0) => pointer.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 block, + ffi.Pointer arg0)>>() .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>()( - _id, - arg0?._id ?? ffi.nullptr, - arg1?._id ?? ffi.nullptr, - arg2?._id ?? ffi.nullptr); -} + void Function( + ffi.Pointer, ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr); +} + +late final _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_ = + objc.registerName( + "getDefaultCredentialForProtectionSpace:task:completionHandler:"); +final _objc_msgSend_560 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_setDefaultCredential_forProtectionSpace_task_ = + objc.registerName("setDefaultCredential:forProtectionSpace:task:"); + +class NSURLProtocol extends objc.NSObject { + NSURLProtocol._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); -class NSURLCredential extends NSObject { - NSURLCredential._(ffi.Pointer id, AVFAudio lib, + /// Constructs a [NSURLProtocol] that points to the same underlying object as [other]. + NSURLProtocol.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSURLProtocol] that wraps the given raw object pointer. + NSURLProtocol.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : this._(other, retain: retain, release: release); - /// Returns a [NSURLCredential] that points to the same underlying object as [other]. - static NSURLCredential castFrom(T other) { - return NSURLCredential._(other._id, other._lib, - retain: true, release: true); + /// Returns whether [obj] is an instance of [NSURLProtocol]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLProtocol); } - /// Returns a [NSURLCredential] that wraps the given raw object pointer. - static NSURLCredential castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLCredential._(other, lib, retain: retain, release: release); + NSURLProtocol initWithRequest_cachedResponse_client_(NSURLRequest request, + NSCachedURLResponse? cachedResponse, objc.NSObject? client) { + final _ret = _objc_msgSend_561( + this.pointer, + _sel_initWithRequest_cachedResponse_client_, + request.pointer, + cachedResponse?.pointer ?? ffi.nullptr, + client?.pointer ?? ffi.nullptr); + return NSURLProtocol.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSURLCredential]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLCredential1); + objc.NSObject? get client { + final _ret = _objc_msgSend_66(this.pointer, _sel_client); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get persistence { - return _lib._objc_msgSend_993(_id, _lib._sel_persistence1); + NSURLRequest get request { + final _ret = _objc_msgSend_537(this.pointer, _sel_request); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - NSURLCredential initWithUser_password_persistence_( - NSString user, NSString password, int persistence) { - final _ret = _lib._objc_msgSend_994( - _id, - _lib._sel_initWithUser_password_persistence_1, - user._id, - password._id, - persistence); - return NSURLCredential._(_ret, _lib, retain: true, release: true); + NSCachedURLResponse? get cachedResponse { + final _ret = _objc_msgSend_562(this.pointer, _sel_cachedResponse); + return _ret.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } - static NSURLCredential credentialWithUser_password_persistence_( - AVFAudio _lib, NSString user, NSString password, int persistence) { - final _ret = _lib._objc_msgSend_995( - _lib._class_NSURLCredential1, - _lib._sel_credentialWithUser_password_persistence_1, - user._id, - password._id, - persistence); - return NSURLCredential._(_ret, _lib, retain: true, release: true); + static bool canInitWithRequest_(NSURLRequest request) { + return _objc_msgSend_539( + _class_NSURLProtocol, _sel_canInitWithRequest_, request.pointer); + } + + static NSURLRequest canonicalRequestForRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_563(_class_NSURLProtocol, + _sel_canonicalRequestForRequest_, request.pointer); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); + } + + static bool requestIsCacheEquivalent_toRequest_( + NSURLRequest a, NSURLRequest b) { + return _objc_msgSend_564(_class_NSURLProtocol, + _sel_requestIsCacheEquivalent_toRequest_, a.pointer, b.pointer); + } + + void startLoading() { + _objc_msgSend_82(this.pointer, _sel_startLoading); } - NSString? get user { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_user1); + void stopLoading() { + _objc_msgSend_82(this.pointer, _sel_stopLoading); + } + + static objc.NSObject? propertyForKey_inRequest_( + objc.NSString key, NSURLRequest request) { + final _ret = _objc_msgSend_565(_class_NSURLProtocol, + _sel_propertyForKey_inRequest_, key.pointer, request.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static void setProperty_forKey_inRequest_( + objc.NSObject value, objc.NSString key, NSMutableURLRequest request) { + _objc_msgSend_573(_class_NSURLProtocol, _sel_setProperty_forKey_inRequest_, + value.pointer, key.pointer, request.pointer); + } + + static void removePropertyForKey_inRequest_( + objc.NSString key, NSMutableURLRequest request) { + _objc_msgSend_574(_class_NSURLProtocol, + _sel_removePropertyForKey_inRequest_, key.pointer, request.pointer); + } + + static bool registerClass_(objc.NSObject protocolClass) { + return _objc_msgSend_0( + _class_NSURLProtocol, _sel_registerClass_, protocolClass.pointer); + } + + static void unregisterClass_(objc.NSObject protocolClass) { + _objc_msgSend_49( + _class_NSURLProtocol, _sel_unregisterClass_, protocolClass.pointer); } - NSString? get password { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_password1); + static bool canInitWithTask_(NSURLSessionTask task) { + return _objc_msgSend_575( + _class_NSURLProtocol, _sel_canInitWithTask_, task.pointer); + } + + NSURLProtocol initWithTask_cachedResponse_client_(NSURLSessionTask task, + NSCachedURLResponse? cachedResponse, objc.NSObject? client) { + final _ret = _objc_msgSend_576( + this.pointer, + _sel_initWithTask_cachedResponse_client_, + task.pointer, + cachedResponse?.pointer ?? ffi.nullptr, + client?.pointer ?? ffi.nullptr); + return NSURLProtocol.castFromPointer(_ret, retain: true, release: true); + } + + NSURLSessionTask? get task { + final _ret = _objc_msgSend_577(this.pointer, _sel_task); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSURLSessionTask.castFromPointer(_ret, retain: true, release: true); } - bool get hasPassword { - return _lib._objc_msgSend_12(_id, _lib._sel_hasPassword1); + @override + NSURLProtocol init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLProtocol.castFromPointer(_ret, retain: true, release: true); } - NSURLCredential initWithIdentity_certificates_persistence_( - ffi.Pointer<__SecIdentity> identity, - NSArray? certArray, - int persistence) { - final _ret = _lib._objc_msgSend_996( - _id, - _lib._sel_initWithIdentity_certificates_persistence_1, - identity, - certArray?._id ?? ffi.nullptr, - persistence); - return NSURLCredential._(_ret, _lib, retain: true, release: true); + static NSURLProtocol new1() { + final _ret = _objc_msgSend_40(_class_NSURLProtocol, _sel_new); + return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); + } + + static NSURLProtocol allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLProtocol, _sel_allocWithZone_, zone); + return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); + } + + static NSURLProtocol alloc() { + final _ret = _objc_msgSend_40(_class_NSURLProtocol, _sel_alloc); + return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLProtocol, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLProtocol, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLProtocol, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLProtocol, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLProtocol, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLProtocol, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static NSURLCredential credentialWithIdentity_certificates_persistence_( - AVFAudio _lib, - ffi.Pointer<__SecIdentity> identity, - NSArray? certArray, - int persistence) { - final _ret = _lib._objc_msgSend_997( - _lib._class_NSURLCredential1, - _lib._sel_credentialWithIdentity_certificates_persistence_1, - identity, - certArray?._id ?? ffi.nullptr, - persistence); - return NSURLCredential._(_ret, _lib, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLProtocol, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLProtocol, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLProtocol, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSURLProtocol = objc.getClass("NSURLProtocol"); +late final _sel_initWithRequest_cachedResponse_client_ = + objc.registerName("initWithRequest:cachedResponse:client:"); +final _objc_msgSend_561 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_client = objc.registerName("client"); +late final _sel_request = objc.registerName("request"); +late final _sel_cachedResponse = objc.registerName("cachedResponse"); +final _objc_msgSend_562 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_canInitWithRequest_ = objc.registerName("canInitWithRequest:"); +late final _sel_canonicalRequestForRequest_ = + objc.registerName("canonicalRequestForRequest:"); +final _objc_msgSend_563 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_requestIsCacheEquivalent_toRequest_ = + objc.registerName("requestIsCacheEquivalent:toRequest:"); +final _objc_msgSend_564 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_startLoading = objc.registerName("startLoading"); +late final _sel_stopLoading = objc.registerName("stopLoading"); +late final _sel_propertyForKey_inRequest_ = + objc.registerName("propertyForKey:inRequest:"); +final _objc_msgSend_565 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +class NSMutableURLRequest extends NSURLRequest { + NSMutableURLRequest._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSMutableURLRequest] that points to the same underlying object as [other]. + NSMutableURLRequest.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSMutableURLRequest] that wraps the given raw object pointer. + NSMutableURLRequest.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSMutableURLRequest]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMutableURLRequest); } - ffi.Pointer<__SecIdentity> get identity { - return _lib._objc_msgSend_998(_id, _lib._sel_identity1); + @override + objc.NSURL? get URL { + final _ret = _objc_msgSend_10(this.pointer, _sel_URL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSArray get certificates { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_certificates1); - return NSArray._(_ret, _lib, retain: true, release: true); + set URL(objc.NSURL? value) { + return _objc_msgSend_566( + this.pointer, _sel_setURL_, value?.pointer ?? ffi.nullptr); } - NSURLCredential initWithTrust_(ffi.Pointer<__SecTrust> trust) { - final _ret = _lib._objc_msgSend_999(_id, _lib._sel_initWithTrust_1, trust); - return NSURLCredential._(_ret, _lib, retain: true, release: true); + @override + int get cachePolicy { + return _objc_msgSend_322(this.pointer, _sel_cachePolicy); } - static NSURLCredential credentialForTrust_( - AVFAudio _lib, ffi.Pointer<__SecTrust> trust) { - final _ret = _lib._objc_msgSend_1000( - _lib._class_NSURLCredential1, _lib._sel_credentialForTrust_1, trust); - return NSURLCredential._(_ret, _lib, retain: true, release: true); + set cachePolicy(int value) { + return _objc_msgSend_567(this.pointer, _sel_setCachePolicy_, value); } @override - NSURLCredential init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLCredential._(_ret, _lib, retain: true, release: true); + double get timeoutInterval { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_timeoutInterval) + : _objc_msgSend_115(this.pointer, _sel_timeoutInterval); } - static NSURLCredential new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLCredential1, _lib._sel_new1); - return NSURLCredential._(_ret, _lib, retain: false, release: true); + set timeoutInterval(double value) { + return _objc_msgSend_212(this.pointer, _sel_setTimeoutInterval_, value); } - static NSURLCredential allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLCredential1, _lib._sel_allocWithZone_1, zone); - return NSURLCredential._(_ret, _lib, retain: false, release: true); + @override + objc.NSURL? get mainDocumentURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_mainDocumentURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - static NSURLCredential alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLCredential1, _lib._sel_alloc1); - return NSURLCredential._(_ret, _lib, retain: false, release: true); + set mainDocumentURL(objc.NSURL? value) { + return _objc_msgSend_566( + this.pointer, _sel_setMainDocumentURL_, value?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLCredential1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + @override + int get networkServiceType { + return _objc_msgSend_323(this.pointer, _sel_networkServiceType); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLCredential1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + set networkServiceType(int value) { + return _objc_msgSend_568(this.pointer, _sel_setNetworkServiceType_, value); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLCredential1, - _lib._sel_accessInstanceVariablesDirectly1); + @override + bool get allowsCellularAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsCellularAccess); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLCredential1, _lib._sel_useStoredAccessor1); + set allowsCellularAccess(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setAllowsCellularAccess_, value); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLCredential1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + @override + bool get allowsExpensiveNetworkAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsExpensiveNetworkAccess); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLCredential1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + set allowsExpensiveNetworkAccess(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLCredential1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + @override + bool get allowsConstrainedNetworkAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsConstrainedNetworkAccess); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSURLCredential1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + set allowsConstrainedNetworkAccess(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLCredential1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + @override + bool get assumesHTTP3Capable { + return _objc_msgSend_7(this.pointer, _sel_assumesHTTP3Capable); } -} - -abstract class NSURLCredentialPersistence { - static const int NSURLCredentialPersistenceNone = 0; - static const int NSURLCredentialPersistenceForSession = 1; - static const int NSURLCredentialPersistencePermanent = 2; - static const int NSURLCredentialPersistenceSynchronizable = 3; -} -final class __SecIdentity extends ffi.Opaque {} - -final class __SecTrust extends ffi.Opaque {} - -class NSURLProtectionSpace extends NSObject { - NSURLProtectionSpace._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLProtectionSpace] that points to the same underlying object as [other]. - static NSURLProtectionSpace castFrom(T other) { - return NSURLProtectionSpace._(other._id, other._lib, - retain: true, release: true); + set assumesHTTP3Capable(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setAssumesHTTP3Capable_, value); } - /// Returns a [NSURLProtectionSpace] that wraps the given raw object pointer. - static NSURLProtectionSpace castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLProtectionSpace._(other, lib, retain: retain, release: release); + @override + int get attribution { + return _objc_msgSend_324(this.pointer, _sel_attribution); } - /// Returns whether [obj] is an instance of [NSURLProtectionSpace]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLProtectionSpace1); + set attribution(int value) { + return _objc_msgSend_569(this.pointer, _sel_setAttribution_, value); } - NSURLProtectionSpace initWithHost_port_protocol_realm_authenticationMethod_( - NSString host, - int port, - NSString? protocol, - NSString? realm, - NSString? authenticationMethod) { - final _ret = _lib._objc_msgSend_1001( - _id, - _lib._sel_initWithHost_port_protocol_realm_authenticationMethod_1, - host._id, - port, - protocol?._id ?? ffi.nullptr, - realm?._id ?? ffi.nullptr, - authenticationMethod?._id ?? ffi.nullptr); - return NSURLProtectionSpace._(_ret, _lib, retain: true, release: true); + @override + bool get requiresDNSSECValidation { + return _objc_msgSend_7(this.pointer, _sel_requiresDNSSECValidation); } - NSURLProtectionSpace initWithProxyHost_port_type_realm_authenticationMethod_( - NSString host, - int port, - NSString? type, - NSString? realm, - NSString? authenticationMethod) { - final _ret = _lib._objc_msgSend_1001( - _id, - _lib._sel_initWithProxyHost_port_type_realm_authenticationMethod_1, - host._id, - port, - type?._id ?? ffi.nullptr, - realm?._id ?? ffi.nullptr, - authenticationMethod?._id ?? ffi.nullptr); - return NSURLProtectionSpace._(_ret, _lib, retain: true, release: true); + set requiresDNSSECValidation(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setRequiresDNSSECValidation_, value); } - NSString? get realm { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_realm1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + objc.NSString get HTTPMethod { + final _ret = _objc_msgSend_12(this.pointer, _sel_HTTPMethod); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool get receivesCredentialSecurely { - return _lib._objc_msgSend_12(_id, _lib._sel_receivesCredentialSecurely1); + set HTTPMethod(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setHTTPMethod_, value.pointer); } - bool get isProxy { - return _lib._objc_msgSend_12(_id, _lib._sel_isProxy1); + @override + objc.NSDictionary? get allHTTPHeaderFields { + final _ret = _objc_msgSend_65(this.pointer, _sel_allHTTPHeaderFields); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSString get host { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_host1); - return NSString._(_ret, _lib, retain: true, release: true); + set allHTTPHeaderFields(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setAllHTTPHeaderFields_, + value?.pointer ?? ffi.nullptr); } - int get port { - return _lib._objc_msgSend_83(_id, _lib._sel_port1); + void setValue_forHTTPHeaderField_(objc.NSString? value, objc.NSString field) { + _objc_msgSend_570(this.pointer, _sel_setValue_forHTTPHeaderField_, + value?.pointer ?? ffi.nullptr, field.pointer); } - NSString? get proxyType { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_proxyType1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + void addValue_forHTTPHeaderField_(objc.NSString value, objc.NSString field) { + _objc_msgSend_201(this.pointer, _sel_addValue_forHTTPHeaderField_, + value.pointer, field.pointer); } - NSString? get protocol { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_protocol1); + @override + objc.NSData? get HTTPBody { + final _ret = _objc_msgSend_325(this.pointer, _sel_HTTPBody); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - NSString get authenticationMethod { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_authenticationMethod1); - return NSString._(_ret, _lib, retain: true, release: true); + set HTTPBody(objc.NSData? value) { + return _objc_msgSend_571( + this.pointer, _sel_setHTTPBody_, value?.pointer ?? ffi.nullptr); } - NSArray? get distinguishedNames { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_distinguishedNames1); + @override + NSInputStream? get HTTPBodyStream { + final _ret = _objc_msgSend_342(this.pointer, _sel_HTTPBodyStream); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); + : NSInputStream.castFromPointer(_ret, retain: true, release: true); } - ffi.Pointer<__SecTrust> get serverTrust { - return _lib._objc_msgSend_1002(_id, _lib._sel_serverTrust1); + set HTTPBodyStream(NSInputStream? value) { + return _objc_msgSend_572( + this.pointer, _sel_setHTTPBodyStream_, value?.pointer ?? ffi.nullptr); } @override - NSURLProtectionSpace init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLProtectionSpace._(_ret, _lib, retain: true, release: true); + bool get HTTPShouldHandleCookies { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldHandleCookies); } - static NSURLProtectionSpace new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLProtectionSpace1, _lib._sel_new1); - return NSURLProtectionSpace._(_ret, _lib, retain: false, release: true); + set HTTPShouldHandleCookies(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setHTTPShouldHandleCookies_, value); } - static NSURLProtectionSpace allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLProtectionSpace1, _lib._sel_allocWithZone_1, zone); - return NSURLProtectionSpace._(_ret, _lib, retain: false, release: true); + @override + bool get HTTPShouldUsePipelining { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldUsePipelining); } - static NSURLProtectionSpace alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLProtectionSpace1, _lib._sel_alloc1); - return NSURLProtectionSpace._(_ret, _lib, retain: false, release: true); + set HTTPShouldUsePipelining(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setHTTPShouldUsePipelining_, value); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLProtectionSpace1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static NSMutableURLRequest requestWithURL_(objc.NSURL URL) { + final _ret = _objc_msgSend_320( + _class_NSMutableURLRequest, _sel_requestWithURL_, URL.pointer); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLProtectionSpace1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static bool getSupportsSecureCoding() { + return _objc_msgSend_7( + _class_NSMutableURLRequest, _sel_supportsSecureCoding); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLProtectionSpace1, - _lib._sel_accessInstanceVariablesDirectly1); + static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( + objc.NSURL URL, int cachePolicy, double timeoutInterval) { + final _ret = _objc_msgSend_321( + _class_NSMutableURLRequest, + _sel_requestWithURL_cachePolicy_timeoutInterval_, + URL.pointer, + cachePolicy, + timeoutInterval); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLProtectionSpace1, _lib._sel_useStoredAccessor1); + @override + NSMutableURLRequest initWithURL_(objc.NSURL URL) { + final _ret = + _objc_msgSend_320(this.pointer, _sel_initWithURL_, URL.pointer); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLProtectionSpace1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + @override + NSMutableURLRequest initWithURL_cachePolicy_timeoutInterval_( + objc.NSURL URL, int cachePolicy, double timeoutInterval) { + final _ret = _objc_msgSend_321( + this.pointer, + _sel_initWithURL_cachePolicy_timeoutInterval_, + URL.pointer, + cachePolicy, + timeoutInterval); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLProtectionSpace1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + @override + NSMutableURLRequest init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLProtectionSpace1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static NSMutableURLRequest new1() { + final _ret = _objc_msgSend_40(_class_NSMutableURLRequest, _sel_new); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSURLProtectionSpace1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSMutableURLRequest allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSMutableURLRequest, _sel_allocWithZone_, zone); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLProtectionSpace1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSMutableURLRequest alloc() { + final _ret = _objc_msgSend_40(_class_NSMutableURLRequest, _sel_alloc); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); } -} -class NSURLCredentialStorage extends NSObject { - NSURLCredentialStorage._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLCredentialStorage] that points to the same underlying object as [other]. - static NSURLCredentialStorage castFrom(T other) { - return NSURLCredentialStorage._(other._id, other._lib, - retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSMutableURLRequest, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - /// Returns a [NSURLCredentialStorage] that wraps the given raw object pointer. - static NSURLCredentialStorage castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLCredentialStorage._(other, lib, - retain: retain, release: release); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSMutableURLRequest, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - /// Returns whether [obj] is an instance of [NSURLCredentialStorage]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLCredentialStorage1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSMutableURLRequest, _sel_accessInstanceVariablesDirectly); } - static NSURLCredentialStorage getSharedCredentialStorage(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_1003(_lib._class_NSURLCredentialStorage1, - _lib._sel_sharedCredentialStorage1); - return NSURLCredentialStorage._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSMutableURLRequest, _sel_useStoredAccessor); } - NSDictionary? credentialsForProtectionSpace_(NSURLProtectionSpace space) { - final _ret = _lib._objc_msgSend_1004( - _id, _lib._sel_credentialsForProtectionSpace_1, space._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSMutableURLRequest, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSDictionary get allCredentials { - final _ret = _lib._objc_msgSend_181(_id, _lib._sel_allCredentials1); - return NSDictionary._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSMutableURLRequest, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - void setCredential_forProtectionSpace_( - NSURLCredential credential, NSURLProtectionSpace space) { - _lib._objc_msgSend_1005(_id, _lib._sel_setCredential_forProtectionSpace_1, - credential._id, space._id); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSMutableURLRequest, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSMutableURLRequest, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSMutableURLRequest, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSMutableURLRequest = objc.getClass("NSMutableURLRequest"); +late final _sel_setURL_ = objc.registerName("setURL:"); +final _objc_msgSend_566 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCachePolicy_ = objc.registerName("setCachePolicy:"); +final _objc_msgSend_567 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setTimeoutInterval_ = objc.registerName("setTimeoutInterval:"); +late final _sel_setMainDocumentURL_ = objc.registerName("setMainDocumentURL:"); +late final _sel_setNetworkServiceType_ = + objc.registerName("setNetworkServiceType:"); +final _objc_msgSend_568 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setAllowsCellularAccess_ = + objc.registerName("setAllowsCellularAccess:"); +late final _sel_setAllowsExpensiveNetworkAccess_ = + objc.registerName("setAllowsExpensiveNetworkAccess:"); +late final _sel_setAllowsConstrainedNetworkAccess_ = + objc.registerName("setAllowsConstrainedNetworkAccess:"); +late final _sel_setAssumesHTTP3Capable_ = + objc.registerName("setAssumesHTTP3Capable:"); +late final _sel_setAttribution_ = objc.registerName("setAttribution:"); +final _objc_msgSend_569 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setRequiresDNSSECValidation_ = + objc.registerName("setRequiresDNSSECValidation:"); +late final _sel_setHTTPMethod_ = objc.registerName("setHTTPMethod:"); +late final _sel_setAllHTTPHeaderFields_ = + objc.registerName("setAllHTTPHeaderFields:"); +late final _sel_setValue_forHTTPHeaderField_ = + objc.registerName("setValue:forHTTPHeaderField:"); +final _objc_msgSend_570 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_addValue_forHTTPHeaderField_ = + objc.registerName("addValue:forHTTPHeaderField:"); +late final _sel_setHTTPBody_ = objc.registerName("setHTTPBody:"); +final _objc_msgSend_571 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setHTTPBodyStream_ = objc.registerName("setHTTPBodyStream:"); +final _objc_msgSend_572 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setHTTPShouldHandleCookies_ = + objc.registerName("setHTTPShouldHandleCookies:"); +late final _sel_setHTTPShouldUsePipelining_ = + objc.registerName("setHTTPShouldUsePipelining:"); +late final _sel_setProperty_forKey_inRequest_ = + objc.registerName("setProperty:forKey:inRequest:"); +final _objc_msgSend_573 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removePropertyForKey_inRequest_ = + objc.registerName("removePropertyForKey:inRequest:"); +final _objc_msgSend_574 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_registerClass_ = objc.registerName("registerClass:"); +late final _sel_unregisterClass_ = objc.registerName("unregisterClass:"); +late final _sel_canInitWithTask_ = objc.registerName("canInitWithTask:"); +final _objc_msgSend_575 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithTask_cachedResponse_client_ = + objc.registerName("initWithTask:cachedResponse:client:"); +final _objc_msgSend_576 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_task = objc.registerName("task"); +final _objc_msgSend_577 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + +class NSXMLParser extends objc.NSObject { + NSXMLParser._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - void removeCredential_forProtectionSpace_( - NSURLCredential credential, NSURLProtectionSpace space) { - _lib._objc_msgSend_1005( - _id, - _lib._sel_removeCredential_forProtectionSpace_1, - credential._id, - space._id); - } + /// Constructs a [NSXMLParser] that points to the same underlying object as [other]. + NSXMLParser.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - void removeCredential_forProtectionSpace_options_(NSURLCredential credential, - NSURLProtectionSpace space, NSDictionary? options) { - _lib._objc_msgSend_1006( - _id, - _lib._sel_removeCredential_forProtectionSpace_options_1, - credential._id, - space._id, - options?._id ?? ffi.nullptr); + /// Constructs a [NSXMLParser] that wraps the given raw object pointer. + NSXMLParser.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSXMLParser]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSXMLParser); } - NSURLCredential? defaultCredentialForProtectionSpace_( - NSURLProtectionSpace space) { - final _ret = _lib._objc_msgSend_1007( - _id, _lib._sel_defaultCredentialForProtectionSpace_1, space._id); + NSXMLParser? initWithContentsOfURL_(objc.NSURL url) { + final _ret = + _objc_msgSend_3(this.pointer, _sel_initWithContentsOfURL_, url.pointer); return _ret.address == 0 ? null - : NSURLCredential._(_ret, _lib, retain: true, release: true); + : NSXMLParser.castFromPointer(_ret, retain: true, release: true); } - void setDefaultCredential_forProtectionSpace_( - NSURLCredential credential, NSURLProtectionSpace space) { - _lib._objc_msgSend_1005( - _id, - _lib._sel_setDefaultCredential_forProtectionSpace_1, - credential._id, - space._id); + NSXMLParser initWithData_(objc.NSData data) { + final _ret = + _objc_msgSend_340(this.pointer, _sel_initWithData_, data.pointer); + return NSXMLParser.castFromPointer(_ret, retain: true, release: true); } - void getCredentialsForProtectionSpace_task_completionHandler_( - NSURLProtectionSpace protectionSpace, - NSURLSessionTask task, - ObjCBlock_ffiVoid_NSDictionary completionHandler) { - _lib._objc_msgSend_1008( - _id, - _lib._sel_getCredentialsForProtectionSpace_task_completionHandler_1, - protectionSpace._id, - task._id, - completionHandler._id); + NSXMLParser initWithStream_(NSInputStream stream) { + final _ret = + _objc_msgSend_578(this.pointer, _sel_initWithStream_, stream.pointer); + return NSXMLParser.castFromPointer(_ret, retain: true, release: true); } - void setCredential_forProtectionSpace_task_(NSURLCredential credential, - NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { - _lib._objc_msgSend_1009( - _id, - _lib._sel_setCredential_forProtectionSpace_task_1, - credential._id, - protectionSpace._id, - task._id); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void removeCredential_forProtectionSpace_options_task_( - NSURLCredential credential, - NSURLProtectionSpace protectionSpace, - NSDictionary? options, - NSURLSessionTask task) { - _lib._objc_msgSend_1010( - _id, - _lib._sel_removeCredential_forProtectionSpace_options_task_1, - credential._id, - protectionSpace._id, - options?._id ?? ffi.nullptr, - task._id); + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } - void getDefaultCredentialForProtectionSpace_task_completionHandler_( - NSURLProtectionSpace space, - NSURLSessionTask task, - ObjCBlock_ffiVoid_NSURLCredential completionHandler) { - _lib._objc_msgSend_1011( - _id, - _lib._sel_getDefaultCredentialForProtectionSpace_task_completionHandler_1, - space._id, - task._id, - completionHandler._id); + bool get shouldProcessNamespaces { + return _objc_msgSend_7(this.pointer, _sel_shouldProcessNamespaces); } - void setDefaultCredential_forProtectionSpace_task_(NSURLCredential credential, - NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { - _lib._objc_msgSend_1009( - _id, - _lib._sel_setDefaultCredential_forProtectionSpace_task_1, - credential._id, - protectionSpace._id, - task._id); + set shouldProcessNamespaces(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setShouldProcessNamespaces_, value); } - @override - NSURLCredentialStorage init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLCredentialStorage._(_ret, _lib, retain: true, release: true); + bool get shouldReportNamespacePrefixes { + return _objc_msgSend_7(this.pointer, _sel_shouldReportNamespacePrefixes); } - static NSURLCredentialStorage new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLCredentialStorage1, _lib._sel_new1); - return NSURLCredentialStorage._(_ret, _lib, retain: false, release: true); + set shouldReportNamespacePrefixes(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setShouldReportNamespacePrefixes_, value); } - static NSURLCredentialStorage allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLCredentialStorage1, _lib._sel_allocWithZone_1, zone); - return NSURLCredentialStorage._(_ret, _lib, retain: false, release: true); + int get externalEntityResolvingPolicy { + return _objc_msgSend_579(this.pointer, _sel_externalEntityResolvingPolicy); } - static NSURLCredentialStorage alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLCredentialStorage1, _lib._sel_alloc1); - return NSURLCredentialStorage._(_ret, _lib, retain: false, release: true); + set externalEntityResolvingPolicy(int value) { + return _objc_msgSend_580( + this.pointer, _sel_setExternalEntityResolvingPolicy_, value); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLCredentialStorage1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + objc.NSSet? get allowedExternalEntityURLs { + final _ret = + _objc_msgSend_581(this.pointer, _sel_allowedExternalEntityURLs); + return _ret.address == 0 + ? null + : objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLCredentialStorage1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + set allowedExternalEntityURLs(objc.NSSet? value) { + return _objc_msgSend_582(this.pointer, _sel_setAllowedExternalEntityURLs_, + value?.pointer ?? ffi.nullptr); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLCredentialStorage1, - _lib._sel_accessInstanceVariablesDirectly1); + bool parse() { + return _objc_msgSend_7(this.pointer, _sel_parse); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLCredentialStorage1, _lib._sel_useStoredAccessor1); + void abortParsing() { + _objc_msgSend_82(this.pointer, _sel_abortParsing); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLCredentialStorage1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + objc.NSError? get parserError { + final _ret = _objc_msgSend_328(this.pointer, _sel_parserError); + return _ret.address == 0 + ? null + : objc.NSError.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLCredentialStorage1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + bool get shouldResolveExternalEntities { + return _objc_msgSend_7(this.pointer, _sel_shouldResolveExternalEntities); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLCredentialStorage1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + set shouldResolveExternalEntities(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setShouldResolveExternalEntities_, value); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSURLCredentialStorage1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSString? get publicID { + final _ret = _objc_msgSend_13(this.pointer, _sel_publicID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLCredentialStorage1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSString? get systemID { + final _ret = _objc_msgSend_13(this.pointer, _sel_systemID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } -} - -void _ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSDictionary_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSDictionary_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSDictionary_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSDictionary_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} -void _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSDictionary_closureRegistry[block.ref.target.address]!( - arg0); - -class ObjCBlock_ffiVoid_NSDictionary extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSDictionary._(ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSDictionary castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSDictionary._(pointer, lib, - retain: retain, release: release); + int get lineNumber { + return _objc_msgSend_114(this.pointer, _sel_lineNumber); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSDictionary.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi - .NativeFunction arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + int get columnNumber { + return _objc_msgSend_114(this.pointer, _sel_columnNumber); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSDictionary.fromFunction( - AVFAudio lib, void Function(NSDictionary?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSDictionary._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + @override + NSXMLParser init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLParser.castFromPointer(_ret, retain: true, release: true); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSDictionary.listener( - AVFAudio lib, void Function(NSDictionary?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSDictionary._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; + static NSXMLParser new1() { + final _ret = _objc_msgSend_40(_class_NSXMLParser, _sel_new); + return NSXMLParser.castFromPointer(_ret, retain: false, release: true); + } - void call(NSDictionary? arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); -} + static NSXMLParser allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSXMLParser, _sel_allocWithZone_, zone); + return NSXMLParser.castFromPointer(_ret, retain: false, release: true); + } -void _ObjCBlock_ffiVoid_NSURLCredential_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSURLCredential_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSURLCredential_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + static NSXMLParser alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLParser, _sel_alloc); + return NSXMLParser.castFromPointer(_ret, retain: false, release: true); + } -void _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry[ - block.ref.target.address]!(arg0); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLParser, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } -class ObjCBlock_ffiVoid_NSURLCredential extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSURLCredential._(ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLParser, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSURLCredential castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSURLCredential._(pointer, lib, - retain: retain, release: release); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSXMLParser, _sel_accessInstanceVariablesDirectly); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURLCredential.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi - .NativeFunction arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLCredential_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSXMLParser, _sel_useStoredAccessor); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURLCredential.fromFunction( - AVFAudio lib, void Function(NSURLCredential?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSURLCredential._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLParser, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSURLCredential.listener( - AVFAudio lib, void Function(NSURLCredential?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSURLCredential._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLParser, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } - void call(NSURLCredential? arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLParser, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSXMLParser, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSXMLParser, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSXMLParser = objc.getClass("NSXMLParser"); +late final _sel_initWithContentsOfURL_ = + objc.registerName("initWithContentsOfURL:"); +late final _sel_initWithStream_ = objc.registerName("initWithStream:"); +final _objc_msgSend_578 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_shouldProcessNamespaces = + objc.registerName("shouldProcessNamespaces"); +late final _sel_setShouldProcessNamespaces_ = + objc.registerName("setShouldProcessNamespaces:"); +late final _sel_shouldReportNamespacePrefixes = + objc.registerName("shouldReportNamespacePrefixes"); +late final _sel_setShouldReportNamespacePrefixes_ = + objc.registerName("setShouldReportNamespacePrefixes:"); + +abstract class NSXMLParserExternalEntityResolvingPolicy { + static const int NSXMLParserResolveExternalEntitiesNever = 0; + static const int NSXMLParserResolveExternalEntitiesNoNetwork = 1; + static const int NSXMLParserResolveExternalEntitiesSameOriginOnly = 2; + static const int NSXMLParserResolveExternalEntitiesAlways = 3; } -class NSURLProtocol extends NSObject { - NSURLProtocol._(ffi.Pointer id, AVFAudio lib, +late final _sel_externalEntityResolvingPolicy = + objc.registerName("externalEntityResolvingPolicy"); +final _objc_msgSend_579 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setExternalEntityResolvingPolicy_ = + objc.registerName("setExternalEntityResolvingPolicy:"); +final _objc_msgSend_580 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_allowedExternalEntityURLs = + objc.registerName("allowedExternalEntityURLs"); +final _objc_msgSend_581 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setAllowedExternalEntityURLs_ = + objc.registerName("setAllowedExternalEntityURLs:"); +final _objc_msgSend_582 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_parse = objc.registerName("parse"); +late final _sel_abortParsing = objc.registerName("abortParsing"); +late final _sel_parserError = objc.registerName("parserError"); +late final _sel_shouldResolveExternalEntities = + objc.registerName("shouldResolveExternalEntities"); +late final _sel_setShouldResolveExternalEntities_ = + objc.registerName("setShouldResolveExternalEntities:"); +late final _sel_publicID = objc.registerName("publicID"); +late final _sel_systemID = objc.registerName("systemID"); +late final _sel_lineNumber = objc.registerName("lineNumber"); +late final _sel_columnNumber = objc.registerName("columnNumber"); + +class NSFileWrapper extends objc.NSObject { + NSFileWrapper._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSFileWrapper] that points to the same underlying object as [other]. + NSFileWrapper.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSFileWrapper] that wraps the given raw object pointer. + NSFileWrapper.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : this._(other, retain: retain, release: release); - /// Returns a [NSURLProtocol] that points to the same underlying object as [other]. - static NSURLProtocol castFrom(T other) { - return NSURLProtocol._(other._id, other._lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSFileWrapper]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSFileWrapper); } - /// Returns a [NSURLProtocol] that wraps the given raw object pointer. - static NSURLProtocol castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLProtocol._(other, lib, retain: retain, release: release); + NSFileWrapper? initWithURL_options_error_(objc.NSURL url, int options, + ffi.Pointer> outError) { + final _ret = _objc_msgSend_583(this.pointer, + _sel_initWithURL_options_error_, url.pointer, options, outError); + return _ret.address == 0 + ? null + : NSFileWrapper.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSURLProtocol]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLProtocol1); + NSFileWrapper initDirectoryWithFileWrappers_( + objc.NSDictionary childrenByPreferredName) { + final _ret = _objc_msgSend_409(this.pointer, + _sel_initDirectoryWithFileWrappers_, childrenByPreferredName.pointer); + return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); } - NSURLProtocol initWithRequest_cachedResponse_client_(NSURLRequest request, - NSCachedURLResponse? cachedResponse, NSObject? client) { - final _ret = _lib._objc_msgSend_1012( - _id, - _lib._sel_initWithRequest_cachedResponse_client_1, - request._id, - cachedResponse?._id ?? ffi.nullptr, - client?._id ?? ffi.nullptr); - return NSURLProtocol._(_ret, _lib, retain: true, release: true); - } - - NSObject? get client { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_client1); + NSFileWrapper initRegularFileWithContents_(objc.NSData contents) { + final _ret = _objc_msgSend_340( + this.pointer, _sel_initRegularFileWithContents_, contents.pointer); + return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); + } + + NSFileWrapper initSymbolicLinkWithDestinationURL_(objc.NSURL url) { + final _ret = _objc_msgSend_320( + this.pointer, _sel_initSymbolicLinkWithDestinationURL_, url.pointer); + return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); + } + + NSFileWrapper? initWithSerializedRepresentation_( + objc.NSData serializeRepresentation) { + final _ret = _objc_msgSend_341( + this.pointer, + _sel_initWithSerializedRepresentation_, + serializeRepresentation.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : NSFileWrapper.castFromPointer(_ret, retain: true, release: true); } - NSURLRequest get request { - final _ret = _lib._objc_msgSend_988(_id, _lib._sel_request1); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + NSFileWrapper? initWithCoder_(objc.NSCoder inCoder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, inCoder.pointer); + return _ret.address == 0 + ? null + : NSFileWrapper.castFromPointer(_ret, retain: true, release: true); } - NSCachedURLResponse? get cachedResponse { - final _ret = _lib._objc_msgSend_1013(_id, _lib._sel_cachedResponse1); + bool get directory { + return _objc_msgSend_7(this.pointer, _sel_isDirectory); + } + + bool get regularFile { + return _objc_msgSend_7(this.pointer, _sel_isRegularFile); + } + + bool get symbolicLink { + return _objc_msgSend_7(this.pointer, _sel_isSymbolicLink); + } + + objc.NSString? get preferredFilename { + final _ret = _objc_msgSend_13(this.pointer, _sel_preferredFilename); return _ret.address == 0 ? null - : NSCachedURLResponse._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool canInitWithRequest_(AVFAudio _lib, NSURLRequest request) { - return _lib._objc_msgSend_990(_lib._class_NSURLProtocol1, - _lib._sel_canInitWithRequest_1, request._id); + set preferredFilename(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setPreferredFilename_, + value?.pointer ?? ffi.nullptr); } - static NSURLRequest canonicalRequestForRequest_( - AVFAudio _lib, NSURLRequest request) { - final _ret = _lib._objc_msgSend_1014(_lib._class_NSURLProtocol1, - _lib._sel_canonicalRequestForRequest_1, request._id); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + objc.NSString? get filename { + final _ret = _objc_msgSend_13(this.pointer, _sel_filename); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool requestIsCacheEquivalent_toRequest_( - AVFAudio _lib, NSURLRequest a, NSURLRequest b) { - return _lib._objc_msgSend_1015(_lib._class_NSURLProtocol1, - _lib._sel_requestIsCacheEquivalent_toRequest_1, a._id, b._id); + set filename(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setFilename_, value?.pointer ?? ffi.nullptr); } - void startLoading() { - _lib._objc_msgSend_1(_id, _lib._sel_startLoading1); + objc.NSDictionary get fileAttributes { + final _ret = _objc_msgSend_112(this.pointer, _sel_fileAttributes); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - void stopLoading() { - _lib._objc_msgSend_1(_id, _lib._sel_stopLoading1); + set fileAttributes(objc.NSDictionary value) { + return _objc_msgSend_113( + this.pointer, _sel_setFileAttributes_, value.pointer); + } + + bool matchesContentsOfURL_(objc.NSURL url) { + return _objc_msgSend_305( + this.pointer, _sel_matchesContentsOfURL_, url.pointer); + } + + bool readFromURL_options_error_(objc.NSURL url, int options, + ffi.Pointer> outError) { + return _objc_msgSend_584(this.pointer, _sel_readFromURL_options_error_, + url.pointer, options, outError); + } + + bool writeToURL_options_originalContentsURL_error_( + objc.NSURL url, + int options, + objc.NSURL? originalContentsURL, + ffi.Pointer> outError) { + return _objc_msgSend_585( + this.pointer, + _sel_writeToURL_options_originalContentsURL_error_, + url.pointer, + options, + originalContentsURL?.pointer ?? ffi.nullptr, + outError); } - static NSObject? propertyForKey_inRequest_( - AVFAudio _lib, NSString key, NSURLRequest request) { - final _ret = _lib._objc_msgSend_1016(_lib._class_NSURLProtocol1, - _lib._sel_propertyForKey_inRequest_1, key._id, request._id); + objc.NSData? get serializedRepresentation { + final _ret = _objc_msgSend_325(this.pointer, _sel_serializedRepresentation); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - static void setProperty_forKey_inRequest_(AVFAudio _lib, NSObject value, - NSString key, NSMutableURLRequest request) { - _lib._objc_msgSend_1023( - _lib._class_NSURLProtocol1, - _lib._sel_setProperty_forKey_inRequest_1, - value._id, - key._id, - request._id); + objc.NSString addFileWrapper_(NSFileWrapper child) { + final _ret = + _objc_msgSend_586(this.pointer, _sel_addFileWrapper_, child.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void removePropertyForKey_inRequest_( - AVFAudio _lib, NSString key, NSMutableURLRequest request) { - _lib._objc_msgSend_1024(_lib._class_NSURLProtocol1, - _lib._sel_removePropertyForKey_inRequest_1, key._id, request._id); + objc.NSString addRegularFileWithContents_preferredFilename_( + objc.NSData data, objc.NSString fileName) { + final _ret = _objc_msgSend_587( + this.pointer, + _sel_addRegularFileWithContents_preferredFilename_, + data.pointer, + fileName.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool registerClass_(AVFAudio _lib, NSObject protocolClass) { - return _lib._objc_msgSend_0(_lib._class_NSURLProtocol1, - _lib._sel_registerClass_1, protocolClass._id); + void removeFileWrapper_(NSFileWrapper child) { + _objc_msgSend_588(this.pointer, _sel_removeFileWrapper_, child.pointer); } - static void unregisterClass_(AVFAudio _lib, NSObject protocolClass) { - _lib._objc_msgSend_15(_lib._class_NSURLProtocol1, - _lib._sel_unregisterClass_1, protocolClass._id); + objc.NSDictionary? get fileWrappers { + final _ret = _objc_msgSend_65(this.pointer, _sel_fileWrappers); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static bool canInitWithTask_(AVFAudio _lib, NSURLSessionTask task) { - return _lib._objc_msgSend_1025( - _lib._class_NSURLProtocol1, _lib._sel_canInitWithTask_1, task._id); + objc.NSString? keyForFileWrapper_(NSFileWrapper child) { + final _ret = + _objc_msgSend_589(this.pointer, _sel_keyForFileWrapper_, child.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSURLProtocol initWithTask_cachedResponse_client_(NSURLSessionTask task, - NSCachedURLResponse? cachedResponse, NSObject? client) { - final _ret = _lib._objc_msgSend_1026( - _id, - _lib._sel_initWithTask_cachedResponse_client_1, - task._id, - cachedResponse?._id ?? ffi.nullptr, - client?._id ?? ffi.nullptr); - return NSURLProtocol._(_ret, _lib, retain: true, release: true); + objc.NSData? get regularFileContents { + final _ret = _objc_msgSend_325(this.pointer, _sel_regularFileContents); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - NSURLSessionTask? get task { - final _ret = _lib._objc_msgSend_1027(_id, _lib._sel_task1); + objc.NSURL? get symbolicLinkDestinationURL { + final _ret = + _objc_msgSend_10(this.pointer, _sel_symbolicLinkDestinationURL); return _ret.address == 0 ? null - : NSURLSessionTask._(_ret, _lib, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - @override - NSURLProtocol init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLProtocol._(_ret, _lib, retain: true, release: true); + objc.NSObject? initWithPath_(objc.NSString path) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_initWithPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject initSymbolicLinkWithDestination_(objc.NSString path) { + final _ret = _objc_msgSend_35( + this.pointer, _sel_initSymbolicLinkWithDestination_, path.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + bool needsToBeUpdatedFromPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_needsToBeUpdatedFromPath_, path.pointer); } - static NSURLProtocol new1(AVFAudio _lib) { + bool updateFromPath_(objc.NSString path) { + return _objc_msgSend_51(this.pointer, _sel_updateFromPath_, path.pointer); + } + + bool writeToFile_atomically_updateFilenames_( + objc.NSString path, bool atomicFlag, bool updateFilenamesFlag) { + return _objc_msgSend_590( + this.pointer, + _sel_writeToFile_atomically_updateFilenames_, + path.pointer, + atomicFlag, + updateFilenamesFlag); + } + + objc.NSString addFileWithPath_(objc.NSString path) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLProtocol1, _lib._sel_new1); - return NSURLProtocol._(_ret, _lib, retain: false, release: true); + _objc_msgSend_297(this.pointer, _sel_addFileWithPath_, path.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString addSymbolicLinkWithDestination_preferredFilename_( + objc.NSString path, objc.NSString filename) { + final _ret = _objc_msgSend_591( + this.pointer, + _sel_addSymbolicLinkWithDestination_preferredFilename_, + path.pointer, + filename.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString symbolicLinkDestination() { + final _ret = _objc_msgSend_12(this.pointer, _sel_symbolicLinkDestination); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSFileWrapper init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); } - static NSURLProtocol allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLProtocol1, _lib._sel_allocWithZone_1, zone); - return NSURLProtocol._(_ret, _lib, retain: false, release: true); + static NSFileWrapper new1() { + final _ret = _objc_msgSend_40(_class_NSFileWrapper, _sel_new); + return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } - static NSURLProtocol alloc(AVFAudio _lib) { + static NSFileWrapper allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLProtocol1, _lib._sel_alloc1); - return NSURLProtocol._(_ret, _lib, retain: false, release: true); + _objc_msgSend_47(_class_NSFileWrapper, _sel_allocWithZone_, zone); + return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); + } + + static NSFileWrapper alloc() { + final _ret = _objc_msgSend_40(_class_NSFileWrapper, _sel_alloc); + return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLProtocol1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSFileWrapper, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLProtocol1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSFileWrapper, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLProtocol1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSFileWrapper, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLProtocol1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSFileWrapper, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLProtocol1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSFileWrapper, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLProtocol1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSFileWrapper, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLProtocol1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSFileWrapper, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSURLProtocol1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSFileWrapper, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLProtocol1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSFileWrapper, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -class NSMutableURLRequest extends NSURLRequest { - NSMutableURLRequest._(ffi.Pointer id, AVFAudio lib, +late final _class_NSFileWrapper = objc.getClass("NSFileWrapper"); + +abstract class NSFileWrapperReadingOptions { + static const int NSFileWrapperReadingImmediate = 1; + static const int NSFileWrapperReadingWithoutMapping = 2; +} + +late final _sel_initWithURL_options_error_ = + objc.registerName("initWithURL:options:error:"); +final _objc_msgSend_583 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_initDirectoryWithFileWrappers_ = + objc.registerName("initDirectoryWithFileWrappers:"); +late final _sel_initRegularFileWithContents_ = + objc.registerName("initRegularFileWithContents:"); +late final _sel_initSymbolicLinkWithDestinationURL_ = + objc.registerName("initSymbolicLinkWithDestinationURL:"); +late final _sel_initWithSerializedRepresentation_ = + objc.registerName("initWithSerializedRepresentation:"); +late final _sel_isDirectory = objc.registerName("isDirectory"); +late final _sel_isRegularFile = objc.registerName("isRegularFile"); +late final _sel_isSymbolicLink = objc.registerName("isSymbolicLink"); +late final _sel_preferredFilename = objc.registerName("preferredFilename"); +late final _sel_setPreferredFilename_ = + objc.registerName("setPreferredFilename:"); +late final _sel_filename = objc.registerName("filename"); +late final _sel_setFilename_ = objc.registerName("setFilename:"); +late final _sel_fileAttributes = objc.registerName("fileAttributes"); +late final _sel_setFileAttributes_ = objc.registerName("setFileAttributes:"); +late final _sel_matchesContentsOfURL_ = + objc.registerName("matchesContentsOfURL:"); +late final _sel_readFromURL_options_error_ = + objc.registerName("readFromURL:options:error:"); +final _objc_msgSend_584 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + +abstract class NSFileWrapperWritingOptions { + static const int NSFileWrapperWritingAtomic = 1; + static const int NSFileWrapperWritingWithNameUpdating = 2; +} + +late final _sel_writeToURL_options_originalContentsURL_error_ = + objc.registerName("writeToURL:options:originalContentsURL:error:"); +final _objc_msgSend_585 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_serializedRepresentation = + objc.registerName("serializedRepresentation"); +late final _sel_addFileWrapper_ = objc.registerName("addFileWrapper:"); +final _objc_msgSend_586 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_addRegularFileWithContents_preferredFilename_ = + objc.registerName("addRegularFileWithContents:preferredFilename:"); +final _objc_msgSend_587 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeFileWrapper_ = objc.registerName("removeFileWrapper:"); +final _objc_msgSend_588 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_fileWrappers = objc.registerName("fileWrappers"); +late final _sel_keyForFileWrapper_ = objc.registerName("keyForFileWrapper:"); +final _objc_msgSend_589 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_regularFileContents = objc.registerName("regularFileContents"); +late final _sel_symbolicLinkDestinationURL = + objc.registerName("symbolicLinkDestinationURL"); +late final _sel_initSymbolicLinkWithDestination_ = + objc.registerName("initSymbolicLinkWithDestination:"); +late final _sel_needsToBeUpdatedFromPath_ = + objc.registerName("needsToBeUpdatedFromPath:"); +late final _sel_updateFromPath_ = objc.registerName("updateFromPath:"); +late final _sel_writeToFile_atomically_updateFilenames_ = + objc.registerName("writeToFile:atomically:updateFilenames:"); +final _objc_msgSend_590 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Bool)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + bool)>(); +late final _sel_addFileWithPath_ = objc.registerName("addFileWithPath:"); +late final _sel_addSymbolicLinkWithDestination_preferredFilename_ = + objc.registerName("addSymbolicLinkWithDestination:preferredFilename:"); +final _objc_msgSend_591 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_symbolicLinkDestination = + objc.registerName("symbolicLinkDestination"); + +class NSURLSession extends objc.NSObject { + NSURLSession._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [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); + /// Constructs a [NSURLSession] that points to the same underlying object as [other]. + NSURLSession.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSURLSession] that wraps the given raw object pointer. + NSURLSession.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLSession]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSession); } - /// Returns a [NSMutableURLRequest] that wraps the given raw object pointer. - static NSMutableURLRequest castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableURLRequest._(other, lib, retain: retain, release: release); + static NSURLSession getSharedSession() { + final _ret = _objc_msgSend_592(_class_NSURLSession, _sel_sharedSession); + return NSURLSession.castFromPointer(_ret, 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); + static NSURLSession sessionWithConfiguration_( + NSURLSessionConfiguration configuration) { + final _ret = _objc_msgSend_608(_class_NSURLSession, + _sel_sessionWithConfiguration_, configuration.pointer); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); } - @override - NSURL? get URL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_URL1); + static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( + NSURLSessionConfiguration configuration, + objc.NSObject? delegate, + NSOperationQueue? queue) { + final _ret = _objc_msgSend_609( + _class_NSURLSession, + _sel_sessionWithConfiguration_delegate_delegateQueue_, + configuration.pointer, + delegate?.pointer ?? ffi.nullptr, + queue?.pointer ?? ffi.nullptr); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); + } + + NSOperationQueue get delegateQueue { + final _ret = _objc_msgSend_460(this.pointer, _sel_delegateQueue); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); return _ret.address == 0 ? null - : NSURL._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set URL(NSURL? value) { - return _lib._objc_msgSend_671( - _id, _lib._sel_setURL_1, value?._id ?? ffi.nullptr); + NSURLSessionConfiguration get configuration { + final _ret = _objc_msgSend_593(this.pointer, _sel_configuration); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } - @override - int get cachePolicy { - return _lib._objc_msgSend_859(_id, _lib._sel_cachePolicy1); + objc.NSString? get sessionDescription { + final _ret = _objc_msgSend_13(this.pointer, _sel_sessionDescription); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set cachePolicy(int value) { - return _lib._objc_msgSend_1017(_id, _lib._sel_setCachePolicy_1, value); + set sessionDescription(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setSessionDescription_, + value?.pointer ?? ffi.nullptr); } - @override - double get timeoutInterval { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_timeoutInterval1) - : _lib._objc_msgSend_165(_id, _lib._sel_timeoutInterval1); + void finishTasksAndInvalidate() { + _objc_msgSend_82(this.pointer, _sel_finishTasksAndInvalidate); } - set timeoutInterval(double value) { - return _lib._objc_msgSend_542(_id, _lib._sel_setTimeoutInterval_1, value); + void invalidateAndCancel() { + _objc_msgSend_82(this.pointer, _sel_invalidateAndCancel); } - @override - NSURL? get mainDocumentURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_mainDocumentURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + void resetWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { + _objc_msgSend_249(this.pointer, _sel_resetWithCompletionHandler_, + completionHandler.pointer); } - set mainDocumentURL(NSURL? value) { - return _lib._objc_msgSend_671( - _id, _lib._sel_setMainDocumentURL_1, value?._id ?? ffi.nullptr); + void flushWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { + _objc_msgSend_249(this.pointer, _sel_flushWithCompletionHandler_, + completionHandler.pointer); } - @override - int get networkServiceType { - return _lib._objc_msgSend_860(_id, _lib._sel_networkServiceType1); + void getTasksWithCompletionHandler_( + ObjCBlock_ffiVoid_NSArray_NSArray_NSArray completionHandler) { + _objc_msgSend_610(this.pointer, _sel_getTasksWithCompletionHandler_, + completionHandler.pointer); } - set networkServiceType(int value) { - return _lib._objc_msgSend_1018( - _id, _lib._sel_setNetworkServiceType_1, value); + void getAllTasksWithCompletionHandler_( + ObjCBlock_ffiVoid_NSArray1 completionHandler) { + _objc_msgSend_611(this.pointer, _sel_getAllTasksWithCompletionHandler_, + completionHandler.pointer); } - @override - bool get allowsCellularAccess { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsCellularAccess1); + NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_612( + this.pointer, _sel_dataTaskWithRequest_, request.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); + } + + NSURLSessionDataTask dataTaskWithURL_(objc.NSURL url) { + final _ret = + _objc_msgSend_613(this.pointer, _sel_dataTaskWithURL_, url.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); + } + + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( + NSURLRequest request, objc.NSURL fileURL) { + final _ret = _objc_msgSend_615(this.pointer, + _sel_uploadTaskWithRequest_fromFile_, request.pointer, fileURL.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); + } + + NSURLSessionUploadTask uploadTaskWithRequest_fromData_( + NSURLRequest request, objc.NSData bodyData) { + final _ret = _objc_msgSend_616( + this.pointer, + _sel_uploadTaskWithRequest_fromData_, + request.pointer, + bodyData.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); + } + + NSURLSessionUploadTask uploadTaskWithResumeData_(objc.NSData resumeData) { + final _ret = _objc_msgSend_617( + this.pointer, _sel_uploadTaskWithResumeData_, resumeData.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); + } + + NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_618( + this.pointer, _sel_uploadTaskWithStreamedRequest_, request.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); + } + + NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_619( + this.pointer, _sel_downloadTaskWithRequest_, request.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); + } + + NSURLSessionDownloadTask downloadTaskWithURL_(objc.NSURL url) { + final _ret = + _objc_msgSend_620(this.pointer, _sel_downloadTaskWithURL_, url.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); + } + + NSURLSessionDownloadTask downloadTaskWithResumeData_(objc.NSData resumeData) { + final _ret = _objc_msgSend_621( + this.pointer, _sel_downloadTaskWithResumeData_, resumeData.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); + } + + NSURLSessionStreamTask streamTaskWithHostName_port_( + objc.NSString hostname, int port) { + final _ret = _objc_msgSend_624(this.pointer, + _sel_streamTaskWithHostName_port_, hostname.pointer, port); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); + } + + NSURLSessionStreamTask streamTaskWithNetService_(NSNetService service) { + final _ret = _objc_msgSend_633( + this.pointer, _sel_streamTaskWithNetService_, service.pointer); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); + } + + NSURLSessionWebSocketTask webSocketTaskWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_640( + this.pointer, _sel_webSocketTaskWithURL_, url.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); + } + + NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( + objc.NSURL url, objc.NSArray protocols) { + final _ret = _objc_msgSend_641(this.pointer, + _sel_webSocketTaskWithURL_protocols_, url.pointer, protocols.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } - set allowsCellularAccess(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setAllowsCellularAccess_1, value); + NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_642( + this.pointer, _sel_webSocketTaskWithRequest_, request.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } @override - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsExpensiveNetworkAccess1); + NSURLSession init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); } - set allowsExpensiveNetworkAccess(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); + static NSURLSession new1() { + final _ret = _objc_msgSend_40(_class_NSURLSession, _sel_new); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); } - @override - bool get allowsConstrainedNetworkAccess { - return _lib._objc_msgSend_12( - _id, _lib._sel_allowsConstrainedNetworkAccess1); + NSURLSessionDataTask dataTaskWithRequest_completionHandler_( + NSURLRequest request, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_643( + this.pointer, + _sel_dataTaskWithRequest_completionHandler_, + request.pointer, + completionHandler.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } - set allowsConstrainedNetworkAccess(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); + NSURLSessionDataTask dataTaskWithURL_completionHandler_(objc.NSURL url, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_644( + this.pointer, + _sel_dataTaskWithURL_completionHandler_, + url.pointer, + completionHandler.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } - @override - bool get assumesHTTP3Capable { - return _lib._objc_msgSend_12(_id, _lib._sel_assumesHTTP3Capable1); + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( + NSURLRequest request, + objc.NSURL fileURL, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_645( + this.pointer, + _sel_uploadTaskWithRequest_fromFile_completionHandler_, + request.pointer, + fileURL.pointer, + completionHandler.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - set assumesHTTP3Capable(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setAssumesHTTP3Capable_1, value); + NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( + NSURLRequest request, + objc.NSData? bodyData, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_646( + this.pointer, + _sel_uploadTaskWithRequest_fromData_completionHandler_, + request.pointer, + bodyData?.pointer ?? ffi.nullptr, + completionHandler.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - @override - int get attribution { - return _lib._objc_msgSend_861(_id, _lib._sel_attribution1); + NSURLSessionUploadTask uploadTaskWithResumeData_completionHandler_( + objc.NSData resumeData, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_647( + this.pointer, + _sel_uploadTaskWithResumeData_completionHandler_, + resumeData.pointer, + completionHandler.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - set attribution(int value) { - return _lib._objc_msgSend_1019(_id, _lib._sel_setAttribution_1, value); + NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( + NSURLRequest request, + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_648( + this.pointer, + _sel_downloadTaskWithRequest_completionHandler_, + request.pointer, + completionHandler.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - @override - bool get requiresDNSSECValidation { - return _lib._objc_msgSend_12(_id, _lib._sel_requiresDNSSECValidation1); + NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_( + objc.NSURL url, + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_649( + this.pointer, + _sel_downloadTaskWithURL_completionHandler_, + url.pointer, + completionHandler.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - set requiresDNSSECValidation(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setRequiresDNSSECValidation_1, value); + NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( + objc.NSData resumeData, + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_650( + this.pointer, + _sel_downloadTaskWithResumeData_completionHandler_, + resumeData.pointer, + completionHandler.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - NSString get HTTPMethod { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_HTTPMethod1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSURLSession allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLSession, _sel_allocWithZone_, zone); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); } - set HTTPMethod(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setHTTPMethod_1, value._id); + static NSURLSession alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSession, _sel_alloc); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); } - @override - NSDictionary? get allHTTPHeaderFields { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_allHTTPHeaderFields1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSession, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - set allHTTPHeaderFields(NSDictionary? value) { - return _lib._objc_msgSend_634( - _id, _lib._sel_setAllHTTPHeaderFields_1, value?._id ?? ffi.nullptr); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSession, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - void setValue_forHTTPHeaderField_(NSString? value, NSString field) { - _lib._objc_msgSend_1020(_id, _lib._sel_setValue_forHTTPHeaderField_1, - value?._id ?? ffi.nullptr, field._id); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLSession, _sel_accessInstanceVariablesDirectly); } - void addValue_forHTTPHeaderField_(NSString value, NSString field) { - _lib._objc_msgSend_551( - _id, _lib._sel_addValue_forHTTPHeaderField_1, value._id, field._id); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLSession, _sel_useStoredAccessor); } - @override - NSData? get HTTPBody { - final _ret = _lib._objc_msgSend_286(_id, _lib._sel_HTTPBody1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSession, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - set HTTPBody(NSData? value) { - return _lib._objc_msgSend_1021( - _id, _lib._sel_setHTTPBody_1, value?._id ?? ffi.nullptr); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSession, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - @override - NSInputStream? get HTTPBodyStream { - final _ret = _lib._objc_msgSend_875(_id, _lib._sel_HTTPBodyStream1); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSession, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - set HTTPBodyStream(NSInputStream? value) { - return _lib._objc_msgSend_1022( - _id, _lib._sel_setHTTPBodyStream_1, value?._id ?? ffi.nullptr); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSession, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - @override - bool get HTTPShouldHandleCookies { - return _lib._objc_msgSend_12(_id, _lib._sel_HTTPShouldHandleCookies1); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLSession, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - set HTTPShouldHandleCookies(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setHTTPShouldHandleCookies_1, value); +late final _class_NSURLSession = objc.getClass("NSURLSession"); +late final _sel_sharedSession = objc.registerName("sharedSession"); +final _objc_msgSend_592 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + +class NSURLSessionConfiguration extends objc.NSObject { + NSURLSessionConfiguration._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLSessionConfiguration] that points to the same underlying object as [other]. + NSURLSessionConfiguration.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSURLSessionConfiguration] that wraps the given raw object pointer. + NSURLSessionConfiguration.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLSessionConfiguration]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionConfiguration); } - @override - bool get HTTPShouldUsePipelining { - return _lib._objc_msgSend_12(_id, _lib._sel_HTTPShouldUsePipelining1); + static NSURLSessionConfiguration getDefaultSessionConfiguration() { + final _ret = _objc_msgSend_593( + _class_NSURLSessionConfiguration, _sel_defaultSessionConfiguration); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } - set HTTPShouldUsePipelining(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setHTTPShouldUsePipelining_1, value); + static NSURLSessionConfiguration getEphemeralSessionConfiguration() { + final _ret = _objc_msgSend_593( + _class_NSURLSessionConfiguration, _sel_ephemeralSessionConfiguration); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } - static NSMutableURLRequest requestWithURL_(AVFAudio _lib, NSURL URL) { - final _ret = _lib._objc_msgSend_262( - _lib._class_NSMutableURLRequest1, _lib._sel_requestWithURL_1, URL._id); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + static NSURLSessionConfiguration + backgroundSessionConfigurationWithIdentifier_(objc.NSString identifier) { + final _ret = _objc_msgSend_594(_class_NSURLSessionConfiguration, + _sel_backgroundSessionConfigurationWithIdentifier_, identifier.pointer); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } - static bool getSupportsSecureCoding(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableURLRequest1, _lib._sel_supportsSecureCoding1); + objc.NSString? get identifier { + final _ret = _objc_msgSend_13(this.pointer, _sel_identifier); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( - AVFAudio _lib, NSURL URL, int cachePolicy, double timeoutInterval) { - final _ret = _lib._objc_msgSend_858( - _lib._class_NSMutableURLRequest1, - _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, - URL._id, - cachePolicy, - timeoutInterval); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + int get requestCachePolicy { + return _objc_msgSend_322(this.pointer, _sel_requestCachePolicy); } - @override - NSMutableURLRequest initWithURL_(NSURL URL) { - final _ret = _lib._objc_msgSend_262(_id, _lib._sel_initWithURL_1, URL._id); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + set requestCachePolicy(int value) { + return _objc_msgSend_567(this.pointer, _sel_setRequestCachePolicy_, value); } - @override - NSMutableURLRequest initWithURL_cachePolicy_timeoutInterval_( - NSURL URL, int cachePolicy, double timeoutInterval) { - final _ret = _lib._objc_msgSend_858( - _id, - _lib._sel_initWithURL_cachePolicy_timeoutInterval_1, - URL._id, - cachePolicy, - timeoutInterval); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + double get timeoutIntervalForRequest { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_timeoutIntervalForRequest) + : _objc_msgSend_115(this.pointer, _sel_timeoutIntervalForRequest); } - @override - NSMutableURLRequest init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + set timeoutIntervalForRequest(double value) { + return _objc_msgSend_212( + this.pointer, _sel_setTimeoutIntervalForRequest_, value); } - static NSMutableURLRequest new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableURLRequest1, _lib._sel_new1); - return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); + double get timeoutIntervalForResource { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_timeoutIntervalForResource) + : _objc_msgSend_115(this.pointer, _sel_timeoutIntervalForResource); } - static NSMutableURLRequest allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMutableURLRequest1, _lib._sel_allocWithZone_1, zone); - return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); + set timeoutIntervalForResource(double value) { + return _objc_msgSend_212( + this.pointer, _sel_setTimeoutIntervalForResource_, value); } - static NSMutableURLRequest alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableURLRequest1, _lib._sel_alloc1); - return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); + int get networkServiceType { + return _objc_msgSend_323(this.pointer, _sel_networkServiceType); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSMutableURLRequest1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + set networkServiceType(int value) { + return _objc_msgSend_568(this.pointer, _sel_setNetworkServiceType_, value); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSMutableURLRequest1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + bool get allowsCellularAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsCellularAccess); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSMutableURLRequest1, - _lib._sel_accessInstanceVariablesDirectly1); + set allowsCellularAccess(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setAllowsCellularAccess_, value); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableURLRequest1, _lib._sel_useStoredAccessor1); + bool get allowsExpensiveNetworkAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsExpensiveNetworkAccess); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSMutableURLRequest1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + set allowsExpensiveNetworkAccess(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSMutableURLRequest1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + bool get allowsConstrainedNetworkAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsConstrainedNetworkAccess); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSMutableURLRequest1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + set allowsConstrainedNetworkAccess(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSMutableURLRequest1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool get requiresDNSSECValidation { + return _objc_msgSend_7(this.pointer, _sel_requiresDNSSECValidation); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableURLRequest1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + set requiresDNSSECValidation(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setRequiresDNSSECValidation_, value); } -} -class NSXMLParser extends NSObject { - NSXMLParser._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + bool get waitsForConnectivity { + return _objc_msgSend_7(this.pointer, _sel_waitsForConnectivity); + } - /// Returns a [NSXMLParser] that points to the same underlying object as [other]. - static NSXMLParser castFrom(T other) { - return NSXMLParser._(other._id, other._lib, retain: true, release: true); + set waitsForConnectivity(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setWaitsForConnectivity_, value); } - /// Returns a [NSXMLParser] that wraps the given raw object pointer. - static NSXMLParser castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLParser._(other, lib, retain: retain, release: release); + bool get discretionary { + return _objc_msgSend_7(this.pointer, _sel_isDiscretionary); } - /// Returns whether [obj] is an instance of [NSXMLParser]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSXMLParser1); + set discretionary(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setDiscretionary_, value); } - NSXMLParser? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_277(_id, _lib._sel_initWithContentsOfURL_1, url._id); + objc.NSString? get sharedContainerIdentifier { + final _ret = _objc_msgSend_13(this.pointer, _sel_sharedContainerIdentifier); return _ret.address == 0 ? null - : NSXMLParser._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSXMLParser initWithData_(NSData data) { - final _ret = - _lib._objc_msgSend_279(_id, _lib._sel_initWithData_1, data._id); - return NSXMLParser._(_ret, _lib, retain: true, release: true); + set sharedContainerIdentifier(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setSharedContainerIdentifier_, + value?.pointer ?? ffi.nullptr); } - NSXMLParser initWithStream_(NSInputStream stream) { - final _ret = - _lib._objc_msgSend_1028(_id, _lib._sel_initWithStream_1, stream._id); - return NSXMLParser._(_ret, _lib, retain: true, release: true); + bool get sessionSendsLaunchEvents { + return _objc_msgSend_7(this.pointer, _sel_sessionSendsLaunchEvents); + } + + set sessionSendsLaunchEvents(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setSessionSendsLaunchEvents_, value); } - NSObject? get delegate { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); + objc.NSDictionary? get connectionProxyDictionary { + final _ret = _objc_msgSend_65(this.pointer, _sel_connectionProxyDictionary); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - set delegate(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); + set connectionProxyDictionary(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setConnectionProxyDictionary_, + value?.pointer ?? ffi.nullptr); } - bool get shouldProcessNamespaces { - return _lib._objc_msgSend_12(_id, _lib._sel_shouldProcessNamespaces1); + int get TLSMinimumSupportedProtocol { + return _objc_msgSend_595(this.pointer, _sel_TLSMinimumSupportedProtocol); } - set shouldProcessNamespaces(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setShouldProcessNamespaces_1, value); + set TLSMinimumSupportedProtocol(int value) { + return _objc_msgSend_596( + this.pointer, _sel_setTLSMinimumSupportedProtocol_, value); } - bool get shouldReportNamespacePrefixes { - return _lib._objc_msgSend_12(_id, _lib._sel_shouldReportNamespacePrefixes1); + int get TLSMaximumSupportedProtocol { + return _objc_msgSend_595(this.pointer, _sel_TLSMaximumSupportedProtocol); } - set shouldReportNamespacePrefixes(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setShouldReportNamespacePrefixes_1, value); + set TLSMaximumSupportedProtocol(int value) { + return _objc_msgSend_596( + this.pointer, _sel_setTLSMaximumSupportedProtocol_, value); } - int get externalEntityResolvingPolicy { - return _lib._objc_msgSend_1029( - _id, _lib._sel_externalEntityResolvingPolicy1); + int get TLSMinimumSupportedProtocolVersion { + return _objc_msgSend_597( + this.pointer, _sel_TLSMinimumSupportedProtocolVersion); } - set externalEntityResolvingPolicy(int value) { - return _lib._objc_msgSend_1030( - _id, _lib._sel_setExternalEntityResolvingPolicy_1, value); + set TLSMinimumSupportedProtocolVersion(int value) { + return _objc_msgSend_598( + this.pointer, _sel_setTLSMinimumSupportedProtocolVersion_, value); } - NSSet? get allowedExternalEntityURLs { - final _ret = - _lib._objc_msgSend_319(_id, _lib._sel_allowedExternalEntityURLs1); - return _ret.address == 0 - ? null - : NSSet._(_ret, _lib, retain: true, release: true); + int get TLSMaximumSupportedProtocolVersion { + return _objc_msgSend_597( + this.pointer, _sel_TLSMaximumSupportedProtocolVersion); } - set allowedExternalEntityURLs(NSSet? value) { - return _lib._objc_msgSend_1031(_id, - _lib._sel_setAllowedExternalEntityURLs_1, value?._id ?? ffi.nullptr); + set TLSMaximumSupportedProtocolVersion(int value) { + return _objc_msgSend_598( + this.pointer, _sel_setTLSMaximumSupportedProtocolVersion_, value); } - bool parse() { - return _lib._objc_msgSend_12(_id, _lib._sel_parse1); + bool get HTTPShouldUsePipelining { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldUsePipelining); } - void abortParsing() { - _lib._objc_msgSend_1(_id, _lib._sel_abortParsing1); + set HTTPShouldUsePipelining(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setHTTPShouldUsePipelining_, value); } - NSError? get parserError { - final _ret = _lib._objc_msgSend_322(_id, _lib._sel_parserError1); - return _ret.address == 0 - ? null - : NSError._(_ret, _lib, retain: true, release: true); + bool get HTTPShouldSetCookies { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldSetCookies); } - bool get shouldResolveExternalEntities { - return _lib._objc_msgSend_12(_id, _lib._sel_shouldResolveExternalEntities1); + set HTTPShouldSetCookies(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setHTTPShouldSetCookies_, value); } - set shouldResolveExternalEntities(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setShouldResolveExternalEntities_1, value); + int get HTTPCookieAcceptPolicy { + return _objc_msgSend_318(this.pointer, _sel_HTTPCookieAcceptPolicy); } - NSString? get publicID { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_publicID1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + set HTTPCookieAcceptPolicy(int value) { + return _objc_msgSend_319( + this.pointer, _sel_setHTTPCookieAcceptPolicy_, value); } - NSString? get systemID { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_systemID1); + objc.NSDictionary? get HTTPAdditionalHeaders { + final _ret = _objc_msgSend_65(this.pointer, _sel_HTTPAdditionalHeaders); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - int get lineNumber { - return _lib._objc_msgSend_83(_id, _lib._sel_lineNumber1); + set HTTPAdditionalHeaders(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setHTTPAdditionalHeaders_, + value?.pointer ?? ffi.nullptr); } - int get columnNumber { - return _lib._objc_msgSend_83(_id, _lib._sel_columnNumber1); + int get HTTPMaximumConnectionsPerHost { + return _objc_msgSend_114(this.pointer, _sel_HTTPMaximumConnectionsPerHost); } - @override - NSXMLParser init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSXMLParser._(_ret, _lib, retain: true, release: true); + set HTTPMaximumConnectionsPerHost(int value) { + return _objc_msgSend_134( + this.pointer, _sel_setHTTPMaximumConnectionsPerHost_, value); } - static NSXMLParser new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSXMLParser1, _lib._sel_new1); - return NSXMLParser._(_ret, _lib, retain: false, release: true); + NSHTTPCookieStorage? get HTTPCookieStorage { + final _ret = _objc_msgSend_599(this.pointer, _sel_HTTPCookieStorage); + return _ret.address == 0 + ? null + : NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLParser allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSXMLParser1, _lib._sel_allocWithZone_1, zone); - return NSXMLParser._(_ret, _lib, retain: false, release: true); + set HTTPCookieStorage(NSHTTPCookieStorage? value) { + return _objc_msgSend_600(this.pointer, _sel_setHTTPCookieStorage_, + value?.pointer ?? ffi.nullptr); } - static NSXMLParser alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLParser1, _lib._sel_alloc1); - return NSXMLParser._(_ret, _lib, retain: false, release: true); + NSURLCredentialStorage? get URLCredentialStorage { + final _ret = _objc_msgSend_601(this.pointer, _sel_URLCredentialStorage); + return _ret.address == 0 + ? null + : NSURLCredentialStorage.castFromPointer(_ret, + retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSXMLParser1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + set URLCredentialStorage(NSURLCredentialStorage? value) { + return _objc_msgSend_602(this.pointer, _sel_setURLCredentialStorage_, + value?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSXMLParser1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + NSURLCache? get URLCache { + final _ret = _objc_msgSend_603(this.pointer, _sel_URLCache); + return _ret.address == 0 + ? null + : NSURLCache.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLParser1, _lib._sel_accessInstanceVariablesDirectly1); + set URLCache(NSURLCache? value) { + return _objc_msgSend_604( + this.pointer, _sel_setURLCache_, value?.pointer ?? ffi.nullptr); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLParser1, _lib._sel_useStoredAccessor1); + bool get shouldUseExtendedBackgroundIdleMode { + return _objc_msgSend_7( + this.pointer, _sel_shouldUseExtendedBackgroundIdleMode); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSXMLParser1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + set shouldUseExtendedBackgroundIdleMode(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setShouldUseExtendedBackgroundIdleMode_, value); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSXMLParser1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + objc.NSArray? get protocolClasses { + final _ret = _objc_msgSend_69(this.pointer, _sel_protocolClasses); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSXMLParser1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + set protocolClasses(objc.NSArray? value) { + return _objc_msgSend_605( + this.pointer, _sel_setProtocolClasses_, value?.pointer ?? ffi.nullptr); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSXMLParser1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + int get multipathServiceType { + return _objc_msgSend_606(this.pointer, _sel_multipathServiceType); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSXMLParser1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + set multipathServiceType(int value) { + return _objc_msgSend_607( + this.pointer, _sel_setMultipathServiceType_, value); } -} - -abstract class NSXMLParserExternalEntityResolvingPolicy { - static const int NSXMLParserResolveExternalEntitiesNever = 0; - static const int NSXMLParserResolveExternalEntitiesNoNetwork = 1; - static const int NSXMLParserResolveExternalEntitiesSameOriginOnly = 2; - static const int NSXMLParserResolveExternalEntitiesAlways = 3; -} - -class NSFileWrapper extends NSObject { - NSFileWrapper._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSFileWrapper] that points to the same underlying object as [other]. - static NSFileWrapper castFrom(T other) { - return NSFileWrapper._(other._id, other._lib, retain: true, release: true); + @override + NSURLSessionConfiguration init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } - /// Returns a [NSFileWrapper] that wraps the given raw object pointer. - static NSFileWrapper castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSFileWrapper._(other, lib, retain: retain, release: release); + static NSURLSessionConfiguration new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionConfiguration, _sel_new); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: false, release: true); } - /// Returns whether [obj] is an instance of [NSFileWrapper]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSFileWrapper1); + static NSURLSessionConfiguration backgroundSessionConfiguration_( + objc.NSString identifier) { + final _ret = _objc_msgSend_594(_class_NSURLSessionConfiguration, + _sel_backgroundSessionConfiguration_, identifier.pointer); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } - NSFileWrapper? initWithURL_options_error_( - NSURL url, int options, ffi.Pointer> outError) { - final _ret = _lib._objc_msgSend_1032( - _id, _lib._sel_initWithURL_options_error_1, url._id, options, outError); - return _ret.address == 0 - ? null - : NSFileWrapper._(_ret, _lib, retain: true, release: true); + static NSURLSessionConfiguration allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionConfiguration, _sel_allocWithZone_, zone); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: false, release: true); } - NSFileWrapper initDirectoryWithFileWrappers_( - NSDictionary childrenByPreferredName) { - final _ret = _lib._objc_msgSend_159(_id, - _lib._sel_initDirectoryWithFileWrappers_1, childrenByPreferredName._id); - return NSFileWrapper._(_ret, _lib, retain: true, release: true); + static NSURLSessionConfiguration alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionConfiguration, _sel_alloc); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: false, release: true); } - NSFileWrapper initRegularFileWithContents_(NSData contents) { - final _ret = _lib._objc_msgSend_279( - _id, _lib._sel_initRegularFileWithContents_1, contents._id); - return NSFileWrapper._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionConfiguration, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSFileWrapper initSymbolicLinkWithDestinationURL_(NSURL url) { - final _ret = _lib._objc_msgSend_262( - _id, _lib._sel_initSymbolicLinkWithDestinationURL_1, url._id); - return NSFileWrapper._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionConfiguration, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSFileWrapper? initWithSerializedRepresentation_( - NSData serializeRepresentation) { - final _ret = _lib._objc_msgSend_874( - _id, - _lib._sel_initWithSerializedRepresentation_1, - serializeRepresentation._id); - return _ret.address == 0 - ? null - : NSFileWrapper._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLSessionConfiguration, _sel_accessInstanceVariablesDirectly); } - NSFileWrapper? initWithCoder_(NSCoder inCoder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, inCoder._id); - return _ret.address == 0 - ? null - : NSFileWrapper._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSURLSessionConfiguration, _sel_useStoredAccessor); } - bool get directory { - return _lib._objc_msgSend_12(_id, _lib._sel_isDirectory1); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionConfiguration, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - bool get regularFile { - return _lib._objc_msgSend_12(_id, _lib._sel_isRegularFile1); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionConfiguration, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - bool get symbolicLink { - return _lib._objc_msgSend_12(_id, _lib._sel_isSymbolicLink1); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionConfiguration, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionConfiguration, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionConfiguration, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSURLSessionConfiguration = + objc.getClass("NSURLSessionConfiguration"); +late final _sel_defaultSessionConfiguration = + objc.registerName("defaultSessionConfiguration"); +final _objc_msgSend_593 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_ephemeralSessionConfiguration = + objc.registerName("ephemeralSessionConfiguration"); +late final _sel_backgroundSessionConfigurationWithIdentifier_ = + objc.registerName("backgroundSessionConfigurationWithIdentifier:"); +final _objc_msgSend_594 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_identifier = objc.registerName("identifier"); +late final _sel_requestCachePolicy = objc.registerName("requestCachePolicy"); +late final _sel_setRequestCachePolicy_ = + objc.registerName("setRequestCachePolicy:"); +late final _sel_timeoutIntervalForRequest = + objc.registerName("timeoutIntervalForRequest"); +late final _sel_setTimeoutIntervalForRequest_ = + objc.registerName("setTimeoutIntervalForRequest:"); +late final _sel_timeoutIntervalForResource = + objc.registerName("timeoutIntervalForResource"); +late final _sel_setTimeoutIntervalForResource_ = + objc.registerName("setTimeoutIntervalForResource:"); +late final _sel_waitsForConnectivity = + objc.registerName("waitsForConnectivity"); +late final _sel_setWaitsForConnectivity_ = + objc.registerName("setWaitsForConnectivity:"); +late final _sel_isDiscretionary = objc.registerName("isDiscretionary"); +late final _sel_setDiscretionary_ = objc.registerName("setDiscretionary:"); +late final _sel_sharedContainerIdentifier = + objc.registerName("sharedContainerIdentifier"); +late final _sel_setSharedContainerIdentifier_ = + objc.registerName("setSharedContainerIdentifier:"); +late final _sel_sessionSendsLaunchEvents = + objc.registerName("sessionSendsLaunchEvents"); +late final _sel_setSessionSendsLaunchEvents_ = + objc.registerName("setSessionSendsLaunchEvents:"); +late final _sel_connectionProxyDictionary = + objc.registerName("connectionProxyDictionary"); +late final _sel_setConnectionProxyDictionary_ = + objc.registerName("setConnectionProxyDictionary:"); - NSString? get preferredFilename { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_preferredFilename1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +abstract class SSLProtocol { + static const int kSSLProtocolUnknown = 0; + static const int kTLSProtocol1 = 4; + static const int kTLSProtocol11 = 7; + static const int kTLSProtocol12 = 8; + static const int kDTLSProtocol1 = 9; + static const int kTLSProtocol13 = 10; + static const int kDTLSProtocol12 = 11; + static const int kTLSProtocolMaxSupported = 999; + static const int kSSLProtocol2 = 1; + static const int kSSLProtocol3 = 2; + static const int kSSLProtocol3Only = 3; + static const int kTLSProtocol1Only = 5; + static const int kSSLProtocolAll = 6; +} - set preferredFilename(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setPreferredFilename_1, value?._id ?? ffi.nullptr); - } +late final _sel_TLSMinimumSupportedProtocol = + objc.registerName("TLSMinimumSupportedProtocol"); +final _objc_msgSend_595 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setTLSMinimumSupportedProtocol_ = + objc.registerName("setTLSMinimumSupportedProtocol:"); +final _objc_msgSend_596 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_TLSMaximumSupportedProtocol = + objc.registerName("TLSMaximumSupportedProtocol"); +late final _sel_setTLSMaximumSupportedProtocol_ = + objc.registerName("setTLSMaximumSupportedProtocol:"); - NSString? get filename { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_filename1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +abstract class tls_protocol_version_t { + static const int tls_protocol_version_TLSv10 = 769; + static const int tls_protocol_version_TLSv11 = 770; + static const int tls_protocol_version_TLSv12 = 771; + static const int tls_protocol_version_TLSv13 = 772; + static const int tls_protocol_version_DTLSv10 = -257; + static const int tls_protocol_version_DTLSv12 = -259; +} - set filename(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setFilename_1, value?._id ?? ffi.nullptr); - } +late final _sel_TLSMinimumSupportedProtocolVersion = + objc.registerName("TLSMinimumSupportedProtocolVersion"); +final _objc_msgSend_597 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setTLSMinimumSupportedProtocolVersion_ = + objc.registerName("setTLSMinimumSupportedProtocolVersion:"); +final _objc_msgSend_598 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_TLSMaximumSupportedProtocolVersion = + objc.registerName("TLSMaximumSupportedProtocolVersion"); +late final _sel_setTLSMaximumSupportedProtocolVersion_ = + objc.registerName("setTLSMaximumSupportedProtocolVersion:"); +late final _sel_HTTPShouldSetCookies = + objc.registerName("HTTPShouldSetCookies"); +late final _sel_setHTTPShouldSetCookies_ = + objc.registerName("setHTTPShouldSetCookies:"); +late final _sel_HTTPCookieAcceptPolicy = + objc.registerName("HTTPCookieAcceptPolicy"); +late final _sel_setHTTPCookieAcceptPolicy_ = + objc.registerName("setHTTPCookieAcceptPolicy:"); +late final _sel_HTTPAdditionalHeaders = + objc.registerName("HTTPAdditionalHeaders"); +late final _sel_setHTTPAdditionalHeaders_ = + objc.registerName("setHTTPAdditionalHeaders:"); +late final _sel_HTTPMaximumConnectionsPerHost = + objc.registerName("HTTPMaximumConnectionsPerHost"); +late final _sel_setHTTPMaximumConnectionsPerHost_ = + objc.registerName("setHTTPMaximumConnectionsPerHost:"); +late final _sel_HTTPCookieStorage = objc.registerName("HTTPCookieStorage"); +final _objc_msgSend_599 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setHTTPCookieStorage_ = + objc.registerName("setHTTPCookieStorage:"); +final _objc_msgSend_600 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_URLCredentialStorage = + objc.registerName("URLCredentialStorage"); +final _objc_msgSend_601 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setURLCredentialStorage_ = + objc.registerName("setURLCredentialStorage:"); +final _objc_msgSend_602 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_URLCache = objc.registerName("URLCache"); +final _objc_msgSend_603 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setURLCache_ = objc.registerName("setURLCache:"); +final _objc_msgSend_604 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_shouldUseExtendedBackgroundIdleMode = + objc.registerName("shouldUseExtendedBackgroundIdleMode"); +late final _sel_setShouldUseExtendedBackgroundIdleMode_ = + objc.registerName("setShouldUseExtendedBackgroundIdleMode:"); +late final _sel_protocolClasses = objc.registerName("protocolClasses"); +late final _sel_setProtocolClasses_ = objc.registerName("setProtocolClasses:"); +final _objc_msgSend_605 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - NSDictionary get fileAttributes { - final _ret = _lib._objc_msgSend_181(_id, _lib._sel_fileAttributes1); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +abstract class NSURLSessionMultipathServiceType { + static const int NSURLSessionMultipathServiceTypeNone = 0; + static const int NSURLSessionMultipathServiceTypeHandover = 1; + static const int NSURLSessionMultipathServiceTypeInteractive = 2; + static const int NSURLSessionMultipathServiceTypeAggregate = 3; +} - set fileAttributes(NSDictionary value) { - return _lib._objc_msgSend_182( - _id, _lib._sel_setFileAttributes_1, value._id); - } +late final _sel_multipathServiceType = + objc.registerName("multipathServiceType"); +final _objc_msgSend_606 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setMultipathServiceType_ = + objc.registerName("setMultipathServiceType:"); +final _objc_msgSend_607 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_backgroundSessionConfiguration_ = + objc.registerName("backgroundSessionConfiguration:"); +late final _sel_sessionWithConfiguration_ = + objc.registerName("sessionWithConfiguration:"); +final _objc_msgSend_608 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_sessionWithConfiguration_delegate_delegateQueue_ = + objc.registerName("sessionWithConfiguration:delegate:delegateQueue:"); +final _objc_msgSend_609 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_delegateQueue = objc.registerName("delegateQueue"); +late final _sel_configuration = objc.registerName("configuration"); +late final _sel_sessionDescription = objc.registerName("sessionDescription"); +late final _sel_setSessionDescription_ = + objc.registerName("setSessionDescription:"); +late final _sel_finishTasksAndInvalidate = + objc.registerName("finishTasksAndInvalidate"); +late final _sel_invalidateAndCancel = objc.registerName("invalidateAndCancel"); +late final _sel_resetWithCompletionHandler_ = + objc.registerName("resetWithCompletionHandler:"); +late final _sel_flushWithCompletionHandler_ = + objc.registerName("flushWithCompletionHandler:"); +void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - bool matchesContentsOfURL_(NSURL url) { - return _lib._objc_msgSend_265( - _id, _lib._sel_matchesContentsOfURL_1, url._id); - } +void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); - bool readFromURL_options_error_( - NSURL url, int options, ffi.Pointer> outError) { - return _lib._objc_msgSend_1033( - _id, _lib._sel_readFromURL_options_error_1, url._id, options, outError); - } +class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSArray_NSArray_NSArray._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); - bool writeToURL_options_originalContentsURL_error_( - NSURL url, - int options, - NSURL? originalContentsURL, - ffi.Pointer> outError) { - return _lib._objc_msgSend_1034( - _id, - _lib._sel_writeToURL_options_originalContentsURL_error_1, - url._id, - options, - originalContentsURL?._id ?? ffi.nullptr, - outError); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSArray_NSArray_NSArray castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSArray_NSArray_NSArray._(pointer, + retain: retain, release: release); } - NSData? get serializedRepresentation { - final _ret = - _lib._objc_msgSend_286(_id, _lib._sel_serializedRepresentation1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - NSString addFileWrapper_(NSFileWrapper child) { - final _ret = - _lib._objc_msgSend_1035(_id, _lib._sel_addFileWrapper_1, child._id); - return NSString._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.fromFunction( + void Function(objc.NSArray, objc.NSArray, objc.NSArray) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + objc.NSArray.castFromPointer(arg0, retain: true, release: true), + objc.NSArray.castFromPointer(arg1, retain: true, release: true), + objc.NSArray.castFromPointer(arg2, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; - NSString addRegularFileWithContents_preferredFilename_( - NSData data, NSString fileName) { - final _ret = _lib._objc_msgSend_1036( - _id, - _lib._sel_addRegularFileWithContents_preferredFilename_1, - data._id, - fileName._id); - return NSString._(_ret, _lib, retain: true, release: true); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.listener( + void Function(objc.NSArray, objc.NSArray, objc.NSArray) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + objc.NSArray.castFromPointer(arg0, retain: true, release: true), + objc.NSArray.castFromPointer(arg1, retain: true, release: true), + objc.NSArray.castFromPointer(arg2, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; - void removeFileWrapper_(NSFileWrapper child) { - _lib._objc_msgSend_1037(_id, _lib._sel_removeFileWrapper_1, child._id); - } + void call(objc.NSArray arg0, objc.NSArray arg1, objc.NSArray arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1.pointer, arg2.pointer); +} + +late final _sel_getTasksWithCompletionHandler_ = + objc.registerName("getTasksWithCompletionHandler:"); +final _objc_msgSend_610 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSArray1_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSArray1_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSArray1_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSArray1_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSArray1_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - NSDictionary? get fileWrappers { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_fileWrappers1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock_ffiVoid_NSArray1_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSArray1_closureRegistry[block.ref.target.address]!( + arg0); - NSString? keyForFileWrapper_(NSFileWrapper child) { - final _ret = - _lib._objc_msgSend_1038(_id, _lib._sel_keyForFileWrapper_1, child._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock_ffiVoid_NSArray1 extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSArray1._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); - NSData? get regularFileContents { - final _ret = _lib._objc_msgSend_286(_id, _lib._sel_regularFileContents1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSArray1 castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSArray1._(pointer, + retain: retain, release: release); } - NSURL? get symbolicLinkDestinationURL { - final _ret = - _lib._objc_msgSend_45(_id, _lib._sel_symbolicLinkDestinationURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSArray1.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - NSObject? initWithPath_(NSString path) { - final _ret = _lib._objc_msgSend_38(_id, _lib._sel_initWithPath_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSArray1.fromFunction(void Function(objc.NSArray) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSArray1_registerClosure( + (ffi.Pointer arg0) => fn( + objc.NSArray.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; - NSObject initSymbolicLinkWithDestination_(NSString path) { - final _ret = _lib._objc_msgSend_31( - _id, _lib._sel_initSymbolicLinkWithDestination_1, path._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSArray1.listener(void Function(objc.NSArray) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSArray1_registerClosure( + (ffi.Pointer arg0) => fn( + objc.NSArray.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; - bool needsToBeUpdatedFromPath_(NSString path) { - return _lib._objc_msgSend_64( - _id, _lib._sel_needsToBeUpdatedFromPath_1, path._id); - } + void call(objc.NSArray arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(pointer, arg0.pointer); +} + +late final _sel_getAllTasksWithCompletionHandler_ = + objc.registerName("getAllTasksWithCompletionHandler:"); +final _objc_msgSend_611 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dataTaskWithRequest_ = + objc.registerName("dataTaskWithRequest:"); +final _objc_msgSend_612 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dataTaskWithURL_ = objc.registerName("dataTaskWithURL:"); +final _objc_msgSend_613 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - bool updateFromPath_(NSString path) { - return _lib._objc_msgSend_64(_id, _lib._sel_updateFromPath_1, path._id); - } +class NSURLSessionUploadTask extends NSURLSessionDataTask { + NSURLSessionUploadTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - bool writeToFile_atomically_updateFilenames_( - NSString path, bool atomicFlag, bool updateFilenamesFlag) { - return _lib._objc_msgSend_1039( - _id, - _lib._sel_writeToFile_atomically_updateFilenames_1, - path._id, - atomicFlag, - updateFilenamesFlag); - } + /// Constructs a [NSURLSessionUploadTask] that points to the same underlying object as [other]. + NSURLSessionUploadTask.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSString addFileWithPath_(NSString path) { - final _ret = - _lib._objc_msgSend_69(_id, _lib._sel_addFileWithPath_1, path._id); - return NSString._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSURLSessionUploadTask] that wraps the given raw object pointer. + NSURLSessionUploadTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - NSString addSymbolicLinkWithDestination_preferredFilename_( - NSString path, NSString filename) { - final _ret = _lib._objc_msgSend_364( - _id, - _lib._sel_addSymbolicLinkWithDestination_preferredFilename_1, - path._id, - filename._id); - return NSString._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSURLSessionUploadTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionUploadTask); } - NSString symbolicLinkDestination() { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_symbolicLinkDestination1); - return NSString._(_ret, _lib, retain: true, release: true); + @override + NSURLSessionUploadTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - @override - NSFileWrapper init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSFileWrapper._(_ret, _lib, retain: true, release: true); + static NSURLSessionUploadTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionUploadTask, _sel_new); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: false, release: true); } - static NSFileWrapper new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFileWrapper1, _lib._sel_new1); - return NSFileWrapper._(_ret, _lib, retain: false, release: true); + void cancelByProducingResumeData_( + ObjCBlock_ffiVoid_NSData completionHandler) { + _objc_msgSend_614(this.pointer, _sel_cancelByProducingResumeData_, + completionHandler.pointer); } - static NSFileWrapper allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSFileWrapper1, _lib._sel_allocWithZone_1, zone); - return NSFileWrapper._(_ret, _lib, retain: false, release: true); + static NSURLSessionUploadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionUploadTask, _sel_allocWithZone_, zone); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: false, release: true); } - static NSFileWrapper alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFileWrapper1, _lib._sel_alloc1); - return NSFileWrapper._(_ret, _lib, retain: false, release: true); + static NSURLSessionUploadTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionUploadTask, _sel_alloc); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSFileWrapper1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionUploadTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSFileWrapper1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionUploadTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSFileWrapper1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLSessionUploadTask, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSFileWrapper1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSURLSessionUploadTask, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSFileWrapper1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionUploadTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSFileWrapper1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionUploadTask, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSFileWrapper1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionUploadTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSFileWrapper1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionUploadTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSFileWrapper1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionUploadTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -abstract class NSFileWrapperReadingOptions { - static const int NSFileWrapperReadingImmediate = 1; - static const int NSFileWrapperReadingWithoutMapping = 2; +late final _class_NSURLSessionUploadTask = + objc.getClass("NSURLSessionUploadTask"); +void _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSData_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSData_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSData_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSData_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSData_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -abstract class NSFileWrapperWritingOptions { - static const int NSFileWrapperWritingAtomic = 1; - static const int NSFileWrapperWritingWithNameUpdating = 2; -} +void _ObjCBlock_ffiVoid_NSData_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSData_closureRegistry[block.ref.target.address]!(arg0); -class NSURLSession extends NSObject { - NSURLSession._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +class ObjCBlock_ffiVoid_NSData extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSData._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); - /// Returns a [NSURLSession] that points to the same underlying object as [other]. - static NSURLSession castFrom(T other) { - return NSURLSession._(other._id, other._lib, retain: true, release: true); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSData castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSData._(pointer, + retain: retain, release: release); } - /// Returns a [NSURLSession] that wraps the given raw object pointer. - static NSURLSession castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSession._(other, lib, retain: retain, release: release); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - /// 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); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData.fromFunction(void Function(objc.NSData?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSData_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; - static NSURLSession getSharedSession(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_1040( - _lib._class_NSURLSession1, _lib._sel_sharedSession1); - return NSURLSession._(_ret, _lib, retain: true, release: true); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSData.listener(void Function(objc.NSData?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSData_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; - static NSURLSession sessionWithConfiguration_( - AVFAudio _lib, NSURLSessionConfiguration configuration) { - final _ret = _lib._objc_msgSend_1056(_lib._class_NSURLSession1, - _lib._sel_sessionWithConfiguration_1, configuration._id); - return NSURLSession._(_ret, _lib, retain: true, release: true); - } + void call(objc.NSData? arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr); +} + +late final _sel_cancelByProducingResumeData_ = + objc.registerName("cancelByProducingResumeData:"); +final _objc_msgSend_614 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_uploadTaskWithRequest_fromFile_ = + objc.registerName("uploadTaskWithRequest:fromFile:"); +final _objc_msgSend_615 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_uploadTaskWithRequest_fromData_ = + objc.registerName("uploadTaskWithRequest:fromData:"); +final _objc_msgSend_616 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_uploadTaskWithResumeData_ = + objc.registerName("uploadTaskWithResumeData:"); +final _objc_msgSend_617 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_uploadTaskWithStreamedRequest_ = + objc.registerName("uploadTaskWithStreamedRequest:"); +final _objc_msgSend_618 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( - AVFAudio _lib, - NSURLSessionConfiguration configuration, - NSObject? delegate, - NSOperationQueue? queue) { - final _ret = _lib._objc_msgSend_1057( - _lib._class_NSURLSession1, - _lib._sel_sessionWithConfiguration_delegate_delegateQueue_1, - configuration._id, - delegate?._id ?? ffi.nullptr, - queue?._id ?? ffi.nullptr); - return NSURLSession._(_ret, _lib, retain: true, release: true); - } +class NSURLSessionDownloadTask extends NSURLSessionTask { + NSURLSessionDownloadTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSOperationQueue get delegateQueue { - final _ret = _lib._objc_msgSend_917(_id, _lib._sel_delegateQueue1); - return NSOperationQueue._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSURLSessionDownloadTask] that points to the same underlying object as [other]. + NSURLSessionDownloadTask.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSObject? get delegate { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSURLSessionDownloadTask] that wraps the given raw object pointer. + NSURLSessionDownloadTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - NSURLSessionConfiguration get configuration { - final _ret = _lib._objc_msgSend_1041(_id, _lib._sel_configuration1); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSURLSessionDownloadTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionDownloadTask); } - NSString? get sessionDescription { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_sessionDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + void cancelByProducingResumeData_( + ObjCBlock_ffiVoid_NSData completionHandler) { + _objc_msgSend_614(this.pointer, _sel_cancelByProducingResumeData_, + completionHandler.pointer); } - set sessionDescription(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setSessionDescription_1, value?._id ?? ffi.nullptr); + @override + NSURLSessionDownloadTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - void finishTasksAndInvalidate() { - _lib._objc_msgSend_1(_id, _lib._sel_finishTasksAndInvalidate1); + static NSURLSessionDownloadTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionDownloadTask, _sel_new); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: false, release: true); } - void invalidateAndCancel() { - _lib._objc_msgSend_1(_id, _lib._sel_invalidateAndCancel1); + static NSURLSessionDownloadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionDownloadTask, _sel_allocWithZone_, zone); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: false, release: true); } - void resetWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { - _lib._objc_msgSend_532( - _id, _lib._sel_resetWithCompletionHandler_1, completionHandler._id); + static NSURLSessionDownloadTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionDownloadTask, _sel_alloc); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: false, release: true); } - void flushWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { - _lib._objc_msgSend_532( - _id, _lib._sel_flushWithCompletionHandler_1, completionHandler._id); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionDownloadTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - void getTasksWithCompletionHandler_( - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray completionHandler) { - _lib._objc_msgSend_1058( - _id, _lib._sel_getTasksWithCompletionHandler_1, completionHandler._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionDownloadTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - void getAllTasksWithCompletionHandler_( - ObjCBlock_ffiVoid_NSArray1 completionHandler) { - _lib._objc_msgSend_1059(_id, _lib._sel_getAllTasksWithCompletionHandler_1, - completionHandler._id); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLSessionDownloadTask, _sel_accessInstanceVariablesDirectly); } - NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest request) { - final _ret = _lib._objc_msgSend_1060( - _id, _lib._sel_dataTaskWithRequest_1, request._id); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSURLSessionDownloadTask, _sel_useStoredAccessor); } - NSURLSessionDataTask dataTaskWithURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_1061(_id, _lib._sel_dataTaskWithURL_1, url._id); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionDownloadTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( - NSURLRequest request, NSURL fileURL) { - final _ret = _lib._objc_msgSend_1063(_id, - _lib._sel_uploadTaskWithRequest_fromFile_1, request._id, fileURL._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionDownloadTask, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSURLSessionUploadTask uploadTaskWithRequest_fromData_( - NSURLRequest request, NSData bodyData) { - final _ret = _lib._objc_msgSend_1064(_id, - _lib._sel_uploadTaskWithRequest_fromData_1, request._id, bodyData._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionDownloadTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionDownloadTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionDownloadTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSURLSessionDownloadTask = + objc.getClass("NSURLSessionDownloadTask"); +late final _sel_downloadTaskWithRequest_ = + objc.registerName("downloadTaskWithRequest:"); +final _objc_msgSend_619 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_downloadTaskWithURL_ = + objc.registerName("downloadTaskWithURL:"); +final _objc_msgSend_620 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_downloadTaskWithResumeData_ = + objc.registerName("downloadTaskWithResumeData:"); +final _objc_msgSend_621 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - NSURLSessionUploadTask uploadTaskWithResumeData_(NSData resumeData) { - final _ret = _lib._objc_msgSend_1065( - _id, _lib._sel_uploadTaskWithResumeData_1, resumeData._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } +class NSURLSessionStreamTask extends NSURLSessionTask { + NSURLSessionStreamTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest request) { - final _ret = _lib._objc_msgSend_1066( - _id, _lib._sel_uploadTaskWithStreamedRequest_1, request._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSURLSessionStreamTask] that points to the same underlying object as [other]. + NSURLSessionStreamTask.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest request) { - final _ret = _lib._objc_msgSend_1067( - _id, _lib._sel_downloadTaskWithRequest_1, request._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + /// Constructs a [NSURLSessionStreamTask] that wraps the given raw object pointer. + NSURLSessionStreamTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLSessionStreamTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionStreamTask); } - NSURLSessionDownloadTask downloadTaskWithURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_1068(_id, _lib._sel_downloadTaskWithURL_1, url._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + void readDataOfMinLength_maxLength_timeout_completionHandler_( + int minBytes, + int maxBytes, + double timeout, + ObjCBlock_ffiVoid_NSData_bool_NSError completionHandler) { + _objc_msgSend_622( + this.pointer, + _sel_readDataOfMinLength_maxLength_timeout_completionHandler_, + minBytes, + maxBytes, + timeout, + completionHandler.pointer); } - NSURLSessionDownloadTask downloadTaskWithResumeData_(NSData resumeData) { - final _ret = _lib._objc_msgSend_1069( - _id, _lib._sel_downloadTaskWithResumeData_1, resumeData._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + void writeData_timeout_completionHandler_(objc.NSData data, double timeout, + ObjCBlock_ffiVoid_NSError completionHandler) { + _objc_msgSend_623(this.pointer, _sel_writeData_timeout_completionHandler_, + data.pointer, timeout, completionHandler.pointer); } - NSURLSessionStreamTask streamTaskWithHostName_port_( - NSString hostname, int port) { - final _ret = _lib._objc_msgSend_1072( - _id, _lib._sel_streamTaskWithHostName_port_1, hostname._id, port); - return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); + void captureStreams() { + _objc_msgSend_82(this.pointer, _sel_captureStreams); } - NSURLSessionStreamTask streamTaskWithNetService_(NSNetService service) { - final _ret = _lib._objc_msgSend_1080( - _id, _lib._sel_streamTaskWithNetService_1, service._id); - return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); + void closeWrite() { + _objc_msgSend_82(this.pointer, _sel_closeWrite); } - NSURLSessionWebSocketTask webSocketTaskWithURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_1087(_id, _lib._sel_webSocketTaskWithURL_1, url._id); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + void closeRead() { + _objc_msgSend_82(this.pointer, _sel_closeRead); } - NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( - NSURL url, NSArray protocols) { - final _ret = _lib._objc_msgSend_1088(_id, - _lib._sel_webSocketTaskWithURL_protocols_1, url._id, protocols._id); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + void startSecureConnection() { + _objc_msgSend_82(this.pointer, _sel_startSecureConnection); } - NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest request) { - final _ret = _lib._objc_msgSend_1089( - _id, _lib._sel_webSocketTaskWithRequest_1, request._id); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + void stopSecureConnection() { + _objc_msgSend_82(this.pointer, _sel_stopSecureConnection); } @override - NSURLSession init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSession._(_ret, _lib, retain: true, release: true); + NSURLSessionStreamTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); } - static NSURLSession new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_new1); - return NSURLSession._(_ret, _lib, retain: false, release: true); + static NSURLSessionStreamTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionStreamTask, _sel_new); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); } - NSURLSessionDataTask dataTaskWithRequest_completionHandler_( - NSURLRequest request, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_1090( - _id, - _lib._sel_dataTaskWithRequest_completionHandler_1, - request._id, - completionHandler._id); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + static NSURLSessionStreamTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionStreamTask, _sel_allocWithZone_, zone); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); } - NSURLSessionDataTask dataTaskWithURL_completionHandler_(NSURL url, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_1091( - _id, - _lib._sel_dataTaskWithURL_completionHandler_1, - url._id, - completionHandler._id); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + static NSURLSessionStreamTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionStreamTask, _sel_alloc); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); } - NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( - NSURLRequest request, - NSURL fileURL, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_1092( - _id, - _lib._sel_uploadTaskWithRequest_fromFile_completionHandler_1, - request._id, - fileURL._id, - completionHandler._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionStreamTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( - NSURLRequest request, - NSData? bodyData, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_1093( - _id, - _lib._sel_uploadTaskWithRequest_fromData_completionHandler_1, - request._id, - bodyData?._id ?? ffi.nullptr, - completionHandler._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionStreamTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSURLSessionUploadTask uploadTaskWithResumeData_completionHandler_( - NSData resumeData, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_1094( - _id, - _lib._sel_uploadTaskWithResumeData_completionHandler_1, - resumeData._id, - completionHandler._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLSessionStreamTask, _sel_accessInstanceVariablesDirectly); } - NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( - NSURLRequest request, - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_1095( - _id, - _lib._sel_downloadTaskWithRequest_completionHandler_1, - request._id, - completionHandler._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSURLSessionStreamTask, _sel_useStoredAccessor); } - NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_(NSURL url, - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_1096( - _id, - _lib._sel_downloadTaskWithURL_completionHandler_1, - url._id, - completionHandler._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionStreamTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( - NSData resumeData, - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_1097( - _id, - _lib._sel_downloadTaskWithResumeData_completionHandler_1, - resumeData._id, - completionHandler._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionStreamTask, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static NSURLSession allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLSession1, _lib._sel_allocWithZone_1, zone); - return NSURLSession._(_ret, _lib, retain: false, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionStreamTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSURLSession alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_alloc1); - return NSURLSession._(_ret, _lib, retain: false, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionStreamTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLSession1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionStreamTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLSession1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } +late final _class_NSURLSessionStreamTask = + objc.getClass("NSURLSessionStreamTask"); +void _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Bool arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, bool, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry = , bool, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( + void Function( + ffi.Pointer, bool, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_NSData_bool_NSError extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSData_bool_NSError._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLSession1, _lib._sel_accessInstanceVariablesDirectly1); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSData_bool_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSData_bool_NSError._(pointer, + retain: retain, release: release); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLSession1, _lib._sel_useStoredAccessor1); + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData_bool_NSError.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Bool arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData_bool_NSError.fromFunction( + void Function(objc.NSData, bool, objc.NSError?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( + (ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) => + fn(objc.NSData.castFromPointer(arg0, retain: true, release: true), arg1, arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSData_bool_NSError.listener( + void Function(objc.NSData, bool, objc.NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Bool, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( + (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn( + objc.NSData.castFromPointer(arg0, + retain: true, release: true), + arg1, + arg2.address == 0 + ? null + : objc.NSError.castFromPointer(arg2, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(objc.NSData arg0, bool arg1, objc.NSError? arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1, arg2?.pointer ?? ffi.nullptr); +} + +late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_ = objc + .registerName("readDataOfMinLength:maxLength:timeout:completionHandler:"); +final _objc_msgSend_622 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Double, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + double, + ffi.Pointer)>(); +late final _sel_writeData_timeout_completionHandler_ = + objc.registerName("writeData:timeout:completionHandler:"); +final _objc_msgSend_623 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer)>(); +late final _sel_captureStreams = objc.registerName("captureStreams"); +late final _sel_closeWrite = objc.registerName("closeWrite"); +late final _sel_closeRead = objc.registerName("closeRead"); +late final _sel_startSecureConnection = + objc.registerName("startSecureConnection"); +late final _sel_stopSecureConnection = + objc.registerName("stopSecureConnection"); +late final _sel_streamTaskWithHostName_port_ = + objc.registerName("streamTaskWithHostName:port:"); +final _objc_msgSend_624 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); + +class NSNetService extends objc.NSObject { + NSNetService._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSNetService] that points to the same underlying object as [other]. + NSNetService.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSNetService] that wraps the given raw object pointer. + NSNetService.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSNetService]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSNetService); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLSession1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + NSNetService initWithDomain_type_name_port_( + objc.NSString domain, objc.NSString type, objc.NSString name, int port) { + final _ret = _objc_msgSend_625( + this.pointer, + _sel_initWithDomain_type_name_port_, + domain.pointer, + type.pointer, + name.pointer, + port); + return NSNetService.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLSession1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + NSNetService initWithDomain_type_name_( + objc.NSString domain, objc.NSString type, objc.NSString name) { + final _ret = _objc_msgSend_626(this.pointer, _sel_initWithDomain_type_name_, + domain.pointer, type.pointer, name.pointer); + return NSNetService.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLSession1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_scheduleInRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSURLSession1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_removeFromRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSession1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } -} -class NSURLSessionConfiguration extends NSObject { - NSURLSessionConfiguration._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); + } - /// 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); + bool get includesPeerToPeer { + return _objc_msgSend_7(this.pointer, _sel_includesPeerToPeer); } - /// Returns a [NSURLSessionConfiguration] that wraps the given raw object pointer. - static NSURLSessionConfiguration castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionConfiguration._(other, lib, - retain: retain, release: release); + set includesPeerToPeer(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setIncludesPeerToPeer_, value); } - /// 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); + objc.NSString get name { + final _ret = _objc_msgSend_12(this.pointer, _sel_name); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionConfiguration getDefaultSessionConfiguration( - AVFAudio _lib) { - final _ret = _lib._objc_msgSend_1041(_lib._class_NSURLSessionConfiguration1, - _lib._sel_defaultSessionConfiguration1); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + objc.NSString get type { + final _ret = _objc_msgSend_12(this.pointer, _sel_type); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionConfiguration getEphemeralSessionConfiguration( - AVFAudio _lib) { - final _ret = _lib._objc_msgSend_1041(_lib._class_NSURLSessionConfiguration1, - _lib._sel_ephemeralSessionConfiguration1); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + objc.NSString get domain { + final _ret = _objc_msgSend_12(this.pointer, _sel_domain); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionConfiguration - backgroundSessionConfigurationWithIdentifier_( - AVFAudio _lib, NSString identifier) { - final _ret = _lib._objc_msgSend_1042( - _lib._class_NSURLSessionConfiguration1, - _lib._sel_backgroundSessionConfigurationWithIdentifier_1, - identifier._id); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + objc.NSString? get hostName { + final _ret = _objc_msgSend_13(this.pointer, _sel_hostName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get identifier { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_identifier1); + objc.NSArray? get addresses { + final _ret = _objc_msgSend_69(this.pointer, _sel_addresses); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int get requestCachePolicy { - return _lib._objc_msgSend_859(_id, _lib._sel_requestCachePolicy1); + int get port { + return _objc_msgSend_114(this.pointer, _sel_port); } - set requestCachePolicy(int value) { - return _lib._objc_msgSend_1017( - _id, _lib._sel_setRequestCachePolicy_1, value); + void publish() { + _objc_msgSend_82(this.pointer, _sel_publish); } - double get timeoutIntervalForRequest { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret( - _id, _lib._sel_timeoutIntervalForRequest1) - : _lib._objc_msgSend_165(_id, _lib._sel_timeoutIntervalForRequest1); + void publishWithOptions_(int options) { + _objc_msgSend_627(this.pointer, _sel_publishWithOptions_, options); } - set timeoutIntervalForRequest(double value) { - return _lib._objc_msgSend_542( - _id, _lib._sel_setTimeoutIntervalForRequest_1, value); + void resolve() { + _objc_msgSend_82(this.pointer, _sel_resolve); } - double get timeoutIntervalForResource { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret( - _id, _lib._sel_timeoutIntervalForResource1) - : _lib._objc_msgSend_165(_id, _lib._sel_timeoutIntervalForResource1); + void stop() { + _objc_msgSend_82(this.pointer, _sel_stop); } - set timeoutIntervalForResource(double value) { - return _lib._objc_msgSend_542( - _id, _lib._sel_setTimeoutIntervalForResource_1, value); + static objc.NSDictionary dictionaryFromTXTRecordData_(objc.NSData txtData) { + final _ret = _objc_msgSend_628(_class_NSNetService, + _sel_dictionaryFromTXTRecordData_, txtData.pointer); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - int get networkServiceType { - return _lib._objc_msgSend_860(_id, _lib._sel_networkServiceType1); + static objc.NSData dataFromTXTRecordDictionary_( + objc.NSDictionary txtDictionary) { + final _ret = _objc_msgSend_629(_class_NSNetService, + _sel_dataFromTXTRecordDictionary_, txtDictionary.pointer); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - set networkServiceType(int value) { - return _lib._objc_msgSend_1018( - _id, _lib._sel_setNetworkServiceType_1, value); + void resolveWithTimeout_(double timeout) { + _objc_msgSend_630(this.pointer, _sel_resolveWithTimeout_, timeout); } - bool get allowsCellularAccess { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsCellularAccess1); + bool getInputStream_outputStream_( + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _objc_msgSend_631(this.pointer, _sel_getInputStream_outputStream_, + inputStream, outputStream); } - set allowsCellularAccess(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setAllowsCellularAccess_1, value); + bool setTXTRecordData_(objc.NSData? recordData) { + return _objc_msgSend_632(this.pointer, _sel_setTXTRecordData_, + recordData?.pointer ?? ffi.nullptr); } - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsExpensiveNetworkAccess1); + objc.NSData? TXTRecordData() { + final _ret = _objc_msgSend_325(this.pointer, _sel_TXTRecordData); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - set allowsExpensiveNetworkAccess(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); + void startMonitoring() { + _objc_msgSend_82(this.pointer, _sel_startMonitoring); } - bool get allowsConstrainedNetworkAccess { - return _lib._objc_msgSend_12( - _id, _lib._sel_allowsConstrainedNetworkAccess1); + void stopMonitoring() { + _objc_msgSend_82(this.pointer, _sel_stopMonitoring); } - set allowsConstrainedNetworkAccess(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); + @override + NSNetService init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSNetService.castFromPointer(_ret, retain: true, release: true); } - bool get requiresDNSSECValidation { - return _lib._objc_msgSend_12(_id, _lib._sel_requiresDNSSECValidation1); + static NSNetService new1() { + final _ret = _objc_msgSend_40(_class_NSNetService, _sel_new); + return NSNetService.castFromPointer(_ret, retain: false, release: true); } - set requiresDNSSECValidation(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setRequiresDNSSECValidation_1, value); + static NSNetService allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSNetService, _sel_allocWithZone_, zone); + return NSNetService.castFromPointer(_ret, retain: false, release: true); } - bool get waitsForConnectivity { - return _lib._objc_msgSend_12(_id, _lib._sel_waitsForConnectivity1); + static NSNetService alloc() { + final _ret = _objc_msgSend_40(_class_NSNetService, _sel_alloc); + return NSNetService.castFromPointer(_ret, retain: false, release: true); } - set waitsForConnectivity(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setWaitsForConnectivity_1, value); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSNetService, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - bool get discretionary { - return _lib._objc_msgSend_12(_id, _lib._sel_isDiscretionary1); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSNetService, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - set discretionary(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setDiscretionary_1, value); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSNetService, _sel_accessInstanceVariablesDirectly); } - NSString? get sharedContainerIdentifier { - final _ret = - _lib._objc_msgSend_44(_id, _lib._sel_sharedContainerIdentifier1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSNetService, _sel_useStoredAccessor); } - set sharedContainerIdentifier(NSString? value) { - return _lib._objc_msgSend_545(_id, _lib._sel_setSharedContainerIdentifier_1, - value?._id ?? ffi.nullptr); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSNetService, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - bool get sessionSendsLaunchEvents { - return _lib._objc_msgSend_12(_id, _lib._sel_sessionSendsLaunchEvents1); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSNetService, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - set sessionSendsLaunchEvents(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setSessionSendsLaunchEvents_1, value); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSNetService, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSNetService, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSNetService, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSNetService = objc.getClass("NSNetService"); +late final _sel_initWithDomain_type_name_port_ = + objc.registerName("initWithDomain:type:name:port:"); +final _objc_msgSend_625 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_initWithDomain_type_name_ = + objc.registerName("initWithDomain:type:name:"); +final _objc_msgSend_626 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_includesPeerToPeer = objc.registerName("includesPeerToPeer"); +late final _sel_setIncludesPeerToPeer_ = + objc.registerName("setIncludesPeerToPeer:"); +late final _sel_type = objc.registerName("type"); +late final _sel_publish = objc.registerName("publish"); + +abstract class NSNetServiceOptions { + static const int NSNetServiceNoAutoRename = 1; + static const int NSNetServiceListenForConnections = 2; +} + +late final _sel_publishWithOptions_ = objc.registerName("publishWithOptions:"); +final _objc_msgSend_627 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_resolve = objc.registerName("resolve"); +late final _sel_stop = objc.registerName("stop"); +late final _sel_dictionaryFromTXTRecordData_ = + objc.registerName("dictionaryFromTXTRecordData:"); +final _objc_msgSend_628 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dataFromTXTRecordDictionary_ = + objc.registerName("dataFromTXTRecordDictionary:"); +final _objc_msgSend_629 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_resolveWithTimeout_ = objc.registerName("resolveWithTimeout:"); +final _objc_msgSend_630 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, double)>(); +late final _sel_getInputStream_outputStream_ = + objc.registerName("getInputStream:outputStream:"); +final _objc_msgSend_631 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); +late final _sel_setTXTRecordData_ = objc.registerName("setTXTRecordData:"); +final _objc_msgSend_632 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_TXTRecordData = objc.registerName("TXTRecordData"); +late final _sel_startMonitoring = objc.registerName("startMonitoring"); +late final _sel_stopMonitoring = objc.registerName("stopMonitoring"); +late final _sel_streamTaskWithNetService_ = + objc.registerName("streamTaskWithNetService:"); +final _objc_msgSend_633 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class NSURLSessionWebSocketTask extends NSURLSessionTask { + NSURLSessionWebSocketTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLSessionWebSocketTask] that points to the same underlying object as [other]. + NSURLSessionWebSocketTask.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSURLSessionWebSocketTask] that wraps the given raw object pointer. + NSURLSessionWebSocketTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLSessionWebSocketTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionWebSocketTask); } - NSDictionary? get connectionProxyDictionary { - final _ret = - _lib._objc_msgSend_390(_id, _lib._sel_connectionProxyDictionary1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + void sendMessage_completionHandler_(NSURLSessionWebSocketMessage message, + ObjCBlock_ffiVoid_NSError completionHandler) { + _objc_msgSend_635(this.pointer, _sel_sendMessage_completionHandler_, + message.pointer, completionHandler.pointer); } - set connectionProxyDictionary(NSDictionary? value) { - return _lib._objc_msgSend_634(_id, _lib._sel_setConnectionProxyDictionary_1, - value?._id ?? ffi.nullptr); + void receiveMessageWithCompletionHandler_( + ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError + completionHandler) { + _objc_msgSend_636(this.pointer, _sel_receiveMessageWithCompletionHandler_, + completionHandler.pointer); } - int get TLSMinimumSupportedProtocol { - return _lib._objc_msgSend_1043(_id, _lib._sel_TLSMinimumSupportedProtocol1); + void sendPingWithPongReceiveHandler_( + ObjCBlock_ffiVoid_NSError pongReceiveHandler) { + _objc_msgSend_637(this.pointer, _sel_sendPingWithPongReceiveHandler_, + pongReceiveHandler.pointer); } - set TLSMinimumSupportedProtocol(int value) { - return _lib._objc_msgSend_1044( - _id, _lib._sel_setTLSMinimumSupportedProtocol_1, value); + void cancelWithCloseCode_reason_(int closeCode, objc.NSData? reason) { + _objc_msgSend_638(this.pointer, _sel_cancelWithCloseCode_reason_, closeCode, + reason?.pointer ?? ffi.nullptr); } - int get TLSMaximumSupportedProtocol { - return _lib._objc_msgSend_1043(_id, _lib._sel_TLSMaximumSupportedProtocol1); + int get maximumMessageSize { + return _objc_msgSend_114(this.pointer, _sel_maximumMessageSize); } - set TLSMaximumSupportedProtocol(int value) { - return _lib._objc_msgSend_1044( - _id, _lib._sel_setTLSMaximumSupportedProtocol_1, value); + set maximumMessageSize(int value) { + return _objc_msgSend_134(this.pointer, _sel_setMaximumMessageSize_, value); } - int get TLSMinimumSupportedProtocolVersion { - return _lib._objc_msgSend_1045( - _id, _lib._sel_TLSMinimumSupportedProtocolVersion1); + int get closeCode { + return _objc_msgSend_639(this.pointer, _sel_closeCode); } - set TLSMinimumSupportedProtocolVersion(int value) { - return _lib._objc_msgSend_1046( - _id, _lib._sel_setTLSMinimumSupportedProtocolVersion_1, value); + objc.NSData? get closeReason { + final _ret = _objc_msgSend_325(this.pointer, _sel_closeReason); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSURLSessionWebSocketTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } - int get TLSMaximumSupportedProtocolVersion { - return _lib._objc_msgSend_1045( - _id, _lib._sel_TLSMaximumSupportedProtocolVersion1); + static NSURLSessionWebSocketTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionWebSocketTask, _sel_new); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); } - set TLSMaximumSupportedProtocolVersion(int value) { - return _lib._objc_msgSend_1046( - _id, _lib._sel_setTLSMaximumSupportedProtocolVersion_1, value); + static NSURLSessionWebSocketTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionWebSocketTask, _sel_allocWithZone_, zone); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); } - bool get HTTPShouldUsePipelining { - return _lib._objc_msgSend_12(_id, _lib._sel_HTTPShouldUsePipelining1); + static NSURLSessionWebSocketTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionWebSocketTask, _sel_alloc); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); } - set HTTPShouldUsePipelining(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setHTTPShouldUsePipelining_1, value); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionWebSocketTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - bool get HTTPShouldSetCookies { - return _lib._objc_msgSend_12(_id, _lib._sel_HTTPShouldSetCookies1); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionWebSocketTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - set HTTPShouldSetCookies(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setHTTPShouldSetCookies_1, value); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLSessionWebSocketTask, _sel_accessInstanceVariablesDirectly); } - int get HTTPCookieAcceptPolicy { - return _lib._objc_msgSend_856(_id, _lib._sel_HTTPCookieAcceptPolicy1); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSURLSessionWebSocketTask, _sel_useStoredAccessor); } - set HTTPCookieAcceptPolicy(int value) { - return _lib._objc_msgSend_857( - _id, _lib._sel_setHTTPCookieAcceptPolicy_1, value); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionWebSocketTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get HTTPAdditionalHeaders { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_HTTPAdditionalHeaders1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionWebSocketTask, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - set HTTPAdditionalHeaders(NSDictionary? value) { - return _lib._objc_msgSend_634( - _id, _lib._sel_setHTTPAdditionalHeaders_1, value?._id ?? ffi.nullptr); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionWebSocketTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - int get HTTPMaximumConnectionsPerHost { - return _lib._objc_msgSend_83(_id, _lib._sel_HTTPMaximumConnectionsPerHost1); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionWebSocketTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set HTTPMaximumConnectionsPerHost(int value) { - return _lib._objc_msgSend_635( - _id, _lib._sel_setHTTPMaximumConnectionsPerHost_1, value); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionWebSocketTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - NSHTTPCookieStorage? get HTTPCookieStorage { - final _ret = _lib._objc_msgSend_1047(_id, _lib._sel_HTTPCookieStorage1); - return _ret.address == 0 - ? null - : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); - } +late final _class_NSURLSessionWebSocketTask = + objc.getClass("NSURLSessionWebSocketTask"); - set HTTPCookieStorage(NSHTTPCookieStorage? value) { - return _lib._objc_msgSend_1048( - _id, _lib._sel_setHTTPCookieStorage_1, value?._id ?? ffi.nullptr); - } +class NSURLSessionWebSocketMessage extends objc.NSObject { + NSURLSessionWebSocketMessage._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSURLCredentialStorage? get URLCredentialStorage { - final _ret = _lib._objc_msgSend_1049(_id, _lib._sel_URLCredentialStorage1); - return _ret.address == 0 - ? null - : NSURLCredentialStorage._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSURLSessionWebSocketMessage] that points to the same underlying object as [other]. + NSURLSessionWebSocketMessage.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - set URLCredentialStorage(NSURLCredentialStorage? value) { - return _lib._objc_msgSend_1050( - _id, _lib._sel_setURLCredentialStorage_1, value?._id ?? ffi.nullptr); - } + /// Constructs a [NSURLSessionWebSocketMessage] that wraps the given raw object pointer. + NSURLSessionWebSocketMessage.castFromPointer( + ffi.Pointer other, + {bool retain = false, + bool release = false}) + : this._(other, retain: retain, release: release); - NSURLCache? get URLCache { - final _ret = _lib._objc_msgSend_1051(_id, _lib._sel_URLCache1); - return _ret.address == 0 - ? null - : NSURLCache._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSURLSessionWebSocketMessage]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionWebSocketMessage); } - set URLCache(NSURLCache? value) { - return _lib._objc_msgSend_1052( - _id, _lib._sel_setURLCache_1, value?._id ?? ffi.nullptr); + NSURLSessionWebSocketMessage initWithData_(objc.NSData data) { + final _ret = + _objc_msgSend_340(this.pointer, _sel_initWithData_, data.pointer); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: true, release: true); } - bool get shouldUseExtendedBackgroundIdleMode { - return _lib._objc_msgSend_12( - _id, _lib._sel_shouldUseExtendedBackgroundIdleMode1); + NSURLSessionWebSocketMessage initWithString_(objc.NSString string) { + final _ret = + _objc_msgSend_35(this.pointer, _sel_initWithString_, string.pointer); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: true, release: true); } - set shouldUseExtendedBackgroundIdleMode(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setShouldUseExtendedBackgroundIdleMode_1, value); + int get type { + return _objc_msgSend_634(this.pointer, _sel_type); } - NSArray? get protocolClasses { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_protocolClasses1); + objc.NSData? get data { + final _ret = _objc_msgSend_325(this.pointer, _sel_data); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - set protocolClasses(NSArray? value) { - return _lib._objc_msgSend_1053( - _id, _lib._sel_setProtocolClasses_1, value?._id ?? ffi.nullptr); - } - - int get multipathServiceType { - return _lib._objc_msgSend_1054(_id, _lib._sel_multipathServiceType1); + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - set multipathServiceType(int value) { - return _lib._objc_msgSend_1055( - _id, _lib._sel_setMultipathServiceType_1, value); + objc.NSString? get string { + final _ret = _objc_msgSend_13(this.pointer, _sel_string); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } @override - NSURLSessionConfiguration init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + NSURLSessionWebSocketMessage init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: true, release: true); } - static NSURLSessionConfiguration new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionConfiguration1, _lib._sel_new1); - return NSURLSessionConfiguration._(_ret, _lib, + static NSURLSessionWebSocketMessage new1() { + final _ret = + _objc_msgSend_40(_class_NSURLSessionWebSocketMessage, _sel_new); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, retain: false, release: true); } - static NSURLSessionConfiguration backgroundSessionConfiguration_( - AVFAudio _lib, NSString identifier) { - final _ret = _lib._objc_msgSend_1042(_lib._class_NSURLSessionConfiguration1, - _lib._sel_backgroundSessionConfiguration_1, identifier._id); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } - - static NSURLSessionConfiguration allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3(_lib._class_NSURLSessionConfiguration1, - _lib._sel_allocWithZone_1, zone); - return NSURLSessionConfiguration._(_ret, _lib, + static NSURLSessionWebSocketMessage allocWithZone_( + ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionWebSocketMessage, _sel_allocWithZone_, zone); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, retain: false, release: true); } - static NSURLSessionConfiguration alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionConfiguration1, _lib._sel_alloc1); - return NSURLSessionConfiguration._(_ret, _lib, + static NSURLSessionWebSocketMessage alloc() { + final _ret = + _objc_msgSend_40(_class_NSURLSessionWebSocketMessage, _sel_alloc); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLSessionConfiguration1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionWebSocketMessage, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLSessionConfiguration1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionWebSocketMessage, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLSessionConfiguration1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7(_class_NSURLSessionWebSocketMessage, + _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLSessionConfiguration1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSURLSessionWebSocketMessage, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLSessionConfiguration1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionWebSocketMessage, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLSessionConfiguration1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionWebSocketMessage, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLSessionConfiguration1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionWebSocketMessage, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSURLSessionConfiguration1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6(_class_NSURLSessionWebSocketMessage, + _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLSessionConfiguration1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionWebSocketMessage, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -abstract class SSLProtocol { - static const int kSSLProtocolUnknown = 0; - static const int kTLSProtocol1 = 4; - static const int kTLSProtocol11 = 7; - static const int kTLSProtocol12 = 8; - static const int kDTLSProtocol1 = 9; - static const int kTLSProtocol13 = 10; - static const int kDTLSProtocol12 = 11; - static const int kTLSProtocolMaxSupported = 999; - static const int kSSLProtocol2 = 1; - static const int kSSLProtocol3 = 2; - static const int kSSLProtocol3Only = 3; - static const int kTLSProtocol1Only = 5; - static const int kSSLProtocolAll = 6; +late final _class_NSURLSessionWebSocketMessage = + objc.getClass("NSURLSessionWebSocketMessage"); + +abstract class NSURLSessionWebSocketMessageType { + static const int NSURLSessionWebSocketMessageTypeData = 0; + static const int NSURLSessionWebSocketMessageTypeString = 1; } -abstract class tls_protocol_version_t { - static const int tls_protocol_version_TLSv10 = 769; - static const int tls_protocol_version_TLSv11 = 770; - static const int tls_protocol_version_TLSv12 = 771; - static const int tls_protocol_version_TLSv13 = 772; - static const int tls_protocol_version_DTLSv10 = -257; - static const int tls_protocol_version_DTLSv12 = -259; +final _objc_msgSend_634 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_sendMessage_completionHandler_ = + objc.registerName("sendMessage:completionHandler:"); +final _objc_msgSend_635 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( + void Function( + ffi.Pointer, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry[id] = + fn; + return ffi.Pointer.fromAddress(id); } -abstract class NSURLSessionMultipathServiceType { - static const int NSURLSessionMultipathServiceTypeNone = 0; - static const int NSURLSessionMultipathServiceTypeHandover = 1; - static const int NSURLSessionMultipathServiceTypeInteractive = 2; - static const int NSURLSessionMultipathServiceTypeAggregate = 3; +void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.fromFunction( + void Function(NSURLSessionWebSocketMessage?, objc.NSError?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSURLSessionWebSocketMessage.castFromPointer(arg0, + retain: true, release: true), + arg1.address == 0 ? null : objc.NSError.castFromPointer(arg1, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.listener( + void Function(NSURLSessionWebSocketMessage?, objc.NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSURLSessionWebSocketMessage.castFromPointer(arg0, + retain: true, release: true), + arg1.address == 0 + ? null + : objc.NSError.castFromPointer(arg1, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSURLSessionWebSocketMessage? arg0, objc.NSError? arg1) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr, arg1?.pointer ?? ffi.nullptr); +} + +late final _sel_receiveMessageWithCompletionHandler_ = + objc.registerName("receiveMessageWithCompletionHandler:"); +final _objc_msgSend_636 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_sendPingWithPongReceiveHandler_ = + objc.registerName("sendPingWithPongReceiveHandler:"); +final _objc_msgSend_637 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSURLSessionWebSocketCloseCode { + static const int NSURLSessionWebSocketCloseCodeInvalid = 0; + static const int NSURLSessionWebSocketCloseCodeNormalClosure = 1000; + static const int NSURLSessionWebSocketCloseCodeGoingAway = 1001; + static const int NSURLSessionWebSocketCloseCodeProtocolError = 1002; + static const int NSURLSessionWebSocketCloseCodeUnsupportedData = 1003; + static const int NSURLSessionWebSocketCloseCodeNoStatusReceived = 1005; + static const int NSURLSessionWebSocketCloseCodeAbnormalClosure = 1006; + static const int NSURLSessionWebSocketCloseCodeInvalidFramePayloadData = 1007; + static const int NSURLSessionWebSocketCloseCodePolicyViolation = 1008; + static const int NSURLSessionWebSocketCloseCodeMessageTooBig = 1009; + static const int NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing = + 1010; + static const int NSURLSessionWebSocketCloseCodeInternalServerError = 1011; + static const int NSURLSessionWebSocketCloseCodeTLSHandshakeFailure = 1015; } -void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => +late final _sel_cancelWithCloseCode_reason_ = + objc.registerName("cancelWithCloseCode:reason:"); +final _objc_msgSend_638 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_maximumMessageSize = objc.registerName("maximumMessageSize"); +late final _sel_setMaximumMessageSize_ = + objc.registerName("setMaximumMessageSize:"); +late final _sel_closeCode = objc.registerName("closeCode"); +final _objc_msgSend_639 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_closeReason = objc.registerName("closeReason"); +late final _sel_webSocketTaskWithURL_ = + objc.registerName("webSocketTaskWithURL:"); +final _objc_msgSend_640 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_webSocketTaskWithURL_protocols_ = + objc.registerName("webSocketTaskWithURL:protocols:"); +final _objc_msgSend_641 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_webSocketTaskWithRequest_ = + objc.registerName("webSocketTaskWithRequest:"); +final _objc_msgSend_642 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() .asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistryIndex = 0; + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistryIndex = 0; ffi.Pointer - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer) + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry[id] = fn; + final id = + ++_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry[ +void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry[ block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); +class ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSArray_NSArray_NSArray castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSArray_NSArray_NSArray._(pointer, lib, + static ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError._(pointer, retain: retain, release: release); } @@ -71227,27 +30785,24 @@ class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.fromFunctionPointer( - AVFAudio lib, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline) + .cast(), + ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. @@ -71255,23 +30810,21 @@ class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.fromFunction(AVFAudio lib, void Function(NSArray, NSArray, NSArray) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.fromFunction( + void Function(objc.NSData?, NSURLResponse?, objc.NSError?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) .cast(), - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - NSArray._(arg0, lib, retain: true, release: true), - NSArray._(arg1, lib, retain: true, release: true), - NSArray._(arg2, lib, retain: true, release: true)))), - lib); + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 ? null : objc.NSData.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -71283,80 +30836,190 @@ class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.listener(AVFAudio lib, void Function(NSArray, NSArray, NSArray) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.listener( + void Function(objc.NSData?, NSURLResponse?, objc.NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - NSArray._(arg0, lib, retain: true, release: true), - NSArray._(arg1, lib, retain: true, release: true), - NSArray._(arg2, lib, retain: true, release: true)))), - lib); + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))))); static ffi.NativeCallable< ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSArray arg0, NSArray arg1, NSArray arg2) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1._id, arg2._id); -} + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; -void _ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + void call(objc.NSData? arg0, NSURLResponse? arg1, objc.NSError? arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, + arg0?.pointer ?? ffi.nullptr, + arg1?.pointer ?? ffi.nullptr, + arg2?.pointer ?? ffi.nullptr); +} + +late final _sel_dataTaskWithRequest_completionHandler_ = + objc.registerName("dataTaskWithRequest:completionHandler:"); +final _objc_msgSend_643 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_dataTaskWithURL_completionHandler_ = + objc.registerName("dataTaskWithURL:completionHandler:"); +final _objc_msgSend_644 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_uploadTaskWithRequest_fromFile_completionHandler_ = + objc.registerName("uploadTaskWithRequest:fromFile:completionHandler:"); +final _objc_msgSend_645 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_uploadTaskWithRequest_fromData_completionHandler_ = + objc.registerName("uploadTaskWithRequest:fromData:completionHandler:"); +final _objc_msgSend_646 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_uploadTaskWithResumeData_completionHandler_ = + objc.registerName("uploadTaskWithResumeData:completionHandler:"); +final _objc_msgSend_647 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => block.ref.target .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSArray1_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSArray1_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSArray1_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSArray1_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSArray1_closureRegistry[id] = fn; + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSArray1_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSArray1_closureRegistry[block.ref.target.address]!( - arg0); +void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock_ffiVoid_NSArray1 extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSArray1._(ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); +class ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSArray1 castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSArray1._(pointer, lib, + static ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError._(pointer, retain: retain, release: release); } @@ -71365,21 +31028,24 @@ class ObjCBlock_ffiVoid_NSArray1 extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSArray1.fromFunctionPointer( - AVFAudio lib, + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.fromFunctionPointer( ffi.Pointer< - ffi - .NativeFunction arg0)>> + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline) + .cast(), + ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. @@ -71387,19 +31053,21 @@ class ObjCBlock_ffiVoid_NSArray1 extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSArray1.fromFunction( - AVFAudio lib, void Function(NSArray) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.fromFunction( + void Function(objc.NSURL?, NSURLResponse?, objc.NSError?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) .cast(), - _ObjCBlock_ffiVoid_NSArray1_registerClosure( - (ffi.Pointer arg0) => - fn(NSArray._(arg0, lib, retain: true, release: true)))), - lib); + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 ? null : objc.NSURL.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -71411,588 +31079,568 @@ class ObjCBlock_ffiVoid_NSArray1 extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSArray1.listener(AVFAudio lib, void Function(NSArray) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.listener( + void Function(objc.NSURL?, NSURLResponse?, objc.NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSArray1_registerClosure( - (ffi.Pointer arg0) => - fn(NSArray._(arg0, lib, retain: true, release: true)))), - lib); + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure((ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : objc.NSURL.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))))); static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; - void call(NSArray arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0._id); -} + void call(objc.NSURL? arg0, NSURLResponse? arg1, objc.NSError? arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, + arg0?.pointer ?? ffi.nullptr, + arg1?.pointer ?? ffi.nullptr, + arg2?.pointer ?? ffi.nullptr); +} + +late final _sel_downloadTaskWithRequest_completionHandler_ = + objc.registerName("downloadTaskWithRequest:completionHandler:"); +final _objc_msgSend_648 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_downloadTaskWithURL_completionHandler_ = + objc.registerName("downloadTaskWithURL:completionHandler:"); +final _objc_msgSend_649 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_downloadTaskWithResumeData_completionHandler_ = + objc.registerName("downloadTaskWithResumeData:completionHandler:"); +final _objc_msgSend_650 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); -class NSURLSessionUploadTask extends NSURLSessionDataTask { - NSURLSessionUploadTask._(ffi.Pointer id, AVFAudio lib, +class NSProtocolChecker extends NSProxy { + NSProtocolChecker._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [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); - } + /// Constructs a [NSProtocolChecker] that points to the same underlying object as [other]. + NSProtocolChecker.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSURLSessionUploadTask] that wraps the given raw object pointer. - static NSURLSessionUploadTask castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionUploadTask._(other, lib, - retain: retain, release: release); - } + /// Constructs a [NSProtocolChecker] that wraps the given raw object pointer. + NSProtocolChecker.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSURLSessionUploadTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionUploadTask1); + /// Returns whether [obj] is an instance of [NSProtocolChecker]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSProtocolChecker); } - @override - NSURLSessionUploadTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + objc.Protocol get protocol { + final _ret = _objc_msgSend_651(this.pointer, _sel_protocol); + return objc.Protocol.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionUploadTask new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionUploadTask1, _lib._sel_new1); - return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); + objc.NSObject? get target { + final _ret = _objc_msgSend_457(this.pointer, _sel_target); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void cancelByProducingResumeData_( - ObjCBlock_ffiVoid_NSData completionHandler) { - _lib._objc_msgSend_1062( - _id, _lib._sel_cancelByProducingResumeData_1, completionHandler._id); + static NSProtocolChecker protocolCheckerWithTarget_protocol_( + objc.NSObject anObject, objc.Protocol aProtocol) { + final _ret = _objc_msgSend_652( + _class_NSProtocolChecker, + _sel_protocolCheckerWithTarget_protocol_, + anObject.pointer, + aProtocol.pointer); + return NSProtocolChecker.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionUploadTask allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLSessionUploadTask1, _lib._sel_allocWithZone_1, zone); - return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); - } + NSProtocolChecker initWithTarget_protocol_( + objc.NSObject anObject, objc.Protocol aProtocol) { + final _ret = _objc_msgSend_652(this.pointer, _sel_initWithTarget_protocol_, + anObject.pointer, aProtocol.pointer); + return NSProtocolChecker.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject alloc() { + final _ret = _objc_msgSend_40(_class_NSProtocolChecker, _sel_alloc); + return objc.NSObject.castFromPointer(_ret, retain: false, release: true); + } + + static bool respondsToSelector_(ffi.Pointer aSelector) { + return _objc_msgSend_228( + _class_NSProtocolChecker, _sel_respondsToSelector_, aSelector); + } +} + +late final _class_NSProtocolChecker = objc.getClass("NSProtocolChecker"); +final _objc_msgSend_651 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_target = objc.registerName("target"); +late final _sel_protocolCheckerWithTarget_protocol_ = + objc.registerName("protocolCheckerWithTarget:protocol:"); +final _objc_msgSend_652 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithTarget_protocol_ = + objc.registerName("initWithTarget:protocol:"); + +class NSTask extends objc.NSObject { + NSTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - static NSURLSessionUploadTask alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionUploadTask1, _lib._sel_alloc1); - return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); - } + /// Constructs a [NSTask] that points to the same underlying object as [other]. + NSTask.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLSessionUploadTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } + /// Constructs a [NSTask] that wraps the given raw object pointer. + NSTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLSessionUploadTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + /// Returns whether [obj] is an instance of [NSTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSTask); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLSessionUploadTask1, - _lib._sel_accessInstanceVariablesDirectly1); + @override + NSTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSTask.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLSessionUploadTask1, _lib._sel_useStoredAccessor1); + objc.NSURL? get executableURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_executableURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLSessionUploadTask1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + set executableURL(objc.NSURL? value) { + return _objc_msgSend_566( + this.pointer, _sel_setExecutableURL_, value?.pointer ?? ffi.nullptr); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLSessionUploadTask1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + objc.NSArray? get arguments { + final _ret = _objc_msgSend_69(this.pointer, _sel_arguments); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLSessionUploadTask1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + set arguments(objc.NSArray? value) { + return _objc_msgSend_605( + this.pointer, _sel_setArguments_, value?.pointer ?? ffi.nullptr); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSURLSessionUploadTask1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSDictionary? get environment { + final _ret = _objc_msgSend_65(this.pointer, _sel_environment); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLSessionUploadTask1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + set environment(objc.NSDictionary? value) { + return _objc_msgSend_173( + this.pointer, _sel_setEnvironment_, value?.pointer ?? ffi.nullptr); } -} - -void _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSData_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSData_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSData_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSData_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSData_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSData_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSData_closureRegistry[block.ref.target.address]!(arg0); - -class ObjCBlock_ffiVoid_NSData extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSData._(ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSData castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSData._(pointer, lib, - retain: retain, release: release); + objc.NSURL? get currentDirectoryURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_currentDirectoryURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSData.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi - .NativeFunction arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSData.fromFunction(AVFAudio lib, void Function(NSData?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSData_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSData._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSData.listener(AVFAudio lib, void Function(NSData?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSData_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSData._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(NSData? arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); -} - -class NSURLSessionDownloadTask extends NSURLSessionTask { - NSURLSessionDownloadTask._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + set currentDirectoryURL(objc.NSURL? value) { + return _objc_msgSend_566(this.pointer, _sel_setCurrentDirectoryURL_, + value?.pointer ?? ffi.nullptr); + } - /// 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); + objc.NSData? get launchRequirementData { + final _ret = _objc_msgSend_325(this.pointer, _sel_launchRequirementData); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSURLSessionDownloadTask] that wraps the given raw object pointer. - static NSURLSessionDownloadTask castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionDownloadTask._(other, lib, - retain: retain, release: release); + set launchRequirementData(objc.NSData? value) { + return _objc_msgSend_571(this.pointer, _sel_setLaunchRequirementData_, + value?.pointer ?? ffi.nullptr); } - /// 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); + objc.NSObject? get standardInput { + final _ret = _objc_msgSend_66(this.pointer, _sel_standardInput); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void cancelByProducingResumeData_( - ObjCBlock_ffiVoid_NSData completionHandler) { - _lib._objc_msgSend_1062( - _id, _lib._sel_cancelByProducingResumeData_1, completionHandler._id); + set standardInput(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setStandardInput_, value?.pointer ?? ffi.nullptr); } - @override - NSURLSessionDownloadTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + objc.NSObject? get standardOutput { + final _ret = _objc_msgSend_66(this.pointer, _sel_standardOutput); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionDownloadTask new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionDownloadTask1, _lib._sel_new1); - return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); + set standardOutput(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setStandardOutput_, value?.pointer ?? ffi.nullptr); } - static NSURLSessionDownloadTask allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLSessionDownloadTask1, _lib._sel_allocWithZone_1, zone); - return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); + objc.NSObject? get standardError { + final _ret = _objc_msgSend_66(this.pointer, _sel_standardError); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionDownloadTask alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionDownloadTask1, _lib._sel_alloc1); - return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); + set standardError(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setStandardError_, value?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLSessionDownloadTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + bool launchAndReturnError_(ffi.Pointer> error) { + return _objc_msgSend_8(this.pointer, _sel_launchAndReturnError_, error); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLSessionDownloadTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + void interrupt() { + _objc_msgSend_82(this.pointer, _sel_interrupt); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLSessionDownloadTask1, - _lib._sel_accessInstanceVariablesDirectly1); + void terminate() { + _objc_msgSend_82(this.pointer, _sel_terminate); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLSessionDownloadTask1, _lib._sel_useStoredAccessor1); + bool suspend() { + return _objc_msgSend_7(this.pointer, _sel_suspend); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLSessionDownloadTask1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + bool resume() { + return _objc_msgSend_7(this.pointer, _sel_resume); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLSessionDownloadTask1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + int get processIdentifier { + return _objc_msgSend_264(this.pointer, _sel_processIdentifier); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLSessionDownloadTask1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + bool get running { + return _objc_msgSend_7(this.pointer, _sel_isRunning); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSURLSessionDownloadTask1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + int get terminationStatus { + return _objc_msgSend_264(this.pointer, _sel_terminationStatus); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLSessionDownloadTask1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + int get terminationReason { + return _objc_msgSend_653(this.pointer, _sel_terminationReason); } -} -class NSURLSessionStreamTask extends NSURLSessionTask { - NSURLSessionStreamTask._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + ObjCBlock_ffiVoid_NSTask? get terminationHandler { + final _ret = _objc_msgSend_654(this.pointer, _sel_terminationHandler); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid_NSTask.castFromPointer(_ret, + retain: true, release: true); + } - /// 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); + set terminationHandler(ObjCBlock_ffiVoid_NSTask? value) { + return _objc_msgSend_655(this.pointer, _sel_setTerminationHandler_, + value?.pointer ?? ffi.nullptr); } - /// Returns a [NSURLSessionStreamTask] that wraps the given raw object pointer. - static NSURLSessionStreamTask castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionStreamTask._(other, lib, - retain: retain, release: release); + int get qualityOfService { + return _objc_msgSend_454(this.pointer, _sel_qualityOfService); } - /// 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); + set qualityOfService(int value) { + return _objc_msgSend_455(this.pointer, _sel_setQualityOfService_, value); } - void readDataOfMinLength_maxLength_timeout_completionHandler_( - int minBytes, - int maxBytes, - double timeout, - ObjCBlock_ffiVoid_NSData_bool_NSError completionHandler) { - _lib._objc_msgSend_1070( - _id, - _lib._sel_readDataOfMinLength_maxLength_timeout_completionHandler_1, - minBytes, - maxBytes, - timeout, - completionHandler._id); + static NSTask? + launchedTaskWithExecutableURL_arguments_error_terminationHandler_( + objc.NSURL url, + objc.NSArray arguments, + ffi.Pointer> error, + ObjCBlock_ffiVoid_NSTask? terminationHandler) { + final _ret = _objc_msgSend_656( + _class_NSTask, + _sel_launchedTaskWithExecutableURL_arguments_error_terminationHandler_, + url.pointer, + arguments.pointer, + error, + terminationHandler?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSTask.castFromPointer(_ret, retain: true, release: true); } - void writeData_timeout_completionHandler_(NSData data, double timeout, - ObjCBlock_ffiVoid_NSError completionHandler) { - _lib._objc_msgSend_1071( - _id, - _lib._sel_writeData_timeout_completionHandler_1, - data._id, - timeout, - completionHandler._id); + void waitUntilExit() { + _objc_msgSend_82(this.pointer, _sel_waitUntilExit); } - void captureStreams() { - _lib._objc_msgSend_1(_id, _lib._sel_captureStreams1); + objc.NSString? get launchPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_launchPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void closeWrite() { - _lib._objc_msgSend_1(_id, _lib._sel_closeWrite1); + set launchPath(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setLaunchPath_, value?.pointer ?? ffi.nullptr); } - void closeRead() { - _lib._objc_msgSend_1(_id, _lib._sel_closeRead1); + objc.NSString get currentDirectoryPath { + final _ret = _objc_msgSend_12(this.pointer, _sel_currentDirectoryPath); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void startSecureConnection() { - _lib._objc_msgSend_1(_id, _lib._sel_startSecureConnection1); + set currentDirectoryPath(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setCurrentDirectoryPath_, value.pointer); } - void stopSecureConnection() { - _lib._objc_msgSend_1(_id, _lib._sel_stopSecureConnection1); + void launch() { + _objc_msgSend_82(this.pointer, _sel_launch); } - @override - NSURLSessionStreamTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); + static NSTask launchedTaskWithLaunchPath_arguments_( + objc.NSString path, objc.NSArray arguments) { + final _ret = _objc_msgSend_657( + _class_NSTask, + _sel_launchedTaskWithLaunchPath_arguments_, + path.pointer, + arguments.pointer); + return NSTask.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionStreamTask new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionStreamTask1, _lib._sel_new1); - return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); + static NSTask new1() { + final _ret = _objc_msgSend_40(_class_NSTask, _sel_new); + return NSTask.castFromPointer(_ret, retain: false, release: true); } - static NSURLSessionStreamTask allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLSessionStreamTask1, _lib._sel_allocWithZone_1, zone); - return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); + static NSTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSTask, _sel_allocWithZone_, zone); + return NSTask.castFromPointer(_ret, retain: false, release: true); } - static NSURLSessionStreamTask alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionStreamTask1, _lib._sel_alloc1); - return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); + static NSTask alloc() { + final _ret = _objc_msgSend_40(_class_NSTask, _sel_alloc); + return NSTask.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLSessionStreamTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLSessionStreamTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLSessionStreamTask1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7(_class_NSTask, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLSessionStreamTask1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSTask, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLSessionStreamTask1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLSessionStreamTask1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51( + _class_NSTask, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLSessionStreamTask1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSURLSessionStreamTask1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40(_class_NSTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSTask = objc.getClass("NSTask"); +late final _sel_setExecutableURL_ = objc.registerName("setExecutableURL:"); +late final _sel_setArguments_ = objc.registerName("setArguments:"); +late final _sel_setEnvironment_ = objc.registerName("setEnvironment:"); +late final _sel_currentDirectoryURL = objc.registerName("currentDirectoryURL"); +late final _sel_setCurrentDirectoryURL_ = + objc.registerName("setCurrentDirectoryURL:"); +late final _sel_launchRequirementData = + objc.registerName("launchRequirementData"); +late final _sel_setLaunchRequirementData_ = + objc.registerName("setLaunchRequirementData:"); +late final _sel_standardInput = objc.registerName("standardInput"); +late final _sel_setStandardInput_ = objc.registerName("setStandardInput:"); +late final _sel_standardOutput = objc.registerName("standardOutput"); +late final _sel_setStandardOutput_ = objc.registerName("setStandardOutput:"); +late final _sel_standardError = objc.registerName("standardError"); +late final _sel_setStandardError_ = objc.registerName("setStandardError:"); +late final _sel_launchAndReturnError_ = + objc.registerName("launchAndReturnError:"); +late final _sel_interrupt = objc.registerName("interrupt"); +late final _sel_terminate = objc.registerName("terminate"); +late final _sel_isRunning = objc.registerName("isRunning"); +late final _sel_terminationStatus = objc.registerName("terminationStatus"); - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLSessionStreamTask1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +abstract class NSTaskTerminationReason { + static const int NSTaskTerminationReasonExit = 1; + static const int NSTaskTerminationReasonUncaughtSignal = 2; } -void _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => +late final _sel_terminationReason = objc.registerName("terminationReason"); +final _objc_msgSend_653 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSTask_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, bool, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry = , bool, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( - void Function(ffi.Pointer, bool, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry[id] = fn; + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSTask_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSTask_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSTask_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSTask_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSTask_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); +void _ObjCBlock_ffiVoid_NSTask_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSTask_closureRegistry[block.ref.target.address]!(arg0); -class ObjCBlock_ffiVoid_NSData_bool_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSData_bool_NSError._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, +class ObjCBlock_ffiVoid_NSTask extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSTask._(ffi.Pointer pointer, {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSData_bool_NSError castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSData_bool_NSError._(pointer, lib, + static ObjCBlock_ffiVoid_NSTask castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSTask._(pointer, retain: retain, release: release); } @@ -72001,25 +31649,18 @@ class ObjCBlock_ffiVoid_NSData_bool_NSError extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSData_bool_NSError.fromFunctionPointer( - AVFAudio lib, + ObjCBlock_ffiVoid_NSTask.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>> + ffi.Void Function(ffi.Pointer arg0)>> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTask_fnPtrTrampoline) + .cast(), + ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. @@ -72027,23 +31668,17 @@ class ObjCBlock_ffiVoid_NSData_bool_NSError extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSData_bool_NSError.fromFunction(AVFAudio lib, void Function(NSData, bool, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( - (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn( - NSData._(arg0, lib, retain: true, release: true), - arg1, - arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), - lib); + ObjCBlock_ffiVoid_NSTask.fromFunction(void Function(NSTask) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTask_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSTask_registerClosure( + (ffi.Pointer arg0) => fn( + NSTask.castFromPointer(arg0, + retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -72055,4206 +31690,5737 @@ class ObjCBlock_ffiVoid_NSData_bool_NSError extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSData_bool_NSError.listener( - AVFAudio lib, void Function(NSData, bool, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn(NSData._(arg0, lib, retain: true, release: true), arg1, arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), - lib); + ObjCBlock_ffiVoid_NSTask.listener(void Function(NSTask) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSTask_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSTask_registerClosure( + (ffi.Pointer arg0) => fn( + NSTask.castFromPointer(arg0, + retain: true, release: true))))); static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Bool, ffi.Pointer)>? _dartFuncListenerTrampoline; + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; - void call(NSData arg0, bool arg1, NSError? arg2) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - bool, ffi.Pointer)>()( - _id, arg0._id, arg1, arg2?._id ?? ffi.nullptr); -} + void call(NSTask arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(pointer, arg0.pointer); +} + +late final _sel_terminationHandler = objc.registerName("terminationHandler"); +final _objc_msgSend_654 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setTerminationHandler_ = + objc.registerName("setTerminationHandler:"); +final _objc_msgSend_655 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_launchedTaskWithExecutableURL_arguments_error_terminationHandler_ = + objc.registerName( + "launchedTaskWithExecutableURL:arguments:error:terminationHandler:"); +final _objc_msgSend_656 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>(); +late final _sel_waitUntilExit = objc.registerName("waitUntilExit"); +late final _sel_launchPath = objc.registerName("launchPath"); +late final _sel_setLaunchPath_ = objc.registerName("setLaunchPath:"); +late final _sel_setCurrentDirectoryPath_ = + objc.registerName("setCurrentDirectoryPath:"); +late final _sel_launch = objc.registerName("launch"); +late final _sel_launchedTaskWithLaunchPath_arguments_ = + objc.registerName("launchedTaskWithLaunchPath:arguments:"); +final _objc_msgSend_657 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +class NSXMLElement extends NSXMLNode { + NSXMLElement._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSXMLElement] that points to the same underlying object as [other]. + NSXMLElement.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSXMLElement] that wraps the given raw object pointer. + NSXMLElement.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSXMLElement]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSXMLElement); + } + + NSXMLElement initWithName_(objc.NSString name) { + final _ret = + _objc_msgSend_35(this.pointer, _sel_initWithName_, name.pointer); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); + } + + NSXMLElement initWithName_URI_(objc.NSString name, objc.NSString? URI) { + final _ret = _objc_msgSend_694(this.pointer, _sel_initWithName_URI_, + name.pointer, URI?.pointer ?? ffi.nullptr); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); + } + + NSXMLElement initWithName_stringValue_( + objc.NSString name, objc.NSString? string) { + final _ret = _objc_msgSend_694(this.pointer, _sel_initWithName_stringValue_, + name.pointer, string?.pointer ?? ffi.nullptr); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); + } -class NSNetService extends NSObject { - NSNetService._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + NSXMLElement? initWithXMLString_error_( + objc.NSString string, ffi.Pointer> error) { + final _ret = _objc_msgSend_695( + this.pointer, _sel_initWithXMLString_error_, string.pointer, error); + return _ret.address == 0 + ? null + : NSXMLElement.castFromPointer(_ret, retain: true, release: true); + } - /// 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); + @override + NSXMLElement initWithKind_options_(int kind, int options) { + final _ret = _objc_msgSend_659( + this.pointer, _sel_initWithKind_options_, kind, options); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSNetService] that wraps the given raw object pointer. - static NSNetService castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNetService._(other, lib, retain: retain, release: release); + objc.NSArray elementsForName_(objc.NSString name) { + final _ret = + _objc_msgSend_445(this.pointer, _sel_elementsForName_, name.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// 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); + objc.NSArray elementsForLocalName_URI_( + objc.NSString localName, objc.NSString? URI) { + final _ret = _objc_msgSend_696(this.pointer, _sel_elementsForLocalName_URI_, + localName.pointer, URI?.pointer ?? ffi.nullptr); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSNetService initWithDomain_type_name_port_( - NSString domain, NSString type, NSString name, int port) { - final _ret = _lib._objc_msgSend_1073( - _id, - _lib._sel_initWithDomain_type_name_port_1, - domain._id, - type._id, - name._id, - port); - return NSNetService._(_ret, _lib, retain: true, release: true); + void addAttribute_(NSXMLNode attribute) { + _objc_msgSend_673(this.pointer, _sel_addAttribute_, attribute.pointer); } - NSNetService initWithDomain_type_name_( - NSString domain, NSString type, NSString name) { - final _ret = _lib._objc_msgSend_1074(_id, - _lib._sel_initWithDomain_type_name_1, domain._id, type._id, name._id); - return NSNetService._(_ret, _lib, retain: true, release: true); + void removeAttributeForName_(objc.NSString name) { + _objc_msgSend_98(this.pointer, _sel_removeAttributeForName_, name.pointer); + } + + objc.NSArray? get attributes { + final _ret = _objc_msgSend_69(this.pointer, _sel_attributes); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _lib._objc_msgSend_569( - _id, _lib._sel_scheduleInRunLoop_forMode_1, aRunLoop._id, mode._id); + set attributes(objc.NSArray? value) { + return _objc_msgSend_605( + this.pointer, _sel_setAttributes_, value?.pointer ?? ffi.nullptr); } - void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _lib._objc_msgSend_569( - _id, _lib._sel_removeFromRunLoop_forMode_1, aRunLoop._id, mode._id); + void setAttributesWithDictionary_(objc.NSDictionary attributes) { + _objc_msgSend_697( + this.pointer, _sel_setAttributesWithDictionary_, attributes.pointer); } - NSObject? get delegate { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); + NSXMLNode? attributeForName_(objc.NSString name) { + final _ret = + _objc_msgSend_677(this.pointer, _sel_attributeForName_, name.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - set delegate(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); + NSXMLNode? attributeForLocalName_URI_( + objc.NSString localName, objc.NSString? URI) { + final _ret = _objc_msgSend_698( + this.pointer, + _sel_attributeForLocalName_URI_, + localName.pointer, + URI?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - bool get includesPeerToPeer { - return _lib._objc_msgSend_12(_id, _lib._sel_includesPeerToPeer1); + void addNamespace_(NSXMLNode aNamespace) { + _objc_msgSend_673(this.pointer, _sel_addNamespace_, aNamespace.pointer); } - set includesPeerToPeer(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setIncludesPeerToPeer_1, value); + void removeNamespaceForPrefix_(objc.NSString name) { + _objc_msgSend_98( + this.pointer, _sel_removeNamespaceForPrefix_, name.pointer); } - NSString get name { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_name1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSArray? get namespaces { + final _ret = _objc_msgSend_69(this.pointer, _sel_namespaces); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString get type { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_type1); - return NSString._(_ret, _lib, retain: true, release: true); + set namespaces(objc.NSArray? value) { + return _objc_msgSend_605( + this.pointer, _sel_setNamespaces_, value?.pointer ?? ffi.nullptr); } - NSString get domain { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_domain1); - return NSString._(_ret, _lib, retain: true, release: true); + NSXMLNode? namespaceForPrefix_(objc.NSString name) { + final _ret = + _objc_msgSend_677(this.pointer, _sel_namespaceForPrefix_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - NSString? get hostName { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_hostName1); + NSXMLNode? resolveNamespaceForName_(objc.NSString name) { + final _ret = _objc_msgSend_677( + this.pointer, _sel_resolveNamespaceForName_, name.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - NSArray? get addresses { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_addresses1); + objc.NSString? resolvePrefixForNamespaceURI_(objc.NSString namespaceURI) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_resolvePrefixForNamespaceURI_, namespaceURI.pointer); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int get port { - return _lib._objc_msgSend_83(_id, _lib._sel_port1); + void insertChild_atIndex_(NSXMLNode child, int index) { + _objc_msgSend_671( + this.pointer, _sel_insertChild_atIndex_, child.pointer, index); } - void publish() { - _lib._objc_msgSend_1(_id, _lib._sel_publish1); + void insertChildren_atIndex_(objc.NSArray children, int index) { + _objc_msgSend_672( + this.pointer, _sel_insertChildren_atIndex_, children.pointer, index); } - void publishWithOptions_(int options) { - _lib._objc_msgSend_1075(_id, _lib._sel_publishWithOptions_1, options); + void removeChildAtIndex_(int index) { + _objc_msgSend_414(this.pointer, _sel_removeChildAtIndex_, index); } - void resolve() { - _lib._objc_msgSend_1(_id, _lib._sel_resolve1); + void setChildren_(objc.NSArray? children) { + _objc_msgSend_260( + this.pointer, _sel_setChildren_, children?.pointer ?? ffi.nullptr); } - void stop() { - _lib._objc_msgSend_1(_id, _lib._sel_stop1); + void addChild_(NSXMLNode child) { + _objc_msgSend_673(this.pointer, _sel_addChild_, child.pointer); } - static NSDictionary dictionaryFromTXTRecordData_( - AVFAudio _lib, NSData txtData) { - final _ret = _lib._objc_msgSend_1076(_lib._class_NSNetService1, - _lib._sel_dictionaryFromTXTRecordData_1, txtData._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); + void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { + _objc_msgSend_674( + this.pointer, _sel_replaceChildAtIndex_withNode_, index, node.pointer); } - static NSData dataFromTXTRecordDictionary_( - AVFAudio _lib, NSDictionary txtDictionary) { - final _ret = _lib._objc_msgSend_1077(_lib._class_NSNetService1, - _lib._sel_dataFromTXTRecordDictionary_1, txtDictionary._id); - return NSData._(_ret, _lib, retain: true, release: true); + void normalizeAdjacentTextNodesPreservingCDATA_(bool preserve) { + _objc_msgSend_336(this.pointer, + _sel_normalizeAdjacentTextNodesPreservingCDATA_, preserve); } - void resolveWithTimeout_(double timeout) { - _lib._objc_msgSend_541(_id, _lib._sel_resolveWithTimeout_1, timeout); + void setAttributesAsDictionary_(objc.NSDictionary attributes) { + _objc_msgSend_697( + this.pointer, _sel_setAttributesAsDictionary_, attributes.pointer); } - bool getInputStream_outputStream_( - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - return _lib._objc_msgSend_1078(_id, _lib._sel_getInputStream_outputStream_1, - inputStream, outputStream); + @override + NSXMLElement init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); } - bool setTXTRecordData_(NSData? recordData) { - return _lib._objc_msgSend_1079( - _id, _lib._sel_setTXTRecordData_1, recordData?._id ?? ffi.nullptr); + @override + NSXMLElement initWithKind_(int kind) { + final _ret = _objc_msgSend_658(this.pointer, _sel_initWithKind_, kind); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); } - NSData? TXTRecordData() { - final _ret = _lib._objc_msgSend_286(_id, _lib._sel_TXTRecordData1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + static objc.NSObject document() { + final _ret = _objc_msgSend_40(_class_NSXMLElement, _sel_document); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void startMonitoring() { - _lib._objc_msgSend_1(_id, _lib._sel_startMonitoring1); + static objc.NSObject documentWithRootElement_(NSXMLElement element) { + final _ret = _objc_msgSend_660( + _class_NSXMLElement, _sel_documentWithRootElement_, element.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void stopMonitoring() { - _lib._objc_msgSend_1(_id, _lib._sel_stopMonitoring1); + static objc.NSObject elementWithName_(objc.NSString name) { + final _ret = _objc_msgSend_35( + _class_NSXMLElement, _sel_elementWithName_, name.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - @override - NSNetService init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSNetService._(_ret, _lib, retain: true, release: true); + static objc.NSObject elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_661(_class_NSXMLElement, + _sel_elementWithName_URI_, name.pointer, URI.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSNetService new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSNetService1, _lib._sel_new1); - return NSNetService._(_ret, _lib, retain: false, release: true); + static objc.NSObject elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_661(_class_NSXMLElement, + _sel_elementWithName_stringValue_, name.pointer, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSNetService allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSNetService1, _lib._sel_allocWithZone_1, zone); - return NSNetService._(_ret, _lib, retain: false, release: true); + static objc.NSObject elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_662( + _class_NSXMLElement, + _sel_elementWithName_children_attributes_, + name.pointer, + children?.pointer ?? ffi.nullptr, + attributes?.pointer ?? ffi.nullptr); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSNetService alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSNetService1, _lib._sel_alloc1); - return NSNetService._(_ret, _lib, retain: false, release: true); + static objc.NSObject attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLElement, + _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSNetService1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static objc.NSObject attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_626( + _class_NSXMLElement, + _sel_attributeWithName_URI_stringValue_, + name.pointer, + URI.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSNetService1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static objc.NSObject namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLElement, + _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSNetService1, _lib._sel_accessInstanceVariablesDirectly1); + static objc.NSObject processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661( + _class_NSXMLElement, + _sel_processingInstructionWithName_stringValue_, + name.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSNetService1, _lib._sel_useStoredAccessor1); + static objc.NSObject commentWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLElement, _sel_commentWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSNetService1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSObject textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLElement, _sel_textWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSNetService1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static objc.NSObject? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_2( + _class_NSXMLElement, _sel_DTDNodeWithXMLString_, string.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSNetService1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_297( + _class_NSXMLElement, _sel_localNameForName_, name.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSNetService1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = _objc_msgSend_14( + _class_NSXMLElement, _sel_prefixForName_, name.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSNetService1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_677( + _class_NSXMLElement, _sel_predefinedNamespaceForPrefix_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } -} -abstract class NSNetServiceOptions { - static const int NSNetServiceNoAutoRename = 1; - static const int NSNetServiceListenForConnections = 2; -} + static NSXMLElement new1() { + final _ret = _objc_msgSend_40(_class_NSXMLElement, _sel_new); + return NSXMLElement.castFromPointer(_ret, retain: false, release: true); + } -class NSURLSessionWebSocketTask extends NSURLSessionTask { - NSURLSessionWebSocketTask._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + static NSXMLElement allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSXMLElement, _sel_allocWithZone_, zone); + return NSXMLElement.castFromPointer(_ret, retain: false, release: true); + } - /// 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); + static NSXMLElement alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLElement, _sel_alloc); + return NSXMLElement.castFromPointer(_ret, retain: false, release: true); } - /// Returns a [NSURLSessionWebSocketTask] that wraps the given raw object pointer. - static NSURLSessionWebSocketTask castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionWebSocketTask._(other, lib, - retain: retain, release: release); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLElement, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - /// 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); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLElement, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - void sendMessage_completionHandler_(NSURLSessionWebSocketMessage message, - ObjCBlock_ffiVoid_NSError completionHandler) { - _lib._objc_msgSend_1082(_id, _lib._sel_sendMessage_completionHandler_1, - message._id, completionHandler._id); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSXMLElement, _sel_accessInstanceVariablesDirectly); } - void receiveMessageWithCompletionHandler_( - ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError - completionHandler) { - _lib._objc_msgSend_1083(_id, - _lib._sel_receiveMessageWithCompletionHandler_1, completionHandler._id); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSXMLElement, _sel_useStoredAccessor); } - void sendPingWithPongReceiveHandler_( - ObjCBlock_ffiVoid_NSError pongReceiveHandler) { - _lib._objc_msgSend_1084(_id, _lib._sel_sendPingWithPongReceiveHandler_1, - pongReceiveHandler._id); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLElement, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - void cancelWithCloseCode_reason_(int closeCode, NSData? reason) { - _lib._objc_msgSend_1085(_id, _lib._sel_cancelWithCloseCode_reason_1, - closeCode, reason?._id ?? ffi.nullptr); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLElement, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - int get maximumMessageSize { - return _lib._objc_msgSend_83(_id, _lib._sel_maximumMessageSize1); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLElement, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - set maximumMessageSize(int value) { - return _lib._objc_msgSend_635( - _id, _lib._sel_setMaximumMessageSize_1, value); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSXMLElement, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int get closeCode { - return _lib._objc_msgSend_1086(_id, _lib._sel_closeCode1); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSXMLElement, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - NSData? get closeReason { - final _ret = _lib._objc_msgSend_286(_id, _lib._sel_closeReason1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); +late final _class_NSXMLElement = objc.getClass("NSXMLElement"); + +class NSXMLNode extends objc.NSObject { + NSXMLNode._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSXMLNode] that points to the same underlying object as [other]. + NSXMLNode.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSXMLNode] that wraps the given raw object pointer. + NSXMLNode.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSXMLNode]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSXMLNode); } @override - NSURLSessionWebSocketTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + NSXMLNode init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionWebSocketTask new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketTask1, _lib._sel_new1); - return NSURLSessionWebSocketTask._(_ret, _lib, - retain: false, release: true); + NSXMLNode initWithKind_(int kind) { + final _ret = _objc_msgSend_658(this.pointer, _sel_initWithKind_, kind); + return NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionWebSocketTask allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3(_lib._class_NSURLSessionWebSocketTask1, - _lib._sel_allocWithZone_1, zone); - return NSURLSessionWebSocketTask._(_ret, _lib, - retain: false, release: true); + NSXMLNode initWithKind_options_(int kind, int options) { + final _ret = _objc_msgSend_659( + this.pointer, _sel_initWithKind_options_, kind, options); + return NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionWebSocketTask alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketTask1, _lib._sel_alloc1); - return NSURLSessionWebSocketTask._(_ret, _lib, - retain: false, release: true); + static objc.NSObject document() { + final _ret = _objc_msgSend_40(_class_NSXMLNode, _sel_document); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLSessionWebSocketTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static objc.NSObject documentWithRootElement_(NSXMLElement element) { + final _ret = _objc_msgSend_660( + _class_NSXMLNode, _sel_documentWithRootElement_, element.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLSessionWebSocketTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static objc.NSObject elementWithName_(objc.NSString name) { + final _ret = + _objc_msgSend_35(_class_NSXMLNode, _sel_elementWithName_, name.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLSessionWebSocketTask1, - _lib._sel_accessInstanceVariablesDirectly1); + static objc.NSObject elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_661( + _class_NSXMLNode, _sel_elementWithName_URI_, name.pointer, URI.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLSessionWebSocketTask1, _lib._sel_useStoredAccessor1); + static objc.NSObject elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_661(_class_NSXMLNode, + _sel_elementWithName_stringValue_, name.pointer, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLSessionWebSocketTask1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSObject elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_662( + _class_NSXMLNode, + _sel_elementWithName_children_attributes_, + name.pointer, + children?.pointer ?? ffi.nullptr, + attributes?.pointer ?? ffi.nullptr); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLSessionWebSocketTask1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static objc.NSObject attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLNode, + _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLSessionWebSocketTask1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static objc.NSObject attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_626( + _class_NSXMLNode, + _sel_attributeWithName_URI_stringValue_, + name.pointer, + URI.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSURLSessionWebSocketTask1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSObject namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLNode, + _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLSessionWebSocketTask1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661( + _class_NSXMLNode, + _sel_processingInstructionWithName_stringValue_, + name.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } -} - -class NSURLSessionWebSocketMessage extends NSObject { - NSURLSessionWebSocketMessage._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSURLSessionWebSocketMessage] that points to the same underlying object as [other]. - static NSURLSessionWebSocketMessage castFrom( - T other) { - return NSURLSessionWebSocketMessage._(other._id, other._lib, - retain: true, release: true); + static objc.NSObject commentWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLNode, _sel_commentWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSURLSessionWebSocketMessage] that wraps the given raw object pointer. - static NSURLSessionWebSocketMessage castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionWebSocketMessage._(other, lib, - retain: retain, release: release); + static objc.NSObject textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLNode, _sel_textWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSURLSessionWebSocketMessage]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionWebSocketMessage1); + static objc.NSObject? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_2( + _class_NSXMLNode, _sel_DTDNodeWithXMLString_, string.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSURLSessionWebSocketMessage initWithData_(NSData data) { - final _ret = - _lib._objc_msgSend_279(_id, _lib._sel_initWithData_1, data._id); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: true, release: true); + int get kind { + return _objc_msgSend_663(this.pointer, _sel_kind); } - NSURLSessionWebSocketMessage initWithString_(NSString string) { - final _ret = - _lib._objc_msgSend_31(_id, _lib._sel_initWithString_1, string._id); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: true, release: true); + objc.NSString? get name { + final _ret = _objc_msgSend_13(this.pointer, _sel_name); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int get type { - return _lib._objc_msgSend_1081(_id, _lib._sel_type1); + set name(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); } - NSData? get data { - final _ret = _lib._objc_msgSend_286(_id, _lib._sel_data1); + objc.NSObject? get objectValue { + final _ret = _objc_msgSend_66(this.pointer, _sel_objectValue); return _ret.address == 0 ? null - : NSData._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + set objectValue(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setObjectValue_, value?.pointer ?? ffi.nullptr); } - NSString? get string { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_string1); + objc.NSString? get stringValue { + final _ret = _objc_msgSend_13(this.pointer, _sel_stringValue); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSURLSessionWebSocketMessage init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: true, release: true); + set stringValue(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setStringValue_, value?.pointer ?? ffi.nullptr); } - static NSURLSessionWebSocketMessage new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_new1); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: false, release: true); + void setStringValue_resolvingEntities_(objc.NSString string, bool resolve) { + _objc_msgSend_664(this.pointer, _sel_setStringValue_resolvingEntities_, + string.pointer, resolve); } - static NSURLSessionWebSocketMessage allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3(_lib._class_NSURLSessionWebSocketMessage1, - _lib._sel_allocWithZone_1, zone); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: false, release: true); + int get index { + return _objc_msgSend_29(this.pointer, _sel_index); } - static NSURLSessionWebSocketMessage alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_alloc1); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: false, release: true); + int get level { + return _objc_msgSend_29(this.pointer, _sel_level); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLSessionWebSocketMessage1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + NSXMLDocument? get rootDocument { + final _ret = _objc_msgSend_688(this.pointer, _sel_rootDocument); + return _ret.address == 0 + ? null + : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLSessionWebSocketMessage1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + NSXMLNode? get parent { + final _ret = _objc_msgSend_689(this.pointer, _sel_parent); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLSessionWebSocketMessage1, - _lib._sel_accessInstanceVariablesDirectly1); + int get childCount { + return _objc_msgSend_29(this.pointer, _sel_childCount); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLSessionWebSocketMessage1, - _lib._sel_useStoredAccessor1); + objc.NSArray? get children { + final _ret = _objc_msgSend_69(this.pointer, _sel_children); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63( - _lib._class_NSURLSessionWebSocketMessage1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, - key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + NSXMLNode? childAtIndex_(int index) { + final _ret = _objc_msgSend_690(this.pointer, _sel_childAtIndex_, index); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLSessionWebSocketMessage1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + NSXMLNode? get previousSibling { + final _ret = _objc_msgSend_689(this.pointer, _sel_previousSibling); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLSessionWebSocketMessage1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + NSXMLNode? get nextSibling { + final _ret = _objc_msgSend_689(this.pointer, _sel_nextSibling); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSURLSessionWebSocketMessage1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + NSXMLNode? get previousNode { + final _ret = _objc_msgSend_689(this.pointer, _sel_previousNode); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLSessionWebSocketMessage1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + NSXMLNode? get nextNode { + final _ret = _objc_msgSend_689(this.pointer, _sel_nextNode); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } -} -abstract class NSURLSessionWebSocketMessageType { - static const int NSURLSessionWebSocketMessageTypeData = 0; - static const int NSURLSessionWebSocketMessageTypeString = 1; -} + void detach() { + _objc_msgSend_82(this.pointer, _sel_detach); + } -void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = - ++_ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry[id] = - fn; - return ffi.Pointer.fromAddress(id); -} + objc.NSString? get XPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_XPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1); + objc.NSString? get localName { + final _ret = _objc_msgSend_13(this.pointer, _sel_localName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -class ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError - extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + objc.NSString? get prefix { + final _ret = _objc_msgSend_13(this.pointer, _sel_prefix); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError._( - pointer, lib, - retain: retain, release: release); + objc.NSString? get URI { + final _ret = _objc_msgSend_13(this.pointer, _sel_URI); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + set URI(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setURI_, value?.pointer ?? ffi.nullptr); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.fromFunction( - AVFAudio lib, void Function(NSURLSessionWebSocketMessage?, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSURLSessionWebSocketMessage._(arg0, lib, - retain: true, release: true), - arg1.address == 0 ? null : NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_297( + _class_NSXMLNode, _sel_localNameForName_, name.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.listener( - AVFAudio lib, void Function(NSURLSessionWebSocketMessage?, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSURLSessionWebSocketMessage._(arg0, lib, - retain: true, release: true), - arg1.address == 0 - ? null - : NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = + _objc_msgSend_14(_class_NSXMLNode, _sel_prefixForName_, name.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_677( + _class_NSXMLNode, _sel_predefinedNamespaceForPrefix_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + } - void call(NSURLSessionWebSocketMessage? arg0, NSError? arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); -} + objc.NSString get description { + final _ret = _objc_msgSend_12(this.pointer, _sel_description); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -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; -} + objc.NSString get XMLString { + final _ret = _objc_msgSend_12(this.pointer, _sel_XMLString); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + objc.NSString XMLStringWithOptions_(int options) { + final _ret = + _objc_msgSend_691(this.pointer, _sel_XMLStringWithOptions_, options); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); + objc.NSString canonicalXMLStringPreservingComments_(bool comments) { + final _ret = _objc_msgSend_692( + this.pointer, _sel_canonicalXMLStringPreservingComments_, comments); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -class ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + objc.NSArray? nodesForXPath_error_( + objc.NSString xpath, ffi.Pointer> error) { + final _ret = _objc_msgSend_281( + this.pointer, _sel_nodesForXPath_error_, xpath.pointer, error); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError._(pointer, lib, - retain: retain, release: release); + objc.NSArray? objectsForXQuery_constants_error_( + objc.NSString xquery, + objc.NSDictionary? constants, + ffi.Pointer> error) { + final _ret = _objc_msgSend_693( + this.pointer, + _sel_objectsForXQuery_constants_error_, + xquery.pointer, + constants?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + objc.NSArray? objectsForXQuery_error_( + objc.NSString xquery, ffi.Pointer> error) { + final _ret = _objc_msgSend_281( + this.pointer, _sel_objectsForXQuery_error_, xquery.pointer, error); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.fromFunction( - AVFAudio lib, void Function(NSData?, NSURLResponse?, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : NSData._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSURLResponse._(arg1, lib, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + static NSXMLNode new1() { + final _ret = _objc_msgSend_40(_class_NSXMLNode, _sel_new); + return NSXMLNode.castFromPointer(_ret, retain: false, release: true); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.listener( - AVFAudio lib, void Function(NSData?, NSURLResponse?, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure((ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : NSData._(arg0, lib, retain: true, release: true), - arg1.address == 0 - ? null - : NSURLResponse._(arg1, lib, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + static NSXMLNode allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSXMLNode, _sel_allocWithZone_, zone); + return NSXMLNode.castFromPointer(_ret, retain: false, release: true); + } - void call(NSData? arg0, NSURLResponse? arg1, NSError? arg2) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>()( - _id, - arg0?._id ?? ffi.nullptr, - arg1?._id ?? ffi.nullptr, - arg2?._id ?? ffi.nullptr); -} + static NSXMLNode alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLNode, _sel_alloc); + return NSXMLNode.castFromPointer(_ret, retain: false, release: true); + } -void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLNode, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } -void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLNode, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } -class ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError._( - ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSXMLNode, _sel_accessInstanceVariablesDirectly); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError._(pointer, lib, - retain: retain, release: release); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSXMLNode, _sel_useStoredAccessor); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLNode, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.fromFunction( - AVFAudio lib, void Function(NSURL?, NSURLResponse?, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - arg0.address == 0 - ? null - : NSURL._(arg0, lib, retain: true, release: true), - arg1.address == 0 - ? null - : NSURLResponse._(arg1, lib, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLNode, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.listener( - AVFAudio lib, void Function(NSURL?, NSURLResponse?, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : NSURL._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSURLResponse._(arg1, lib, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLNode, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } - void call(NSURL? arg0, NSURLResponse? arg1, NSError? arg2) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>()( - _id, - arg0?._id ?? ffi.nullptr, - arg1?._id ?? ffi.nullptr, - arg2?._id ?? ffi.nullptr); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSXMLNode, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSXMLNode, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } } -class NSProtocolChecker extends NSProxy { - NSProtocolChecker._(ffi.Pointer id, AVFAudio lib, +late final _class_NSXMLNode = objc.getClass("NSXMLNode"); + +abstract class NSXMLNodeKind { + static const int NSXMLInvalidKind = 0; + static const int NSXMLDocumentKind = 1; + static const int NSXMLElementKind = 2; + static const int NSXMLAttributeKind = 3; + static const int NSXMLNamespaceKind = 4; + static const int NSXMLProcessingInstructionKind = 5; + static const int NSXMLCommentKind = 6; + static const int NSXMLTextKind = 7; + static const int NSXMLDTDKind = 8; + static const int NSXMLEntityDeclarationKind = 9; + static const int NSXMLAttributeDeclarationKind = 10; + static const int NSXMLElementDeclarationKind = 11; + static const int NSXMLNotationDeclarationKind = 12; +} + +late final _sel_initWithKind_ = objc.registerName("initWithKind:"); +final _objc_msgSend_658 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); + +abstract class NSXMLNodeOptions { + static const int NSXMLNodeOptionsNone = 0; + static const int NSXMLNodeIsCDATA = 1; + static const int NSXMLNodeExpandEmptyElement = 2; + static const int NSXMLNodeCompactEmptyElement = 4; + static const int NSXMLNodeUseSingleQuotes = 8; + static const int NSXMLNodeUseDoubleQuotes = 16; + static const int NSXMLNodeNeverEscapeContents = 32; + static const int NSXMLDocumentTidyHTML = 512; + static const int NSXMLDocumentTidyXML = 1024; + static const int NSXMLDocumentValidate = 8192; + static const int NSXMLNodeLoadExternalEntitiesAlways = 16384; + static const int NSXMLNodeLoadExternalEntitiesSameOriginOnly = 32768; + static const int NSXMLNodeLoadExternalEntitiesNever = 524288; + static const int NSXMLDocumentXInclude = 65536; + static const int NSXMLNodePrettyPrint = 131072; + static const int NSXMLDocumentIncludeContentTypeDeclaration = 262144; + static const int NSXMLNodePreserveNamespaceOrder = 1048576; + static const int NSXMLNodePreserveAttributeOrder = 2097152; + static const int NSXMLNodePreserveEntities = 4194304; + static const int NSXMLNodePreservePrefixes = 8388608; + static const int NSXMLNodePreserveCDATA = 16777216; + static const int NSXMLNodePreserveWhitespace = 33554432; + static const int NSXMLNodePreserveDTD = 67108864; + static const int NSXMLNodePreserveCharacterReferences = 134217728; + static const int NSXMLNodePromoteSignificantWhitespace = 268435456; + static const int NSXMLNodePreserveEmptyElements = 6; + static const int NSXMLNodePreserveQuotes = 24; + static const int NSXMLNodePreserveAll = 4293918750; +} + +late final _sel_initWithKind_options_ = + objc.registerName("initWithKind:options:"); +final _objc_msgSend_659 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Int32, ffi.Int32)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int, int)>(); +late final _sel_document = objc.registerName("document"); +late final _sel_documentWithRootElement_ = + objc.registerName("documentWithRootElement:"); +final _objc_msgSend_660 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_elementWithName_ = objc.registerName("elementWithName:"); +late final _sel_elementWithName_URI_ = + objc.registerName("elementWithName:URI:"); +final _objc_msgSend_661 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_elementWithName_stringValue_ = + objc.registerName("elementWithName:stringValue:"); +late final _sel_elementWithName_children_attributes_ = + objc.registerName("elementWithName:children:attributes:"); +final _objc_msgSend_662 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_attributeWithName_stringValue_ = + objc.registerName("attributeWithName:stringValue:"); +late final _sel_attributeWithName_URI_stringValue_ = + objc.registerName("attributeWithName:URI:stringValue:"); +late final _sel_namespaceWithName_stringValue_ = + objc.registerName("namespaceWithName:stringValue:"); +late final _sel_processingInstructionWithName_stringValue_ = + objc.registerName("processingInstructionWithName:stringValue:"); +late final _sel_commentWithStringValue_ = + objc.registerName("commentWithStringValue:"); +late final _sel_textWithStringValue_ = + objc.registerName("textWithStringValue:"); +late final _sel_DTDNodeWithXMLString_ = + objc.registerName("DTDNodeWithXMLString:"); +late final _sel_kind = objc.registerName("kind"); +final _objc_msgSend_663 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_objectValue = objc.registerName("objectValue"); +late final _sel_setObjectValue_ = objc.registerName("setObjectValue:"); +late final _sel_stringValue = objc.registerName("stringValue"); +late final _sel_setStringValue_ = objc.registerName("setStringValue:"); +late final _sel_setStringValue_resolvingEntities_ = + objc.registerName("setStringValue:resolvingEntities:"); +final _objc_msgSend_664 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_index = objc.registerName("index"); +late final _sel_level = objc.registerName("level"); + +class NSXMLDocument extends NSXMLNode { + NSXMLDocument._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSProtocolChecker] that points to the same underlying object as [other]. - static NSProtocolChecker castFrom(T other) { - return NSProtocolChecker._(other._id, other._lib, - retain: true, release: true); + /// Constructs a [NSXMLDocument] that points to the same underlying object as [other]. + NSXMLDocument.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSXMLDocument] that wraps the given raw object pointer. + NSXMLDocument.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSXMLDocument]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSXMLDocument); } - /// Returns a [NSProtocolChecker] that wraps the given raw object pointer. - static NSProtocolChecker castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSProtocolChecker._(other, lib, retain: retain, release: release); + @override + NSXMLDocument init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + } + + NSXMLDocument? initWithXMLString_options_error_(objc.NSString string, + int mask, ffi.Pointer> error) { + final _ret = _objc_msgSend_665(this.pointer, + _sel_initWithXMLString_options_error_, string.pointer, mask, error); + return _ret.address == 0 + ? null + : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + } + + NSXMLDocument? initWithContentsOfURL_options_error_(objc.NSURL url, int mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_666(this.pointer, + _sel_initWithContentsOfURL_options_error_, url.pointer, mask, error); + return _ret.address == 0 + ? null + : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + } + + NSXMLDocument? initWithData_options_error_(objc.NSData data, int mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_667(this.pointer, + _sel_initWithData_options_error_, data.pointer, mask, error); + return _ret.address == 0 + ? null + : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSProtocolChecker]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSProtocolChecker1); + NSXMLDocument initWithRootElement_(NSXMLElement? element) { + final _ret = _objc_msgSend_668(this.pointer, _sel_initWithRootElement_, + element?.pointer ?? ffi.nullptr); + return NSXMLDocument.castFromPointer(_ret, retain: true, release: true); } - Protocol get protocol { - final _ret = _lib._objc_msgSend_1098(_id, _lib._sel_protocol1); - return Protocol._(_ret, _lib, retain: true, release: true); + static objc.NSObject replacementClassForClass_(objc.NSObject cls) { + final _ret = _objc_msgSend_387( + _class_NSXMLDocument, _sel_replacementClassForClass_, cls.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSObject? get target { - final _ret = _lib._objc_msgSend_1099(_id, _lib._sel_target1); + objc.NSString? get characterEncoding { + final _ret = _objc_msgSend_13(this.pointer, _sel_characterEncoding); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSProtocolChecker protocolCheckerWithTarget_protocol_( - AVFAudio _lib, NSObject anObject, Protocol aProtocol) { - final _ret = _lib._objc_msgSend_1100( - _lib._class_NSProtocolChecker1, - _lib._sel_protocolCheckerWithTarget_protocol_1, - anObject._id, - aProtocol._id); - return NSProtocolChecker._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSProtocolChecker initWithTarget_protocol_( - NSObject anObject, Protocol aProtocol) { - final _ret = _lib._objc_msgSend_1100( - _id, _lib._sel_initWithTarget_protocol_1, anObject._id, aProtocol._id); - return NSProtocolChecker._(_ret, _lib, retain: true, release: true); + set characterEncoding(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setCharacterEncoding_, + value?.pointer ?? ffi.nullptr); } - static NSObject alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSProtocolChecker1, _lib._sel_alloc1); - return NSObject._(_ret, _lib, retain: false, release: true); + objc.NSString? get version { + final _ret = _objc_msgSend_13(this.pointer, _sel_version); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool respondsToSelector_( - AVFAudio _lib, ffi.Pointer aSelector) { - return _lib._objc_msgSend_4(_lib._class_NSProtocolChecker1, - _lib._sel_respondsToSelector_1, aSelector); + set version(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setVersion_, value?.pointer ?? ffi.nullptr); } -} - -class NSTask extends NSObject { - NSTask._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSTask] that points to the same underlying object as [other]. - static NSTask castFrom(T other) { - return NSTask._(other._id, other._lib, retain: true, release: true); + bool get standalone { + return _objc_msgSend_7(this.pointer, _sel_isStandalone); } - /// Returns a [NSTask] that wraps the given raw object pointer. - static NSTask castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSTask._(other, lib, retain: retain, release: release); + set standalone(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setStandalone_, value); } - /// Returns whether [obj] is an instance of [NSTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSTask1); + int get documentContentKind { + return _objc_msgSend_669(this.pointer, _sel_documentContentKind); } - @override - NSTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSTask._(_ret, _lib, retain: true, release: true); + set documentContentKind(int value) { + return _objc_msgSend_670(this.pointer, _sel_setDocumentContentKind_, value); } - NSURL? get executableURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_executableURL1); + objc.NSString? get MIMEType { + final _ret = _objc_msgSend_13(this.pointer, _sel_MIMEType); return _ret.address == 0 ? null - : NSURL._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set executableURL(NSURL? value) { - return _lib._objc_msgSend_671( - _id, _lib._sel_setExecutableURL_1, value?._id ?? ffi.nullptr); + set MIMEType(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setMIMEType_, value?.pointer ?? ffi.nullptr); } - NSArray? get arguments { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_arguments1); + NSXMLDTD? get DTD { + final _ret = _objc_msgSend_680(this.pointer, _sel_DTD); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); + : NSXMLDTD.castFromPointer(_ret, retain: true, release: true); + } + + set DTD(NSXMLDTD? value) { + return _objc_msgSend_681( + this.pointer, _sel_setDTD_, value?.pointer ?? ffi.nullptr); } - set arguments(NSArray? value) { - return _lib._objc_msgSend_1053( - _id, _lib._sel_setArguments_1, value?._id ?? ffi.nullptr); + void setRootElement_(NSXMLElement root) { + _objc_msgSend_682(this.pointer, _sel_setRootElement_, root.pointer); } - NSDictionary? get environment { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_environment1); + NSXMLElement? rootElement() { + final _ret = _objc_msgSend_683(this.pointer, _sel_rootElement); return _ret.address == 0 ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + : NSXMLElement.castFromPointer(_ret, retain: true, release: true); } - set environment(NSDictionary? value) { - return _lib._objc_msgSend_634( - _id, _lib._sel_setEnvironment_1, value?._id ?? ffi.nullptr); + void insertChild_atIndex_(NSXMLNode child, int index) { + _objc_msgSend_671( + this.pointer, _sel_insertChild_atIndex_, child.pointer, index); } - NSURL? get currentDirectoryURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_currentDirectoryURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + void insertChildren_atIndex_(objc.NSArray children, int index) { + _objc_msgSend_672( + this.pointer, _sel_insertChildren_atIndex_, children.pointer, index); } - set currentDirectoryURL(NSURL? value) { - return _lib._objc_msgSend_671( - _id, _lib._sel_setCurrentDirectoryURL_1, value?._id ?? ffi.nullptr); + void removeChildAtIndex_(int index) { + _objc_msgSend_414(this.pointer, _sel_removeChildAtIndex_, index); } - NSData? get launchRequirementData { - final _ret = _lib._objc_msgSend_286(_id, _lib._sel_launchRequirementData1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + void setChildren_(objc.NSArray? children) { + _objc_msgSend_260( + this.pointer, _sel_setChildren_, children?.pointer ?? ffi.nullptr); } - set launchRequirementData(NSData? value) { - return _lib._objc_msgSend_1021( - _id, _lib._sel_setLaunchRequirementData_1, value?._id ?? ffi.nullptr); + void addChild_(NSXMLNode child) { + _objc_msgSend_673(this.pointer, _sel_addChild_, child.pointer); } - NSObject? get standardInput { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_standardInput1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { + _objc_msgSend_674( + this.pointer, _sel_replaceChildAtIndex_withNode_, index, node.pointer); } - set standardInput(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setStandardInput_1, value?._id ?? ffi.nullptr); + objc.NSData get XMLData { + final _ret = _objc_msgSend_104(this.pointer, _sel_XMLData); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - NSObject? get standardOutput { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_standardOutput1); + objc.NSData XMLDataWithOptions_(int options) { + final _ret = + _objc_msgSend_684(this.pointer, _sel_XMLDataWithOptions_, options); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject? objectByApplyingXSLT_arguments_error_( + objc.NSData xslt, + objc.NSDictionary? arguments, + ffi.Pointer> error) { + final _ret = _objc_msgSend_685( + this.pointer, + _sel_objectByApplyingXSLT_arguments_error_, + xslt.pointer, + arguments?.pointer ?? ffi.nullptr, + error); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set standardOutput(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setStandardOutput_1, value?._id ?? ffi.nullptr); + objc.NSObject? objectByApplyingXSLTString_arguments_error_( + objc.NSString xslt, + objc.NSDictionary? arguments, + ffi.Pointer> error) { + final _ret = _objc_msgSend_686( + this.pointer, + _sel_objectByApplyingXSLTString_arguments_error_, + xslt.pointer, + arguments?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSObject? get standardError { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_standardError1); + objc.NSObject? objectByApplyingXSLTAtURL_arguments_error_( + objc.NSURL xsltURL, + objc.NSDictionary? argument, + ffi.Pointer> error) { + final _ret = _objc_msgSend_687( + this.pointer, + _sel_objectByApplyingXSLTAtURL_arguments_error_, + xsltURL.pointer, + argument?.pointer ?? ffi.nullptr, + error); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set standardError(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setStandardError_1, value?._id ?? ffi.nullptr); + bool validateAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_8(this.pointer, _sel_validateAndReturnError_, error); } - bool launchAndReturnError_(ffi.Pointer> error) { - return _lib._objc_msgSend_255(_id, _lib._sel_launchAndReturnError_1, error); + @override + NSXMLDocument initWithKind_(int kind) { + final _ret = _objc_msgSend_658(this.pointer, _sel_initWithKind_, kind); + return NSXMLDocument.castFromPointer(_ret, retain: true, release: true); } - void interrupt() { - _lib._objc_msgSend_1(_id, _lib._sel_interrupt1); + @override + NSXMLDocument initWithKind_options_(int kind, int options) { + final _ret = _objc_msgSend_659( + this.pointer, _sel_initWithKind_options_, kind, options); + return NSXMLDocument.castFromPointer(_ret, retain: true, release: true); } - void terminate() { - _lib._objc_msgSend_1(_id, _lib._sel_terminate1); + static objc.NSObject document() { + final _ret = _objc_msgSend_40(_class_NSXMLDocument, _sel_document); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - bool suspend() { - return _lib._objc_msgSend_12(_id, _lib._sel_suspend1); + static objc.NSObject documentWithRootElement_(NSXMLElement element) { + final _ret = _objc_msgSend_660( + _class_NSXMLDocument, _sel_documentWithRootElement_, element.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - bool resume() { - return _lib._objc_msgSend_12(_id, _lib._sel_resume1); + static objc.NSObject elementWithName_(objc.NSString name) { + final _ret = _objc_msgSend_35( + _class_NSXMLDocument, _sel_elementWithName_, name.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get processIdentifier { - return _lib._objc_msgSend_237(_id, _lib._sel_processIdentifier1); + static objc.NSObject elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_661(_class_NSXMLDocument, + _sel_elementWithName_URI_, name.pointer, URI.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - bool get running { - return _lib._objc_msgSend_12(_id, _lib._sel_isRunning1); + static objc.NSObject elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_661(_class_NSXMLDocument, + _sel_elementWithName_stringValue_, name.pointer, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get terminationStatus { - return _lib._objc_msgSend_237(_id, _lib._sel_terminationStatus1); + static objc.NSObject elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_662( + _class_NSXMLDocument, + _sel_elementWithName_children_attributes_, + name.pointer, + children?.pointer ?? ffi.nullptr, + attributes?.pointer ?? ffi.nullptr); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get terminationReason { - return _lib._objc_msgSend_1101(_id, _lib._sel_terminationReason1); + static objc.NSObject attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDocument, + _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - ObjCBlock_ffiVoid_NSTask? get terminationHandler { - final _ret = _lib._objc_msgSend_1102(_id, _lib._sel_terminationHandler1); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid_NSTask._(_ret, _lib, retain: true, release: true); + static objc.NSObject attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_626( + _class_NSXMLDocument, + _sel_attributeWithName_URI_stringValue_, + name.pointer, + URI.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set terminationHandler(ObjCBlock_ffiVoid_NSTask? value) { - return _lib._objc_msgSend_1103( - _id, _lib._sel_setTerminationHandler_1, value?._id ?? ffi.nullptr); + static objc.NSObject namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDocument, + _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get qualityOfService { - return _lib._objc_msgSend_543(_id, _lib._sel_qualityOfService1); + static objc.NSObject processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661( + _class_NSXMLDocument, + _sel_processingInstructionWithName_stringValue_, + name.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set qualityOfService(int value) { - return _lib._objc_msgSend_544(_id, _lib._sel_setQualityOfService_1, value); + static objc.NSObject commentWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35(_class_NSXMLDocument, + _sel_commentWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSTask? - launchedTaskWithExecutableURL_arguments_error_terminationHandler_( - AVFAudio _lib, - NSURL url, - NSArray arguments, - ffi.Pointer> error, - ObjCBlock_ffiVoid_NSTask? terminationHandler) { - final _ret = _lib._objc_msgSend_1104( - _lib._class_NSTask1, - _lib._sel_launchedTaskWithExecutableURL_arguments_error_terminationHandler_1, - url._id, - arguments._id, - error, - terminationHandler?._id ?? ffi.nullptr); + static objc.NSObject textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLDocument, _sel_textWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_2( + _class_NSXMLDocument, _sel_DTDNodeWithXMLString_, string.pointer); return _ret.address == 0 ? null - : NSTask._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void waitUntilExit() { - _lib._objc_msgSend_1(_id, _lib._sel_waitUntilExit1); + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_297( + _class_NSXMLDocument, _sel_localNameForName_, name.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get launchPath { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_launchPath1); + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = _objc_msgSend_14( + _class_NSXMLDocument, _sel_prefixForName_, name.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set launchPath(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setLaunchPath_1, value?._id ?? ffi.nullptr); + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_677( + _class_NSXMLDocument, _sel_predefinedNamespaceForPrefix_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - NSString get currentDirectoryPath { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_currentDirectoryPath1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSXMLDocument new1() { + final _ret = _objc_msgSend_40(_class_NSXMLDocument, _sel_new); + return NSXMLDocument.castFromPointer(_ret, retain: false, release: true); } - set currentDirectoryPath(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setCurrentDirectoryPath_1, value._id); + static NSXMLDocument allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSXMLDocument, _sel_allocWithZone_, zone); + return NSXMLDocument.castFromPointer(_ret, retain: false, release: true); } - void launch() { - _lib._objc_msgSend_1(_id, _lib._sel_launch1); + static NSXMLDocument alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLDocument, _sel_alloc); + return NSXMLDocument.castFromPointer(_ret, retain: false, release: true); } - static NSTask launchedTaskWithLaunchPath_arguments_( - AVFAudio _lib, NSString path, NSArray arguments) { - final _ret = _lib._objc_msgSend_1105( - _lib._class_NSTask1, - _lib._sel_launchedTaskWithLaunchPath_arguments_1, - path._id, - arguments._id); - return NSTask._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLDocument, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - static NSTask new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSTask1, _lib._sel_new1); - return NSTask._(_ret, _lib, retain: false, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLDocument, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static NSTask allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSTask1, _lib._sel_allocWithZone_1, zone); - return NSTask._(_ret, _lib, retain: false, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSXMLDocument, _sel_accessInstanceVariablesDirectly); } - static NSTask alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSTask1, _lib._sel_alloc1); - return NSTask._(_ret, _lib, retain: false, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSXMLDocument, _sel_useStoredAccessor); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLDocument, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLDocument, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSTask1, _lib._sel_accessInstanceVariablesDirectly1); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLDocument, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSXMLDocument, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSXMLDocument, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSXMLDocument = objc.getClass("NSXMLDocument"); +late final _sel_initWithXMLString_options_error_ = + objc.registerName("initWithXMLString:options:error:"); +final _objc_msgSend_665 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_initWithContentsOfURL_options_error_ = + objc.registerName("initWithContentsOfURL:options:error:"); +final _objc_msgSend_666 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_initWithData_options_error_ = + objc.registerName("initWithData:options:error:"); +final _objc_msgSend_667 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_initWithRootElement_ = + objc.registerName("initWithRootElement:"); +final _objc_msgSend_668 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_replacementClassForClass_ = + objc.registerName("replacementClassForClass:"); +late final _sel_characterEncoding = objc.registerName("characterEncoding"); +late final _sel_setCharacterEncoding_ = + objc.registerName("setCharacterEncoding:"); +late final _sel_setVersion_ = objc.registerName("setVersion:"); +late final _sel_isStandalone = objc.registerName("isStandalone"); +late final _sel_setStandalone_ = objc.registerName("setStandalone:"); - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSTask1, _lib._sel_useStoredAccessor1); - } +abstract class NSXMLDocumentContentKind { + static const int NSXMLDocumentXMLKind = 0; + static const int NSXMLDocumentXHTMLKind = 1; + static const int NSXMLDocumentHTMLKind = 2; + static const int NSXMLDocumentTextKind = 3; +} - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSTask1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } +late final _sel_documentContentKind = objc.registerName("documentContentKind"); +final _objc_msgSend_669 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDocumentContentKind_ = + objc.registerName("setDocumentContentKind:"); +final _objc_msgSend_670 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setMIMEType_ = objc.registerName("setMIMEType:"); - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSTask1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } +class NSXMLDTD extends NSXMLNode { + NSXMLDTD._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSTask1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + /// Constructs a [NSXMLDTD] that points to the same underlying object as [other]. + NSXMLDTD.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSXMLDTD] that wraps the given raw object pointer. + NSXMLDTD.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSXMLDTD]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSXMLDTD); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSTask1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + @override + NSXMLDTD init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLDTD.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSTask1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + @override + NSXMLDTD initWithKind_options_(int kind, int options) { + final _ret = _objc_msgSend_659( + this.pointer, _sel_initWithKind_options_, kind, options); + return NSXMLDTD.castFromPointer(_ret, retain: true, release: true); } -} -abstract class NSTaskTerminationReason { - static const int NSTaskTerminationReasonExit = 1; - static const int NSTaskTerminationReasonUncaughtSignal = 2; -} + NSXMLDTD? initWithContentsOfURL_options_error_(objc.NSURL url, int mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_666(this.pointer, + _sel_initWithContentsOfURL_options_error_, url.pointer, mask, error); + return _ret.address == 0 + ? null + : NSXMLDTD.castFromPointer(_ret, retain: true, release: true); + } -void _ObjCBlock_ffiVoid_NSTask_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSTask_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSTask_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSTask_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSTask_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSTask_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + NSXMLDTD? initWithData_options_error_(objc.NSData data, int mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_667(this.pointer, + _sel_initWithData_options_error_, data.pointer, mask, error); + return _ret.address == 0 + ? null + : NSXMLDTD.castFromPointer(_ret, retain: true, release: true); + } -void _ObjCBlock_ffiVoid_NSTask_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSTask_closureRegistry[block.ref.target.address]!(arg0); + objc.NSString? get publicID { + final _ret = _objc_msgSend_13(this.pointer, _sel_publicID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -class ObjCBlock_ffiVoid_NSTask extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSTask._(ffi.Pointer<_ObjCBlock> id, AVFAudio lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + set publicID(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setPublicID_, value?.pointer ?? ffi.nullptr); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSTask castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSTask._(pointer, lib, - retain: retain, release: release); + objc.NSString? get systemID { + final _ret = _objc_msgSend_13(this.pointer, _sel_systemID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSTask.fromFunctionPointer( - AVFAudio lib, - ffi.Pointer< - ffi - .NativeFunction arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTask_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + set systemID(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setSystemID_, value?.pointer ?? ffi.nullptr); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSTask.fromFunction(AVFAudio lib, void Function(NSTask) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTask_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSTask_registerClosure( - (ffi.Pointer arg0) => - fn(NSTask._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + void insertChild_atIndex_(NSXMLNode child, int index) { + _objc_msgSend_671( + this.pointer, _sel_insertChild_atIndex_, child.pointer, index); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSTask.listener(AVFAudio lib, void Function(NSTask) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSTask_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSTask_registerClosure( - (ffi.Pointer arg0) => - fn(NSTask._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; + void insertChildren_atIndex_(objc.NSArray children, int index) { + _objc_msgSend_672( + this.pointer, _sel_insertChildren_atIndex_, children.pointer, index); + } - void call(NSTask arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0._id); -} + void removeChildAtIndex_(int index) { + _objc_msgSend_414(this.pointer, _sel_removeChildAtIndex_, index); + } -class NSXMLElement extends NSXMLNode { - NSXMLElement._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + void setChildren_(objc.NSArray? children) { + _objc_msgSend_260( + this.pointer, _sel_setChildren_, children?.pointer ?? ffi.nullptr); + } - /// Returns a [NSXMLElement] that points to the same underlying object as [other]. - static NSXMLElement castFrom(T other) { - return NSXMLElement._(other._id, other._lib, retain: true, release: true); + void addChild_(NSXMLNode child) { + _objc_msgSend_673(this.pointer, _sel_addChild_, child.pointer); } - /// Returns a [NSXMLElement] that wraps the given raw object pointer. - static NSXMLElement castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLElement._(other, lib, retain: retain, release: release); + void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { + _objc_msgSend_674( + this.pointer, _sel_replaceChildAtIndex_withNode_, index, node.pointer); } - /// Returns whether [obj] is an instance of [NSXMLElement]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSXMLElement1); + NSXMLDTDNode? entityDeclarationForName_(objc.NSString name) { + final _ret = _objc_msgSend_678( + this.pointer, _sel_entityDeclarationForName_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - NSXMLElement initWithName_(NSString name) { - final _ret = _lib._objc_msgSend_31(_id, _lib._sel_initWithName_1, name._id); - return NSXMLElement._(_ret, _lib, retain: true, release: true); + NSXMLDTDNode? notationDeclarationForName_(objc.NSString name) { + final _ret = _objc_msgSend_678( + this.pointer, _sel_notationDeclarationForName_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - NSXMLElement initWithName_URI_(NSString name, NSString? URI) { - final _ret = _lib._objc_msgSend_1142( - _id, _lib._sel_initWithName_URI_1, name._id, URI?._id ?? ffi.nullptr); - return NSXMLElement._(_ret, _lib, retain: true, release: true); + NSXMLDTDNode? elementDeclarationForName_(objc.NSString name) { + final _ret = _objc_msgSend_678( + this.pointer, _sel_elementDeclarationForName_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - NSXMLElement initWithName_stringValue_(NSString name, NSString? string) { - final _ret = _lib._objc_msgSend_1142( - _id, - _lib._sel_initWithName_stringValue_1, - name._id, - string?._id ?? ffi.nullptr); - return NSXMLElement._(_ret, _lib, retain: true, release: true); + NSXMLDTDNode? attributeDeclarationForName_elementName_( + objc.NSString name, objc.NSString elementName) { + final _ret = _objc_msgSend_679( + this.pointer, + _sel_attributeDeclarationForName_elementName_, + name.pointer, + elementName.pointer); + return _ret.address == 0 + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - NSXMLElement? initWithXMLString_error_( - NSString string, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_303( - _id, _lib._sel_initWithXMLString_error_1, string._id, error); + static NSXMLDTDNode? predefinedEntityDeclarationForName_(objc.NSString name) { + final _ret = _objc_msgSend_678(_class_NSXMLDTD, + _sel_predefinedEntityDeclarationForName_, name.pointer); return _ret.address == 0 ? null - : NSXMLElement._(_ret, _lib, retain: true, release: true); + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } @override - NSXMLElement initWithKind_options_(int kind, int options) { - final _ret = _lib._objc_msgSend_1107( - _id, _lib._sel_initWithKind_options_1, kind, options); - return NSXMLElement._(_ret, _lib, retain: true, release: true); + NSXMLDTD initWithKind_(int kind) { + final _ret = _objc_msgSend_658(this.pointer, _sel_initWithKind_, kind); + return NSXMLDTD.castFromPointer(_ret, retain: true, release: true); } - NSArray elementsForName_(NSString name) { - final _ret = - _lib._objc_msgSend_358(_id, _lib._sel_elementsForName_1, name._id); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSObject document() { + final _ret = _objc_msgSend_40(_class_NSXMLDTD, _sel_document); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSArray elementsForLocalName_URI_(NSString localName, NSString? URI) { - final _ret = _lib._objc_msgSend_1143( - _id, - _lib._sel_elementsForLocalName_URI_1, - localName._id, - URI?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSObject documentWithRootElement_(NSXMLElement element) { + final _ret = _objc_msgSend_660( + _class_NSXMLDTD, _sel_documentWithRootElement_, element.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void addAttribute_(NSXMLNode attribute) { - _lib._objc_msgSend_1121(_id, _lib._sel_addAttribute_1, attribute._id); + static objc.NSObject elementWithName_(objc.NSString name) { + final _ret = + _objc_msgSend_35(_class_NSXMLDTD, _sel_elementWithName_, name.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void removeAttributeForName_(NSString name) { - _lib._objc_msgSend_247(_id, _lib._sel_removeAttributeForName_1, name._id); + static objc.NSObject elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_661( + _class_NSXMLDTD, _sel_elementWithName_URI_, name.pointer, URI.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSArray? get attributes { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_attributes1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSObject elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_661(_class_NSXMLDTD, + _sel_elementWithName_stringValue_, name.pointer, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set attributes(NSArray? value) { - return _lib._objc_msgSend_1053( - _id, _lib._sel_setAttributes_1, value?._id ?? ffi.nullptr); + static objc.NSObject elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_662( + _class_NSXMLDTD, + _sel_elementWithName_children_attributes_, + name.pointer, + children?.pointer ?? ffi.nullptr, + attributes?.pointer ?? ffi.nullptr); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void setAttributesWithDictionary_(NSDictionary attributes) { - _lib._objc_msgSend_509( - _id, _lib._sel_setAttributesWithDictionary_1, attributes._id); + static objc.NSObject attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDTD, + _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSXMLNode? attributeForName_(NSString name) { - final _ret = - _lib._objc_msgSend_1125(_id, _lib._sel_attributeForName_1, name._id); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + static objc.NSObject attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_626( + _class_NSXMLDTD, + _sel_attributeWithName_URI_stringValue_, + name.pointer, + URI.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSXMLNode? attributeForLocalName_URI_(NSString localName, NSString? URI) { - final _ret = _lib._objc_msgSend_1144( - _id, - _lib._sel_attributeForLocalName_URI_1, - localName._id, - URI?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + static objc.NSObject namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDTD, + _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void addNamespace_(NSXMLNode aNamespace) { - _lib._objc_msgSend_1121(_id, _lib._sel_addNamespace_1, aNamespace._id); + static objc.NSObject processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661( + _class_NSXMLDTD, + _sel_processingInstructionWithName_stringValue_, + name.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject commentWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLDTD, _sel_commentWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void removeNamespaceForPrefix_(NSString name) { - _lib._objc_msgSend_247(_id, _lib._sel_removeNamespaceForPrefix_1, name._id); + static objc.NSObject textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLDTD, _sel_textWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSArray? get namespaces { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_namespaces1); + static objc.NSObject? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_2( + _class_NSXMLDTD, _sel_DTDNodeWithXMLString_, string.pointer); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set namespaces(NSArray? value) { - return _lib._objc_msgSend_1053( - _id, _lib._sel_setNamespaces_1, value?._id ?? ffi.nullptr); + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_297( + _class_NSXMLDTD, _sel_localNameForName_, name.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSXMLNode? namespaceForPrefix_(NSString name) { + static objc.NSString? prefixForName_(objc.NSString name) { final _ret = - _lib._objc_msgSend_1125(_id, _lib._sel_namespaceForPrefix_1, name._id); + _objc_msgSend_14(_class_NSXMLDTD, _sel_prefixForName_, name.pointer); return _ret.address == 0 ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSXMLNode? resolveNamespaceForName_(NSString name) { - final _ret = _lib._objc_msgSend_1125( - _id, _lib._sel_resolveNamespaceForName_1, name._id); + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_677( + _class_NSXMLDTD, _sel_predefinedNamespaceForPrefix_, name.pointer); return _ret.address == 0 ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + } + + static NSXMLDTD new1() { + final _ret = _objc_msgSend_40(_class_NSXMLDTD, _sel_new); + return NSXMLDTD.castFromPointer(_ret, retain: false, release: true); + } + + static NSXMLDTD allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSXMLDTD, _sel_allocWithZone_, zone); + return NSXMLDTD.castFromPointer(_ret, retain: false, release: true); + } + + static NSXMLDTD alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLDTD, _sel_alloc); + return NSXMLDTD.castFromPointer(_ret, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLDTD, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLDTD, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSXMLDTD, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSXMLDTD, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLDTD, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLDTD, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLDTD, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSXMLDTD, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSXMLDTD, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSXMLDTD = objc.getClass("NSXMLDTD"); +late final _sel_setPublicID_ = objc.registerName("setPublicID:"); +late final _sel_setSystemID_ = objc.registerName("setSystemID:"); +late final _sel_insertChild_atIndex_ = + objc.registerName("insertChild:atIndex:"); +final _objc_msgSend_671 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_insertChildren_atIndex_ = + objc.registerName("insertChildren:atIndex:"); +final _objc_msgSend_672 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_removeChildAtIndex_ = objc.registerName("removeChildAtIndex:"); +late final _sel_setChildren_ = objc.registerName("setChildren:"); +late final _sel_addChild_ = objc.registerName("addChild:"); +final _objc_msgSend_673 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_replaceChildAtIndex_withNode_ = + objc.registerName("replaceChildAtIndex:withNode:"); +final _objc_msgSend_674 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + +class NSXMLDTDNode extends NSXMLNode { + NSXMLDTDNode._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSXMLDTDNode] that points to the same underlying object as [other]. + NSXMLDTDNode.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSXMLDTDNode] that wraps the given raw object pointer. + NSXMLDTDNode.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSXMLDTDNode]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSXMLDTDNode); } - NSString? resolvePrefixForNamespaceURI_(NSString namespaceURI) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_resolvePrefixForNamespaceURI_1, namespaceURI._id); + NSXMLDTDNode? initWithXMLString_(objc.NSString string) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_initWithXMLString_, string.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - void insertChild_atIndex_(NSXMLNode child, int index) { - _lib._objc_msgSend_1119( - _id, _lib._sel_insertChild_atIndex_1, child._id, index); + @override + NSXMLDTDNode initWithKind_options_(int kind, int options) { + final _ret = _objc_msgSend_659( + this.pointer, _sel_initWithKind_options_, kind, options); + return NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - void insertChildren_atIndex_(NSArray children, int index) { - _lib._objc_msgSend_1120( - _id, _lib._sel_insertChildren_atIndex_1, children._id, index); + @override + NSXMLDTDNode init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - void removeChildAtIndex_(int index) { - _lib._objc_msgSend_470(_id, _lib._sel_removeChildAtIndex_1, index); + int get DTDKind { + return _objc_msgSend_675(this.pointer, _sel_DTDKind); } - void setChildren_(NSArray? children) { - _lib._objc_msgSend_843( - _id, _lib._sel_setChildren_1, children?._id ?? ffi.nullptr); + set DTDKind(int value) { + return _objc_msgSend_676(this.pointer, _sel_setDTDKind_, value); } - void addChild_(NSXMLNode child) { - _lib._objc_msgSend_1121(_id, _lib._sel_addChild_1, child._id); + bool get external1 { + return _objc_msgSend_7(this.pointer, _sel_isExternal); } - void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { - _lib._objc_msgSend_1122( - _id, _lib._sel_replaceChildAtIndex_withNode_1, index, node._id); + objc.NSString? get publicID { + final _ret = _objc_msgSend_13(this.pointer, _sel_publicID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set publicID(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setPublicID_, value?.pointer ?? ffi.nullptr); + } + + objc.NSString? get systemID { + final _ret = _objc_msgSend_13(this.pointer, _sel_systemID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void normalizeAdjacentTextNodesPreservingCDATA_(bool preserve) { - _lib._objc_msgSend_870( - _id, _lib._sel_normalizeAdjacentTextNodesPreservingCDATA_1, preserve); + set systemID(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setSystemID_, value?.pointer ?? ffi.nullptr); } - void setAttributesAsDictionary_(NSDictionary attributes) { - _lib._objc_msgSend_509( - _id, _lib._sel_setAttributesAsDictionary_1, attributes._id); + objc.NSString? get notationName { + final _ret = _objc_msgSend_13(this.pointer, _sel_notationName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSXMLElement init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSXMLElement._(_ret, _lib, retain: true, release: true); + set notationName(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setNotationName_, value?.pointer ?? ffi.nullptr); } @override - NSXMLElement initWithKind_(int kind) { - final _ret = _lib._objc_msgSend_1106(_id, _lib._sel_initWithKind_1, kind); - return NSXMLElement._(_ret, _lib, retain: true, release: true); + NSXMLDTDNode initWithKind_(int kind) { + final _ret = _objc_msgSend_658(this.pointer, _sel_initWithKind_, kind); + return NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - static NSObject document(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLElement1, _lib._sel_document1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject document() { + final _ret = _objc_msgSend_40(_class_NSXMLDTDNode, _sel_document); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject documentWithRootElement_( - AVFAudio _lib, NSXMLElement element) { - final _ret = _lib._objc_msgSend_1108(_lib._class_NSXMLElement1, - _lib._sel_documentWithRootElement_1, element._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject documentWithRootElement_(NSXMLElement element) { + final _ret = _objc_msgSend_660( + _class_NSXMLDTDNode, _sel_documentWithRootElement_, element.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_(AVFAudio _lib, NSString name) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSXMLElement1, _lib._sel_elementWithName_1, name._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject elementWithName_(objc.NSString name) { + final _ret = _objc_msgSend_35( + _class_NSXMLDTDNode, _sel_elementWithName_, name.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_URI_( - AVFAudio _lib, NSString name, NSString URI) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLElement1, - _lib._sel_elementWithName_URI_1, name._id, URI._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_661(_class_NSXMLDTDNode, + _sel_elementWithName_URI_, name.pointer, URI.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_stringValue_( - AVFAudio _lib, NSString name, NSString string) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLElement1, - _lib._sel_elementWithName_stringValue_1, name._id, string._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_661(_class_NSXMLDTDNode, + _sel_elementWithName_stringValue_, name.pointer, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_children_attributes_( - AVFAudio _lib, NSString name, NSArray? children, NSArray? attributes) { - final _ret = _lib._objc_msgSend_1110( - _lib._class_NSXMLElement1, - _lib._sel_elementWithName_children_attributes_1, - name._id, - children?._id ?? ffi.nullptr, - attributes?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_662( + _class_NSXMLDTDNode, + _sel_elementWithName_children_attributes_, + name.pointer, + children?.pointer ?? ffi.nullptr, + attributes?.pointer ?? ffi.nullptr); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject attributeWithName_stringValue_( - AVFAudio _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLElement1, - _lib._sel_attributeWithName_stringValue_1, name._id, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDTDNode, + _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject attributeWithName_URI_stringValue_( - AVFAudio _lib, NSString name, NSString URI, NSString stringValue) { - final _ret = _lib._objc_msgSend_1074( - _lib._class_NSXMLElement1, - _lib._sel_attributeWithName_URI_stringValue_1, - name._id, - URI._id, - stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_626( + _class_NSXMLDTDNode, + _sel_attributeWithName_URI_stringValue_, + name.pointer, + URI.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject namespaceWithName_stringValue_( - AVFAudio _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLElement1, - _lib._sel_namespaceWithName_stringValue_1, name._id, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDTDNode, + _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject processingInstructionWithName_stringValue_( - AVFAudio _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109( - _lib._class_NSXMLElement1, - _lib._sel_processingInstructionWithName_stringValue_1, - name._id, - stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661( + _class_NSXMLDTDNode, + _sel_processingInstructionWithName_stringValue_, + name.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject commentWithStringValue_(AVFAudio _lib, NSString stringValue) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLElement1, - _lib._sel_commentWithStringValue_1, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject commentWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLDTDNode, _sel_commentWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject textWithStringValue_(AVFAudio _lib, NSString stringValue) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLElement1, - _lib._sel_textWithStringValue_1, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLDTDNode, _sel_textWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject? DTDNodeWithXMLString_(AVFAudio _lib, NSString string) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSXMLElement1, - _lib._sel_DTDNodeWithXMLString_1, string._id); + static objc.NSObject? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_2( + _class_NSXMLDTDNode, _sel_DTDNodeWithXMLString_, string.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSString localNameForName_(AVFAudio _lib, NSString name) { - final _ret = _lib._objc_msgSend_69( - _lib._class_NSXMLElement1, _lib._sel_localNameForName_1, name._id); - return NSString._(_ret, _lib, retain: true, release: true); + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_297( + _class_NSXMLDTDNode, _sel_localNameForName_, name.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSString? prefixForName_(AVFAudio _lib, NSString name) { - final _ret = _lib._objc_msgSend_186( - _lib._class_NSXMLElement1, _lib._sel_prefixForName_1, name._id); + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = _objc_msgSend_14( + _class_NSXMLDTDNode, _sel_prefixForName_, name.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSXMLNode? predefinedNamespaceForPrefix_( - AVFAudio _lib, NSString name) { - final _ret = _lib._objc_msgSend_1125(_lib._class_NSXMLElement1, - _lib._sel_predefinedNamespaceForPrefix_1, name._id); + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_677( + _class_NSXMLDTDNode, _sel_predefinedNamespaceForPrefix_, name.pointer); return _ret.address == 0 ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static NSXMLElement new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLElement1, _lib._sel_new1); - return NSXMLElement._(_ret, _lib, retain: false, release: true); + static NSXMLDTDNode new1() { + final _ret = _objc_msgSend_40(_class_NSXMLDTDNode, _sel_new); + return NSXMLDTDNode.castFromPointer(_ret, retain: false, release: true); } - static NSXMLElement allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSXMLElement1, _lib._sel_allocWithZone_1, zone); - return NSXMLElement._(_ret, _lib, retain: false, release: true); + static NSXMLDTDNode allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSXMLDTDNode, _sel_allocWithZone_, zone); + return NSXMLDTDNode.castFromPointer(_ret, retain: false, release: true); } - static NSXMLElement alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLElement1, _lib._sel_alloc1); - return NSXMLElement._(_ret, _lib, retain: false, release: true); + static NSXMLDTDNode alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLDTDNode, _sel_alloc); + return NSXMLDTDNode.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSXMLElement1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLDTDNode, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSXMLElement1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLDTDNode, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLElement1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSXMLDTDNode, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLElement1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSXMLDTDNode, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSXMLElement1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLDTDNode, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSXMLElement1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLDTDNode, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSXMLElement1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLDTDNode, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSXMLElement1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSXMLDTDNode, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSXMLElement1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSXMLDTDNode, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -class NSXMLNode extends NSObject { - NSXMLNode._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSXMLNode] that points to the same underlying object as [other]. - static NSXMLNode castFrom(T other) { - return NSXMLNode._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSXMLNode] that wraps the given raw object pointer. - static NSXMLNode castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLNode._(other, lib, retain: retain, release: release); - } +late final _class_NSXMLDTDNode = objc.getClass("NSXMLDTDNode"); +late final _sel_initWithXMLString_ = objc.registerName("initWithXMLString:"); - /// Returns whether [obj] is an instance of [NSXMLNode]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSXMLNode1); - } +abstract class NSXMLDTDNodeKind { + static const int NSXMLEntityGeneralKind = 1; + static const int NSXMLEntityParsedKind = 2; + static const int NSXMLEntityUnparsedKind = 3; + static const int NSXMLEntityParameterKind = 4; + static const int NSXMLEntityPredefined = 5; + static const int NSXMLAttributeCDATAKind = 6; + static const int NSXMLAttributeIDKind = 7; + static const int NSXMLAttributeIDRefKind = 8; + static const int NSXMLAttributeIDRefsKind = 9; + static const int NSXMLAttributeEntityKind = 10; + static const int NSXMLAttributeEntitiesKind = 11; + static const int NSXMLAttributeNMTokenKind = 12; + static const int NSXMLAttributeNMTokensKind = 13; + static const int NSXMLAttributeEnumerationKind = 14; + static const int NSXMLAttributeNotationKind = 15; + static const int NSXMLElementDeclarationUndefinedKind = 16; + static const int NSXMLElementDeclarationEmptyKind = 17; + static const int NSXMLElementDeclarationAnyKind = 18; + static const int NSXMLElementDeclarationMixedKind = 19; + static const int NSXMLElementDeclarationElementKind = 20; +} - @override - NSXMLNode init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSXMLNode._(_ret, _lib, retain: true, release: true); - } +late final _sel_DTDKind = objc.registerName("DTDKind"); +final _objc_msgSend_675 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDTDKind_ = objc.registerName("setDTDKind:"); +final _objc_msgSend_676 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_isExternal = objc.registerName("isExternal"); +late final _sel_notationName = objc.registerName("notationName"); +late final _sel_setNotationName_ = objc.registerName("setNotationName:"); +late final _sel_localNameForName_ = objc.registerName("localNameForName:"); +late final _sel_prefixForName_ = objc.registerName("prefixForName:"); +late final _sel_predefinedNamespaceForPrefix_ = + objc.registerName("predefinedNamespaceForPrefix:"); +final _objc_msgSend_677 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_entityDeclarationForName_ = + objc.registerName("entityDeclarationForName:"); +final _objc_msgSend_678 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_notationDeclarationForName_ = + objc.registerName("notationDeclarationForName:"); +late final _sel_elementDeclarationForName_ = + objc.registerName("elementDeclarationForName:"); +late final _sel_attributeDeclarationForName_elementName_ = + objc.registerName("attributeDeclarationForName:elementName:"); +final _objc_msgSend_679 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_predefinedEntityDeclarationForName_ = + objc.registerName("predefinedEntityDeclarationForName:"); +late final _sel_DTD = objc.registerName("DTD"); +final _objc_msgSend_680 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDTD_ = objc.registerName("setDTD:"); +final _objc_msgSend_681 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setRootElement_ = objc.registerName("setRootElement:"); +final _objc_msgSend_682 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_rootElement = objc.registerName("rootElement"); +final _objc_msgSend_683 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_XMLData = objc.registerName("XMLData"); +late final _sel_XMLDataWithOptions_ = objc.registerName("XMLDataWithOptions:"); +final _objc_msgSend_684 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_objectByApplyingXSLT_arguments_error_ = + objc.registerName("objectByApplyingXSLT:arguments:error:"); +final _objc_msgSend_685 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_objectByApplyingXSLTString_arguments_error_ = + objc.registerName("objectByApplyingXSLTString:arguments:error:"); +final _objc_msgSend_686 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_objectByApplyingXSLTAtURL_arguments_error_ = + objc.registerName("objectByApplyingXSLTAtURL:arguments:error:"); +final _objc_msgSend_687 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_validateAndReturnError_ = + objc.registerName("validateAndReturnError:"); +late final _sel_rootDocument = objc.registerName("rootDocument"); +final _objc_msgSend_688 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_parent = objc.registerName("parent"); +final _objc_msgSend_689 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_childCount = objc.registerName("childCount"); +late final _sel_children = objc.registerName("children"); +late final _sel_childAtIndex_ = objc.registerName("childAtIndex:"); +final _objc_msgSend_690 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_previousSibling = objc.registerName("previousSibling"); +late final _sel_nextSibling = objc.registerName("nextSibling"); +late final _sel_previousNode = objc.registerName("previousNode"); +late final _sel_nextNode = objc.registerName("nextNode"); +late final _sel_detach = objc.registerName("detach"); +late final _sel_XPath = objc.registerName("XPath"); +late final _sel_localName = objc.registerName("localName"); +late final _sel_prefix = objc.registerName("prefix"); +late final _sel_URI = objc.registerName("URI"); +late final _sel_setURI_ = objc.registerName("setURI:"); +late final _sel_XMLString = objc.registerName("XMLString"); +late final _sel_XMLStringWithOptions_ = + objc.registerName("XMLStringWithOptions:"); +final _objc_msgSend_691 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_canonicalXMLStringPreservingComments_ = + objc.registerName("canonicalXMLStringPreservingComments:"); +final _objc_msgSend_692 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, bool)>(); +late final _sel_nodesForXPath_error_ = + objc.registerName("nodesForXPath:error:"); +late final _sel_objectsForXQuery_constants_error_ = + objc.registerName("objectsForXQuery:constants:error:"); +final _objc_msgSend_693 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_objectsForXQuery_error_ = + objc.registerName("objectsForXQuery:error:"); +late final _sel_initWithName_URI_ = objc.registerName("initWithName:URI:"); +final _objc_msgSend_694 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithName_stringValue_ = + objc.registerName("initWithName:stringValue:"); +late final _sel_initWithXMLString_error_ = + objc.registerName("initWithXMLString:error:"); +final _objc_msgSend_695 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_elementsForName_ = objc.registerName("elementsForName:"); +late final _sel_elementsForLocalName_URI_ = + objc.registerName("elementsForLocalName:URI:"); +final _objc_msgSend_696 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_addAttribute_ = objc.registerName("addAttribute:"); +late final _sel_removeAttributeForName_ = + objc.registerName("removeAttributeForName:"); +late final _sel_attributes = objc.registerName("attributes"); +late final _sel_setAttributes_ = objc.registerName("setAttributes:"); +late final _sel_setAttributesWithDictionary_ = + objc.registerName("setAttributesWithDictionary:"); +final _objc_msgSend_697 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_attributeForName_ = objc.registerName("attributeForName:"); +late final _sel_attributeForLocalName_URI_ = + objc.registerName("attributeForLocalName:URI:"); +final _objc_msgSend_698 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_addNamespace_ = objc.registerName("addNamespace:"); +late final _sel_removeNamespaceForPrefix_ = + objc.registerName("removeNamespaceForPrefix:"); +late final _sel_namespaces = objc.registerName("namespaces"); +late final _sel_setNamespaces_ = objc.registerName("setNamespaces:"); +late final _sel_namespaceForPrefix_ = objc.registerName("namespaceForPrefix:"); +late final _sel_resolveNamespaceForName_ = + objc.registerName("resolveNamespaceForName:"); +late final _sel_resolvePrefixForNamespaceURI_ = + objc.registerName("resolvePrefixForNamespaceURI:"); +late final _sel_normalizeAdjacentTextNodesPreservingCDATA_ = + objc.registerName("normalizeAdjacentTextNodesPreservingCDATA:"); +late final _sel_setAttributesAsDictionary_ = + objc.registerName("setAttributesAsDictionary:"); - NSXMLNode initWithKind_(int kind) { - final _ret = _lib._objc_msgSend_1106(_id, _lib._sel_initWithKind_1, kind); - return NSXMLNode._(_ret, _lib, retain: true, release: true); - } +class NSScriptClassDescription extends NSClassDescription { + NSScriptClassDescription._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSXMLNode initWithKind_options_(int kind, int options) { - final _ret = _lib._objc_msgSend_1107( - _id, _lib._sel_initWithKind_options_1, kind, options); - return NSXMLNode._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSScriptClassDescription] that points to the same underlying object as [other]. + NSScriptClassDescription.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - static NSObject document(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLNode1, _lib._sel_document1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSScriptClassDescription] that wraps the given raw object pointer. + NSScriptClassDescription.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static NSObject documentWithRootElement_( - AVFAudio _lib, NSXMLElement element) { - final _ret = _lib._objc_msgSend_1108(_lib._class_NSXMLNode1, - _lib._sel_documentWithRootElement_1, element._id); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSScriptClassDescription]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSScriptClassDescription); } - static NSObject elementWithName_(AVFAudio _lib, NSString name) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSXMLNode1, _lib._sel_elementWithName_1, name._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSScriptClassDescription? classDescriptionForClass_( + objc.NSObject aClass) { + final _ret = _objc_msgSend_701(_class_NSScriptClassDescription, + _sel_classDescriptionForClass_, aClass.pointer); + return _ret.address == 0 + ? null + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - static NSObject elementWithName_URI_( - AVFAudio _lib, NSString name, NSString URI) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLNode1, - _lib._sel_elementWithName_URI_1, name._id, URI._id); - return NSObject._(_ret, _lib, retain: true, release: true); + NSScriptClassDescription? initWithSuiteName_className_dictionary_( + objc.NSString suiteName, + objc.NSString className, + objc.NSDictionary? classDeclaration) { + final _ret = _objc_msgSend_702( + this.pointer, + _sel_initWithSuiteName_className_dictionary_, + suiteName.pointer, + className.pointer, + classDeclaration?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - static NSObject elementWithName_stringValue_( - AVFAudio _lib, NSString name, NSString string) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLNode1, - _lib._sel_elementWithName_stringValue_1, name._id, string._id); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSString? get suiteName { + final _ret = _objc_msgSend_13(this.pointer, _sel_suiteName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_children_attributes_( - AVFAudio _lib, NSString name, NSArray? children, NSArray? attributes) { - final _ret = _lib._objc_msgSend_1110( - _lib._class_NSXMLNode1, - _lib._sel_elementWithName_children_attributes_1, - name._id, - children?._id ?? ffi.nullptr, - attributes?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSString? get className { + final _ret = _objc_msgSend_13(this.pointer, _sel_className); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject attributeWithName_stringValue_( - AVFAudio _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLNode1, - _lib._sel_attributeWithName_stringValue_1, name._id, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSString? get implementationClassName { + final _ret = _objc_msgSend_13(this.pointer, _sel_implementationClassName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject attributeWithName_URI_stringValue_( - AVFAudio _lib, NSString name, NSString URI, NSString stringValue) { - final _ret = _lib._objc_msgSend_1074( - _lib._class_NSXMLNode1, - _lib._sel_attributeWithName_URI_stringValue_1, - name._id, - URI._id, - stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + NSScriptClassDescription? get superclassDescription { + final _ret = _objc_msgSend_703(this.pointer, _sel_superclassDescription); + return _ret.address == 0 + ? null + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - static NSObject namespaceWithName_stringValue_( - AVFAudio _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLNode1, - _lib._sel_namespaceWithName_stringValue_1, name._id, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + int get appleEventCode { + return _objc_msgSend_704(this.pointer, _sel_appleEventCode); } - static NSObject processingInstructionWithName_stringValue_( - AVFAudio _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109( - _lib._class_NSXMLNode1, - _lib._sel_processingInstructionWithName_stringValue_1, - name._id, - stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + bool matchesAppleEventCode_(int appleEventCode) { + return _objc_msgSend_705( + this.pointer, _sel_matchesAppleEventCode_, appleEventCode); } - static NSObject commentWithStringValue_(AVFAudio _lib, NSString stringValue) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLNode1, - _lib._sel_commentWithStringValue_1, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + bool supportsCommand_(NSScriptCommandDescription commandDescription) { + return _objc_msgSend_747( + this.pointer, _sel_supportsCommand_, commandDescription.pointer); } - static NSObject textWithStringValue_(AVFAudio _lib, NSString stringValue) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLNode1, - _lib._sel_textWithStringValue_1, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + ffi.Pointer selectorForCommand_( + NSScriptCommandDescription commandDescription) { + return _objc_msgSend_748( + this.pointer, _sel_selectorForCommand_, commandDescription.pointer); } - static NSObject? DTDNodeWithXMLString_(AVFAudio _lib, NSString string) { - final _ret = _lib._objc_msgSend_38( - _lib._class_NSXMLNode1, _lib._sel_DTDNodeWithXMLString_1, string._id); + objc.NSString? typeForKey_(objc.NSString key) { + final _ret = _objc_msgSend_14(this.pointer, _sel_typeForKey_, key.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - int get kind { - return _lib._objc_msgSend_1111(_id, _lib._sel_kind1); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get name { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_name1); + NSScriptClassDescription? classDescriptionForKey_(objc.NSString key) { + final _ret = _objc_msgSend_749( + this.pointer, _sel_classDescriptionForKey_, key.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - set name(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + int appleEventCodeForKey_(objc.NSString key) { + return _objc_msgSend_706( + this.pointer, _sel_appleEventCodeForKey_, key.pointer); } - NSObject? get objectValue { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_objectValue1); + objc.NSString? keyWithAppleEventCode_(int appleEventCode) { + final _ret = _objc_msgSend_750( + this.pointer, _sel_keyWithAppleEventCode_, appleEventCode); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - set objectValue(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setObjectValue_1, value?._id ?? ffi.nullptr); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get stringValue { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_stringValue1); + objc.NSString? get defaultSubcontainerAttributeKey { + final _ret = + _objc_msgSend_13(this.pointer, _sel_defaultSubcontainerAttributeKey); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set stringValue(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setStringValue_1, value?._id ?? ffi.nullptr); + bool isLocationRequiredToCreateForKey_(objc.NSString toManyRelationshipKey) { + return _objc_msgSend_51(this.pointer, + _sel_isLocationRequiredToCreateForKey_, toManyRelationshipKey.pointer); } - void setStringValue_resolvingEntities_(NSString string, bool resolve) { - _lib._objc_msgSend_1112( - _id, _lib._sel_setStringValue_resolvingEntities_1, string._id, resolve); + bool hasPropertyForKey_(objc.NSString key) { + return _objc_msgSend_51(this.pointer, _sel_hasPropertyForKey_, key.pointer); } - int get index { - return _lib._objc_msgSend_10(_id, _lib._sel_index1); + bool hasOrderedToManyRelationshipForKey_(objc.NSString key) { + return _objc_msgSend_51( + this.pointer, _sel_hasOrderedToManyRelationshipForKey_, key.pointer); } - int get level { - return _lib._objc_msgSend_10(_id, _lib._sel_level1); + bool hasReadablePropertyForKey_(objc.NSString key) { + return _objc_msgSend_51( + this.pointer, _sel_hasReadablePropertyForKey_, key.pointer); } - NSXMLDocument? get rootDocument { - final _ret = _lib._objc_msgSend_1136(_id, _lib._sel_rootDocument1); - return _ret.address == 0 - ? null - : NSXMLDocument._(_ret, _lib, retain: true, release: true); + bool hasWritablePropertyForKey_(objc.NSString key) { + return _objc_msgSend_51( + this.pointer, _sel_hasWritablePropertyForKey_, key.pointer); } - NSXMLNode? get parent { - final _ret = _lib._objc_msgSend_1137(_id, _lib._sel_parent1); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + bool isReadOnlyKey_(objc.NSString key) { + return _objc_msgSend_51(this.pointer, _sel_isReadOnlyKey_, key.pointer); } - int get childCount { - return _lib._objc_msgSend_10(_id, _lib._sel_childCount1); + static void registerClassDescription_forClass_( + NSClassDescription description, objc.NSObject aClass) { + _objc_msgSend_699( + _class_NSScriptClassDescription, + _sel_registerClassDescription_forClass_, + description.pointer, + aClass.pointer); } - NSArray? get children { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_children1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + static void invalidateClassDescriptionCache() { + _objc_msgSend_82( + _class_NSScriptClassDescription, _sel_invalidateClassDescriptionCache); } - NSXMLNode? childAtIndex_(int index) { - final _ret = _lib._objc_msgSend_1138(_id, _lib._sel_childAtIndex_1, index); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + @override + NSScriptClassDescription init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - NSXMLNode? get previousSibling { - final _ret = _lib._objc_msgSend_1137(_id, _lib._sel_previousSibling1); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + static NSScriptClassDescription new1() { + final _ret = _objc_msgSend_40(_class_NSScriptClassDescription, _sel_new); + return NSScriptClassDescription.castFromPointer(_ret, + retain: false, release: true); } - NSXMLNode? get nextSibling { - final _ret = _lib._objc_msgSend_1137(_id, _lib._sel_nextSibling1); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + static NSScriptClassDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSScriptClassDescription, _sel_allocWithZone_, zone); + return NSScriptClassDescription.castFromPointer(_ret, + retain: false, release: true); } - NSXMLNode? get previousNode { - final _ret = _lib._objc_msgSend_1137(_id, _lib._sel_previousNode1); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + static NSScriptClassDescription alloc() { + final _ret = _objc_msgSend_40(_class_NSScriptClassDescription, _sel_alloc); + return NSScriptClassDescription.castFromPointer(_ret, + retain: false, release: true); } - NSXMLNode? get nextNode { - final _ret = _lib._objc_msgSend_1137(_id, _lib._sel_nextNode1); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSScriptClassDescription, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - void detach() { - _lib._objc_msgSend_1(_id, _lib._sel_detach1); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSScriptClassDescription, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSString? get XPath { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_XPath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSScriptClassDescription, _sel_accessInstanceVariablesDirectly); } - NSString? get localName { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_localName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSScriptClassDescription, _sel_useStoredAccessor); } - NSString? get prefix { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_prefix1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSScriptClassDescription, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSString? get URI { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_URI1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSScriptClassDescription, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - set URI(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setURI_1, value?._id ?? ffi.nullptr); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSScriptClassDescription, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSString localNameForName_(AVFAudio _lib, NSString name) { - final _ret = _lib._objc_msgSend_69( - _lib._class_NSXMLNode1, _lib._sel_localNameForName_1, name._id); - return NSString._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSScriptClassDescription, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSString? prefixForName_(AVFAudio _lib, NSString name) { - final _ret = _lib._objc_msgSend_186( - _lib._class_NSXMLNode1, _lib._sel_prefixForName_1, name._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSScriptClassDescription, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - static NSXMLNode? predefinedNamespaceForPrefix_( - AVFAudio _lib, NSString name) { - final _ret = _lib._objc_msgSend_1125(_lib._class_NSXMLNode1, - _lib._sel_predefinedNamespaceForPrefix_1, name._id); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); - } +late final _class_NSScriptClassDescription = + objc.getClass("NSScriptClassDescription"); - NSString get description { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } +class NSClassDescription extends objc.NSObject { + NSClassDescription._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSString get XMLString { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_XMLString1); - return NSString._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSClassDescription] that points to the same underlying object as [other]. + NSClassDescription.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSString XMLStringWithOptions_(int options) { - final _ret = - _lib._objc_msgSend_1139(_id, _lib._sel_XMLStringWithOptions_1, options); - return NSString._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSClassDescription] that wraps the given raw object pointer. + NSClassDescription.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - NSString canonicalXMLStringPreservingComments_(bool comments) { - final _ret = _lib._objc_msgSend_1140( - _id, _lib._sel_canonicalXMLStringPreservingComments_1, comments); - return NSString._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSClassDescription]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSClassDescription); } - NSArray? nodesForXPath_error_( - NSString xpath, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_443( - _id, _lib._sel_nodesForXPath_error_1, xpath._id, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + static void registerClassDescription_forClass_( + NSClassDescription description, objc.NSObject aClass) { + _objc_msgSend_699( + _class_NSClassDescription, + _sel_registerClassDescription_forClass_, + description.pointer, + aClass.pointer); } - NSArray? objectsForXQuery_constants_error_(NSString xquery, - NSDictionary? constants, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_1141( - _id, - _lib._sel_objectsForXQuery_constants_error_1, - xquery._id, - constants?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + static void invalidateClassDescriptionCache() { + _objc_msgSend_82( + _class_NSClassDescription, _sel_invalidateClassDescriptionCache); } - NSArray? objectsForXQuery_error_( - NSString xquery, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_443( - _id, _lib._sel_objectsForXQuery_error_1, xquery._id, error); + static NSClassDescription? classDescriptionForClass_(objc.NSObject aClass) { + final _ret = _objc_msgSend_700(_class_NSClassDescription, + _sel_classDescriptionForClass_, aClass.pointer); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); + : NSClassDescription.castFromPointer(_ret, retain: true, release: true); } - static NSXMLNode new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSXMLNode1, _lib._sel_new1); - return NSXMLNode._(_ret, _lib, retain: false, release: true); + objc.NSArray get attributeKeys { + final _ret = _objc_msgSend_6(this.pointer, _sel_attributeKeys); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSXMLNode allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSXMLNode1, _lib._sel_allocWithZone_1, zone); - return NSXMLNode._(_ret, _lib, retain: false, release: true); + objc.NSArray get toOneRelationshipKeys { + final _ret = _objc_msgSend_6(this.pointer, _sel_toOneRelationshipKeys); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSXMLNode alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSXMLNode1, _lib._sel_alloc1); - return NSXMLNode._(_ret, _lib, retain: false, release: true); + objc.NSArray get toManyRelationshipKeys { + final _ret = _objc_msgSend_6(this.pointer, _sel_toManyRelationshipKeys); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSXMLNode1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + objc.NSString? inverseForRelationshipKey_(objc.NSString relationshipKey) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_inverseForRelationshipKey_, relationshipKey.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSXMLNode1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + @override + NSClassDescription init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSClassDescription.castFromPointer(_ret, + retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLNode1, _lib._sel_accessInstanceVariablesDirectly1); + static NSClassDescription new1() { + final _ret = _objc_msgSend_40(_class_NSClassDescription, _sel_new); + return NSClassDescription.castFromPointer(_ret, + retain: false, release: true); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLNode1, _lib._sel_useStoredAccessor1); + static NSClassDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSClassDescription, _sel_allocWithZone_, zone); + return NSClassDescription.castFromPointer(_ret, + retain: false, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSXMLNode1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static NSClassDescription alloc() { + final _ret = _objc_msgSend_40(_class_NSClassDescription, _sel_alloc); + return NSClassDescription.castFromPointer(_ret, + retain: false, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSXMLNode1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSClassDescription, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSXMLNode1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSClassDescription, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSXMLNode1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSClassDescription, _sel_accessInstanceVariablesDirectly); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSXMLNode1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSClassDescription, _sel_useStoredAccessor); } -} -abstract class NSXMLNodeKind { - static const int NSXMLInvalidKind = 0; - static const int NSXMLDocumentKind = 1; - static const int NSXMLElementKind = 2; - static const int NSXMLAttributeKind = 3; - static const int NSXMLNamespaceKind = 4; - static const int NSXMLProcessingInstructionKind = 5; - static const int NSXMLCommentKind = 6; - static const int NSXMLTextKind = 7; - static const int NSXMLDTDKind = 8; - static const int NSXMLEntityDeclarationKind = 9; - static const int NSXMLAttributeDeclarationKind = 10; - static const int NSXMLElementDeclarationKind = 11; - static const int NSXMLNotationDeclarationKind = 12; -} + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSClassDescription, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } -abstract class NSXMLNodeOptions { - static const int NSXMLNodeOptionsNone = 0; - static const int NSXMLNodeIsCDATA = 1; - static const int NSXMLNodeExpandEmptyElement = 2; - static const int NSXMLNodeCompactEmptyElement = 4; - static const int NSXMLNodeUseSingleQuotes = 8; - static const int NSXMLNodeUseDoubleQuotes = 16; - static const int NSXMLNodeNeverEscapeContents = 32; - static const int NSXMLDocumentTidyHTML = 512; - static const int NSXMLDocumentTidyXML = 1024; - static const int NSXMLDocumentValidate = 8192; - static const int NSXMLNodeLoadExternalEntitiesAlways = 16384; - static const int NSXMLNodeLoadExternalEntitiesSameOriginOnly = 32768; - static const int NSXMLNodeLoadExternalEntitiesNever = 524288; - static const int NSXMLDocumentXInclude = 65536; - static const int NSXMLNodePrettyPrint = 131072; - static const int NSXMLDocumentIncludeContentTypeDeclaration = 262144; - static const int NSXMLNodePreserveNamespaceOrder = 1048576; - static const int NSXMLNodePreserveAttributeOrder = 2097152; - static const int NSXMLNodePreserveEntities = 4194304; - static const int NSXMLNodePreservePrefixes = 8388608; - static const int NSXMLNodePreserveCDATA = 16777216; - static const int NSXMLNodePreserveWhitespace = 33554432; - static const int NSXMLNodePreserveDTD = 67108864; - static const int NSXMLNodePreserveCharacterReferences = 134217728; - static const int NSXMLNodePromoteSignificantWhitespace = 268435456; - static const int NSXMLNodePreserveEmptyElements = 6; - static const int NSXMLNodePreserveQuotes = 24; - static const int NSXMLNodePreserveAll = 4293918750; -} + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSClassDescription, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } -class NSXMLDocument extends NSXMLNode { - NSXMLDocument._(ffi.Pointer id, AVFAudio lib, + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSClassDescription, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSClassDescription, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSClassDescription, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSClassDescription = objc.getClass("NSClassDescription"); +late final _sel_registerClassDescription_forClass_ = + objc.registerName("registerClassDescription:forClass:"); +final _objc_msgSend_699 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_invalidateClassDescriptionCache = + objc.registerName("invalidateClassDescriptionCache"); +late final _sel_classDescriptionForClass_ = + objc.registerName("classDescriptionForClass:"); +final _objc_msgSend_700 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_attributeKeys = objc.registerName("attributeKeys"); +late final _sel_toOneRelationshipKeys = + objc.registerName("toOneRelationshipKeys"); +late final _sel_toManyRelationshipKeys = + objc.registerName("toManyRelationshipKeys"); +late final _sel_inverseForRelationshipKey_ = + objc.registerName("inverseForRelationshipKey:"); +final _objc_msgSend_701 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithSuiteName_className_dictionary_ = + objc.registerName("initWithSuiteName:className:dictionary:"); +final _objc_msgSend_702 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_suiteName = objc.registerName("suiteName"); +late final _sel_className = objc.registerName("className"); +late final _sel_implementationClassName = + objc.registerName("implementationClassName"); +late final _sel_superclassDescription = + objc.registerName("superclassDescription"); +final _objc_msgSend_703 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_appleEventCode = objc.registerName("appleEventCode"); +final _objc_msgSend_704 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedInt Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_matchesAppleEventCode_ = + objc.registerName("matchesAppleEventCode:"); +final _objc_msgSend_705 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, int)>(); + +class NSScriptCommandDescription extends objc.NSObject { + NSScriptCommandDescription._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSXMLDocument] that points to the same underlying object as [other]. - static NSXMLDocument castFrom(T other) { - return NSXMLDocument._(other._id, other._lib, retain: true, release: true); - } + /// Constructs a [NSScriptCommandDescription] that points to the same underlying object as [other]. + NSScriptCommandDescription.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSXMLDocument] that wraps the given raw object pointer. - static NSXMLDocument castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLDocument._(other, lib, retain: retain, release: release); - } + /// Constructs a [NSScriptCommandDescription] that wraps the given raw object pointer. + NSScriptCommandDescription.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSXMLDocument]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSXMLDocument1); + /// Returns whether [obj] is an instance of [NSScriptCommandDescription]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSScriptCommandDescription); } @override - NSXMLDocument init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSXMLDocument._(_ret, _lib, retain: true, release: true); + objc.NSObject init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSXMLDocument? initWithXMLString_options_error_( - NSString string, int mask, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_1113(_id, - _lib._sel_initWithXMLString_options_error_1, string._id, mask, error); - return _ret.address == 0 - ? null - : NSXMLDocument._(_ret, _lib, retain: true, release: true); + NSScriptCommandDescription? initWithSuiteName_commandName_dictionary_( + objc.NSString suiteName, + objc.NSString commandName, + objc.NSDictionary? commandDeclaration) { + final _ret = _objc_msgSend_702( + this.pointer, + _sel_initWithSuiteName_commandName_dictionary_, + suiteName.pointer, + commandName.pointer, + commandDeclaration?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSScriptCommandDescription.castFromPointer(_ret, + retain: true, release: true); } - NSXMLDocument? initWithContentsOfURL_options_error_( - NSURL url, int mask, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_1114(_id, - _lib._sel_initWithContentsOfURL_options_error_1, url._id, mask, error); + NSScriptCommandDescription? initWithCoder_(objc.NSCoder inCoder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, inCoder.pointer); return _ret.address == 0 ? null - : NSXMLDocument._(_ret, _lib, retain: true, release: true); + : NSScriptCommandDescription.castFromPointer(_ret, + retain: true, release: true); } - NSXMLDocument? initWithData_options_error_( - NSData data, int mask, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_1115( - _id, _lib._sel_initWithData_options_error_1, data._id, mask, error); - return _ret.address == 0 - ? null - : NSXMLDocument._(_ret, _lib, retain: true, release: true); + objc.NSString get suiteName { + final _ret = _objc_msgSend_12(this.pointer, _sel_suiteName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSXMLDocument initWithRootElement_(NSXMLElement? element) { - final _ret = _lib._objc_msgSend_1116( - _id, _lib._sel_initWithRootElement_1, element?._id ?? ffi.nullptr); - return NSXMLDocument._(_ret, _lib, retain: true, release: true); + objc.NSString get commandName { + final _ret = _objc_msgSend_12(this.pointer, _sel_commandName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject replacementClassForClass_(AVFAudio _lib, NSObject cls) { - final _ret = _lib._objc_msgSend_124(_lib._class_NSXMLDocument1, - _lib._sel_replacementClassForClass_1, cls._id); - return NSObject._(_ret, _lib, retain: true, release: true); + int get appleEventClassCode { + return _objc_msgSend_704(this.pointer, _sel_appleEventClassCode); } - NSString? get characterEncoding { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_characterEncoding1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + int get appleEventCode { + return _objc_msgSend_704(this.pointer, _sel_appleEventCode); } - set characterEncoding(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setCharacterEncoding_1, value?._id ?? ffi.nullptr); + objc.NSString get commandClassName { + final _ret = _objc_msgSend_12(this.pointer, _sel_commandClassName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get version { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_version1); + objc.NSString? get returnType { + final _ret = _objc_msgSend_13(this.pointer, _sel_returnType); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set version(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setVersion_1, value?._id ?? ffi.nullptr); + int get appleEventCodeForReturnType { + return _objc_msgSend_704(this.pointer, _sel_appleEventCodeForReturnType); } - bool get standalone { - return _lib._objc_msgSend_12(_id, _lib._sel_isStandalone1); + objc.NSArray get argumentNames { + final _ret = _objc_msgSend_6(this.pointer, _sel_argumentNames); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set standalone(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setStandalone_1, value); + objc.NSString? typeForArgumentWithName_(objc.NSString argumentName) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_typeForArgumentWithName_, argumentName.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int get documentContentKind { - return _lib._objc_msgSend_1117(_id, _lib._sel_documentContentKind1); + int appleEventCodeForArgumentWithName_(objc.NSString argumentName) { + return _objc_msgSend_706(this.pointer, + _sel_appleEventCodeForArgumentWithName_, argumentName.pointer); } - set documentContentKind(int value) { - return _lib._objc_msgSend_1118( - _id, _lib._sel_setDocumentContentKind_1, value); + bool isOptionalArgumentWithName_(objc.NSString argumentName) { + return _objc_msgSend_51( + this.pointer, _sel_isOptionalArgumentWithName_, argumentName.pointer); } - NSString? get MIMEType { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_MIMEType1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + NSScriptCommand createCommandInstance() { + final _ret = _objc_msgSend_745(this.pointer, _sel_createCommandInstance); + return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - set MIMEType(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setMIMEType_1, value?._id ?? ffi.nullptr); + NSScriptCommand createCommandInstanceWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_746( + this.pointer, _sel_createCommandInstanceWithZone_, zone); + return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - NSXMLDTD? get DTD { - final _ret = _lib._objc_msgSend_1128(_id, _lib._sel_DTD1); - return _ret.address == 0 - ? null - : NSXMLDTD._(_ret, _lib, retain: true, release: true); + static NSScriptCommandDescription new1() { + final _ret = _objc_msgSend_40(_class_NSScriptCommandDescription, _sel_new); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: false, release: true); } - set DTD(NSXMLDTD? value) { - return _lib._objc_msgSend_1129( - _id, _lib._sel_setDTD_1, value?._id ?? ffi.nullptr); + static NSScriptCommandDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSScriptCommandDescription, _sel_allocWithZone_, zone); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: false, release: true); } - void setRootElement_(NSXMLElement root) { - _lib._objc_msgSend_1130(_id, _lib._sel_setRootElement_1, root._id); + static NSScriptCommandDescription alloc() { + final _ret = + _objc_msgSend_40(_class_NSScriptCommandDescription, _sel_alloc); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: false, release: true); } - NSXMLElement? rootElement() { - final _ret = _lib._objc_msgSend_1131(_id, _lib._sel_rootElement1); - return _ret.address == 0 - ? null - : NSXMLElement._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSScriptCommandDescription, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - void insertChild_atIndex_(NSXMLNode child, int index) { - _lib._objc_msgSend_1119( - _id, _lib._sel_insertChild_atIndex_1, child._id, index); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSScriptCommandDescription, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - void insertChildren_atIndex_(NSArray children, int index) { - _lib._objc_msgSend_1120( - _id, _lib._sel_insertChildren_atIndex_1, children._id, index); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7(_class_NSScriptCommandDescription, + _sel_accessInstanceVariablesDirectly); } - void removeChildAtIndex_(int index) { - _lib._objc_msgSend_470(_id, _lib._sel_removeChildAtIndex_1, index); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSScriptCommandDescription, _sel_useStoredAccessor); } - void setChildren_(NSArray? children) { - _lib._objc_msgSend_843( - _id, _lib._sel_setChildren_1, children?._id ?? ffi.nullptr); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSScriptCommandDescription, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - void addChild_(NSXMLNode child) { - _lib._objc_msgSend_1121(_id, _lib._sel_addChild_1, child._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSScriptCommandDescription, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { - _lib._objc_msgSend_1122( - _id, _lib._sel_replaceChildAtIndex_withNode_1, index, node._id); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSScriptCommandDescription, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSScriptCommandDescription, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSScriptCommandDescription, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSScriptCommandDescription = + objc.getClass("NSScriptCommandDescription"); +late final _sel_initWithSuiteName_commandName_dictionary_ = + objc.registerName("initWithSuiteName:commandName:dictionary:"); +late final _sel_commandName = objc.registerName("commandName"); +late final _sel_appleEventClassCode = objc.registerName("appleEventClassCode"); +late final _sel_commandClassName = objc.registerName("commandClassName"); +late final _sel_returnType = objc.registerName("returnType"); +late final _sel_appleEventCodeForReturnType = + objc.registerName("appleEventCodeForReturnType"); +late final _sel_argumentNames = objc.registerName("argumentNames"); +late final _sel_typeForArgumentWithName_ = + objc.registerName("typeForArgumentWithName:"); +late final _sel_appleEventCodeForArgumentWithName_ = + objc.registerName("appleEventCodeForArgumentWithName:"); +final _objc_msgSend_706 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedInt Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isOptionalArgumentWithName_ = + objc.registerName("isOptionalArgumentWithName:"); + +class NSScriptCommand extends objc.NSObject { + NSScriptCommand._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSData get XMLData { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_XMLData1); - return NSData._(_ret, _lib, retain: true, release: true); + /// Constructs a [NSScriptCommand] that points to the same underlying object as [other]. + NSScriptCommand.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSScriptCommand] that wraps the given raw object pointer. + NSScriptCommand.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSScriptCommand]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSScriptCommand); } - NSData XMLDataWithOptions_(int options) { - final _ret = - _lib._objc_msgSend_1132(_id, _lib._sel_XMLDataWithOptions_1, options); - return NSData._(_ret, _lib, retain: true, release: true); + NSScriptCommand initWithCommandDescription_( + NSScriptCommandDescription commandDef) { + final _ret = _objc_msgSend_707( + this.pointer, _sel_initWithCommandDescription_, commandDef.pointer); + return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - NSObject? objectByApplyingXSLT_arguments_error_(NSData xslt, - NSDictionary? arguments, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_1133( - _id, - _lib._sel_objectByApplyingXSLT_arguments_error_1, - xslt._id, - arguments?._id ?? ffi.nullptr, - error); + NSScriptCommand? initWithCoder_(objc.NSCoder inCoder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, inCoder.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - NSObject? objectByApplyingXSLTString_arguments_error_(NSString xslt, - NSDictionary? arguments, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_1134( - _id, - _lib._sel_objectByApplyingXSLTString_arguments_error_1, - xslt._id, - arguments?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + NSScriptCommandDescription get commandDescription { + final _ret = _objc_msgSend_708(this.pointer, _sel_commandDescription); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: true, release: true); } - NSObject? objectByApplyingXSLTAtURL_arguments_error_(NSURL xsltURL, - NSDictionary? argument, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_1135( - _id, - _lib._sel_objectByApplyingXSLTAtURL_arguments_error_1, - xsltURL._id, - argument?._id ?? ffi.nullptr, - error); + objc.NSObject? get directParameter { + final _ret = _objc_msgSend_66(this.pointer, _sel_directParameter); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - bool validateAndReturnError_(ffi.Pointer> error) { - return _lib._objc_msgSend_255( - _id, _lib._sel_validateAndReturnError_1, error); + set directParameter(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDirectParameter_, value?.pointer ?? ffi.nullptr); } - @override - NSXMLDocument initWithKind_(int kind) { - final _ret = _lib._objc_msgSend_1106(_id, _lib._sel_initWithKind_1, kind); - return NSXMLDocument._(_ret, _lib, retain: true, release: true); + NSScriptObjectSpecifier? get receiversSpecifier { + final _ret = _objc_msgSend_737(this.pointer, _sel_receiversSpecifier); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - @override - NSXMLDocument initWithKind_options_(int kind, int options) { - final _ret = _lib._objc_msgSend_1107( - _id, _lib._sel_initWithKind_options_1, kind, options); - return NSXMLDocument._(_ret, _lib, retain: true, release: true); + set receiversSpecifier(NSScriptObjectSpecifier? value) { + return _objc_msgSend_738(this.pointer, _sel_setReceiversSpecifier_, + value?.pointer ?? ffi.nullptr); } - static NSObject document(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLDocument1, _lib._sel_document1); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSObject? get evaluatedReceivers { + final _ret = _objc_msgSend_66(this.pointer, _sel_evaluatedReceivers); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSDictionary? get arguments { + final _ret = _objc_msgSend_65(this.pointer, _sel_arguments); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSObject documentWithRootElement_( - AVFAudio _lib, NSXMLElement element) { - final _ret = _lib._objc_msgSend_1108(_lib._class_NSXMLDocument1, - _lib._sel_documentWithRootElement_1, element._id); - return NSObject._(_ret, _lib, retain: true, release: true); + set arguments(objc.NSDictionary? value) { + return _objc_msgSend_173( + this.pointer, _sel_setArguments_, value?.pointer ?? ffi.nullptr); } - static NSObject elementWithName_(AVFAudio _lib, NSString name) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSXMLDocument1, _lib._sel_elementWithName_1, name._id); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSDictionary? get evaluatedArguments { + final _ret = _objc_msgSend_65(this.pointer, _sel_evaluatedArguments); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_URI_( - AVFAudio _lib, NSString name, NSString URI) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDocument1, - _lib._sel_elementWithName_URI_1, name._id, URI._id); - return NSObject._(_ret, _lib, retain: true, release: true); + bool get wellFormed { + return _objc_msgSend_7(this.pointer, _sel_isWellFormed); } - static NSObject elementWithName_stringValue_( - AVFAudio _lib, NSString name, NSString string) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDocument1, - _lib._sel_elementWithName_stringValue_1, name._id, string._id); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSObject? performDefaultImplementation() { + final _ret = + _objc_msgSend_66(this.pointer, _sel_performDefaultImplementation); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_children_attributes_( - AVFAudio _lib, NSString name, NSArray? children, NSArray? attributes) { - final _ret = _lib._objc_msgSend_1110( - _lib._class_NSXMLDocument1, - _lib._sel_elementWithName_children_attributes_1, - name._id, - children?._id ?? ffi.nullptr, - attributes?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSObject? executeCommand() { + final _ret = _objc_msgSend_66(this.pointer, _sel_executeCommand); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject attributeWithName_stringValue_( - AVFAudio _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDocument1, - _lib._sel_attributeWithName_stringValue_1, name._id, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + int get scriptErrorNumber { + return _objc_msgSend_114(this.pointer, _sel_scriptErrorNumber); } - static NSObject attributeWithName_URI_stringValue_( - AVFAudio _lib, NSString name, NSString URI, NSString stringValue) { - final _ret = _lib._objc_msgSend_1074( - _lib._class_NSXMLDocument1, - _lib._sel_attributeWithName_URI_stringValue_1, - name._id, - URI._id, - stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + set scriptErrorNumber(int value) { + return _objc_msgSend_134(this.pointer, _sel_setScriptErrorNumber_, value); } - static NSObject namespaceWithName_stringValue_( - AVFAudio _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDocument1, - _lib._sel_namespaceWithName_stringValue_1, name._id, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + NSAppleEventDescriptor? get scriptErrorOffendingObjectDescriptor { + final _ret = _objc_msgSend_742( + this.pointer, _sel_scriptErrorOffendingObjectDescriptor); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject processingInstructionWithName_stringValue_( - AVFAudio _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109( - _lib._class_NSXMLDocument1, - _lib._sel_processingInstructionWithName_stringValue_1, - name._id, - stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + set scriptErrorOffendingObjectDescriptor(NSAppleEventDescriptor? value) { + return _objc_msgSend_743( + this.pointer, + _sel_setScriptErrorOffendingObjectDescriptor_, + value?.pointer ?? ffi.nullptr); } - static NSObject commentWithStringValue_(AVFAudio _lib, NSString stringValue) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLDocument1, - _lib._sel_commentWithStringValue_1, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + NSAppleEventDescriptor? get scriptErrorExpectedTypeDescriptor { + final _ret = + _objc_msgSend_742(this.pointer, _sel_scriptErrorExpectedTypeDescriptor); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject textWithStringValue_(AVFAudio _lib, NSString stringValue) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLDocument1, - _lib._sel_textWithStringValue_1, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + set scriptErrorExpectedTypeDescriptor(NSAppleEventDescriptor? value) { + return _objc_msgSend_743( + this.pointer, + _sel_setScriptErrorExpectedTypeDescriptor_, + value?.pointer ?? ffi.nullptr); } - static NSObject? DTDNodeWithXMLString_(AVFAudio _lib, NSString string) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSXMLDocument1, - _lib._sel_DTDNodeWithXMLString_1, string._id); + objc.NSString? get scriptErrorString { + final _ret = _objc_msgSend_13(this.pointer, _sel_scriptErrorString); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSString localNameForName_(AVFAudio _lib, NSString name) { - final _ret = _lib._objc_msgSend_69( - _lib._class_NSXMLDocument1, _lib._sel_localNameForName_1, name._id); - return NSString._(_ret, _lib, retain: true, release: true); + set scriptErrorString(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setScriptErrorString_, + value?.pointer ?? ffi.nullptr); } - static NSString? prefixForName_(AVFAudio _lib, NSString name) { - final _ret = _lib._objc_msgSend_186( - _lib._class_NSXMLDocument1, _lib._sel_prefixForName_1, name._id); + static NSScriptCommand? currentCommand() { + final _ret = _objc_msgSend_744(_class_NSScriptCommand, _sel_currentCommand); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - static NSXMLNode? predefinedNamespaceForPrefix_( - AVFAudio _lib, NSString name) { - final _ret = _lib._objc_msgSend_1125(_lib._class_NSXMLDocument1, - _lib._sel_predefinedNamespaceForPrefix_1, name._id); + NSAppleEventDescriptor? get appleEvent { + final _ret = _objc_msgSend_742(this.pointer, _sel_appleEvent); return _ret.address == 0 ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDocument new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLDocument1, _lib._sel_new1); - return NSXMLDocument._(_ret, _lib, retain: false, release: true); + void suspendExecution() { + _objc_msgSend_82(this.pointer, _sel_suspendExecution); } - static NSXMLDocument allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSXMLDocument1, _lib._sel_allocWithZone_1, zone); - return NSXMLDocument._(_ret, _lib, retain: false, release: true); + void resumeExecutionWithResult_(objc.NSObject? result) { + _objc_msgSend_215(this.pointer, _sel_resumeExecutionWithResult_, + result?.pointer ?? ffi.nullptr); } - static NSXMLDocument alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLDocument1, _lib._sel_alloc1); - return NSXMLDocument._(_ret, _lib, retain: false, release: true); + @override + NSScriptCommand init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSXMLDocument1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static NSScriptCommand new1() { + final _ret = _objc_msgSend_40(_class_NSScriptCommand, _sel_new); + return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSXMLDocument1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static NSScriptCommand allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSScriptCommand, _sel_allocWithZone_, zone); + return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLDocument1, _lib._sel_accessInstanceVariablesDirectly1); + static NSScriptCommand alloc() { + final _ret = _objc_msgSend_40(_class_NSScriptCommand, _sel_alloc); + return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLDocument1, _lib._sel_useStoredAccessor1); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSScriptCommand, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSXMLDocument1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSScriptCommand, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSXMLDocument1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSScriptCommand, _sel_accessInstanceVariablesDirectly); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSXMLDocument1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSScriptCommand, _sel_useStoredAccessor); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSXMLDocument1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSScriptCommand, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSXMLDocument1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSScriptCommand, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } -} - -abstract class NSXMLDocumentContentKind { - static const int NSXMLDocumentXMLKind = 0; - static const int NSXMLDocumentXHTMLKind = 1; - static const int NSXMLDocumentHTMLKind = 2; - static const int NSXMLDocumentTextKind = 3; -} -class NSXMLDTD extends NSXMLNode { - NSXMLDTD._(ffi.Pointer id, AVFAudio lib, + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSScriptCommand, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSScriptCommand, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSScriptCommand, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSScriptCommand = objc.getClass("NSScriptCommand"); +late final _sel_initWithCommandDescription_ = + objc.registerName("initWithCommandDescription:"); +final _objc_msgSend_707 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_commandDescription = objc.registerName("commandDescription"); +final _objc_msgSend_708 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_directParameter = objc.registerName("directParameter"); +late final _sel_setDirectParameter_ = objc.registerName("setDirectParameter:"); + +class NSScriptObjectSpecifier extends objc.NSObject { + NSScriptObjectSpecifier._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSXMLDTD] that points to the same underlying object as [other]. - static NSXMLDTD castFrom(T other) { - return NSXMLDTD._(other._id, other._lib, retain: true, release: true); - } + /// Constructs a [NSScriptObjectSpecifier] that points to the same underlying object as [other]. + NSScriptObjectSpecifier.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSXMLDTD] that wraps the given raw object pointer. - static NSXMLDTD castFromPointer(AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLDTD._(other, lib, retain: retain, release: release); + /// Constructs a [NSScriptObjectSpecifier] that wraps the given raw object pointer. + NSScriptObjectSpecifier.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSScriptObjectSpecifier]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSScriptObjectSpecifier); } - /// Returns whether [obj] is an instance of [NSXMLDTD]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSXMLDTD1); + static NSScriptObjectSpecifier? objectSpecifierWithDescriptor_( + NSAppleEventDescriptor descriptor) { + final _ret = _objc_msgSend_734(_class_NSScriptObjectSpecifier, + _sel_objectSpecifierWithDescriptor_, descriptor.pointer); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - @override - NSXMLDTD init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSXMLDTD._(_ret, _lib, retain: true, release: true); + NSScriptObjectSpecifier initWithContainerSpecifier_key_( + NSScriptObjectSpecifier container, objc.NSString property) { + final _ret = _objc_msgSend_735( + this.pointer, + _sel_initWithContainerSpecifier_key_, + container.pointer, + property.pointer); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - @override - NSXMLDTD initWithKind_options_(int kind, int options) { - final _ret = _lib._objc_msgSend_1107( - _id, _lib._sel_initWithKind_options_1, kind, options); - return NSXMLDTD._(_ret, _lib, retain: true, release: true); + NSScriptObjectSpecifier + initWithContainerClassDescription_containerSpecifier_key_( + NSScriptClassDescription classDesc, + NSScriptObjectSpecifier? container, + objc.NSString property) { + final _ret = _objc_msgSend_736( + this.pointer, + _sel_initWithContainerClassDescription_containerSpecifier_key_, + classDesc.pointer, + container?.pointer ?? ffi.nullptr, + property.pointer); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - NSXMLDTD? initWithContentsOfURL_options_error_( - NSURL url, int mask, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_1114(_id, - _lib._sel_initWithContentsOfURL_options_error_1, url._id, mask, error); + NSScriptObjectSpecifier? initWithCoder_(objc.NSCoder inCoder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, inCoder.pointer); return _ret.address == 0 ? null - : NSXMLDTD._(_ret, _lib, retain: true, release: true); + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - NSXMLDTD? initWithData_options_error_( - NSData data, int mask, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_1115( - _id, _lib._sel_initWithData_options_error_1, data._id, mask, error); + NSScriptObjectSpecifier? get childSpecifier { + final _ret = _objc_msgSend_737(this.pointer, _sel_childSpecifier); return _ret.address == 0 ? null - : NSXMLDTD._(_ret, _lib, retain: true, release: true); + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - NSString? get publicID { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_publicID1); + set childSpecifier(NSScriptObjectSpecifier? value) { + return _objc_msgSend_738( + this.pointer, _sel_setChildSpecifier_, value?.pointer ?? ffi.nullptr); + } + + NSScriptObjectSpecifier? get containerSpecifier { + final _ret = _objc_msgSend_737(this.pointer, _sel_containerSpecifier); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - set publicID(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setPublicID_1, value?._id ?? ffi.nullptr); + set containerSpecifier(NSScriptObjectSpecifier? value) { + return _objc_msgSend_738(this.pointer, _sel_setContainerSpecifier_, + value?.pointer ?? ffi.nullptr); } - NSString? get systemID { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_systemID1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + bool get containerIsObjectBeingTested { + return _objc_msgSend_7(this.pointer, _sel_containerIsObjectBeingTested); } - set systemID(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setSystemID_1, value?._id ?? ffi.nullptr); + set containerIsObjectBeingTested(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setContainerIsObjectBeingTested_, value); } - void insertChild_atIndex_(NSXMLNode child, int index) { - _lib._objc_msgSend_1119( - _id, _lib._sel_insertChild_atIndex_1, child._id, index); + bool get containerIsRangeContainerObject { + return _objc_msgSend_7(this.pointer, _sel_containerIsRangeContainerObject); } - void insertChildren_atIndex_(NSArray children, int index) { - _lib._objc_msgSend_1120( - _id, _lib._sel_insertChildren_atIndex_1, children._id, index); + set containerIsRangeContainerObject(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setContainerIsRangeContainerObject_, value); } - void removeChildAtIndex_(int index) { - _lib._objc_msgSend_470(_id, _lib._sel_removeChildAtIndex_1, index); + objc.NSString get key { + final _ret = _objc_msgSend_12(this.pointer, _sel_key); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void setChildren_(NSArray? children) { - _lib._objc_msgSend_843( - _id, _lib._sel_setChildren_1, children?._id ?? ffi.nullptr); + set key(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setKey_, value.pointer); } - void addChild_(NSXMLNode child) { - _lib._objc_msgSend_1121(_id, _lib._sel_addChild_1, child._id); + NSScriptClassDescription? get containerClassDescription { + final _ret = + _objc_msgSend_703(this.pointer, _sel_containerClassDescription); + return _ret.address == 0 + ? null + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { - _lib._objc_msgSend_1122( - _id, _lib._sel_replaceChildAtIndex_withNode_1, index, node._id); + set containerClassDescription(NSScriptClassDescription? value) { + return _objc_msgSend_739(this.pointer, _sel_setContainerClassDescription_, + value?.pointer ?? ffi.nullptr); } - NSXMLDTDNode? entityDeclarationForName_(NSString name) { - final _ret = _lib._objc_msgSend_1126( - _id, _lib._sel_entityDeclarationForName_1, name._id); + NSScriptClassDescription? get keyClassDescription { + final _ret = _objc_msgSend_703(this.pointer, _sel_keyClassDescription); return _ret.address == 0 ? null - : NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); + } + + ffi.Pointer indicesOfObjectsByEvaluatingWithContainer_count_( + objc.NSObject container, ffi.Pointer count) { + return _objc_msgSend_740( + this.pointer, + _sel_indicesOfObjectsByEvaluatingWithContainer_count_, + container.pointer, + count); } - NSXMLDTDNode? notationDeclarationForName_(NSString name) { - final _ret = _lib._objc_msgSend_1126( - _id, _lib._sel_notationDeclarationForName_1, name._id); + objc.NSObject? objectsByEvaluatingWithContainers_(objc.NSObject containers) { + final _ret = _objc_msgSend_741(this.pointer, + _sel_objectsByEvaluatingWithContainers_, containers.pointer); return _ret.address == 0 ? null - : NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSXMLDTDNode? elementDeclarationForName_(NSString name) { - final _ret = _lib._objc_msgSend_1126( - _id, _lib._sel_elementDeclarationForName_1, name._id); + objc.NSObject? get objectsByEvaluatingSpecifier { + final _ret = + _objc_msgSend_66(this.pointer, _sel_objectsByEvaluatingSpecifier); return _ret.address == 0 ? null - : NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSXMLDTDNode? attributeDeclarationForName_elementName_( - NSString name, NSString elementName) { - final _ret = _lib._objc_msgSend_1127( - _id, - _lib._sel_attributeDeclarationForName_elementName_1, - name._id, - elementName._id); + int get evaluationErrorNumber { + return _objc_msgSend_114(this.pointer, _sel_evaluationErrorNumber); + } + + set evaluationErrorNumber(int value) { + return _objc_msgSend_134( + this.pointer, _sel_setEvaluationErrorNumber_, value); + } + + NSScriptObjectSpecifier? get evaluationErrorSpecifier { + final _ret = _objc_msgSend_737(this.pointer, _sel_evaluationErrorSpecifier); return _ret.address == 0 ? null - : NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDTDNode? predefinedEntityDeclarationForName_( - AVFAudio _lib, NSString name) { - final _ret = _lib._objc_msgSend_1126(_lib._class_NSXMLDTD1, - _lib._sel_predefinedEntityDeclarationForName_1, name._id); + NSAppleEventDescriptor? get descriptor { + final _ret = _objc_msgSend_742(this.pointer, _sel_descriptor); return _ret.address == 0 ? null - : NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } @override - NSXMLDTD initWithKind_(int kind) { - final _ret = _lib._objc_msgSend_1106(_id, _lib._sel_initWithKind_1, kind); - return NSXMLDTD._(_ret, _lib, retain: true, release: true); + NSScriptObjectSpecifier init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - static NSObject document(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLDTD1, _lib._sel_document1); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSScriptObjectSpecifier new1() { + final _ret = _objc_msgSend_40(_class_NSScriptObjectSpecifier, _sel_new); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } - static NSObject documentWithRootElement_( - AVFAudio _lib, NSXMLElement element) { - final _ret = _lib._objc_msgSend_1108(_lib._class_NSXMLDTD1, - _lib._sel_documentWithRootElement_1, element._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSScriptObjectSpecifier allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSScriptObjectSpecifier, _sel_allocWithZone_, zone); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } - static NSObject elementWithName_(AVFAudio _lib, NSString name) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSXMLDTD1, _lib._sel_elementWithName_1, name._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSScriptObjectSpecifier alloc() { + final _ret = _objc_msgSend_40(_class_NSScriptObjectSpecifier, _sel_alloc); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } - static NSObject elementWithName_URI_( - AVFAudio _lib, NSString name, NSString URI) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDTD1, - _lib._sel_elementWithName_URI_1, name._id, URI._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSScriptObjectSpecifier, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - static NSObject elementWithName_stringValue_( - AVFAudio _lib, NSString name, NSString string) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDTD1, - _lib._sel_elementWithName_stringValue_1, name._id, string._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSScriptObjectSpecifier, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static NSObject elementWithName_children_attributes_( - AVFAudio _lib, NSString name, NSArray? children, NSArray? attributes) { - final _ret = _lib._objc_msgSend_1110( - _lib._class_NSXMLDTD1, - _lib._sel_elementWithName_children_attributes_1, - name._id, - children?._id ?? ffi.nullptr, - attributes?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSScriptObjectSpecifier, _sel_accessInstanceVariablesDirectly); } - static NSObject attributeWithName_stringValue_( - AVFAudio _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDTD1, - _lib._sel_attributeWithName_stringValue_1, name._id, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSScriptObjectSpecifier, _sel_useStoredAccessor); } - static NSObject attributeWithName_URI_stringValue_( - AVFAudio _lib, NSString name, NSString URI, NSString stringValue) { - final _ret = _lib._objc_msgSend_1074( - _lib._class_NSXMLDTD1, - _lib._sel_attributeWithName_URI_stringValue_1, - name._id, - URI._id, - stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSScriptObjectSpecifier, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static NSObject namespaceWithName_stringValue_( - AVFAudio _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDTD1, - _lib._sel_namespaceWithName_stringValue_1, name._id, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSScriptObjectSpecifier, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static NSObject processingInstructionWithName_stringValue_( - AVFAudio _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109( - _lib._class_NSXMLDTD1, - _lib._sel_processingInstructionWithName_stringValue_1, - name._id, - stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSScriptObjectSpecifier, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSObject commentWithStringValue_(AVFAudio _lib, NSString stringValue) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLDTD1, - _lib._sel_commentWithStringValue_1, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSScriptObjectSpecifier, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject textWithStringValue_(AVFAudio _lib, NSString stringValue) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLDTD1, - _lib._sel_textWithStringValue_1, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSScriptObjectSpecifier, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - static NSObject? DTDNodeWithXMLString_(AVFAudio _lib, NSString string) { - final _ret = _lib._objc_msgSend_38( - _lib._class_NSXMLDTD1, _lib._sel_DTDNodeWithXMLString_1, string._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); +late final _class_NSScriptObjectSpecifier = + objc.getClass("NSScriptObjectSpecifier"); + +class NSAppleEventDescriptor extends objc.NSObject { + NSAppleEventDescriptor._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSAppleEventDescriptor] that points to the same underlying object as [other]. + NSAppleEventDescriptor.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSAppleEventDescriptor] that wraps the given raw object pointer. + NSAppleEventDescriptor.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSAppleEventDescriptor]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSAppleEventDescriptor); } - static NSString localNameForName_(AVFAudio _lib, NSString name) { - final _ret = _lib._objc_msgSend_69( - _lib._class_NSXMLDTD1, _lib._sel_localNameForName_1, name._id); - return NSString._(_ret, _lib, retain: true, release: true); + static NSAppleEventDescriptor nullDescriptor() { + final _ret = + _objc_msgSend_709(_class_NSAppleEventDescriptor, _sel_nullDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSString? prefixForName_(AVFAudio _lib, NSString name) { - final _ret = _lib._objc_msgSend_186( - _lib._class_NSXMLDTD1, _lib._sel_prefixForName_1, name._id); + static NSAppleEventDescriptor? descriptorWithDescriptorType_bytes_length_( + int descriptorType, ffi.Pointer bytes, int byteCount) { + final _ret = _objc_msgSend_710( + _class_NSAppleEventDescriptor, + _sel_descriptorWithDescriptorType_bytes_length_, + descriptorType, + bytes, + byteCount); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLNode? predefinedNamespaceForPrefix_( - AVFAudio _lib, NSString name) { - final _ret = _lib._objc_msgSend_1125(_lib._class_NSXMLDTD1, - _lib._sel_predefinedNamespaceForPrefix_1, name._id); + static NSAppleEventDescriptor? descriptorWithDescriptorType_data_( + int descriptorType, objc.NSData? data) { + final _ret = _objc_msgSend_711( + _class_NSAppleEventDescriptor, + _sel_descriptorWithDescriptorType_data_, + descriptorType, + data?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDTD new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSXMLDTD1, _lib._sel_new1); - return NSXMLDTD._(_ret, _lib, retain: false, release: true); + static NSAppleEventDescriptor descriptorWithBoolean_(int boolean) { + final _ret = _objc_msgSend_712( + _class_NSAppleEventDescriptor, _sel_descriptorWithBoolean_, boolean); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDTD allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSXMLDTD1, _lib._sel_allocWithZone_1, zone); - return NSXMLDTD._(_ret, _lib, retain: false, release: true); + static NSAppleEventDescriptor descriptorWithEnumCode_(int enumerator) { + final _ret = _objc_msgSend_713(_class_NSAppleEventDescriptor, + _sel_descriptorWithEnumCode_, enumerator); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDTD alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSXMLDTD1, _lib._sel_alloc1); - return NSXMLDTD._(_ret, _lib, retain: false, release: true); + static NSAppleEventDescriptor descriptorWithInt32_(int signedInt) { + final _ret = _objc_msgSend_714( + _class_NSAppleEventDescriptor, _sel_descriptorWithInt32_, signedInt); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSXMLDTD1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static NSAppleEventDescriptor descriptorWithDouble_(double doubleValue) { + final _ret = _objc_msgSend_715( + _class_NSAppleEventDescriptor, _sel_descriptorWithDouble_, doubleValue); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); + } + + static NSAppleEventDescriptor descriptorWithTypeCode_(int typeCode) { + final _ret = _objc_msgSend_713( + _class_NSAppleEventDescriptor, _sel_descriptorWithTypeCode_, typeCode); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); + } + + static NSAppleEventDescriptor descriptorWithString_(objc.NSString string) { + final _ret = _objc_msgSend_716(_class_NSAppleEventDescriptor, + _sel_descriptorWithString_, string.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); + } + + static NSAppleEventDescriptor descriptorWithDate_(objc.NSDate date) { + final _ret = _objc_msgSend_717( + _class_NSAppleEventDescriptor, _sel_descriptorWithDate_, date.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); + } + + static NSAppleEventDescriptor descriptorWithFileURL_(objc.NSURL fileURL) { + final _ret = _objc_msgSend_718(_class_NSAppleEventDescriptor, + _sel_descriptorWithFileURL_, fileURL.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); + } + + static NSAppleEventDescriptor + appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_( + int eventClass, + int eventID, + NSAppleEventDescriptor? targetDescriptor, + int returnID, + int transactionID) { + final _ret = _objc_msgSend_719( + _class_NSAppleEventDescriptor, + _sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_, + eventClass, + eventID, + targetDescriptor?.pointer ?? ffi.nullptr, + returnID, + transactionID); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSXMLDTD1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static NSAppleEventDescriptor listDescriptor() { + final _ret = + _objc_msgSend_709(_class_NSAppleEventDescriptor, _sel_listDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLDTD1, _lib._sel_accessInstanceVariablesDirectly1); + static NSAppleEventDescriptor recordDescriptor() { + final _ret = + _objc_msgSend_709(_class_NSAppleEventDescriptor, _sel_recordDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLDTD1, _lib._sel_useStoredAccessor1); + static NSAppleEventDescriptor currentProcessDescriptor() { + final _ret = _objc_msgSend_709( + _class_NSAppleEventDescriptor, _sel_currentProcessDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSXMLDTD1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static NSAppleEventDescriptor descriptorWithProcessIdentifier_( + int processIdentifier) { + final _ret = _objc_msgSend_714(_class_NSAppleEventDescriptor, + _sel_descriptorWithProcessIdentifier_, processIdentifier); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSXMLDTD1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static NSAppleEventDescriptor descriptorWithBundleIdentifier_( + objc.NSString bundleIdentifier) { + final _ret = _objc_msgSend_716(_class_NSAppleEventDescriptor, + _sel_descriptorWithBundleIdentifier_, bundleIdentifier.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSXMLDTD1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static NSAppleEventDescriptor descriptorWithApplicationURL_( + objc.NSURL applicationURL) { + final _ret = _objc_msgSend_718(_class_NSAppleEventDescriptor, + _sel_descriptorWithApplicationURL_, applicationURL.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); + } + + NSAppleEventDescriptor initWithAEDescNoCopy_(ffi.Pointer aeDesc) { + final _ret = + _objc_msgSend_720(this.pointer, _sel_initWithAEDescNoCopy_, aeDesc); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); + } + + NSAppleEventDescriptor? initWithDescriptorType_bytes_length_( + int descriptorType, ffi.Pointer bytes, int byteCount) { + final _ret = _objc_msgSend_721( + this.pointer, + _sel_initWithDescriptorType_bytes_length_, + descriptorType, + bytes, + byteCount); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); + } + + NSAppleEventDescriptor? initWithDescriptorType_data_( + int descriptorType, objc.NSData? data) { + final _ret = _objc_msgSend_722( + this.pointer, + _sel_initWithDescriptorType_data_, + descriptorType, + data?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSXMLDTD1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + NSAppleEventDescriptor + initWithEventClass_eventID_targetDescriptor_returnID_transactionID_( + int eventClass, + int eventID, + NSAppleEventDescriptor? targetDescriptor, + int returnID, + int transactionID) { + final _ret = _objc_msgSend_723( + this.pointer, + _sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_, + eventClass, + eventID, + targetDescriptor?.pointer ?? ffi.nullptr, + returnID, + transactionID); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSXMLDTD1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + NSAppleEventDescriptor initListDescriptor() { + final _ret = _objc_msgSend_40(this.pointer, _sel_initListDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } -} -class NSXMLDTDNode extends NSXMLNode { - NSXMLDTDNode._(ffi.Pointer id, AVFAudio lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSXMLDTDNode] that points to the same underlying object as [other]. - static NSXMLDTDNode castFrom(T other) { - return NSXMLDTDNode._(other._id, other._lib, retain: true, release: true); + NSAppleEventDescriptor initRecordDescriptor() { + final _ret = _objc_msgSend_40(this.pointer, _sel_initRecordDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// Returns a [NSXMLDTDNode] that wraps the given raw object pointer. - static NSXMLDTDNode castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLDTDNode._(other, lib, retain: retain, release: release); + ffi.Pointer get aeDesc { + return _objc_msgSend_724(this.pointer, _sel_aeDesc); } - /// Returns whether [obj] is an instance of [NSXMLDTDNode]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSXMLDTDNode1); + int get descriptorType { + return _objc_msgSend_704(this.pointer, _sel_descriptorType); } - NSXMLDTDNode? initWithXMLString_(NSString string) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_initWithXMLString_1, string._id); - return _ret.address == 0 - ? null - : NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + objc.NSData get data { + final _ret = _objc_msgSend_104(this.pointer, _sel_data); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - @override - NSXMLDTDNode initWithKind_options_(int kind, int options) { - final _ret = _lib._objc_msgSend_1107( - _id, _lib._sel_initWithKind_options_1, kind, options); - return NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + int get booleanValue { + return _objc_msgSend_725(this.pointer, _sel_booleanValue); } - @override - NSXMLDTDNode init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + int get enumCodeValue { + return _objc_msgSend_704(this.pointer, _sel_enumCodeValue); } - int get DTDKind { - return _lib._objc_msgSend_1123(_id, _lib._sel_DTDKind1); + int get int32Value { + return _objc_msgSend_264(this.pointer, _sel_int32Value); } - set DTDKind(int value) { - return _lib._objc_msgSend_1124(_id, _lib._sel_setDTDKind_1, value); + double get doubleValue { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_doubleValue) + : _objc_msgSend_115(this.pointer, _sel_doubleValue); } - bool get external1 { - return _lib._objc_msgSend_12(_id, _lib._sel_isExternal1); + int get typeCodeValue { + return _objc_msgSend_704(this.pointer, _sel_typeCodeValue); } - NSString? get publicID { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_publicID1); + objc.NSString? get stringValue { + final _ret = _objc_msgSend_13(this.pointer, _sel_stringValue); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set publicID(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setPublicID_1, value?._id ?? ffi.nullptr); + objc.NSDate? get dateValue { + final _ret = _objc_msgSend_116(this.pointer, _sel_dateValue); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - NSString? get systemID { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_systemID1); + objc.NSURL? get fileURLValue { + final _ret = _objc_msgSend_10(this.pointer, _sel_fileURLValue); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - set systemID(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setSystemID_1, value?._id ?? ffi.nullptr); + int get eventClass { + return _objc_msgSend_704(this.pointer, _sel_eventClass); } - NSString? get notationName { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_notationName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + int get eventID { + return _objc_msgSend_704(this.pointer, _sel_eventID); } - set notationName(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setNotationName_1, value?._id ?? ffi.nullptr); + int get returnID { + return _objc_msgSend_726(this.pointer, _sel_returnID); } - @override - NSXMLDTDNode initWithKind_(int kind) { - final _ret = _lib._objc_msgSend_1106(_id, _lib._sel_initWithKind_1, kind); - return NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + int get transactionID { + return _objc_msgSend_264(this.pointer, _sel_transactionID); } - static NSObject document(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLDTDNode1, _lib._sel_document1); - return NSObject._(_ret, _lib, retain: true, release: true); + void setParamDescriptor_forKeyword_( + NSAppleEventDescriptor descriptor, int keyword) { + _objc_msgSend_727(this.pointer, _sel_setParamDescriptor_forKeyword_, + descriptor.pointer, keyword); } - static NSObject documentWithRootElement_( - AVFAudio _lib, NSXMLElement element) { - final _ret = _lib._objc_msgSend_1108(_lib._class_NSXMLDTDNode1, - _lib._sel_documentWithRootElement_1, element._id); - return NSObject._(_ret, _lib, retain: true, release: true); + NSAppleEventDescriptor? paramDescriptorForKeyword_(int keyword) { + final _ret = _objc_msgSend_728( + this.pointer, _sel_paramDescriptorForKeyword_, keyword); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject elementWithName_(AVFAudio _lib, NSString name) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSXMLDTDNode1, _lib._sel_elementWithName_1, name._id); - return NSObject._(_ret, _lib, retain: true, release: true); + void removeParamDescriptorWithKeyword_(int keyword) { + _objc_msgSend_729( + this.pointer, _sel_removeParamDescriptorWithKeyword_, keyword); } - static NSObject elementWithName_URI_( - AVFAudio _lib, NSString name, NSString URI) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDTDNode1, - _lib._sel_elementWithName_URI_1, name._id, URI._id); - return NSObject._(_ret, _lib, retain: true, release: true); + void setAttributeDescriptor_forKeyword_( + NSAppleEventDescriptor descriptor, int keyword) { + _objc_msgSend_727(this.pointer, _sel_setAttributeDescriptor_forKeyword_, + descriptor.pointer, keyword); } - static NSObject elementWithName_stringValue_( - AVFAudio _lib, NSString name, NSString string) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDTDNode1, - _lib._sel_elementWithName_stringValue_1, name._id, string._id); - return NSObject._(_ret, _lib, retain: true, release: true); + NSAppleEventDescriptor? attributeDescriptorForKeyword_(int keyword) { + final _ret = _objc_msgSend_728( + this.pointer, _sel_attributeDescriptorForKeyword_, keyword); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject elementWithName_children_attributes_( - AVFAudio _lib, NSString name, NSArray? children, NSArray? attributes) { - final _ret = _lib._objc_msgSend_1110( - _lib._class_NSXMLDTDNode1, - _lib._sel_elementWithName_children_attributes_1, - name._id, - children?._id ?? ffi.nullptr, - attributes?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + NSAppleEventDescriptor? sendEventWithOptions_timeout_error_( + int sendOptions, + double timeoutInSeconds, + ffi.Pointer> error) { + final _ret = _objc_msgSend_730( + this.pointer, + _sel_sendEventWithOptions_timeout_error_, + sendOptions, + timeoutInSeconds, + error); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject attributeWithName_stringValue_( - AVFAudio _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDTDNode1, - _lib._sel_attributeWithName_stringValue_1, name._id, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + bool get isRecordDescriptor { + return _objc_msgSend_7(this.pointer, _sel_isRecordDescriptor); } - static NSObject attributeWithName_URI_stringValue_( - AVFAudio _lib, NSString name, NSString URI, NSString stringValue) { - final _ret = _lib._objc_msgSend_1074( - _lib._class_NSXMLDTDNode1, - _lib._sel_attributeWithName_URI_stringValue_1, - name._id, - URI._id, - stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + int get numberOfItems { + return _objc_msgSend_114(this.pointer, _sel_numberOfItems); } - static NSObject namespaceWithName_stringValue_( - AVFAudio _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDTDNode1, - _lib._sel_namespaceWithName_stringValue_1, name._id, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + void insertDescriptor_atIndex_(NSAppleEventDescriptor descriptor, int index) { + _objc_msgSend_731(this.pointer, _sel_insertDescriptor_atIndex_, + descriptor.pointer, index); } - static NSObject processingInstructionWithName_stringValue_( - AVFAudio _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109( - _lib._class_NSXMLDTDNode1, - _lib._sel_processingInstructionWithName_stringValue_1, - name._id, - stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + NSAppleEventDescriptor? descriptorAtIndex_(int index) { + final _ret = + _objc_msgSend_732(this.pointer, _sel_descriptorAtIndex_, index); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject commentWithStringValue_(AVFAudio _lib, NSString stringValue) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLDTDNode1, - _lib._sel_commentWithStringValue_1, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + void removeDescriptorAtIndex_(int index) { + _objc_msgSend_135(this.pointer, _sel_removeDescriptorAtIndex_, index); } - static NSObject textWithStringValue_(AVFAudio _lib, NSString stringValue) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLDTDNode1, - _lib._sel_textWithStringValue_1, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + void setDescriptor_forKeyword_( + NSAppleEventDescriptor descriptor, int keyword) { + _objc_msgSend_727(this.pointer, _sel_setDescriptor_forKeyword_, + descriptor.pointer, keyword); } - static NSObject? DTDNodeWithXMLString_(AVFAudio _lib, NSString string) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSXMLDTDNode1, - _lib._sel_DTDNodeWithXMLString_1, string._id); + NSAppleEventDescriptor? descriptorForKeyword_(int keyword) { + final _ret = + _objc_msgSend_728(this.pointer, _sel_descriptorForKeyword_, keyword); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSString localNameForName_(AVFAudio _lib, NSString name) { - final _ret = _lib._objc_msgSend_69( - _lib._class_NSXMLDTDNode1, _lib._sel_localNameForName_1, name._id); - return NSString._(_ret, _lib, retain: true, release: true); + void removeDescriptorWithKeyword_(int keyword) { + _objc_msgSend_729(this.pointer, _sel_removeDescriptorWithKeyword_, keyword); } - static NSString? prefixForName_(AVFAudio _lib, NSString name) { - final _ret = _lib._objc_msgSend_186( - _lib._class_NSXMLDTDNode1, _lib._sel_prefixForName_1, name._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + int keywordForDescriptorAtIndex_(int index) { + return _objc_msgSend_733( + this.pointer, _sel_keywordForDescriptorAtIndex_, index); } - static NSXMLNode? predefinedNamespaceForPrefix_( - AVFAudio _lib, NSString name) { - final _ret = _lib._objc_msgSend_1125(_lib._class_NSXMLDTDNode1, - _lib._sel_predefinedNamespaceForPrefix_1, name._id); + NSAppleEventDescriptor? coerceToDescriptorType_(int descriptorType) { + final _ret = _objc_msgSend_728( + this.pointer, _sel_coerceToDescriptorType_, descriptorType); return _ret.address == 0 ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDTDNode new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLDTDNode1, _lib._sel_new1); - return NSXMLDTDNode._(_ret, _lib, retain: false, release: true); + @override + NSAppleEventDescriptor init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDTDNode allocWithZone_(AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSXMLDTDNode1, _lib._sel_allocWithZone_1, zone); - return NSXMLDTDNode._(_ret, _lib, retain: false, release: true); + static NSAppleEventDescriptor new1() { + final _ret = _objc_msgSend_40(_class_NSAppleEventDescriptor, _sel_new); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } - static NSXMLDTDNode alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLDTDNode1, _lib._sel_alloc1); - return NSXMLDTDNode._(_ret, _lib, retain: false, release: true); + static NSAppleEventDescriptor allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSAppleEventDescriptor, _sel_allocWithZone_, zone); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); + } + + static NSAppleEventDescriptor alloc() { + final _ret = _objc_msgSend_40(_class_NSAppleEventDescriptor, _sel_alloc); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSXMLDTDNode1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSAppleEventDescriptor, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSXMLDTDNode1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSAppleEventDescriptor, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLDTDNode1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSAppleEventDescriptor, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLDTDNode1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSAppleEventDescriptor, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSXMLDTDNode1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSAppleEventDescriptor, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSXMLDTDNode1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSAppleEventDescriptor, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSXMLDTDNode1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSAppleEventDescriptor, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSAppleEventDescriptor, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSAppleEventDescriptor, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSAppleEventDescriptor = + objc.getClass("NSAppleEventDescriptor"); +late final _sel_nullDescriptor = objc.registerName("nullDescriptor"); +final _objc_msgSend_709 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_descriptorWithDescriptorType_bytes_length_ = + objc.registerName("descriptorWithDescriptorType:bytes:length:"); +final _objc_msgSend_710 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer, int)>(); +late final _sel_descriptorWithDescriptorType_data_ = + objc.registerName("descriptorWithDescriptorType:data:"); +final _objc_msgSend_711 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_descriptorWithBoolean_ = + objc.registerName("descriptorWithBoolean:"); +final _objc_msgSend_712 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedChar)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_descriptorWithEnumCode_ = + objc.registerName("descriptorWithEnumCode:"); +final _objc_msgSend_713 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_descriptorWithInt32_ = + objc.registerName("descriptorWithInt32:"); +final _objc_msgSend_714 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_descriptorWithDouble_ = + objc.registerName("descriptorWithDouble:"); +final _objc_msgSend_715 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, double)>(); +late final _sel_descriptorWithTypeCode_ = + objc.registerName("descriptorWithTypeCode:"); +late final _sel_descriptorWithString_ = + objc.registerName("descriptorWithString:"); +final _objc_msgSend_716 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_descriptorWithDate_ = objc.registerName("descriptorWithDate:"); +final _objc_msgSend_717 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_descriptorWithFileURL_ = + objc.registerName("descriptorWithFileURL:"); +final _objc_msgSend_718 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_ = + objc.registerName( + "appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID:"); +final _objc_msgSend_719 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer, + ffi.Short, + ffi.Int)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer, + int, + int)>(); +late final _sel_listDescriptor = objc.registerName("listDescriptor"); +late final _sel_recordDescriptor = objc.registerName("recordDescriptor"); +late final _sel_currentProcessDescriptor = + objc.registerName("currentProcessDescriptor"); +late final _sel_descriptorWithProcessIdentifier_ = + objc.registerName("descriptorWithProcessIdentifier:"); +late final _sel_descriptorWithBundleIdentifier_ = + objc.registerName("descriptorWithBundleIdentifier:"); +late final _sel_descriptorWithApplicationURL_ = + objc.registerName("descriptorWithApplicationURL:"); - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSXMLDTDNode1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } +@ffi.Packed(2) +final class AEDesc extends ffi.Struct { + @ffi.UnsignedInt() + external int descriptorType; - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSXMLDTDNode1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer> dataHandle; } -abstract class NSXMLDTDNodeKind { - static const int NSXMLEntityGeneralKind = 1; - static const int NSXMLEntityParsedKind = 2; - static const int NSXMLEntityUnparsedKind = 3; - static const int NSXMLEntityParameterKind = 4; - static const int NSXMLEntityPredefined = 5; - static const int NSXMLAttributeCDATAKind = 6; - static const int NSXMLAttributeIDKind = 7; - static const int NSXMLAttributeIDRefKind = 8; - static const int NSXMLAttributeIDRefsKind = 9; - static const int NSXMLAttributeEntityKind = 10; - static const int NSXMLAttributeEntitiesKind = 11; - static const int NSXMLAttributeNMTokenKind = 12; - static const int NSXMLAttributeNMTokensKind = 13; - static const int NSXMLAttributeEnumerationKind = 14; - static const int NSXMLAttributeNotationKind = 15; - static const int NSXMLElementDeclarationUndefinedKind = 16; - static const int NSXMLElementDeclarationEmptyKind = 17; - static const int NSXMLElementDeclarationAnyKind = 18; - static const int NSXMLElementDeclarationMixedKind = 19; - static const int NSXMLElementDeclarationElementKind = 20; +final class OpaqueAEDataStorageType extends ffi.Opaque {} + +late final _sel_initWithAEDescNoCopy_ = + objc.registerName("initWithAEDescNoCopy:"); +final _objc_msgSend_720 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithDescriptorType_bytes_length_ = + objc.registerName("initWithDescriptorType:bytes:length:"); +final _objc_msgSend_721 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer, int)>(); +late final _sel_initWithDescriptorType_data_ = + objc.registerName("initWithDescriptorType:data:"); +final _objc_msgSend_722 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_ = + objc.registerName( + "initWithEventClass:eventID:targetDescriptor:returnID:transactionID:"); +final _objc_msgSend_723 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer, + ffi.Short, + ffi.Int)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer, + int, + int)>(); +late final _sel_initListDescriptor = objc.registerName("initListDescriptor"); +late final _sel_initRecordDescriptor = + objc.registerName("initRecordDescriptor"); +late final _sel_aeDesc = objc.registerName("aeDesc"); +final _objc_msgSend_724 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_descriptorType = objc.registerName("descriptorType"); +late final _sel_booleanValue = objc.registerName("booleanValue"); +final _objc_msgSend_725 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedChar Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_enumCodeValue = objc.registerName("enumCodeValue"); +late final _sel_int32Value = objc.registerName("int32Value"); +late final _sel_doubleValue = objc.registerName("doubleValue"); +late final _sel_typeCodeValue = objc.registerName("typeCodeValue"); +late final _sel_dateValue = objc.registerName("dateValue"); +late final _sel_fileURLValue = objc.registerName("fileURLValue"); +late final _sel_eventClass = objc.registerName("eventClass"); +late final _sel_eventID = objc.registerName("eventID"); +late final _sel_returnID = objc.registerName("returnID"); +final _objc_msgSend_726 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Short Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_transactionID = objc.registerName("transactionID"); +late final _sel_setParamDescriptor_forKeyword_ = + objc.registerName("setParamDescriptor:forKeyword:"); +final _objc_msgSend_727 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_paramDescriptorForKeyword_ = + objc.registerName("paramDescriptorForKeyword:"); +final _objc_msgSend_728 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_removeParamDescriptorWithKeyword_ = + objc.registerName("removeParamDescriptorWithKeyword:"); +final _objc_msgSend_729 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setAttributeDescriptor_forKeyword_ = + objc.registerName("setAttributeDescriptor:forKeyword:"); +late final _sel_attributeDescriptorForKeyword_ = + objc.registerName("attributeDescriptorForKeyword:"); + +abstract class NSAppleEventSendOptions { + static const int NSAppleEventSendNoReply = 1; + static const int NSAppleEventSendQueueReply = 2; + static const int NSAppleEventSendWaitForReply = 3; + static const int NSAppleEventSendNeverInteract = 16; + static const int NSAppleEventSendCanInteract = 32; + static const int NSAppleEventSendAlwaysInteract = 48; + static const int NSAppleEventSendCanSwitchLayer = 64; + static const int NSAppleEventSendDontRecord = 4096; + static const int NSAppleEventSendDontExecute = 8192; + static const int NSAppleEventSendDontAnnotate = 65536; + static const int NSAppleEventSendDefaultOptions = 35; } -class AVAudioSession extends NSObject { - AVAudioSession._(ffi.Pointer id, AVFAudio lib, +late final _sel_sendEventWithOptions_timeout_error_ = + objc.registerName("sendEventWithOptions:timeout:error:"); +final _objc_msgSend_730 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Double, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + double, + ffi.Pointer>)>(); +late final _sel_isRecordDescriptor = objc.registerName("isRecordDescriptor"); +late final _sel_numberOfItems = objc.registerName("numberOfItems"); +late final _sel_insertDescriptor_atIndex_ = + objc.registerName("insertDescriptor:atIndex:"); +final _objc_msgSend_731 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_descriptorAtIndex_ = objc.registerName("descriptorAtIndex:"); +final _objc_msgSend_732 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_removeDescriptorAtIndex_ = + objc.registerName("removeDescriptorAtIndex:"); +late final _sel_setDescriptor_forKeyword_ = + objc.registerName("setDescriptor:forKeyword:"); +late final _sel_descriptorForKeyword_ = + objc.registerName("descriptorForKeyword:"); +late final _sel_removeDescriptorWithKeyword_ = + objc.registerName("removeDescriptorWithKeyword:"); +late final _sel_keywordForDescriptorAtIndex_ = + objc.registerName("keywordForDescriptorAtIndex:"); +final _objc_msgSend_733 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedInt Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_coerceToDescriptorType_ = + objc.registerName("coerceToDescriptorType:"); +late final _sel_objectSpecifierWithDescriptor_ = + objc.registerName("objectSpecifierWithDescriptor:"); +final _objc_msgSend_734 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithContainerSpecifier_key_ = + objc.registerName("initWithContainerSpecifier:key:"); +final _objc_msgSend_735 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithContainerClassDescription_containerSpecifier_key_ = objc + .registerName("initWithContainerClassDescription:containerSpecifier:key:"); +final _objc_msgSend_736 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_childSpecifier = objc.registerName("childSpecifier"); +final _objc_msgSend_737 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setChildSpecifier_ = objc.registerName("setChildSpecifier:"); +final _objc_msgSend_738 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_containerSpecifier = objc.registerName("containerSpecifier"); +late final _sel_setContainerSpecifier_ = + objc.registerName("setContainerSpecifier:"); +late final _sel_containerIsObjectBeingTested = + objc.registerName("containerIsObjectBeingTested"); +late final _sel_setContainerIsObjectBeingTested_ = + objc.registerName("setContainerIsObjectBeingTested:"); +late final _sel_containerIsRangeContainerObject = + objc.registerName("containerIsRangeContainerObject"); +late final _sel_setContainerIsRangeContainerObject_ = + objc.registerName("setContainerIsRangeContainerObject:"); +late final _sel_key = objc.registerName("key"); +late final _sel_setKey_ = objc.registerName("setKey:"); +late final _sel_containerClassDescription = + objc.registerName("containerClassDescription"); +late final _sel_setContainerClassDescription_ = + objc.registerName("setContainerClassDescription:"); +final _objc_msgSend_739 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_keyClassDescription = objc.registerName("keyClassDescription"); +late final _sel_indicesOfObjectsByEvaluatingWithContainer_count_ = + objc.registerName("indicesOfObjectsByEvaluatingWithContainer:count:"); +final _objc_msgSend_740 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_objectsByEvaluatingWithContainers_ = + objc.registerName("objectsByEvaluatingWithContainers:"); +final _objc_msgSend_741 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_objectsByEvaluatingSpecifier = + objc.registerName("objectsByEvaluatingSpecifier"); +late final _sel_evaluationErrorNumber = + objc.registerName("evaluationErrorNumber"); +late final _sel_setEvaluationErrorNumber_ = + objc.registerName("setEvaluationErrorNumber:"); +late final _sel_evaluationErrorSpecifier = + objc.registerName("evaluationErrorSpecifier"); +late final _sel_descriptor = objc.registerName("descriptor"); +final _objc_msgSend_742 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_receiversSpecifier = objc.registerName("receiversSpecifier"); +late final _sel_setReceiversSpecifier_ = + objc.registerName("setReceiversSpecifier:"); +late final _sel_evaluatedReceivers = objc.registerName("evaluatedReceivers"); +late final _sel_evaluatedArguments = objc.registerName("evaluatedArguments"); +late final _sel_isWellFormed = objc.registerName("isWellFormed"); +late final _sel_performDefaultImplementation = + objc.registerName("performDefaultImplementation"); +late final _sel_executeCommand = objc.registerName("executeCommand"); +late final _sel_scriptErrorNumber = objc.registerName("scriptErrorNumber"); +late final _sel_setScriptErrorNumber_ = + objc.registerName("setScriptErrorNumber:"); +late final _sel_scriptErrorOffendingObjectDescriptor = + objc.registerName("scriptErrorOffendingObjectDescriptor"); +late final _sel_setScriptErrorOffendingObjectDescriptor_ = + objc.registerName("setScriptErrorOffendingObjectDescriptor:"); +final _objc_msgSend_743 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scriptErrorExpectedTypeDescriptor = + objc.registerName("scriptErrorExpectedTypeDescriptor"); +late final _sel_setScriptErrorExpectedTypeDescriptor_ = + objc.registerName("setScriptErrorExpectedTypeDescriptor:"); +late final _sel_scriptErrorString = objc.registerName("scriptErrorString"); +late final _sel_setScriptErrorString_ = + objc.registerName("setScriptErrorString:"); +late final _sel_currentCommand = objc.registerName("currentCommand"); +final _objc_msgSend_744 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_appleEvent = objc.registerName("appleEvent"); +late final _sel_suspendExecution = objc.registerName("suspendExecution"); +late final _sel_resumeExecutionWithResult_ = + objc.registerName("resumeExecutionWithResult:"); +late final _sel_createCommandInstance = + objc.registerName("createCommandInstance"); +final _objc_msgSend_745 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_createCommandInstanceWithZone_ = + objc.registerName("createCommandInstanceWithZone:"); +final _objc_msgSend_746 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_NSZone>)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_NSZone>)>(); +late final _sel_supportsCommand_ = objc.registerName("supportsCommand:"); +final _objc_msgSend_747 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_selectorForCommand_ = objc.registerName("selectorForCommand:"); +final _objc_msgSend_748 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_typeForKey_ = objc.registerName("typeForKey:"); +late final _sel_classDescriptionForKey_ = + objc.registerName("classDescriptionForKey:"); +final _objc_msgSend_749 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_appleEventCodeForKey_ = + objc.registerName("appleEventCodeForKey:"); +late final _sel_keyWithAppleEventCode_ = + objc.registerName("keyWithAppleEventCode:"); +final _objc_msgSend_750 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_defaultSubcontainerAttributeKey = + objc.registerName("defaultSubcontainerAttributeKey"); +late final _sel_isLocationRequiredToCreateForKey_ = + objc.registerName("isLocationRequiredToCreateForKey:"); +late final _sel_hasPropertyForKey_ = objc.registerName("hasPropertyForKey:"); +late final _sel_hasOrderedToManyRelationshipForKey_ = + objc.registerName("hasOrderedToManyRelationshipForKey:"); +late final _sel_hasReadablePropertyForKey_ = + objc.registerName("hasReadablePropertyForKey:"); +late final _sel_hasWritablePropertyForKey_ = + objc.registerName("hasWritablePropertyForKey:"); +late final _sel_isReadOnlyKey_ = objc.registerName("isReadOnlyKey:"); + +class AVAudioSession extends objc.NSObject { + AVAudioSession._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [AVAudioSession] that points to the same underlying object as [other]. - static AVAudioSession castFrom(T other) { - return AVAudioSession._(other._id, other._lib, retain: true, release: true); - } + /// Constructs a [AVAudioSession] that points to the same underlying object as [other]. + AVAudioSession.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [AVAudioSession] that wraps the given raw object pointer. - static AVAudioSession castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return AVAudioSession._(other, lib, retain: retain, release: release); - } + /// Constructs a [AVAudioSession] that wraps the given raw object pointer. + AVAudioSession.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [AVAudioSession]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_AVAudioSession1); + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_AVAudioSession); } - static AVAudioSession sharedInstance(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_1145( - _lib._class_AVAudioSession1, _lib._sel_sharedInstance1); - return AVAudioSession._(_ret, _lib, retain: true, release: true); + static AVAudioSession sharedInstance() { + final _ret = _objc_msgSend_751(_class_AVAudioSession, _sel_sharedInstance); + return AVAudioSession.castFromPointer(_ret, retain: true, release: true); } - NSArray get availableCategories { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_availableCategories1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSArray get availableCategories { + final _ret = _objc_msgSend_6(this.pointer, _sel_availableCategories); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool setCategory_error_( - NSString category, ffi.Pointer> outError) { - return _lib._objc_msgSend_447( - _id, _lib._sel_setCategory_error_1, category._id, outError); + bool setCategory_error_(objc.NSString category, + ffi.Pointer> outError) { + return _objc_msgSend_285( + this.pointer, _sel_setCategory_error_, category.pointer, outError); } - bool setCategory_withOptions_error_(NSString category, int options, - ffi.Pointer> outError) { - return _lib._objc_msgSend_1146( - _id, - _lib._sel_setCategory_withOptions_error_1, - category._id, - options, - outError); + bool setCategory_withOptions_error_(objc.NSString category, int options, + ffi.Pointer> outError) { + return _objc_msgSend_752(this.pointer, _sel_setCategory_withOptions_error_, + category.pointer, options, outError); } - bool setCategory_mode_options_error_(NSString category, NSString mode, - int options, ffi.Pointer> outError) { - return _lib._objc_msgSend_1147( - _id, - _lib._sel_setCategory_mode_options_error_1, - category._id, - mode._id, - options, - outError); + bool setCategory_mode_options_error_( + objc.NSString category, + objc.NSString mode, + int options, + ffi.Pointer> outError) { + return _objc_msgSend_753(this.pointer, _sel_setCategory_mode_options_error_, + category.pointer, mode.pointer, options, outError); } bool setCategory_mode_routeSharingPolicy_options_error_( - NSString category, - NSString mode, + objc.NSString category, + objc.NSString mode, int policy, int options, - ffi.Pointer> outError) { - return _lib._objc_msgSend_1148( - _id, - _lib._sel_setCategory_mode_routeSharingPolicy_options_error_1, - category._id, - mode._id, + ffi.Pointer> outError) { + return _objc_msgSend_754( + this.pointer, + _sel_setCategory_mode_routeSharingPolicy_options_error_, + category.pointer, + mode.pointer, policy, options, outError); } - NSString get category { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_category1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSString get category { + final _ret = _objc_msgSend_12(this.pointer, _sel_category); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } int get categoryOptions { - return _lib._objc_msgSend_1149(_id, _lib._sel_categoryOptions1); + return _objc_msgSend_755(this.pointer, _sel_categoryOptions); } int get routeSharingPolicy { - return _lib._objc_msgSend_1150(_id, _lib._sel_routeSharingPolicy1); + return _objc_msgSend_756(this.pointer, _sel_routeSharingPolicy); } - NSArray get availableModes { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_availableModes1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSArray get availableModes { + final _ret = _objc_msgSend_6(this.pointer, _sel_availableModes); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } bool setMode_error_( - NSString mode, ffi.Pointer> outError) { - return _lib._objc_msgSend_447( - _id, _lib._sel_setMode_error_1, mode._id, outError); + objc.NSString mode, ffi.Pointer> outError) { + return _objc_msgSend_285( + this.pointer, _sel_setMode_error_, mode.pointer, outError); } - NSString get mode { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_mode1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSString get mode { + final _ret = _objc_msgSend_12(this.pointer, _sel_mode); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } bool setAllowHapticsAndSystemSoundsDuringRecording_error_( - bool inValue, ffi.Pointer> outError) { - return _lib._objc_msgSend_1151( - _id, - _lib._sel_setAllowHapticsAndSystemSoundsDuringRecording_error_1, + bool inValue, ffi.Pointer> outError) { + return _objc_msgSend_757( + this.pointer, + _sel_setAllowHapticsAndSystemSoundsDuringRecording_error_, inValue, outError); } bool get allowHapticsAndSystemSoundsDuringRecording { - return _lib._objc_msgSend_12( - _id, _lib._sel_allowHapticsAndSystemSoundsDuringRecording1); + return _objc_msgSend_7( + this.pointer, _sel_allowHapticsAndSystemSoundsDuringRecording); } int get recordPermission { - return _lib._objc_msgSend_1152(_id, _lib._sel_recordPermission1); + return _objc_msgSend_758(this.pointer, _sel_recordPermission); } void requestRecordPermission_(ObjCBlock_ffiVoid_bool response) { - _lib._objc_msgSend_1153( - _id, _lib._sel_requestRecordPermission_1, response._id); + _objc_msgSend_759( + this.pointer, _sel_requestRecordPermission_, response.pointer); } bool overrideOutputAudioPort_error_( - int portOverride, ffi.Pointer> outError) { - return _lib._objc_msgSend_1154( - _id, _lib._sel_overrideOutputAudioPort_error_1, portOverride, outError); + int portOverride, ffi.Pointer> outError) { + return _objc_msgSend_760(this.pointer, _sel_overrideOutputAudioPort_error_, + portOverride, outError); } bool setPreferredInput_error_(AVAudioSessionPortDescription? inPort, - ffi.Pointer> outError) { - return _lib._objc_msgSend_1158(_id, _lib._sel_setPreferredInput_error_1, - inPort?._id ?? ffi.nullptr, outError); + ffi.Pointer> outError) { + return _objc_msgSend_764(this.pointer, _sel_setPreferredInput_error_, + inPort?.pointer ?? ffi.nullptr, outError); } AVAudioSessionPortDescription? get preferredInput { - final _ret = _lib._objc_msgSend_1159(_id, _lib._sel_preferredInput1); + final _ret = _objc_msgSend_765(this.pointer, _sel_preferredInput); return _ret.address == 0 ? null - : AVAudioSessionPortDescription._(_ret, _lib, + : AVAudioSessionPortDescription.castFromPointer(_ret, retain: true, release: true); } bool setPrefersNoInterruptionsFromSystemAlerts_error_( - bool inValue, ffi.Pointer> outError) { - return _lib._objc_msgSend_1151( - _id, - _lib._sel_setPrefersNoInterruptionsFromSystemAlerts_error_1, + bool inValue, ffi.Pointer> outError) { + return _objc_msgSend_757( + this.pointer, + _sel_setPrefersNoInterruptionsFromSystemAlerts_error_, inValue, outError); } bool get prefersNoInterruptionsFromSystemAlerts { - return _lib._objc_msgSend_12( - _id, _lib._sel_prefersNoInterruptionsFromSystemAlerts1); + return _objc_msgSend_7( + this.pointer, _sel_prefersNoInterruptionsFromSystemAlerts); } int get renderingMode { - return _lib._objc_msgSend_1160(_id, _lib._sel_renderingMode1); + return _objc_msgSend_766(this.pointer, _sel_renderingMode); } bool setActive_error_( - bool active, ffi.Pointer> outError) { - return _lib._objc_msgSend_1151( - _id, _lib._sel_setActive_error_1, active, outError); + bool active, ffi.Pointer> outError) { + return _objc_msgSend_757( + this.pointer, _sel_setActive_error_, active, outError); } - bool setActive_withOptions_error_( - bool active, int options, ffi.Pointer> outError) { - return _lib._objc_msgSend_1161(_id, _lib._sel_setActive_withOptions_error_1, + bool setActive_withOptions_error_(bool active, int options, + ffi.Pointer> outError) { + return _objc_msgSend_767(this.pointer, _sel_setActive_withOptions_error_, active, options, outError); } void activateWithOptions_completionHandler_( int options, ObjCBlock_ffiVoid_bool_NSError handler) { - _lib._objc_msgSend_1162( - _id, - _lib._sel_activateWithOptions_completionHandler_1, - options, - handler._id); + _objc_msgSend_768(this.pointer, _sel_activateWithOptions_completionHandler_, + options, handler.pointer); } bool setPreferredSampleRate_error_( - double sampleRate, ffi.Pointer> outError) { - return _lib._objc_msgSend_1163( - _id, _lib._sel_setPreferredSampleRate_error_1, sampleRate, outError); + double sampleRate, ffi.Pointer> outError) { + return _objc_msgSend_769( + this.pointer, _sel_setPreferredSampleRate_error_, sampleRate, outError); } double get preferredSampleRate { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_preferredSampleRate1) - : _lib._objc_msgSend_165(_id, _lib._sel_preferredSampleRate1); + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_preferredSampleRate) + : _objc_msgSend_115(this.pointer, _sel_preferredSampleRate); } bool setPreferredIOBufferDuration_error_( - double duration, ffi.Pointer> outError) { - return _lib._objc_msgSend_1163(_id, - _lib._sel_setPreferredIOBufferDuration_error_1, duration, outError); + double duration, ffi.Pointer> outError) { + return _objc_msgSend_769(this.pointer, + _sel_setPreferredIOBufferDuration_error_, duration, outError); } double get preferredIOBufferDuration { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret( - _id, _lib._sel_preferredIOBufferDuration1) - : _lib._objc_msgSend_165(_id, _lib._sel_preferredIOBufferDuration1); + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_preferredIOBufferDuration) + : _objc_msgSend_115(this.pointer, _sel_preferredIOBufferDuration); } bool setPreferredInputNumberOfChannels_error_( - int count, ffi.Pointer> outError) { - return _lib._objc_msgSend_1164(_id, - _lib._sel_setPreferredInputNumberOfChannels_error_1, count, outError); + int count, ffi.Pointer> outError) { + return _objc_msgSend_770(this.pointer, + _sel_setPreferredInputNumberOfChannels_error_, count, outError); } int get preferredInputNumberOfChannels { - return _lib._objc_msgSend_83( - _id, _lib._sel_preferredInputNumberOfChannels1); + return _objc_msgSend_114(this.pointer, _sel_preferredInputNumberOfChannels); } bool setPreferredOutputNumberOfChannels_error_( - int count, ffi.Pointer> outError) { - return _lib._objc_msgSend_1164(_id, - _lib._sel_setPreferredOutputNumberOfChannels_error_1, count, outError); + int count, ffi.Pointer> outError) { + return _objc_msgSend_770(this.pointer, + _sel_setPreferredOutputNumberOfChannels_error_, count, outError); } int get preferredOutputNumberOfChannels { - return _lib._objc_msgSend_83( - _id, _lib._sel_preferredOutputNumberOfChannels1); + return _objc_msgSend_114( + this.pointer, _sel_preferredOutputNumberOfChannels); } bool setPreferredInputOrientation_error_( - int orientation, ffi.Pointer> outError) { - return _lib._objc_msgSend_1165(_id, - _lib._sel_setPreferredInputOrientation_error_1, orientation, outError); + int orientation, ffi.Pointer> outError) { + return _objc_msgSend_771(this.pointer, + _sel_setPreferredInputOrientation_error_, orientation, outError); } int get preferredInputOrientation { - return _lib._objc_msgSend_1166(_id, _lib._sel_preferredInputOrientation1); + return _objc_msgSend_772(this.pointer, _sel_preferredInputOrientation); } int get inputOrientation { - return _lib._objc_msgSend_1166(_id, _lib._sel_inputOrientation1); + return _objc_msgSend_772(this.pointer, _sel_inputOrientation); } int get maximumInputNumberOfChannels { - return _lib._objc_msgSend_83(_id, _lib._sel_maximumInputNumberOfChannels1); + return _objc_msgSend_114(this.pointer, _sel_maximumInputNumberOfChannels); } int get maximumOutputNumberOfChannels { - return _lib._objc_msgSend_83(_id, _lib._sel_maximumOutputNumberOfChannels1); + return _objc_msgSend_114(this.pointer, _sel_maximumOutputNumberOfChannels); } bool setInputGain_error_( - double gain, ffi.Pointer> outError) { - return _lib._objc_msgSend_1167( - _id, _lib._sel_setInputGain_error_1, gain, outError); + double gain, ffi.Pointer> outError) { + return _objc_msgSend_773( + this.pointer, _sel_setInputGain_error_, gain, outError); } double get inputGain { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_239_fpret(_id, _lib._sel_inputGain1) - : _lib._objc_msgSend_239(_id, _lib._sel_inputGain1); + return objc.useMsgSendVariants + ? _objc_msgSend_351Fpret(this.pointer, _sel_inputGain) + : _objc_msgSend_351(this.pointer, _sel_inputGain); } bool get inputGainSettable { - return _lib._objc_msgSend_12(_id, _lib._sel_isInputGainSettable1); + return _objc_msgSend_7(this.pointer, _sel_isInputGainSettable); } bool get inputAvailable { - return _lib._objc_msgSend_12(_id, _lib._sel_isInputAvailable1); + return _objc_msgSend_7(this.pointer, _sel_isInputAvailable); } - NSArray? get inputDataSources { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_inputDataSources1); + objc.NSArray? get inputDataSources { + final _ret = _objc_msgSend_69(this.pointer, _sel_inputDataSources); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } AVAudioSessionDataSourceDescription? get inputDataSource { - final _ret = _lib._objc_msgSend_1156(_id, _lib._sel_inputDataSource1); + final _ret = _objc_msgSend_762(this.pointer, _sel_inputDataSource); return _ret.address == 0 ? null - : AVAudioSessionDataSourceDescription._(_ret, _lib, + : AVAudioSessionDataSourceDescription.castFromPointer(_ret, retain: true, release: true); } bool setInputDataSource_error_( AVAudioSessionDataSourceDescription? dataSource, - ffi.Pointer> outError) { - return _lib._objc_msgSend_1157(_id, _lib._sel_setInputDataSource_error_1, - dataSource?._id ?? ffi.nullptr, outError); + ffi.Pointer> outError) { + return _objc_msgSend_763(this.pointer, _sel_setInputDataSource_error_, + dataSource?.pointer ?? ffi.nullptr, outError); } - NSArray? get outputDataSources { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_outputDataSources1); + objc.NSArray? get outputDataSources { + final _ret = _objc_msgSend_69(this.pointer, _sel_outputDataSources); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } AVAudioSessionDataSourceDescription? get outputDataSource { - final _ret = _lib._objc_msgSend_1156(_id, _lib._sel_outputDataSource1); + final _ret = _objc_msgSend_762(this.pointer, _sel_outputDataSource); return _ret.address == 0 ? null - : AVAudioSessionDataSourceDescription._(_ret, _lib, + : AVAudioSessionDataSourceDescription.castFromPointer(_ret, retain: true, release: true); } bool setOutputDataSource_error_( AVAudioSessionDataSourceDescription? dataSource, - ffi.Pointer> outError) { - return _lib._objc_msgSend_1157(_id, _lib._sel_setOutputDataSource_error_1, - dataSource?._id ?? ffi.nullptr, outError); + ffi.Pointer> outError) { + return _objc_msgSend_763(this.pointer, _sel_setOutputDataSource_error_, + dataSource?.pointer ?? ffi.nullptr, outError); } double get sampleRate { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_sampleRate1) - : _lib._objc_msgSend_165(_id, _lib._sel_sampleRate1); + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_sampleRate) + : _objc_msgSend_115(this.pointer, _sel_sampleRate); } int get inputNumberOfChannels { - return _lib._objc_msgSend_83(_id, _lib._sel_inputNumberOfChannels1); + return _objc_msgSend_114(this.pointer, _sel_inputNumberOfChannels); } int get outputNumberOfChannels { - return _lib._objc_msgSend_83(_id, _lib._sel_outputNumberOfChannels1); + return _objc_msgSend_114(this.pointer, _sel_outputNumberOfChannels); } double get inputLatency { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_inputLatency1) - : _lib._objc_msgSend_165(_id, _lib._sel_inputLatency1); + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_inputLatency) + : _objc_msgSend_115(this.pointer, _sel_inputLatency); } double get outputLatency { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_outputLatency1) - : _lib._objc_msgSend_165(_id, _lib._sel_outputLatency1); + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_outputLatency) + : _objc_msgSend_115(this.pointer, _sel_outputLatency); } double get IOBufferDuration { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_IOBufferDuration1) - : _lib._objc_msgSend_165(_id, _lib._sel_IOBufferDuration1); + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_IOBufferDuration) + : _objc_msgSend_115(this.pointer, _sel_IOBufferDuration); } - NSArray get supportedOutputChannelLayouts { + objc.NSArray get supportedOutputChannelLayouts { final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_supportedOutputChannelLayouts1); - return NSArray._(_ret, _lib, retain: true, release: true); + _objc_msgSend_6(this.pointer, _sel_supportedOutputChannelLayouts); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } bool get otherAudioPlaying { - return _lib._objc_msgSend_12(_id, _lib._sel_isOtherAudioPlaying1); + return _objc_msgSend_7(this.pointer, _sel_isOtherAudioPlaying); } bool get secondaryAudioShouldBeSilencedHint { - return _lib._objc_msgSend_12( - _id, _lib._sel_secondaryAudioShouldBeSilencedHint1); + return _objc_msgSend_7( + this.pointer, _sel_secondaryAudioShouldBeSilencedHint); } double get outputVolume { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_239_fpret(_id, _lib._sel_outputVolume1) - : _lib._objc_msgSend_239(_id, _lib._sel_outputVolume1); + return objc.useMsgSendVariants + ? _objc_msgSend_351Fpret(this.pointer, _sel_outputVolume) + : _objc_msgSend_351(this.pointer, _sel_outputVolume); } int get promptStyle { - return _lib._objc_msgSend_1168(_id, _lib._sel_promptStyle1); + return _objc_msgSend_774(this.pointer, _sel_promptStyle); } - NSArray? get availableInputs { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_availableInputs1); + objc.NSArray? get availableInputs { + final _ret = _objc_msgSend_69(this.pointer, _sel_availableInputs); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } AVAudioSessionRouteDescription get currentRoute { - final _ret = _lib._objc_msgSend_1169(_id, _lib._sel_currentRoute1); - return AVAudioSessionRouteDescription._(_ret, _lib, + final _ret = _objc_msgSend_775(this.pointer, _sel_currentRoute); + return AVAudioSessionRouteDescription.castFromPointer(_ret, retain: true, release: true); } bool setAggregatedIOPreference_error_( - int inIOType, ffi.Pointer> outError) { - return _lib._objc_msgSend_1170( - _id, _lib._sel_setAggregatedIOPreference_error_1, inIOType, outError); + int inIOType, ffi.Pointer> outError) { + return _objc_msgSend_776(this.pointer, + _sel_setAggregatedIOPreference_error_, inIOType, outError); } bool setSupportsMultichannelContent_error_( - bool inValue, ffi.Pointer> outError) { - return _lib._objc_msgSend_1151(_id, - _lib._sel_setSupportsMultichannelContent_error_1, inValue, outError); + bool inValue, ffi.Pointer> outError) { + return _objc_msgSend_757(this.pointer, + _sel_setSupportsMultichannelContent_error_, inValue, outError); } bool get supportsMultichannelContent { - return _lib._objc_msgSend_12(_id, _lib._sel_supportsMultichannelContent1); + return _objc_msgSend_7(this.pointer, _sel_supportsMultichannelContent); } bool setPrefersInterruptionOnRouteDisconnect_error_( - bool inValue, ffi.Pointer> outError) { - return _lib._objc_msgSend_1151( - _id, - _lib._sel_setPrefersInterruptionOnRouteDisconnect_error_1, - inValue, - outError); + bool inValue, ffi.Pointer> outError) { + return _objc_msgSend_757(this.pointer, + _sel_setPrefersInterruptionOnRouteDisconnect_error_, inValue, outError); } bool get prefersInterruptionOnRouteDisconnect { - return _lib._objc_msgSend_12( - _id, _lib._sel_prefersInterruptionOnRouteDisconnect1); + return _objc_msgSend_7( + this.pointer, _sel_prefersInterruptionOnRouteDisconnect); } - NSObject? get delegate { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set delegate(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } @override AVAudioSession init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return AVAudioSession._(_ret, _lib, retain: true, release: true); + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return AVAudioSession.castFromPointer(_ret, retain: true, release: true); } - bool setActive_withFlags_error_( - bool active, int flags, ffi.Pointer> outError) { - return _lib._objc_msgSend_1171( - _id, _lib._sel_setActive_withFlags_error_1, active, flags, outError); + bool setActive_withFlags_error_(bool active, int flags, + ffi.Pointer> outError) { + return _objc_msgSend_777( + this.pointer, _sel_setActive_withFlags_error_, active, flags, outError); } bool get inputIsAvailable { - return _lib._objc_msgSend_12(_id, _lib._sel_inputIsAvailable1); + return _objc_msgSend_7(this.pointer, _sel_inputIsAvailable); } double get currentHardwareSampleRate { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret( - _id, _lib._sel_currentHardwareSampleRate1) - : _lib._objc_msgSend_165(_id, _lib._sel_currentHardwareSampleRate1); + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_currentHardwareSampleRate) + : _objc_msgSend_115(this.pointer, _sel_currentHardwareSampleRate); } int get currentHardwareInputNumberOfChannels { - return _lib._objc_msgSend_83( - _id, _lib._sel_currentHardwareInputNumberOfChannels1); + return _objc_msgSend_114( + this.pointer, _sel_currentHardwareInputNumberOfChannels); } int get currentHardwareOutputNumberOfChannels { - return _lib._objc_msgSend_83( - _id, _lib._sel_currentHardwareOutputNumberOfChannels1); + return _objc_msgSend_114( + this.pointer, _sel_currentHardwareOutputNumberOfChannels); } bool setPreferredHardwareSampleRate_error_( - double sampleRate, ffi.Pointer> outError) { - return _lib._objc_msgSend_1163(_id, - _lib._sel_setPreferredHardwareSampleRate_error_1, sampleRate, outError); + double sampleRate, ffi.Pointer> outError) { + return _objc_msgSend_769(this.pointer, + _sel_setPreferredHardwareSampleRate_error_, sampleRate, outError); } double get preferredHardwareSampleRate { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret( - _id, _lib._sel_preferredHardwareSampleRate1) - : _lib._objc_msgSend_165(_id, _lib._sel_preferredHardwareSampleRate1); + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_preferredHardwareSampleRate) + : _objc_msgSend_115(this.pointer, _sel_preferredHardwareSampleRate); } - static AVAudioSession new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_AVAudioSession1, _lib._sel_new1); - return AVAudioSession._(_ret, _lib, retain: false, release: true); + static AVAudioSession new1() { + final _ret = _objc_msgSend_40(_class_AVAudioSession, _sel_new); + return AVAudioSession.castFromPointer(_ret, retain: false, release: true); } - static AVAudioSession allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_AVAudioSession1, _lib._sel_allocWithZone_1, zone); - return AVAudioSession._(_ret, _lib, retain: false, release: true); + static AVAudioSession allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_AVAudioSession, _sel_allocWithZone_, zone); + return AVAudioSession.castFromPointer(_ret, retain: false, release: true); } - static AVAudioSession alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_AVAudioSession1, _lib._sel_alloc1); - return AVAudioSession._(_ret, _lib, retain: false, release: true); + static AVAudioSession alloc() { + final _ret = _objc_msgSend_40(_class_AVAudioSession, _sel_alloc); + return AVAudioSession.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_AVAudioSession1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_AVAudioSession, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_AVAudioSession1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_AVAudioSession, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_AVAudioSession1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_AVAudioSession, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_AVAudioSession1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_AVAudioSession, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_AVAudioSession1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_AVAudioSession, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_AVAudioSession1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_AVAudioSession, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_AVAudioSession1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_AVAudioSession, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_AVAudioSession1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_AVAudioSession, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_AVAudioSession1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_AVAudioSession, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } +late final _class_AVAudioSession = objc.getClass("AVAudioSession"); +late final _sel_sharedInstance = objc.registerName("sharedInstance"); +final _objc_msgSend_751 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_availableCategories = objc.registerName("availableCategories"); +late final _sel_setCategory_error_ = objc.registerName("setCategory:error:"); + abstract class AVAudioSessionCategoryOptions { static const int AVAudioSessionCategoryOptionMixWithOthers = 1; static const int AVAudioSessionCategoryOptionDuckOthers = 2; @@ -76268,6 +37434,45 @@ abstract class AVAudioSessionCategoryOptions { AVAudioSessionCategoryOptionOverrideMutedMicrophoneInterruption = 128; } +late final _sel_setCategory_withOptions_error_ = + objc.registerName("setCategory:withOptions:error:"); +final _objc_msgSend_752 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_setCategory_mode_options_error_ = + objc.registerName("setCategory:mode:options:error:"); +final _objc_msgSend_753 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + abstract class AVAudioSessionRouteSharingPolicy { static const int AVAudioSessionRouteSharingPolicyDefault = 0; static const int AVAudioSessionRouteSharingPolicyLongFormAudio = 1; @@ -76276,389 +37481,545 @@ abstract class AVAudioSessionRouteSharingPolicy { static const int AVAudioSessionRouteSharingPolicyLongFormVideo = 3; } +late final _sel_setCategory_mode_routeSharingPolicy_options_error_ = + objc.registerName("setCategory:mode:routeSharingPolicy:options:error:"); +final _objc_msgSend_754 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer>)>(); +late final _sel_category = objc.registerName("category"); +late final _sel_categoryOptions = objc.registerName("categoryOptions"); +final _objc_msgSend_755 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_routeSharingPolicy = objc.registerName("routeSharingPolicy"); +final _objc_msgSend_756 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_availableModes = objc.registerName("availableModes"); +late final _sel_setMode_error_ = objc.registerName("setMode:error:"); +late final _sel_mode = objc.registerName("mode"); +late final _sel_setAllowHapticsAndSystemSoundsDuringRecording_error_ = + objc.registerName("setAllowHapticsAndSystemSoundsDuringRecording:error:"); +final _objc_msgSend_757 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer>)>(); +late final _sel_allowHapticsAndSystemSoundsDuringRecording = + objc.registerName("allowHapticsAndSystemSoundsDuringRecording"); + abstract class AVAudioSessionRecordPermission { static const int AVAudioSessionRecordPermissionUndetermined = 1970168948; static const int AVAudioSessionRecordPermissionDenied = 1684369017; static const int AVAudioSessionRecordPermissionGranted = 1735552628; } +late final _sel_recordPermission = objc.registerName("recordPermission"); +final _objc_msgSend_758 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_requestRecordPermission_ = + objc.registerName("requestRecordPermission:"); +final _objc_msgSend_759 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + abstract class AVAudioSessionPortOverride { static const int AVAudioSessionPortOverrideNone = 0; static const int AVAudioSessionPortOverrideSpeaker = 1936747378; } -class AVAudioSessionPortDescription extends NSObject { - AVAudioSessionPortDescription._(ffi.Pointer id, AVFAudio lib, +late final _sel_overrideOutputAudioPort_error_ = + objc.registerName("overrideOutputAudioPort:error:"); +final _objc_msgSend_760 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + +class AVAudioSessionPortDescription extends objc.NSObject { + AVAudioSessionPortDescription._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [AVAudioSessionPortDescription] that points to the same underlying object as [other]. - static AVAudioSessionPortDescription castFrom( - T other) { - return AVAudioSessionPortDescription._(other._id, other._lib, - retain: true, release: true); - } + /// Constructs a [AVAudioSessionPortDescription] that points to the same underlying object as [other]. + AVAudioSessionPortDescription.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [AVAudioSessionPortDescription] that wraps the given raw object pointer. - static AVAudioSessionPortDescription castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return AVAudioSessionPortDescription._(other, lib, - retain: retain, release: release); - } + /// Constructs a [AVAudioSessionPortDescription] that wraps the given raw object pointer. + AVAudioSessionPortDescription.castFromPointer( + ffi.Pointer other, + {bool retain = false, + bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [AVAudioSessionPortDescription]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_AVAudioSessionPortDescription1); + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_AVAudioSessionPortDescription); } - NSString get portType { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_portType1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSString get portType { + final _ret = _objc_msgSend_12(this.pointer, _sel_portType); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString get portName { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_portName1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSString get portName { + final _ret = _objc_msgSend_12(this.pointer, _sel_portName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString get UID { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_UID1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSString get UID { + final _ret = _objc_msgSend_12(this.pointer, _sel_UID); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } bool get hasHardwareVoiceCallProcessing { - return _lib._objc_msgSend_12( - _id, _lib._sel_hasHardwareVoiceCallProcessing1); + return _objc_msgSend_7(this.pointer, _sel_hasHardwareVoiceCallProcessing); } bool get spatialAudioEnabled { - return _lib._objc_msgSend_12(_id, _lib._sel_isSpatialAudioEnabled1); + return _objc_msgSend_7(this.pointer, _sel_isSpatialAudioEnabled); } - NSArray? get channels { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_channels1); + objc.NSArray? get channels { + final _ret = _objc_msgSend_69(this.pointer, _sel_channels); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSArray? get dataSources { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_dataSources1); + objc.NSArray? get dataSources { + final _ret = _objc_msgSend_69(this.pointer, _sel_dataSources); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } AVAudioSessionDataSourceDescription? get selectedDataSource { - final _ret = _lib._objc_msgSend_1156(_id, _lib._sel_selectedDataSource1); + final _ret = _objc_msgSend_762(this.pointer, _sel_selectedDataSource); return _ret.address == 0 ? null - : AVAudioSessionDataSourceDescription._(_ret, _lib, + : AVAudioSessionDataSourceDescription.castFromPointer(_ret, retain: true, release: true); } AVAudioSessionDataSourceDescription? get preferredDataSource { - final _ret = _lib._objc_msgSend_1156(_id, _lib._sel_preferredDataSource1); + final _ret = _objc_msgSend_762(this.pointer, _sel_preferredDataSource); return _ret.address == 0 ? null - : AVAudioSessionDataSourceDescription._(_ret, _lib, + : AVAudioSessionDataSourceDescription.castFromPointer(_ret, retain: true, release: true); } bool setPreferredDataSource_error_( AVAudioSessionDataSourceDescription? dataSource, - ffi.Pointer> outError) { - return _lib._objc_msgSend_1157( - _id, - _lib._sel_setPreferredDataSource_error_1, - dataSource?._id ?? ffi.nullptr, - outError); + ffi.Pointer> outError) { + return _objc_msgSend_763(this.pointer, _sel_setPreferredDataSource_error_, + dataSource?.pointer ?? ffi.nullptr, outError); } @override AVAudioSessionPortDescription init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return AVAudioSessionPortDescription._(_ret, _lib, + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return AVAudioSessionPortDescription.castFromPointer(_ret, retain: true, release: true); } - static AVAudioSessionPortDescription new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_AVAudioSessionPortDescription1, _lib._sel_new1); - return AVAudioSessionPortDescription._(_ret, _lib, + static AVAudioSessionPortDescription new1() { + final _ret = + _objc_msgSend_40(_class_AVAudioSessionPortDescription, _sel_new); + return AVAudioSessionPortDescription.castFromPointer(_ret, retain: false, release: true); } static AVAudioSessionPortDescription allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_AVAudioSessionPortDescription1, - _lib._sel_allocWithZone_1, - zone); - return AVAudioSessionPortDescription._(_ret, _lib, + ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_AVAudioSessionPortDescription, _sel_allocWithZone_, zone); + return AVAudioSessionPortDescription.castFromPointer(_ret, retain: false, release: true); } - static AVAudioSessionPortDescription alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_AVAudioSessionPortDescription1, _lib._sel_alloc1); - return AVAudioSessionPortDescription._(_ret, _lib, + static AVAudioSessionPortDescription alloc() { + final _ret = + _objc_msgSend_40(_class_AVAudioSessionPortDescription, _sel_alloc); + return AVAudioSessionPortDescription.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_AVAudioSessionPortDescription1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_AVAudioSessionPortDescription, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_AVAudioSessionPortDescription1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_AVAudioSessionPortDescription, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_AVAudioSessionPortDescription1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7(_class_AVAudioSessionPortDescription, + _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_AVAudioSessionPortDescription1, - _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_AVAudioSessionPortDescription, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63( - _lib._class_AVAudioSessionPortDescription1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, - key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_AVAudioSessionPortDescription, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_AVAudioSessionPortDescription1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_AVAudioSessionPortDescription, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_AVAudioSessionPortDescription1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_AVAudioSessionPortDescription, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_AVAudioSessionPortDescription1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6(_class_AVAudioSessionPortDescription, + _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_AVAudioSessionPortDescription1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_AVAudioSessionPortDescription, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -class AVAudioSessionDataSourceDescription extends NSObject { - AVAudioSessionDataSourceDescription._( - ffi.Pointer id, AVFAudio lib, +late final _class_AVAudioSessionPortDescription = + objc.getClass("AVAudioSessionPortDescription"); +late final _sel_portType = objc.registerName("portType"); +late final _sel_portName = objc.registerName("portName"); +late final _sel_UID = objc.registerName("UID"); +late final _sel_hasHardwareVoiceCallProcessing = + objc.registerName("hasHardwareVoiceCallProcessing"); +late final _sel_isSpatialAudioEnabled = + objc.registerName("isSpatialAudioEnabled"); +late final _sel_channels = objc.registerName("channels"); +late final _sel_dataSources = objc.registerName("dataSources"); + +class AVAudioSessionDataSourceDescription extends objc.NSObject { + AVAudioSessionDataSourceDescription._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [AVAudioSessionDataSourceDescription] that points to the same underlying object as [other]. - static AVAudioSessionDataSourceDescription castFrom( - T other) { - return AVAudioSessionDataSourceDescription._(other._id, other._lib, - retain: true, release: true); - } + /// Constructs a [AVAudioSessionDataSourceDescription] that points to the same underlying object as [other]. + AVAudioSessionDataSourceDescription.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [AVAudioSessionDataSourceDescription] that wraps the given raw object pointer. - static AVAudioSessionDataSourceDescription castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return AVAudioSessionDataSourceDescription._(other, lib, - retain: retain, release: release); - } + /// Constructs a [AVAudioSessionDataSourceDescription] that wraps the given raw object pointer. + AVAudioSessionDataSourceDescription.castFromPointer( + ffi.Pointer other, + {bool retain = false, + bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [AVAudioSessionDataSourceDescription]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_AVAudioSessionDataSourceDescription1); + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, + _class_AVAudioSessionDataSourceDescription); } - NSNumber get dataSourceID { - final _ret = _lib._objc_msgSend_814(_id, _lib._sel_dataSourceID1); - return NSNumber._(_ret, _lib, retain: true, release: true); + objc.NSNumber get dataSourceID { + final _ret = _objc_msgSend_180(this.pointer, _sel_dataSourceID); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } - NSString get dataSourceName { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_dataSourceName1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSString get dataSourceName { + final _ret = _objc_msgSend_12(this.pointer, _sel_dataSourceName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get location { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_location1); + objc.NSString? get location { + final _ret = _objc_msgSend_13(this.pointer, _sel_location); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get orientation { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_orientation1); + objc.NSString? get orientation { + final _ret = _objc_msgSend_13(this.pointer, _sel_orientation); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSArray? get supportedPolarPatterns { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_supportedPolarPatterns1); + objc.NSArray? get supportedPolarPatterns { + final _ret = _objc_msgSend_69(this.pointer, _sel_supportedPolarPatterns); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString? get selectedPolarPattern { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_selectedPolarPattern1); + objc.NSString? get selectedPolarPattern { + final _ret = _objc_msgSend_13(this.pointer, _sel_selectedPolarPattern); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get preferredPolarPattern { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_preferredPolarPattern1); + objc.NSString? get preferredPolarPattern { + final _ret = _objc_msgSend_13(this.pointer, _sel_preferredPolarPattern); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool setPreferredPolarPattern_error_( - NSString? pattern, ffi.Pointer> outError) { - return _lib._objc_msgSend_1155( - _id, - _lib._sel_setPreferredPolarPattern_error_1, - pattern?._id ?? ffi.nullptr, - outError); + bool setPreferredPolarPattern_error_(objc.NSString? pattern, + ffi.Pointer> outError) { + return _objc_msgSend_761(this.pointer, _sel_setPreferredPolarPattern_error_, + pattern?.pointer ?? ffi.nullptr, outError); } @override AVAudioSessionDataSourceDescription init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return AVAudioSessionDataSourceDescription._(_ret, _lib, + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return AVAudioSessionDataSourceDescription.castFromPointer(_ret, retain: true, release: true); } - static AVAudioSessionDataSourceDescription new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_AVAudioSessionDataSourceDescription1, _lib._sel_new1); - return AVAudioSessionDataSourceDescription._(_ret, _lib, + static AVAudioSessionDataSourceDescription new1() { + final _ret = + _objc_msgSend_40(_class_AVAudioSessionDataSourceDescription, _sel_new); + return AVAudioSessionDataSourceDescription.castFromPointer(_ret, retain: false, release: true); } static AVAudioSessionDataSourceDescription allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_AVAudioSessionDataSourceDescription1, - _lib._sel_allocWithZone_1, - zone); - return AVAudioSessionDataSourceDescription._(_ret, _lib, + ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_AVAudioSessionDataSourceDescription, _sel_allocWithZone_, zone); + return AVAudioSessionDataSourceDescription.castFromPointer(_ret, retain: false, release: true); } - static AVAudioSessionDataSourceDescription alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_AVAudioSessionDataSourceDescription1, _lib._sel_alloc1); - return AVAudioSessionDataSourceDescription._(_ret, _lib, + static AVAudioSessionDataSourceDescription alloc() { + final _ret = _objc_msgSend_40( + _class_AVAudioSessionDataSourceDescription, _sel_alloc); + return AVAudioSessionDataSourceDescription.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_AVAudioSessionDataSourceDescription1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_AVAudioSessionDataSourceDescription, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_AVAudioSessionDataSourceDescription1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_AVAudioSessionDataSourceDescription, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_AVAudioSessionDataSourceDescription1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7(_class_AVAudioSessionDataSourceDescription, + _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_AVAudioSessionDataSourceDescription1, - _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_AVAudioSessionDataSourceDescription, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63( - _lib._class_AVAudioSessionDataSourceDescription1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, - key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_AVAudioSessionDataSourceDescription, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64( - _lib._class_AVAudioSessionDataSourceDescription1, - _lib._sel_automaticallyNotifiesObserversForKey_1, - key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_AVAudioSessionDataSourceDescription, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_AVAudioSessionDataSourceDescription1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_AVAudioSessionDataSourceDescription1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_AVAudioSessionDataSourceDescription1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_AVAudioSessionDataSourceDescription, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6(_class_AVAudioSessionDataSourceDescription, + _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40(_class_AVAudioSessionDataSourceDescription, + _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_AVAudioSessionDataSourceDescription = + objc.getClass("AVAudioSessionDataSourceDescription"); +late final _sel_dataSourceID = objc.registerName("dataSourceID"); +late final _sel_dataSourceName = objc.registerName("dataSourceName"); +late final _sel_location = objc.registerName("location"); +late final _sel_orientation = objc.registerName("orientation"); +late final _sel_supportedPolarPatterns = + objc.registerName("supportedPolarPatterns"); +late final _sel_selectedPolarPattern = + objc.registerName("selectedPolarPattern"); +late final _sel_preferredPolarPattern = + objc.registerName("preferredPolarPattern"); +late final _sel_setPreferredPolarPattern_error_ = + objc.registerName("setPreferredPolarPattern:error:"); +final _objc_msgSend_761 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_selectedDataSource = objc.registerName("selectedDataSource"); +final _objc_msgSend_762 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_preferredDataSource = objc.registerName("preferredDataSource"); +late final _sel_setPreferredDataSource_error_ = + objc.registerName("setPreferredDataSource:error:"); +final _objc_msgSend_763 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_setPreferredInput_error_ = + objc.registerName("setPreferredInput:error:"); +final _objc_msgSend_764 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_preferredInput = objc.registerName("preferredInput"); +final _objc_msgSend_765 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setPrefersNoInterruptionsFromSystemAlerts_error_ = + objc.registerName("setPrefersNoInterruptionsFromSystemAlerts:error:"); +late final _sel_prefersNoInterruptionsFromSystemAlerts = + objc.registerName("prefersNoInterruptionsFromSystemAlerts"); abstract class AVAudioSessionRenderingMode { static const int AVAudioSessionRenderingModeNotApplicable = 0; @@ -76669,51 +38030,83 @@ abstract class AVAudioSessionRenderingMode { static const int AVAudioSessionRenderingModeDolbyAtmos = 5; } +late final _sel_renderingMode = objc.registerName("renderingMode"); +final _objc_msgSend_766 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setActive_error_ = objc.registerName("setActive:error:"); + abstract class AVAudioSessionSetActiveOptions { static const int AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation = 1; } +late final _sel_setActive_withOptions_error_ = + objc.registerName("setActive:withOptions:error:"); +final _objc_msgSend_767 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + bool, + int, + ffi.Pointer>)>(); + abstract class AVAudioSessionActivationOptions { static const int AVAudioSessionActivationOptionNone = 0; } void _ObjCBlock_ffiVoid_bool_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer block, bool arg0, - ffi.Pointer arg1) => + ffi.Pointer arg1) => block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Bool arg0, ffi.Pointer arg1)>>() - .asFunction)>()(arg0, arg1); + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Bool arg0, ffi.Pointer arg1)>>() + .asFunction)>()( + arg0, arg1); final _ObjCBlock_ffiVoid_bool_NSError_closureRegistry = - )>{}; + )>{}; int _ObjCBlock_ffiVoid_bool_NSError_closureRegistryIndex = 0; ffi.Pointer _ObjCBlock_ffiVoid_bool_NSError_registerClosure( - void Function(bool, ffi.Pointer) fn) { + void Function(bool, ffi.Pointer) fn) { final id = ++_ObjCBlock_ffiVoid_bool_NSError_closureRegistryIndex; _ObjCBlock_ffiVoid_bool_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } void _ObjCBlock_ffiVoid_bool_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer block, bool arg0, - ffi.Pointer arg1) => + ffi.Pointer arg1) => _ObjCBlock_ffiVoid_bool_NSError_closureRegistry[block.ref.target.address]!( arg0, arg1); -class ObjCBlock_ffiVoid_bool_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_bool_NSError._(ffi.Pointer<_ObjCBlock> id, AVFAudio lib, +class ObjCBlock_ffiVoid_bool_NSError extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_bool_NSError._(ffi.Pointer pointer, {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. static ObjCBlock_ffiVoid_bool_NSError castFromPointer( - AVFAudio lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_bool_NSError._(pointer, lib, + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_bool_NSError._(pointer, retain: retain, release: release); } @@ -76723,21 +38116,18 @@ class ObjCBlock_ffiVoid_bool_NSError extends _ObjCBlockBase { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. ObjCBlock_ffiVoid_bool_NSError.fromFunctionPointer( - AVFAudio lib, ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - ffi.Bool arg0, ffi.Pointer arg1)>> + ffi.Bool arg0, ffi.Pointer arg1)>> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_bool_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_bool_NSError_fnPtrTrampoline) + .cast(), + ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. @@ -76746,18 +38136,16 @@ class ObjCBlock_ffiVoid_bool_NSError extends _ObjCBlockBase { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. ObjCBlock_ffiVoid_bool_NSError.fromFunction( - AVFAudio lib, void Function(bool, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_bool_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_bool_NSError_registerClosure( - (bool arg0, ffi.Pointer arg1) => fn(arg0, - arg1.address == 0 ? null : NSError._(arg1, lib, retain: true, release: true)))), - lib); + void Function(bool, objc.NSError?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_bool_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_bool_NSError_registerClosure( + (bool arg0, ffi.Pointer arg1) => fn(arg0, + arg1.address == 0 ? null : objc.NSError.castFromPointer(arg1, retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -76769,35 +38157,92 @@ class ObjCBlock_ffiVoid_bool_NSError extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_bool_NSError.listener( - AVFAudio lib, void Function(bool, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Bool, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_bool_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_bool_NSError_registerClosure( - (bool arg0, ffi.Pointer arg1) => fn(arg0, - arg1.address == 0 ? null : NSError._(arg1, lib, retain: true, release: true)))), - lib); + ObjCBlock_ffiVoid_bool_NSError.listener(void Function(bool, objc.NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, ffi.Bool, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_bool_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_bool_NSError_registerClosure( + (bool arg0, ffi.Pointer arg1) => fn(arg0, + arg1.address == 0 ? null : objc.NSError.castFromPointer(arg1, retain: true, release: true))))); static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Bool, ffi.Pointer)>? - _dartFuncListenerTrampoline; + ffi.Void Function(ffi.Pointer, ffi.Bool, + ffi.Pointer)>? _dartFuncListenerTrampoline; - void call(bool arg0, NSError? arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, ffi.Bool arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, bool, - ffi.Pointer)>()(_id, arg0, arg1?._id ?? ffi.nullptr); -} + void call(bool arg0, objc.NSError? arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Bool arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, bool, + ffi.Pointer)>()( + pointer, arg0, arg1?.pointer ?? ffi.nullptr); +} + +late final _sel_activateWithOptions_completionHandler_ = + objc.registerName("activateWithOptions:completionHandler:"); +final _objc_msgSend_768 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_setPreferredSampleRate_error_ = + objc.registerName("setPreferredSampleRate:error:"); +final _objc_msgSend_769 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer>)>(); +late final _sel_preferredSampleRate = objc.registerName("preferredSampleRate"); +late final _sel_setPreferredIOBufferDuration_error_ = + objc.registerName("setPreferredIOBufferDuration:error:"); +late final _sel_preferredIOBufferDuration = + objc.registerName("preferredIOBufferDuration"); +late final _sel_setPreferredInputNumberOfChannels_error_ = + objc.registerName("setPreferredInputNumberOfChannels:error:"); +final _objc_msgSend_770 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_preferredInputNumberOfChannels = + objc.registerName("preferredInputNumberOfChannels"); +late final _sel_setPreferredOutputNumberOfChannels_error_ = + objc.registerName("setPreferredOutputNumberOfChannels:error:"); +late final _sel_preferredOutputNumberOfChannels = + objc.registerName("preferredOutputNumberOfChannels"); abstract class AVAudioStereoOrientation { static const int AVAudioStereoOrientationNone = 0; @@ -76807,576 +38252,796 @@ abstract class AVAudioStereoOrientation { static const int AVAudioStereoOrientationLandscapeLeft = 4; } +late final _sel_setPreferredInputOrientation_error_ = + objc.registerName("setPreferredInputOrientation:error:"); +final _objc_msgSend_771 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_preferredInputOrientation = + objc.registerName("preferredInputOrientation"); +final _objc_msgSend_772 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_inputOrientation = objc.registerName("inputOrientation"); +late final _sel_maximumInputNumberOfChannels = + objc.registerName("maximumInputNumberOfChannels"); +late final _sel_maximumOutputNumberOfChannels = + objc.registerName("maximumOutputNumberOfChannels"); +late final _sel_setInputGain_error_ = objc.registerName("setInputGain:error:"); +final _objc_msgSend_773 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Float, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer>)>(); +late final _sel_inputGain = objc.registerName("inputGain"); +late final _sel_isInputGainSettable = objc.registerName("isInputGainSettable"); +late final _sel_isInputAvailable = objc.registerName("isInputAvailable"); +late final _sel_inputDataSources = objc.registerName("inputDataSources"); +late final _sel_inputDataSource = objc.registerName("inputDataSource"); +late final _sel_setInputDataSource_error_ = + objc.registerName("setInputDataSource:error:"); +late final _sel_outputDataSources = objc.registerName("outputDataSources"); +late final _sel_outputDataSource = objc.registerName("outputDataSource"); +late final _sel_setOutputDataSource_error_ = + objc.registerName("setOutputDataSource:error:"); +late final _sel_sampleRate = objc.registerName("sampleRate"); +late final _sel_inputNumberOfChannels = + objc.registerName("inputNumberOfChannels"); +late final _sel_outputNumberOfChannels = + objc.registerName("outputNumberOfChannels"); +late final _sel_inputLatency = objc.registerName("inputLatency"); +late final _sel_outputLatency = objc.registerName("outputLatency"); +late final _sel_IOBufferDuration = objc.registerName("IOBufferDuration"); +late final _sel_supportedOutputChannelLayouts = + objc.registerName("supportedOutputChannelLayouts"); +late final _sel_isOtherAudioPlaying = objc.registerName("isOtherAudioPlaying"); +late final _sel_secondaryAudioShouldBeSilencedHint = + objc.registerName("secondaryAudioShouldBeSilencedHint"); +late final _sel_outputVolume = objc.registerName("outputVolume"); + abstract class AVAudioSessionPromptStyle { static const int AVAudioSessionPromptStyleNone = 1852796517; static const int AVAudioSessionPromptStyleShort = 1936224884; static const int AVAudioSessionPromptStyleNormal = 1852992876; } -class AVAudioSessionRouteDescription extends NSObject { - AVAudioSessionRouteDescription._(ffi.Pointer id, AVFAudio lib, +late final _sel_promptStyle = objc.registerName("promptStyle"); +final _objc_msgSend_774 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_availableInputs = objc.registerName("availableInputs"); + +class AVAudioSessionRouteDescription extends objc.NSObject { + AVAudioSessionRouteDescription._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [AVAudioSessionRouteDescription] that points to the same underlying object as [other]. - static AVAudioSessionRouteDescription castFrom( - T other) { - return AVAudioSessionRouteDescription._(other._id, other._lib, - retain: true, release: true); - } + /// Constructs a [AVAudioSessionRouteDescription] that points to the same underlying object as [other]. + AVAudioSessionRouteDescription.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [AVAudioSessionRouteDescription] that wraps the given raw object pointer. - static AVAudioSessionRouteDescription castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return AVAudioSessionRouteDescription._(other, lib, - retain: retain, release: release); - } + /// Constructs a [AVAudioSessionRouteDescription] that wraps the given raw object pointer. + AVAudioSessionRouteDescription.castFromPointer( + ffi.Pointer other, + {bool retain = false, + bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [AVAudioSessionRouteDescription]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_AVAudioSessionRouteDescription1); + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, + _class_AVAudioSessionRouteDescription); } - NSArray get inputs { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_inputs1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSArray get inputs { + final _ret = _objc_msgSend_6(this.pointer, _sel_inputs); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSArray get outputs { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_outputs1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSArray get outputs { + final _ret = _objc_msgSend_6(this.pointer, _sel_outputs); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } @override AVAudioSessionRouteDescription init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return AVAudioSessionRouteDescription._(_ret, _lib, + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return AVAudioSessionRouteDescription.castFromPointer(_ret, retain: true, release: true); } - static AVAudioSessionRouteDescription new1(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_AVAudioSessionRouteDescription1, _lib._sel_new1); - return AVAudioSessionRouteDescription._(_ret, _lib, + static AVAudioSessionRouteDescription new1() { + final _ret = + _objc_msgSend_40(_class_AVAudioSessionRouteDescription, _sel_new); + return AVAudioSessionRouteDescription.castFromPointer(_ret, retain: false, release: true); } static AVAudioSessionRouteDescription allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_AVAudioSessionRouteDescription1, - _lib._sel_allocWithZone_1, - zone); - return AVAudioSessionRouteDescription._(_ret, _lib, + ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_AVAudioSessionRouteDescription, _sel_allocWithZone_, zone); + return AVAudioSessionRouteDescription.castFromPointer(_ret, retain: false, release: true); } - static AVAudioSessionRouteDescription alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_AVAudioSessionRouteDescription1, _lib._sel_alloc1); - return AVAudioSessionRouteDescription._(_ret, _lib, + static AVAudioSessionRouteDescription alloc() { + final _ret = + _objc_msgSend_40(_class_AVAudioSessionRouteDescription, _sel_alloc); + return AVAudioSessionRouteDescription.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_AVAudioSessionRouteDescription1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_AVAudioSessionRouteDescription, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_AVAudioSessionRouteDescription1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_AVAudioSessionRouteDescription, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_AVAudioSessionRouteDescription1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7(_class_AVAudioSessionRouteDescription, + _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_AVAudioSessionRouteDescription1, - _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_AVAudioSessionRouteDescription, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63( - _lib._class_AVAudioSessionRouteDescription1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, - key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_AVAudioSessionRouteDescription, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_AVAudioSessionRouteDescription1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_AVAudioSessionRouteDescription, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_AVAudioSessionRouteDescription1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_AVAudioSessionRouteDescription, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_AVAudioSessionRouteDescription1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6(_class_AVAudioSessionRouteDescription, + _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_AVAudioSessionRouteDescription1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_AVAudioSessionRouteDescription, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } +late final _class_AVAudioSessionRouteDescription = + objc.getClass("AVAudioSessionRouteDescription"); +late final _sel_inputs = objc.registerName("inputs"); +late final _sel_outputs = objc.registerName("outputs"); +late final _sel_currentRoute = objc.registerName("currentRoute"); +final _objc_msgSend_775 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + abstract class AVAudioSessionIOType { static const int AVAudioSessionIOTypeNotSpecified = 0; static const int AVAudioSessionIOTypeAggregated = 1; } -class AVAudioPlayer extends NSObject { - AVAudioPlayer._(ffi.Pointer id, AVFAudio lib, +late final _sel_setAggregatedIOPreference_error_ = + objc.registerName("setAggregatedIOPreference:error:"); +final _objc_msgSend_776 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_setSupportsMultichannelContent_error_ = + objc.registerName("setSupportsMultichannelContent:error:"); +late final _sel_supportsMultichannelContent = + objc.registerName("supportsMultichannelContent"); +late final _sel_setPrefersInterruptionOnRouteDisconnect_error_ = + objc.registerName("setPrefersInterruptionOnRouteDisconnect:error:"); +late final _sel_prefersInterruptionOnRouteDisconnect = + objc.registerName("prefersInterruptionOnRouteDisconnect"); +late final _sel_setActive_withFlags_error_ = + objc.registerName("setActive:withFlags:error:"); +final _objc_msgSend_777 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Long, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + bool, + int, + ffi.Pointer>)>(); +late final _sel_inputIsAvailable = objc.registerName("inputIsAvailable"); +late final _sel_currentHardwareSampleRate = + objc.registerName("currentHardwareSampleRate"); +late final _sel_currentHardwareInputNumberOfChannels = + objc.registerName("currentHardwareInputNumberOfChannels"); +late final _sel_currentHardwareOutputNumberOfChannels = + objc.registerName("currentHardwareOutputNumberOfChannels"); +late final _sel_setPreferredHardwareSampleRate_error_ = + objc.registerName("setPreferredHardwareSampleRate:error:"); +late final _sel_preferredHardwareSampleRate = + objc.registerName("preferredHardwareSampleRate"); + +class AVAudioPlayer extends objc.NSObject { + AVAudioPlayer._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [AVAudioPlayer] that points to the same underlying object as [other]. - static AVAudioPlayer castFrom(T other) { - return AVAudioPlayer._(other._id, other._lib, retain: true, release: true); - } + /// Constructs a [AVAudioPlayer] that points to the same underlying object as [other]. + AVAudioPlayer.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [AVAudioPlayer] that wraps the given raw object pointer. - static AVAudioPlayer castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return AVAudioPlayer._(other, lib, retain: retain, release: release); - } + /// Constructs a [AVAudioPlayer] that wraps the given raw object pointer. + AVAudioPlayer.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [AVAudioPlayer]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_AVAudioPlayer1); + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_AVAudioPlayer); } AVAudioPlayer? initWithContentsOfURL_error_( - NSURL url, ffi.Pointer> outError) { - final _ret = _lib._objc_msgSend_842( - _id, _lib._sel_initWithContentsOfURL_error_1, url._id, outError); + objc.NSURL url, ffi.Pointer> outError) { + final _ret = _objc_msgSend_259( + this.pointer, _sel_initWithContentsOfURL_error_, url.pointer, outError); return _ret.address == 0 ? null - : AVAudioPlayer._(_ret, _lib, retain: true, release: true); + : AVAudioPlayer.castFromPointer(_ret, retain: true, release: true); } AVAudioPlayer? initWithData_error_( - NSData data, ffi.Pointer> outError) { - final _ret = _lib._objc_msgSend_1172( - _id, _lib._sel_initWithData_error_1, data._id, outError); + objc.NSData data, ffi.Pointer> outError) { + final _ret = _objc_msgSend_778( + this.pointer, _sel_initWithData_error_, data.pointer, outError); return _ret.address == 0 ? null - : AVAudioPlayer._(_ret, _lib, retain: true, release: true); + : AVAudioPlayer.castFromPointer(_ret, retain: true, release: true); } - AVAudioPlayer? initWithContentsOfURL_fileTypeHint_error_(NSURL url, - NSString? utiString, ffi.Pointer> outError) { - final _ret = _lib._objc_msgSend_1173( - _id, - _lib._sel_initWithContentsOfURL_fileTypeHint_error_1, - url._id, - utiString?._id ?? ffi.nullptr, + AVAudioPlayer? initWithContentsOfURL_fileTypeHint_error_( + objc.NSURL url, + objc.NSString? utiString, + ffi.Pointer> outError) { + final _ret = _objc_msgSend_779( + this.pointer, + _sel_initWithContentsOfURL_fileTypeHint_error_, + url.pointer, + utiString?.pointer ?? ffi.nullptr, outError); return _ret.address == 0 ? null - : AVAudioPlayer._(_ret, _lib, retain: true, release: true); + : AVAudioPlayer.castFromPointer(_ret, retain: true, release: true); } - AVAudioPlayer? initWithData_fileTypeHint_error_(NSData data, - NSString? utiString, ffi.Pointer> outError) { - final _ret = _lib._objc_msgSend_1174( - _id, - _lib._sel_initWithData_fileTypeHint_error_1, - data._id, - utiString?._id ?? ffi.nullptr, + AVAudioPlayer? initWithData_fileTypeHint_error_( + objc.NSData data, + objc.NSString? utiString, + ffi.Pointer> outError) { + final _ret = _objc_msgSend_780( + this.pointer, + _sel_initWithData_fileTypeHint_error_, + data.pointer, + utiString?.pointer ?? ffi.nullptr, outError); return _ret.address == 0 ? null - : AVAudioPlayer._(_ret, _lib, retain: true, release: true); + : AVAudioPlayer.castFromPointer(_ret, retain: true, release: true); } bool prepareToPlay() { - return _lib._objc_msgSend_12(_id, _lib._sel_prepareToPlay1); + return _objc_msgSend_7(this.pointer, _sel_prepareToPlay); } bool play() { - return _lib._objc_msgSend_12(_id, _lib._sel_play1); + return _objc_msgSend_7(this.pointer, _sel_play); } bool playAtTime_(double time) { - return _lib._objc_msgSend_1175(_id, _lib._sel_playAtTime_1, time); + return _objc_msgSend_781(this.pointer, _sel_playAtTime_, time); } void pause() { - _lib._objc_msgSend_1(_id, _lib._sel_pause1); + _objc_msgSend_82(this.pointer, _sel_pause); } void stop() { - _lib._objc_msgSend_1(_id, _lib._sel_stop1); + _objc_msgSend_82(this.pointer, _sel_stop); } bool get playing { - return _lib._objc_msgSend_12(_id, _lib._sel_isPlaying1); + return _objc_msgSend_7(this.pointer, _sel_isPlaying); } int get numberOfChannels { - return _lib._objc_msgSend_10(_id, _lib._sel_numberOfChannels1); + return _objc_msgSend_29(this.pointer, _sel_numberOfChannels); } double get duration { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_duration1) - : _lib._objc_msgSend_165(_id, _lib._sel_duration1); + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_duration) + : _objc_msgSend_115(this.pointer, _sel_duration); } - NSString? get currentDevice { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_currentDevice1); + objc.NSString? get currentDevice { + final _ret = _objc_msgSend_13(this.pointer, _sel_currentDevice); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set currentDevice(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setCurrentDevice_1, value?._id ?? ffi.nullptr); + set currentDevice(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setCurrentDevice_, value?.pointer ?? ffi.nullptr); } - NSObject? get delegate { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set delegate(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } - NSURL? get url { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_url1); + objc.NSURL? get url { + final _ret = _objc_msgSend_10(this.pointer, _sel_url); return _ret.address == 0 ? null - : NSURL._(_ret, _lib, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSData? get data { - final _ret = _lib._objc_msgSend_286(_id, _lib._sel_data1); + objc.NSData? get data { + final _ret = _objc_msgSend_325(this.pointer, _sel_data); return _ret.address == 0 ? null - : NSData._(_ret, _lib, retain: true, release: true); + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } double get pan { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_239_fpret(_id, _lib._sel_pan1) - : _lib._objc_msgSend_239(_id, _lib._sel_pan1); + return objc.useMsgSendVariants + ? _objc_msgSend_351Fpret(this.pointer, _sel_pan) + : _objc_msgSend_351(this.pointer, _sel_pan); } set pan(double value) { - return _lib._objc_msgSend_881(_id, _lib._sel_setPan_1, value); + return _objc_msgSend_352(this.pointer, _sel_setPan_, value); } double get volume { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_239_fpret(_id, _lib._sel_volume1) - : _lib._objc_msgSend_239(_id, _lib._sel_volume1); + return objc.useMsgSendVariants + ? _objc_msgSend_351Fpret(this.pointer, _sel_volume) + : _objc_msgSend_351(this.pointer, _sel_volume); } set volume(double value) { - return _lib._objc_msgSend_881(_id, _lib._sel_setVolume_1, value); + return _objc_msgSend_352(this.pointer, _sel_setVolume_, value); } void setVolume_fadeDuration_(double volume, double duration) { - _lib._objc_msgSend_1176( - _id, _lib._sel_setVolume_fadeDuration_1, volume, duration); + _objc_msgSend_782( + this.pointer, _sel_setVolume_fadeDuration_, volume, duration); } bool get enableRate { - return _lib._objc_msgSend_12(_id, _lib._sel_enableRate1); + return _objc_msgSend_7(this.pointer, _sel_enableRate); } set enableRate(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setEnableRate_1, value); + return _objc_msgSend_41(this.pointer, _sel_setEnableRate_, value); } double get rate { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_239_fpret(_id, _lib._sel_rate1) - : _lib._objc_msgSend_239(_id, _lib._sel_rate1); + return objc.useMsgSendVariants + ? _objc_msgSend_351Fpret(this.pointer, _sel_rate) + : _objc_msgSend_351(this.pointer, _sel_rate); } set rate(double value) { - return _lib._objc_msgSend_881(_id, _lib._sel_setRate_1, value); + return _objc_msgSend_352(this.pointer, _sel_setRate_, value); } double get currentTime { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_currentTime1) - : _lib._objc_msgSend_165(_id, _lib._sel_currentTime1); + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_currentTime) + : _objc_msgSend_115(this.pointer, _sel_currentTime); } set currentTime(double value) { - return _lib._objc_msgSend_542(_id, _lib._sel_setCurrentTime_1, value); + return _objc_msgSend_212(this.pointer, _sel_setCurrentTime_, value); } double get deviceCurrentTime { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_deviceCurrentTime1) - : _lib._objc_msgSend_165(_id, _lib._sel_deviceCurrentTime1); + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_deviceCurrentTime) + : _objc_msgSend_115(this.pointer, _sel_deviceCurrentTime); } int get numberOfLoops { - return _lib._objc_msgSend_83(_id, _lib._sel_numberOfLoops1); + return _objc_msgSend_114(this.pointer, _sel_numberOfLoops); } set numberOfLoops(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setNumberOfLoops_1, value); + return _objc_msgSend_134(this.pointer, _sel_setNumberOfLoops_, value); } - NSDictionary get settings { - final _ret = _lib._objc_msgSend_181(_id, _lib._sel_settings1); - return NSDictionary._(_ret, _lib, retain: true, release: true); + objc.NSDictionary get settings { + final _ret = _objc_msgSend_112(this.pointer, _sel_settings); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } AVAudioFormat get format { - final _ret = _lib._objc_msgSend_1193(_id, _lib._sel_format1); - return AVAudioFormat._(_ret, _lib, retain: true, release: true); + final _ret = _objc_msgSend_799(this.pointer, _sel_format); + return AVAudioFormat.castFromPointer(_ret, retain: true, release: true); } bool get meteringEnabled { - return _lib._objc_msgSend_12(_id, _lib._sel_isMeteringEnabled1); + return _objc_msgSend_7(this.pointer, _sel_isMeteringEnabled); } set meteringEnabled(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setMeteringEnabled_1, value); + return _objc_msgSend_41(this.pointer, _sel_setMeteringEnabled_, value); } void updateMeters() { - _lib._objc_msgSend_1(_id, _lib._sel_updateMeters1); + _objc_msgSend_82(this.pointer, _sel_updateMeters); } double peakPowerForChannel_(int channelNumber) { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_1194_fpret( - _id, _lib._sel_peakPowerForChannel_1, channelNumber) - : _lib._objc_msgSend_1194( - _id, _lib._sel_peakPowerForChannel_1, channelNumber); + return objc.useMsgSendVariants + ? _objc_msgSend_800Fpret( + this.pointer, _sel_peakPowerForChannel_, channelNumber) + : _objc_msgSend_800( + this.pointer, _sel_peakPowerForChannel_, channelNumber); } double averagePowerForChannel_(int channelNumber) { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_1194_fpret( - _id, _lib._sel_averagePowerForChannel_1, channelNumber) - : _lib._objc_msgSend_1194( - _id, _lib._sel_averagePowerForChannel_1, channelNumber); + return objc.useMsgSendVariants + ? _objc_msgSend_800Fpret( + this.pointer, _sel_averagePowerForChannel_, channelNumber) + : _objc_msgSend_800( + this.pointer, _sel_averagePowerForChannel_, channelNumber); } - NSArray? get channelAssignments { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_channelAssignments1); + objc.NSArray? get channelAssignments { + final _ret = _objc_msgSend_69(this.pointer, _sel_channelAssignments); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set channelAssignments(NSArray? value) { - return _lib._objc_msgSend_1053( - _id, _lib._sel_setChannelAssignments_1, value?._id ?? ffi.nullptr); + set channelAssignments(objc.NSArray? value) { + return _objc_msgSend_605(this.pointer, _sel_setChannelAssignments_, + value?.pointer ?? ffi.nullptr); } @override AVAudioPlayer init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return AVAudioPlayer._(_ret, _lib, retain: true, release: true); + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return AVAudioPlayer.castFromPointer(_ret, retain: true, release: true); } - static AVAudioPlayer new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_AVAudioPlayer1, _lib._sel_new1); - return AVAudioPlayer._(_ret, _lib, retain: false, release: true); + static AVAudioPlayer new1() { + final _ret = _objc_msgSend_40(_class_AVAudioPlayer, _sel_new); + return AVAudioPlayer.castFromPointer(_ret, retain: false, release: true); } - static AVAudioPlayer allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_AVAudioPlayer1, _lib._sel_allocWithZone_1, zone); - return AVAudioPlayer._(_ret, _lib, retain: false, release: true); + static AVAudioPlayer allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_AVAudioPlayer, _sel_allocWithZone_, zone); + return AVAudioPlayer.castFromPointer(_ret, retain: false, release: true); } - static AVAudioPlayer alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_AVAudioPlayer1, _lib._sel_alloc1); - return AVAudioPlayer._(_ret, _lib, retain: false, release: true); + static AVAudioPlayer alloc() { + final _ret = _objc_msgSend_40(_class_AVAudioPlayer, _sel_alloc); + return AVAudioPlayer.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_AVAudioPlayer1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_AVAudioPlayer, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_AVAudioPlayer1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_AVAudioPlayer, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_AVAudioPlayer1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_AVAudioPlayer, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_AVAudioPlayer1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_AVAudioPlayer, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_AVAudioPlayer1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_AVAudioPlayer, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_AVAudioPlayer1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_AVAudioPlayer, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_AVAudioPlayer1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_AVAudioPlayer1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_AVAudioPlayer1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class AVAudioFormat extends NSObject { - AVAudioFormat._(ffi.Pointer id, AVFAudio lib, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_AVAudioPlayer, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_AVAudioPlayer, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_AVAudioPlayer, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_AVAudioPlayer = objc.getClass("AVAudioPlayer"); +late final _sel_initWithContentsOfURL_error_ = + objc.registerName("initWithContentsOfURL:error:"); +late final _sel_initWithData_error_ = objc.registerName("initWithData:error:"); +final _objc_msgSend_778 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_initWithContentsOfURL_fileTypeHint_error_ = + objc.registerName("initWithContentsOfURL:fileTypeHint:error:"); +final _objc_msgSend_779 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_initWithData_fileTypeHint_error_ = + objc.registerName("initWithData:fileTypeHint:error:"); +final _objc_msgSend_780 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_prepareToPlay = objc.registerName("prepareToPlay"); +late final _sel_play = objc.registerName("play"); +late final _sel_playAtTime_ = objc.registerName("playAtTime:"); +final _objc_msgSend_781 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, double)>(); +late final _sel_pause = objc.registerName("pause"); +late final _sel_isPlaying = objc.registerName("isPlaying"); +late final _sel_numberOfChannels = objc.registerName("numberOfChannels"); +late final _sel_currentDevice = objc.registerName("currentDevice"); +late final _sel_setCurrentDevice_ = objc.registerName("setCurrentDevice:"); +late final _sel_url = objc.registerName("url"); +late final _sel_pan = objc.registerName("pan"); +late final _sel_setPan_ = objc.registerName("setPan:"); +late final _sel_volume = objc.registerName("volume"); +late final _sel_setVolume_ = objc.registerName("setVolume:"); +late final _sel_setVolume_fadeDuration_ = + objc.registerName("setVolume:fadeDuration:"); +final _objc_msgSend_782 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Float, ffi.Double)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, double, double)>(); +late final _sel_enableRate = objc.registerName("enableRate"); +late final _sel_setEnableRate_ = objc.registerName("setEnableRate:"); +late final _sel_rate = objc.registerName("rate"); +late final _sel_setRate_ = objc.registerName("setRate:"); +late final _sel_currentTime = objc.registerName("currentTime"); +late final _sel_setCurrentTime_ = objc.registerName("setCurrentTime:"); +late final _sel_deviceCurrentTime = objc.registerName("deviceCurrentTime"); +late final _sel_numberOfLoops = objc.registerName("numberOfLoops"); +late final _sel_setNumberOfLoops_ = objc.registerName("setNumberOfLoops:"); +late final _sel_settings = objc.registerName("settings"); + +class AVAudioFormat extends objc.NSObject { + AVAudioFormat._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [AVAudioFormat] that points to the same underlying object as [other]. - static AVAudioFormat castFrom(T other) { - return AVAudioFormat._(other._id, other._lib, retain: true, release: true); - } + /// Constructs a [AVAudioFormat] that points to the same underlying object as [other]. + AVAudioFormat.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [AVAudioFormat] that wraps the given raw object pointer. - static AVAudioFormat castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return AVAudioFormat._(other, lib, retain: retain, release: release); - } + /// Constructs a [AVAudioFormat] that wraps the given raw object pointer. + AVAudioFormat.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [AVAudioFormat]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_AVAudioFormat1); + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_AVAudioFormat); } AVAudioFormat? initWithStreamDescription_( ffi.Pointer asbd) { - final _ret = _lib._objc_msgSend_1177( - _id, _lib._sel_initWithStreamDescription_1, asbd); + final _ret = + _objc_msgSend_783(this.pointer, _sel_initWithStreamDescription_, asbd); return _ret.address == 0 ? null - : AVAudioFormat._(_ret, _lib, retain: true, release: true); + : AVAudioFormat.castFromPointer(_ret, retain: true, release: true); } AVAudioFormat? initWithStreamDescription_channelLayout_( ffi.Pointer asbd, AVAudioChannelLayout? layout) { - final _ret = _lib._objc_msgSend_1183( - _id, - _lib._sel_initWithStreamDescription_channelLayout_1, + final _ret = _objc_msgSend_789( + this.pointer, + _sel_initWithStreamDescription_channelLayout_, asbd, - layout?._id ?? ffi.nullptr); + layout?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : AVAudioFormat._(_ret, _lib, retain: true, release: true); + : AVAudioFormat.castFromPointer(_ret, retain: true, release: true); } AVAudioFormat? initStandardFormatWithSampleRate_channels_( double sampleRate, int channels) { - final _ret = _lib._objc_msgSend_1184( - _id, - _lib._sel_initStandardFormatWithSampleRate_channels_1, - sampleRate, - channels); + final _ret = _objc_msgSend_790(this.pointer, + _sel_initStandardFormatWithSampleRate_channels_, sampleRate, channels); return _ret.address == 0 ? null - : AVAudioFormat._(_ret, _lib, retain: true, release: true); + : AVAudioFormat.castFromPointer(_ret, retain: true, release: true); } AVAudioFormat initStandardFormatWithSampleRate_channelLayout_( double sampleRate, AVAudioChannelLayout layout) { - final _ret = _lib._objc_msgSend_1185( - _id, - _lib._sel_initStandardFormatWithSampleRate_channelLayout_1, + final _ret = _objc_msgSend_791( + this.pointer, + _sel_initStandardFormatWithSampleRate_channelLayout_, sampleRate, - layout._id); - return AVAudioFormat._(_ret, _lib, retain: true, release: true); + layout.pointer); + return AVAudioFormat.castFromPointer(_ret, retain: true, release: true); } AVAudioFormat? initWithCommonFormat_sampleRate_channels_interleaved_( int format, double sampleRate, int channels, bool interleaved) { - final _ret = _lib._objc_msgSend_1186( - _id, - _lib._sel_initWithCommonFormat_sampleRate_channels_interleaved_1, + final _ret = _objc_msgSend_792( + this.pointer, + _sel_initWithCommonFormat_sampleRate_channels_interleaved_, format, sampleRate, channels, interleaved); return _ret.address == 0 ? null - : AVAudioFormat._(_ret, _lib, retain: true, release: true); + : AVAudioFormat.castFromPointer(_ret, retain: true, release: true); } AVAudioFormat initWithCommonFormat_sampleRate_interleaved_channelLayout_( @@ -77384,178 +39049,173 @@ class AVAudioFormat extends NSObject { double sampleRate, bool interleaved, AVAudioChannelLayout layout) { - final _ret = _lib._objc_msgSend_1187( - _id, - _lib._sel_initWithCommonFormat_sampleRate_interleaved_channelLayout_1, + final _ret = _objc_msgSend_793( + this.pointer, + _sel_initWithCommonFormat_sampleRate_interleaved_channelLayout_, format, sampleRate, interleaved, - layout._id); - return AVAudioFormat._(_ret, _lib, retain: true, release: true); + layout.pointer); + return AVAudioFormat.castFromPointer(_ret, retain: true, release: true); } - AVAudioFormat? initWithSettings_(NSDictionary settings) { - final _ret = - _lib._objc_msgSend_851(_id, _lib._sel_initWithSettings_1, settings._id); + AVAudioFormat? initWithSettings_(objc.NSDictionary settings) { + final _ret = _objc_msgSend_311( + this.pointer, _sel_initWithSettings_, settings.pointer); return _ret.address == 0 ? null - : AVAudioFormat._(_ret, _lib, retain: true, release: true); + : AVAudioFormat.castFromPointer(_ret, retain: true, release: true); } AVAudioFormat initWithCMAudioFormatDescription_( ffi.Pointer formatDescription) { - final _ret = _lib._objc_msgSend_1188( - _id, _lib._sel_initWithCMAudioFormatDescription_1, formatDescription); - return AVAudioFormat._(_ret, _lib, retain: true, release: true); + final _ret = _objc_msgSend_794(this.pointer, + _sel_initWithCMAudioFormatDescription_, formatDescription); + return AVAudioFormat.castFromPointer(_ret, retain: true, release: true); } - bool isEqual_(NSObject object) { - return _lib._objc_msgSend_0(_id, _lib._sel_isEqual_1, object._id); + bool isEqual_(objc.NSObject object) { + return _objc_msgSend_0(this.pointer, _sel_isEqual_, object.pointer); } bool get standard { - return _lib._objc_msgSend_12(_id, _lib._sel_isStandard1); + return _objc_msgSend_7(this.pointer, _sel_isStandard); } int get commonFormat { - return _lib._objc_msgSend_1189(_id, _lib._sel_commonFormat1); + return _objc_msgSend_795(this.pointer, _sel_commonFormat); } int get channelCount { - return _lib._objc_msgSend_1182(_id, _lib._sel_channelCount1); + return _objc_msgSend_788(this.pointer, _sel_channelCount); } double get sampleRate { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_sampleRate1) - : _lib._objc_msgSend_165(_id, _lib._sel_sampleRate1); + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_sampleRate) + : _objc_msgSend_115(this.pointer, _sel_sampleRate); } bool get interleaved { - return _lib._objc_msgSend_12(_id, _lib._sel_isInterleaved1); + return _objc_msgSend_7(this.pointer, _sel_isInterleaved); } ffi.Pointer get streamDescription { - return _lib._objc_msgSend_1190(_id, _lib._sel_streamDescription1); + return _objc_msgSend_796(this.pointer, _sel_streamDescription); } AVAudioChannelLayout? get channelLayout { - final _ret = _lib._objc_msgSend_1191(_id, _lib._sel_channelLayout1); + final _ret = _objc_msgSend_797(this.pointer, _sel_channelLayout); return _ret.address == 0 ? null - : AVAudioChannelLayout._(_ret, _lib, retain: true, release: true); + : AVAudioChannelLayout.castFromPointer(_ret, + retain: true, release: true); } - NSData? get magicCookie { - final _ret = _lib._objc_msgSend_286(_id, _lib._sel_magicCookie1); + objc.NSData? get magicCookie { + final _ret = _objc_msgSend_325(this.pointer, _sel_magicCookie); return _ret.address == 0 ? null - : NSData._(_ret, _lib, retain: true, release: true); + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - set magicCookie(NSData? value) { - return _lib._objc_msgSend_1021( - _id, _lib._sel_setMagicCookie_1, value?._id ?? ffi.nullptr); + set magicCookie(objc.NSData? value) { + return _objc_msgSend_571( + this.pointer, _sel_setMagicCookie_, value?.pointer ?? ffi.nullptr); } - NSDictionary get settings { - final _ret = _lib._objc_msgSend_181(_id, _lib._sel_settings1); - return NSDictionary._(_ret, _lib, retain: true, release: true); + objc.NSDictionary get settings { + final _ret = _objc_msgSend_112(this.pointer, _sel_settings); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } ffi.Pointer get formatDescription { - return _lib._objc_msgSend_1192(_id, _lib._sel_formatDescription1); + return _objc_msgSend_798(this.pointer, _sel_formatDescription); } @override AVAudioFormat init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return AVAudioFormat._(_ret, _lib, retain: true, release: true); + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return AVAudioFormat.castFromPointer(_ret, retain: true, release: true); } - static AVAudioFormat new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_AVAudioFormat1, _lib._sel_new1); - return AVAudioFormat._(_ret, _lib, retain: false, release: true); + static AVAudioFormat new1() { + final _ret = _objc_msgSend_40(_class_AVAudioFormat, _sel_new); + return AVAudioFormat.castFromPointer(_ret, retain: false, release: true); } - static AVAudioFormat allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_AVAudioFormat1, _lib._sel_allocWithZone_1, zone); - return AVAudioFormat._(_ret, _lib, retain: false, release: true); + static AVAudioFormat allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_AVAudioFormat, _sel_allocWithZone_, zone); + return AVAudioFormat.castFromPointer(_ret, retain: false, release: true); } - static AVAudioFormat alloc(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_AVAudioFormat1, _lib._sel_alloc1); - return AVAudioFormat._(_ret, _lib, retain: false, release: true); + static AVAudioFormat alloc() { + final _ret = _objc_msgSend_40(_class_AVAudioFormat, _sel_alloc); + return AVAudioFormat.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_AVAudioFormat1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_AVAudioFormat, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_AVAudioFormat1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_AVAudioFormat, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_AVAudioFormat1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_AVAudioFormat, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_AVAudioFormat1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_AVAudioFormat, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_AVAudioFormat1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_AVAudioFormat, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_AVAudioFormat1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_AVAudioFormat, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_AVAudioFormat1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_AVAudioFormat, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_AVAudioFormat1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_AVAudioFormat, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_AVAudioFormat1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_AVAudioFormat, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } +late final _class_AVAudioFormat = objc.getClass("AVAudioFormat"); + final class AudioStreamBasicDescription extends ffi.Struct { @ffi.Double() external double mSampleRate; @@ -77585,163 +39245,183 @@ final class AudioStreamBasicDescription extends ffi.Struct { external int mReserved; } -class AVAudioChannelLayout extends NSObject { - AVAudioChannelLayout._(ffi.Pointer id, AVFAudio lib, +late final _sel_initWithStreamDescription_ = + objc.registerName("initWithStreamDescription:"); +final _objc_msgSend_783 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +class AVAudioChannelLayout extends objc.NSObject { + AVAudioChannelLayout._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [AVAudioChannelLayout] that points to the same underlying object as [other]. - static AVAudioChannelLayout castFrom(T other) { - return AVAudioChannelLayout._(other._id, other._lib, - retain: true, release: true); - } + /// Constructs a [AVAudioChannelLayout] that points to the same underlying object as [other]. + AVAudioChannelLayout.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [AVAudioChannelLayout] that wraps the given raw object pointer. - static AVAudioChannelLayout castFromPointer( - AVFAudio lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return AVAudioChannelLayout._(other, lib, retain: retain, release: release); - } + /// Constructs a [AVAudioChannelLayout] that wraps the given raw object pointer. + AVAudioChannelLayout.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [AVAudioChannelLayout]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_AVAudioChannelLayout1); + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_AVAudioChannelLayout); } @override AVAudioChannelLayout init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return AVAudioChannelLayout._(_ret, _lib, retain: true, release: true); + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: true, release: true); } AVAudioChannelLayout? initWithLayoutTag_(int layoutTag) { final _ret = - _lib._objc_msgSend_1178(_id, _lib._sel_initWithLayoutTag_1, layoutTag); + _objc_msgSend_784(this.pointer, _sel_initWithLayoutTag_, layoutTag); return _ret.address == 0 ? null - : AVAudioChannelLayout._(_ret, _lib, retain: true, release: true); + : AVAudioChannelLayout.castFromPointer(_ret, + retain: true, release: true); } AVAudioChannelLayout initWithLayout_(ffi.Pointer layout) { - final _ret = - _lib._objc_msgSend_1179(_id, _lib._sel_initWithLayout_1, layout); - return AVAudioChannelLayout._(_ret, _lib, retain: true, release: true); + final _ret = _objc_msgSend_785(this.pointer, _sel_initWithLayout_, layout); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: true, release: true); } - bool isEqual_(NSObject object) { - return _lib._objc_msgSend_0(_id, _lib._sel_isEqual_1, object._id); + bool isEqual_(objc.NSObject object) { + return _objc_msgSend_0(this.pointer, _sel_isEqual_, object.pointer); } - static AVAudioChannelLayout layoutWithLayoutTag_( - AVFAudio _lib, int layoutTag) { - final _ret = _lib._objc_msgSend_1180(_lib._class_AVAudioChannelLayout1, - _lib._sel_layoutWithLayoutTag_1, layoutTag); - return AVAudioChannelLayout._(_ret, _lib, retain: true, release: true); + static AVAudioChannelLayout layoutWithLayoutTag_(int layoutTag) { + final _ret = _objc_msgSend_786( + _class_AVAudioChannelLayout, _sel_layoutWithLayoutTag_, layoutTag); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: true, release: true); } static AVAudioChannelLayout layoutWithLayout_( - AVFAudio _lib, ffi.Pointer layout) { - final _ret = _lib._objc_msgSend_1179(_lib._class_AVAudioChannelLayout1, - _lib._sel_layoutWithLayout_1, layout); - return AVAudioChannelLayout._(_ret, _lib, retain: true, release: true); + ffi.Pointer layout) { + final _ret = _objc_msgSend_785( + _class_AVAudioChannelLayout, _sel_layoutWithLayout_, layout); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: true, release: true); } int get layoutTag { - return _lib._objc_msgSend_214(_id, _lib._sel_layoutTag1); + return _objc_msgSend_704(this.pointer, _sel_layoutTag); } ffi.Pointer get layout { - return _lib._objc_msgSend_1181(_id, _lib._sel_layout1); + return _objc_msgSend_787(this.pointer, _sel_layout); } int get channelCount { - return _lib._objc_msgSend_1182(_id, _lib._sel_channelCount1); + return _objc_msgSend_788(this.pointer, _sel_channelCount); } - static AVAudioChannelLayout new1(AVFAudio _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_AVAudioChannelLayout1, _lib._sel_new1); - return AVAudioChannelLayout._(_ret, _lib, retain: false, release: true); + static AVAudioChannelLayout new1() { + final _ret = _objc_msgSend_40(_class_AVAudioChannelLayout, _sel_new); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: false, release: true); } - static AVAudioChannelLayout allocWithZone_( - AVFAudio _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_AVAudioChannelLayout1, _lib._sel_allocWithZone_1, zone); - return AVAudioChannelLayout._(_ret, _lib, retain: false, release: true); + static AVAudioChannelLayout allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_AVAudioChannelLayout, _sel_allocWithZone_, zone); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: false, release: true); } - static AVAudioChannelLayout alloc(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_AVAudioChannelLayout1, _lib._sel_alloc1); - return AVAudioChannelLayout._(_ret, _lib, retain: false, release: true); + static AVAudioChannelLayout alloc() { + final _ret = _objc_msgSend_40(_class_AVAudioChannelLayout, _sel_alloc); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - AVFAudio _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_AVAudioChannelLayout1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_AVAudioChannelLayout, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - AVFAudio _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_AVAudioChannelLayout1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_AVAudioChannelLayout, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(AVFAudio _lib) { - return _lib._objc_msgSend_12(_lib._class_AVAudioChannelLayout1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_AVAudioChannelLayout, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(AVFAudio _lib) { - return _lib._objc_msgSend_12( - _lib._class_AVAudioChannelLayout1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_AVAudioChannelLayout, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - AVFAudio _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_AVAudioChannelLayout1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_AVAudioChannelLayout, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - AVFAudio _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_AVAudioChannelLayout1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_AVAudioChannelLayout, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - AVFAudio _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_AVAudioChannelLayout1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_AVAudioChannelLayout, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_AVAudioChannelLayout1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_AVAudioChannelLayout, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(AVFAudio _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_AVAudioChannelLayout1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_AVAudioChannelLayout, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } +late final _class_AVAudioChannelLayout = objc.getClass("AVAudioChannelLayout"); +late final _sel_initWithLayoutTag_ = objc.registerName("initWithLayoutTag:"); +final _objc_msgSend_784 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); + final class AudioChannelLayout extends ffi.Struct { @ffi.UnsignedInt() external int mChannelLayoutTag; @@ -77804,6 +39484,92 @@ abstract class AudioChannelFlags { static const int kAudioChannelFlags_Meters = 4; } +late final _sel_initWithLayout_ = objc.registerName("initWithLayout:"); +final _objc_msgSend_785 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isEqual_ = objc.registerName("isEqual:"); +late final _sel_layoutWithLayoutTag_ = + objc.registerName("layoutWithLayoutTag:"); +final _objc_msgSend_786 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_layoutWithLayout_ = objc.registerName("layoutWithLayout:"); +late final _sel_layoutTag = objc.registerName("layoutTag"); +late final _sel_layout = objc.registerName("layout"); +final _objc_msgSend_787 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_channelCount = objc.registerName("channelCount"); +final _objc_msgSend_788 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Uint32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithStreamDescription_channelLayout_ = + objc.registerName("initWithStreamDescription:channelLayout:"); +final _objc_msgSend_789 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initStandardFormatWithSampleRate_channels_ = + objc.registerName("initStandardFormatWithSampleRate:channels:"); +final _objc_msgSend_790 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Double, ffi.Uint32)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, double, int)>(); +late final _sel_initStandardFormatWithSampleRate_channelLayout_ = + objc.registerName("initStandardFormatWithSampleRate:channelLayout:"); +final _objc_msgSend_791 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer)>(); + abstract class AVAudioCommonFormat { static const int AVAudioOtherFormat = 0; static const int AVAudioPCMFormatFloat32 = 1; @@ -77812,4 +39578,133 @@ abstract class AVAudioCommonFormat { static const int AVAudioPCMFormatInt32 = 4; } +late final _sel_initWithCommonFormat_sampleRate_channels_interleaved_ = + objc.registerName("initWithCommonFormat:sampleRate:channels:interleaved:"); +final _objc_msgSend_792 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Double, + ffi.Uint32, + ffi.Bool)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int, double, int, bool)>(); +late final _sel_initWithCommonFormat_sampleRate_interleaved_channelLayout_ = + objc.registerName( + "initWithCommonFormat:sampleRate:interleaved:channelLayout:"); +final _objc_msgSend_793 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Double, + ffi.Bool, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + int, + double, + bool, + ffi.Pointer)>(); +late final _sel_initWithSettings_ = objc.registerName("initWithSettings:"); + final class opaqueCMFormatDescription extends ffi.Opaque {} + +late final _sel_initWithCMAudioFormatDescription_ = + objc.registerName("initWithCMAudioFormatDescription:"); +final _objc_msgSend_794 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_isStandard = objc.registerName("isStandard"); +late final _sel_commonFormat = objc.registerName("commonFormat"); +final _objc_msgSend_795 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isInterleaved = objc.registerName("isInterleaved"); +late final _sel_streamDescription = objc.registerName("streamDescription"); +final _objc_msgSend_796 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_channelLayout = objc.registerName("channelLayout"); +final _objc_msgSend_797 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_magicCookie = objc.registerName("magicCookie"); +late final _sel_setMagicCookie_ = objc.registerName("setMagicCookie:"); +late final _sel_formatDescription = objc.registerName("formatDescription"); +final _objc_msgSend_798 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_799 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isMeteringEnabled = objc.registerName("isMeteringEnabled"); +late final _sel_setMeteringEnabled_ = objc.registerName("setMeteringEnabled:"); +late final _sel_updateMeters = objc.registerName("updateMeters"); +late final _sel_peakPowerForChannel_ = + objc.registerName("peakPowerForChannel:"); +final _objc_msgSend_800 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + double Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_800Fpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + double Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_averagePowerForChannel_ = + objc.registerName("averagePowerForChannel:"); +late final _sel_channelAssignments = objc.registerName("channelAssignments"); +late final _sel_setChannelAssignments_ = + objc.registerName("setChannelAssignments:"); diff --git a/pkgs/ffigen/example/objective_c/config.yaml b/pkgs/ffigen/example/objective_c/config.yaml index 3a76517eb3..799c2efa13 100644 --- a/pkgs/ffigen/example/objective_c/config.yaml +++ b/pkgs/ffigen/example/objective_c/config.yaml @@ -12,4 +12,8 @@ headers: entry-points: - '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioPlayer.h' preamble: | + // Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file + // for details. All rights reserved. Use of this source code is governed by a + // BSD-style license that can be found in the LICENSE file. + // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field, void_checks, annotate_overrides, no_leading_underscores_for_local_identifiers, library_private_types_in_public_api diff --git a/pkgs/ffigen/example/objective_c/play_audio.dart b/pkgs/ffigen/example/objective_c/play_audio.dart index 88deb74de7..bca46b65a6 100644 --- a/pkgs/ffigen/example/objective_c/play_audio.dart +++ b/pkgs/ffigen/example/objective_c/play_audio.dart @@ -3,19 +3,20 @@ // BSD-style license that can be found in the LICENSE file. import 'dart:ffi'; +import 'package:objective_c/objective_c.dart'; import 'avf_audio_bindings.dart'; const _dylibPath = '/System/Library/Frameworks/AVFAudio.framework/Versions/Current/AVFAudio'; void main(List args) async { - final lib = AVFAudio(DynamicLibrary.open(_dylibPath)); + DynamicLibrary.open(_dylibPath); for (final file in args) { - final fileStr = NSString(lib, file); + final fileStr = NSString(file); print('Loading $fileStr'); - final fileUrl = NSURL.fileURLWithPath_(lib, fileStr); + final fileUrl = NSURL.fileURLWithPath_(fileStr); final player = - AVAudioPlayer.alloc(lib).initWithContentsOfURL_error_(fileUrl, nullptr); + AVAudioPlayer.alloc().initWithContentsOfURL_error_(fileUrl, nullptr); if (player == null) { print('Failed to load audio'); continue; diff --git a/pkgs/ffigen/example/objective_c/pubspec.yaml b/pkgs/ffigen/example/objective_c/pubspec.yaml index a912faaff2..6b687f5984 100644 --- a/pkgs/ffigen/example/objective_c/pubspec.yaml +++ b/pkgs/ffigen/example/objective_c/pubspec.yaml @@ -9,7 +9,12 @@ environment: dependencies: ffi: ^2.0.1 + objective_c: ^0.0.1 dev_dependencies: ffigen: path: '../../' lints: ^2.0.0 + +dependency_overrides: + objective_c: + path: ../../../objective_c/ diff --git a/pkgs/ffigen/example/swift/config.yaml b/pkgs/ffigen/example/swift/config.yaml index 7f820baab0..74c703df3a 100644 --- a/pkgs/ffigen/example/swift/config.yaml +++ b/pkgs/ffigen/example/swift/config.yaml @@ -14,6 +14,10 @@ headers: entry-points: - 'third_party/swift_api.h' preamble: | + // Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file + // for details. All rights reserved. Use of this source code is governed by a + // BSD-style license that can be found in the LICENSE file. + // ignore_for_file: camel_case_types, non_constant_identifier_names // ignore_for_file: unused_element, unused_field, return_of_invalid_type // ignore_for_file: void_checks, annotate_overrides diff --git a/pkgs/ffigen/example/swift/example.dart b/pkgs/ffigen/example/swift/example.dart index c9dd5ba44e..b6188ce8c3 100644 --- a/pkgs/ffigen/example/swift/example.dart +++ b/pkgs/ffigen/example/swift/example.dart @@ -7,8 +7,8 @@ import 'swift_api_bindings.dart'; void main() { // TODO(https://github.com/dart-lang/ffigen/issues/443): Add a test for this. - final lib = SwiftLibrary(DynamicLibrary.open('libswiftapi.dylib')); - final object = SwiftClass.new1(lib); + DynamicLibrary.open('libswiftapi.dylib'); + final object = SwiftClass.new1(); print(object.sayHello()); print('field = ${object.someField}'); object.someField = 456; diff --git a/pkgs/ffigen/example/swift/pubspec.yaml b/pkgs/ffigen/example/swift/pubspec.yaml index de19bf2467..737d3fb6c3 100644 --- a/pkgs/ffigen/example/swift/pubspec.yaml +++ b/pkgs/ffigen/example/swift/pubspec.yaml @@ -9,7 +9,12 @@ environment: dependencies: ffi: ^2.0.1 + objective_c: ^0.0.1 dev_dependencies: ffigen: path: "../../" lints: ^2.0.0 + +dependency_overrides: + objective_c: + path: ../../../objective_c/ diff --git a/pkgs/ffigen/example/swift/swift_api_bindings.dart b/pkgs/ffigen/example/swift/swift_api_bindings.dart index 8be24b1518..939ddd1aa6 100644 --- a/pkgs/ffigen/example/swift/swift_api_bindings.dart +++ b/pkgs/ffigen/example/swift/swift_api_bindings.dart @@ -1,54136 +1,6311 @@ -// ignore_for_file: camel_case_types, non_constant_identifier_names -// ignore_for_file: unused_element, unused_field, return_of_invalid_type -// ignore_for_file: void_checks, annotate_overrides -// ignore_for_file: no_leading_underscores_for_local_identifiers -// ignore_for_file: library_private_types_in_public_api - -// 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; - -/// Bindings for swift_api. -class SwiftLibrary { - /// Holds the symbol lookup function. - final ffi.Pointer Function(String symbolName) - _lookup; - - /// The symbols are looked up in [dynamicLibrary]. - SwiftLibrary(ffi.DynamicLibrary dynamicLibrary) - : _lookup = dynamicLibrary.lookup; - - /// The symbols are looked up with [lookup]. - SwiftLibrary.fromLookup( - ffi.Pointer Function(String symbolName) - lookup) - : _lookup = lookup; - - ffi.Pointer _registerName1(String name) { - final cstr = name.toNativeUtf8(); - final sel = _sel_registerName(cstr.cast()); - pkg_ffi.calloc.free(cstr); - return sel; - } - - ffi.Pointer _sel_registerName( - ffi.Pointer str, - ) { - return __sel_registerName( - str, - ); - } - - late final __sel_registerNamePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('sel_registerName'); - late final __sel_registerName = __sel_registerNamePtr - .asFunction Function(ffi.Pointer)>(); - - ffi.Pointer _getClass1(String name) { - final cstr = name.toNativeUtf8(); - final clazz = _objc_getClass(cstr.cast()); - pkg_ffi.calloc.free(cstr); - if (clazz == ffi.nullptr) { - throw Exception('Failed to load Objective-C class: $name'); - } - return clazz; - } - - ffi.Pointer _objc_getClass( - ffi.Pointer str, - ) { - return __objc_getClass( - str, - ); - } - - late final __objc_getClassPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('objc_getClass'); - late final __objc_getClass = __objc_getClassPtr - .asFunction Function(ffi.Pointer)>(); - - ffi.Pointer _objc_retain( - ffi.Pointer value, - ) { - return __objc_retain( - value, - ); - } - - late final __objc_retainPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('objc_retain'); - late final __objc_retain = __objc_retainPtr - .asFunction Function(ffi.Pointer)>(); - - void _objc_release( - ffi.Pointer value, - ) { - return __objc_release( - value, - ); - } - - late final __objc_releasePtr = - _lookup)>>( - 'objc_release'); - late final __objc_release = - __objc_releasePtr.asFunction)>(); - - late final _objc_releaseFinalizer2 = - ffi.NativeFinalizer(__objc_releasePtr.cast()); - late final _class_NSObject1 = _getClass1("NSObject"); - late final _sel_load1 = _registerName1("load"); - void _objc_msgSend_1( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1( - obj, - sel, - ); - } - - late final __objc_msgSend_1Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1 = __objc_msgSend_1Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initialize1 = _registerName1("initialize"); - late final _sel_init1 = _registerName1("init"); - instancetype _objc_msgSend_2( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_2( - obj, - sel, - ); - } - - late final __objc_msgSend_2Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_2 = __objc_msgSend_2Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_new1 = _registerName1("new"); - late final _sel_allocWithZone_1 = _registerName1("allocWithZone:"); - instancetype _objc_msgSend_3( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_NSZone> zone, - ) { - return __objc_msgSend_3( - obj, - sel, - zone, - ); - } - - late final __objc_msgSend_3Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_NSZone>)>>('objc_msgSend'); - late final __objc_msgSend_3 = __objc_msgSend_3Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_NSZone>)>(); - - late final _sel_alloc1 = _registerName1("alloc"); - late final _sel_dealloc1 = _registerName1("dealloc"); - late final _sel_finalize1 = _registerName1("finalize"); - late final _sel_copy1 = _registerName1("copy"); - late final _sel_mutableCopy1 = _registerName1("mutableCopy"); - late final _sel_copyWithZone_1 = _registerName1("copyWithZone:"); - late final _sel_mutableCopyWithZone_1 = - _registerName1("mutableCopyWithZone:"); - late final _sel_instancesRespondToSelector_1 = - _registerName1("instancesRespondToSelector:"); - bool _objc_msgSend_4( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ) { - return __objc_msgSend_4( - obj, - sel, - aSelector, - ); - } - - late final __objc_msgSend_4Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_4 = __objc_msgSend_4Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - bool _objc_msgSend_0( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer clazz, - ) { - return __objc_msgSend_0( - obj, - sel, - clazz, - ); - } - - late final __objc_msgSend_0Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_0 = __objc_msgSend_0Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_isKindOfClass_1 = _registerName1("isKindOfClass:"); - late final _class_Protocol1 = _getClass1("Protocol"); - late final _sel_conformsToProtocol_1 = _registerName1("conformsToProtocol:"); - bool _objc_msgSend_5( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer protocol, - ) { - return __objc_msgSend_5( - obj, - sel, - protocol, - ); - } - - late final __objc_msgSend_5Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_5 = __objc_msgSend_5Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_methodForSelector_1 = _registerName1("methodForSelector:"); - ffi.Pointer> _objc_msgSend_6( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ) { - return __objc_msgSend_6( - obj, - sel, - aSelector, - ); - } - - late final __objc_msgSend_6Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_6 = __objc_msgSend_6Ptr.asFunction< - ffi.Pointer> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_instanceMethodForSelector_1 = - _registerName1("instanceMethodForSelector:"); - late final _sel_doesNotRecognizeSelector_1 = - _registerName1("doesNotRecognizeSelector:"); - void _objc_msgSend_7( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ) { - return __objc_msgSend_7( - obj, - sel, - aSelector, - ); - } - - late final __objc_msgSend_7Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_7 = __objc_msgSend_7Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_forwardingTargetForSelector_1 = - _registerName1("forwardingTargetForSelector:"); - ffi.Pointer _objc_msgSend_8( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ) { - return __objc_msgSend_8( - obj, - sel, - aSelector, - ); - } - - late final __objc_msgSend_8Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_8 = __objc_msgSend_8Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSInvocation1 = _getClass1("NSInvocation"); - late final _class_NSMethodSignature1 = _getClass1("NSMethodSignature"); - late final _sel_signatureWithObjCTypes_1 = - _registerName1("signatureWithObjCTypes:"); - ffi.Pointer _objc_msgSend_9( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer types, - ) { - return __objc_msgSend_9( - obj, - sel, - types, - ); - } - - late final __objc_msgSend_9Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_9 = __objc_msgSend_9Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_numberOfArguments1 = _registerName1("numberOfArguments"); - int _objc_msgSend_10( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_10( - obj, - sel, - ); - } - - late final __objc_msgSend_10Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_10 = __objc_msgSend_10Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_getArgumentTypeAtIndex_1 = - _registerName1("getArgumentTypeAtIndex:"); - ffi.Pointer _objc_msgSend_11( - ffi.Pointer obj, - ffi.Pointer sel, - int idx, - ) { - return __objc_msgSend_11( - obj, - sel, - idx, - ); - } - - late final __objc_msgSend_11Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_11 = __objc_msgSend_11Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_frameLength1 = _registerName1("frameLength"); - late final _sel_isOneway1 = _registerName1("isOneway"); - bool _objc_msgSend_12( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_12( - obj, - sel, - ); - } - - late final __objc_msgSend_12Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_12 = __objc_msgSend_12Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_methodReturnType1 = _registerName1("methodReturnType"); - ffi.Pointer _objc_msgSend_13( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_13( - obj, - sel, - ); - } - - late final __objc_msgSend_13Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_13 = __objc_msgSend_13Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_methodReturnLength1 = _registerName1("methodReturnLength"); - late final _sel_cancelPreviousPerformRequestsWithTarget_selector_object_1 = - _registerName1( - "cancelPreviousPerformRequestsWithTarget:selector:object:"); - void _objc_msgSend_14( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aTarget, - ffi.Pointer aSelector, - ffi.Pointer anArgument, - ) { - return __objc_msgSend_14( - obj, - sel, - aTarget, - aSelector, - anArgument, - ); - } - - late final __objc_msgSend_14Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_14 = __objc_msgSend_14Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_cancelPreviousPerformRequestsWithTarget_1 = - _registerName1("cancelPreviousPerformRequestsWithTarget:"); - void _objc_msgSend_15( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aTarget, - ) { - return __objc_msgSend_15( - obj, - sel, - aTarget, - ); - } - - late final __objc_msgSend_15Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_15 = __objc_msgSend_15Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_accessInstanceVariablesDirectly1 = - _registerName1("accessInstanceVariablesDirectly"); - late final _sel_useStoredAccessor1 = _registerName1("useStoredAccessor"); - late final _class_NSSet1 = _getClass1("NSSet"); - late final _sel_count1 = _registerName1("count"); - late final _sel_member_1 = _registerName1("member:"); - ffi.Pointer _objc_msgSend_16( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer object, - ) { - return __objc_msgSend_16( - obj, - sel, - object, - ); - } - - late final __objc_msgSend_16Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_16 = __objc_msgSend_16Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSEnumerator1 = _getClass1("NSEnumerator"); - late final _sel_nextObject1 = _registerName1("nextObject"); - ffi.Pointer _objc_msgSend_17( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_17( - obj, - sel, - ); - } - - late final __objc_msgSend_17Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_17 = __objc_msgSend_17Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_allObjects1 = _registerName1("allObjects"); - late final _class_NSString1 = _getClass1("NSString"); - late final _sel_length1 = _registerName1("length"); - late final _sel_characterAtIndex_1 = _registerName1("characterAtIndex:"); - int _objc_msgSend_18( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ) { - return __objc_msgSend_18( - obj, - sel, - index, - ); - } - - late final __objc_msgSend_18Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedShort Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_18 = __objc_msgSend_18Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _class_NSCoder1 = _getClass1("NSCoder"); - late final _sel_encodeValueOfObjCType_at_1 = - _registerName1("encodeValueOfObjCType:at:"); - void _objc_msgSend_19( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer type, - ffi.Pointer addr, - ) { - return __objc_msgSend_19( - obj, - sel, - type, - addr, - ); - } - - late final __objc_msgSend_19Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_19 = __objc_msgSend_19Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSData1 = _getClass1("NSData"); - late final _sel_bytes1 = _registerName1("bytes"); - ffi.Pointer _objc_msgSend_20( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_20( - obj, - sel, - ); - } - - late final __objc_msgSend_20Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_20 = __objc_msgSend_20Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_description1 = _registerName1("description"); - ffi.Pointer _objc_msgSend_21( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_21( - obj, - sel, - ); - } - - late final __objc_msgSend_21Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_21 = __objc_msgSend_21Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_getBytes_length_1 = _registerName1("getBytes:length:"); - void _objc_msgSend_22( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - int length, - ) { - return __objc_msgSend_22( - obj, - sel, - buffer, - length, - ); - } - - late final __objc_msgSend_22Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_22 = __objc_msgSend_22Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_getBytes_range_1 = _registerName1("getBytes:range:"); - void _objc_msgSend_23( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - _NSRange range, - ) { - return __objc_msgSend_23( - obj, - sel, - buffer, - range, - ); - } - - late final __objc_msgSend_23Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_23 = __objc_msgSend_23Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>(); - - late final _sel_isEqualToData_1 = _registerName1("isEqualToData:"); - bool _objc_msgSend_24( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - ) { - return __objc_msgSend_24( - obj, - sel, - other, - ); - } - - late final __objc_msgSend_24Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_24 = __objc_msgSend_24Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_subdataWithRange_1 = _registerName1("subdataWithRange:"); - ffi.Pointer _objc_msgSend_25( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_25( - obj, - sel, - range, - ); - } - - late final __objc_msgSend_25Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_25 = __objc_msgSend_25Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _sel_writeToFile_atomically_1 = - _registerName1("writeToFile:atomically:"); - bool _objc_msgSend_26( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool useAuxiliaryFile, - ) { - return __objc_msgSend_26( - obj, - sel, - path, - useAuxiliaryFile, - ); - } - - late final __objc_msgSend_26Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_26 = __objc_msgSend_26Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _class_NSURL1 = _getClass1("NSURL"); - late final _sel_initWithScheme_host_path_1 = - _registerName1("initWithScheme:host:path:"); - instancetype _objc_msgSend_27( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer scheme, - ffi.Pointer host, - ffi.Pointer path, - ) { - return __objc_msgSend_27( - obj, - sel, - scheme, - host, - path, - ); - } - - late final __objc_msgSend_27Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_27 = __objc_msgSend_27Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initFileURLWithPath_isDirectory_relativeToURL_1 = - _registerName1("initFileURLWithPath:isDirectory:relativeToURL:"); - instancetype _objc_msgSend_28( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_28( - obj, - sel, - path, - isDir, - baseURL, - ); - } - - late final __objc_msgSend_28Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_28 = __objc_msgSend_28Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool, ffi.Pointer)>(); - - late final _sel_initFileURLWithPath_relativeToURL_1 = - _registerName1("initFileURLWithPath:relativeToURL:"); - instancetype _objc_msgSend_29( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_29( - obj, - sel, - path, - baseURL, - ); - } - - late final __objc_msgSend_29Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_29 = __objc_msgSend_29Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initFileURLWithPath_isDirectory_1 = - _registerName1("initFileURLWithPath:isDirectory:"); - instancetype _objc_msgSend_30( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ) { - return __objc_msgSend_30( - obj, - sel, - path, - isDir, - ); - } - - late final __objc_msgSend_30Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_30 = __objc_msgSend_30Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_initFileURLWithPath_1 = - _registerName1("initFileURLWithPath:"); - instancetype _objc_msgSend_31( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ) { - return __objc_msgSend_31( - obj, - sel, - path, - ); - } - - late final __objc_msgSend_31Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_31 = __objc_msgSend_31Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_fileURLWithPath_isDirectory_relativeToURL_1 = - _registerName1("fileURLWithPath:isDirectory:relativeToURL:"); - ffi.Pointer _objc_msgSend_32( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_32( - obj, - sel, - path, - isDir, - baseURL, - ); - } - - late final __objc_msgSend_32Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_32 = __objc_msgSend_32Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); - - late final _sel_fileURLWithPath_relativeToURL_1 = - _registerName1("fileURLWithPath:relativeToURL:"); - ffi.Pointer _objc_msgSend_33( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_33( - obj, - sel, - path, - baseURL, - ); - } - - late final __objc_msgSend_33Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_33 = __objc_msgSend_33Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_fileURLWithPath_isDirectory_1 = - _registerName1("fileURLWithPath:isDirectory:"); - ffi.Pointer _objc_msgSend_34( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ) { - return __objc_msgSend_34( - obj, - sel, - path, - isDir, - ); - } - - late final __objc_msgSend_34Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_34 = __objc_msgSend_34Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_fileURLWithPath_1 = _registerName1("fileURLWithPath:"); - ffi.Pointer _objc_msgSend_35( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ) { - return __objc_msgSend_35( - obj, - sel, - path, - ); - } - - late final __objc_msgSend_35Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_35 = __objc_msgSend_35Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = - _registerName1( - "initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); - instancetype _objc_msgSend_36( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_36( - obj, - sel, - path, - isDir, - baseURL, - ); - } - - late final __objc_msgSend_36Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_36 = __objc_msgSend_36Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool, ffi.Pointer)>(); - - late final _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = - _registerName1( - "fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); - ffi.Pointer _objc_msgSend_37( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_37( - obj, - sel, - path, - isDir, - baseURL, - ); - } - - late final __objc_msgSend_37Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_37 = __objc_msgSend_37Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); - - late final _sel_initWithString_1 = _registerName1("initWithString:"); - instancetype _objc_msgSend_38( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer URLString, - ) { - return __objc_msgSend_38( - obj, - sel, - URLString, - ); - } - - late final __objc_msgSend_38Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(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)>(); - - late final _sel_initWithString_relativeToURL_1 = - _registerName1("initWithString:relativeToURL:"); - instancetype _objc_msgSend_39( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer URLString, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_39( - obj, - sel, - URLString, - baseURL, - ); - } - - late final __objc_msgSend_39Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_39 = __objc_msgSend_39Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_URLWithString_1 = _registerName1("URLWithString:"); - late final _sel_URLWithString_relativeToURL_1 = - _registerName1("URLWithString:relativeToURL:"); - late final _sel_initWithString_encodingInvalidCharacters_1 = - _registerName1("initWithString:encodingInvalidCharacters:"); - instancetype _objc_msgSend_40( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer URLString, - bool encodingInvalidCharacters, - ) { - return __objc_msgSend_40( - obj, - sel, - URLString, - encodingInvalidCharacters, - ); - } - - late final __objc_msgSend_40Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_40 = __objc_msgSend_40Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_URLWithString_encodingInvalidCharacters_1 = - _registerName1("URLWithString:encodingInvalidCharacters:"); - late final _sel_initWithDataRepresentation_relativeToURL_1 = - _registerName1("initWithDataRepresentation:relativeToURL:"); - instancetype _objc_msgSend_41( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_41( - obj, - sel, - data, - baseURL, - ); - } - - late final __objc_msgSend_41Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_41 = __objc_msgSend_41Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_URLWithDataRepresentation_relativeToURL_1 = - _registerName1("URLWithDataRepresentation:relativeToURL:"); - ffi.Pointer _objc_msgSend_42( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_42( - obj, - sel, - data, - baseURL, - ); - } - - late final __objc_msgSend_42Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_42 = __objc_msgSend_42Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1 = - _registerName1("initAbsoluteURLWithDataRepresentation:relativeToURL:"); - late final _sel_absoluteURLWithDataRepresentation_relativeToURL_1 = - _registerName1("absoluteURLWithDataRepresentation:relativeToURL:"); - late final _sel_dataRepresentation1 = _registerName1("dataRepresentation"); - ffi.Pointer _objc_msgSend_43( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_43( - obj, - sel, - ); - } - - late final __objc_msgSend_43Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_43 = __objc_msgSend_43Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_absoluteString1 = _registerName1("absoluteString"); - ffi.Pointer _objc_msgSend_44( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_44( - obj, - sel, - ); - } - - late final __objc_msgSend_44Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_44 = __objc_msgSend_44Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_relativeString1 = _registerName1("relativeString"); - late final _sel_baseURL1 = _registerName1("baseURL"); - ffi.Pointer _objc_msgSend_45( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_45( - obj, - sel, - ); - } - - late final __objc_msgSend_45Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_45 = __objc_msgSend_45Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_absoluteURL1 = _registerName1("absoluteURL"); - late final _sel_scheme1 = _registerName1("scheme"); - late final _sel_resourceSpecifier1 = _registerName1("resourceSpecifier"); - late final _sel_host1 = _registerName1("host"); - late final _class_NSNumber1 = _getClass1("NSNumber"); - late final _class_NSValue1 = _getClass1("NSValue"); - late final _sel_getValue_size_1 = _registerName1("getValue:size:"); - late final _sel_objCType1 = _registerName1("objCType"); - late final _sel_initWithBytes_objCType_1 = - _registerName1("initWithBytes:objCType:"); - instancetype _objc_msgSend_46( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer type, - ) { - return __objc_msgSend_46( - obj, - sel, - value, - type, - ); - } - - late final __objc_msgSend_46Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_46 = __objc_msgSend_46Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithCoder_1 = _registerName1("initWithCoder:"); - instancetype _objc_msgSend_47( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer coder, - ) { - return __objc_msgSend_47( - obj, - sel, - coder, - ); - } - - late final __objc_msgSend_47Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_47 = __objc_msgSend_47Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_valueWithBytes_objCType_1 = - _registerName1("valueWithBytes:objCType:"); - ffi.Pointer _objc_msgSend_48( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer type, - ) { - return __objc_msgSend_48( - obj, - sel, - value, - type, - ); - } - - late final __objc_msgSend_48Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_48 = __objc_msgSend_48Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_value_withObjCType_1 = _registerName1("value:withObjCType:"); - late final _sel_valueWithNonretainedObject_1 = - _registerName1("valueWithNonretainedObject:"); - ffi.Pointer _objc_msgSend_49( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - ) { - return __objc_msgSend_49( - obj, - sel, - anObject, - ); - } - - late final __objc_msgSend_49Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_49 = __objc_msgSend_49Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_nonretainedObjectValue1 = - _registerName1("nonretainedObjectValue"); - late final _sel_valueWithPointer_1 = _registerName1("valueWithPointer:"); - ffi.Pointer _objc_msgSend_50( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer pointer, - ) { - return __objc_msgSend_50( - obj, - sel, - pointer, - ); - } - - late final __objc_msgSend_50Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(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)>(); - - late final _sel_pointerValue1 = _registerName1("pointerValue"); - late final _sel_isEqualToValue_1 = _registerName1("isEqualToValue:"); - bool _objc_msgSend_51( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_51( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_51Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_51 = __objc_msgSend_51Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_getValue_1 = _registerName1("getValue:"); - void _objc_msgSend_52( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_52( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_52Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_52 = __objc_msgSend_52Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_valueWithRange_1 = _registerName1("valueWithRange:"); - ffi.Pointer _objc_msgSend_53( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_53( - obj, - sel, - range, - ); - } - - late final __objc_msgSend_53Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_53 = __objc_msgSend_53Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _sel_rangeValue1 = _registerName1("rangeValue"); - late final _objc_msgSend_useVariants1 = ffi.Abi.current() == ffi.Abi.iosX64 || - ffi.Abi.current() == ffi.Abi.macosX64; - _NSRange _objc_msgSend_54( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_54( - obj, - sel, - ); - } - - late final __objc_msgSend_54Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_54 = __objc_msgSend_54Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer)>(); - - void _objc_msgSend_54_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_54_stret( - stret, - obj, - sel, - ); - } - - late final __objc_msgSend_54_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_54_stret = __objc_msgSend_54_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_valueWithPoint_1 = _registerName1("valueWithPoint:"); - ffi.Pointer _objc_msgSend_55( - ffi.Pointer obj, - ffi.Pointer sel, - CGPoint point, - ) { - return __objc_msgSend_55( - obj, - sel, - point, - ); - } - - late final __objc_msgSend_55Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, CGPoint)>>('objc_msgSend'); - late final __objc_msgSend_55 = __objc_msgSend_55Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, CGPoint)>(); - - late final _sel_valueWithSize_1 = _registerName1("valueWithSize:"); - ffi.Pointer _objc_msgSend_56( - ffi.Pointer obj, - ffi.Pointer sel, - CGSize size, - ) { - return __objc_msgSend_56( - obj, - sel, - size, - ); - } - - late final __objc_msgSend_56Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, CGSize)>>('objc_msgSend'); - late final __objc_msgSend_56 = __objc_msgSend_56Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, CGSize)>(); - - late final _sel_valueWithRect_1 = _registerName1("valueWithRect:"); - ffi.Pointer _objc_msgSend_57( - ffi.Pointer obj, - ffi.Pointer sel, - CGRect rect, - ) { - return __objc_msgSend_57( - obj, - sel, - rect, - ); - } - - late final __objc_msgSend_57Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, CGRect)>>('objc_msgSend'); - late final __objc_msgSend_57 = __objc_msgSend_57Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, CGRect)>(); - - late final _sel_valueWithEdgeInsets_1 = - _registerName1("valueWithEdgeInsets:"); - ffi.Pointer _objc_msgSend_58( - ffi.Pointer obj, - ffi.Pointer sel, - NSEdgeInsets insets, - ) { - return __objc_msgSend_58( - obj, - sel, - insets, - ); - } - - late final __objc_msgSend_58Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSEdgeInsets)>>('objc_msgSend'); - late final __objc_msgSend_58 = __objc_msgSend_58Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSEdgeInsets)>(); - - late final _sel_pointValue1 = _registerName1("pointValue"); - CGPoint _objc_msgSend_59( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_59( - obj, - sel, - ); - } - - late final __objc_msgSend_59Ptr = _lookup< - ffi.NativeFunction< - CGPoint Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_59 = __objc_msgSend_59Ptr.asFunction< - CGPoint Function(ffi.Pointer, ffi.Pointer)>(); - - void _objc_msgSend_59_stret( - ffi.Pointer stret, - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_59_stret( - stret, - obj, - sel, - ); - } - - late final __objc_msgSend_59_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_59_stret = __objc_msgSend_59_stretPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_sizeValue1 = _registerName1("sizeValue"); - CGSize _objc_msgSend_60( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_60( - obj, - sel, - ); - } - - late final __objc_msgSend_60Ptr = _lookup< - ffi.NativeFunction< - CGSize Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_60 = __objc_msgSend_60Ptr.asFunction< - CGSize Function(ffi.Pointer, ffi.Pointer)>(); - - void _objc_msgSend_60_stret( - ffi.Pointer stret, - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_60_stret( - stret, - obj, - sel, - ); - } - - late final __objc_msgSend_60_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_60_stret = __objc_msgSend_60_stretPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_rectValue1 = _registerName1("rectValue"); - CGRect _objc_msgSend_61( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_61( - obj, - sel, - ); - } - - late final __objc_msgSend_61Ptr = _lookup< - ffi.NativeFunction< - CGRect Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_61 = __objc_msgSend_61Ptr.asFunction< - CGRect Function(ffi.Pointer, ffi.Pointer)>(); - - void _objc_msgSend_61_stret( - ffi.Pointer stret, - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_61_stret( - stret, - obj, - sel, - ); - } - - late final __objc_msgSend_61_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_61_stret = __objc_msgSend_61_stretPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_edgeInsetsValue1 = _registerName1("edgeInsetsValue"); - NSEdgeInsets _objc_msgSend_62( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_62( - obj, - sel, - ); - } - - late final __objc_msgSend_62Ptr = _lookup< - ffi.NativeFunction< - NSEdgeInsets Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_62 = __objc_msgSend_62Ptr.asFunction< - NSEdgeInsets Function(ffi.Pointer, ffi.Pointer)>(); - - void _objc_msgSend_62_stret( - ffi.Pointer stret, - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_62_stret( - stret, - obj, - sel, - ); - } - - late final __objc_msgSend_62_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_62_stret = __objc_msgSend_62_stretPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_keyPathsForValuesAffectingValueForKey_1 = - _registerName1("keyPathsForValuesAffectingValueForKey:"); - ffi.Pointer _objc_msgSend_63( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_63( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_63Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_63 = __objc_msgSend_63Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_automaticallyNotifiesObserversForKey_1 = - _registerName1("automaticallyNotifiesObserversForKey:"); - bool _objc_msgSend_64( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_64( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_64Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_64 = __objc_msgSend_64Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSArray1 = _getClass1("NSArray"); - late final _sel_objectAtIndex_1 = _registerName1("objectAtIndex:"); - ffi.Pointer _objc_msgSend_65( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ) { - return __objc_msgSend_65( - obj, - sel, - index, - ); - } - - late final __objc_msgSend_65Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_65 = __objc_msgSend_65Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithObjects_count_1 = - _registerName1("initWithObjects:count:"); - instancetype _objc_msgSend_66( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - int cnt, - ) { - return __objc_msgSend_66( - obj, - sel, - objects, - cnt, - ); - } - - late final __objc_msgSend_66Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_66 = __objc_msgSend_66Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, int)>(); - - late final _sel_arrayByAddingObject_1 = - _registerName1("arrayByAddingObject:"); - ffi.Pointer _objc_msgSend_67( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - ) { - return __objc_msgSend_67( - obj, - sel, - anObject, - ); - } - - late final __objc_msgSend_67Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_67 = __objc_msgSend_67Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_arrayByAddingObjectsFromArray_1 = - _registerName1("arrayByAddingObjectsFromArray:"); - ffi.Pointer _objc_msgSend_68( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherArray, - ) { - return __objc_msgSend_68( - obj, - sel, - otherArray, - ); - } - - late final __objc_msgSend_68Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_68 = __objc_msgSend_68Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_componentsJoinedByString_1 = - _registerName1("componentsJoinedByString:"); - ffi.Pointer _objc_msgSend_69( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer separator, - ) { - return __objc_msgSend_69( - obj, - sel, - separator, - ); - } - - late final __objc_msgSend_69Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_69 = __objc_msgSend_69Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_containsObject_1 = _registerName1("containsObject:"); - late final _sel_descriptionWithLocale_1 = - _registerName1("descriptionWithLocale:"); - ffi.Pointer _objc_msgSend_70( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer locale, - ) { - return __objc_msgSend_70( - obj, - sel, - locale, - ); - } - - late final __objc_msgSend_70Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_70 = __objc_msgSend_70Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_descriptionWithLocale_indent_1 = - _registerName1("descriptionWithLocale:indent:"); - ffi.Pointer _objc_msgSend_71( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer locale, - int level, - ) { - return __objc_msgSend_71( - obj, - sel, - locale, - level, - ); - } - - late final __objc_msgSend_71Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_71 = __objc_msgSend_71Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_firstObjectCommonWithArray_1 = - _registerName1("firstObjectCommonWithArray:"); - ffi.Pointer _objc_msgSend_72( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherArray, - ) { - return __objc_msgSend_72( - obj, - sel, - otherArray, - ); - } - - late final __objc_msgSend_72Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_72 = __objc_msgSend_72Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_getObjects_range_1 = _registerName1("getObjects:range:"); - void _objc_msgSend_73( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - _NSRange range, - ) { - return __objc_msgSend_73( - obj, - sel, - objects, - range, - ); - } - - late final __objc_msgSend_73Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_73 = __objc_msgSend_73Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, _NSRange)>(); - - late final _sel_indexOfObject_1 = _registerName1("indexOfObject:"); - int _objc_msgSend_74( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - ) { - return __objc_msgSend_74( - obj, - sel, - anObject, - ); - } - - late final __objc_msgSend_74Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_74 = __objc_msgSend_74Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_indexOfObject_inRange_1 = - _registerName1("indexOfObject:inRange:"); - int _objc_msgSend_75( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - _NSRange range, - ) { - return __objc_msgSend_75( - obj, - sel, - anObject, - range, - ); - } - - late final __objc_msgSend_75Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_75 = __objc_msgSend_75Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>(); - - late final _sel_indexOfObjectIdenticalTo_1 = - _registerName1("indexOfObjectIdenticalTo:"); - late final _sel_indexOfObjectIdenticalTo_inRange_1 = - _registerName1("indexOfObjectIdenticalTo:inRange:"); - late final _sel_isEqualToArray_1 = _registerName1("isEqualToArray:"); - bool _objc_msgSend_76( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherArray, - ) { - return __objc_msgSend_76( - obj, - sel, - otherArray, - ); - } - - late final __objc_msgSend_76Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_76 = __objc_msgSend_76Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_firstObject1 = _registerName1("firstObject"); - late final _sel_lastObject1 = _registerName1("lastObject"); - late final _sel_objectEnumerator1 = _registerName1("objectEnumerator"); - ffi.Pointer _objc_msgSend_77( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_77( - obj, - sel, - ); - } - - late final __objc_msgSend_77Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_77 = __objc_msgSend_77Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - 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_78( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context, - ) { - return __objc_msgSend_78( - obj, - sel, - comparator, - context, - ); - } - - late final __objc_msgSend_78Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_78 = __objc_msgSend_78Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>(); - - late final _sel_sortedArrayUsingFunction_context_hint_1 = - _registerName1("sortedArrayUsingFunction:context:hint:"); - ffi.Pointer _objc_msgSend_79( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context, - ffi.Pointer hint, - ) { - return __objc_msgSend_79( - obj, - sel, - comparator, - context, - hint, - ); - } - - late final __objc_msgSend_79Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_79 = __objc_msgSend_79Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_sortedArrayUsingSelector_1 = - _registerName1("sortedArrayUsingSelector:"); - ffi.Pointer _objc_msgSend_80( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer comparator, - ) { - return __objc_msgSend_80( - obj, - sel, - comparator, - ); - } - - late final __objc_msgSend_80Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_80 = __objc_msgSend_80Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_subarrayWithRange_1 = _registerName1("subarrayWithRange:"); - ffi.Pointer _objc_msgSend_81( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_81( - obj, - sel, - range, - ); - } - - late final __objc_msgSend_81Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_81 = __objc_msgSend_81Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _class_NSError1 = _getClass1("NSError"); - late final _sel_initWithDomain_code_userInfo_1 = - _registerName1("initWithDomain:code:userInfo:"); - instancetype _objc_msgSend_82( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer domain, - int code, - ffi.Pointer dict, - ) { - return __objc_msgSend_82( - obj, - sel, - domain, - code, - dict, - ); - } - - late final __objc_msgSend_82Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_82 = __objc_msgSend_82Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_errorWithDomain_code_userInfo_1 = - _registerName1("errorWithDomain:code:userInfo:"); - late final _sel_domain1 = _registerName1("domain"); - late final _sel_code1 = _registerName1("code"); - int _objc_msgSend_83( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_83( - obj, - sel, - ); - } - - late final __objc_msgSend_83Ptr = _lookup< - ffi.NativeFunction< - ffi.Long 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_userInfo1 = _registerName1("userInfo"); - late final _sel_localizedDescription1 = - _registerName1("localizedDescription"); - late final _sel_localizedFailureReason1 = - _registerName1("localizedFailureReason"); - late final _sel_localizedRecoverySuggestion1 = - _registerName1("localizedRecoverySuggestion"); - late final _sel_localizedRecoveryOptions1 = - _registerName1("localizedRecoveryOptions"); - ffi.Pointer _objc_msgSend_84( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_84( - obj, - sel, - ); - } - - late final __objc_msgSend_84Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_84 = __objc_msgSend_84Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_recoveryAttempter1 = _registerName1("recoveryAttempter"); - late final _sel_helpAnchor1 = _registerName1("helpAnchor"); - late final _sel_underlyingErrors1 = _registerName1("underlyingErrors"); - ffi.Pointer _objc_msgSend_85( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_85( - obj, - sel, - ); - } - - late final __objc_msgSend_85Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_85 = __objc_msgSend_85Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - ffi.Pointer<_ObjCBlockDesc> _newBlockDesc1() { - final d = - pkg_ffi.calloc.allocate<_ObjCBlockDesc>(ffi.sizeOf<_ObjCBlockDesc>()); - d.ref.reserved = 0; - d.ref.size = ffi.sizeOf<_ObjCBlock>(); - d.ref.copy_helper = ffi.nullptr; - d.ref.dispose_helper = ffi.nullptr; - d.ref.signature = ffi.nullptr; - return d; - } - - late final _objc_block_desc1 = _newBlockDesc1(); - late final _objc_concrete_global_block1 = - _lookup('_NSConcreteGlobalBlock'); - ffi.Pointer<_ObjCBlock> _newBlock1( - ffi.Pointer invoke, ffi.Pointer target) { - final b = pkg_ffi.calloc.allocate<_ObjCBlock>(ffi.sizeOf<_ObjCBlock>()); - b.ref.isa = _objc_concrete_global_block1; - b.ref.flags = 0; - b.ref.reserved = 0; - b.ref.invoke = invoke; - b.ref.target = target; - b.ref.descriptor = _objc_block_desc1; - final copy = _Block_copy(b.cast()).cast<_ObjCBlock>(); - pkg_ffi.calloc.free(b); - return copy; - } - - ffi.Pointer _Block_copy( - ffi.Pointer value, - ) { - return __Block_copy( - value, - ); - } - - late final __Block_copyPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('_Block_copy'); - late final __Block_copy = __Block_copyPtr - .asFunction Function(ffi.Pointer)>(); - - void _Block_release( - ffi.Pointer value, - ) { - return __Block_release( - value, - ); - } - - late final __Block_releasePtr = - _lookup)>>( - '_Block_release'); - late final __Block_release = - __Block_releasePtr.asFunction)>(); - - late final _objc_releaseFinalizer11 = - ffi.NativeFinalizer(__Block_releasePtr.cast()); - late final _sel_setUserInfoValueProviderForDomain_provider_1 = - _registerName1("setUserInfoValueProviderForDomain:provider:"); - void _objc_msgSend_86( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer errorDomain, - ffi.Pointer<_ObjCBlock> provider, - ) { - return __objc_msgSend_86( - obj, - sel, - errorDomain, - provider, - ); - } - - late final __objc_msgSend_86Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_86 = __objc_msgSend_86Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_userInfoValueProviderForDomain_1 = - _registerName1("userInfoValueProviderForDomain:"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_87( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer err, - ffi.Pointer userInfoKey, - ffi.Pointer errorDomain, - ) { - return __objc_msgSend_87( - obj, - sel, - err, - userInfoKey, - errorDomain, - ); - } - - late final __objc_msgSend_87Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_87 = __objc_msgSend_87Ptr.asFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_setKeys_triggerChangeNotificationsForDependentKey_1 = - _registerName1("setKeys:triggerChangeNotificationsForDependentKey:"); - void _objc_msgSend_88( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer dependentKey, - ) { - return __objc_msgSend_88( - obj, - sel, - keys, - dependentKey, - ); - } - - late final __objc_msgSend_88Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_88 = __objc_msgSend_88Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_classFallbacksForKeyedArchiver1 = - _registerName1("classFallbacksForKeyedArchiver"); - late final _sel_classForKeyedUnarchiver1 = - _registerName1("classForKeyedUnarchiver"); - late final _sel_writeToURL_error_1 = _registerName1("writeToURL:error:"); - bool _objc_msgSend_89( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> error, - ) { - return __objc_msgSend_89( - obj, - sel, - url, - error, - ); - } - - late final __objc_msgSend_89Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_89 = __objc_msgSend_89Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_makeObjectsPerformSelector_1 = - _registerName1("makeObjectsPerformSelector:"); - late final _sel_makeObjectsPerformSelector_withObject_1 = - _registerName1("makeObjectsPerformSelector:withObject:"); - void _objc_msgSend_90( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ffi.Pointer argument, - ) { - return __objc_msgSend_90( - obj, - sel, - aSelector, - argument, - ); - } - - late final __objc_msgSend_90Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_90 = __objc_msgSend_90Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSIndexSet1 = _getClass1("NSIndexSet"); - late final _sel_indexSet1 = _registerName1("indexSet"); - late final _sel_indexSetWithIndex_1 = _registerName1("indexSetWithIndex:"); - late final _sel_indexSetWithIndexesInRange_1 = - _registerName1("indexSetWithIndexesInRange:"); - instancetype _objc_msgSend_91( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_91( - obj, - sel, - range, - ); - } - - late final __objc_msgSend_91Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_91 = __objc_msgSend_91Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _sel_initWithIndexesInRange_1 = - _registerName1("initWithIndexesInRange:"); - late final _sel_initWithIndexSet_1 = _registerName1("initWithIndexSet:"); - instancetype _objc_msgSend_92( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexSet, - ) { - return __objc_msgSend_92( - obj, - sel, - indexSet, - ); - } - - late final __objc_msgSend_92Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_92 = __objc_msgSend_92Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithIndex_1 = _registerName1("initWithIndex:"); - late final _sel_isEqualToIndexSet_1 = _registerName1("isEqualToIndexSet:"); - bool _objc_msgSend_93( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexSet, - ) { - return __objc_msgSend_93( - obj, - sel, - indexSet, - ); - } - - late final __objc_msgSend_93Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_93 = __objc_msgSend_93Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_firstIndex1 = _registerName1("firstIndex"); - late final _sel_lastIndex1 = _registerName1("lastIndex"); - late final _sel_indexGreaterThanIndex_1 = - _registerName1("indexGreaterThanIndex:"); - int _objc_msgSend_94( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_94( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_94Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_94 = __objc_msgSend_94Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_indexLessThanIndex_1 = _registerName1("indexLessThanIndex:"); - late final _sel_indexGreaterThanOrEqualToIndex_1 = - _registerName1("indexGreaterThanOrEqualToIndex:"); - late final _sel_indexLessThanOrEqualToIndex_1 = - _registerName1("indexLessThanOrEqualToIndex:"); - late final _sel_getIndexes_maxCount_inIndexRange_1 = - _registerName1("getIndexes:maxCount:inIndexRange:"); - int _objc_msgSend_95( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexBuffer, - int bufferSize, - ffi.Pointer<_NSRange> range, - ) { - return __objc_msgSend_95( - obj, - sel, - indexBuffer, - bufferSize, - range, - ); - } - - late final __objc_msgSend_95Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_NSRange>)>>('objc_msgSend'); - late final __objc_msgSend_95 = __objc_msgSend_95Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_NSRange>)>(); - - late final _sel_countOfIndexesInRange_1 = - _registerName1("countOfIndexesInRange:"); - int _objc_msgSend_96( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_96( - obj, - sel, - range, - ); - } - - late final __objc_msgSend_96Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_96 = __objc_msgSend_96Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _sel_containsIndex_1 = _registerName1("containsIndex:"); - bool _objc_msgSend_97( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_97( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_97Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_97 = __objc_msgSend_97Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_containsIndexesInRange_1 = - _registerName1("containsIndexesInRange:"); - bool _objc_msgSend_98( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_98( - obj, - sel, - range, - ); - } - - late final __objc_msgSend_98Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_98 = __objc_msgSend_98Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _sel_containsIndexes_1 = _registerName1("containsIndexes:"); - late final _sel_intersectsIndexesInRange_1 = - _registerName1("intersectsIndexesInRange:"); - late final _sel_enumerateIndexesUsingBlock_1 = - _registerName1("enumerateIndexesUsingBlock:"); - void _objc_msgSend_99( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_99( - obj, - sel, - block, - ); - } - - late final __objc_msgSend_99Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_99 = __objc_msgSend_99Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_enumerateIndexesWithOptions_usingBlock_1 = - _registerName1("enumerateIndexesWithOptions:usingBlock:"); - void _objc_msgSend_100( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_100( - obj, - sel, - opts, - block, - ); - } - - late final __objc_msgSend_100Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_100 = __objc_msgSend_100Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_enumerateIndexesInRange_options_usingBlock_1 = - _registerName1("enumerateIndexesInRange:options:usingBlock:"); - void _objc_msgSend_101( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_101( - obj, - sel, - range, - opts, - block, - ); - } - - late final __objc_msgSend_101Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_101 = __objc_msgSend_101Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexPassingTest_1 = _registerName1("indexPassingTest:"); - int _objc_msgSend_102( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_102( - obj, - sel, - predicate, - ); - } - - late final __objc_msgSend_102Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_102 = __objc_msgSend_102Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexWithOptions_passingTest_1 = - _registerName1("indexWithOptions:passingTest:"); - int _objc_msgSend_103( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_103( - obj, - sel, - opts, - predicate, - ); - } - - late final __objc_msgSend_103Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_103 = __objc_msgSend_103Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexInRange_options_passingTest_1 = - _registerName1("indexInRange:options:passingTest:"); - int _objc_msgSend_104( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_104( - obj, - sel, - range, - opts, - predicate, - ); - } - - late final __objc_msgSend_104Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_104 = __objc_msgSend_104Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, _NSRange, int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexesPassingTest_1 = _registerName1("indexesPassingTest:"); - ffi.Pointer _objc_msgSend_105( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_105( - obj, - sel, - predicate, - ); - } - - late final __objc_msgSend_105Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_105 = __objc_msgSend_105Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexesWithOptions_passingTest_1 = - _registerName1("indexesWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_106( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_106( - obj, - sel, - opts, - predicate, - ); - } - - late final __objc_msgSend_106Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_106 = __objc_msgSend_106Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexesInRange_options_passingTest_1 = - _registerName1("indexesInRange:options:passingTest:"); - ffi.Pointer _objc_msgSend_107( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_107( - obj, - sel, - range, - opts, - predicate, - ); - } - - late final __objc_msgSend_107Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_107 = __objc_msgSend_107Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_enumerateRangesUsingBlock_1 = - _registerName1("enumerateRangesUsingBlock:"); - void _objc_msgSend_108( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_108( - obj, - sel, - block, - ); - } - - late final __objc_msgSend_108Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_108 = __objc_msgSend_108Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_enumerateRangesWithOptions_usingBlock_1 = - _registerName1("enumerateRangesWithOptions:usingBlock:"); - void _objc_msgSend_109( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_109( - obj, - sel, - opts, - block, - ); - } - - late final __objc_msgSend_109Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_109 = __objc_msgSend_109Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_enumerateRangesInRange_options_usingBlock_1 = - _registerName1("enumerateRangesInRange:options:usingBlock:"); - void _objc_msgSend_110( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_110( - obj, - sel, - range, - opts, - block, - ); - } - - late final __objc_msgSend_110Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_110 = __objc_msgSend_110Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_objectsAtIndexes_1 = _registerName1("objectsAtIndexes:"); - ffi.Pointer _objc_msgSend_111( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexes, - ) { - return __objc_msgSend_111( - obj, - sel, - indexes, - ); - } - - late final __objc_msgSend_111Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_111 = __objc_msgSend_111Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_objectAtIndexedSubscript_1 = - _registerName1("objectAtIndexedSubscript:"); - late final _sel_enumerateObjectsUsingBlock_1 = - _registerName1("enumerateObjectsUsingBlock:"); - void _objc_msgSend_112( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_112( - obj, - sel, - block, - ); - } - - late final __objc_msgSend_112Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_112 = __objc_msgSend_112Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_enumerateObjectsWithOptions_usingBlock_1 = - _registerName1("enumerateObjectsWithOptions:usingBlock:"); - void _objc_msgSend_113( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_113( - obj, - sel, - opts, - block, - ); - } - - late final __objc_msgSend_113Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_113 = __objc_msgSend_113Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_enumerateObjectsAtIndexes_options_usingBlock_1 = - _registerName1("enumerateObjectsAtIndexes:options:usingBlock:"); - void _objc_msgSend_114( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer s, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_114( - obj, - sel, - s, - opts, - block, - ); - } - - late final __objc_msgSend_114Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_114 = __objc_msgSend_114Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexOfObjectPassingTest_1 = - _registerName1("indexOfObjectPassingTest:"); - int _objc_msgSend_115( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_115( - obj, - sel, - predicate, - ); - } - - late final __objc_msgSend_115Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_115 = __objc_msgSend_115Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexOfObjectWithOptions_passingTest_1 = - _registerName1("indexOfObjectWithOptions:passingTest:"); - int _objc_msgSend_116( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_116( - obj, - sel, - opts, - predicate, - ); - } - - late final __objc_msgSend_116Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_116 = __objc_msgSend_116Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexOfObjectAtIndexes_options_passingTest_1 = - _registerName1("indexOfObjectAtIndexes:options:passingTest:"); - int _objc_msgSend_117( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer s, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_117( - obj, - sel, - s, - opts, - predicate, - ); - } - - late final __objc_msgSend_117Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_117 = __objc_msgSend_117Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexesOfObjectsPassingTest_1 = - _registerName1("indexesOfObjectsPassingTest:"); - ffi.Pointer _objc_msgSend_118( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_118( - obj, - sel, - predicate, - ); - } - - late final __objc_msgSend_118Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_118 = __objc_msgSend_118Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexesOfObjectsWithOptions_passingTest_1 = - _registerName1("indexesOfObjectsWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_119( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_119( - obj, - sel, - opts, - predicate, - ); - } - - late final __objc_msgSend_119Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_119 = __objc_msgSend_119Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexesOfObjectsAtIndexes_options_passingTest_1 = - _registerName1("indexesOfObjectsAtIndexes:options:passingTest:"); - ffi.Pointer _objc_msgSend_120( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer s, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_120( - obj, - sel, - s, - opts, - predicate, - ); - } - - late final __objc_msgSend_120Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_120 = __objc_msgSend_120Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_sortedArrayUsingComparator_1 = - _registerName1("sortedArrayUsingComparator:"); - ffi.Pointer _objc_msgSend_121( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> cmptr, - ) { - return __objc_msgSend_121( - obj, - sel, - cmptr, - ); - } - - late final __objc_msgSend_121Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_121 = __objc_msgSend_121Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_sortedArrayWithOptions_usingComparator_1 = - _registerName1("sortedArrayWithOptions:usingComparator:"); - ffi.Pointer _objc_msgSend_122( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> cmptr, - ) { - return __objc_msgSend_122( - obj, - sel, - opts, - cmptr, - ); - } - - late final __objc_msgSend_122Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_122 = __objc_msgSend_122Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexOfObject_inSortedRange_options_usingComparator_1 = - _registerName1("indexOfObject:inSortedRange:options:usingComparator:"); - int _objc_msgSend_123( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer obj1, - _NSRange r, - int opts, - ffi.Pointer<_ObjCBlock> cmp, - ) { - return __objc_msgSend_123( - obj, - sel, - obj1, - r, - opts, - cmp, - ); - } - - late final __objc_msgSend_123Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_123 = __objc_msgSend_123Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_array1 = _registerName1("array"); - late final _sel_arrayWithObject_1 = _registerName1("arrayWithObject:"); - instancetype _objc_msgSend_124( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - ) { - return __objc_msgSend_124( - obj, - sel, - anObject, - ); - } - - late final __objc_msgSend_124Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_124 = __objc_msgSend_124Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_arrayWithObjects_count_1 = - _registerName1("arrayWithObjects:count:"); - late final _sel_arrayWithObjects_1 = _registerName1("arrayWithObjects:"); - late final _sel_arrayWithArray_1 = _registerName1("arrayWithArray:"); - instancetype _objc_msgSend_125( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer array, - ) { - return __objc_msgSend_125( - obj, - sel, - array, - ); - } - - late final __objc_msgSend_125Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_125 = __objc_msgSend_125Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithObjects_1 = _registerName1("initWithObjects:"); - late final _sel_initWithArray_1 = _registerName1("initWithArray:"); - late final _sel_initWithArray_copyItems_1 = - _registerName1("initWithArray:copyItems:"); - instancetype _objc_msgSend_126( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer array, - bool flag, - ) { - return __objc_msgSend_126( - obj, - sel, - array, - flag, - ); - } - - late final __objc_msgSend_126Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_126 = __objc_msgSend_126Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_initWithContentsOfURL_error_1 = - _registerName1("initWithContentsOfURL:error:"); - ffi.Pointer _objc_msgSend_127( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> error, - ) { - return __objc_msgSend_127( - obj, - sel, - url, - error, - ); - } - - late final __objc_msgSend_127Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_127 = __objc_msgSend_127Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_arrayWithContentsOfURL_error_1 = - _registerName1("arrayWithContentsOfURL:error:"); - late final _sel_differenceFromArray_withOptions_usingEquivalenceTest_1 = - _registerName1("differenceFromArray:withOptions:usingEquivalenceTest:"); - ffi.Pointer _objc_msgSend_128( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - int options, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_128( - obj, - sel, - other, - options, - block, - ); - } - - late final __objc_msgSend_128Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_128 = __objc_msgSend_128Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_differenceFromArray_withOptions_1 = - _registerName1("differenceFromArray:withOptions:"); - ffi.Pointer _objc_msgSend_129( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - int options, - ) { - return __objc_msgSend_129( - obj, - sel, - other, - options, - ); - } - - late final __objc_msgSend_129Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_129 = __objc_msgSend_129Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_differenceFromArray_1 = - _registerName1("differenceFromArray:"); - late final _sel_arrayByApplyingDifference_1 = - _registerName1("arrayByApplyingDifference:"); - ffi.Pointer _objc_msgSend_130( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer difference, - ) { - return __objc_msgSend_130( - obj, - sel, - difference, - ); - } - - late final __objc_msgSend_130Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_130 = __objc_msgSend_130Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_getObjects_1 = _registerName1("getObjects:"); - void _objc_msgSend_131( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - ) { - return __objc_msgSend_131( - obj, - sel, - objects, - ); - } - - late final __objc_msgSend_131Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_131 = __objc_msgSend_131Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_arrayWithContentsOfFile_1 = - _registerName1("arrayWithContentsOfFile:"); - ffi.Pointer _objc_msgSend_132( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ) { - return __objc_msgSend_132( - obj, - sel, - path, - ); - } - - late final __objc_msgSend_132Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_132 = __objc_msgSend_132Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_arrayWithContentsOfURL_1 = - _registerName1("arrayWithContentsOfURL:"); - ffi.Pointer _objc_msgSend_133( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ) { - return __objc_msgSend_133( - obj, - sel, - url, - ); - } - - late final __objc_msgSend_133Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_133 = __objc_msgSend_133Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithContentsOfFile_1 = - _registerName1("initWithContentsOfFile:"); - late final _sel_initWithContentsOfURL_1 = - _registerName1("initWithContentsOfURL:"); - late final _sel_writeToURL_atomically_1 = - _registerName1("writeToURL:atomically:"); - bool _objc_msgSend_134( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - bool atomically, - ) { - return __objc_msgSend_134( - obj, - sel, - url, - atomically, - ); - } - - late final __objc_msgSend_134Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_134 = __objc_msgSend_134Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_pathsMatchingExtensions_1 = - _registerName1("pathsMatchingExtensions:"); - late final _sel_valueForKey_1 = _registerName1("valueForKey:"); - late final _sel_setValue_forKey_1 = _registerName1("setValue:forKey:"); - void _objc_msgSend_135( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer key, - ) { - return __objc_msgSend_135( - obj, - sel, - value, - key, - ); - } - - late final __objc_msgSend_135Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_135 = __objc_msgSend_135Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_addObserver_toObjectsAtIndexes_forKeyPath_options_context_1 = - _registerName1( - "addObserver:toObjectsAtIndexes:forKeyPath:options:context:"); - void _objc_msgSend_136( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer observer, - ffi.Pointer indexes, - ffi.Pointer keyPath, - int options, - ffi.Pointer context, - ) { - return __objc_msgSend_136( - obj, - sel, - observer, - indexes, - keyPath, - options, - context, - ); - } - - late final __objc_msgSend_136Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_136 = __objc_msgSend_136Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - late final _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_context_1 = - _registerName1("removeObserver:fromObjectsAtIndexes:forKeyPath:context:"); - void _objc_msgSend_137( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer observer, - ffi.Pointer indexes, - ffi.Pointer keyPath, - ffi.Pointer context, - ) { - return __objc_msgSend_137( - obj, - sel, - observer, - indexes, - keyPath, - context, - ); - } - - late final __objc_msgSend_137Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_137 = __objc_msgSend_137Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_1 = - _registerName1("removeObserver:fromObjectsAtIndexes:forKeyPath:"); - void _objc_msgSend_138( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer observer, - ffi.Pointer indexes, - ffi.Pointer keyPath, - ) { - return __objc_msgSend_138( - obj, - sel, - observer, - indexes, - keyPath, - ); - } - - late final __objc_msgSend_138Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_138 = __objc_msgSend_138Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_addObserver_forKeyPath_options_context_1 = - _registerName1("addObserver:forKeyPath:options:context:"); - void _objc_msgSend_139( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer observer, - ffi.Pointer keyPath, - int options, - ffi.Pointer context, - ) { - return __objc_msgSend_139( - obj, - sel, - observer, - keyPath, - options, - context, - ); - } - - late final __objc_msgSend_139Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_139 = __objc_msgSend_139Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - late final _sel_removeObserver_forKeyPath_context_1 = - _registerName1("removeObserver:forKeyPath:context:"); - void _objc_msgSend_140( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer observer, - ffi.Pointer keyPath, - ffi.Pointer context, - ) { - return __objc_msgSend_140( - obj, - sel, - observer, - keyPath, - context, - ); - } - - late final __objc_msgSend_140Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_140 = __objc_msgSend_140Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_removeObserver_forKeyPath_1 = - _registerName1("removeObserver:forKeyPath:"); - void _objc_msgSend_141( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer observer, - ffi.Pointer keyPath, - ) { - return __objc_msgSend_141( - obj, - sel, - observer, - keyPath, - ); - } - - late final __objc_msgSend_141Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_141 = __objc_msgSend_141Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_sortedArrayUsingDescriptors_1 = - _registerName1("sortedArrayUsingDescriptors:"); - late final _class_NSPredicate1 = _getClass1("NSPredicate"); - late final _sel_predicateWithFormat_argumentArray_1 = - _registerName1("predicateWithFormat:argumentArray:"); - ffi.Pointer _objc_msgSend_142( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer predicateFormat, - ffi.Pointer arguments, - ) { - return __objc_msgSend_142( - obj, - sel, - predicateFormat, - arguments, - ); - } - - late final __objc_msgSend_142Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_142 = __objc_msgSend_142Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_predicateWithFormat_1 = - _registerName1("predicateWithFormat:"); - ffi.Pointer _objc_msgSend_143( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer predicateFormat, - ) { - return __objc_msgSend_143( - obj, - sel, - predicateFormat, - ); - } - - late final __objc_msgSend_143Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_143 = __objc_msgSend_143Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_predicateWithFormat_arguments_1 = - _registerName1("predicateWithFormat:arguments:"); - ffi.Pointer _objc_msgSend_144( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer predicateFormat, - ffi.Pointer<__va_list_tag> argList, - ) { - return __objc_msgSend_144( - obj, - sel, - predicateFormat, - argList, - ); - } - - late final __objc_msgSend_144Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>('objc_msgSend'); - late final __objc_msgSend_144 = __objc_msgSend_144Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>(); - - late final _sel_predicateFromMetadataQueryString_1 = - _registerName1("predicateFromMetadataQueryString:"); - ffi.Pointer _objc_msgSend_145( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer queryString, - ) { - return __objc_msgSend_145( - obj, - sel, - queryString, - ); - } - - late final __objc_msgSend_145Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(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)>(); - - late final _sel_predicateWithValue_1 = _registerName1("predicateWithValue:"); - ffi.Pointer _objc_msgSend_146( - ffi.Pointer obj, - ffi.Pointer sel, - bool value, - ) { - return __objc_msgSend_146( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_146Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_146 = __objc_msgSend_146Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _class_NSDictionary1 = _getClass1("NSDictionary"); - late final _sel_objectForKey_1 = _registerName1("objectForKey:"); - late final _sel_keyEnumerator1 = _registerName1("keyEnumerator"); - late final _sel_initWithObjects_forKeys_count_1 = - _registerName1("initWithObjects:forKeys:count:"); - instancetype _objc_msgSend_147( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt, - ) { - return __objc_msgSend_147( - obj, - sel, - objects, - keys, - cnt, - ); - } - - late final __objc_msgSend_147Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_147 = __objc_msgSend_147Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - int)>(); - - late final _sel_allKeys1 = _registerName1("allKeys"); - 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_148( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherDictionary, - ) { - return __objc_msgSend_148( - obj, - sel, - otherDictionary, - ); - } - - late final __objc_msgSend_148Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_148 = __objc_msgSend_148Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_objectsForKeys_notFoundMarker_1 = - _registerName1("objectsForKeys:notFoundMarker:"); - ffi.Pointer _objc_msgSend_149( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer marker, - ) { - return __objc_msgSend_149( - obj, - sel, - keys, - marker, - ); - } - - late final __objc_msgSend_149Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_149 = __objc_msgSend_149Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_keysSortedByValueUsingSelector_1 = - _registerName1("keysSortedByValueUsingSelector:"); - late final _sel_getObjects_andKeys_count_1 = - _registerName1("getObjects:andKeys:count:"); - void _objc_msgSend_150( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - ffi.Pointer> keys, - int count, - ) { - return __objc_msgSend_150( - obj, - sel, - objects, - keys, - count, - ); - } - - late final __objc_msgSend_150Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_150 = __objc_msgSend_150Ptr.asFunction< - void 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_151( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_151( - obj, - sel, - block, - ); - } - - late final __objc_msgSend_151Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_151 = __objc_msgSend_151Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_enumerateKeysAndObjectsWithOptions_usingBlock_1 = - _registerName1("enumerateKeysAndObjectsWithOptions:usingBlock:"); - void _objc_msgSend_152( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_152( - obj, - sel, - opts, - block, - ); - } - - late final __objc_msgSend_152Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_152 = __objc_msgSend_152Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_keysSortedByValueUsingComparator_1 = - _registerName1("keysSortedByValueUsingComparator:"); - late final _sel_keysSortedByValueWithOptions_usingComparator_1 = - _registerName1("keysSortedByValueWithOptions:usingComparator:"); - late final _sel_keysOfEntriesPassingTest_1 = - _registerName1("keysOfEntriesPassingTest:"); - ffi.Pointer _objc_msgSend_153( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_153( - obj, - sel, - predicate, - ); - } - - 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_keysOfEntriesWithOptions_passingTest_1 = - _registerName1("keysOfEntriesWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_154( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_154( - obj, - sel, - opts, - predicate, - ); - } - - late final __objc_msgSend_154Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_154 = __objc_msgSend_154Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_getObjects_andKeys_1 = _registerName1("getObjects:andKeys:"); - void _objc_msgSend_155( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - ffi.Pointer> keys, - ) { - return __objc_msgSend_155( - obj, - sel, - objects, - keys, - ); - } - - late final __objc_msgSend_155Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_155 = __objc_msgSend_155Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _sel_dictionaryWithContentsOfFile_1 = - _registerName1("dictionaryWithContentsOfFile:"); - ffi.Pointer _objc_msgSend_156( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ) { - return __objc_msgSend_156( - obj, - sel, - path, - ); - } - - late final __objc_msgSend_156Ptr = _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)>(); - - late final _sel_dictionaryWithContentsOfURL_1 = - _registerName1("dictionaryWithContentsOfURL:"); - ffi.Pointer _objc_msgSend_157( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ) { - return __objc_msgSend_157( - obj, - sel, - url, - ); - } - - late final __objc_msgSend_157Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_157 = __objc_msgSend_157Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_dictionary1 = _registerName1("dictionary"); - late final _sel_dictionaryWithObject_forKey_1 = - _registerName1("dictionaryWithObject:forKey:"); - instancetype _objc_msgSend_158( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer object, - ffi.Pointer key, - ) { - return __objc_msgSend_158( - obj, - sel, - object, - key, - ); - } - - late final __objc_msgSend_158Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_158 = __objc_msgSend_158Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_dictionaryWithObjects_forKeys_count_1 = - _registerName1("dictionaryWithObjects:forKeys:count:"); - late final _sel_dictionaryWithObjectsAndKeys_1 = - _registerName1("dictionaryWithObjectsAndKeys:"); - late final _sel_dictionaryWithDictionary_1 = - _registerName1("dictionaryWithDictionary:"); - instancetype _objc_msgSend_159( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer dict, - ) { - return __objc_msgSend_159( - obj, - sel, - dict, - ); - } - - late final __objc_msgSend_159Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_159 = __objc_msgSend_159Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_dictionaryWithObjects_forKeys_1 = - _registerName1("dictionaryWithObjects:forKeys:"); - instancetype _objc_msgSend_160( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer objects, - ffi.Pointer keys, - ) { - return __objc_msgSend_160( - obj, - sel, - objects, - keys, - ); - } - - late final __objc_msgSend_160Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_160 = __objc_msgSend_160Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithObjectsAndKeys_1 = - _registerName1("initWithObjectsAndKeys:"); - late final _sel_initWithDictionary_1 = _registerName1("initWithDictionary:"); - late final _sel_initWithDictionary_copyItems_1 = - _registerName1("initWithDictionary:copyItems:"); - instancetype _objc_msgSend_161( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherDictionary, - bool flag, - ) { - return __objc_msgSend_161( - obj, - sel, - otherDictionary, - flag, - ); - } - - late final __objc_msgSend_161Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_161 = __objc_msgSend_161Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_initWithObjects_forKeys_1 = - _registerName1("initWithObjects:forKeys:"); - ffi.Pointer _objc_msgSend_162( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> error, - ) { - return __objc_msgSend_162( - obj, - sel, - url, - error, - ); - } - - late final __objc_msgSend_162Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - 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, - 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_163( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer state, - ffi.Pointer> buffer, - int len, - ) { - return __objc_msgSend_163( - obj, - sel, - state, - buffer, - len, - ); - } - - late final __objc_msgSend_163Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_163 = __objc_msgSend_163Ptr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - int)>(); - - late final _sel_fileSize1 = _registerName1("fileSize"); - int _objc_msgSend_164( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_164( - obj, - sel, - ); - } - - late final __objc_msgSend_164Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLongLong Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_164 = __objc_msgSend_164Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSDate1 = _getClass1("NSDate"); - late final _sel_timeIntervalSinceReferenceDate1 = - _registerName1("timeIntervalSinceReferenceDate"); - double _objc_msgSend_165( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_165( - obj, - sel, - ); - } - - late final __objc_msgSend_165Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_165 = __objc_msgSend_165Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer)>(); - - double _objc_msgSend_165_fpret( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_165_fpret( - obj, - sel, - ); - } - - late final __objc_msgSend_165_fpretPtr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_fpret'); - late final __objc_msgSend_165_fpret = __objc_msgSend_165_fpretPtr.asFunction< - double Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithTimeIntervalSinceReferenceDate_1 = - _registerName1("initWithTimeIntervalSinceReferenceDate:"); - instancetype _objc_msgSend_166( - ffi.Pointer obj, - ffi.Pointer sel, - double ti, - ) { - return __objc_msgSend_166( - obj, - sel, - ti, - ); - } - - late final __objc_msgSend_166Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_166 = __objc_msgSend_166Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, double)>(); - - late final _sel_timeIntervalSinceDate_1 = - _registerName1("timeIntervalSinceDate:"); - double _objc_msgSend_167( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anotherDate, - ) { - return __objc_msgSend_167( - obj, - sel, - anotherDate, - ); - } - - late final __objc_msgSend_167Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_167 = __objc_msgSend_167Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - double _objc_msgSend_167_fpret( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anotherDate, - ) { - return __objc_msgSend_167_fpret( - obj, - sel, - anotherDate, - ); - } - - late final __objc_msgSend_167_fpretPtr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_fpret'); - late final __objc_msgSend_167_fpret = __objc_msgSend_167_fpretPtr.asFunction< - double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_timeIntervalSinceNow1 = - _registerName1("timeIntervalSinceNow"); - late final _sel_timeIntervalSince19701 = - _registerName1("timeIntervalSince1970"); - late final _sel_addTimeInterval_1 = _registerName1("addTimeInterval:"); - late final _sel_dateByAddingTimeInterval_1 = - _registerName1("dateByAddingTimeInterval:"); - late final _sel_earlierDate_1 = _registerName1("earlierDate:"); - ffi.Pointer _objc_msgSend_168( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anotherDate, - ) { - return __objc_msgSend_168( - obj, - sel, - anotherDate, - ); - } - - late final __objc_msgSend_168Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_168 = __objc_msgSend_168Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_laterDate_1 = _registerName1("laterDate:"); - late final _sel_compare_1 = _registerName1("compare:"); - int _objc_msgSend_169( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - ) { - return __objc_msgSend_169( - obj, - sel, - other, - ); - } - - late final __objc_msgSend_169Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_169 = __objc_msgSend_169Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_isEqualToDate_1 = _registerName1("isEqualToDate:"); - bool _objc_msgSend_170( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherDate, - ) { - return __objc_msgSend_170( - obj, - sel, - otherDate, - ); - } - - late final __objc_msgSend_170Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_170 = __objc_msgSend_170Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _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_171( - ffi.Pointer obj, - ffi.Pointer sel, - double secsToBeAdded, - ffi.Pointer date, - ) { - return __objc_msgSend_171( - obj, - sel, - secsToBeAdded, - date, - ); - } - - late final __objc_msgSend_171Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Double, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_171 = __objc_msgSend_171Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - double, ffi.Pointer)>(); - - late final _sel_distantFuture1 = _registerName1("distantFuture"); - ffi.Pointer _objc_msgSend_172( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_172( - obj, - sel, - ); - } - - late final __objc_msgSend_172Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_172 = __objc_msgSend_172Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_distantPast1 = _registerName1("distantPast"); - late final _sel_now1 = _registerName1("now"); - late final _sel_initWithTimeIntervalSinceNow_1 = - _registerName1("initWithTimeIntervalSinceNow:"); - late final _sel_initWithTimeIntervalSince1970_1 = - _registerName1("initWithTimeIntervalSince1970:"); - late final _sel_initWithTimeInterval_sinceDate_1 = - _registerName1("initWithTimeInterval:sinceDate:"); - late final _sel_dateWithNaturalLanguageString_locale_1 = - _registerName1("dateWithNaturalLanguageString:locale:"); - ffi.Pointer _objc_msgSend_173( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - ffi.Pointer locale, - ) { - return __objc_msgSend_173( - obj, - sel, - string, - locale, - ); - } - - late final __objc_msgSend_173Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_173 = __objc_msgSend_173Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_dateWithNaturalLanguageString_1 = - _registerName1("dateWithNaturalLanguageString:"); - late final _sel_dateWithString_1 = _registerName1("dateWithString:"); - late final _class_NSCalendarDate1 = _getClass1("NSCalendarDate"); - late final _sel_calendarDate1 = _registerName1("calendarDate"); - late final _sel_dateWithString_calendarFormat_locale_1 = - _registerName1("dateWithString:calendarFormat:locale:"); - ffi.Pointer _objc_msgSend_174( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer description, - ffi.Pointer format, - ffi.Pointer locale, - ) { - return __objc_msgSend_174( - obj, - sel, - description, - format, - locale, - ); - } - - late final __objc_msgSend_174Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_174 = __objc_msgSend_174Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_dateWithString_calendarFormat_1 = - _registerName1("dateWithString:calendarFormat:"); - ffi.Pointer _objc_msgSend_175( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer description, - ffi.Pointer format, - ) { - return __objc_msgSend_175( - obj, - sel, - description, - format, - ); - } - - late final __objc_msgSend_175Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_175 = __objc_msgSend_175Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSTimeZone1 = _getClass1("NSTimeZone"); - late final _sel_name1 = _registerName1("name"); - late final _sel_data1 = _registerName1("data"); - late final _sel_secondsFromGMTForDate_1 = - _registerName1("secondsFromGMTForDate:"); - int _objc_msgSend_176( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aDate, - ) { - return __objc_msgSend_176( - obj, - sel, - aDate, - ); - } - - late final __objc_msgSend_176Ptr = _lookup< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_176 = __objc_msgSend_176Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_abbreviationForDate_1 = - _registerName1("abbreviationForDate:"); - ffi.Pointer _objc_msgSend_177( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aDate, - ) { - return __objc_msgSend_177( - obj, - sel, - aDate, - ); - } - - late final __objc_msgSend_177Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(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)>(); - - late final _sel_isDaylightSavingTimeForDate_1 = - _registerName1("isDaylightSavingTimeForDate:"); - late final _sel_daylightSavingTimeOffsetForDate_1 = - _registerName1("daylightSavingTimeOffsetForDate:"); - late final _sel_nextDaylightSavingTimeTransitionAfterDate_1 = - _registerName1("nextDaylightSavingTimeTransitionAfterDate:"); - ffi.Pointer _objc_msgSend_178( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aDate, - ) { - return __objc_msgSend_178( - obj, - sel, - aDate, - ); - } - - late final __objc_msgSend_178Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_178 = __objc_msgSend_178Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_systemTimeZone1 = _registerName1("systemTimeZone"); - ffi.Pointer _objc_msgSend_179( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_179( - obj, - sel, - ); - } - - late final __objc_msgSend_179Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_179 = __objc_msgSend_179Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_resetSystemTimeZone1 = _registerName1("resetSystemTimeZone"); - late final _sel_defaultTimeZone1 = _registerName1("defaultTimeZone"); - late final _sel_setDefaultTimeZone_1 = _registerName1("setDefaultTimeZone:"); - void _objc_msgSend_180( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_180( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_180Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_180 = __objc_msgSend_180Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_localTimeZone1 = _registerName1("localTimeZone"); - late final _sel_knownTimeZoneNames1 = _registerName1("knownTimeZoneNames"); - late final _sel_abbreviationDictionary1 = - _registerName1("abbreviationDictionary"); - ffi.Pointer _objc_msgSend_181( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_181( - obj, - sel, - ); - } - - late final __objc_msgSend_181Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_181 = __objc_msgSend_181Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setAbbreviationDictionary_1 = - _registerName1("setAbbreviationDictionary:"); - void _objc_msgSend_182( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_182( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_182Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_182 = __objc_msgSend_182Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_timeZoneDataVersion1 = _registerName1("timeZoneDataVersion"); - late final _sel_secondsFromGMT1 = _registerName1("secondsFromGMT"); - late final _sel_abbreviation1 = _registerName1("abbreviation"); - late final _sel_isDaylightSavingTime1 = - _registerName1("isDaylightSavingTime"); - late final _sel_daylightSavingTimeOffset1 = - _registerName1("daylightSavingTimeOffset"); - late final _sel_nextDaylightSavingTimeTransition1 = - _registerName1("nextDaylightSavingTimeTransition"); - ffi.Pointer _objc_msgSend_183( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_183( - obj, - sel, - ); - } - - late final __objc_msgSend_183Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_183 = __objc_msgSend_183Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_isEqualToTimeZone_1 = _registerName1("isEqualToTimeZone:"); - bool _objc_msgSend_184( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aTimeZone, - ) { - return __objc_msgSend_184( - obj, - sel, - aTimeZone, - ); - } - - late final __objc_msgSend_184Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_184 = __objc_msgSend_184Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSLocale1 = _getClass1("NSLocale"); - late final _sel_displayNameForKey_value_1 = - _registerName1("displayNameForKey:value:"); - ffi.Pointer _objc_msgSend_185( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ffi.Pointer value, - ) { - return __objc_msgSend_185( - obj, - sel, - key, - value, - ); - } - - late final __objc_msgSend_185Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_185 = __objc_msgSend_185Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithLocaleIdentifier_1 = - _registerName1("initWithLocaleIdentifier:"); - late final _sel_localeIdentifier1 = _registerName1("localeIdentifier"); - late final _sel_localizedStringForLocaleIdentifier_1 = - _registerName1("localizedStringForLocaleIdentifier:"); - late final _sel_languageCode1 = _registerName1("languageCode"); - late final _sel_localizedStringForLanguageCode_1 = - _registerName1("localizedStringForLanguageCode:"); - ffi.Pointer _objc_msgSend_186( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer languageCode, - ) { - return __objc_msgSend_186( - obj, - sel, - languageCode, - ); - } - - late final __objc_msgSend_186Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_186 = __objc_msgSend_186Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_languageIdentifier1 = _registerName1("languageIdentifier"); - late final _sel_countryCode1 = _registerName1("countryCode"); - late final _sel_localizedStringForCountryCode_1 = - _registerName1("localizedStringForCountryCode:"); - late final _sel_regionCode1 = _registerName1("regionCode"); - late final _sel_scriptCode1 = _registerName1("scriptCode"); - late final _sel_localizedStringForScriptCode_1 = - _registerName1("localizedStringForScriptCode:"); - late final _sel_variantCode1 = _registerName1("variantCode"); - late final _sel_localizedStringForVariantCode_1 = - _registerName1("localizedStringForVariantCode:"); - late final _class_NSCharacterSet1 = _getClass1("NSCharacterSet"); - late final _sel_controlCharacterSet1 = _registerName1("controlCharacterSet"); - ffi.Pointer _objc_msgSend_187( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_187( - obj, - sel, - ); - } - - late final __objc_msgSend_187Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_187 = __objc_msgSend_187Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _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_188( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange aRange, - ) { - return __objc_msgSend_188( - obj, - sel, - aRange, - ); - } - - late final __objc_msgSend_188Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_188 = __objc_msgSend_188Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _sel_characterSetWithCharactersInString_1 = - _registerName1("characterSetWithCharactersInString:"); - ffi.Pointer _objc_msgSend_189( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aString, - ) { - return __objc_msgSend_189( - obj, - sel, - aString, - ); - } - - late final __objc_msgSend_189Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_189 = __objc_msgSend_189Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_characterSetWithBitmapRepresentation_1 = - _registerName1("characterSetWithBitmapRepresentation:"); - ffi.Pointer _objc_msgSend_190( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ) { - return __objc_msgSend_190( - obj, - sel, - data, - ); - } - - late final __objc_msgSend_190Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_190 = __objc_msgSend_190Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_characterSetWithContentsOfFile_1 = - _registerName1("characterSetWithContentsOfFile:"); - ffi.Pointer _objc_msgSend_191( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer fName, - ) { - return __objc_msgSend_191( - obj, - sel, - fName, - ); - } - - late final __objc_msgSend_191Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_191 = __objc_msgSend_191Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - instancetype _objc_msgSend_192( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer coder, - ) { - return __objc_msgSend_192( - obj, - sel, - coder, - ); - } - - late final __objc_msgSend_192Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_192 = __objc_msgSend_192Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_characterIsMember_1 = _registerName1("characterIsMember:"); - bool _objc_msgSend_193( - ffi.Pointer obj, - ffi.Pointer sel, - int aCharacter, - ) { - return __objc_msgSend_193( - obj, - sel, - aCharacter, - ); - } - - late final __objc_msgSend_193Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedShort)>>('objc_msgSend'); - late final __objc_msgSend_193 = __objc_msgSend_193Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_bitmapRepresentation1 = - _registerName1("bitmapRepresentation"); - late final _sel_invertedSet1 = _registerName1("invertedSet"); - late final _sel_longCharacterIsMember_1 = - _registerName1("longCharacterIsMember:"); - bool _objc_msgSend_194( - ffi.Pointer obj, - ffi.Pointer sel, - int theLongChar, - ) { - return __objc_msgSend_194( - obj, - sel, - theLongChar, - ); - } - - late final __objc_msgSend_194Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_194 = __objc_msgSend_194Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_isSupersetOfSet_1 = _registerName1("isSupersetOfSet:"); - bool _objc_msgSend_195( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer theOtherSet, - ) { - return __objc_msgSend_195( - obj, - sel, - theOtherSet, - ); - } - - late final __objc_msgSend_195Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_195 = __objc_msgSend_195Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_hasMemberInPlane_1 = _registerName1("hasMemberInPlane:"); - bool _objc_msgSend_196( - ffi.Pointer obj, - ffi.Pointer sel, - int thePlane, - ) { - return __objc_msgSend_196( - obj, - sel, - thePlane, - ); - } - - late final __objc_msgSend_196Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Uint8)>>('objc_msgSend'); - late final __objc_msgSend_196 = __objc_msgSend_196Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_URLUserAllowedCharacterSet1 = - _registerName1("URLUserAllowedCharacterSet"); - late final _sel_URLPasswordAllowedCharacterSet1 = - _registerName1("URLPasswordAllowedCharacterSet"); - late final _sel_URLHostAllowedCharacterSet1 = - _registerName1("URLHostAllowedCharacterSet"); - late final _sel_URLPathAllowedCharacterSet1 = - _registerName1("URLPathAllowedCharacterSet"); - late final _sel_URLQueryAllowedCharacterSet1 = - _registerName1("URLQueryAllowedCharacterSet"); - late final _sel_URLFragmentAllowedCharacterSet1 = - _registerName1("URLFragmentAllowedCharacterSet"); - late final _sel_exemplarCharacterSet1 = - _registerName1("exemplarCharacterSet"); - late final _sel_calendarIdentifier1 = _registerName1("calendarIdentifier"); - late final _sel_localizedStringForCalendarIdentifier_1 = - _registerName1("localizedStringForCalendarIdentifier:"); - late final _sel_collationIdentifier1 = _registerName1("collationIdentifier"); - late final _sel_localizedStringForCollationIdentifier_1 = - _registerName1("localizedStringForCollationIdentifier:"); - late final _sel_usesMetricSystem1 = _registerName1("usesMetricSystem"); - late final _sel_decimalSeparator1 = _registerName1("decimalSeparator"); - late final _sel_groupingSeparator1 = _registerName1("groupingSeparator"); - late final _sel_currencySymbol1 = _registerName1("currencySymbol"); - late final _sel_currencyCode1 = _registerName1("currencyCode"); - late final _sel_localizedStringForCurrencyCode_1 = - _registerName1("localizedStringForCurrencyCode:"); - late final _sel_collatorIdentifier1 = _registerName1("collatorIdentifier"); - late final _sel_localizedStringForCollatorIdentifier_1 = - _registerName1("localizedStringForCollatorIdentifier:"); - late final _sel_quotationBeginDelimiter1 = - _registerName1("quotationBeginDelimiter"); - late final _sel_quotationEndDelimiter1 = - _registerName1("quotationEndDelimiter"); - late final _sel_alternateQuotationBeginDelimiter1 = - _registerName1("alternateQuotationBeginDelimiter"); - late final _sel_alternateQuotationEndDelimiter1 = - _registerName1("alternateQuotationEndDelimiter"); - late final _sel_autoupdatingCurrentLocale1 = - _registerName1("autoupdatingCurrentLocale"); - ffi.Pointer _objc_msgSend_197( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_197( - obj, - sel, - ); - } - - late final __objc_msgSend_197Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_197 = __objc_msgSend_197Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_currentLocale1 = _registerName1("currentLocale"); - late final _sel_systemLocale1 = _registerName1("systemLocale"); - late final _sel_localeWithLocaleIdentifier_1 = - _registerName1("localeWithLocaleIdentifier:"); - late final _sel_availableLocaleIdentifiers1 = - _registerName1("availableLocaleIdentifiers"); - late final _sel_ISOLanguageCodes1 = _registerName1("ISOLanguageCodes"); - late final _sel_ISOCountryCodes1 = _registerName1("ISOCountryCodes"); - late final _sel_ISOCurrencyCodes1 = _registerName1("ISOCurrencyCodes"); - late final _sel_commonISOCurrencyCodes1 = - _registerName1("commonISOCurrencyCodes"); - late final _sel_preferredLanguages1 = _registerName1("preferredLanguages"); - late final _sel_componentsFromLocaleIdentifier_1 = - _registerName1("componentsFromLocaleIdentifier:"); - ffi.Pointer _objc_msgSend_198( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - ) { - return __objc_msgSend_198( - obj, - sel, - string, - ); - } - - late final __objc_msgSend_198Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_198 = __objc_msgSend_198Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_localeIdentifierFromComponents_1 = - _registerName1("localeIdentifierFromComponents:"); - ffi.Pointer _objc_msgSend_199( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer dict, - ) { - return __objc_msgSend_199( - obj, - sel, - dict, - ); - } - - late final __objc_msgSend_199Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_199 = __objc_msgSend_199Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_canonicalLocaleIdentifierFromString_1 = - _registerName1("canonicalLocaleIdentifierFromString:"); - late final _sel_canonicalLanguageIdentifierFromString_1 = - _registerName1("canonicalLanguageIdentifierFromString:"); - late final _sel_localeIdentifierFromWindowsLocaleCode_1 = - _registerName1("localeIdentifierFromWindowsLocaleCode:"); - ffi.Pointer _objc_msgSend_200( - ffi.Pointer obj, - ffi.Pointer sel, - int lcid, - ) { - return __objc_msgSend_200( - obj, - sel, - lcid, - ); - } - - late final __objc_msgSend_200Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Uint32)>>('objc_msgSend'); - late final __objc_msgSend_200 = __objc_msgSend_200Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_windowsLocaleCodeFromLocaleIdentifier_1 = - _registerName1("windowsLocaleCodeFromLocaleIdentifier:"); - int _objc_msgSend_201( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer localeIdentifier, - ) { - return __objc_msgSend_201( - obj, - sel, - localeIdentifier, - ); - } - - late final __objc_msgSend_201Ptr = _lookup< - ffi.NativeFunction< - ffi.Uint32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_201 = __objc_msgSend_201Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_characterDirectionForLanguage_1 = - _registerName1("characterDirectionForLanguage:"); - int _objc_msgSend_202( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer isoLangCode, - ) { - return __objc_msgSend_202( - obj, - sel, - isoLangCode, - ); - } - - late final __objc_msgSend_202Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_202 = __objc_msgSend_202Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_lineDirectionForLanguage_1 = - _registerName1("lineDirectionForLanguage:"); - late final _sel_localizedName_locale_1 = - _registerName1("localizedName:locale:"); - ffi.Pointer _objc_msgSend_203( - ffi.Pointer obj, - ffi.Pointer sel, - int style, - ffi.Pointer locale, - ) { - return __objc_msgSend_203( - obj, - sel, - style, - locale, - ); - } - - late final __objc_msgSend_203Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_203 = __objc_msgSend_203Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_timeZoneWithName_1 = _registerName1("timeZoneWithName:"); - late final _sel_timeZoneWithName_data_1 = - _registerName1("timeZoneWithName:data:"); - instancetype _objc_msgSend_204( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer tzName, - ffi.Pointer aData, - ) { - return __objc_msgSend_204( - obj, - sel, - tzName, - aData, - ); - } - - late final __objc_msgSend_204Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_204 = __objc_msgSend_204Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithName_1 = _registerName1("initWithName:"); - late final _sel_initWithName_data_1 = _registerName1("initWithName:data:"); - late final _sel_timeZoneForSecondsFromGMT_1 = - _registerName1("timeZoneForSecondsFromGMT:"); - instancetype _objc_msgSend_205( - ffi.Pointer obj, - ffi.Pointer sel, - int seconds, - ) { - return __objc_msgSend_205( - obj, - sel, - seconds, - ); - } - - late final __objc_msgSend_205Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_205 = __objc_msgSend_205Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_timeZoneWithAbbreviation_1 = - _registerName1("timeZoneWithAbbreviation:"); - late final _sel_dateWithYear_month_day_hour_minute_second_timeZone_1 = - _registerName1("dateWithYear:month:day:hour:minute:second:timeZone:"); - ffi.Pointer _objc_msgSend_206( - ffi.Pointer obj, - ffi.Pointer sel, - int year, - int month, - int day, - int hour, - int minute, - int second, - ffi.Pointer aTimeZone, - ) { - return __objc_msgSend_206( - obj, - sel, - year, - month, - day, - hour, - minute, - second, - aTimeZone, - ); - } - - late final __objc_msgSend_206Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_206 = __objc_msgSend_206Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - int, - int, - int, - int, - ffi.Pointer)>(); - - late final _sel_dateByAddingYears_months_days_hours_minutes_seconds_1 = - _registerName1("dateByAddingYears:months:days:hours:minutes:seconds:"); - ffi.Pointer _objc_msgSend_207( - ffi.Pointer obj, - ffi.Pointer sel, - int year, - int month, - int day, - int hour, - int minute, - int second, - ) { - return __objc_msgSend_207( - obj, - sel, - year, - month, - day, - hour, - minute, - second, - ); - } - - late final __objc_msgSend_207Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_207 = __objc_msgSend_207Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, int, int, int, int, int)>(); - - late final _sel_dayOfCommonEra1 = _registerName1("dayOfCommonEra"); - late final _sel_dayOfMonth1 = _registerName1("dayOfMonth"); - late final _sel_dayOfWeek1 = _registerName1("dayOfWeek"); - late final _sel_dayOfYear1 = _registerName1("dayOfYear"); - late final _sel_hourOfDay1 = _registerName1("hourOfDay"); - late final _sel_minuteOfHour1 = _registerName1("minuteOfHour"); - late final _sel_monthOfYear1 = _registerName1("monthOfYear"); - late final _sel_secondOfMinute1 = _registerName1("secondOfMinute"); - late final _sel_yearOfCommonEra1 = _registerName1("yearOfCommonEra"); - late final _sel_calendarFormat1 = _registerName1("calendarFormat"); - late final _sel_descriptionWithCalendarFormat_locale_1 = - _registerName1("descriptionWithCalendarFormat:locale:"); - ffi.Pointer _objc_msgSend_208( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer locale, - ) { - return __objc_msgSend_208( - obj, - sel, - format, - locale, - ); - } - - late final __objc_msgSend_208Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_208 = __objc_msgSend_208Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_descriptionWithCalendarFormat_1 = - _registerName1("descriptionWithCalendarFormat:"); - late final _sel_timeZone1 = _registerName1("timeZone"); - late final _sel_initWithString_calendarFormat_locale_1 = - _registerName1("initWithString:calendarFormat:locale:"); - late final _sel_initWithString_calendarFormat_1 = - _registerName1("initWithString:calendarFormat:"); - late final _sel_initWithYear_month_day_hour_minute_second_timeZone_1 = - _registerName1("initWithYear:month:day:hour:minute:second:timeZone:"); - late final _sel_setCalendarFormat_1 = _registerName1("setCalendarFormat:"); - void _objc_msgSend_209( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ) { - return __objc_msgSend_209( - obj, - sel, - format, - ); - } - - late final __objc_msgSend_209Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_209 = __objc_msgSend_209Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_setTimeZone_1 = _registerName1("setTimeZone:"); - void _objc_msgSend_210( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aTimeZone, - ) { - return __objc_msgSend_210( - obj, - sel, - aTimeZone, - ); - } - - late final __objc_msgSend_210Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_210 = __objc_msgSend_210Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_years_months_days_hours_minutes_seconds_sinceDate_1 = - _registerName1("years:months:days:hours:minutes:seconds:sinceDate:"); - void _objc_msgSend_211( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer yp, - ffi.Pointer mop, - ffi.Pointer dp, - ffi.Pointer hp, - ffi.Pointer mip, - ffi.Pointer sp, - ffi.Pointer date, - ) { - return __objc_msgSend_211( - obj, - sel, - yp, - mop, - dp, - hp, - mip, - sp, - date, - ); - } - - late final __objc_msgSend_211Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_211 = __objc_msgSend_211Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_dateWithCalendarFormat_timeZone_1 = - _registerName1("dateWithCalendarFormat:timeZone:"); - ffi.Pointer _objc_msgSend_212( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer aTimeZone, - ) { - return __objc_msgSend_212( - obj, - sel, - format, - aTimeZone, - ); - } - - late final __objc_msgSend_212Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_212 = __objc_msgSend_212Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_descriptionWithCalendarFormat_timeZone_locale_1 = - _registerName1("descriptionWithCalendarFormat:timeZone:locale:"); - ffi.Pointer _objc_msgSend_213( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer aTimeZone, - ffi.Pointer locale, - ) { - return __objc_msgSend_213( - obj, - sel, - format, - aTimeZone, - locale, - ); - } - - late final __objc_msgSend_213Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_213 = __objc_msgSend_213Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_fileModificationDate1 = - _registerName1("fileModificationDate"); - late final _sel_fileType1 = _registerName1("fileType"); - late final _sel_filePosixPermissions1 = - _registerName1("filePosixPermissions"); - late final _sel_fileOwnerAccountName1 = - _registerName1("fileOwnerAccountName"); - late final _sel_fileGroupOwnerAccountName1 = - _registerName1("fileGroupOwnerAccountName"); - late final _sel_fileSystemNumber1 = _registerName1("fileSystemNumber"); - late final _sel_fileSystemFileNumber1 = - _registerName1("fileSystemFileNumber"); - late final _sel_fileExtensionHidden1 = _registerName1("fileExtensionHidden"); - late final _sel_fileHFSCreatorCode1 = _registerName1("fileHFSCreatorCode"); - int _objc_msgSend_214( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_214( - obj, - sel, - ); - } - - late final __objc_msgSend_214Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedInt Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_214 = __objc_msgSend_214Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_fileHFSTypeCode1 = _registerName1("fileHFSTypeCode"); - late final _sel_fileIsImmutable1 = _registerName1("fileIsImmutable"); - late final _sel_fileIsAppendOnly1 = _registerName1("fileIsAppendOnly"); - late final _sel_fileCreationDate1 = _registerName1("fileCreationDate"); - late final _sel_fileOwnerAccountID1 = _registerName1("fileOwnerAccountID"); - ffi.Pointer _objc_msgSend_215( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_215( - obj, - sel, - ); - } - - late final __objc_msgSend_215Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_215 = __objc_msgSend_215Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_fileGroupOwnerAccountID1 = - _registerName1("fileGroupOwnerAccountID"); - late final _sel_predicateWithBlock_1 = _registerName1("predicateWithBlock:"); - ffi.Pointer _objc_msgSend_216( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_216( - obj, - sel, - block, - ); - } - - late final __objc_msgSend_216Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_216 = __objc_msgSend_216Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_predicateFormat1 = _registerName1("predicateFormat"); - late final _sel_predicateWithSubstitutionVariables_1 = - _registerName1("predicateWithSubstitutionVariables:"); - late final _sel_evaluateWithObject_1 = _registerName1("evaluateWithObject:"); - bool _objc_msgSend_217( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer object, - ) { - return __objc_msgSend_217( - obj, - sel, - object, - ); - } - - late final __objc_msgSend_217Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_217 = __objc_msgSend_217Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_evaluateWithObject_substitutionVariables_1 = - _registerName1("evaluateWithObject:substitutionVariables:"); - bool _objc_msgSend_218( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer object, - ffi.Pointer bindings, - ) { - return __objc_msgSend_218( - obj, - sel, - object, - bindings, - ); - } - - late final __objc_msgSend_218Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_218 = __objc_msgSend_218Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_allowEvaluation1 = _registerName1("allowEvaluation"); - late final _sel_filteredArrayUsingPredicate_1 = - _registerName1("filteredArrayUsingPredicate:"); - ffi.Pointer _objc_msgSend_219( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer predicate, - ) { - return __objc_msgSend_219( - obj, - sel, - predicate, - ); - } - - late final __objc_msgSend_219Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_219 = __objc_msgSend_219Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithChar_1 = _registerName1("initWithChar:"); - ffi.Pointer _objc_msgSend_220( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_220( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_220Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Char)>>('objc_msgSend'); - late final __objc_msgSend_220 = __objc_msgSend_220Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithUnsignedChar_1 = - _registerName1("initWithUnsignedChar:"); - ffi.Pointer _objc_msgSend_221( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_221( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_221Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedChar)>>('objc_msgSend'); - late final __objc_msgSend_221 = __objc_msgSend_221Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithShort_1 = _registerName1("initWithShort:"); - ffi.Pointer _objc_msgSend_222( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_222( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_222Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Short)>>('objc_msgSend'); - late final __objc_msgSend_222 = __objc_msgSend_222Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithUnsignedShort_1 = - _registerName1("initWithUnsignedShort:"); - ffi.Pointer _objc_msgSend_223( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_223( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_223Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedShort)>>('objc_msgSend'); - late final __objc_msgSend_223 = __objc_msgSend_223Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithInt_1 = _registerName1("initWithInt:"); - ffi.Pointer _objc_msgSend_224( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_224( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_224Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int)>>('objc_msgSend'); - late final __objc_msgSend_224 = __objc_msgSend_224Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithUnsignedInt_1 = - _registerName1("initWithUnsignedInt:"); - ffi.Pointer _objc_msgSend_225( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_225( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_225Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_225 = __objc_msgSend_225Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithLong_1 = _registerName1("initWithLong:"); - ffi.Pointer _objc_msgSend_226( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_226( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_226Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_226 = __objc_msgSend_226Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithUnsignedLong_1 = - _registerName1("initWithUnsignedLong:"); - ffi.Pointer _objc_msgSend_227( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_227( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_227Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_227 = __objc_msgSend_227Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithLongLong_1 = _registerName1("initWithLongLong:"); - ffi.Pointer _objc_msgSend_228( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_228( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_228Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.LongLong)>>('objc_msgSend'); - late final __objc_msgSend_228 = __objc_msgSend_228Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithUnsignedLongLong_1 = - _registerName1("initWithUnsignedLongLong:"); - ffi.Pointer _objc_msgSend_229( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_229( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_229Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLongLong)>>('objc_msgSend'); - late final __objc_msgSend_229 = __objc_msgSend_229Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithFloat_1 = _registerName1("initWithFloat:"); - ffi.Pointer _objc_msgSend_230( - ffi.Pointer obj, - ffi.Pointer sel, - double value, - ) { - return __objc_msgSend_230( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_230Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Float)>>('objc_msgSend'); - late final __objc_msgSend_230 = __objc_msgSend_230Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, double)>(); - - late final _sel_initWithDouble_1 = _registerName1("initWithDouble:"); - ffi.Pointer _objc_msgSend_231( - ffi.Pointer obj, - ffi.Pointer sel, - double value, - ) { - return __objc_msgSend_231( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_231Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_231 = __objc_msgSend_231Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, double)>(); - - late final _sel_initWithBool_1 = _registerName1("initWithBool:"); - ffi.Pointer _objc_msgSend_232( - ffi.Pointer obj, - ffi.Pointer sel, - bool value, - ) { - return __objc_msgSend_232( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_232Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_232 = __objc_msgSend_232Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_initWithInteger_1 = _registerName1("initWithInteger:"); - late final _sel_initWithUnsignedInteger_1 = - _registerName1("initWithUnsignedInteger:"); - late final _sel_charValue1 = _registerName1("charValue"); - int _objc_msgSend_233( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_233( - obj, - sel, - ); - } - - late final __objc_msgSend_233Ptr = _lookup< - ffi.NativeFunction< - ffi.Char Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_233 = __objc_msgSend_233Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_unsignedCharValue1 = _registerName1("unsignedCharValue"); - int _objc_msgSend_234( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_234( - obj, - sel, - ); - } - - late final __objc_msgSend_234Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedChar Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_234 = __objc_msgSend_234Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_shortValue1 = _registerName1("shortValue"); - int _objc_msgSend_235( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_235( - obj, - sel, - ); - } - - late final __objc_msgSend_235Ptr = _lookup< - ffi.NativeFunction< - ffi.Short Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_235 = __objc_msgSend_235Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_unsignedShortValue1 = _registerName1("unsignedShortValue"); - int _objc_msgSend_236( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_236( - obj, - sel, - ); - } - - late final __objc_msgSend_236Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedShort Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_236 = __objc_msgSend_236Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_intValue1 = _registerName1("intValue"); - int _objc_msgSend_237( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_237( - obj, - sel, - ); - } - - late final __objc_msgSend_237Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_237 = __objc_msgSend_237Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_unsignedIntValue1 = _registerName1("unsignedIntValue"); - late final _sel_longValue1 = _registerName1("longValue"); - late final _sel_unsignedLongValue1 = _registerName1("unsignedLongValue"); - late final _sel_longLongValue1 = _registerName1("longLongValue"); - int _objc_msgSend_238( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_238( - obj, - sel, - ); - } - - late final __objc_msgSend_238Ptr = _lookup< - ffi.NativeFunction< - ffi.LongLong Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_238 = __objc_msgSend_238Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_unsignedLongLongValue1 = - _registerName1("unsignedLongLongValue"); - late final _sel_floatValue1 = _registerName1("floatValue"); - double _objc_msgSend_239( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_239( - obj, - sel, - ); - } - - late final __objc_msgSend_239Ptr = _lookup< - ffi.NativeFunction< - ffi.Float Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_239 = __objc_msgSend_239Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer)>(); - - double _objc_msgSend_239_fpret( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_239_fpret( - obj, - sel, - ); - } - - late final __objc_msgSend_239_fpretPtr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_fpret'); - late final __objc_msgSend_239_fpret = __objc_msgSend_239_fpretPtr.asFunction< - double Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_doubleValue1 = _registerName1("doubleValue"); - 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_240( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherNumber, - ) { - return __objc_msgSend_240( - obj, - sel, - otherNumber, - ); - } - - late final __objc_msgSend_240Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_240 = __objc_msgSend_240Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_isEqualToNumber_1 = _registerName1("isEqualToNumber:"); - bool _objc_msgSend_241( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer number, - ) { - return __objc_msgSend_241( - obj, - sel, - number, - ); - } - - late final __objc_msgSend_241Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_241 = __objc_msgSend_241Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_numberWithChar_1 = _registerName1("numberWithChar:"); - late final _sel_numberWithUnsignedChar_1 = - _registerName1("numberWithUnsignedChar:"); - late final _sel_numberWithShort_1 = _registerName1("numberWithShort:"); - late final _sel_numberWithUnsignedShort_1 = - _registerName1("numberWithUnsignedShort:"); - late final _sel_numberWithInt_1 = _registerName1("numberWithInt:"); - late final _sel_numberWithUnsignedInt_1 = - _registerName1("numberWithUnsignedInt:"); - late final _sel_numberWithLong_1 = _registerName1("numberWithLong:"); - late final _sel_numberWithUnsignedLong_1 = - _registerName1("numberWithUnsignedLong:"); - late final _sel_numberWithLongLong_1 = _registerName1("numberWithLongLong:"); - late final _sel_numberWithUnsignedLongLong_1 = - _registerName1("numberWithUnsignedLongLong:"); - late final _sel_numberWithFloat_1 = _registerName1("numberWithFloat:"); - late final _sel_numberWithDouble_1 = _registerName1("numberWithDouble:"); - late final _sel_numberWithBool_1 = _registerName1("numberWithBool:"); - late final _sel_numberWithInteger_1 = _registerName1("numberWithInteger:"); - late final _sel_numberWithUnsignedInteger_1 = - _registerName1("numberWithUnsignedInteger:"); - late final _sel_port1 = _registerName1("port"); - 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_242( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - int maxBufferLength, - ) { - return __objc_msgSend_242( - obj, - sel, - buffer, - maxBufferLength, - ); - } - - late final __objc_msgSend_242Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_242 = __objc_msgSend_242Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_fileSystemRepresentation1 = - _registerName1("fileSystemRepresentation"); - late final _sel_isFileURL1 = _registerName1("isFileURL"); - late final _sel_standardizedURL1 = _registerName1("standardizedURL"); - late final _sel_isFileReferenceURL1 = _registerName1("isFileReferenceURL"); - late final _sel_fileReferenceURL1 = _registerName1("fileReferenceURL"); - late final _sel_filePathURL1 = _registerName1("filePathURL"); - late final _sel_getResourceValue_forKey_error_1 = - _registerName1("getResourceValue:forKey:error:"); - bool _objc_msgSend_243( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> value, - ffi.Pointer key, - ffi.Pointer> error, - ) { - return __objc_msgSend_243( - obj, - sel, - value, - key, - error, - ); - } - - late final __objc_msgSend_243Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_243 = __objc_msgSend_243Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_resourceValuesForKeys_error_1 = - _registerName1("resourceValuesForKeys:error:"); - ffi.Pointer _objc_msgSend_244( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer> error, - ) { - return __objc_msgSend_244( - obj, - sel, - keys, - error, - ); - } - - late final __objc_msgSend_244Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_244 = __objc_msgSend_244Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_setResourceValue_forKey_error_1 = - _registerName1("setResourceValue:forKey:error:"); - bool _objc_msgSend_245( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer key, - ffi.Pointer> error, - ) { - return __objc_msgSend_245( - obj, - sel, - value, - key, - error, - ); - } - - late final __objc_msgSend_245Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_245 = __objc_msgSend_245Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_setResourceValues_error_1 = - _registerName1("setResourceValues:error:"); - bool _objc_msgSend_246( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keyedValues, - ffi.Pointer> error, - ) { - return __objc_msgSend_246( - obj, - sel, - keyedValues, - error, - ); - } - - late final __objc_msgSend_246Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_246 = __objc_msgSend_246Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_removeCachedResourceValueForKey_1 = - _registerName1("removeCachedResourceValueForKey:"); - void _objc_msgSend_247( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_247( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_247Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_247 = __objc_msgSend_247Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_removeAllCachedResourceValues1 = - _registerName1("removeAllCachedResourceValues"); - late final _sel_setTemporaryResourceValue_forKey_1 = - _registerName1("setTemporaryResourceValue:forKey:"); - late final _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1 = - _registerName1( - "bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:"); - ffi.Pointer _objc_msgSend_248( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ffi.Pointer keys, - ffi.Pointer relativeURL, - ffi.Pointer> error, - ) { - return __objc_msgSend_248( - obj, - sel, - options, - keys, - relativeURL, - error, - ); - } - - late final __objc_msgSend_248Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_248 = __objc_msgSend_248Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = - _registerName1( - "initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); - instancetype _objc_msgSend_249( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bookmarkData, - int options, - ffi.Pointer relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error, - ) { - return __objc_msgSend_249( - obj, - sel, - bookmarkData, - options, - relativeURL, - isStale, - error, - ); - } - - late final __objc_msgSend_249Ptr = _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_249 = __objc_msgSend_249Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = - _registerName1( - "URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); - late final _sel_resourceValuesForKeys_fromBookmarkData_1 = - _registerName1("resourceValuesForKeys:fromBookmarkData:"); - ffi.Pointer _objc_msgSend_250( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer bookmarkData, - ) { - return __objc_msgSend_250( - obj, - sel, - keys, - bookmarkData, - ); - } - - late final __objc_msgSend_250Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_250 = __objc_msgSend_250Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_writeBookmarkData_toURL_options_error_1 = - _registerName1("writeBookmarkData:toURL:options:error:"); - bool _objc_msgSend_251( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bookmarkData, - ffi.Pointer bookmarkFileURL, - int options, - ffi.Pointer> error, - ) { - return __objc_msgSend_251( - obj, - sel, - bookmarkData, - bookmarkFileURL, - options, - error, - ); - } - - late final __objc_msgSend_251Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_251 = __objc_msgSend_251Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_bookmarkDataWithContentsOfURL_error_1 = - _registerName1("bookmarkDataWithContentsOfURL:error:"); - ffi.Pointer _objc_msgSend_252( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bookmarkFileURL, - ffi.Pointer> error, - ) { - return __objc_msgSend_252( - obj, - sel, - bookmarkFileURL, - error, - ); - } - - late final __objc_msgSend_252Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_252 = __objc_msgSend_252Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_URLByResolvingAliasFileAtURL_options_error_1 = - _registerName1("URLByResolvingAliasFileAtURL:options:error:"); - instancetype _objc_msgSend_253( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int options, - ffi.Pointer> error, - ) { - return __objc_msgSend_253( - obj, - sel, - url, - options, - error, - ); - } - - late final __objc_msgSend_253Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_253 = __objc_msgSend_253Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_startAccessingSecurityScopedResource1 = - _registerName1("startAccessingSecurityScopedResource"); - late final _sel_stopAccessingSecurityScopedResource1 = - _registerName1("stopAccessingSecurityScopedResource"); - late final _sel_getPromisedItemResourceValue_forKey_error_1 = - _registerName1("getPromisedItemResourceValue:forKey:error:"); - late final _sel_promisedItemResourceValuesForKeys_error_1 = - _registerName1("promisedItemResourceValuesForKeys:error:"); - ffi.Pointer _objc_msgSend_254( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer> error, - ) { - return __objc_msgSend_254( - obj, - sel, - keys, - error, - ); - } - - late final __objc_msgSend_254Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_254 = __objc_msgSend_254Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_checkPromisedItemIsReachableAndReturnError_1 = - _registerName1("checkPromisedItemIsReachableAndReturnError:"); - bool _objc_msgSend_255( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> error, - ) { - return __objc_msgSend_255( - obj, - sel, - error, - ); - } - - late final __objc_msgSend_255Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_255 = __objc_msgSend_255Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_fileURLWithPathComponents_1 = - _registerName1("fileURLWithPathComponents:"); - ffi.Pointer _objc_msgSend_256( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer components, - ) { - return __objc_msgSend_256( - obj, - sel, - components, - ); - } - - late final __objc_msgSend_256Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_256 = __objc_msgSend_256Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_pathComponents1 = _registerName1("pathComponents"); - late final _sel_lastPathComponent1 = _registerName1("lastPathComponent"); - late final _sel_pathExtension1 = _registerName1("pathExtension"); - late final _sel_URLByAppendingPathComponent_1 = - _registerName1("URLByAppendingPathComponent:"); - ffi.Pointer _objc_msgSend_257( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer pathComponent, - ) { - return __objc_msgSend_257( - obj, - sel, - pathComponent, - ); - } - - late final __objc_msgSend_257Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_257 = __objc_msgSend_257Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_URLByAppendingPathComponent_isDirectory_1 = - _registerName1("URLByAppendingPathComponent:isDirectory:"); - ffi.Pointer _objc_msgSend_258( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer pathComponent, - bool isDirectory, - ) { - return __objc_msgSend_258( - obj, - sel, - pathComponent, - isDirectory, - ); - } - - late final __objc_msgSend_258Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_258 = __objc_msgSend_258Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_URLByDeletingLastPathComponent1 = - _registerName1("URLByDeletingLastPathComponent"); - late final _sel_URLByAppendingPathExtension_1 = - _registerName1("URLByAppendingPathExtension:"); - late final _sel_URLByDeletingPathExtension1 = - _registerName1("URLByDeletingPathExtension"); - late final _sel_checkResourceIsReachableAndReturnError_1 = - _registerName1("checkResourceIsReachableAndReturnError:"); - late final _sel_URLByStandardizingPath1 = - _registerName1("URLByStandardizingPath"); - late final _sel_URLByResolvingSymlinksInPath1 = - _registerName1("URLByResolvingSymlinksInPath"); - late final _sel_resourceDataUsingCache_1 = - _registerName1("resourceDataUsingCache:"); - ffi.Pointer _objc_msgSend_259( - ffi.Pointer obj, - ffi.Pointer sel, - bool shouldUseCache, - ) { - return __objc_msgSend_259( - obj, - sel, - shouldUseCache, - ); - } - - late final __objc_msgSend_259Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_259 = __objc_msgSend_259Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_loadResourceDataNotifyingClient_usingCache_1 = - _registerName1("loadResourceDataNotifyingClient:usingCache:"); - void _objc_msgSend_260( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer client, - bool shouldUseCache, - ) { - return __objc_msgSend_260( - obj, - sel, - client, - shouldUseCache, - ); - } - - late final __objc_msgSend_260Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_260 = __objc_msgSend_260Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_propertyForKey_1 = _registerName1("propertyForKey:"); - late final _sel_setResourceData_1 = _registerName1("setResourceData:"); - late final _sel_setProperty_forKey_1 = _registerName1("setProperty:forKey:"); - bool _objc_msgSend_261( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer property, - ffi.Pointer propertyKey, - ) { - return __objc_msgSend_261( - obj, - sel, - property, - propertyKey, - ); - } - - late final __objc_msgSend_261Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_261 = __objc_msgSend_261Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSURLHandle1 = _getClass1("NSURLHandle"); - late final _sel_registerURLHandleClass_1 = - _registerName1("registerURLHandleClass:"); - late final _sel_URLHandleClassForURL_1 = - _registerName1("URLHandleClassForURL:"); - ffi.Pointer _objc_msgSend_262( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anURL, - ) { - return __objc_msgSend_262( - obj, - sel, - anURL, - ); - } - - late final __objc_msgSend_262Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_262 = __objc_msgSend_262Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_status1 = _registerName1("status"); - int _objc_msgSend_263( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_263( - obj, - sel, - ); - } - - late final __objc_msgSend_263Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_263 = __objc_msgSend_263Ptr.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_264( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer newBytes, - bool yorn, - ) { - return __objc_msgSend_264( - obj, - sel, - newBytes, - yorn, - ); - } - - late final __objc_msgSend_264Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_264 = __objc_msgSend_264Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_canInitWithURL_1 = _registerName1("canInitWithURL:"); - bool _objc_msgSend_265( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anURL, - ) { - return __objc_msgSend_265( - obj, - sel, - anURL, - ); - } - - late final __objc_msgSend_265Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_265 = __objc_msgSend_265Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_cachedHandleForURL_1 = _registerName1("cachedHandleForURL:"); - ffi.Pointer _objc_msgSend_266( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anURL, - ) { - return __objc_msgSend_266( - obj, - sel, - anURL, - ); - } - - late final __objc_msgSend_266Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_266 = __objc_msgSend_266Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithURL_cached_1 = _registerName1("initWithURL:cached:"); - ffi.Pointer _objc_msgSend_267( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anURL, - bool willCache, - ) { - return __objc_msgSend_267( - obj, - sel, - anURL, - willCache, - ); - } - - late final __objc_msgSend_267Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_267 = __objc_msgSend_267Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_propertyForKeyIfAvailable_1 = - _registerName1("propertyForKeyIfAvailable:"); - late final _sel_writeProperty_forKey_1 = - _registerName1("writeProperty:forKey:"); - late final _sel_writeData_1 = _registerName1("writeData:"); - late final _sel_loadInForeground1 = _registerName1("loadInForeground"); - late final _sel_beginLoadInBackground1 = - _registerName1("beginLoadInBackground"); - late final _sel_endLoadInBackground1 = _registerName1("endLoadInBackground"); - late final _sel_URLHandleUsingCache_1 = - _registerName1("URLHandleUsingCache:"); - ffi.Pointer _objc_msgSend_268( - ffi.Pointer obj, - ffi.Pointer sel, - bool shouldUseCache, - ) { - return __objc_msgSend_268( - obj, - sel, - shouldUseCache, - ); - } - - late final __objc_msgSend_268Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_268 = __objc_msgSend_268Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_writeToFile_options_error_1 = - _registerName1("writeToFile:options:error:"); - bool _objc_msgSend_269( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - int writeOptionsMask, - ffi.Pointer> errorPtr, - ) { - return __objc_msgSend_269( - obj, - sel, - path, - writeOptionsMask, - errorPtr, - ); - } - - late final __objc_msgSend_269Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_269 = __objc_msgSend_269Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_writeToURL_options_error_1 = - _registerName1("writeToURL:options:error:"); - bool _objc_msgSend_270( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int writeOptionsMask, - ffi.Pointer> errorPtr, - ) { - return __objc_msgSend_270( - obj, - sel, - url, - writeOptionsMask, - errorPtr, - ); - } - - late final __objc_msgSend_270Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_270 = __objc_msgSend_270Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_rangeOfData_options_range_1 = - _registerName1("rangeOfData:options:range:"); - _NSRange _objc_msgSend_271( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer dataToFind, - int mask, - _NSRange searchRange, - ) { - return __objc_msgSend_271( - obj, - sel, - dataToFind, - mask, - searchRange, - ); - } - - late final __objc_msgSend_271Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_271 = __objc_msgSend_271Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, _NSRange)>(); - - void _objc_msgSend_271_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer dataToFind, - int mask, - _NSRange searchRange, - ) { - return __objc_msgSend_271_stret( - stret, - obj, - sel, - dataToFind, - mask, - searchRange, - ); - } - - late final __objc_msgSend_271_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend_stret'); - late final __objc_msgSend_271_stret = __objc_msgSend_271_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, _NSRange)>(); - - late final _sel_enumerateByteRangesUsingBlock_1 = - _registerName1("enumerateByteRangesUsingBlock:"); - void _objc_msgSend_272( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_272( - obj, - sel, - block, - ); - } - - late final __objc_msgSend_272Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_272 = __objc_msgSend_272Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_dataWithBytes_length_1 = - _registerName1("dataWithBytes:length:"); - instancetype _objc_msgSend_273( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int length, - ) { - return __objc_msgSend_273( - obj, - sel, - bytes, - length, - ); - } - - late final __objc_msgSend_273Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_273 = __objc_msgSend_273Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_dataWithBytesNoCopy_length_1 = - _registerName1("dataWithBytesNoCopy:length:"); - late final _sel_dataWithBytesNoCopy_length_freeWhenDone_1 = - _registerName1("dataWithBytesNoCopy:length:freeWhenDone:"); - instancetype _objc_msgSend_274( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int length, - bool b, - ) { - return __objc_msgSend_274( - obj, - sel, - bytes, - length, - b, - ); - } - - late final __objc_msgSend_274Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_274 = __objc_msgSend_274Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, bool)>(); - - late final _sel_dataWithContentsOfFile_options_error_1 = - _registerName1("dataWithContentsOfFile:options:error:"); - instancetype _objc_msgSend_275( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - int readOptionsMask, - ffi.Pointer> errorPtr, - ) { - return __objc_msgSend_275( - obj, - sel, - path, - readOptionsMask, - errorPtr, - ); - } - - late final __objc_msgSend_275Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_275 = __objc_msgSend_275Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_dataWithContentsOfURL_options_error_1 = - _registerName1("dataWithContentsOfURL:options:error:"); - instancetype _objc_msgSend_276( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int readOptionsMask, - ffi.Pointer> errorPtr, - ) { - return __objc_msgSend_276( - obj, - sel, - url, - readOptionsMask, - errorPtr, - ); - } - - late final __objc_msgSend_276Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_276 = __objc_msgSend_276Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_dataWithContentsOfFile_1 = - _registerName1("dataWithContentsOfFile:"); - late final _sel_dataWithContentsOfURL_1 = - _registerName1("dataWithContentsOfURL:"); - instancetype _objc_msgSend_277( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ) { - return __objc_msgSend_277( - obj, - sel, - url, - ); - } - - late final __objc_msgSend_277Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_277 = __objc_msgSend_277Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - 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_278( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int length, - ffi.Pointer<_ObjCBlock> deallocator, - ) { - return __objc_msgSend_278( - obj, - sel, - bytes, - length, - deallocator, - ); - } - - late final __objc_msgSend_278Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_278 = __objc_msgSend_278Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_initWithContentsOfFile_options_error_1 = - _registerName1("initWithContentsOfFile:options:error:"); - late final _sel_initWithContentsOfURL_options_error_1 = - _registerName1("initWithContentsOfURL:options:error:"); - late final _sel_initWithData_1 = _registerName1("initWithData:"); - instancetype _objc_msgSend_279( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ) { - return __objc_msgSend_279( - obj, - sel, - data, - ); - } - - late final __objc_msgSend_279Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_279 = __objc_msgSend_279Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_dataWithData_1 = _registerName1("dataWithData:"); - late final _sel_initWithBase64EncodedString_options_1 = - _registerName1("initWithBase64EncodedString:options:"); - instancetype _objc_msgSend_280( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer base64String, - int options, - ) { - return __objc_msgSend_280( - obj, - sel, - base64String, - options, - ); - } - - late final __objc_msgSend_280Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_280 = __objc_msgSend_280Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_base64EncodedStringWithOptions_1 = - _registerName1("base64EncodedStringWithOptions:"); - ffi.Pointer _objc_msgSend_281( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ) { - return __objc_msgSend_281( - obj, - sel, - options, - ); - } - - late final __objc_msgSend_281Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_281 = __objc_msgSend_281Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithBase64EncodedData_options_1 = - _registerName1("initWithBase64EncodedData:options:"); - instancetype _objc_msgSend_282( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer base64Data, - int options, - ) { - return __objc_msgSend_282( - obj, - sel, - base64Data, - options, - ); - } - - late final __objc_msgSend_282Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_282 = __objc_msgSend_282Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_base64EncodedDataWithOptions_1 = - _registerName1("base64EncodedDataWithOptions:"); - ffi.Pointer _objc_msgSend_283( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ) { - return __objc_msgSend_283( - obj, - sel, - options, - ); - } - - late final __objc_msgSend_283Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_283 = __objc_msgSend_283Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_decompressedDataUsingAlgorithm_error_1 = - _registerName1("decompressedDataUsingAlgorithm:error:"); - instancetype _objc_msgSend_284( - ffi.Pointer obj, - ffi.Pointer sel, - int algorithm, - ffi.Pointer> error, - ) { - return __objc_msgSend_284( - obj, - sel, - algorithm, - error, - ); - } - - late final __objc_msgSend_284Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_284 = __objc_msgSend_284Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer>)>(); - - late final _sel_compressedDataUsingAlgorithm_error_1 = - _registerName1("compressedDataUsingAlgorithm:error:"); - late final _sel_getBytes_1 = _registerName1("getBytes:"); - late final _sel_dataWithContentsOfMappedFile_1 = - _registerName1("dataWithContentsOfMappedFile:"); - late final _sel_initWithContentsOfMappedFile_1 = - _registerName1("initWithContentsOfMappedFile:"); - late final _sel_initWithBase64Encoding_1 = - _registerName1("initWithBase64Encoding:"); - late final _sel_base64Encoding1 = _registerName1("base64Encoding"); - late final _sel_encodeDataObject_1 = _registerName1("encodeDataObject:"); - void _objc_msgSend_285( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ) { - return __objc_msgSend_285( - obj, - sel, - data, - ); - } - - late final __objc_msgSend_285Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_285 = __objc_msgSend_285Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodeDataObject1 = _registerName1("decodeDataObject"); - ffi.Pointer _objc_msgSend_286( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_286( - obj, - sel, - ); - } - - late final __objc_msgSend_286Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_286 = __objc_msgSend_286Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_decodeValueOfObjCType_at_size_1 = - _registerName1("decodeValueOfObjCType:at:size:"); - void _objc_msgSend_287( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer type, - ffi.Pointer data, - int size, - ) { - return __objc_msgSend_287( - obj, - sel, - type, - data, - size, - ); - } - - late final __objc_msgSend_287Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_287 = __objc_msgSend_287Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_versionForClassName_1 = - _registerName1("versionForClassName:"); - int _objc_msgSend_288( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer className, - ) { - return __objc_msgSend_288( - obj, - sel, - className, - ); - } - - late final __objc_msgSend_288Ptr = _lookup< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_288 = __objc_msgSend_288Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_encodeObject_1 = _registerName1("encodeObject:"); - void _objc_msgSend_289( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer object, - ) { - return __objc_msgSend_289( - obj, - sel, - object, - ); - } - - late final __objc_msgSend_289Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_289 = __objc_msgSend_289Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_encodeRootObject_1 = _registerName1("encodeRootObject:"); - late final _sel_encodeBycopyObject_1 = _registerName1("encodeBycopyObject:"); - late final _sel_encodeByrefObject_1 = _registerName1("encodeByrefObject:"); - late final _sel_encodeConditionalObject_1 = - _registerName1("encodeConditionalObject:"); - late final _sel_encodeValuesOfObjCTypes_1 = - _registerName1("encodeValuesOfObjCTypes:"); - void _objc_msgSend_290( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer types, - ) { - return __objc_msgSend_290( - obj, - sel, - types, - ); - } - - late final __objc_msgSend_290Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_290 = __objc_msgSend_290Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_encodeArrayOfObjCType_count_at_1 = - _registerName1("encodeArrayOfObjCType:count:at:"); - void _objc_msgSend_291( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer type, - int count, - ffi.Pointer array, - ) { - return __objc_msgSend_291( - obj, - sel, - type, - count, - array, - ); - } - - late final __objc_msgSend_291Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_291 = __objc_msgSend_291Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_encodeBytes_length_1 = _registerName1("encodeBytes:length:"); - late final _sel_decodeObject1 = _registerName1("decodeObject"); - late final _sel_decodeTopLevelObjectAndReturnError_1 = - _registerName1("decodeTopLevelObjectAndReturnError:"); - ffi.Pointer _objc_msgSend_292( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> error, - ) { - return __objc_msgSend_292( - obj, - sel, - error, - ); - } - - late final __objc_msgSend_292Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_292 = __objc_msgSend_292Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_decodeValuesOfObjCTypes_1 = - _registerName1("decodeValuesOfObjCTypes:"); - late final _sel_decodeArrayOfObjCType_count_at_1 = - _registerName1("decodeArrayOfObjCType:count:at:"); - late final _sel_decodeBytesWithReturnedLength_1 = - _registerName1("decodeBytesWithReturnedLength:"); - ffi.Pointer _objc_msgSend_293( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer lengthp, - ) { - return __objc_msgSend_293( - obj, - sel, - lengthp, - ); - } - - late final __objc_msgSend_293Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_293 = __objc_msgSend_293Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_encodePropertyList_1 = _registerName1("encodePropertyList:"); - late final _sel_decodePropertyList1 = _registerName1("decodePropertyList"); - late final _sel_setObjectZone_1 = _registerName1("setObjectZone:"); - void _objc_msgSend_294( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_NSZone> zone, - ) { - return __objc_msgSend_294( - obj, - sel, - zone, - ); - } - - late final __objc_msgSend_294Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_NSZone>)>>('objc_msgSend'); - late final __objc_msgSend_294 = __objc_msgSend_294Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_NSZone>)>(); - - late final _sel_objectZone1 = _registerName1("objectZone"); - ffi.Pointer<_NSZone> _objc_msgSend_295( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_295( - obj, - sel, - ); - } - - late final __objc_msgSend_295Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer<_NSZone> Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_295 = __objc_msgSend_295Ptr.asFunction< - ffi.Pointer<_NSZone> Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_systemVersion1 = _registerName1("systemVersion"); - late final _sel_allowsKeyedCoding1 = _registerName1("allowsKeyedCoding"); - late final _sel_encodeObject_forKey_1 = - _registerName1("encodeObject:forKey:"); - late final _sel_encodeConditionalObject_forKey_1 = - _registerName1("encodeConditionalObject:forKey:"); - late final _sel_encodeBool_forKey_1 = _registerName1("encodeBool:forKey:"); - void _objc_msgSend_296( - ffi.Pointer obj, - ffi.Pointer sel, - bool value, - ffi.Pointer key, - ) { - return __objc_msgSend_296( - obj, - sel, - value, - key, - ); - } - - late final __objc_msgSend_296Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Bool, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_296 = __objc_msgSend_296Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, bool, - ffi.Pointer)>(); - - late final _sel_encodeInt_forKey_1 = _registerName1("encodeInt:forKey:"); - void _objc_msgSend_297( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ffi.Pointer key, - ) { - return __objc_msgSend_297( - obj, - sel, - value, - key, - ); - } - - late final __objc_msgSend_297Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_297 = __objc_msgSend_297Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _sel_encodeInt32_forKey_1 = _registerName1("encodeInt32:forKey:"); - void _objc_msgSend_298( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ffi.Pointer key, - ) { - return __objc_msgSend_298( - obj, - sel, - value, - key, - ); - } - - late final __objc_msgSend_298Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_298 = __objc_msgSend_298Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _sel_encodeInt64_forKey_1 = _registerName1("encodeInt64:forKey:"); - void _objc_msgSend_299( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ffi.Pointer key, - ) { - return __objc_msgSend_299( - obj, - sel, - value, - key, - ); - } - - late final __objc_msgSend_299Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_299 = __objc_msgSend_299Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _sel_encodeFloat_forKey_1 = _registerName1("encodeFloat:forKey:"); - void _objc_msgSend_300( - ffi.Pointer obj, - ffi.Pointer sel, - double value, - ffi.Pointer key, - ) { - return __objc_msgSend_300( - obj, - sel, - value, - key, - ); - } - - late final __objc_msgSend_300Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Float, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_300 = __objc_msgSend_300Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double, - ffi.Pointer)>(); - - late final _sel_encodeDouble_forKey_1 = - _registerName1("encodeDouble:forKey:"); - void _objc_msgSend_301( - ffi.Pointer obj, - ffi.Pointer sel, - double value, - ffi.Pointer key, - ) { - return __objc_msgSend_301( - obj, - sel, - value, - key, - ); - } - - late final __objc_msgSend_301Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Double, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_301 = __objc_msgSend_301Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double, - ffi.Pointer)>(); - - late final _sel_encodeBytes_length_forKey_1 = - _registerName1("encodeBytes:length:forKey:"); - void _objc_msgSend_302( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int length, - ffi.Pointer key, - ) { - return __objc_msgSend_302( - obj, - sel, - bytes, - length, - key, - ); - } - - late final __objc_msgSend_302Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_302 = __objc_msgSend_302Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_containsValueForKey_1 = - _registerName1("containsValueForKey:"); - late final _sel_decodeObjectForKey_1 = _registerName1("decodeObjectForKey:"); - late final _sel_decodeTopLevelObjectForKey_error_1 = - _registerName1("decodeTopLevelObjectForKey:error:"); - ffi.Pointer _objc_msgSend_303( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ffi.Pointer> error, - ) { - return __objc_msgSend_303( - obj, - sel, - key, - error, - ); - } - - late final __objc_msgSend_303Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_303 = __objc_msgSend_303Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_decodeBoolForKey_1 = _registerName1("decodeBoolForKey:"); - late final _sel_decodeIntForKey_1 = _registerName1("decodeIntForKey:"); - int _objc_msgSend_304( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_304( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_304Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_304 = __objc_msgSend_304Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodeInt32ForKey_1 = _registerName1("decodeInt32ForKey:"); - int _objc_msgSend_305( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_305( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_305Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_305 = __objc_msgSend_305Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodeInt64ForKey_1 = _registerName1("decodeInt64ForKey:"); - int _objc_msgSend_306( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_306( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_306Ptr = _lookup< - ffi.NativeFunction< - ffi.Int64 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_306 = __objc_msgSend_306Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodeFloatForKey_1 = _registerName1("decodeFloatForKey:"); - double _objc_msgSend_307( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_307( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_307Ptr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_307 = __objc_msgSend_307Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - double _objc_msgSend_307_fpret( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_307_fpret( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_307_fpretPtr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_fpret'); - late final __objc_msgSend_307_fpret = __objc_msgSend_307_fpretPtr.asFunction< - double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodeDoubleForKey_1 = _registerName1("decodeDoubleForKey:"); - double _objc_msgSend_308( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_308( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_308Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_308 = __objc_msgSend_308Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - double _objc_msgSend_308_fpret( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_308_fpret( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_308_fpretPtr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_fpret'); - late final __objc_msgSend_308_fpret = __objc_msgSend_308_fpretPtr.asFunction< - double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodeBytesForKey_returnedLength_1 = - _registerName1("decodeBytesForKey:returnedLength:"); - ffi.Pointer _objc_msgSend_309( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ffi.Pointer lengthp, - ) { - return __objc_msgSend_309( - obj, - sel, - key, - lengthp, - ); - } - - late final __objc_msgSend_309Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_309 = __objc_msgSend_309Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_encodeInteger_forKey_1 = - _registerName1("encodeInteger:forKey:"); - void _objc_msgSend_310( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ffi.Pointer key, - ) { - return __objc_msgSend_310( - obj, - sel, - value, - key, - ); - } - - late final __objc_msgSend_310Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Long, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_310 = __objc_msgSend_310Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _sel_decodeIntegerForKey_1 = - _registerName1("decodeIntegerForKey:"); - late final _sel_requiresSecureCoding1 = - _registerName1("requiresSecureCoding"); - late final _sel_decodeObjectOfClass_forKey_1 = - _registerName1("decodeObjectOfClass:forKey:"); - ffi.Pointer _objc_msgSend_311( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aClass, - ffi.Pointer key, - ) { - return __objc_msgSend_311( - obj, - sel, - aClass, - key, - ); - } - - late final __objc_msgSend_311Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_311 = __objc_msgSend_311Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodeTopLevelObjectOfClass_forKey_error_1 = - _registerName1("decodeTopLevelObjectOfClass:forKey:error:"); - ffi.Pointer _objc_msgSend_312( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aClass, - ffi.Pointer key, - ffi.Pointer> error, - ) { - return __objc_msgSend_312( - obj, - sel, - aClass, - key, - error, - ); - } - - late final __objc_msgSend_312Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - 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, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_decodeArrayOfObjectsOfClass_forKey_1 = - _registerName1("decodeArrayOfObjectsOfClass:forKey:"); - ffi.Pointer _objc_msgSend_313( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cls, - ffi.Pointer key, - ) { - return __objc_msgSend_313( - obj, - sel, - cls, - key, - ); - } - - late final __objc_msgSend_313Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - 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, - ffi.Pointer)>(); - - late final _sel_decodeDictionaryWithKeysOfClass_objectsOfClass_forKey_1 = - _registerName1("decodeDictionaryWithKeysOfClass:objectsOfClass:forKey:"); - ffi.Pointer _objc_msgSend_314( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keyCls, - ffi.Pointer objectCls, - ffi.Pointer key, - ) { - return __objc_msgSend_314( - obj, - sel, - keyCls, - objectCls, - key, - ); - } - - late final __objc_msgSend_314Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - 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, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodeObjectOfClasses_forKey_1 = - _registerName1("decodeObjectOfClasses:forKey:"); - ffi.Pointer _objc_msgSend_315( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer classes, - ffi.Pointer key, - ) { - return __objc_msgSend_315( - obj, - sel, - classes, - key, - ); - } - - late final __objc_msgSend_315Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_315 = __objc_msgSend_315Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodeTopLevelObjectOfClasses_forKey_error_1 = - _registerName1("decodeTopLevelObjectOfClasses:forKey:error:"); - ffi.Pointer _objc_msgSend_316( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer classes, - ffi.Pointer key, - ffi.Pointer> error, - ) { - return __objc_msgSend_316( - obj, - sel, - classes, - key, - error, - ); - } - - late final __objc_msgSend_316Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_316 = __objc_msgSend_316Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_decodeArrayOfObjectsOfClasses_forKey_1 = - _registerName1("decodeArrayOfObjectsOfClasses:forKey:"); - ffi.Pointer _objc_msgSend_317( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer classes, - ffi.Pointer key, - ) { - return __objc_msgSend_317( - obj, - sel, - classes, - key, - ); - } - - late final __objc_msgSend_317Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_317 = __objc_msgSend_317Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey_1 = - _registerName1( - "decodeDictionaryWithKeysOfClasses:objectsOfClasses:forKey:"); - ffi.Pointer _objc_msgSend_318( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keyClasses, - ffi.Pointer objectClasses, - ffi.Pointer key, - ) { - return __objc_msgSend_318( - obj, - sel, - keyClasses, - objectClasses, - key, - ); - } - - late final __objc_msgSend_318Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_318 = __objc_msgSend_318Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodePropertyListForKey_1 = - _registerName1("decodePropertyListForKey:"); - late final _sel_allowedClasses1 = _registerName1("allowedClasses"); - ffi.Pointer _objc_msgSend_319( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_319( - obj, - sel, - ); - } - - late final __objc_msgSend_319Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_319 = __objc_msgSend_319Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_failWithError_1 = _registerName1("failWithError:"); - void _objc_msgSend_320( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer error, - ) { - return __objc_msgSend_320( - obj, - sel, - error, - ); - } - - late final __objc_msgSend_320Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_320 = __objc_msgSend_320Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodingFailurePolicy1 = - _registerName1("decodingFailurePolicy"); - int _objc_msgSend_321( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_321( - obj, - sel, - ); - } - - late final __objc_msgSend_321Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_321 = __objc_msgSend_321Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_error1 = _registerName1("error"); - ffi.Pointer _objc_msgSend_322( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_322( - obj, - sel, - ); - } - - late final __objc_msgSend_322Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_322 = __objc_msgSend_322Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_encodeNXObject_1 = _registerName1("encodeNXObject:"); - late final _sel_decodeNXObject1 = _registerName1("decodeNXObject"); - late final _sel_decodeValueOfObjCType_at_1 = - _registerName1("decodeValueOfObjCType:at:"); - late final _sel_encodePoint_1 = _registerName1("encodePoint:"); - void _objc_msgSend_323( - ffi.Pointer obj, - ffi.Pointer sel, - CGPoint point, - ) { - return __objc_msgSend_323( - obj, - sel, - point, - ); - } - - late final __objc_msgSend_323Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - CGPoint)>>('objc_msgSend'); - late final __objc_msgSend_323 = __objc_msgSend_323Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, CGPoint)>(); - - late final _sel_decodePoint1 = _registerName1("decodePoint"); - late final _sel_encodeSize_1 = _registerName1("encodeSize:"); - void _objc_msgSend_324( - ffi.Pointer obj, - ffi.Pointer sel, - CGSize size, - ) { - return __objc_msgSend_324( - obj, - sel, - size, - ); - } - - late final __objc_msgSend_324Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - CGSize)>>('objc_msgSend'); - late final __objc_msgSend_324 = __objc_msgSend_324Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, CGSize)>(); - - late final _sel_decodeSize1 = _registerName1("decodeSize"); - late final _sel_encodeRect_1 = _registerName1("encodeRect:"); - void _objc_msgSend_325( - ffi.Pointer obj, - ffi.Pointer sel, - CGRect rect, - ) { - return __objc_msgSend_325( - obj, - sel, - rect, - ); - } - - late final __objc_msgSend_325Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - CGRect)>>('objc_msgSend'); - late final __objc_msgSend_325 = __objc_msgSend_325Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, CGRect)>(); - - late final _sel_decodeRect1 = _registerName1("decodeRect"); - late final _sel_encodePoint_forKey_1 = _registerName1("encodePoint:forKey:"); - void _objc_msgSend_326( - ffi.Pointer obj, - ffi.Pointer sel, - CGPoint point, - ffi.Pointer key, - ) { - return __objc_msgSend_326( - obj, - sel, - point, - key, - ); - } - - late final __objc_msgSend_326Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - CGPoint, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_326 = __objc_msgSend_326Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, CGPoint, - ffi.Pointer)>(); - - late final _sel_encodeSize_forKey_1 = _registerName1("encodeSize:forKey:"); - void _objc_msgSend_327( - ffi.Pointer obj, - ffi.Pointer sel, - CGSize size, - ffi.Pointer key, - ) { - return __objc_msgSend_327( - obj, - sel, - size, - key, - ); - } - - late final __objc_msgSend_327Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - CGSize, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_327 = __objc_msgSend_327Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, CGSize, - ffi.Pointer)>(); - - late final _sel_encodeRect_forKey_1 = _registerName1("encodeRect:forKey:"); - void _objc_msgSend_328( - ffi.Pointer obj, - ffi.Pointer sel, - CGRect rect, - ffi.Pointer key, - ) { - return __objc_msgSend_328( - obj, - sel, - rect, - key, - ); - } - - late final __objc_msgSend_328Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - CGRect, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_328 = __objc_msgSend_328Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, CGRect, - ffi.Pointer)>(); - - late final _sel_decodePointForKey_1 = _registerName1("decodePointForKey:"); - CGPoint _objc_msgSend_329( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_329( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_329Ptr = _lookup< - ffi.NativeFunction< - CGPoint Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_329 = __objc_msgSend_329Ptr.asFunction< - CGPoint Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - void _objc_msgSend_329_stret( - ffi.Pointer stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_329_stret( - stret, - obj, - sel, - key, - ); - } - - late final __objc_msgSend_329_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_329_stret = __objc_msgSend_329_stretPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_decodeSizeForKey_1 = _registerName1("decodeSizeForKey:"); - CGSize _objc_msgSend_330( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_330( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_330Ptr = _lookup< - ffi.NativeFunction< - CGSize Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_330 = __objc_msgSend_330Ptr.asFunction< - CGSize Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - void _objc_msgSend_330_stret( - ffi.Pointer stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_330_stret( - stret, - obj, - sel, - key, - ); - } - - late final __objc_msgSend_330_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_330_stret = __objc_msgSend_330_stretPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_decodeRectForKey_1 = _registerName1("decodeRectForKey:"); - CGRect _objc_msgSend_331( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_331( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_331Ptr = _lookup< - ffi.NativeFunction< - CGRect Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_331 = __objc_msgSend_331Ptr.asFunction< - CGRect Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - void _objc_msgSend_331_stret( - ffi.Pointer stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_331_stret( - stret, - obj, - sel, - key, - ); - } - - late final __objc_msgSend_331_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_331_stret = __objc_msgSend_331_stretPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_substringFromIndex_1 = _registerName1("substringFromIndex:"); - ffi.Pointer _objc_msgSend_332( - ffi.Pointer obj, - ffi.Pointer sel, - int from, - ) { - return __objc_msgSend_332( - obj, - sel, - from, - ); - } - - late final __objc_msgSend_332Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_332 = __objc_msgSend_332Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_substringToIndex_1 = _registerName1("substringToIndex:"); - late final _sel_substringWithRange_1 = _registerName1("substringWithRange:"); - ffi.Pointer _objc_msgSend_333( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_333( - obj, - sel, - range, - ); - } - - late final __objc_msgSend_333Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_333 = __objc_msgSend_333Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _sel_getCharacters_range_1 = - _registerName1("getCharacters:range:"); - void _objc_msgSend_334( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - _NSRange range, - ) { - return __objc_msgSend_334( - obj, - sel, - buffer, - range, - ); - } - - late final __objc_msgSend_334Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_334 = __objc_msgSend_334Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>(); - - int _objc_msgSend_335( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - ) { - return __objc_msgSend_335( - obj, - sel, - string, - ); - } - - late final __objc_msgSend_335Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_335 = __objc_msgSend_335Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_compare_options_1 = _registerName1("compare:options:"); - int _objc_msgSend_336( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int mask, - ) { - return __objc_msgSend_336( - obj, - sel, - string, - mask, - ); - } - - late final __objc_msgSend_336Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_336 = __objc_msgSend_336Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_compare_options_range_1 = - _registerName1("compare:options:range:"); - int _objc_msgSend_337( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int mask, - _NSRange rangeOfReceiverToCompare, - ) { - return __objc_msgSend_337( - obj, - sel, - string, - mask, - rangeOfReceiverToCompare, - ); - } - - late final __objc_msgSend_337Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_337 = __objc_msgSend_337Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, _NSRange)>(); - - late final _sel_compare_options_range_locale_1 = - _registerName1("compare:options:range:locale:"); - int _objc_msgSend_338( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int mask, - _NSRange rangeOfReceiverToCompare, - ffi.Pointer locale, - ) { - return __objc_msgSend_338( - obj, - sel, - string, - mask, - rangeOfReceiverToCompare, - locale, - ); - } - - late final __objc_msgSend_338Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_338 = __objc_msgSend_338Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, _NSRange, ffi.Pointer)>(); - - late final _sel_caseInsensitiveCompare_1 = - _registerName1("caseInsensitiveCompare:"); - late final _sel_localizedCompare_1 = _registerName1("localizedCompare:"); - late final _sel_localizedCaseInsensitiveCompare_1 = - _registerName1("localizedCaseInsensitiveCompare:"); - late final _sel_localizedStandardCompare_1 = - _registerName1("localizedStandardCompare:"); - late final _sel_isEqualToString_1 = _registerName1("isEqualToString:"); - 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_339( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer str, - int mask, - ) { - return __objc_msgSend_339( - obj, - sel, - str, - mask, - ); - } - - late final __objc_msgSend_339Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_339 = __objc_msgSend_339Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_containsString_1 = _registerName1("containsString:"); - late final _sel_localizedCaseInsensitiveContainsString_1 = - _registerName1("localizedCaseInsensitiveContainsString:"); - late final _sel_localizedStandardContainsString_1 = - _registerName1("localizedStandardContainsString:"); - late final _sel_localizedStandardRangeOfString_1 = - _registerName1("localizedStandardRangeOfString:"); - _NSRange _objc_msgSend_340( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer str, - ) { - return __objc_msgSend_340( - obj, - sel, - str, - ); - } - - late final __objc_msgSend_340Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_340 = __objc_msgSend_340Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - void _objc_msgSend_340_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer str, - ) { - return __objc_msgSend_340_stret( - stret, - obj, - sel, - str, - ); - } - - late final __objc_msgSend_340_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_340_stret = __objc_msgSend_340_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_rangeOfString_1 = _registerName1("rangeOfString:"); - late final _sel_rangeOfString_options_1 = - _registerName1("rangeOfString:options:"); - _NSRange _objc_msgSend_341( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchString, - int mask, - ) { - return __objc_msgSend_341( - obj, - sel, - searchString, - mask, - ); - } - - late final __objc_msgSend_341Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_341 = __objc_msgSend_341Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - void _objc_msgSend_341_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchString, - int mask, - ) { - return __objc_msgSend_341_stret( - stret, - obj, - sel, - searchString, - mask, - ); - } - - late final __objc_msgSend_341_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend_stret'); - late final __objc_msgSend_341_stret = __objc_msgSend_341_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_rangeOfString_options_range_1 = - _registerName1("rangeOfString:options:range:"); - _NSRange _objc_msgSend_342( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchString, - int mask, - _NSRange rangeOfReceiverToSearch, - ) { - return __objc_msgSend_342( - obj, - sel, - searchString, - mask, - rangeOfReceiverToSearch, - ); - } - - late final __objc_msgSend_342Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_342 = __objc_msgSend_342Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, _NSRange)>(); - - void _objc_msgSend_342_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchString, - int mask, - _NSRange rangeOfReceiverToSearch, - ) { - return __objc_msgSend_342_stret( - stret, - obj, - sel, - searchString, - mask, - rangeOfReceiverToSearch, - ); - } - - late final __objc_msgSend_342_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend_stret'); - late final __objc_msgSend_342_stret = __objc_msgSend_342_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, _NSRange)>(); - - late final _sel_rangeOfString_options_range_locale_1 = - _registerName1("rangeOfString:options:range:locale:"); - _NSRange _objc_msgSend_343( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchString, - int mask, - _NSRange rangeOfReceiverToSearch, - ffi.Pointer locale, - ) { - return __objc_msgSend_343( - obj, - sel, - searchString, - mask, - rangeOfReceiverToSearch, - locale, - ); - } - - late final __objc_msgSend_343Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_343 = __objc_msgSend_343Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, _NSRange, ffi.Pointer)>(); - - void _objc_msgSend_343_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchString, - int mask, - _NSRange rangeOfReceiverToSearch, - ffi.Pointer locale, - ) { - return __objc_msgSend_343_stret( - stret, - obj, - sel, - searchString, - mask, - rangeOfReceiverToSearch, - locale, - ); - } - - late final __objc_msgSend_343_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_343_stret = __objc_msgSend_343_stretPtr.asFunction< - void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange, - ffi.Pointer)>(); - - late final _sel_rangeOfCharacterFromSet_1 = - _registerName1("rangeOfCharacterFromSet:"); - _NSRange _objc_msgSend_344( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchSet, - ) { - return __objc_msgSend_344( - obj, - sel, - searchSet, - ); - } - - late final __objc_msgSend_344Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_344 = __objc_msgSend_344Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - void _objc_msgSend_344_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchSet, - ) { - return __objc_msgSend_344_stret( - stret, - obj, - sel, - searchSet, - ); - } - - late final __objc_msgSend_344_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_344_stret = __objc_msgSend_344_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_rangeOfCharacterFromSet_options_1 = - _registerName1("rangeOfCharacterFromSet:options:"); - _NSRange _objc_msgSend_345( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchSet, - int mask, - ) { - return __objc_msgSend_345( - obj, - sel, - searchSet, - mask, - ); - } - - late final __objc_msgSend_345Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_345 = __objc_msgSend_345Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - void _objc_msgSend_345_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchSet, - int mask, - ) { - return __objc_msgSend_345_stret( - stret, - obj, - sel, - searchSet, - mask, - ); - } - - late final __objc_msgSend_345_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend_stret'); - late final __objc_msgSend_345_stret = __objc_msgSend_345_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_rangeOfCharacterFromSet_options_range_1 = - _registerName1("rangeOfCharacterFromSet:options:range:"); - _NSRange _objc_msgSend_346( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchSet, - int mask, - _NSRange rangeOfReceiverToSearch, - ) { - return __objc_msgSend_346( - obj, - sel, - searchSet, - mask, - rangeOfReceiverToSearch, - ); - } - - late final __objc_msgSend_346Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_346 = __objc_msgSend_346Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, _NSRange)>(); - - void _objc_msgSend_346_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchSet, - int mask, - _NSRange rangeOfReceiverToSearch, - ) { - return __objc_msgSend_346_stret( - stret, - obj, - sel, - searchSet, - mask, - rangeOfReceiverToSearch, - ); - } - - late final __objc_msgSend_346_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend_stret'); - late final __objc_msgSend_346_stret = __objc_msgSend_346_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, _NSRange)>(); - - late final _sel_rangeOfComposedCharacterSequenceAtIndex_1 = - _registerName1("rangeOfComposedCharacterSequenceAtIndex:"); - _NSRange _objc_msgSend_347( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ) { - return __objc_msgSend_347( - obj, - sel, - index, - ); - } - - late final __objc_msgSend_347Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_347 = __objc_msgSend_347Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, int)>(); - - void _objc_msgSend_347_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ) { - return __objc_msgSend_347_stret( - stret, - obj, - sel, - index, - ); - } - - late final __objc_msgSend_347_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend_stret'); - late final __objc_msgSend_347_stret = __objc_msgSend_347_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_rangeOfComposedCharacterSequencesForRange_1 = - _registerName1("rangeOfComposedCharacterSequencesForRange:"); - _NSRange _objc_msgSend_348( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_348( - obj, - sel, - range, - ); - } - - late final __objc_msgSend_348Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_348 = __objc_msgSend_348Ptr.asFunction< - _NSRange Function( - ffi.Pointer, ffi.Pointer, _NSRange)>(); - - void _objc_msgSend_348_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_348_stret( - stret, - obj, - sel, - range, - ); - } - - late final __objc_msgSend_348_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend_stret'); - late final __objc_msgSend_348_stret = __objc_msgSend_348_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, _NSRange)>(); - - late final _sel_stringByAppendingString_1 = - _registerName1("stringByAppendingString:"); - late final _sel_stringByAppendingFormat_1 = - _registerName1("stringByAppendingFormat:"); - late final _sel_uppercaseString1 = _registerName1("uppercaseString"); - late final _sel_lowercaseString1 = _registerName1("lowercaseString"); - late final _sel_capitalizedString1 = _registerName1("capitalizedString"); - late final _sel_localizedUppercaseString1 = - _registerName1("localizedUppercaseString"); - late final _sel_localizedLowercaseString1 = - _registerName1("localizedLowercaseString"); - late final _sel_localizedCapitalizedString1 = - _registerName1("localizedCapitalizedString"); - late final _sel_uppercaseStringWithLocale_1 = - _registerName1("uppercaseStringWithLocale:"); - ffi.Pointer _objc_msgSend_349( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer locale, - ) { - return __objc_msgSend_349( - obj, - sel, - locale, - ); - } - - late final __objc_msgSend_349Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_349 = __objc_msgSend_349Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_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_350( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer startPtr, - ffi.Pointer lineEndPtr, - ffi.Pointer contentsEndPtr, - _NSRange range, - ) { - return __objc_msgSend_350( - obj, - sel, - startPtr, - lineEndPtr, - contentsEndPtr, - range, - ); - } - - late final __objc_msgSend_350Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_350 = __objc_msgSend_350Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>(); - - late final _sel_lineRangeForRange_1 = _registerName1("lineRangeForRange:"); - late final _sel_getParagraphStart_end_contentsEnd_forRange_1 = - _registerName1("getParagraphStart:end:contentsEnd:forRange:"); - late final _sel_paragraphRangeForRange_1 = - _registerName1("paragraphRangeForRange:"); - late final _sel_enumerateSubstringsInRange_options_usingBlock_1 = - _registerName1("enumerateSubstringsInRange:options:usingBlock:"); - void _objc_msgSend_351( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_351( - obj, - sel, - range, - opts, - block, - ); - } - - late final __objc_msgSend_351Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_351 = __objc_msgSend_351Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_enumerateLinesUsingBlock_1 = - _registerName1("enumerateLinesUsingBlock:"); - void _objc_msgSend_352( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_352( - obj, - sel, - block, - ); - } - - late final __objc_msgSend_352Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_352 = __objc_msgSend_352Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - 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_353( - ffi.Pointer obj, - ffi.Pointer sel, - int encoding, - bool lossy, - ) { - return __objc_msgSend_353( - obj, - sel, - encoding, - lossy, - ); - } - - late final __objc_msgSend_353Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_353 = __objc_msgSend_353Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int, bool)>(); - - late final _sel_dataUsingEncoding_1 = _registerName1("dataUsingEncoding:"); - ffi.Pointer _objc_msgSend_354( - ffi.Pointer obj, - ffi.Pointer sel, - int encoding, - ) { - return __objc_msgSend_354( - obj, - sel, - encoding, - ); - } - - late final __objc_msgSend_354Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_354 = __objc_msgSend_354Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_canBeConvertedToEncoding_1 = - _registerName1("canBeConvertedToEncoding:"); - late final _sel_cStringUsingEncoding_1 = - _registerName1("cStringUsingEncoding:"); - late final _sel_getCString_maxLength_encoding_1 = - _registerName1("getCString:maxLength:encoding:"); - bool _objc_msgSend_355( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - int maxBufferCount, - int encoding, - ) { - return __objc_msgSend_355( - obj, - sel, - buffer, - maxBufferCount, - encoding, - ); - } - - late final __objc_msgSend_355Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_355 = __objc_msgSend_355Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); - - late final _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1 = - _registerName1( - "getBytes:maxLength:usedLength:encoding:options:range:remainingRange:"); - bool _objc_msgSend_356( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - int maxBufferCount, - ffi.Pointer usedBufferCount, - int encoding, - int options, - _NSRange range, - ffi.Pointer<_NSRange> leftover, - ) { - return __objc_msgSend_356( - obj, - sel, - buffer, - maxBufferCount, - usedBufferCount, - encoding, - options, - range, - leftover, - ); - } - - late final __objc_msgSend_356Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Int32, - _NSRange, - ffi.Pointer<_NSRange>)>>('objc_msgSend'); - late final __objc_msgSend_356 = __objc_msgSend_356Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - int, - int, - _NSRange, - ffi.Pointer<_NSRange>)>(); - - late final _sel_maximumLengthOfBytesUsingEncoding_1 = - _registerName1("maximumLengthOfBytesUsingEncoding:"); - late final _sel_lengthOfBytesUsingEncoding_1 = - _registerName1("lengthOfBytesUsingEncoding:"); - late final _sel_availableStringEncodings1 = - _registerName1("availableStringEncodings"); - ffi.Pointer _objc_msgSend_357( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_357( - obj, - sel, - ); - } - - late final __objc_msgSend_357Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_357 = __objc_msgSend_357Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_localizedNameOfStringEncoding_1 = - _registerName1("localizedNameOfStringEncoding:"); - late final _sel_defaultCStringEncoding1 = - _registerName1("defaultCStringEncoding"); - late final _sel_decomposedStringWithCanonicalMapping1 = - _registerName1("decomposedStringWithCanonicalMapping"); - late final _sel_precomposedStringWithCanonicalMapping1 = - _registerName1("precomposedStringWithCanonicalMapping"); - late final _sel_decomposedStringWithCompatibilityMapping1 = - _registerName1("decomposedStringWithCompatibilityMapping"); - late final _sel_precomposedStringWithCompatibilityMapping1 = - _registerName1("precomposedStringWithCompatibilityMapping"); - late final _sel_componentsSeparatedByString_1 = - _registerName1("componentsSeparatedByString:"); - ffi.Pointer _objc_msgSend_358( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer separator, - ) { - return __objc_msgSend_358( - obj, - sel, - separator, - ); - } - - late final __objc_msgSend_358Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_358 = __objc_msgSend_358Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_componentsSeparatedByCharactersInSet_1 = - _registerName1("componentsSeparatedByCharactersInSet:"); - ffi.Pointer _objc_msgSend_359( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer separator, - ) { - return __objc_msgSend_359( - obj, - sel, - separator, - ); - } - - late final __objc_msgSend_359Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_359 = __objc_msgSend_359Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_stringByTrimmingCharactersInSet_1 = - _registerName1("stringByTrimmingCharactersInSet:"); - ffi.Pointer _objc_msgSend_360( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer set1, - ) { - return __objc_msgSend_360( - obj, - sel, - set1, - ); - } - - late final __objc_msgSend_360Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_360 = __objc_msgSend_360Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_stringByPaddingToLength_withString_startingAtIndex_1 = - _registerName1("stringByPaddingToLength:withString:startingAtIndex:"); - ffi.Pointer _objc_msgSend_361( - ffi.Pointer obj, - ffi.Pointer sel, - int newLength, - ffi.Pointer padString, - int padIndex, - ) { - return __objc_msgSend_361( - obj, - sel, - newLength, - padString, - padIndex, - ); - } - - late final __objc_msgSend_361Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_361 = __objc_msgSend_361Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer, int)>(); - - late final _sel_stringByFoldingWithOptions_locale_1 = - _registerName1("stringByFoldingWithOptions:locale:"); - ffi.Pointer _objc_msgSend_362( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ffi.Pointer locale, - ) { - return __objc_msgSend_362( - obj, - sel, - options, - locale, - ); - } - - late final __objc_msgSend_362Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_362 = __objc_msgSend_362Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_stringByReplacingOccurrencesOfString_withString_options_range_1 = - _registerName1( - "stringByReplacingOccurrencesOfString:withString:options:range:"); - ffi.Pointer _objc_msgSend_363( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer replacement, - int options, - _NSRange searchRange, - ) { - return __objc_msgSend_363( - obj, - sel, - target, - replacement, - options, - searchRange, - ); - } - - late final __objc_msgSend_363Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_363 = __objc_msgSend_363Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange)>(); - - late final _sel_stringByReplacingOccurrencesOfString_withString_1 = - _registerName1("stringByReplacingOccurrencesOfString:withString:"); - ffi.Pointer _objc_msgSend_364( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer replacement, - ) { - return __objc_msgSend_364( - obj, - sel, - target, - replacement, - ); - } - - late final __objc_msgSend_364Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_364 = __objc_msgSend_364Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_stringByReplacingCharactersInRange_withString_1 = - _registerName1("stringByReplacingCharactersInRange:withString:"); - ffi.Pointer _objc_msgSend_365( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer replacement, - ) { - return __objc_msgSend_365( - obj, - sel, - range, - replacement, - ); - } - - late final __objc_msgSend_365Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_365 = __objc_msgSend_365Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange, ffi.Pointer)>(); - - late final _sel_stringByApplyingTransform_reverse_1 = - _registerName1("stringByApplyingTransform:reverse:"); - ffi.Pointer _objc_msgSend_366( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer transform, - bool reverse, - ) { - return __objc_msgSend_366( - obj, - sel, - transform, - reverse, - ); - } - - late final __objc_msgSend_366Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_366 = __objc_msgSend_366Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_writeToURL_atomically_encoding_error_1 = - _registerName1("writeToURL:atomically:encoding:error:"); - bool _objc_msgSend_367( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - bool useAuxiliaryFile, - int enc, - ffi.Pointer> error, - ) { - return __objc_msgSend_367( - obj, - sel, - url, - useAuxiliaryFile, - enc, - error, - ); - } - - late final __objc_msgSend_367Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.UnsignedLong, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_367 = __objc_msgSend_367Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - int, - ffi.Pointer>)>(); - - late final _sel_writeToFile_atomically_encoding_error_1 = - _registerName1("writeToFile:atomically:encoding:error:"); - bool _objc_msgSend_368( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool useAuxiliaryFile, - int enc, - ffi.Pointer> error, - ) { - return __objc_msgSend_368( - obj, - sel, - path, - useAuxiliaryFile, - enc, - error, - ); - } - - late final __objc_msgSend_368Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.UnsignedLong, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_368 = __objc_msgSend_368Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - int, - ffi.Pointer>)>(); - - late final _sel_hash1 = _registerName1("hash"); - late final _sel_initWithCharactersNoCopy_length_freeWhenDone_1 = - _registerName1("initWithCharactersNoCopy:length:freeWhenDone:"); - instancetype _objc_msgSend_369( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer characters, - int length, - bool freeBuffer, - ) { - return __objc_msgSend_369( - obj, - sel, - characters, - length, - freeBuffer, - ); - } - - late final __objc_msgSend_369Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_369 = __objc_msgSend_369Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, bool)>(); - - late final _sel_initWithCharactersNoCopy_length_deallocator_1 = - _registerName1("initWithCharactersNoCopy:length:deallocator:"); - instancetype _objc_msgSend_370( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer chars, - int len, - ffi.Pointer<_ObjCBlock> deallocator, - ) { - return __objc_msgSend_370( - obj, - sel, - chars, - len, - deallocator, - ); - } - - late final __objc_msgSend_370Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_370 = __objc_msgSend_370Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_initWithCharacters_length_1 = - _registerName1("initWithCharacters:length:"); - instancetype _objc_msgSend_371( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer characters, - int length, - ) { - return __objc_msgSend_371( - obj, - sel, - characters, - length, - ); - } - - late final __objc_msgSend_371Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_371 = __objc_msgSend_371Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_initWithUTF8String_1 = _registerName1("initWithUTF8String:"); - instancetype _objc_msgSend_372( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer nullTerminatedCString, - ) { - return __objc_msgSend_372( - obj, - sel, - nullTerminatedCString, - ); - } - - late final __objc_msgSend_372Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_372 = __objc_msgSend_372Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithFormat_1 = _registerName1("initWithFormat:"); - late final _sel_initWithFormat_arguments_1 = - _registerName1("initWithFormat:arguments:"); - instancetype _objc_msgSend_373( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer<__va_list_tag> argList, - ) { - return __objc_msgSend_373( - obj, - sel, - format, - argList, - ); - } - - late final __objc_msgSend_373Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>('objc_msgSend'); - late final __objc_msgSend_373 = __objc_msgSend_373Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<__va_list_tag>)>(); - - late final _sel_initWithFormat_locale_1 = - _registerName1("initWithFormat:locale:"); - instancetype _objc_msgSend_374( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer locale, - ) { - return __objc_msgSend_374( - obj, - sel, - format, - locale, - ); - } - - late final __objc_msgSend_374Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_374 = __objc_msgSend_374Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithFormat_locale_arguments_1 = - _registerName1("initWithFormat:locale:arguments:"); - instancetype _objc_msgSend_375( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer locale, - ffi.Pointer<__va_list_tag> argList, - ) { - return __objc_msgSend_375( - obj, - sel, - format, - locale, - argList, - ); - } - - late final __objc_msgSend_375Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>('objc_msgSend'); - late final __objc_msgSend_375 = __objc_msgSend_375Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>(); - - late final _sel_initWithValidatedFormat_validFormatSpecifiers_error_1 = - _registerName1("initWithValidatedFormat:validFormatSpecifiers:error:"); - instancetype _objc_msgSend_376( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer validFormatSpecifiers, - ffi.Pointer> error, - ) { - return __objc_msgSend_376( - obj, - sel, - format, - validFormatSpecifiers, - error, - ); - } - - late final __objc_msgSend_376Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_376 = __objc_msgSend_376Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1 = - _registerName1( - "initWithValidatedFormat:validFormatSpecifiers:locale:error:"); - instancetype _objc_msgSend_377( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer validFormatSpecifiers, - ffi.Pointer locale, - ffi.Pointer> error, - ) { - return __objc_msgSend_377( - obj, - sel, - format, - validFormatSpecifiers, - locale, - error, - ); - } - - late final __objc_msgSend_377Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_377 = __objc_msgSend_377Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1 = - _registerName1( - "initWithValidatedFormat:validFormatSpecifiers:arguments:error:"); - instancetype _objc_msgSend_378( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer validFormatSpecifiers, - ffi.Pointer<__va_list_tag> argList, - ffi.Pointer> error, - ) { - return __objc_msgSend_378( - obj, - sel, - format, - validFormatSpecifiers, - argList, - error, - ); - } - - late final __objc_msgSend_378Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_378 = __objc_msgSend_378Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>, - ffi.Pointer>)>(); - - late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1 = - _registerName1( - "initWithValidatedFormat:validFormatSpecifiers:locale:arguments:error:"); - instancetype _objc_msgSend_379( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer validFormatSpecifiers, - ffi.Pointer locale, - ffi.Pointer<__va_list_tag> argList, - ffi.Pointer> error, - ) { - return __objc_msgSend_379( - obj, - sel, - format, - validFormatSpecifiers, - locale, - argList, - error, - ); - } - - late final __objc_msgSend_379Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_379 = __objc_msgSend_379Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>, - ffi.Pointer>)>(); - - late final _sel_initWithData_encoding_1 = - _registerName1("initWithData:encoding:"); - instancetype _objc_msgSend_380( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - int encoding, - ) { - return __objc_msgSend_380( - obj, - sel, - data, - encoding, - ); - } - - late final __objc_msgSend_380Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_380 = __objc_msgSend_380Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_initWithBytes_length_encoding_1 = - _registerName1("initWithBytes:length:encoding:"); - instancetype _objc_msgSend_381( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int len, - int encoding, - ) { - return __objc_msgSend_381( - obj, - sel, - bytes, - len, - encoding, - ); - } - - late final __objc_msgSend_381Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_381 = __objc_msgSend_381Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); - - late final _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1 = - _registerName1("initWithBytesNoCopy:length:encoding:freeWhenDone:"); - instancetype _objc_msgSend_382( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int len, - int encoding, - bool freeBuffer, - ) { - return __objc_msgSend_382( - obj, - sel, - bytes, - len, - encoding, - freeBuffer, - ); - } - - late final __objc_msgSend_382Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_382 = __objc_msgSend_382Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, bool)>(); - - late final _sel_initWithBytesNoCopy_length_encoding_deallocator_1 = - _registerName1("initWithBytesNoCopy:length:encoding:deallocator:"); - instancetype _objc_msgSend_383( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int len, - int encoding, - ffi.Pointer<_ObjCBlock> deallocator, - ) { - return __objc_msgSend_383( - obj, - sel, - bytes, - len, - encoding, - deallocator, - ); - } - - late final __objc_msgSend_383Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_383 = __objc_msgSend_383Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_string1 = _registerName1("string"); - late final _sel_stringWithString_1 = _registerName1("stringWithString:"); - late final _sel_stringWithCharacters_length_1 = - _registerName1("stringWithCharacters:length:"); - late final _sel_stringWithUTF8String_1 = - _registerName1("stringWithUTF8String:"); - late final _sel_stringWithFormat_1 = _registerName1("stringWithFormat:"); - late final _sel_localizedStringWithFormat_1 = - _registerName1("localizedStringWithFormat:"); - late final _sel_stringWithValidatedFormat_validFormatSpecifiers_error_1 = - _registerName1("stringWithValidatedFormat:validFormatSpecifiers:error:"); - late final _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1 = - _registerName1( - "localizedStringWithValidatedFormat:validFormatSpecifiers:error:"); - late final _sel_initWithCString_encoding_1 = - _registerName1("initWithCString:encoding:"); - instancetype _objc_msgSend_384( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer nullTerminatedCString, - int encoding, - ) { - return __objc_msgSend_384( - obj, - sel, - nullTerminatedCString, - encoding, - ); - } - - late final __objc_msgSend_384Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_384 = __objc_msgSend_384Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_stringWithCString_encoding_1 = - _registerName1("stringWithCString:encoding:"); - late final _sel_initWithContentsOfURL_encoding_error_1 = - _registerName1("initWithContentsOfURL:encoding:error:"); - instancetype _objc_msgSend_385( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int enc, - ffi.Pointer> error, - ) { - return __objc_msgSend_385( - obj, - sel, - url, - enc, - error, - ); - } - - late final __objc_msgSend_385Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_385 = __objc_msgSend_385Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_initWithContentsOfFile_encoding_error_1 = - _registerName1("initWithContentsOfFile:encoding:error:"); - instancetype _objc_msgSend_386( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - int enc, - ffi.Pointer> error, - ) { - return __objc_msgSend_386( - obj, - sel, - path, - enc, - error, - ); - } - - late final __objc_msgSend_386Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_386 = __objc_msgSend_386Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_stringWithContentsOfURL_encoding_error_1 = - _registerName1("stringWithContentsOfURL:encoding:error:"); - late final _sel_stringWithContentsOfFile_encoding_error_1 = - _registerName1("stringWithContentsOfFile:encoding:error:"); - late final _sel_initWithContentsOfURL_usedEncoding_error_1 = - _registerName1("initWithContentsOfURL:usedEncoding:error:"); - instancetype _objc_msgSend_387( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer enc, - ffi.Pointer> error, - ) { - return __objc_msgSend_387( - obj, - sel, - url, - enc, - error, - ); - } - - late final __objc_msgSend_387Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_387 = __objc_msgSend_387Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_initWithContentsOfFile_usedEncoding_error_1 = - _registerName1("initWithContentsOfFile:usedEncoding:error:"); - instancetype _objc_msgSend_388( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer enc, - ffi.Pointer> error, - ) { - return __objc_msgSend_388( - obj, - sel, - path, - enc, - error, - ); - } - - late final __objc_msgSend_388Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_388 = __objc_msgSend_388Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_stringWithContentsOfURL_usedEncoding_error_1 = - _registerName1("stringWithContentsOfURL:usedEncoding:error:"); - late final _sel_stringWithContentsOfFile_usedEncoding_error_1 = - _registerName1("stringWithContentsOfFile:usedEncoding:error:"); - late final _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1 = - _registerName1( - "stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:"); - int _objc_msgSend_389( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion, - ) { - return __objc_msgSend_389( - obj, - sel, - data, - opts, - string, - usedLossyConversion, - ); - } - - late final __objc_msgSend_389Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_389 = __objc_msgSend_389Ptr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); - - late final _sel_propertyList1 = _registerName1("propertyList"); - late final _sel_propertyListFromStringsFileFormat1 = - _registerName1("propertyListFromStringsFileFormat"); - ffi.Pointer _objc_msgSend_390( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_390( - obj, - sel, - ); - } - - late final __objc_msgSend_390Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_390 = __objc_msgSend_390Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_cString1 = _registerName1("cString"); - late final _sel_lossyCString1 = _registerName1("lossyCString"); - late final _sel_cStringLength1 = _registerName1("cStringLength"); - late final _sel_getCString_1 = _registerName1("getCString:"); - late final _sel_getCString_maxLength_1 = - _registerName1("getCString:maxLength:"); - void _objc_msgSend_391( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int maxLength, - ) { - return __objc_msgSend_391( - obj, - sel, - bytes, - maxLength, - ); - } - - late final __objc_msgSend_391Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_391 = __objc_msgSend_391Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_getCString_maxLength_range_remainingRange_1 = - _registerName1("getCString:maxLength:range:remainingRange:"); - void _objc_msgSend_392( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int maxLength, - _NSRange aRange, - ffi.Pointer<_NSRange> leftoverRange, - ) { - return __objc_msgSend_392( - obj, - sel, - bytes, - maxLength, - aRange, - leftoverRange, - ); - } - - late final __objc_msgSend_392Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - _NSRange, - ffi.Pointer<_NSRange>)>>('objc_msgSend'); - late final __objc_msgSend_392 = __objc_msgSend_392Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, _NSRange, ffi.Pointer<_NSRange>)>(); - - 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_393( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int length, - bool freeBuffer, - ) { - return __objc_msgSend_393( - obj, - sel, - bytes, - length, - freeBuffer, - ); - } - - late final __objc_msgSend_393Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_393 = __objc_msgSend_393Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, bool)>(); - - late final _sel_initWithCString_length_1 = - _registerName1("initWithCString:length:"); - late final _sel_initWithCString_1 = _registerName1("initWithCString:"); - late final _sel_stringWithCString_length_1 = - _registerName1("stringWithCString:length:"); - late final _sel_stringWithCString_1 = _registerName1("stringWithCString:"); - late final _sel_getCharacters_1 = _registerName1("getCharacters:"); - void _objc_msgSend_394( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - ) { - return __objc_msgSend_394( - obj, - sel, - buffer, - ); - } - - late final __objc_msgSend_394Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_394 = __objc_msgSend_394Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_variantFittingPresentationWidth_1 = - _registerName1("variantFittingPresentationWidth:"); - ffi.Pointer _objc_msgSend_395( - ffi.Pointer obj, - ffi.Pointer sel, - int width, - ) { - return __objc_msgSend_395( - obj, - sel, - width, - ); - } - - late final __objc_msgSend_395Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_395 = __objc_msgSend_395Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_pathWithComponents_1 = _registerName1("pathWithComponents:"); - ffi.Pointer _objc_msgSend_396( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer components, - ) { - return __objc_msgSend_396( - obj, - sel, - components, - ); - } - - late final __objc_msgSend_396Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(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)>(); - - late final _sel_isAbsolutePath1 = _registerName1("isAbsolutePath"); - late final _sel_stringByDeletingLastPathComponent1 = - _registerName1("stringByDeletingLastPathComponent"); - late final _sel_stringByAppendingPathComponent_1 = - _registerName1("stringByAppendingPathComponent:"); - late final _sel_stringByDeletingPathExtension1 = - _registerName1("stringByDeletingPathExtension"); - late final _sel_stringByAppendingPathExtension_1 = - _registerName1("stringByAppendingPathExtension:"); - late final _sel_stringByAbbreviatingWithTildeInPath1 = - _registerName1("stringByAbbreviatingWithTildeInPath"); - late final _sel_stringByExpandingTildeInPath1 = - _registerName1("stringByExpandingTildeInPath"); - late final _sel_stringByStandardizingPath1 = - _registerName1("stringByStandardizingPath"); - late final _sel_stringByResolvingSymlinksInPath1 = - _registerName1("stringByResolvingSymlinksInPath"); - late final _sel_stringsByAppendingPaths_1 = - _registerName1("stringsByAppendingPaths:"); - late final _sel_completePathIntoString_caseSensitive_matchesIntoArray_filterTypes_1 = - _registerName1( - "completePathIntoString:caseSensitive:matchesIntoArray:filterTypes:"); - int _objc_msgSend_397( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> outputName, - bool flag, - ffi.Pointer> outputArray, - ffi.Pointer filterTypes, - ) { - return __objc_msgSend_397( - obj, - sel, - outputName, - flag, - outputArray, - filterTypes, - ); - } - - late final __objc_msgSend_397Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Bool, - ffi.Pointer>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_397 = __objc_msgSend_397Ptr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - bool, - ffi.Pointer>, - ffi.Pointer)>(); - - late final _sel_stringByAddingPercentEncodingWithAllowedCharacters_1 = - _registerName1("stringByAddingPercentEncodingWithAllowedCharacters:"); - ffi.Pointer _objc_msgSend_398( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer allowedCharacters, - ) { - return __objc_msgSend_398( - obj, - sel, - allowedCharacters, - ); - } - - late final __objc_msgSend_398Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_398 = __objc_msgSend_398Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_stringByRemovingPercentEncoding1 = - _registerName1("stringByRemovingPercentEncoding"); - late final _sel_stringByAddingPercentEscapesUsingEncoding_1 = - _registerName1("stringByAddingPercentEscapesUsingEncoding:"); - ffi.Pointer _objc_msgSend_399( - ffi.Pointer obj, - ffi.Pointer sel, - int enc, - ) { - return __objc_msgSend_399( - obj, - sel, - enc, - ); - } - - late final __objc_msgSend_399Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_399 = __objc_msgSend_399Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_stringByReplacingPercentEscapesUsingEncoding_1 = - _registerName1("stringByReplacingPercentEscapesUsingEncoding:"); - late final _class_NSOrthography1 = _getClass1("NSOrthography"); - late final _sel_dominantScript1 = _registerName1("dominantScript"); - late final _sel_languageMap1 = _registerName1("languageMap"); - late final _sel_initWithDominantScript_languageMap_1 = - _registerName1("initWithDominantScript:languageMap:"); - instancetype _objc_msgSend_400( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer script, - ffi.Pointer map, - ) { - return __objc_msgSend_400( - obj, - sel, - script, - map, - ); - } - - late final __objc_msgSend_400Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_400 = __objc_msgSend_400Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_languagesForScript_1 = _registerName1("languagesForScript:"); - late final _sel_dominantLanguageForScript_1 = - _registerName1("dominantLanguageForScript:"); - late final _sel_dominantLanguage1 = _registerName1("dominantLanguage"); - late final _sel_allScripts1 = _registerName1("allScripts"); - late final _sel_allLanguages1 = _registerName1("allLanguages"); - late final _sel_defaultOrthographyForLanguage_1 = - _registerName1("defaultOrthographyForLanguage:"); - late final _sel_orthographyWithDominantScript_languageMap_1 = - _registerName1("orthographyWithDominantScript:languageMap:"); - late final _sel_linguisticTagsInRange_scheme_options_orthography_tokenRanges_1 = - _registerName1( - "linguisticTagsInRange:scheme:options:orthography:tokenRanges:"); - ffi.Pointer _objc_msgSend_401( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer scheme, - int options, - ffi.Pointer orthography, - ffi.Pointer> tokenRanges, - ) { - return __objc_msgSend_401( - obj, - sel, - range, - scheme, - options, - orthography, - tokenRanges, - ); - } - - late final __objc_msgSend_401Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_401 = __objc_msgSend_401Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock_1 = - _registerName1( - "enumerateLinguisticTagsInRange:scheme:options:orthography:usingBlock:"); - void _objc_msgSend_402( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer scheme, - int options, - ffi.Pointer orthography, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_402( - obj, - sel, - range, - scheme, - options, - orthography, - block, - ); - } - - late final __objc_msgSend_402Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_402 = __objc_msgSend_402Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_anyObject1 = _registerName1("anyObject"); - late final _sel_intersectsSet_1 = _registerName1("intersectsSet:"); - bool _objc_msgSend_403( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherSet, - ) { - return __objc_msgSend_403( - obj, - sel, - otherSet, - ); - } - - late final __objc_msgSend_403Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_403 = __objc_msgSend_403Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_isEqualToSet_1 = _registerName1("isEqualToSet:"); - late final _sel_isSubsetOfSet_1 = _registerName1("isSubsetOfSet:"); - late final _sel_setByAddingObject_1 = _registerName1("setByAddingObject:"); - ffi.Pointer _objc_msgSend_404( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - ) { - return __objc_msgSend_404( - obj, - sel, - anObject, - ); - } - - late final __objc_msgSend_404Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_404 = __objc_msgSend_404Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setByAddingObjectsFromSet_1 = - _registerName1("setByAddingObjectsFromSet:"); - ffi.Pointer _objc_msgSend_405( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - ) { - return __objc_msgSend_405( - obj, - sel, - other, - ); - } - - late final __objc_msgSend_405Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_405 = __objc_msgSend_405Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setByAddingObjectsFromArray_1 = - _registerName1("setByAddingObjectsFromArray:"); - ffi.Pointer _objc_msgSend_406( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - ) { - return __objc_msgSend_406( - obj, - sel, - other, - ); - } - - late final __objc_msgSend_406Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_406 = __objc_msgSend_406Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - void _objc_msgSend_407( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_407( - obj, - sel, - block, - ); - } - - late final __objc_msgSend_407Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(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<_ObjCBlock>)>(); - - void _objc_msgSend_408( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_408( - obj, - sel, - opts, - block, - ); - } - - late final __objc_msgSend_408Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_408 = __objc_msgSend_408Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_objectsPassingTest_1 = _registerName1("objectsPassingTest:"); - ffi.Pointer _objc_msgSend_409( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_409( - obj, - sel, - predicate, - ); - } - - late final __objc_msgSend_409Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_409 = __objc_msgSend_409Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_objectsWithOptions_passingTest_1 = - _registerName1("objectsWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_410( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_410( - obj, - sel, - opts, - predicate, - ); - } - - late final __objc_msgSend_410Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_410 = __objc_msgSend_410Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_set1 = _registerName1("set"); - late final _sel_setWithObject_1 = _registerName1("setWithObject:"); - late final _sel_setWithObjects_count_1 = - _registerName1("setWithObjects:count:"); - late final _sel_setWithObjects_1 = _registerName1("setWithObjects:"); - late final _sel_setWithSet_1 = _registerName1("setWithSet:"); - instancetype _objc_msgSend_411( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer set1, - ) { - return __objc_msgSend_411( - obj, - sel, - set1, - ); - } - - late final __objc_msgSend_411Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_411 = __objc_msgSend_411Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_setWithArray_1 = _registerName1("setWithArray:"); - late final _sel_initWithSet_1 = _registerName1("initWithSet:"); - late final _sel_initWithSet_copyItems_1 = - _registerName1("initWithSet:copyItems:"); - instancetype _objc_msgSend_412( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer set1, - bool flag, - ) { - return __objc_msgSend_412( - obj, - sel, - set1, - flag, - ); - } - - late final __objc_msgSend_412Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_412 = __objc_msgSend_412Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_filteredSetUsingPredicate_1 = - _registerName1("filteredSetUsingPredicate:"); - ffi.Pointer _objc_msgSend_413( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer predicate, - ) { - return __objc_msgSend_413( - obj, - sel, - predicate, - ); - } - - late final __objc_msgSend_413Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_413 = __objc_msgSend_413Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_invocationWithMethodSignature_1 = - _registerName1("invocationWithMethodSignature:"); - ffi.Pointer _objc_msgSend_414( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer sig, - ) { - return __objc_msgSend_414( - obj, - sel, - sig, - ); - } - - late final __objc_msgSend_414Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_414 = __objc_msgSend_414Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_methodSignature1 = _registerName1("methodSignature"); - ffi.Pointer _objc_msgSend_415( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_415( - obj, - sel, - ); - } - - late final __objc_msgSend_415Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_415 = __objc_msgSend_415Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_retainArguments1 = _registerName1("retainArguments"); - late final _sel_argumentsRetained1 = _registerName1("argumentsRetained"); - late final _sel_target1 = _registerName1("target"); - late final _sel_setTarget_1 = _registerName1("setTarget:"); - void _objc_msgSend_416( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_416( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_416Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_416 = __objc_msgSend_416Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_selector1 = _registerName1("selector"); - ffi.Pointer _objc_msgSend_417( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_417( - obj, - sel, - ); - } - - late final __objc_msgSend_417Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_417 = __objc_msgSend_417Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setSelector_1 = _registerName1("setSelector:"); - void _objc_msgSend_418( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_418( - obj, - sel, - 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)>(); - - late final _sel_getReturnValue_1 = _registerName1("getReturnValue:"); - late final _sel_setReturnValue_1 = _registerName1("setReturnValue:"); - late final _sel_getArgument_atIndex_1 = - _registerName1("getArgument:atIndex:"); - void _objc_msgSend_419( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer argumentLocation, - int idx, - ) { - return __objc_msgSend_419( - obj, - sel, - argumentLocation, - idx, - ); - } - - late final __objc_msgSend_419Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_419 = __objc_msgSend_419Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_setArgument_atIndex_1 = - _registerName1("setArgument:atIndex:"); - late final _sel_invoke1 = _registerName1("invoke"); - late final _sel_invokeWithTarget_1 = _registerName1("invokeWithTarget:"); - late final _sel_invokeUsingIMP_1 = _registerName1("invokeUsingIMP:"); - void _objc_msgSend_420( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> imp, - ) { - return __objc_msgSend_420( - obj, - sel, - imp, - ); - } - - late final __objc_msgSend_420Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>( - 'objc_msgSend'); - late final __objc_msgSend_420 = __objc_msgSend_420Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_forwardInvocation_1 = _registerName1("forwardInvocation:"); - void _objc_msgSend_421( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anInvocation, - ) { - return __objc_msgSend_421( - obj, - sel, - anInvocation, - ); - } - - late final __objc_msgSend_421Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_421 = __objc_msgSend_421Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_methodSignatureForSelector_1 = - _registerName1("methodSignatureForSelector:"); - ffi.Pointer _objc_msgSend_422( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ) { - return __objc_msgSend_422( - obj, - sel, - aSelector, - ); - } - - late final __objc_msgSend_422Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(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)>(); - - late final _sel_instanceMethodSignatureForSelector_1 = - _registerName1("instanceMethodSignatureForSelector:"); - late final _sel_allowsWeakReference1 = _registerName1("allowsWeakReference"); - 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_superclass1 = _registerName1("superclass"); - late final _sel_class1 = _registerName1("class"); - late final _sel_debugDescription1 = _registerName1("debugDescription"); - late final _sel_version1 = _registerName1("version"); - late final _sel_setVersion_1 = _registerName1("setVersion:"); - void _objc_msgSend_423( - ffi.Pointer obj, - ffi.Pointer sel, - int aVersion, - ) { - return __objc_msgSend_423( - obj, - sel, - aVersion, - ); - } - - late final __objc_msgSend_423Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_423 = __objc_msgSend_423Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_classForCoder1 = _registerName1("classForCoder"); - late final _sel_replacementObjectForCoder_1 = - _registerName1("replacementObjectForCoder:"); - late final _sel_awakeAfterUsingCoder_1 = - _registerName1("awakeAfterUsingCoder:"); - late final _sel_poseAsClass_1 = _registerName1("poseAsClass:"); - late final _sel_autoContentAccessingProxy1 = - _registerName1("autoContentAccessingProxy"); - late final _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1 = - _registerName1( - "attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:"); - void _objc_msgSend_424( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer error, - int recoveryOptionIndex, - ffi.Pointer delegate, - ffi.Pointer didRecoverSelector, - ffi.Pointer contextInfo, - ) { - return __objc_msgSend_424( - obj, - sel, - error, - recoveryOptionIndex, - delegate, - didRecoverSelector, - contextInfo, - ); - } - - late final __objc_msgSend_424Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_424 = __objc_msgSend_424Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_attemptRecoveryFromError_optionIndex_1 = - _registerName1("attemptRecoveryFromError:optionIndex:"); - bool _objc_msgSend_425( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer error, - int recoveryOptionIndex, - ) { - return __objc_msgSend_425( - obj, - sel, - error, - recoveryOptionIndex, - ); - } - - late final __objc_msgSend_425Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_425 = __objc_msgSend_425Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_performSelector_withObject_afterDelay_inModes_1 = - _registerName1("performSelector:withObject:afterDelay:inModes:"); - void _objc_msgSend_426( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ffi.Pointer anArgument, - double delay, - ffi.Pointer modes, - ) { - return __objc_msgSend_426( - obj, - sel, - aSelector, - anArgument, - delay, - modes, - ); - } - - late final __objc_msgSend_426Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_426 = __objc_msgSend_426Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - double, - ffi.Pointer)>(); - - late final _sel_performSelector_withObject_afterDelay_1 = - _registerName1("performSelector:withObject:afterDelay:"); - void _objc_msgSend_427( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ffi.Pointer anArgument, - double delay, - ) { - return __objc_msgSend_427( - obj, - sel, - aSelector, - anArgument, - delay, - ); - } - - late final __objc_msgSend_427Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_427 = __objc_msgSend_427Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, double)>(); - - late final _sel_URL_resourceDataDidBecomeAvailable_1 = - _registerName1("URL:resourceDataDidBecomeAvailable:"); - void _objc_msgSend_428( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer sender, - ffi.Pointer newBytes, - ) { - return __objc_msgSend_428( - obj, - sel, - sender, - newBytes, - ); - } - - late final __objc_msgSend_428Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_428 = __objc_msgSend_428Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_URLResourceDidFinishLoading_1 = - _registerName1("URLResourceDidFinishLoading:"); - void _objc_msgSend_429( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer sender, - ) { - return __objc_msgSend_429( - obj, - sel, - sender, - ); - } - - late final __objc_msgSend_429Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_429 = __objc_msgSend_429Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_URLResourceDidCancelLoading_1 = - _registerName1("URLResourceDidCancelLoading:"); - late final _sel_URL_resourceDidFailLoadingWithReason_1 = - _registerName1("URL:resourceDidFailLoadingWithReason:"); - void _objc_msgSend_430( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer sender, - ffi.Pointer reason, - ) { - return __objc_msgSend_430( - obj, - sel, - sender, - reason, - ); - } - - late final __objc_msgSend_430Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_430 = __objc_msgSend_430Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSFileManager1 = _getClass1("NSFileManager"); - late final _sel_defaultManager1 = _registerName1("defaultManager"); - ffi.Pointer _objc_msgSend_431( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_431( - obj, - sel, - ); - } - - late final __objc_msgSend_431Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_431 = __objc_msgSend_431Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_1 = - _registerName1( - "mountedVolumeURLsIncludingResourceValuesForKeys:options:"); - ffi.Pointer _objc_msgSend_432( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer propertyKeys, - int options, - ) { - return __objc_msgSend_432( - obj, - sel, - propertyKeys, - options, - ); - } - - late final __objc_msgSend_432Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_432 = __objc_msgSend_432Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_unmountVolumeAtURL_options_completionHandler_1 = - _registerName1("unmountVolumeAtURL:options:completionHandler:"); - void _objc_msgSend_433( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int mask, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_433( - obj, - sel, - url, - mask, - completionHandler, - ); - } - - late final __objc_msgSend_433Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_433 = __objc_msgSend_433Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_1 = - _registerName1( - "contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:"); - ffi.Pointer _objc_msgSend_434( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer keys, - int mask, - ffi.Pointer> error, - ) { - return __objc_msgSend_434( - obj, - sel, - url, - keys, - mask, - error, - ); - } - - late final __objc_msgSend_434Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_434 = __objc_msgSend_434Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_URLsForDirectory_inDomains_1 = - _registerName1("URLsForDirectory:inDomains:"); - ffi.Pointer _objc_msgSend_435( - ffi.Pointer obj, - ffi.Pointer sel, - int directory, - int domainMask, - ) { - return __objc_msgSend_435( - obj, - sel, - directory, - domainMask, - ); - } - - late final __objc_msgSend_435Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_435 = __objc_msgSend_435Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int, int)>(); - - late final _sel_URLForDirectory_inDomain_appropriateForURL_create_error_1 = - _registerName1( - "URLForDirectory:inDomain:appropriateForURL:create:error:"); - ffi.Pointer _objc_msgSend_436( - ffi.Pointer obj, - ffi.Pointer sel, - int directory, - int domain, - ffi.Pointer url, - bool shouldCreate, - ffi.Pointer> error, - ) { - return __objc_msgSend_436( - obj, - sel, - directory, - domain, - url, - shouldCreate, - error, - ); - } - - late final __objc_msgSend_436Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer, - ffi.Bool, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_436 = __objc_msgSend_436Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer, - bool, - ffi.Pointer>)>(); - - late final _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_1 = - _registerName1("getRelationship:ofDirectoryAtURL:toItemAtURL:error:"); - bool _objc_msgSend_437( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer outRelationship, - ffi.Pointer directoryURL, - ffi.Pointer otherURL, - ffi.Pointer> error, - ) { - return __objc_msgSend_437( - obj, - sel, - outRelationship, - directoryURL, - otherURL, - error, - ); - } - - late final __objc_msgSend_437Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_437 = __objc_msgSend_437Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_getRelationship_ofDirectory_inDomain_toItemAtURL_error_1 = - _registerName1("getRelationship:ofDirectory:inDomain:toItemAtURL:error:"); - bool _objc_msgSend_438( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer outRelationship, - int directory, - int domainMask, - ffi.Pointer url, - ffi.Pointer> error, - ) { - return __objc_msgSend_438( - obj, - sel, - outRelationship, - directory, - domainMask, - url, - error, - ); - } - - late final __objc_msgSend_438Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_438 = __objc_msgSend_438Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_createDirectoryAtURL_withIntermediateDirectories_attributes_error_1 = - _registerName1( - "createDirectoryAtURL:withIntermediateDirectories:attributes:error:"); - bool _objc_msgSend_439( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - bool createIntermediates, - ffi.Pointer attributes, - ffi.Pointer> error, - ) { - return __objc_msgSend_439( - obj, - sel, - url, - createIntermediates, - attributes, - error, - ); - } - - late final __objc_msgSend_439Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_439 = __objc_msgSend_439Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_createSymbolicLinkAtURL_withDestinationURL_error_1 = - _registerName1("createSymbolicLinkAtURL:withDestinationURL:error:"); - bool _objc_msgSend_440( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer destURL, - ffi.Pointer> error, - ) { - return __objc_msgSend_440( - obj, - sel, - url, - destURL, - error, - ); - } - - late final __objc_msgSend_440Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_440 = __objc_msgSend_440Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_delegate1 = _registerName1("delegate"); - late final _sel_setDelegate_1 = _registerName1("setDelegate:"); - late final _sel_setAttributes_ofItemAtPath_error_1 = - _registerName1("setAttributes:ofItemAtPath:error:"); - bool _objc_msgSend_441( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer attributes, - ffi.Pointer path, - ffi.Pointer> error, - ) { - return __objc_msgSend_441( - obj, - sel, - attributes, - path, - error, - ); - } - - late final __objc_msgSend_441Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_441 = __objc_msgSend_441Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_1 = - _registerName1( - "createDirectoryAtPath:withIntermediateDirectories:attributes:error:"); - bool _objc_msgSend_442( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool createIntermediates, - ffi.Pointer attributes, - ffi.Pointer> error, - ) { - return __objc_msgSend_442( - obj, - sel, - path, - createIntermediates, - attributes, - error, - ); - } - - late final __objc_msgSend_442Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_442 = __objc_msgSend_442Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_contentsOfDirectoryAtPath_error_1 = - _registerName1("contentsOfDirectoryAtPath:error:"); - ffi.Pointer _objc_msgSend_443( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer> error, - ) { - return __objc_msgSend_443( - obj, - sel, - path, - error, - ); - } - - late final __objc_msgSend_443Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_443 = __objc_msgSend_443Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_subpathsOfDirectoryAtPath_error_1 = - _registerName1("subpathsOfDirectoryAtPath:error:"); - late final _sel_attributesOfItemAtPath_error_1 = - _registerName1("attributesOfItemAtPath:error:"); - ffi.Pointer _objc_msgSend_444( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer> error, - ) { - return __objc_msgSend_444( - obj, - sel, - path, - error, - ); - } - - late final __objc_msgSend_444Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - 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, - ffi.Pointer>)>(); - - late final _sel_attributesOfFileSystemForPath_error_1 = - _registerName1("attributesOfFileSystemForPath:error:"); - late final _sel_createSymbolicLinkAtPath_withDestinationPath_error_1 = - _registerName1("createSymbolicLinkAtPath:withDestinationPath:error:"); - bool _objc_msgSend_445( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer destPath, - ffi.Pointer> error, - ) { - return __objc_msgSend_445( - obj, - sel, - path, - destPath, - error, - ); - } - - late final __objc_msgSend_445Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_445 = __objc_msgSend_445Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_destinationOfSymbolicLinkAtPath_error_1 = - _registerName1("destinationOfSymbolicLinkAtPath:error:"); - ffi.Pointer _objc_msgSend_446( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer> error, - ) { - return __objc_msgSend_446( - obj, - sel, - path, - error, - ); - } - - late final __objc_msgSend_446Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - 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, - ffi.Pointer>)>(); - - late final _sel_copyItemAtPath_toPath_error_1 = - _registerName1("copyItemAtPath:toPath:error:"); - late final _sel_moveItemAtPath_toPath_error_1 = - _registerName1("moveItemAtPath:toPath:error:"); - late final _sel_linkItemAtPath_toPath_error_1 = - _registerName1("linkItemAtPath:toPath:error:"); - late final _sel_removeItemAtPath_error_1 = - _registerName1("removeItemAtPath:error:"); - bool _objc_msgSend_447( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer> error, - ) { - return __objc_msgSend_447( - obj, - sel, - path, - error, - ); - } - - late final __objc_msgSend_447Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_447 = __objc_msgSend_447Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_copyItemAtURL_toURL_error_1 = - _registerName1("copyItemAtURL:toURL:error:"); - late final _sel_moveItemAtURL_toURL_error_1 = - _registerName1("moveItemAtURL:toURL:error:"); - late final _sel_linkItemAtURL_toURL_error_1 = - _registerName1("linkItemAtURL:toURL:error:"); - late final _sel_removeItemAtURL_error_1 = - _registerName1("removeItemAtURL:error:"); - late final _sel_trashItemAtURL_resultingItemURL_error_1 = - _registerName1("trashItemAtURL:resultingItemURL:error:"); - bool _objc_msgSend_448( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> outResultingURL, - ffi.Pointer> error, - ) { - return __objc_msgSend_448( - obj, - sel, - url, - outResultingURL, - error, - ); - } - - late final __objc_msgSend_448Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_448 = __objc_msgSend_448Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _sel_fileAttributesAtPath_traverseLink_1 = - _registerName1("fileAttributesAtPath:traverseLink:"); - ffi.Pointer _objc_msgSend_449( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool yorn, - ) { - return __objc_msgSend_449( - obj, - sel, - path, - yorn, - ); - } - - late final __objc_msgSend_449Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_449 = __objc_msgSend_449Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_changeFileAttributes_atPath_1 = - _registerName1("changeFileAttributes:atPath:"); - bool _objc_msgSend_450( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer attributes, - ffi.Pointer path, - ) { - return __objc_msgSend_450( - obj, - sel, - attributes, - path, - ); - } - - late final __objc_msgSend_450Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_450 = __objc_msgSend_450Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_directoryContentsAtPath_1 = - _registerName1("directoryContentsAtPath:"); - late final _sel_fileSystemAttributesAtPath_1 = - _registerName1("fileSystemAttributesAtPath:"); - late final _sel_pathContentOfSymbolicLinkAtPath_1 = - _registerName1("pathContentOfSymbolicLinkAtPath:"); - late final _sel_createSymbolicLinkAtPath_pathContent_1 = - _registerName1("createSymbolicLinkAtPath:pathContent:"); - bool _objc_msgSend_451( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer otherpath, - ) { - return __objc_msgSend_451( - obj, - sel, - path, - otherpath, - ); - } - - late final __objc_msgSend_451Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_451 = __objc_msgSend_451Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_createDirectoryAtPath_attributes_1 = - _registerName1("createDirectoryAtPath:attributes:"); - bool _objc_msgSend_452( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer attributes, - ) { - return __objc_msgSend_452( - obj, - sel, - path, - attributes, - ); - } - - late final __objc_msgSend_452Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_452 = __objc_msgSend_452Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_linkPath_toPath_handler_1 = - _registerName1("linkPath:toPath:handler:"); - bool _objc_msgSend_453( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer src, - ffi.Pointer dest, - ffi.Pointer handler, - ) { - return __objc_msgSend_453( - obj, - sel, - src, - dest, - handler, - ); - } - - late final __objc_msgSend_453Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_453 = __objc_msgSend_453Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_copyPath_toPath_handler_1 = - _registerName1("copyPath:toPath:handler:"); - late final _sel_movePath_toPath_handler_1 = - _registerName1("movePath:toPath:handler:"); - late final _sel_removeFileAtPath_handler_1 = - _registerName1("removeFileAtPath:handler:"); - bool _objc_msgSend_454( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer handler, - ) { - return __objc_msgSend_454( - obj, - sel, - path, - handler, - ); - } - - late final __objc_msgSend_454Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_454 = __objc_msgSend_454Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_currentDirectoryPath1 = - _registerName1("currentDirectoryPath"); - late final _sel_changeCurrentDirectoryPath_1 = - _registerName1("changeCurrentDirectoryPath:"); - late final _sel_fileExistsAtPath_1 = _registerName1("fileExistsAtPath:"); - late final _sel_fileExistsAtPath_isDirectory_1 = - _registerName1("fileExistsAtPath:isDirectory:"); - bool _objc_msgSend_455( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer isDirectory, - ) { - return __objc_msgSend_455( - obj, - sel, - path, - isDirectory, - ); - } - - late final __objc_msgSend_455Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_455 = __objc_msgSend_455Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_isReadableFileAtPath_1 = - _registerName1("isReadableFileAtPath:"); - late final _sel_isWritableFileAtPath_1 = - _registerName1("isWritableFileAtPath:"); - late final _sel_isExecutableFileAtPath_1 = - _registerName1("isExecutableFileAtPath:"); - late final _sel_isDeletableFileAtPath_1 = - _registerName1("isDeletableFileAtPath:"); - late final _sel_contentsEqualAtPath_andPath_1 = - _registerName1("contentsEqualAtPath:andPath:"); - late final _sel_displayNameAtPath_1 = _registerName1("displayNameAtPath:"); - late final _sel_componentsToDisplayForPath_1 = - _registerName1("componentsToDisplayForPath:"); - late final _sel_enumeratorAtPath_1 = _registerName1("enumeratorAtPath:"); - late final _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_1 = - _registerName1( - "enumeratorAtURL:includingPropertiesForKeys:options:errorHandler:"); - ffi.Pointer _objc_msgSend_456( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer keys, - int mask, - ffi.Pointer<_ObjCBlock> handler, - ) { - return __objc_msgSend_456( - obj, - sel, - url, - keys, - mask, - handler, - ); - } - - late final __objc_msgSend_456Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_456 = __objc_msgSend_456Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_subpathsAtPath_1 = _registerName1("subpathsAtPath:"); - late final _sel_contentsAtPath_1 = _registerName1("contentsAtPath:"); - ffi.Pointer _objc_msgSend_457( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ) { - return __objc_msgSend_457( - obj, - sel, - path, - ); - } - - late final __objc_msgSend_457Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_457 = __objc_msgSend_457Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_createFileAtPath_contents_attributes_1 = - _registerName1("createFileAtPath:contents:attributes:"); - bool _objc_msgSend_458( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer data, - ffi.Pointer attr, - ) { - return __objc_msgSend_458( - obj, - sel, - path, - data, - attr, - ); - } - - late final __objc_msgSend_458Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_458 = __objc_msgSend_458Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_fileSystemRepresentationWithPath_1 = - _registerName1("fileSystemRepresentationWithPath:"); - ffi.Pointer _objc_msgSend_459( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ) { - return __objc_msgSend_459( - obj, - sel, - path, - ); - } - - late final __objc_msgSend_459Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_459 = __objc_msgSend_459Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_stringWithFileSystemRepresentation_length_1 = - _registerName1("stringWithFileSystemRepresentation:length:"); - ffi.Pointer _objc_msgSend_460( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer str, - int len, - ) { - return __objc_msgSend_460( - obj, - sel, - str, - len, - ); - } - - late final __objc_msgSend_460Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_460 = __objc_msgSend_460Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_1 = - _registerName1( - "replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error:"); - bool _objc_msgSend_461( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer originalItemURL, - ffi.Pointer newItemURL, - ffi.Pointer backupItemName, - int options, - ffi.Pointer> resultingURL, - ffi.Pointer> error, - ) { - return __objc_msgSend_461( - obj, - sel, - originalItemURL, - newItemURL, - backupItemName, - options, - resultingURL, - error, - ); - } - - late final __objc_msgSend_461Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_461 = __objc_msgSend_461Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _sel_setUbiquitous_itemAtURL_destinationURL_error_1 = - _registerName1("setUbiquitous:itemAtURL:destinationURL:error:"); - bool _objc_msgSend_462( - ffi.Pointer obj, - ffi.Pointer sel, - bool flag, - ffi.Pointer url, - ffi.Pointer destinationURL, - ffi.Pointer> error, - ) { - return __objc_msgSend_462( - obj, - sel, - flag, - url, - destinationURL, - error, - ); - } - - late final __objc_msgSend_462Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_462 = __objc_msgSend_462Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_isUbiquitousItemAtURL_1 = - _registerName1("isUbiquitousItemAtURL:"); - late final _sel_startDownloadingUbiquitousItemAtURL_error_1 = - _registerName1("startDownloadingUbiquitousItemAtURL:error:"); - late final _sel_evictUbiquitousItemAtURL_error_1 = - _registerName1("evictUbiquitousItemAtURL:error:"); - late final _sel_URLForUbiquityContainerIdentifier_1 = - _registerName1("URLForUbiquityContainerIdentifier:"); - ffi.Pointer _objc_msgSend_463( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer containerIdentifier, - ) { - return __objc_msgSend_463( - obj, - sel, - containerIdentifier, - ); - } - - late final __objc_msgSend_463Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_463 = __objc_msgSend_463Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_1 = - _registerName1( - "URLForPublishingUbiquitousItemAtURL:expirationDate:error:"); - ffi.Pointer _objc_msgSend_464( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> outDate, - ffi.Pointer> error, - ) { - return __objc_msgSend_464( - obj, - sel, - url, - outDate, - error, - ); - } - - late final __objc_msgSend_464Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_464 = __objc_msgSend_464Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _sel_ubiquityIdentityToken1 = - _registerName1("ubiquityIdentityToken"); - late final _sel_getFileProviderServicesForItemAtURL_completionHandler_1 = - _registerName1("getFileProviderServicesForItemAtURL:completionHandler:"); - void _objc_msgSend_465( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_465( - obj, - sel, - url, - completionHandler, - ); - } - - late final __objc_msgSend_465Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_465 = __objc_msgSend_465Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_containerURLForSecurityApplicationGroupIdentifier_1 = - _registerName1("containerURLForSecurityApplicationGroupIdentifier:"); - late final _sel_homeDirectoryForCurrentUser1 = - _registerName1("homeDirectoryForCurrentUser"); - ffi.Pointer _objc_msgSend_466( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_466( - obj, - sel, - ); - } - - late final __objc_msgSend_466Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_466 = __objc_msgSend_466Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_temporaryDirectory1 = _registerName1("temporaryDirectory"); - late final _sel_homeDirectoryForUser_1 = - _registerName1("homeDirectoryForUser:"); - late final _sel_fileManager_shouldProceedAfterError_1 = - _registerName1("fileManager:shouldProceedAfterError:"); - bool _objc_msgSend_467( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer fm, - ffi.Pointer errorInfo, - ) { - return __objc_msgSend_467( - obj, - sel, - fm, - errorInfo, - ); - } - - late final __objc_msgSend_467Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_467 = __objc_msgSend_467Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_fileManager_willProcessPath_1 = - _registerName1("fileManager:willProcessPath:"); - void _objc_msgSend_468( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer fm, - ffi.Pointer path, - ) { - return __objc_msgSend_468( - obj, - sel, - fm, - path, - ); - } - - late final __objc_msgSend_468Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_468 = __objc_msgSend_468Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_validateValue_forKey_error_1 = - _registerName1("validateValue:forKey:error:"); - 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_469( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - int index, - ) { - return __objc_msgSend_469( - obj, - sel, - anObject, - index, - ); - } - - late final __objc_msgSend_469Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_469 = __objc_msgSend_469Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_removeLastObject1 = _registerName1("removeLastObject"); - late final _sel_removeObjectAtIndex_1 = - _registerName1("removeObjectAtIndex:"); - void _objc_msgSend_470( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ) { - return __objc_msgSend_470( - obj, - sel, - index, - ); - } - - late final __objc_msgSend_470Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_470 = __objc_msgSend_470Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_replaceObjectAtIndex_withObject_1 = - _registerName1("replaceObjectAtIndex:withObject:"); - void _objc_msgSend_471( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ffi.Pointer anObject, - ) { - return __objc_msgSend_471( - obj, - sel, - index, - anObject, - ); - } - - late final __objc_msgSend_471Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_471 = __objc_msgSend_471Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _sel_initWithCapacity_1 = _registerName1("initWithCapacity:"); - late final _sel_addObjectsFromArray_1 = - _registerName1("addObjectsFromArray:"); - void _objc_msgSend_472( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherArray, - ) { - return __objc_msgSend_472( - obj, - sel, - otherArray, - ); - } - - late final __objc_msgSend_472Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_472 = __objc_msgSend_472Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_exchangeObjectAtIndex_withObjectAtIndex_1 = - _registerName1("exchangeObjectAtIndex:withObjectAtIndex:"); - void _objc_msgSend_473( - ffi.Pointer obj, - ffi.Pointer sel, - int idx1, - int idx2, - ) { - return __objc_msgSend_473( - obj, - sel, - idx1, - idx2, - ); - } - - late final __objc_msgSend_473Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_473 = __objc_msgSend_473Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, int)>(); - - late final _sel_removeAllObjects1 = _registerName1("removeAllObjects"); - late final _sel_removeObject_inRange_1 = - _registerName1("removeObject:inRange:"); - void _objc_msgSend_474( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - _NSRange range, - ) { - return __objc_msgSend_474( - obj, - sel, - anObject, - range, - ); - } - - late final __objc_msgSend_474Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_474 = __objc_msgSend_474Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>(); - - late final _sel_removeObject_1 = _registerName1("removeObject:"); - late final _sel_removeObjectIdenticalTo_inRange_1 = - _registerName1("removeObjectIdenticalTo:inRange:"); - late final _sel_removeObjectIdenticalTo_1 = - _registerName1("removeObjectIdenticalTo:"); - late final _sel_removeObjectsFromIndices_numIndices_1 = - _registerName1("removeObjectsFromIndices:numIndices:"); - void _objc_msgSend_475( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indices, - int cnt, - ) { - return __objc_msgSend_475( - obj, - sel, - indices, - cnt, - ); - } - - late final __objc_msgSend_475Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_475 = __objc_msgSend_475Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_removeObjectsInArray_1 = - _registerName1("removeObjectsInArray:"); - late final _sel_removeObjectsInRange_1 = - _registerName1("removeObjectsInRange:"); - void _objc_msgSend_476( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_476( - obj, - sel, - range, - ); - } - - late final __objc_msgSend_476Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_476 = __objc_msgSend_476Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _sel_replaceObjectsInRange_withObjectsFromArray_range_1 = - _registerName1("replaceObjectsInRange:withObjectsFromArray:range:"); - void _objc_msgSend_477( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer otherArray, - _NSRange otherRange, - ) { - return __objc_msgSend_477( - obj, - sel, - range, - otherArray, - otherRange, - ); - } - - late final __objc_msgSend_477Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_477 = __objc_msgSend_477Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - ffi.Pointer, _NSRange)>(); - - late final _sel_replaceObjectsInRange_withObjectsFromArray_1 = - _registerName1("replaceObjectsInRange:withObjectsFromArray:"); - void _objc_msgSend_478( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer otherArray, - ) { - return __objc_msgSend_478( - obj, - sel, - range, - otherArray, - ); - } - - late final __objc_msgSend_478Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_478 = __objc_msgSend_478Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - ffi.Pointer)>(); - - late final _sel_setArray_1 = _registerName1("setArray:"); - late final _sel_sortUsingFunction_context_1 = - _registerName1("sortUsingFunction:context:"); - void _objc_msgSend_479( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - compare, - ffi.Pointer context, - ) { - return __objc_msgSend_479( - obj, - sel, - compare, - context, - ); - } - - late final __objc_msgSend_479Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_479 = __objc_msgSend_479Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>(); - - late final _sel_sortUsingSelector_1 = _registerName1("sortUsingSelector:"); - late final _sel_insertObjects_atIndexes_1 = - _registerName1("insertObjects:atIndexes:"); - void _objc_msgSend_480( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer objects, - ffi.Pointer indexes, - ) { - return __objc_msgSend_480( - obj, - sel, - objects, - indexes, - ); - } - - late final __objc_msgSend_480Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_480 = __objc_msgSend_480Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_removeObjectsAtIndexes_1 = - _registerName1("removeObjectsAtIndexes:"); - void _objc_msgSend_481( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexes, - ) { - return __objc_msgSend_481( - obj, - sel, - indexes, - ); - } - - late final __objc_msgSend_481Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_481 = __objc_msgSend_481Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_replaceObjectsAtIndexes_withObjects_1 = - _registerName1("replaceObjectsAtIndexes:withObjects:"); - void _objc_msgSend_482( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexes, - ffi.Pointer objects, - ) { - return __objc_msgSend_482( - obj, - sel, - indexes, - objects, - ); - } - - late final __objc_msgSend_482Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_482 = __objc_msgSend_482Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setObject_atIndexedSubscript_1 = - _registerName1("setObject:atIndexedSubscript:"); - late final _sel_sortUsingComparator_1 = - _registerName1("sortUsingComparator:"); - void _objc_msgSend_483( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> cmptr, - ) { - return __objc_msgSend_483( - obj, - sel, - cmptr, - ); - } - - late final __objc_msgSend_483Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_483 = __objc_msgSend_483Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_sortWithOptions_usingComparator_1 = - _registerName1("sortWithOptions:usingComparator:"); - void _objc_msgSend_484( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> cmptr, - ) { - return __objc_msgSend_484( - obj, - sel, - opts, - cmptr, - ); - } - - late final __objc_msgSend_484Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_484 = __objc_msgSend_484Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_arrayWithCapacity_1 = _registerName1("arrayWithCapacity:"); - ffi.Pointer _objc_msgSend_485( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ) { - return __objc_msgSend_485( - obj, - sel, - path, - ); - } - - late final __objc_msgSend_485Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_485 = __objc_msgSend_485Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - ffi.Pointer _objc_msgSend_486( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ) { - return __objc_msgSend_486( - obj, - sel, - url, - ); - } - - late final __objc_msgSend_486Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_486 = __objc_msgSend_486Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_applyDifference_1 = _registerName1("applyDifference:"); - late final _sel_sortUsingDescriptors_1 = - _registerName1("sortUsingDescriptors:"); - late final _sel_filterUsingPredicate_1 = - _registerName1("filterUsingPredicate:"); - void _objc_msgSend_487( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer predicate, - ) { - return __objc_msgSend_487( - obj, - sel, - predicate, - ); - } - - late final __objc_msgSend_487Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_487 = __objc_msgSend_487Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_mutableArrayValueForKey_1 = - _registerName1("mutableArrayValueForKey:"); - ffi.Pointer _objc_msgSend_488( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_488( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_488Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_488 = __objc_msgSend_488Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSMutableOrderedSet1 = _getClass1("NSMutableOrderedSet"); - late final _class_NSOrderedSet1 = _getClass1("NSOrderedSet"); - late final _sel_isEqualToOrderedSet_1 = - _registerName1("isEqualToOrderedSet:"); - bool _objc_msgSend_489( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - ) { - return __objc_msgSend_489( - obj, - sel, - other, - ); - } - - late final __objc_msgSend_489Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_489 = __objc_msgSend_489Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_intersectsOrderedSet_1 = - _registerName1("intersectsOrderedSet:"); - late final _sel_isSubsetOfOrderedSet_1 = - _registerName1("isSubsetOfOrderedSet:"); - late final _sel_reversedOrderedSet1 = _registerName1("reversedOrderedSet"); - ffi.Pointer _objc_msgSend_490( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_490( - obj, - sel, - ); - } - - late final __objc_msgSend_490Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_490 = __objc_msgSend_490Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - ffi.Pointer _objc_msgSend_491( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_491( - obj, - sel, - ); - } - - late final __objc_msgSend_491Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_491 = __objc_msgSend_491Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_orderedSet1 = _registerName1("orderedSet"); - late final _sel_orderedSetWithObject_1 = - _registerName1("orderedSetWithObject:"); - late final _sel_orderedSetWithObjects_count_1 = - _registerName1("orderedSetWithObjects:count:"); - late final _sel_orderedSetWithObjects_1 = - _registerName1("orderedSetWithObjects:"); - late final _sel_orderedSetWithOrderedSet_1 = - _registerName1("orderedSetWithOrderedSet:"); - instancetype _objc_msgSend_492( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer set1, - ) { - return __objc_msgSend_492( - obj, - sel, - set1, - ); - } - - late final __objc_msgSend_492Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_492 = __objc_msgSend_492Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_orderedSetWithOrderedSet_range_copyItems_1 = - _registerName1("orderedSetWithOrderedSet:range:copyItems:"); - instancetype _objc_msgSend_493( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer set1, - _NSRange range, - bool flag, - ) { - return __objc_msgSend_493( - obj, - sel, - set1, - range, - flag, - ); - } - - late final __objc_msgSend_493Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_493 = __objc_msgSend_493Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange, bool)>(); - - late final _sel_orderedSetWithArray_1 = - _registerName1("orderedSetWithArray:"); - late final _sel_orderedSetWithArray_range_copyItems_1 = - _registerName1("orderedSetWithArray:range:copyItems:"); - instancetype _objc_msgSend_494( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer array, - _NSRange range, - bool flag, - ) { - return __objc_msgSend_494( - obj, - sel, - array, - range, - flag, - ); - } - - late final __objc_msgSend_494Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_494 = __objc_msgSend_494Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange, bool)>(); - - late final _sel_orderedSetWithSet_1 = _registerName1("orderedSetWithSet:"); - late final _sel_orderedSetWithSet_copyItems_1 = - _registerName1("orderedSetWithSet:copyItems:"); - late final _sel_initWithObject_1 = _registerName1("initWithObject:"); - late final _sel_initWithOrderedSet_1 = _registerName1("initWithOrderedSet:"); - late final _sel_initWithOrderedSet_copyItems_1 = - _registerName1("initWithOrderedSet:copyItems:"); - instancetype _objc_msgSend_495( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer set1, - bool flag, - ) { - return __objc_msgSend_495( - obj, - sel, - set1, - flag, - ); - } - - late final __objc_msgSend_495Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_495 = __objc_msgSend_495Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_initWithOrderedSet_range_copyItems_1 = - _registerName1("initWithOrderedSet:range:copyItems:"); - late final _sel_initWithArray_range_copyItems_1 = - _registerName1("initWithArray:range:copyItems:"); - late final _sel_differenceFromOrderedSet_withOptions_usingEquivalenceTest_1 = - _registerName1( - "differenceFromOrderedSet:withOptions:usingEquivalenceTest:"); - ffi.Pointer _objc_msgSend_496( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - int options, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_496( - obj, - sel, - other, - options, - block, - ); - } - - late final __objc_msgSend_496Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_496 = __objc_msgSend_496Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_differenceFromOrderedSet_withOptions_1 = - _registerName1("differenceFromOrderedSet:withOptions:"); - ffi.Pointer _objc_msgSend_497( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - int options, - ) { - return __objc_msgSend_497( - obj, - sel, - other, - options, - ); - } - - late final __objc_msgSend_497Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_497 = __objc_msgSend_497Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_differenceFromOrderedSet_1 = - _registerName1("differenceFromOrderedSet:"); - late final _sel_orderedSetByApplyingDifference_1 = - _registerName1("orderedSetByApplyingDifference:"); - ffi.Pointer _objc_msgSend_498( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer difference, - ) { - return __objc_msgSend_498( - obj, - sel, - difference, - ); - } - - late final __objc_msgSend_498Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(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)>(); - - late final _sel_filteredOrderedSetUsingPredicate_1 = - _registerName1("filteredOrderedSetUsingPredicate:"); - ffi.Pointer _objc_msgSend_499( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer p, - ) { - return __objc_msgSend_499( - obj, - sel, - p, - ); - } - - late final __objc_msgSend_499Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_499 = __objc_msgSend_499Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_addObjects_count_1 = _registerName1("addObjects:count:"); - void _objc_msgSend_500( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - int count, - ) { - return __objc_msgSend_500( - obj, - sel, - objects, - count, - ); - } - - late final __objc_msgSend_500Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_500 = __objc_msgSend_500Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, int)>(); - - late final _sel_moveObjectsAtIndexes_toIndex_1 = - _registerName1("moveObjectsAtIndexes:toIndex:"); - void _objc_msgSend_501( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexes, - int idx, - ) { - return __objc_msgSend_501( - obj, - sel, - indexes, - idx, - ); - } - - late final __objc_msgSend_501Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_501 = __objc_msgSend_501Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_setObject_atIndex_1 = _registerName1("setObject:atIndex:"); - late final _sel_replaceObjectsInRange_withObjects_count_1 = - _registerName1("replaceObjectsInRange:withObjects:count:"); - void _objc_msgSend_502( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer> objects, - int count, - ) { - return __objc_msgSend_502( - obj, - sel, - range, - objects, - count, - ); - } - - late final __objc_msgSend_502Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer>, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_502 = __objc_msgSend_502Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - ffi.Pointer>, int)>(); - - late final _sel_intersectOrderedSet_1 = - _registerName1("intersectOrderedSet:"); - void _objc_msgSend_503( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - ) { - return __objc_msgSend_503( - obj, - sel, - other, - ); - } - - late final __objc_msgSend_503Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_503 = __objc_msgSend_503Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_minusOrderedSet_1 = _registerName1("minusOrderedSet:"); - late final _sel_unionOrderedSet_1 = _registerName1("unionOrderedSet:"); - late final _sel_intersectSet_1 = _registerName1("intersectSet:"); - void _objc_msgSend_504( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - ) { - return __objc_msgSend_504( - obj, - sel, - other, - ); - } - - late final __objc_msgSend_504Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_504 = __objc_msgSend_504Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_minusSet_1 = _registerName1("minusSet:"); - late final _sel_unionSet_1 = _registerName1("unionSet:"); - late final _sel_sortRange_options_usingComparator_1 = - _registerName1("sortRange:options:usingComparator:"); - void _objc_msgSend_505( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> cmptr, - ) { - return __objc_msgSend_505( - obj, - sel, - range, - opts, - cmptr, - ); - } - - late final __objc_msgSend_505Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_505 = __objc_msgSend_505Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_orderedSetWithCapacity_1 = - _registerName1("orderedSetWithCapacity:"); - late final _sel_mutableOrderedSetValueForKey_1 = - _registerName1("mutableOrderedSetValueForKey:"); - ffi.Pointer _objc_msgSend_506( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_506( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_506Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(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)>(); - - late final _class_NSMutableSet1 = _getClass1("NSMutableSet"); - late final _sel_setSet_1 = _registerName1("setSet:"); - late final _sel_setWithCapacity_1 = _registerName1("setWithCapacity:"); - late final _sel_mutableSetValueForKey_1 = - _registerName1("mutableSetValueForKey:"); - ffi.Pointer _objc_msgSend_507( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_507( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_507Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(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)>(); - - late final _sel_valueForKeyPath_1 = _registerName1("valueForKeyPath:"); - late final _sel_setValue_forKeyPath_1 = - _registerName1("setValue:forKeyPath:"); - late final _sel_validateValue_forKeyPath_error_1 = - _registerName1("validateValue:forKeyPath:error:"); - late final _sel_mutableArrayValueForKeyPath_1 = - _registerName1("mutableArrayValueForKeyPath:"); - late final _sel_mutableOrderedSetValueForKeyPath_1 = - _registerName1("mutableOrderedSetValueForKeyPath:"); - late final _sel_mutableSetValueForKeyPath_1 = - _registerName1("mutableSetValueForKeyPath:"); - late final _sel_valueForUndefinedKey_1 = - _registerName1("valueForUndefinedKey:"); - late final _sel_setValue_forUndefinedKey_1 = - _registerName1("setValue:forUndefinedKey:"); - late final _sel_setNilValueForKey_1 = _registerName1("setNilValueForKey:"); - late final _sel_dictionaryWithValuesForKeys_1 = - _registerName1("dictionaryWithValuesForKeys:"); - ffi.Pointer _objc_msgSend_508( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keys, - ) { - return __objc_msgSend_508( - obj, - sel, - keys, - ); - } - - late final __objc_msgSend_508Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(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)>(); - - late final _sel_setValuesForKeysWithDictionary_1 = - _registerName1("setValuesForKeysWithDictionary:"); - void _objc_msgSend_509( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keyedValues, - ) { - return __objc_msgSend_509( - obj, - sel, - keyedValues, - ); - } - - late final __objc_msgSend_509Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_509 = __objc_msgSend_509Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_storedValueForKey_1 = _registerName1("storedValueForKey:"); - late final _sel_takeStoredValue_forKey_1 = - _registerName1("takeStoredValue:forKey:"); - late final _sel_takeValue_forKey_1 = _registerName1("takeValue:forKey:"); - late final _sel_takeValue_forKeyPath_1 = - _registerName1("takeValue:forKeyPath:"); - late final _sel_handleQueryWithUnboundKey_1 = - _registerName1("handleQueryWithUnboundKey:"); - late final _sel_handleTakeValue_forUnboundKey_1 = - _registerName1("handleTakeValue:forUnboundKey:"); - late final _sel_unableToSetNilForKey_1 = - _registerName1("unableToSetNilForKey:"); - late final _sel_valuesForKeys_1 = _registerName1("valuesForKeys:"); - late final _sel_takeValuesFromDictionary_1 = - _registerName1("takeValuesFromDictionary:"); - late final _sel_observeValueForKeyPath_ofObject_change_context_1 = - _registerName1("observeValueForKeyPath:ofObject:change:context:"); - void _objc_msgSend_510( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keyPath, - ffi.Pointer object, - ffi.Pointer change, - ffi.Pointer context, - ) { - return __objc_msgSend_510( - obj, - sel, - keyPath, - object, - change, - context, - ); - } - - late final __objc_msgSend_510Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_510 = __objc_msgSend_510Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_willChangeValueForKey_1 = - _registerName1("willChangeValueForKey:"); - late final _sel_didChangeValueForKey_1 = - _registerName1("didChangeValueForKey:"); - late final _sel_willChange_valuesAtIndexes_forKey_1 = - _registerName1("willChange:valuesAtIndexes:forKey:"); - void _objc_msgSend_511( - ffi.Pointer obj, - ffi.Pointer sel, - int changeKind, - ffi.Pointer indexes, - ffi.Pointer key, - ) { - return __objc_msgSend_511( - obj, - sel, - changeKind, - indexes, - key, - ); - } - - late final __objc_msgSend_511Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_511 = __objc_msgSend_511Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_didChange_valuesAtIndexes_forKey_1 = - _registerName1("didChange:valuesAtIndexes:forKey:"); - late final _sel_willChangeValueForKey_withSetMutation_usingObjects_1 = - _registerName1("willChangeValueForKey:withSetMutation:usingObjects:"); - void _objc_msgSend_512( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - int mutationKind, - ffi.Pointer objects, - ) { - return __objc_msgSend_512( - obj, - sel, - key, - mutationKind, - objects, - ); - } - - late final __objc_msgSend_512Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_512 = __objc_msgSend_512Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_didChangeValueForKey_withSetMutation_usingObjects_1 = - _registerName1("didChangeValueForKey:withSetMutation:usingObjects:"); - late final _sel_observationInfo1 = _registerName1("observationInfo"); - late final _sel_setObservationInfo_1 = _registerName1("setObservationInfo:"); - void _objc_msgSend_513( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_513( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_513Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_513 = __objc_msgSend_513Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_classForKeyedArchiver1 = - _registerName1("classForKeyedArchiver"); - late final _class_NSKeyedArchiver1 = _getClass1("NSKeyedArchiver"); - late final _sel_initRequiringSecureCoding_1 = - _registerName1("initRequiringSecureCoding:"); - instancetype _objc_msgSend_514( - ffi.Pointer obj, - ffi.Pointer sel, - bool requiresSecureCoding, - ) { - return __objc_msgSend_514( - obj, - sel, - requiresSecureCoding, - ); - } - - late final __objc_msgSend_514Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_514 = __objc_msgSend_514Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_archivedDataWithRootObject_requiringSecureCoding_error_1 = - _registerName1("archivedDataWithRootObject:requiringSecureCoding:error:"); - ffi.Pointer _objc_msgSend_515( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer object, - bool requiresSecureCoding, - ffi.Pointer> error, - ) { - return __objc_msgSend_515( - obj, - sel, - object, - requiresSecureCoding, - error, - ); - } - - late final __objc_msgSend_515Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_515 = __objc_msgSend_515Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer>)>(); - - late final _class_NSMutableData1 = _getClass1("NSMutableData"); - late final _sel_mutableBytes1 = _registerName1("mutableBytes"); - late final _sel_setLength_1 = _registerName1("setLength:"); - void _objc_msgSend_516( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_516( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_516Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_516 = __objc_msgSend_516Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_appendBytes_length_1 = _registerName1("appendBytes:length:"); - late final _sel_appendData_1 = _registerName1("appendData:"); - late final _sel_increaseLengthBy_1 = _registerName1("increaseLengthBy:"); - late final _sel_replaceBytesInRange_withBytes_1 = - _registerName1("replaceBytesInRange:withBytes:"); - void _objc_msgSend_517( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer bytes, - ) { - return __objc_msgSend_517( - obj, - sel, - range, - bytes, - ); - } - - late final __objc_msgSend_517Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_517 = __objc_msgSend_517Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - ffi.Pointer)>(); - - late final _sel_resetBytesInRange_1 = _registerName1("resetBytesInRange:"); - late final _sel_setData_1 = _registerName1("setData:"); - late final _sel_replaceBytesInRange_withBytes_length_1 = - _registerName1("replaceBytesInRange:withBytes:length:"); - void _objc_msgSend_518( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer replacementBytes, - int replacementLength, - ) { - return __objc_msgSend_518( - obj, - sel, - range, - replacementBytes, - replacementLength, - ); - } - - late final __objc_msgSend_518Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_518 = __objc_msgSend_518Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - ffi.Pointer, int)>(); - - late final _sel_dataWithCapacity_1 = _registerName1("dataWithCapacity:"); - instancetype _objc_msgSend_519( - ffi.Pointer obj, - ffi.Pointer sel, - int aNumItems, - ) { - return __objc_msgSend_519( - obj, - sel, - aNumItems, - ); - } - - late final __objc_msgSend_519Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_519 = __objc_msgSend_519Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_dataWithLength_1 = _registerName1("dataWithLength:"); - late final _sel_initWithLength_1 = _registerName1("initWithLength:"); - late final _sel_decompressUsingAlgorithm_error_1 = - _registerName1("decompressUsingAlgorithm:error:"); - bool _objc_msgSend_520( - ffi.Pointer obj, - ffi.Pointer sel, - int algorithm, - ffi.Pointer> error, - ) { - return __objc_msgSend_520( - obj, - sel, - algorithm, - error, - ); - } - - late final __objc_msgSend_520Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_520 = __objc_msgSend_520Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer>)>(); - - late final _sel_compressUsingAlgorithm_error_1 = - _registerName1("compressUsingAlgorithm:error:"); - late final _sel_initForWritingWithMutableData_1 = - _registerName1("initForWritingWithMutableData:"); - instancetype _objc_msgSend_521( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ) { - return __objc_msgSend_521( - obj, - sel, - data, - ); - } - - late final __objc_msgSend_521Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_521 = __objc_msgSend_521Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_archivedDataWithRootObject_1 = - _registerName1("archivedDataWithRootObject:"); - ffi.Pointer _objc_msgSend_522( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer rootObject, - ) { - return __objc_msgSend_522( - obj, - sel, - rootObject, - ); - } - - late final __objc_msgSend_522Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_522 = __objc_msgSend_522Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_archiveRootObject_toFile_1 = - _registerName1("archiveRootObject:toFile:"); - late final _sel_outputFormat1 = _registerName1("outputFormat"); - int _objc_msgSend_523( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_523( - obj, - sel, - ); - } - - late final __objc_msgSend_523Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_523 = __objc_msgSend_523Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setOutputFormat_1 = _registerName1("setOutputFormat:"); - void _objc_msgSend_524( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_524( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_524Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_524 = __objc_msgSend_524Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_encodedData1 = _registerName1("encodedData"); - late final _sel_finishEncoding1 = _registerName1("finishEncoding"); - late final _sel_setClassName_forClass_1 = - _registerName1("setClassName:forClass:"); - void _objc_msgSend_525( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer codedName, - ffi.Pointer cls, - ) { - return __objc_msgSend_525( - obj, - sel, - codedName, - cls, - ); - } - - late final __objc_msgSend_525Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_525 = __objc_msgSend_525Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_classNameForClass_1 = _registerName1("classNameForClass:"); - ffi.Pointer _objc_msgSend_526( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cls, - ) { - return __objc_msgSend_526( - obj, - sel, - cls, - ); - } - - late final __objc_msgSend_526Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_526 = __objc_msgSend_526Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setRequiresSecureCoding_1 = - _registerName1("setRequiresSecureCoding:"); - void _objc_msgSend_527( - ffi.Pointer obj, - ffi.Pointer sel, - bool value, - ) { - return __objc_msgSend_527( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_527Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_527 = __objc_msgSend_527Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_replacementObjectForKeyedArchiver_1 = - _registerName1("replacementObjectForKeyedArchiver:"); - ffi.Pointer _objc_msgSend_528( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer archiver, - ) { - return __objc_msgSend_528( - obj, - sel, - archiver, - ); - } - - late final __objc_msgSend_528Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_528 = __objc_msgSend_528Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_performSelectorOnMainThread_withObject_waitUntilDone_modes_1 = - _registerName1( - "performSelectorOnMainThread:withObject:waitUntilDone:modes:"); - void _objc_msgSend_529( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ffi.Pointer arg, - bool wait, - ffi.Pointer array, - ) { - return __objc_msgSend_529( - obj, - sel, - aSelector, - arg, - wait, - array, - ); - } - - late final __objc_msgSend_529Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_529 = __objc_msgSend_529Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); - - late final _sel_performSelectorOnMainThread_withObject_waitUntilDone_1 = - _registerName1("performSelectorOnMainThread:withObject:waitUntilDone:"); - void _objc_msgSend_530( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ffi.Pointer arg, - bool wait, - ) { - return __objc_msgSend_530( - obj, - sel, - aSelector, - arg, - wait, - ); - } - - late final __objc_msgSend_530Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_530 = __objc_msgSend_530Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _class_NSThread1 = _getClass1("NSThread"); - late final _sel_currentThread1 = _registerName1("currentThread"); - ffi.Pointer _objc_msgSend_531( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_531( - obj, - sel, - ); - } - - late final __objc_msgSend_531Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_531 = __objc_msgSend_531Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_detachNewThreadWithBlock_1 = - _registerName1("detachNewThreadWithBlock:"); - void _objc_msgSend_532( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_532( - obj, - sel, - block, - ); - } - - late final __objc_msgSend_532Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_532 = __objc_msgSend_532Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_detachNewThreadSelector_toTarget_withObject_1 = - _registerName1("detachNewThreadSelector:toTarget:withObject:"); - void _objc_msgSend_533( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer selector, - ffi.Pointer target, - ffi.Pointer argument, - ) { - return __objc_msgSend_533( - obj, - sel, - selector, - target, - argument, - ); - } - - late final __objc_msgSend_533Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_533 = __objc_msgSend_533Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_isMultiThreaded1 = _registerName1("isMultiThreaded"); - 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_534( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - ffi.Pointer aKey, - ) { - return __objc_msgSend_534( - obj, - sel, - anObject, - aKey, - ); - } - - late final __objc_msgSend_534Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_534 = __objc_msgSend_534Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_addEntriesFromDictionary_1 = - _registerName1("addEntriesFromDictionary:"); - late final _sel_removeObjectsForKeys_1 = - _registerName1("removeObjectsForKeys:"); - late final _sel_setDictionary_1 = _registerName1("setDictionary:"); - late final _sel_setObject_forKeyedSubscript_1 = - _registerName1("setObject:forKeyedSubscript:"); - void _objc_msgSend_535( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer obj1, - ffi.Pointer key, - ) { - return __objc_msgSend_535( - obj, - sel, - obj1, - key, - ); - } - - late final __objc_msgSend_535Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_535 = __objc_msgSend_535Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_dictionaryWithCapacity_1 = - _registerName1("dictionaryWithCapacity:"); - ffi.Pointer _objc_msgSend_536( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ) { - return __objc_msgSend_536( - obj, - sel, - path, - ); - } - - late final __objc_msgSend_536Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_536 = __objc_msgSend_536Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - ffi.Pointer _objc_msgSend_537( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ) { - return __objc_msgSend_537( - obj, - sel, - url, - ); - } - - late final __objc_msgSend_537Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_537 = __objc_msgSend_537Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_dictionaryWithSharedKeySet_1 = - _registerName1("dictionaryWithSharedKeySet:"); - ffi.Pointer _objc_msgSend_538( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keyset, - ) { - return __objc_msgSend_538( - obj, - sel, - keyset, - ); - } - - late final __objc_msgSend_538Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_538 = __objc_msgSend_538Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_threadDictionary1 = _registerName1("threadDictionary"); - ffi.Pointer _objc_msgSend_539( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_539( - obj, - sel, - ); - } - - late final __objc_msgSend_539Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_539 = __objc_msgSend_539Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_sleepUntilDate_1 = _registerName1("sleepUntilDate:"); - void _objc_msgSend_540( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, - ) { - return __objc_msgSend_540( - obj, - sel, - date, - ); - } - - late final __objc_msgSend_540Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_540 = __objc_msgSend_540Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_sleepForTimeInterval_1 = - _registerName1("sleepForTimeInterval:"); - void _objc_msgSend_541( - ffi.Pointer obj, - ffi.Pointer sel, - double ti, - ) { - return __objc_msgSend_541( - obj, - sel, - ti, - ); - } - - late final __objc_msgSend_541Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_541 = __objc_msgSend_541Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double)>(); - - late final _sel_exit1 = _registerName1("exit"); - late final _sel_threadPriority1 = _registerName1("threadPriority"); - late final _sel_setThreadPriority_1 = _registerName1("setThreadPriority:"); - void _objc_msgSend_542( - ffi.Pointer obj, - ffi.Pointer sel, - double value, - ) { - return __objc_msgSend_542( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_542Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_542 = __objc_msgSend_542Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double)>(); - - late final _sel_qualityOfService1 = _registerName1("qualityOfService"); - int _objc_msgSend_543( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_543( - obj, - sel, - ); - } - - late final __objc_msgSend_543Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_543 = __objc_msgSend_543Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setQualityOfService_1 = - _registerName1("setQualityOfService:"); - void _objc_msgSend_544( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_544( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_544Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_544 = __objc_msgSend_544Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_callStackReturnAddresses1 = - _registerName1("callStackReturnAddresses"); - late final _sel_callStackSymbols1 = _registerName1("callStackSymbols"); - late final _sel_setName_1 = _registerName1("setName:"); - void _objc_msgSend_545( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_545( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_545Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_545 = __objc_msgSend_545Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_stackSize1 = _registerName1("stackSize"); - late final _sel_setStackSize_1 = _registerName1("setStackSize:"); - late final _sel_isMainThread1 = _registerName1("isMainThread"); - late final _sel_mainThread1 = _registerName1("mainThread"); - late final _sel_initWithTarget_selector_object_1 = - _registerName1("initWithTarget:selector:object:"); - instancetype _objc_msgSend_546( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer selector, - ffi.Pointer argument, - ) { - return __objc_msgSend_546( - obj, - sel, - target, - selector, - argument, - ); - } - - late final __objc_msgSend_546Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_546 = __objc_msgSend_546Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithBlock_1 = _registerName1("initWithBlock:"); - instancetype _objc_msgSend_547( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_547( - obj, - sel, - block, - ); - } - - late final __objc_msgSend_547Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_547 = __objc_msgSend_547Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_isExecuting1 = _registerName1("isExecuting"); - late final _sel_isFinished1 = _registerName1("isFinished"); - late final _sel_isCancelled1 = _registerName1("isCancelled"); - late final _sel_cancel1 = _registerName1("cancel"); - late final _sel_start1 = _registerName1("start"); - late final _sel_main1 = _registerName1("main"); - late final _sel_performSelector_onThread_withObject_waitUntilDone_modes_1 = - _registerName1( - "performSelector:onThread:withObject:waitUntilDone:modes:"); - void _objc_msgSend_548( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ffi.Pointer thr, - ffi.Pointer arg, - bool wait, - ffi.Pointer array, - ) { - return __objc_msgSend_548( - obj, - sel, - aSelector, - thr, - arg, - wait, - array, - ); - } - - late final __objc_msgSend_548Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_548 = __objc_msgSend_548Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); - - late final _sel_performSelector_onThread_withObject_waitUntilDone_1 = - _registerName1("performSelector:onThread:withObject:waitUntilDone:"); - void _objc_msgSend_549( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ffi.Pointer thr, - ffi.Pointer arg, - bool wait, - ) { - return __objc_msgSend_549( - obj, - sel, - aSelector, - thr, - arg, - wait, - ); - } - - late final __objc_msgSend_549Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_549 = __objc_msgSend_549Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); - - late final _sel_performSelectorInBackground_withObject_1 = - _registerName1("performSelectorInBackground:withObject:"); - late final _sel_classForArchiver1 = _registerName1("classForArchiver"); - late final _class_NSArchiver1 = _getClass1("NSArchiver"); - late final _sel_archiverData1 = _registerName1("archiverData"); - ffi.Pointer _objc_msgSend_550( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_550( - obj, - sel, - ); - } - - late final __objc_msgSend_550Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_550 = __objc_msgSend_550Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_encodeClassName_intoClassName_1 = - _registerName1("encodeClassName:intoClassName:"); - void _objc_msgSend_551( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer trueName, - ffi.Pointer inArchiveName, - ) { - return __objc_msgSend_551( - obj, - sel, - trueName, - inArchiveName, - ); - } - - late final __objc_msgSend_551Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_551 = __objc_msgSend_551Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_classNameEncodedForTrueClassName_1 = - _registerName1("classNameEncodedForTrueClassName:"); - late final _sel_replaceObject_withObject_1 = - _registerName1("replaceObject:withObject:"); - late final _sel_replacementObjectForArchiver_1 = - _registerName1("replacementObjectForArchiver:"); - ffi.Pointer _objc_msgSend_552( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer archiver, - ) { - return __objc_msgSend_552( - obj, - sel, - archiver, - ); - } - - late final __objc_msgSend_552Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_552 = __objc_msgSend_552Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_classForPortCoder1 = _registerName1("classForPortCoder"); - late final _class_NSPortCoder1 = _getClass1("NSPortCoder"); - late final _sel_isBycopy1 = _registerName1("isBycopy"); - late final _sel_isByref1 = _registerName1("isByref"); - late final _class_NSPort1 = _getClass1("NSPort"); - ffi.Pointer _objc_msgSend_553( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_553( - obj, - sel, - ); - } - - late final __objc_msgSend_553Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_553 = __objc_msgSend_553Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_invalidate1 = _registerName1("invalidate"); - late final _sel_isValid1 = _registerName1("isValid"); - late final _class_NSRunLoop1 = _getClass1("NSRunLoop"); - late final _sel_currentRunLoop1 = _registerName1("currentRunLoop"); - ffi.Pointer _objc_msgSend_554( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_554( - obj, - sel, - ); - } - - late final __objc_msgSend_554Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_554 = __objc_msgSend_554Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_mainRunLoop1 = _registerName1("mainRunLoop"); - late final _sel_currentMode1 = _registerName1("currentMode"); - late final _sel_getCFRunLoop1 = _registerName1("getCFRunLoop"); - ffi.Pointer<__CFRunLoop> _objc_msgSend_555( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_555( - obj, - sel, - ); - } - - late final __objc_msgSend_555Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer<__CFRunLoop> Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_555 = __objc_msgSend_555Ptr.asFunction< - ffi.Pointer<__CFRunLoop> Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSTimer1 = _getClass1("NSTimer"); - late final _sel_timerWithTimeInterval_invocation_repeats_1 = - _registerName1("timerWithTimeInterval:invocation:repeats:"); - ffi.Pointer _objc_msgSend_556( - ffi.Pointer obj, - ffi.Pointer sel, - double ti, - ffi.Pointer invocation, - bool yesOrNo, - ) { - return __objc_msgSend_556( - obj, - sel, - ti, - invocation, - yesOrNo, - ); - } - - late final __objc_msgSend_556Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_556 = __objc_msgSend_556Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, double, ffi.Pointer, bool)>(); - - late final _sel_scheduledTimerWithTimeInterval_invocation_repeats_1 = - _registerName1("scheduledTimerWithTimeInterval:invocation:repeats:"); - late final _sel_timerWithTimeInterval_target_selector_userInfo_repeats_1 = - _registerName1("timerWithTimeInterval:target:selector:userInfo:repeats:"); - ffi.Pointer _objc_msgSend_557( - ffi.Pointer obj, - ffi.Pointer sel, - double ti, - ffi.Pointer aTarget, - ffi.Pointer aSelector, - ffi.Pointer userInfo, - bool yesOrNo, - ) { - return __objc_msgSend_557( - obj, - sel, - ti, - aTarget, - aSelector, - userInfo, - yesOrNo, - ); - } - - late final __objc_msgSend_557Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_557 = __objc_msgSend_557Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - double, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); - - late final _sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_1 = - _registerName1( - "scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:"); - late final _sel_timerWithTimeInterval_repeats_block_1 = - _registerName1("timerWithTimeInterval:repeats:block:"); - ffi.Pointer _objc_msgSend_558( - ffi.Pointer obj, - ffi.Pointer sel, - double interval, - bool repeats, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_558( - obj, - sel, - interval, - repeats, - block, - ); - } - - late final __objc_msgSend_558Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Bool, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_558 = __objc_msgSend_558Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, double, bool, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_scheduledTimerWithTimeInterval_repeats_block_1 = - _registerName1("scheduledTimerWithTimeInterval:repeats:block:"); - late final _sel_initWithFireDate_interval_repeats_block_1 = - _registerName1("initWithFireDate:interval:repeats:block:"); - instancetype _objc_msgSend_559( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, - double interval, - bool repeats, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_559( - obj, - sel, - date, - interval, - repeats, - block, - ); - } - - late final __objc_msgSend_559Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Bool, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_559 = __objc_msgSend_559Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, double, bool, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_initWithFireDate_interval_target_selector_userInfo_repeats_1 = - _registerName1( - "initWithFireDate:interval:target:selector:userInfo:repeats:"); - instancetype _objc_msgSend_560( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, - double ti, - ffi.Pointer t, - ffi.Pointer s, - ffi.Pointer ui, - bool rep, - ) { - return __objc_msgSend_560( - obj, - sel, - date, - ti, - t, - s, - ui, - rep, - ); - } - - late final __objc_msgSend_560Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_560 = __objc_msgSend_560Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - double, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); - - late final _sel_fire1 = _registerName1("fire"); - late final _sel_fireDate1 = _registerName1("fireDate"); - late final _sel_setFireDate_1 = _registerName1("setFireDate:"); - void _objc_msgSend_561( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_561( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_561Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_561 = __objc_msgSend_561Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_timeInterval1 = _registerName1("timeInterval"); - late final _sel_tolerance1 = _registerName1("tolerance"); - late final _sel_setTolerance_1 = _registerName1("setTolerance:"); - late final _sel_addTimer_forMode_1 = _registerName1("addTimer:forMode:"); - void _objc_msgSend_562( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer timer, - ffi.Pointer mode, - ) { - return __objc_msgSend_562( - obj, - sel, - timer, - mode, - ); - } - - late final __objc_msgSend_562Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_562 = __objc_msgSend_562Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_addPort_forMode_1 = _registerName1("addPort:forMode:"); - void _objc_msgSend_563( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aPort, - ffi.Pointer mode, - ) { - return __objc_msgSend_563( - obj, - sel, - aPort, - mode, - ); - } - - late final __objc_msgSend_563Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_563 = __objc_msgSend_563Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_removePort_forMode_1 = _registerName1("removePort:forMode:"); - late final _sel_limitDateForMode_1 = _registerName1("limitDateForMode:"); - ffi.Pointer _objc_msgSend_564( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer mode, - ) { - return __objc_msgSend_564( - obj, - sel, - mode, - ); - } - - late final __objc_msgSend_564Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_564 = __objc_msgSend_564Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_acceptInputForMode_beforeDate_1 = - _registerName1("acceptInputForMode:beforeDate:"); - void _objc_msgSend_565( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer mode, - ffi.Pointer limitDate, - ) { - return __objc_msgSend_565( - obj, - sel, - mode, - limitDate, - ); - } - - late final __objc_msgSend_565Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_565 = __objc_msgSend_565Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_run1 = _registerName1("run"); - late final _sel_runUntilDate_1 = _registerName1("runUntilDate:"); - late final _sel_runMode_beforeDate_1 = _registerName1("runMode:beforeDate:"); - bool _objc_msgSend_566( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer mode, - ffi.Pointer limitDate, - ) { - return __objc_msgSend_566( - obj, - sel, - mode, - limitDate, - ); - } - - late final __objc_msgSend_566Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_566 = __objc_msgSend_566Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_configureAsServer1 = _registerName1("configureAsServer"); - late final _sel_performInModes_block_1 = - _registerName1("performInModes:block:"); - void _objc_msgSend_567( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer modes, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_567( - obj, - sel, - modes, - block, - ); - } - - late final __objc_msgSend_567Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_567 = __objc_msgSend_567Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_performBlock_1 = _registerName1("performBlock:"); - late final _sel_performSelector_target_argument_order_modes_1 = - _registerName1("performSelector:target:argument:order:modes:"); - void _objc_msgSend_568( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ffi.Pointer target, - ffi.Pointer arg, - int order, - ffi.Pointer modes, - ) { - return __objc_msgSend_568( - obj, - sel, - aSelector, - target, - arg, - order, - modes, - ); - } - - late final __objc_msgSend_568Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_568 = __objc_msgSend_568Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - late final _sel_cancelPerformSelector_target_argument_1 = - _registerName1("cancelPerformSelector:target:argument:"); - late final _sel_cancelPerformSelectorsWithTarget_1 = - _registerName1("cancelPerformSelectorsWithTarget:"); - late final _sel_scheduleInRunLoop_forMode_1 = - _registerName1("scheduleInRunLoop:forMode:"); - void _objc_msgSend_569( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer runLoop, - ffi.Pointer mode, - ) { - return __objc_msgSend_569( - obj, - sel, - runLoop, - mode, - ); - } - - late final __objc_msgSend_569Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_569 = __objc_msgSend_569Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_removeFromRunLoop_forMode_1 = - _registerName1("removeFromRunLoop:forMode:"); - late final _sel_reservedSpaceLength1 = _registerName1("reservedSpaceLength"); - late final _sel_sendBeforeDate_components_from_reserved_1 = - _registerName1("sendBeforeDate:components:from:reserved:"); - bool _objc_msgSend_570( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer limitDate, - ffi.Pointer components, - ffi.Pointer receivePort, - int headerSpaceReserved, - ) { - return __objc_msgSend_570( - obj, - sel, - limitDate, - components, - receivePort, - headerSpaceReserved, - ); - } - - late final __objc_msgSend_570Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_570 = __objc_msgSend_570Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); - - late final _sel_sendBeforeDate_msgid_components_from_reserved_1 = - _registerName1("sendBeforeDate:msgid:components:from:reserved:"); - bool _objc_msgSend_571( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer limitDate, - int msgID, - ffi.Pointer components, - ffi.Pointer receivePort, - int headerSpaceReserved, - ) { - return __objc_msgSend_571( - obj, - sel, - limitDate, - msgID, - components, - receivePort, - headerSpaceReserved, - ); - } - - late final __objc_msgSend_571Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_571 = __objc_msgSend_571Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - int)>(); - - late final _class_NSConnection1 = _getClass1("NSConnection"); - late final _sel_statistics1 = _registerName1("statistics"); - late final _sel_allConnections1 = _registerName1("allConnections"); - late final _sel_defaultConnection1 = _registerName1("defaultConnection"); - ffi.Pointer _objc_msgSend_572( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_572( - obj, - sel, - ); - } - - late final __objc_msgSend_572Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_572 = __objc_msgSend_572Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_connectionWithRegisteredName_host_1 = - _registerName1("connectionWithRegisteredName:host:"); - instancetype _objc_msgSend_573( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer hostName, - ) { - return __objc_msgSend_573( - obj, - sel, - name, - hostName, - ); - } - - late final __objc_msgSend_573Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_573 = __objc_msgSend_573Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSPortNameServer1 = _getClass1("NSPortNameServer"); - late final _sel_systemDefaultPortNameServer1 = - _registerName1("systemDefaultPortNameServer"); - ffi.Pointer _objc_msgSend_574( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_574( - obj, - sel, - ); - } - - late final __objc_msgSend_574Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_574 = __objc_msgSend_574Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_portForName_1 = _registerName1("portForName:"); - ffi.Pointer _objc_msgSend_575( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ) { - return __objc_msgSend_575( - obj, - sel, - name, - ); - } - - late final __objc_msgSend_575Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_575 = __objc_msgSend_575Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_portForName_host_1 = _registerName1("portForName:host:"); - ffi.Pointer _objc_msgSend_576( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer host, - ) { - return __objc_msgSend_576( - obj, - sel, - name, - host, - ); - } - - late final __objc_msgSend_576Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_576 = __objc_msgSend_576Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_registerPort_name_1 = _registerName1("registerPort:name:"); - bool _objc_msgSend_577( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer port, - ffi.Pointer name, - ) { - return __objc_msgSend_577( - obj, - sel, - port, - name, - ); - } - - late final __objc_msgSend_577Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_577 = __objc_msgSend_577Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_removePortForName_1 = _registerName1("removePortForName:"); - late final _sel_connectionWithRegisteredName_host_usingNameServer_1 = - _registerName1("connectionWithRegisteredName:host:usingNameServer:"); - instancetype _objc_msgSend_578( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer hostName, - ffi.Pointer server, - ) { - return __objc_msgSend_578( - obj, - sel, - name, - hostName, - server, - ); - } - - late final __objc_msgSend_578Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_578 = __objc_msgSend_578Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSDistantObject1 = _getClass1("NSDistantObject"); - late final _class_NSProxy1 = _getClass1("NSProxy"); - ffi.Pointer _objc_msgSend_579( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer sel1, - ) { - return __objc_msgSend_579( - obj, - sel, - sel1, - ); - } - - late final __objc_msgSend_579Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_579 = __objc_msgSend_579Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_respondsToSelector_1 = _registerName1("respondsToSelector:"); - late final _sel_proxyWithTarget_connection_1 = - _registerName1("proxyWithTarget:connection:"); - ffi.Pointer _objc_msgSend_580( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer connection, - ) { - return __objc_msgSend_580( - obj, - sel, - target, - connection, - ); - } - - late final __objc_msgSend_580Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_580 = __objc_msgSend_580Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithTarget_connection_1 = - _registerName1("initWithTarget:connection:"); - late final _sel_proxyWithLocal_connection_1 = - _registerName1("proxyWithLocal:connection:"); - ffi.Pointer _objc_msgSend_581( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer connection, - ) { - return __objc_msgSend_581( - obj, - sel, - target, - connection, - ); - } - - late final __objc_msgSend_581Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_581 = __objc_msgSend_581Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithLocal_connection_1 = - _registerName1("initWithLocal:connection:"); - late final _sel_setProtocolForProxy_1 = - _registerName1("setProtocolForProxy:"); - void _objc_msgSend_582( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer proto, - ) { - return __objc_msgSend_582( - obj, - sel, - proto, - ); - } - - late final __objc_msgSend_582Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_582 = __objc_msgSend_582Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_connectionForProxy1 = _registerName1("connectionForProxy"); - late final _sel_rootProxyForConnectionWithRegisteredName_host_1 = - _registerName1("rootProxyForConnectionWithRegisteredName:host:"); - ffi.Pointer _objc_msgSend_583( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer hostName, - ) { - return __objc_msgSend_583( - obj, - sel, - name, - hostName, - ); - } - - late final __objc_msgSend_583Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_583 = __objc_msgSend_583Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_1 = - _registerName1( - "rootProxyForConnectionWithRegisteredName:host:usingNameServer:"); - ffi.Pointer _objc_msgSend_584( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer hostName, - ffi.Pointer server, - ) { - return __objc_msgSend_584( - obj, - sel, - name, - hostName, - server, - ); - } - - late final __objc_msgSend_584Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_584 = __objc_msgSend_584Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_serviceConnectionWithName_rootObject_usingNameServer_1 = - _registerName1("serviceConnectionWithName:rootObject:usingNameServer:"); - instancetype _objc_msgSend_585( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer root, - ffi.Pointer server, - ) { - return __objc_msgSend_585( - obj, - sel, - name, - root, - server, - ); - } - - late final __objc_msgSend_585Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_585 = __objc_msgSend_585Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_serviceConnectionWithName_rootObject_1 = - _registerName1("serviceConnectionWithName:rootObject:"); - instancetype _objc_msgSend_586( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer root, - ) { - return __objc_msgSend_586( - obj, - sel, - name, - root, - ); - } - - late final __objc_msgSend_586Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_586 = __objc_msgSend_586Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_requestTimeout1 = _registerName1("requestTimeout"); - late final _sel_setRequestTimeout_1 = _registerName1("setRequestTimeout:"); - late final _sel_replyTimeout1 = _registerName1("replyTimeout"); - late final _sel_setReplyTimeout_1 = _registerName1("setReplyTimeout:"); - late final _sel_rootObject1 = _registerName1("rootObject"); - late final _sel_setRootObject_1 = _registerName1("setRootObject:"); - late final _sel_independentConversationQueueing1 = - _registerName1("independentConversationQueueing"); - late final _sel_setIndependentConversationQueueing_1 = - _registerName1("setIndependentConversationQueueing:"); - late final _sel_rootProxy1 = _registerName1("rootProxy"); - ffi.Pointer _objc_msgSend_587( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_587( - obj, - sel, - ); - } - - late final __objc_msgSend_587Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_587 = __objc_msgSend_587Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_addRequestMode_1 = _registerName1("addRequestMode:"); - late final _sel_removeRequestMode_1 = _registerName1("removeRequestMode:"); - late final _sel_requestModes1 = _registerName1("requestModes"); - late final _sel_registerName_1 = _registerName1("registerName:"); - bool _objc_msgSend_588( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ) { - return __objc_msgSend_588( - obj, - sel, - name, - ); - } - - late final __objc_msgSend_588Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_588 = __objc_msgSend_588Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_registerName_withNameServer_1 = - _registerName1("registerName:withNameServer:"); - bool _objc_msgSend_589( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer server, - ) { - return __objc_msgSend_589( - obj, - sel, - name, - server, - ); - } - - late final __objc_msgSend_589Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_589 = __objc_msgSend_589Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_connectionWithReceivePort_sendPort_1 = - _registerName1("connectionWithReceivePort:sendPort:"); - instancetype _objc_msgSend_590( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer receivePort, - ffi.Pointer sendPort, - ) { - return __objc_msgSend_590( - obj, - sel, - receivePort, - sendPort, - ); - } - - late final __objc_msgSend_590Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_590 = __objc_msgSend_590Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_currentConversation1 = _registerName1("currentConversation"); - late final _sel_initWithReceivePort_sendPort_1 = - _registerName1("initWithReceivePort:sendPort:"); - late final _sel_sendPort1 = _registerName1("sendPort"); - late final _sel_receivePort1 = _registerName1("receivePort"); - late final _sel_enableMultipleThreads1 = - _registerName1("enableMultipleThreads"); - late final _sel_multipleThreadsEnabled1 = - _registerName1("multipleThreadsEnabled"); - late final _sel_addRunLoop_1 = _registerName1("addRunLoop:"); - void _objc_msgSend_591( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer runloop, - ) { - return __objc_msgSend_591( - obj, - sel, - runloop, - ); - } - - late final __objc_msgSend_591Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_591 = __objc_msgSend_591Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_removeRunLoop_1 = _registerName1("removeRunLoop:"); - late final _sel_runInNewThread1 = _registerName1("runInNewThread"); - late final _sel_remoteObjects1 = _registerName1("remoteObjects"); - late final _sel_localObjects1 = _registerName1("localObjects"); - late final _sel_dispatchWithComponents_1 = - _registerName1("dispatchWithComponents:"); - late final _sel_addConnection_toRunLoop_forMode_1 = - _registerName1("addConnection:toRunLoop:forMode:"); - void _objc_msgSend_592( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer conn, - ffi.Pointer runLoop, - ffi.Pointer mode, - ) { - return __objc_msgSend_592( - obj, - sel, - conn, - runLoop, - mode, - ); - } - - late final __objc_msgSend_592Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_592 = __objc_msgSend_592Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_removeConnection_fromRunLoop_forMode_1 = - _registerName1("removeConnection:fromRunLoop:forMode:"); - late final _sel_encodePortObject_1 = _registerName1("encodePortObject:"); - void _objc_msgSend_593( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aport, - ) { - return __objc_msgSend_593( - obj, - sel, - aport, - ); - } - - late final __objc_msgSend_593Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_593 = __objc_msgSend_593Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_decodePortObject1 = _registerName1("decodePortObject"); - ffi.Pointer _objc_msgSend_594( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_594( - obj, - sel, - ); - } - - late final __objc_msgSend_594Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_594 = __objc_msgSend_594Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_connection1 = _registerName1("connection"); - ffi.Pointer _objc_msgSend_595( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_595( - obj, - sel, - ); - } - - late final __objc_msgSend_595Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_595 = __objc_msgSend_595Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_portCoderWithReceivePort_sendPort_components_1 = - _registerName1("portCoderWithReceivePort:sendPort:components:"); - ffi.Pointer _objc_msgSend_596( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer rcvPort, - ffi.Pointer sndPort, - ffi.Pointer comps, - ) { - return __objc_msgSend_596( - obj, - sel, - rcvPort, - sndPort, - comps, - ); - } - - late final __objc_msgSend_596Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_596 = __objc_msgSend_596Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithReceivePort_sendPort_components_1 = - _registerName1("initWithReceivePort:sendPort:components:"); - late final _sel_dispatch1 = _registerName1("dispatch"); - late final _sel_replacementObjectForPortCoder_1 = - _registerName1("replacementObjectForPortCoder:"); - ffi.Pointer _objc_msgSend_597( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer coder, - ) { - return __objc_msgSend_597( - obj, - sel, - coder, - ); - } - - late final __objc_msgSend_597Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_597 = __objc_msgSend_597Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSClassDescription1 = _getClass1("NSClassDescription"); - late final _sel_registerClassDescription_forClass_1 = - _registerName1("registerClassDescription:forClass:"); - void _objc_msgSend_598( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer description, - ffi.Pointer aClass, - ) { - return __objc_msgSend_598( - obj, - sel, - description, - aClass, - ); - } - - late final __objc_msgSend_598Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_598 = __objc_msgSend_598Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_invalidateClassDescriptionCache1 = - _registerName1("invalidateClassDescriptionCache"); - late final _sel_classDescriptionForClass_1 = - _registerName1("classDescriptionForClass:"); - ffi.Pointer _objc_msgSend_599( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aClass, - ) { - return __objc_msgSend_599( - obj, - sel, - aClass, - ); - } - - late final __objc_msgSend_599Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_599 = __objc_msgSend_599Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_attributeKeys1 = _registerName1("attributeKeys"); - late final _sel_toOneRelationshipKeys1 = - _registerName1("toOneRelationshipKeys"); - late final _sel_toManyRelationshipKeys1 = - _registerName1("toManyRelationshipKeys"); - late final _sel_inverseForRelationshipKey_1 = - _registerName1("inverseForRelationshipKey:"); - late final _sel_classDescription1 = _registerName1("classDescription"); - ffi.Pointer _objc_msgSend_600( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_600( - obj, - sel, - ); - } - - late final __objc_msgSend_600Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_600 = __objc_msgSend_600Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSScriptObjectSpecifier1 = - _getClass1("NSScriptObjectSpecifier"); - late final _class_NSAppleEventDescriptor1 = - _getClass1("NSAppleEventDescriptor"); - late final _sel_nullDescriptor1 = _registerName1("nullDescriptor"); - ffi.Pointer _objc_msgSend_601( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_601( - obj, - sel, - ); - } - - late final __objc_msgSend_601Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_601 = __objc_msgSend_601Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_descriptorWithDescriptorType_bytes_length_1 = - _registerName1("descriptorWithDescriptorType:bytes:length:"); - ffi.Pointer _objc_msgSend_602( - ffi.Pointer obj, - ffi.Pointer sel, - int descriptorType, - ffi.Pointer bytes, - int byteCount, - ) { - return __objc_msgSend_602( - obj, - sel, - descriptorType, - bytes, - byteCount, - ); - } - - late final __objc_msgSend_602Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_602 = __objc_msgSend_602Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer, int)>(); - - late final _sel_descriptorWithDescriptorType_data_1 = - _registerName1("descriptorWithDescriptorType:data:"); - ffi.Pointer _objc_msgSend_603( - ffi.Pointer obj, - ffi.Pointer sel, - int descriptorType, - ffi.Pointer data, - ) { - return __objc_msgSend_603( - obj, - sel, - descriptorType, - data, - ); - } - - late final __objc_msgSend_603Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_603 = __objc_msgSend_603Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_descriptorWithBoolean_1 = - _registerName1("descriptorWithBoolean:"); - ffi.Pointer _objc_msgSend_604( - ffi.Pointer obj, - ffi.Pointer sel, - int boolean, - ) { - return __objc_msgSend_604( - obj, - sel, - boolean, - ); - } - - late final __objc_msgSend_604Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedChar)>>('objc_msgSend'); - late final __objc_msgSend_604 = __objc_msgSend_604Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_descriptorWithEnumCode_1 = - _registerName1("descriptorWithEnumCode:"); - ffi.Pointer _objc_msgSend_605( - ffi.Pointer obj, - ffi.Pointer sel, - int enumerator, - ) { - return __objc_msgSend_605( - obj, - sel, - enumerator, - ); - } - - late final __objc_msgSend_605Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_605 = __objc_msgSend_605Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_descriptorWithInt32_1 = - _registerName1("descriptorWithInt32:"); - ffi.Pointer _objc_msgSend_606( - ffi.Pointer obj, - ffi.Pointer sel, - int signedInt, - ) { - return __objc_msgSend_606( - obj, - sel, - signedInt, - ); - } - - late final __objc_msgSend_606Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int)>>('objc_msgSend'); - late final __objc_msgSend_606 = __objc_msgSend_606Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_descriptorWithDouble_1 = - _registerName1("descriptorWithDouble:"); - ffi.Pointer _objc_msgSend_607( - ffi.Pointer obj, - ffi.Pointer sel, - double doubleValue, - ) { - return __objc_msgSend_607( - obj, - sel, - doubleValue, - ); - } - - late final __objc_msgSend_607Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_607 = __objc_msgSend_607Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, double)>(); - - late final _sel_descriptorWithTypeCode_1 = - _registerName1("descriptorWithTypeCode:"); - late final _sel_descriptorWithString_1 = - _registerName1("descriptorWithString:"); - ffi.Pointer _objc_msgSend_608( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - ) { - return __objc_msgSend_608( - obj, - sel, - string, - ); - } - - late final __objc_msgSend_608Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_608 = __objc_msgSend_608Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_descriptorWithDate_1 = _registerName1("descriptorWithDate:"); - ffi.Pointer _objc_msgSend_609( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, - ) { - return __objc_msgSend_609( - obj, - sel, - date, - ); - } - - late final __objc_msgSend_609Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_609 = __objc_msgSend_609Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_descriptorWithFileURL_1 = - _registerName1("descriptorWithFileURL:"); - ffi.Pointer _objc_msgSend_610( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer fileURL, - ) { - return __objc_msgSend_610( - obj, - sel, - fileURL, - ); - } - - late final __objc_msgSend_610Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_610 = __objc_msgSend_610Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_1 = - _registerName1( - "appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID:"); - ffi.Pointer _objc_msgSend_611( - ffi.Pointer obj, - ffi.Pointer sel, - int eventClass, - int eventID, - ffi.Pointer targetDescriptor, - int returnID, - int transactionID, - ) { - return __objc_msgSend_611( - obj, - sel, - eventClass, - eventID, - targetDescriptor, - returnID, - transactionID, - ); - } - - late final __objc_msgSend_611Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.UnsignedInt, - ffi.Pointer, - ffi.Short, - ffi.Int)>>('objc_msgSend'); - late final __objc_msgSend_611 = __objc_msgSend_611Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer, int, int)>(); - - late final _sel_listDescriptor1 = _registerName1("listDescriptor"); - late final _sel_recordDescriptor1 = _registerName1("recordDescriptor"); - late final _sel_currentProcessDescriptor1 = - _registerName1("currentProcessDescriptor"); - late final _sel_descriptorWithProcessIdentifier_1 = - _registerName1("descriptorWithProcessIdentifier:"); - late final _sel_descriptorWithBundleIdentifier_1 = - _registerName1("descriptorWithBundleIdentifier:"); - late final _sel_descriptorWithApplicationURL_1 = - _registerName1("descriptorWithApplicationURL:"); - late final _sel_initWithAEDescNoCopy_1 = - _registerName1("initWithAEDescNoCopy:"); - instancetype _objc_msgSend_612( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aeDesc, - ) { - return __objc_msgSend_612( - obj, - sel, - aeDesc, - ); - } - - late final __objc_msgSend_612Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_612 = __objc_msgSend_612Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithDescriptorType_bytes_length_1 = - _registerName1("initWithDescriptorType:bytes:length:"); - instancetype _objc_msgSend_613( - ffi.Pointer obj, - ffi.Pointer sel, - int descriptorType, - ffi.Pointer bytes, - int byteCount, - ) { - return __objc_msgSend_613( - obj, - sel, - descriptorType, - bytes, - byteCount, - ); - } - - late final __objc_msgSend_613Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_613 = __objc_msgSend_613Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer, int)>(); - - late final _sel_initWithDescriptorType_data_1 = - _registerName1("initWithDescriptorType:data:"); - instancetype _objc_msgSend_614( - ffi.Pointer obj, - ffi.Pointer sel, - int descriptorType, - ffi.Pointer data, - ) { - return __objc_msgSend_614( - obj, - sel, - descriptorType, - data, - ); - } - - late final __objc_msgSend_614Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedInt, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_614 = __objc_msgSend_614Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_1 = - _registerName1( - "initWithEventClass:eventID:targetDescriptor:returnID:transactionID:"); - instancetype _objc_msgSend_615( - ffi.Pointer obj, - ffi.Pointer sel, - int eventClass, - int eventID, - ffi.Pointer targetDescriptor, - int returnID, - int transactionID, - ) { - return __objc_msgSend_615( - obj, - sel, - eventClass, - eventID, - targetDescriptor, - returnID, - transactionID, - ); - } - - late final __objc_msgSend_615Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.UnsignedInt, - ffi.Pointer, - ffi.Short, - ffi.Int)>>('objc_msgSend'); - late final __objc_msgSend_615 = __objc_msgSend_615Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - int, ffi.Pointer, int, int)>(); - - late final _sel_initListDescriptor1 = _registerName1("initListDescriptor"); - late final _sel_initRecordDescriptor1 = - _registerName1("initRecordDescriptor"); - late final _sel_aeDesc1 = _registerName1("aeDesc"); - ffi.Pointer _objc_msgSend_616( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_616( - obj, - sel, - ); - } - - late final __objc_msgSend_616Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_616 = __objc_msgSend_616Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_descriptorType1 = _registerName1("descriptorType"); - late final _sel_booleanValue1 = _registerName1("booleanValue"); - late final _sel_enumCodeValue1 = _registerName1("enumCodeValue"); - late final _sel_int32Value1 = _registerName1("int32Value"); - late final _sel_typeCodeValue1 = _registerName1("typeCodeValue"); - late final _sel_dateValue1 = _registerName1("dateValue"); - late final _sel_fileURLValue1 = _registerName1("fileURLValue"); - late final _sel_eventClass1 = _registerName1("eventClass"); - late final _sel_eventID1 = _registerName1("eventID"); - late final _sel_returnID1 = _registerName1("returnID"); - late final _sel_transactionID1 = _registerName1("transactionID"); - late final _sel_setParamDescriptor_forKeyword_1 = - _registerName1("setParamDescriptor:forKeyword:"); - void _objc_msgSend_617( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer descriptor, - int keyword, - ) { - return __objc_msgSend_617( - obj, - sel, - descriptor, - keyword, - ); - } - - late final __objc_msgSend_617Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_617 = __objc_msgSend_617Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_paramDescriptorForKeyword_1 = - _registerName1("paramDescriptorForKeyword:"); - ffi.Pointer _objc_msgSend_618( - ffi.Pointer obj, - ffi.Pointer sel, - int keyword, - ) { - return __objc_msgSend_618( - obj, - sel, - keyword, - ); - } - - late final __objc_msgSend_618Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_618 = __objc_msgSend_618Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_removeParamDescriptorWithKeyword_1 = - _registerName1("removeParamDescriptorWithKeyword:"); - void _objc_msgSend_619( - ffi.Pointer obj, - ffi.Pointer sel, - int keyword, - ) { - return __objc_msgSend_619( - obj, - sel, - keyword, - ); - } - - late final __objc_msgSend_619Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_619 = __objc_msgSend_619Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_setAttributeDescriptor_forKeyword_1 = - _registerName1("setAttributeDescriptor:forKeyword:"); - late final _sel_attributeDescriptorForKeyword_1 = - _registerName1("attributeDescriptorForKeyword:"); - late final _sel_sendEventWithOptions_timeout_error_1 = - _registerName1("sendEventWithOptions:timeout:error:"); - ffi.Pointer _objc_msgSend_620( - ffi.Pointer obj, - ffi.Pointer sel, - int sendOptions, - double timeoutInSeconds, - ffi.Pointer> error, - ) { - return __objc_msgSend_620( - obj, - sel, - sendOptions, - timeoutInSeconds, - error, - ); - } - - late final __objc_msgSend_620Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Double, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_620 = __objc_msgSend_620Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - double, - ffi.Pointer>)>(); - - late final _sel_isRecordDescriptor1 = _registerName1("isRecordDescriptor"); - late final _sel_numberOfItems1 = _registerName1("numberOfItems"); - late final _sel_insertDescriptor_atIndex_1 = - _registerName1("insertDescriptor:atIndex:"); - void _objc_msgSend_621( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer descriptor, - int index, - ) { - return __objc_msgSend_621( - obj, - sel, - descriptor, - index, - ); - } - - late final __objc_msgSend_621Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_621 = __objc_msgSend_621Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_descriptorAtIndex_1 = _registerName1("descriptorAtIndex:"); - ffi.Pointer _objc_msgSend_622( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ) { - return __objc_msgSend_622( - obj, - sel, - index, - ); - } - - late final __objc_msgSend_622Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_622 = __objc_msgSend_622Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_removeDescriptorAtIndex_1 = - _registerName1("removeDescriptorAtIndex:"); - late final _sel_setDescriptor_forKeyword_1 = - _registerName1("setDescriptor:forKeyword:"); - late final _sel_descriptorForKeyword_1 = - _registerName1("descriptorForKeyword:"); - late final _sel_removeDescriptorWithKeyword_1 = - _registerName1("removeDescriptorWithKeyword:"); - late final _sel_keywordForDescriptorAtIndex_1 = - _registerName1("keywordForDescriptorAtIndex:"); - int _objc_msgSend_623( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ) { - return __objc_msgSend_623( - obj, - sel, - index, - ); - } - - late final __objc_msgSend_623Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedInt Function(ffi.Pointer, - ffi.Pointer, ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_623 = __objc_msgSend_623Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_coerceToDescriptorType_1 = - _registerName1("coerceToDescriptorType:"); - late final _sel_objectSpecifierWithDescriptor_1 = - _registerName1("objectSpecifierWithDescriptor:"); - ffi.Pointer _objc_msgSend_624( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer descriptor, - ) { - return __objc_msgSend_624( - obj, - sel, - descriptor, - ); - } - - late final __objc_msgSend_624Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_624 = __objc_msgSend_624Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithContainerSpecifier_key_1 = - _registerName1("initWithContainerSpecifier:key:"); - instancetype _objc_msgSend_625( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer container, - ffi.Pointer property, - ) { - return __objc_msgSend_625( - obj, - sel, - container, - property, - ); - } - - late final __objc_msgSend_625Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_625 = __objc_msgSend_625Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSScriptClassDescription1 = - _getClass1("NSScriptClassDescription"); - ffi.Pointer _objc_msgSend_626( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aClass, - ) { - return __objc_msgSend_626( - obj, - sel, - aClass, - ); - } - - late final __objc_msgSend_626Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_626 = __objc_msgSend_626Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithSuiteName_className_dictionary_1 = - _registerName1("initWithSuiteName:className:dictionary:"); - instancetype _objc_msgSend_627( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer suiteName, - ffi.Pointer className, - ffi.Pointer classDeclaration, - ) { - return __objc_msgSend_627( - obj, - sel, - suiteName, - className, - classDeclaration, - ); - } - - late final __objc_msgSend_627Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_627 = __objc_msgSend_627Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_suiteName1 = _registerName1("suiteName"); - late final _sel_className1 = _registerName1("className"); - late final _sel_implementationClassName1 = - _registerName1("implementationClassName"); - late final _sel_superclassDescription1 = - _registerName1("superclassDescription"); - ffi.Pointer _objc_msgSend_628( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_628( - obj, - sel, - ); - } - - late final __objc_msgSend_628Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_628 = __objc_msgSend_628Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_appleEventCode1 = _registerName1("appleEventCode"); - late final _sel_matchesAppleEventCode_1 = - _registerName1("matchesAppleEventCode:"); - late final _class_NSScriptCommandDescription1 = - _getClass1("NSScriptCommandDescription"); - late final _sel_initWithSuiteName_commandName_dictionary_1 = - _registerName1("initWithSuiteName:commandName:dictionary:"); - late final _sel_commandName1 = _registerName1("commandName"); - late final _sel_appleEventClassCode1 = _registerName1("appleEventClassCode"); - late final _sel_commandClassName1 = _registerName1("commandClassName"); - late final _sel_returnType1 = _registerName1("returnType"); - late final _sel_appleEventCodeForReturnType1 = - _registerName1("appleEventCodeForReturnType"); - late final _sel_argumentNames1 = _registerName1("argumentNames"); - late final _sel_typeForArgumentWithName_1 = - _registerName1("typeForArgumentWithName:"); - late final _sel_appleEventCodeForArgumentWithName_1 = - _registerName1("appleEventCodeForArgumentWithName:"); - int _objc_msgSend_629( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer argumentName, - ) { - return __objc_msgSend_629( - obj, - sel, - argumentName, - ); - } - - late final __objc_msgSend_629Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedInt Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_629 = __objc_msgSend_629Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_isOptionalArgumentWithName_1 = - _registerName1("isOptionalArgumentWithName:"); - late final _class_NSScriptCommand1 = _getClass1("NSScriptCommand"); - late final _sel_initWithCommandDescription_1 = - _registerName1("initWithCommandDescription:"); - instancetype _objc_msgSend_630( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer commandDef, - ) { - return __objc_msgSend_630( - obj, - sel, - commandDef, - ); - } - - late final __objc_msgSend_630Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_630 = __objc_msgSend_630Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_commandDescription1 = _registerName1("commandDescription"); - ffi.Pointer _objc_msgSend_631( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_631( - obj, - sel, - ); - } - - late final __objc_msgSend_631Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_631 = __objc_msgSend_631Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_directParameter1 = _registerName1("directParameter"); - late final _sel_setDirectParameter_1 = _registerName1("setDirectParameter:"); - late final _sel_receiversSpecifier1 = _registerName1("receiversSpecifier"); - ffi.Pointer _objc_msgSend_632( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_632( - obj, - sel, - ); - } - - late final __objc_msgSend_632Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_632 = __objc_msgSend_632Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setReceiversSpecifier_1 = - _registerName1("setReceiversSpecifier:"); - void _objc_msgSend_633( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_633( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_633Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_633 = __objc_msgSend_633Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_evaluatedReceivers1 = _registerName1("evaluatedReceivers"); - late final _sel_arguments1 = _registerName1("arguments"); - late final _sel_setArguments_1 = _registerName1("setArguments:"); - void _objc_msgSend_634( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_634( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_634Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_634 = __objc_msgSend_634Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_evaluatedArguments1 = _registerName1("evaluatedArguments"); - late final _sel_isWellFormed1 = _registerName1("isWellFormed"); - late final _sel_performDefaultImplementation1 = - _registerName1("performDefaultImplementation"); - late final _sel_executeCommand1 = _registerName1("executeCommand"); - late final _sel_scriptErrorNumber1 = _registerName1("scriptErrorNumber"); - late final _sel_setScriptErrorNumber_1 = - _registerName1("setScriptErrorNumber:"); - void _objc_msgSend_635( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_635( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_635Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_635 = __objc_msgSend_635Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_scriptErrorOffendingObjectDescriptor1 = - _registerName1("scriptErrorOffendingObjectDescriptor"); - ffi.Pointer _objc_msgSend_636( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_636( - obj, - sel, - ); - } - - late final __objc_msgSend_636Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_636 = __objc_msgSend_636Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setScriptErrorOffendingObjectDescriptor_1 = - _registerName1("setScriptErrorOffendingObjectDescriptor:"); - void _objc_msgSend_637( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_637( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_637Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_637 = __objc_msgSend_637Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_scriptErrorExpectedTypeDescriptor1 = - _registerName1("scriptErrorExpectedTypeDescriptor"); - late final _sel_setScriptErrorExpectedTypeDescriptor_1 = - _registerName1("setScriptErrorExpectedTypeDescriptor:"); - late final _sel_scriptErrorString1 = _registerName1("scriptErrorString"); - late final _sel_setScriptErrorString_1 = - _registerName1("setScriptErrorString:"); - late final _sel_currentCommand1 = _registerName1("currentCommand"); - ffi.Pointer _objc_msgSend_638( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_638( - obj, - sel, - ); - } - - late final __objc_msgSend_638Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_638 = __objc_msgSend_638Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_appleEvent1 = _registerName1("appleEvent"); - late final _sel_suspendExecution1 = _registerName1("suspendExecution"); - late final _sel_resumeExecutionWithResult_1 = - _registerName1("resumeExecutionWithResult:"); - late final _sel_createCommandInstance1 = - _registerName1("createCommandInstance"); - ffi.Pointer _objc_msgSend_639( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_639( - obj, - sel, - ); - } - - late final __objc_msgSend_639Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_639 = __objc_msgSend_639Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_createCommandInstanceWithZone_1 = - _registerName1("createCommandInstanceWithZone:"); - ffi.Pointer _objc_msgSend_640( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_NSZone> zone, - ) { - return __objc_msgSend_640( - obj, - sel, - zone, - ); - } - - late final __objc_msgSend_640Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_NSZone>)>>('objc_msgSend'); - late final __objc_msgSend_640 = __objc_msgSend_640Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_NSZone>)>(); - - late final _sel_supportsCommand_1 = _registerName1("supportsCommand:"); - bool _objc_msgSend_641( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer commandDescription, - ) { - return __objc_msgSend_641( - obj, - sel, - commandDescription, - ); - } - - late final __objc_msgSend_641Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_641 = __objc_msgSend_641Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_selectorForCommand_1 = _registerName1("selectorForCommand:"); - ffi.Pointer _objc_msgSend_642( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer commandDescription, - ) { - return __objc_msgSend_642( - obj, - sel, - commandDescription, - ); - } - - late final __objc_msgSend_642Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_642 = __objc_msgSend_642Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_typeForKey_1 = _registerName1("typeForKey:"); - late final _sel_classDescriptionForKey_1 = - _registerName1("classDescriptionForKey:"); - ffi.Pointer _objc_msgSend_643( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ) { - return __objc_msgSend_643( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_643Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_643 = __objc_msgSend_643Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_appleEventCodeForKey_1 = - _registerName1("appleEventCodeForKey:"); - late final _sel_keyWithAppleEventCode_1 = - _registerName1("keyWithAppleEventCode:"); - ffi.Pointer _objc_msgSend_644( - ffi.Pointer obj, - ffi.Pointer sel, - int appleEventCode, - ) { - return __objc_msgSend_644( - obj, - sel, - appleEventCode, - ); - } - - late final __objc_msgSend_644Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_644 = __objc_msgSend_644Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_defaultSubcontainerAttributeKey1 = - _registerName1("defaultSubcontainerAttributeKey"); - late final _sel_isLocationRequiredToCreateForKey_1 = - _registerName1("isLocationRequiredToCreateForKey:"); - late final _sel_hasPropertyForKey_1 = _registerName1("hasPropertyForKey:"); - late final _sel_hasOrderedToManyRelationshipForKey_1 = - _registerName1("hasOrderedToManyRelationshipForKey:"); - late final _sel_hasReadablePropertyForKey_1 = - _registerName1("hasReadablePropertyForKey:"); - late final _sel_hasWritablePropertyForKey_1 = - _registerName1("hasWritablePropertyForKey:"); - late final _sel_isReadOnlyKey_1 = _registerName1("isReadOnlyKey:"); - late final _sel_initWithContainerClassDescription_containerSpecifier_key_1 = - _registerName1( - "initWithContainerClassDescription:containerSpecifier:key:"); - instancetype _objc_msgSend_645( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer classDesc, - ffi.Pointer container, - ffi.Pointer property, - ) { - return __objc_msgSend_645( - obj, - sel, - classDesc, - container, - property, - ); - } - - late final __objc_msgSend_645Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_645 = __objc_msgSend_645Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_childSpecifier1 = _registerName1("childSpecifier"); - late final _sel_setChildSpecifier_1 = _registerName1("setChildSpecifier:"); - late final _sel_containerSpecifier1 = _registerName1("containerSpecifier"); - late final _sel_setContainerSpecifier_1 = - _registerName1("setContainerSpecifier:"); - late final _sel_containerIsObjectBeingTested1 = - _registerName1("containerIsObjectBeingTested"); - late final _sel_setContainerIsObjectBeingTested_1 = - _registerName1("setContainerIsObjectBeingTested:"); - late final _sel_containerIsRangeContainerObject1 = - _registerName1("containerIsRangeContainerObject"); - late final _sel_setContainerIsRangeContainerObject_1 = - _registerName1("setContainerIsRangeContainerObject:"); - late final _sel_key1 = _registerName1("key"); - late final _sel_setKey_1 = _registerName1("setKey:"); - void _objc_msgSend_646( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_646( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_646Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_646 = __objc_msgSend_646Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_containerClassDescription1 = - _registerName1("containerClassDescription"); - late final _sel_setContainerClassDescription_1 = - _registerName1("setContainerClassDescription:"); - void _objc_msgSend_647( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_647( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_647Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_647 = __objc_msgSend_647Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_keyClassDescription1 = _registerName1("keyClassDescription"); - late final _sel_indicesOfObjectsByEvaluatingWithContainer_count_1 = - _registerName1("indicesOfObjectsByEvaluatingWithContainer:count:"); - ffi.Pointer _objc_msgSend_648( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer container, - ffi.Pointer count, - ) { - return __objc_msgSend_648( - obj, - sel, - container, - count, - ); - } - - late final __objc_msgSend_648Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_648 = __objc_msgSend_648Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_objectsByEvaluatingWithContainers_1 = - _registerName1("objectsByEvaluatingWithContainers:"); - late final _sel_objectsByEvaluatingSpecifier1 = - _registerName1("objectsByEvaluatingSpecifier"); - late final _sel_evaluationErrorNumber1 = - _registerName1("evaluationErrorNumber"); - late final _sel_setEvaluationErrorNumber_1 = - _registerName1("setEvaluationErrorNumber:"); - late final _sel_evaluationErrorSpecifier1 = - _registerName1("evaluationErrorSpecifier"); - late final _sel_descriptor1 = _registerName1("descriptor"); - late final _sel_scriptingValueForSpecifier_1 = - _registerName1("scriptingValueForSpecifier:"); - ffi.Pointer _objc_msgSend_649( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer objectSpecifier, - ) { - return __objc_msgSend_649( - obj, - sel, - objectSpecifier, - ); - } - - late final __objc_msgSend_649Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_649 = __objc_msgSend_649Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_scriptingProperties1 = _registerName1("scriptingProperties"); - late final _sel_setScriptingProperties_1 = - _registerName1("setScriptingProperties:"); - late final _sel_copyScriptingValue_forKey_withProperties_1 = - _registerName1("copyScriptingValue:forKey:withProperties:"); - ffi.Pointer _objc_msgSend_650( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer key, - ffi.Pointer properties, - ) { - return __objc_msgSend_650( - obj, - sel, - value, - key, - properties, - ); - } - - late final __objc_msgSend_650Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_650 = __objc_msgSend_650Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_newScriptingObjectOfClass_forValueForKey_withContentsValue_properties_1 = - _registerName1( - "newScriptingObjectOfClass:forValueForKey:withContentsValue:properties:"); - ffi.Pointer _objc_msgSend_651( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer objectClass, - ffi.Pointer key, - ffi.Pointer contentsValue, - ffi.Pointer properties, - ) { - return __objc_msgSend_651( - obj, - sel, - objectClass, - key, - contentsValue, - properties, - ); - } - - late final __objc_msgSend_651Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_651 = __objc_msgSend_651Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_classCode1 = _registerName1("classCode"); - late final _sel_valueAtIndex_inPropertyWithKey_1 = - _registerName1("valueAtIndex:inPropertyWithKey:"); - ffi.Pointer _objc_msgSend_652( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ffi.Pointer key, - ) { - return __objc_msgSend_652( - obj, - sel, - index, - key, - ); - } - - late final __objc_msgSend_652Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_652 = __objc_msgSend_652Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_valueWithName_inPropertyWithKey_1 = - _registerName1("valueWithName:inPropertyWithKey:"); - late final _sel_valueWithUniqueID_inPropertyWithKey_1 = - _registerName1("valueWithUniqueID:inPropertyWithKey:"); - late final _sel_insertValue_atIndex_inPropertyWithKey_1 = - _registerName1("insertValue:atIndex:inPropertyWithKey:"); - void _objc_msgSend_653( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - int index, - ffi.Pointer key, - ) { - return __objc_msgSend_653( - obj, - sel, - value, - index, - key, - ); - } - - late final __objc_msgSend_653Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_653 = __objc_msgSend_653Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_removeValueAtIndex_fromPropertyWithKey_1 = - _registerName1("removeValueAtIndex:fromPropertyWithKey:"); - void _objc_msgSend_654( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ffi.Pointer key, - ) { - return __objc_msgSend_654( - obj, - sel, - index, - key, - ); - } - - late final __objc_msgSend_654Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_654 = __objc_msgSend_654Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _sel_replaceValueAtIndex_inPropertyWithKey_withValue_1 = - _registerName1("replaceValueAtIndex:inPropertyWithKey:withValue:"); - void _objc_msgSend_655( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ffi.Pointer key, - ffi.Pointer value, - ) { - return __objc_msgSend_655( - obj, - sel, - index, - key, - value, - ); - } - - late final __objc_msgSend_655Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_655 = __objc_msgSend_655Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_insertValue_inPropertyWithKey_1 = - _registerName1("insertValue:inPropertyWithKey:"); - void _objc_msgSend_656( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer key, - ) { - return __objc_msgSend_656( - obj, - sel, - value, - key, - ); - } - - late final __objc_msgSend_656Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_656 = __objc_msgSend_656Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_coerceValue_forKey_1 = _registerName1("coerceValue:forKey:"); - ffi.Pointer _objc_msgSend_657( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer key, - ) { - return __objc_msgSend_657( - obj, - sel, - value, - key, - ); - } - - late final __objc_msgSend_657Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_657 = __objc_msgSend_657Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_objectSpecifier1 = _registerName1("objectSpecifier"); - late final _sel_indicesOfObjectsByEvaluatingObjectSpecifier_1 = - _registerName1("indicesOfObjectsByEvaluatingObjectSpecifier:"); - ffi.Pointer _objc_msgSend_658( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer specifier, - ) { - return __objc_msgSend_658( - obj, - sel, - specifier, - ); - } - - late final __objc_msgSend_658Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_658 = __objc_msgSend_658Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_isEqualTo_1 = _registerName1("isEqualTo:"); - late final _sel_isLessThanOrEqualTo_1 = - _registerName1("isLessThanOrEqualTo:"); - late final _sel_isLessThan_1 = _registerName1("isLessThan:"); - late final _sel_isGreaterThanOrEqualTo_1 = - _registerName1("isGreaterThanOrEqualTo:"); - late final _sel_isGreaterThan_1 = _registerName1("isGreaterThan:"); - late final _sel_isNotEqualTo_1 = _registerName1("isNotEqualTo:"); - late final _sel_doesContain_1 = _registerName1("doesContain:"); - late final _sel_isLike_1 = _registerName1("isLike:"); - late final _sel_isCaseInsensitiveLike_1 = - _registerName1("isCaseInsensitiveLike:"); - late final _sel_scriptingIsEqualTo_1 = _registerName1("scriptingIsEqualTo:"); - late final _sel_scriptingIsLessThanOrEqualTo_1 = - _registerName1("scriptingIsLessThanOrEqualTo:"); - late final _sel_scriptingIsLessThan_1 = - _registerName1("scriptingIsLessThan:"); - late final _sel_scriptingIsGreaterThanOrEqualTo_1 = - _registerName1("scriptingIsGreaterThanOrEqualTo:"); - late final _sel_scriptingIsGreaterThan_1 = - _registerName1("scriptingIsGreaterThan:"); - late final _sel_scriptingBeginsWith_1 = - _registerName1("scriptingBeginsWith:"); - late final _sel_scriptingEndsWith_1 = _registerName1("scriptingEndsWith:"); - late final _sel_scriptingContains_1 = _registerName1("scriptingContains:"); - late final _class_NSItemProvider1 = _getClass1("NSItemProvider"); - late final _class_NSProgress1 = _getClass1("NSProgress"); - late final _sel_currentProgress1 = _registerName1("currentProgress"); - ffi.Pointer _objc_msgSend_659( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_659( - obj, - sel, - ); - } - - late final __objc_msgSend_659Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_659 = __objc_msgSend_659Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_progressWithTotalUnitCount_1 = - _registerName1("progressWithTotalUnitCount:"); - ffi.Pointer _objc_msgSend_660( - ffi.Pointer obj, - ffi.Pointer sel, - int unitCount, - ) { - return __objc_msgSend_660( - obj, - sel, - unitCount, - ); - } - - late final __objc_msgSend_660Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_660 = __objc_msgSend_660Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_discreteProgressWithTotalUnitCount_1 = - _registerName1("discreteProgressWithTotalUnitCount:"); - late final _sel_progressWithTotalUnitCount_parent_pendingUnitCount_1 = - _registerName1("progressWithTotalUnitCount:parent:pendingUnitCount:"); - ffi.Pointer _objc_msgSend_661( - ffi.Pointer obj, - ffi.Pointer sel, - int unitCount, - ffi.Pointer parent, - int portionOfParentTotalUnitCount, - ) { - return __objc_msgSend_661( - obj, - sel, - unitCount, - parent, - portionOfParentTotalUnitCount, - ); - } - - late final __objc_msgSend_661Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_661 = __objc_msgSend_661Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer, int)>(); - - late final _sel_initWithParent_userInfo_1 = - _registerName1("initWithParent:userInfo:"); - instancetype _objc_msgSend_662( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer parentProgressOrNil, - ffi.Pointer userInfoOrNil, - ) { - return __objc_msgSend_662( - obj, - sel, - parentProgressOrNil, - userInfoOrNil, - ); - } - - late final __objc_msgSend_662Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_662 = __objc_msgSend_662Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_becomeCurrentWithPendingUnitCount_1 = - _registerName1("becomeCurrentWithPendingUnitCount:"); - void _objc_msgSend_663( - ffi.Pointer obj, - ffi.Pointer sel, - int unitCount, - ) { - return __objc_msgSend_663( - obj, - sel, - unitCount, - ); - } - - late final __objc_msgSend_663Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_663 = __objc_msgSend_663Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_1 = - _registerName1("performAsCurrentWithPendingUnitCount:usingBlock:"); - void _objc_msgSend_664( - ffi.Pointer obj, - ffi.Pointer sel, - int unitCount, - ffi.Pointer<_ObjCBlock> work, - ) { - return __objc_msgSend_664( - obj, - sel, - unitCount, - work, - ); - } - - late final __objc_msgSend_664Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_664 = __objc_msgSend_664Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_resignCurrent1 = _registerName1("resignCurrent"); - late final _sel_addChild_withPendingUnitCount_1 = - _registerName1("addChild:withPendingUnitCount:"); - void _objc_msgSend_665( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer child, - int inUnitCount, - ) { - return __objc_msgSend_665( - obj, - sel, - child, - inUnitCount, - ); - } - - late final __objc_msgSend_665Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_665 = __objc_msgSend_665Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_totalUnitCount1 = _registerName1("totalUnitCount"); - int _objc_msgSend_666( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_666( - obj, - sel, - ); - } - - late final __objc_msgSend_666Ptr = _lookup< - ffi.NativeFunction< - ffi.Int64 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_666 = __objc_msgSend_666Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setTotalUnitCount_1 = _registerName1("setTotalUnitCount:"); - void _objc_msgSend_667( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_667( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_667Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_667 = __objc_msgSend_667Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_completedUnitCount1 = _registerName1("completedUnitCount"); - late final _sel_setCompletedUnitCount_1 = - _registerName1("setCompletedUnitCount:"); - late final _sel_setLocalizedDescription_1 = - _registerName1("setLocalizedDescription:"); - late final _sel_localizedAdditionalDescription1 = - _registerName1("localizedAdditionalDescription"); - late final _sel_setLocalizedAdditionalDescription_1 = - _registerName1("setLocalizedAdditionalDescription:"); - late final _sel_isCancellable1 = _registerName1("isCancellable"); - late final _sel_setCancellable_1 = _registerName1("setCancellable:"); - late final _sel_isPausable1 = _registerName1("isPausable"); - late final _sel_setPausable_1 = _registerName1("setPausable:"); - late final _sel_isPaused1 = _registerName1("isPaused"); - late final _sel_cancellationHandler1 = _registerName1("cancellationHandler"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_668( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_668( - obj, - sel, - ); - } - - late final __objc_msgSend_668Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_668 = __objc_msgSend_668Ptr.asFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setCancellationHandler_1 = - _registerName1("setCancellationHandler:"); - void _objc_msgSend_669( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> value, - ) { - return __objc_msgSend_669( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_669Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_669 = __objc_msgSend_669Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_pausingHandler1 = _registerName1("pausingHandler"); - late final _sel_setPausingHandler_1 = _registerName1("setPausingHandler:"); - late final _sel_resumingHandler1 = _registerName1("resumingHandler"); - late final _sel_setResumingHandler_1 = _registerName1("setResumingHandler:"); - late final _sel_setUserInfoObject_forKey_1 = - _registerName1("setUserInfoObject:forKey:"); - late final _sel_isIndeterminate1 = _registerName1("isIndeterminate"); - late final _sel_fractionCompleted1 = _registerName1("fractionCompleted"); - late final _sel_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_670( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_670( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_670Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_670 = __objc_msgSend_670Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_throughput1 = _registerName1("throughput"); - late final _sel_setThroughput_1 = _registerName1("setThroughput:"); - late final _sel_fileOperationKind1 = _registerName1("fileOperationKind"); - late final _sel_setFileOperationKind_1 = - _registerName1("setFileOperationKind:"); - late final _sel_fileURL1 = _registerName1("fileURL"); - late final _sel_setFileURL_1 = _registerName1("setFileURL:"); - void _objc_msgSend_671( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_671( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_671Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_671 = __objc_msgSend_671Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_fileTotalCount1 = _registerName1("fileTotalCount"); - late final _sel_setFileTotalCount_1 = _registerName1("setFileTotalCount:"); - late final _sel_fileCompletedCount1 = _registerName1("fileCompletedCount"); - late final _sel_setFileCompletedCount_1 = - _registerName1("setFileCompletedCount:"); - late final _sel_publish1 = _registerName1("publish"); - late final _sel_unpublish1 = _registerName1("unpublish"); - late final _sel_addSubscriberForFileURL_withPublishingHandler_1 = - _registerName1("addSubscriberForFileURL:withPublishingHandler:"); - ffi.Pointer _objc_msgSend_672( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer<_ObjCBlock> publishingHandler, - ) { - return __objc_msgSend_672( - obj, - sel, - url, - publishingHandler, - ); - } - - late final __objc_msgSend_672Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_672 = __objc_msgSend_672Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_removeSubscriber_1 = _registerName1("removeSubscriber:"); - late final _sel_isOld1 = _registerName1("isOld"); - late final _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1 = - _registerName1( - "registerDataRepresentationForTypeIdentifier:visibility:loadHandler:"); - void _objc_msgSend_673( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - int visibility, - ffi.Pointer<_ObjCBlock> loadHandler, - ) { - return __objc_msgSend_673( - obj, - sel, - typeIdentifier, - visibility, - loadHandler, - ); - } - - late final __objc_msgSend_673Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_673 = __objc_msgSend_673Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1 = - _registerName1( - "registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:"); - void _objc_msgSend_674( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - int fileOptions, - int visibility, - ffi.Pointer<_ObjCBlock> loadHandler, - ) { - return __objc_msgSend_674( - obj, - sel, - typeIdentifier, - fileOptions, - visibility, - loadHandler, - ); - } - - late final __objc_msgSend_674Ptr = _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_674 = __objc_msgSend_674Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_registeredTypeIdentifiers1 = - _registerName1("registeredTypeIdentifiers"); - late final _sel_registeredTypeIdentifiersWithFileOptions_1 = - _registerName1("registeredTypeIdentifiersWithFileOptions:"); - ffi.Pointer _objc_msgSend_675( - ffi.Pointer obj, - ffi.Pointer sel, - int fileOptions, - ) { - return __objc_msgSend_675( - obj, - sel, - fileOptions, - ); - } - - late final __objc_msgSend_675Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_675 = __objc_msgSend_675Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_hasItemConformingToTypeIdentifier_1 = - _registerName1("hasItemConformingToTypeIdentifier:"); - late final _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1 = - _registerName1( - "hasRepresentationConformingToTypeIdentifier:fileOptions:"); - bool _objc_msgSend_676( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - int fileOptions, - ) { - return __objc_msgSend_676( - obj, - sel, - typeIdentifier, - fileOptions, - ); - } - - late final __objc_msgSend_676Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_676 = __objc_msgSend_676Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_loadDataRepresentationForTypeIdentifier_completionHandler_1 = - _registerName1( - "loadDataRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_677( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_677( - obj, - sel, - typeIdentifier, - completionHandler, - ); - } - - late final __objc_msgSend_677Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_677 = __objc_msgSend_677Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_loadFileRepresentationForTypeIdentifier_completionHandler_1 = - _registerName1( - "loadFileRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_678( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_678( - obj, - sel, - typeIdentifier, - completionHandler, - ); - } - - late final __objc_msgSend_678Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_678 = __objc_msgSend_678Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1 = - _registerName1( - "loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_679( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_679( - obj, - sel, - typeIdentifier, - completionHandler, - ); - } - - late final __objc_msgSend_679Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_679 = __objc_msgSend_679Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_suggestedName1 = _registerName1("suggestedName"); - late final _sel_setSuggestedName_1 = _registerName1("setSuggestedName:"); - late final _sel_registerObject_visibility_1 = - _registerName1("registerObject:visibility:"); - void _objc_msgSend_680( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer object, - int visibility, - ) { - return __objc_msgSend_680( - obj, - sel, - object, - visibility, - ); - } - - late final __objc_msgSend_680Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_680 = __objc_msgSend_680Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_registerObjectOfClass_visibility_loadHandler_1 = - _registerName1("registerObjectOfClass:visibility:loadHandler:"); - void _objc_msgSend_681( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aClass, - int visibility, - ffi.Pointer<_ObjCBlock> loadHandler, - ) { - return __objc_msgSend_681( - obj, - sel, - aClass, - visibility, - loadHandler, - ); - } - - late final __objc_msgSend_681Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_681 = __objc_msgSend_681Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_canLoadObjectOfClass_1 = - _registerName1("canLoadObjectOfClass:"); - late final _sel_loadObjectOfClass_completionHandler_1 = - _registerName1("loadObjectOfClass:completionHandler:"); - ffi.Pointer _objc_msgSend_682( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aClass, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_682( - obj, - sel, - aClass, - completionHandler, - ); - } - - late final __objc_msgSend_682Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_682 = __objc_msgSend_682Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_initWithItem_typeIdentifier_1 = - _registerName1("initWithItem:typeIdentifier:"); - instancetype _objc_msgSend_683( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer item, - ffi.Pointer typeIdentifier, - ) { - return __objc_msgSend_683( - obj, - sel, - item, - typeIdentifier, - ); - } - - late final __objc_msgSend_683Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_683 = __objc_msgSend_683Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_registerItemForTypeIdentifier_loadHandler_1 = - _registerName1("registerItemForTypeIdentifier:loadHandler:"); - void _objc_msgSend_684( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - ffi.Pointer<_ObjCBlock> loadHandler, - ) { - return __objc_msgSend_684( - obj, - sel, - typeIdentifier, - loadHandler, - ); - } - - late final __objc_msgSend_684Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_684 = __objc_msgSend_684Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_loadItemForTypeIdentifier_options_completionHandler_1 = - _registerName1("loadItemForTypeIdentifier:options:completionHandler:"); - void _objc_msgSend_685( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - ffi.Pointer options, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_685( - obj, - sel, - typeIdentifier, - options, - completionHandler, - ); - } - - late final __objc_msgSend_685Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_685 = __objc_msgSend_685Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_previewImageHandler1 = _registerName1("previewImageHandler"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_686( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_686( - obj, - sel, - ); - } - - late final __objc_msgSend_686Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_686 = __objc_msgSend_686Ptr.asFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setPreviewImageHandler_1 = - _registerName1("setPreviewImageHandler:"); - void _objc_msgSend_687( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> value, - ) { - return __objc_msgSend_687( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_687Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_687 = __objc_msgSend_687Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_loadPreviewImageWithOptions_completionHandler_1 = - _registerName1("loadPreviewImageWithOptions:completionHandler:"); - void _objc_msgSend_688( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer options, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_688( - obj, - sel, - options, - completionHandler, - ); - } - - late final __objc_msgSend_688Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_688 = __objc_msgSend_688Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _class_NSMutableString1 = _getClass1("NSMutableString"); - late final _sel_replaceCharactersInRange_withString_1 = - _registerName1("replaceCharactersInRange:withString:"); - void _objc_msgSend_689( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer aString, - ) { - return __objc_msgSend_689( - obj, - sel, - range, - aString, - ); - } - - late final __objc_msgSend_689Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_689 = __objc_msgSend_689Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - ffi.Pointer)>(); - - late final _sel_insertString_atIndex_1 = - _registerName1("insertString:atIndex:"); - void _objc_msgSend_690( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aString, - int loc, - ) { - return __objc_msgSend_690( - obj, - sel, - aString, - loc, - ); - } - - late final __objc_msgSend_690Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_690 = __objc_msgSend_690Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_deleteCharactersInRange_1 = - _registerName1("deleteCharactersInRange:"); - late final _sel_appendString_1 = _registerName1("appendString:"); - late final _sel_appendFormat_1 = _registerName1("appendFormat:"); - late final _sel_setString_1 = _registerName1("setString:"); - late final _sel_replaceOccurrencesOfString_withString_options_range_1 = - _registerName1("replaceOccurrencesOfString:withString:options:range:"); - int _objc_msgSend_691( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer replacement, - int options, - _NSRange searchRange, - ) { - return __objc_msgSend_691( - obj, - sel, - target, - replacement, - options, - searchRange, - ); - } - - late final __objc_msgSend_691Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_691 = __objc_msgSend_691Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, _NSRange)>(); - - late final _sel_applyTransform_reverse_range_updatedRange_1 = - _registerName1("applyTransform:reverse:range:updatedRange:"); - bool _objc_msgSend_692( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer transform, - bool reverse, - _NSRange range, - ffi.Pointer<_NSRange> resultingRange, - ) { - return __objc_msgSend_692( - obj, - sel, - transform, - reverse, - range, - resultingRange, - ); - } - - late final __objc_msgSend_692Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - _NSRange, - ffi.Pointer<_NSRange>)>>('objc_msgSend'); - late final __objc_msgSend_692 = __objc_msgSend_692Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool, _NSRange, ffi.Pointer<_NSRange>)>(); - - ffi.Pointer _objc_msgSend_693( - ffi.Pointer obj, - ffi.Pointer sel, - int capacity, - ) { - return __objc_msgSend_693( - obj, - sel, - capacity, - ); - } - - late final __objc_msgSend_693Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_693 = __objc_msgSend_693Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_stringWithCapacity_1 = _registerName1("stringWithCapacity:"); - late final _class_NSNotification1 = _getClass1("NSNotification"); - late final _sel_object1 = _registerName1("object"); - late final _sel_initWithName_object_userInfo_1 = - _registerName1("initWithName:object:userInfo:"); - instancetype _objc_msgSend_694( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer object, - ffi.Pointer userInfo, - ) { - return __objc_msgSend_694( - obj, - sel, - name, - object, - userInfo, - ); - } - - late final __objc_msgSend_694Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_694 = __objc_msgSend_694Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_notificationWithName_object_1 = - _registerName1("notificationWithName:object:"); - late final _sel_notificationWithName_object_userInfo_1 = - _registerName1("notificationWithName:object:userInfo:"); - late final _class_NSBundle1 = _getClass1("NSBundle"); - late final _sel_mainBundle1 = _registerName1("mainBundle"); - ffi.Pointer _objc_msgSend_695( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_695( - obj, - sel, - ); - } - - late final __objc_msgSend_695Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_695 = __objc_msgSend_695Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_bundleWithPath_1 = _registerName1("bundleWithPath:"); - late final _sel_initWithPath_1 = _registerName1("initWithPath:"); - late final _sel_bundleWithURL_1 = _registerName1("bundleWithURL:"); - late final _sel_initWithURL_1 = _registerName1("initWithURL:"); - late final _sel_bundleForClass_1 = _registerName1("bundleForClass:"); - ffi.Pointer _objc_msgSend_696( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aClass, - ) { - return __objc_msgSend_696( - obj, - sel, - aClass, - ); - } - - late final __objc_msgSend_696Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_696 = __objc_msgSend_696Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_bundleWithIdentifier_1 = - _registerName1("bundleWithIdentifier:"); - ffi.Pointer _objc_msgSend_697( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer identifier, - ) { - return __objc_msgSend_697( - obj, - sel, - identifier, - ); - } - - late final __objc_msgSend_697Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_697 = __objc_msgSend_697Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_allBundles1 = _registerName1("allBundles"); - late final _sel_allFrameworks1 = _registerName1("allFrameworks"); - late final _sel_isLoaded1 = _registerName1("isLoaded"); - late final _sel_unload1 = _registerName1("unload"); - late final _sel_preflightAndReturnError_1 = - _registerName1("preflightAndReturnError:"); - late final _sel_loadAndReturnError_1 = _registerName1("loadAndReturnError:"); - late final _sel_bundleURL1 = _registerName1("bundleURL"); - late final _sel_resourceURL1 = _registerName1("resourceURL"); - late final _sel_executableURL1 = _registerName1("executableURL"); - late final _sel_URLForAuxiliaryExecutable_1 = - _registerName1("URLForAuxiliaryExecutable:"); - late final _sel_privateFrameworksURL1 = - _registerName1("privateFrameworksURL"); - late final _sel_sharedFrameworksURL1 = _registerName1("sharedFrameworksURL"); - late final _sel_sharedSupportURL1 = _registerName1("sharedSupportURL"); - late final _sel_builtInPlugInsURL1 = _registerName1("builtInPlugInsURL"); - late final _sel_appStoreReceiptURL1 = _registerName1("appStoreReceiptURL"); - late final _sel_bundlePath1 = _registerName1("bundlePath"); - late final _sel_resourcePath1 = _registerName1("resourcePath"); - late final _sel_executablePath1 = _registerName1("executablePath"); - late final _sel_pathForAuxiliaryExecutable_1 = - _registerName1("pathForAuxiliaryExecutable:"); - late final _sel_privateFrameworksPath1 = - _registerName1("privateFrameworksPath"); - late final _sel_sharedFrameworksPath1 = - _registerName1("sharedFrameworksPath"); - late final _sel_sharedSupportPath1 = _registerName1("sharedSupportPath"); - late final _sel_builtInPlugInsPath1 = _registerName1("builtInPlugInsPath"); - late final _sel_URLForResource_withExtension_subdirectory_inBundleWithURL_1 = - _registerName1( - "URLForResource:withExtension:subdirectory:inBundleWithURL:"); - ffi.Pointer _objc_msgSend_698( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer ext, - ffi.Pointer subpath, - ffi.Pointer bundleURL, - ) { - return __objc_msgSend_698( - obj, - sel, - name, - ext, - subpath, - bundleURL, - ); - } - - late final __objc_msgSend_698Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_698 = __objc_msgSend_698Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_URLsForResourcesWithExtension_subdirectory_inBundleWithURL_1 = - _registerName1( - "URLsForResourcesWithExtension:subdirectory:inBundleWithURL:"); - ffi.Pointer _objc_msgSend_699( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer ext, - ffi.Pointer subpath, - ffi.Pointer bundleURL, - ) { - return __objc_msgSend_699( - obj, - sel, - ext, - subpath, - bundleURL, - ); - } - - late final __objc_msgSend_699Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_699 = __objc_msgSend_699Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_URLForResource_withExtension_1 = - _registerName1("URLForResource:withExtension:"); - ffi.Pointer _objc_msgSend_700( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer ext, - ) { - return __objc_msgSend_700( - obj, - sel, - name, - ext, - ); - } - - late final __objc_msgSend_700Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_700 = __objc_msgSend_700Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_URLForResource_withExtension_subdirectory_1 = - _registerName1("URLForResource:withExtension:subdirectory:"); - ffi.Pointer _objc_msgSend_701( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer ext, - ffi.Pointer subpath, - ) { - return __objc_msgSend_701( - obj, - sel, - name, - ext, - subpath, - ); - } - - late final __objc_msgSend_701Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_701 = __objc_msgSend_701Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_URLForResource_withExtension_subdirectory_localization_1 = - _registerName1("URLForResource:withExtension:subdirectory:localization:"); - ffi.Pointer _objc_msgSend_702( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer ext, - ffi.Pointer subpath, - ffi.Pointer localizationName, - ) { - return __objc_msgSend_702( - obj, - sel, - name, - ext, - subpath, - localizationName, - ); - } - - late final __objc_msgSend_702Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_702 = __objc_msgSend_702Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_URLsForResourcesWithExtension_subdirectory_1 = - _registerName1("URLsForResourcesWithExtension:subdirectory:"); - ffi.Pointer _objc_msgSend_703( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer ext, - ffi.Pointer subpath, - ) { - return __objc_msgSend_703( - obj, - sel, - ext, - subpath, - ); - } - - late final __objc_msgSend_703Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_703 = __objc_msgSend_703Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_URLsForResourcesWithExtension_subdirectory_localization_1 = - _registerName1( - "URLsForResourcesWithExtension:subdirectory:localization:"); - ffi.Pointer _objc_msgSend_704( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer ext, - ffi.Pointer subpath, - ffi.Pointer localizationName, - ) { - return __objc_msgSend_704( - obj, - sel, - ext, - subpath, - localizationName, - ); - } - - late final __objc_msgSend_704Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_704 = __objc_msgSend_704Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_pathForResource_ofType_inDirectory_1 = - _registerName1("pathForResource:ofType:inDirectory:"); - ffi.Pointer _objc_msgSend_705( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer ext, - ffi.Pointer bundlePath, - ) { - return __objc_msgSend_705( - obj, - sel, - name, - ext, - bundlePath, - ); - } - - late final __objc_msgSend_705Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_705 = __objc_msgSend_705Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_pathsForResourcesOfType_inDirectory_1 = - _registerName1("pathsForResourcesOfType:inDirectory:"); - ffi.Pointer _objc_msgSend_706( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer ext, - ffi.Pointer bundlePath, - ) { - return __objc_msgSend_706( - obj, - sel, - ext, - bundlePath, - ); - } - - late final __objc_msgSend_706Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_706 = __objc_msgSend_706Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_pathForResource_ofType_1 = - _registerName1("pathForResource:ofType:"); - ffi.Pointer _objc_msgSend_707( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer ext, - ) { - return __objc_msgSend_707( - obj, - sel, - name, - ext, - ); - } - - late final __objc_msgSend_707Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_707 = __objc_msgSend_707Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_pathForResource_ofType_inDirectory_forLocalization_1 = - _registerName1("pathForResource:ofType:inDirectory:forLocalization:"); - ffi.Pointer _objc_msgSend_708( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer ext, - ffi.Pointer subpath, - ffi.Pointer localizationName, - ) { - return __objc_msgSend_708( - obj, - sel, - name, - ext, - subpath, - localizationName, - ); - } - - late final __objc_msgSend_708Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_708 = __objc_msgSend_708Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_pathsForResourcesOfType_inDirectory_forLocalization_1 = - _registerName1("pathsForResourcesOfType:inDirectory:forLocalization:"); - ffi.Pointer _objc_msgSend_709( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer ext, - ffi.Pointer subpath, - ffi.Pointer localizationName, - ) { - return __objc_msgSend_709( - obj, - sel, - ext, - subpath, - localizationName, - ); - } - - late final __objc_msgSend_709Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_709 = __objc_msgSend_709Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_localizedStringForKey_value_table_1 = - _registerName1("localizedStringForKey:value:table:"); - ffi.Pointer _objc_msgSend_710( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer tableName, - ) { - return __objc_msgSend_710( - obj, - sel, - key, - value, - tableName, - ); - } - - late final __objc_msgSend_710Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_710 = __objc_msgSend_710Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSAttributedString1 = _getClass1("NSAttributedString"); - late final _sel_attributesAtIndex_effectiveRange_1 = - _registerName1("attributesAtIndex:effectiveRange:"); - ffi.Pointer _objc_msgSend_711( - ffi.Pointer obj, - ffi.Pointer sel, - int location, - ffi.Pointer<_NSRange> range, - ) { - return __objc_msgSend_711( - obj, - sel, - location, - range, - ); - } - - late final __objc_msgSend_711Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_NSRange>)>>('objc_msgSend'); - late final __objc_msgSend_711 = __objc_msgSend_711Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_NSRange>)>(); - - late final _sel_attribute_atIndex_effectiveRange_1 = - _registerName1("attribute:atIndex:effectiveRange:"); - ffi.Pointer _objc_msgSend_712( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer attrName, - int location, - ffi.Pointer<_NSRange> range, - ) { - return __objc_msgSend_712( - obj, - sel, - attrName, - location, - range, - ); - } - - late final __objc_msgSend_712Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_NSRange>)>>('objc_msgSend'); - late final __objc_msgSend_712 = __objc_msgSend_712Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_NSRange>)>(); - - late final _sel_attributedSubstringFromRange_1 = - _registerName1("attributedSubstringFromRange:"); - ffi.Pointer _objc_msgSend_713( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_713( - obj, - sel, - range, - ); - } - - late final __objc_msgSend_713Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_713 = __objc_msgSend_713Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _sel_attributesAtIndex_longestEffectiveRange_inRange_1 = - _registerName1("attributesAtIndex:longestEffectiveRange:inRange:"); - ffi.Pointer _objc_msgSend_714( - ffi.Pointer obj, - ffi.Pointer sel, - int location, - ffi.Pointer<_NSRange> range, - _NSRange rangeLimit, - ) { - return __objc_msgSend_714( - obj, - sel, - location, - range, - rangeLimit, - ); - } - - late final __objc_msgSend_714Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_NSRange>, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_714 = __objc_msgSend_714Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_NSRange>, _NSRange)>(); - - late final _sel_attribute_atIndex_longestEffectiveRange_inRange_1 = - _registerName1("attribute:atIndex:longestEffectiveRange:inRange:"); - ffi.Pointer _objc_msgSend_715( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer attrName, - int location, - ffi.Pointer<_NSRange> range, - _NSRange rangeLimit, - ) { - return __objc_msgSend_715( - obj, - sel, - attrName, - location, - range, - rangeLimit, - ); - } - - late final __objc_msgSend_715Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_NSRange>, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_715 = __objc_msgSend_715Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_NSRange>, - _NSRange)>(); - - late final _sel_isEqualToAttributedString_1 = - _registerName1("isEqualToAttributedString:"); - bool _objc_msgSend_716( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - ) { - return __objc_msgSend_716( - obj, - sel, - other, - ); - } - - late final __objc_msgSend_716Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_716 = __objc_msgSend_716Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithString_attributes_1 = - _registerName1("initWithString:attributes:"); - instancetype _objc_msgSend_717( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer str, - ffi.Pointer attrs, - ) { - return __objc_msgSend_717( - obj, - sel, - str, - attrs, - ); - } - - late final __objc_msgSend_717Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_717 = __objc_msgSend_717Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithAttributedString_1 = - _registerName1("initWithAttributedString:"); - instancetype _objc_msgSend_718( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer attrStr, - ) { - return __objc_msgSend_718( - obj, - sel, - attrStr, - ); - } - - late final __objc_msgSend_718Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_718 = __objc_msgSend_718Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_enumerateAttributesInRange_options_usingBlock_1 = - _registerName1("enumerateAttributesInRange:options:usingBlock:"); - void _objc_msgSend_719( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange enumerationRange, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_719( - obj, - sel, - enumerationRange, - opts, - block, - ); - } - - late final __objc_msgSend_719Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_719 = __objc_msgSend_719Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_enumerateAttribute_inRange_options_usingBlock_1 = - _registerName1("enumerateAttribute:inRange:options:usingBlock:"); - void _objc_msgSend_720( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer attrName, - _NSRange enumerationRange, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_720( - obj, - sel, - attrName, - enumerationRange, - opts, - block, - ); - } - - late final __objc_msgSend_720Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_720 = __objc_msgSend_720Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _class_NSAttributedStringMarkdownParsingOptions1 = - _getClass1("NSAttributedStringMarkdownParsingOptions"); - late final _sel_allowsExtendedAttributes1 = - _registerName1("allowsExtendedAttributes"); - late final _sel_setAllowsExtendedAttributes_1 = - _registerName1("setAllowsExtendedAttributes:"); - late final _sel_interpretedSyntax1 = _registerName1("interpretedSyntax"); - int _objc_msgSend_721( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_721( - obj, - sel, - ); - } - - late final __objc_msgSend_721Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_721 = __objc_msgSend_721Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setInterpretedSyntax_1 = - _registerName1("setInterpretedSyntax:"); - void _objc_msgSend_722( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_722( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_722Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_722 = __objc_msgSend_722Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_failurePolicy1 = _registerName1("failurePolicy"); - int _objc_msgSend_723( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_723( - obj, - sel, - ); - } - - late final __objc_msgSend_723Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_723 = __objc_msgSend_723Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setFailurePolicy_1 = _registerName1("setFailurePolicy:"); - void _objc_msgSend_724( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_724( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_724Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_724 = __objc_msgSend_724Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_setLanguageCode_1 = _registerName1("setLanguageCode:"); - late final _sel_appliesSourcePositionAttributes1 = - _registerName1("appliesSourcePositionAttributes"); - late final _sel_setAppliesSourcePositionAttributes_1 = - _registerName1("setAppliesSourcePositionAttributes:"); - late final _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_1 = - _registerName1( - "initWithContentsOfMarkdownFileAtURL:options:baseURL:error:"); - instancetype _objc_msgSend_725( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer markdownFile, - ffi.Pointer options, - ffi.Pointer baseURL, - ffi.Pointer> error, - ) { - return __objc_msgSend_725( - obj, - sel, - markdownFile, - options, - baseURL, - error, - ); - } - - late final __objc_msgSend_725Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_725 = __objc_msgSend_725Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_initWithMarkdown_options_baseURL_error_1 = - _registerName1("initWithMarkdown:options:baseURL:error:"); - instancetype _objc_msgSend_726( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer markdown, - ffi.Pointer options, - ffi.Pointer baseURL, - ffi.Pointer> error, - ) { - return __objc_msgSend_726( - obj, - sel, - markdown, - options, - baseURL, - error, - ); - } - - late final __objc_msgSend_726Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_726 = __objc_msgSend_726Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_initWithMarkdownString_options_baseURL_error_1 = - _registerName1("initWithMarkdownString:options:baseURL:error:"); - instancetype _objc_msgSend_727( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer markdownString, - ffi.Pointer options, - ffi.Pointer baseURL, - ffi.Pointer> error, - ) { - return __objc_msgSend_727( - obj, - sel, - markdownString, - options, - baseURL, - error, - ); - } - - late final __objc_msgSend_727Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_727 = __objc_msgSend_727Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_initWithFormat_options_locale_1 = - _registerName1("initWithFormat:options:locale:"); - instancetype _objc_msgSend_728( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - int options, - ffi.Pointer locale, - ) { - return __objc_msgSend_728( - obj, - sel, - format, - options, - locale, - ); - } - - late final __objc_msgSend_728Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_728 = __objc_msgSend_728Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_initWithFormat_options_locale_arguments_1 = - _registerName1("initWithFormat:options:locale:arguments:"); - instancetype _objc_msgSend_729( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - int options, - ffi.Pointer locale, - ffi.Pointer<__va_list_tag> arguments, - ) { - return __objc_msgSend_729( - obj, - sel, - format, - options, - locale, - arguments, - ); - } - - late final __objc_msgSend_729Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>('objc_msgSend'); - late final __objc_msgSend_729 = __objc_msgSend_729Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>(); - - late final _sel_localizedAttributedStringWithFormat_1 = - _registerName1("localizedAttributedStringWithFormat:"); - late final _sel_localizedAttributedStringWithFormat_options_1 = - _registerName1("localizedAttributedStringWithFormat:options:"); - instancetype _objc_msgSend_730( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - int options, - ) { - return __objc_msgSend_730( - obj, - sel, - format, - options, - ); - } - - late final __objc_msgSend_730Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_730 = __objc_msgSend_730Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_initWithFormat_options_locale_context_1 = - _registerName1("initWithFormat:options:locale:context:"); - instancetype _objc_msgSend_731( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - int options, - ffi.Pointer locale, - ffi.Pointer context, - ) { - return __objc_msgSend_731( - obj, - sel, - format, - options, - locale, - context, - ); - } - - late final __objc_msgSend_731Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_731 = __objc_msgSend_731Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithFormat_options_locale_context_arguments_1 = - _registerName1("initWithFormat:options:locale:context:arguments:"); - instancetype _objc_msgSend_732( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - int options, - ffi.Pointer locale, - ffi.Pointer context, - ffi.Pointer<__va_list_tag> arguments, - ) { - return __objc_msgSend_732( - obj, - sel, - format, - options, - locale, - context, - arguments, - ); - } - - late final __objc_msgSend_732Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>('objc_msgSend'); - late final __objc_msgSend_732 = __objc_msgSend_732Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>(); - - late final _sel_localizedAttributedStringWithFormat_context_1 = - _registerName1("localizedAttributedStringWithFormat:context:"); - instancetype _objc_msgSend_733( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer context, - ) { - return __objc_msgSend_733( - obj, - sel, - format, - context, - ); - } - - late final __objc_msgSend_733Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_733 = __objc_msgSend_733Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_localizedAttributedStringWithFormat_options_context_1 = - _registerName1("localizedAttributedStringWithFormat:options:context:"); - instancetype _objc_msgSend_734( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - int options, - ffi.Pointer context, - ) { - return __objc_msgSend_734( - obj, - sel, - format, - options, - context, - ); - } - - late final __objc_msgSend_734Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_734 = __objc_msgSend_734Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_attributedStringByInflectingString1 = - _registerName1("attributedStringByInflectingString"); - ffi.Pointer _objc_msgSend_735( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_735( - obj, - sel, - ); - } - - late final __objc_msgSend_735Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_735 = __objc_msgSend_735Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_localizedAttributedStringForKey_value_table_1 = - _registerName1("localizedAttributedStringForKey:value:table:"); - ffi.Pointer _objc_msgSend_736( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer tableName, - ) { - return __objc_msgSend_736( - obj, - sel, - key, - value, - tableName, - ); - } - - late final __objc_msgSend_736Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_736 = __objc_msgSend_736Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_bundleIdentifier1 = _registerName1("bundleIdentifier"); - late final _sel_infoDictionary1 = _registerName1("infoDictionary"); - late final _sel_localizedInfoDictionary1 = - _registerName1("localizedInfoDictionary"); - late final _sel_objectForInfoDictionaryKey_1 = - _registerName1("objectForInfoDictionaryKey:"); - late final _sel_classNamed_1 = _registerName1("classNamed:"); - late final _sel_principalClass1 = _registerName1("principalClass"); - late final _sel_preferredLocalizations1 = - _registerName1("preferredLocalizations"); - late final _sel_localizations1 = _registerName1("localizations"); - late final _sel_developmentLocalization1 = - _registerName1("developmentLocalization"); - late final _sel_preferredLocalizationsFromArray_1 = - _registerName1("preferredLocalizationsFromArray:"); - late final _sel_preferredLocalizationsFromArray_forPreferences_1 = - _registerName1("preferredLocalizationsFromArray:forPreferences:"); - ffi.Pointer _objc_msgSend_737( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer localizationsArray, - ffi.Pointer preferencesArray, - ) { - return __objc_msgSend_737( - obj, - sel, - localizationsArray, - preferencesArray, - ); - } - - late final __objc_msgSend_737Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_737 = __objc_msgSend_737Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_executableArchitectures1 = - _registerName1("executableArchitectures"); - late final _sel_setPreservationPriority_forTags_1 = - _registerName1("setPreservationPriority:forTags:"); - void _objc_msgSend_738( - ffi.Pointer obj, - ffi.Pointer sel, - double priority, - ffi.Pointer tags, - ) { - return __objc_msgSend_738( - obj, - sel, - priority, - tags, - ); - } - - late final __objc_msgSend_738Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Double, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_738 = __objc_msgSend_738Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double, - ffi.Pointer)>(); - - late final _sel_preservationPriorityForTag_1 = - _registerName1("preservationPriorityForTag:"); - late final _class_NSMutableAttributedString1 = - _getClass1("NSMutableAttributedString"); - late final _sel_setAttributes_range_1 = - _registerName1("setAttributes:range:"); - void _objc_msgSend_739( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer attrs, - _NSRange range, - ) { - return __objc_msgSend_739( - obj, - sel, - attrs, - range, - ); - } - - late final __objc_msgSend_739Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_739 = __objc_msgSend_739Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>(); - - late final _sel_mutableString1 = _registerName1("mutableString"); - ffi.Pointer _objc_msgSend_740( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_740( - obj, - sel, - ); - } - - late final __objc_msgSend_740Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_740 = __objc_msgSend_740Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_addAttribute_value_range_1 = - _registerName1("addAttribute:value:range:"); - void _objc_msgSend_741( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer value, - _NSRange range, - ) { - return __objc_msgSend_741( - obj, - sel, - name, - value, - range, - ); - } - - late final __objc_msgSend_741Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_741 = __objc_msgSend_741Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _sel_addAttributes_range_1 = - _registerName1("addAttributes:range:"); - void _objc_msgSend_742( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer attrs, - _NSRange range, - ) { - return __objc_msgSend_742( - obj, - sel, - attrs, - range, - ); - } - - late final __objc_msgSend_742Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_742 = __objc_msgSend_742Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>(); - - late final _sel_removeAttribute_range_1 = - _registerName1("removeAttribute:range:"); - void _objc_msgSend_743( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - _NSRange range, - ) { - return __objc_msgSend_743( - obj, - sel, - name, - range, - ); - } - - late final __objc_msgSend_743Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_743 = __objc_msgSend_743Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>(); - - late final _sel_replaceCharactersInRange_withAttributedString_1 = - _registerName1("replaceCharactersInRange:withAttributedString:"); - void _objc_msgSend_744( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer attrString, - ) { - return __objc_msgSend_744( - obj, - sel, - range, - attrString, - ); - } - - late final __objc_msgSend_744Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_744 = __objc_msgSend_744Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, _NSRange, - ffi.Pointer)>(); - - late final _sel_insertAttributedString_atIndex_1 = - _registerName1("insertAttributedString:atIndex:"); - void _objc_msgSend_745( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer attrString, - int loc, - ) { - return __objc_msgSend_745( - obj, - sel, - attrString, - loc, - ); - } - - late final __objc_msgSend_745Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_745 = __objc_msgSend_745Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_appendAttributedString_1 = - _registerName1("appendAttributedString:"); - void _objc_msgSend_746( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer attrString, - ) { - return __objc_msgSend_746( - obj, - sel, - attrString, - ); - } - - late final __objc_msgSend_746Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_746 = __objc_msgSend_746Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_setAttributedString_1 = - _registerName1("setAttributedString:"); - late final _sel_beginEditing1 = _registerName1("beginEditing"); - late final _sel_endEditing1 = _registerName1("endEditing"); - late final _sel_appendLocalizedFormat_1 = - _registerName1("appendLocalizedFormat:"); - late final _class_NSDateFormatter1 = _getClass1("NSDateFormatter"); - late final _class_NSFormatter1 = _getClass1("NSFormatter"); - late final _sel_stringForObjectValue_1 = - _registerName1("stringForObjectValue:"); - ffi.Pointer _objc_msgSend_747( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer obj1, - ) { - return __objc_msgSend_747( - obj, - sel, - obj1, - ); - } - - late final __objc_msgSend_747Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_747 = __objc_msgSend_747Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_attributedStringForObjectValue_withDefaultAttributes_1 = - _registerName1("attributedStringForObjectValue:withDefaultAttributes:"); - ffi.Pointer _objc_msgSend_748( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer obj1, - ffi.Pointer attrs, - ) { - return __objc_msgSend_748( - obj, - sel, - obj1, - attrs, - ); - } - - late final __objc_msgSend_748Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_748 = __objc_msgSend_748Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_editingStringForObjectValue_1 = - _registerName1("editingStringForObjectValue:"); - late final _sel_getObjectValue_forString_errorDescription_1 = - _registerName1("getObjectValue:forString:errorDescription:"); - bool _objc_msgSend_749( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> obj1, - ffi.Pointer string, - ffi.Pointer> error, - ) { - return __objc_msgSend_749( - obj, - sel, - obj1, - string, - error, - ); - } - - late final __objc_msgSend_749Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_749 = __objc_msgSend_749Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_isPartialStringValid_newEditingString_errorDescription_1 = - _registerName1("isPartialStringValid:newEditingString:errorDescription:"); - bool _objc_msgSend_750( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer partialString, - ffi.Pointer> newString, - ffi.Pointer> error, - ) { - return __objc_msgSend_750( - obj, - sel, - partialString, - newString, - error, - ); - } - - late final __objc_msgSend_750Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_750 = __objc_msgSend_750Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _sel_isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_1 = - _registerName1( - "isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription:"); - bool _objc_msgSend_751( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> partialStringPtr, - ffi.Pointer<_NSRange> proposedSelRangePtr, - ffi.Pointer origString, - _NSRange origSelRange, - ffi.Pointer> error, - ) { - return __objc_msgSend_751( - obj, - sel, - partialStringPtr, - proposedSelRangePtr, - origString, - origSelRange, - error, - ); - } - - late final __objc_msgSend_751Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer<_NSRange>, - ffi.Pointer, - _NSRange, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_751 = __objc_msgSend_751Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer<_NSRange>, - ffi.Pointer, - _NSRange, - ffi.Pointer>)>(); - - late final _sel_formattingContext1 = _registerName1("formattingContext"); - int _objc_msgSend_752( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_752( - obj, - sel, - ); - } - - late final __objc_msgSend_752Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_752 = __objc_msgSend_752Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setFormattingContext_1 = - _registerName1("setFormattingContext:"); - void _objc_msgSend_753( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_753( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_753Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_753 = __objc_msgSend_753Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_getObjectValue_forString_range_error_1 = - _registerName1("getObjectValue:forString:range:error:"); - bool _objc_msgSend_754( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> obj1, - ffi.Pointer string, - ffi.Pointer<_NSRange> rangep, - ffi.Pointer> error, - ) { - return __objc_msgSend_754( - obj, - sel, - obj1, - string, - rangep, - error, - ); - } - - late final __objc_msgSend_754Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer<_NSRange>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_754 = __objc_msgSend_754Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer<_NSRange>, - ffi.Pointer>)>(); - - late final _sel_stringFromDate_1 = _registerName1("stringFromDate:"); - ffi.Pointer _objc_msgSend_755( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, - ) { - return __objc_msgSend_755( - obj, - sel, - date, - ); - } - - late final __objc_msgSend_755Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_755 = __objc_msgSend_755Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_dateFromString_1 = _registerName1("dateFromString:"); - late final _sel_localizedStringFromDate_dateStyle_timeStyle_1 = - _registerName1("localizedStringFromDate:dateStyle:timeStyle:"); - ffi.Pointer _objc_msgSend_756( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, - int dstyle, - int tstyle, - ) { - return __objc_msgSend_756( - obj, - sel, - date, - dstyle, - tstyle, - ); - } - - late final __objc_msgSend_756Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_756 = __objc_msgSend_756Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, int)>(); - - late final _sel_dateFormatFromTemplate_options_locale_1 = - _registerName1("dateFormatFromTemplate:options:locale:"); - ffi.Pointer _objc_msgSend_757( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer tmplate, - int opts, - ffi.Pointer locale, - ) { - return __objc_msgSend_757( - obj, - sel, - tmplate, - opts, - locale, - ); - } - - late final __objc_msgSend_757Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_757 = __objc_msgSend_757Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - late final _sel_defaultFormatterBehavior1 = - _registerName1("defaultFormatterBehavior"); - int _objc_msgSend_758( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_758( - obj, - sel, - ); - } - - late final __objc_msgSend_758Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_758 = __objc_msgSend_758Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setDefaultFormatterBehavior_1 = - _registerName1("setDefaultFormatterBehavior:"); - void _objc_msgSend_759( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_759( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_759Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_759 = __objc_msgSend_759Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_setLocalizedDateFormatFromTemplate_1 = - _registerName1("setLocalizedDateFormatFromTemplate:"); - late final _sel_dateFormat1 = _registerName1("dateFormat"); - late final _sel_setDateFormat_1 = _registerName1("setDateFormat:"); - late final _sel_dateStyle1 = _registerName1("dateStyle"); - int _objc_msgSend_760( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_760( - obj, - sel, - ); - } - - late final __objc_msgSend_760Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_760 = __objc_msgSend_760Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setDateStyle_1 = _registerName1("setDateStyle:"); - void _objc_msgSend_761( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_761( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_761Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_761 = __objc_msgSend_761Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_timeStyle1 = _registerName1("timeStyle"); - late final _sel_setTimeStyle_1 = _registerName1("setTimeStyle:"); - late final _sel_locale1 = _registerName1("locale"); - late final _sel_setLocale_1 = _registerName1("setLocale:"); - void _objc_msgSend_762( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_762( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_762Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_762 = __objc_msgSend_762Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_generatesCalendarDates1 = - _registerName1("generatesCalendarDates"); - late final _sel_setGeneratesCalendarDates_1 = - _registerName1("setGeneratesCalendarDates:"); - late final _sel_formatterBehavior1 = _registerName1("formatterBehavior"); - late final _sel_setFormatterBehavior_1 = - _registerName1("setFormatterBehavior:"); - late final _class_NSCalendar1 = _getClass1("NSCalendar"); - late final _sel_currentCalendar1 = _registerName1("currentCalendar"); - ffi.Pointer _objc_msgSend_763( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_763( - obj, - sel, - ); - } - - late final __objc_msgSend_763Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_763 = __objc_msgSend_763Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_autoupdatingCurrentCalendar1 = - _registerName1("autoupdatingCurrentCalendar"); - late final _sel_calendarWithIdentifier_1 = - _registerName1("calendarWithIdentifier:"); - ffi.Pointer _objc_msgSend_764( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer calendarIdentifierConstant, - ) { - return __objc_msgSend_764( - obj, - sel, - calendarIdentifierConstant, - ); - } - - late final __objc_msgSend_764Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_764 = __objc_msgSend_764Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithCalendarIdentifier_1 = - _registerName1("initWithCalendarIdentifier:"); - ffi.Pointer _objc_msgSend_765( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_765( - obj, - sel, - ); - } - - late final __objc_msgSend_765Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_765 = __objc_msgSend_765Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - void _objc_msgSend_766( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_766( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_766Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_766 = __objc_msgSend_766Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_firstWeekday1 = _registerName1("firstWeekday"); - late final _sel_setFirstWeekday_1 = _registerName1("setFirstWeekday:"); - late final _sel_minimumDaysInFirstWeek1 = - _registerName1("minimumDaysInFirstWeek"); - late final _sel_setMinimumDaysInFirstWeek_1 = - _registerName1("setMinimumDaysInFirstWeek:"); - late final _sel_eraSymbols1 = _registerName1("eraSymbols"); - late final _sel_longEraSymbols1 = _registerName1("longEraSymbols"); - late final _sel_monthSymbols1 = _registerName1("monthSymbols"); - late final _sel_shortMonthSymbols1 = _registerName1("shortMonthSymbols"); - late final _sel_veryShortMonthSymbols1 = - _registerName1("veryShortMonthSymbols"); - late final _sel_standaloneMonthSymbols1 = - _registerName1("standaloneMonthSymbols"); - late final _sel_shortStandaloneMonthSymbols1 = - _registerName1("shortStandaloneMonthSymbols"); - late final _sel_veryShortStandaloneMonthSymbols1 = - _registerName1("veryShortStandaloneMonthSymbols"); - late final _sel_weekdaySymbols1 = _registerName1("weekdaySymbols"); - late final _sel_shortWeekdaySymbols1 = _registerName1("shortWeekdaySymbols"); - late final _sel_veryShortWeekdaySymbols1 = - _registerName1("veryShortWeekdaySymbols"); - late final _sel_standaloneWeekdaySymbols1 = - _registerName1("standaloneWeekdaySymbols"); - late final _sel_shortStandaloneWeekdaySymbols1 = - _registerName1("shortStandaloneWeekdaySymbols"); - late final _sel_veryShortStandaloneWeekdaySymbols1 = - _registerName1("veryShortStandaloneWeekdaySymbols"); - late final _sel_quarterSymbols1 = _registerName1("quarterSymbols"); - late final _sel_shortQuarterSymbols1 = _registerName1("shortQuarterSymbols"); - late final _sel_standaloneQuarterSymbols1 = - _registerName1("standaloneQuarterSymbols"); - late final _sel_shortStandaloneQuarterSymbols1 = - _registerName1("shortStandaloneQuarterSymbols"); - late final _sel_AMSymbol1 = _registerName1("AMSymbol"); - late final _sel_PMSymbol1 = _registerName1("PMSymbol"); - late final _sel_minimumRangeOfUnit_1 = _registerName1("minimumRangeOfUnit:"); - _NSRange _objc_msgSend_767( - ffi.Pointer obj, - ffi.Pointer sel, - int unit, - ) { - return __objc_msgSend_767( - obj, - sel, - unit, - ); - } - - late final __objc_msgSend_767Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_767 = __objc_msgSend_767Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, int)>(); - - void _objc_msgSend_767_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - int unit, - ) { - return __objc_msgSend_767_stret( - stret, - obj, - sel, - unit, - ); - } - - late final __objc_msgSend_767_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend_stret'); - late final __objc_msgSend_767_stret = __objc_msgSend_767_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_maximumRangeOfUnit_1 = _registerName1("maximumRangeOfUnit:"); - late final _sel_rangeOfUnit_inUnit_forDate_1 = - _registerName1("rangeOfUnit:inUnit:forDate:"); - _NSRange _objc_msgSend_768( - ffi.Pointer obj, - ffi.Pointer sel, - int smaller, - int larger, - ffi.Pointer date, - ) { - return __objc_msgSend_768( - obj, - sel, - smaller, - larger, - date, - ); - } - - late final __objc_msgSend_768Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Int32, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_768 = __objc_msgSend_768Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, int, int, - ffi.Pointer)>(); - - void _objc_msgSend_768_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - int smaller, - int larger, - ffi.Pointer date, - ) { - return __objc_msgSend_768_stret( - stret, - obj, - sel, - smaller, - larger, - date, - ); - } - - late final __objc_msgSend_768_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_768_stret = __objc_msgSend_768_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer)>(); - - late final _sel_ordinalityOfUnit_inUnit_forDate_1 = - _registerName1("ordinalityOfUnit:inUnit:forDate:"); - int _objc_msgSend_769( - ffi.Pointer obj, - ffi.Pointer sel, - int smaller, - int larger, - ffi.Pointer date, - ) { - return __objc_msgSend_769( - obj, - sel, - smaller, - larger, - date, - ); - } - - late final __objc_msgSend_769Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_769 = __objc_msgSend_769Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, int, - ffi.Pointer)>(); - - late final _sel_rangeOfUnit_startDate_interval_forDate_1 = - _registerName1("rangeOfUnit:startDate:interval:forDate:"); - bool _objc_msgSend_770( - ffi.Pointer obj, - ffi.Pointer sel, - int unit, - ffi.Pointer> datep, - ffi.Pointer tip, - ffi.Pointer date, - ) { - return __objc_msgSend_770( - obj, - sel, - unit, - datep, - tip, - date, - ); - } - - late final __objc_msgSend_770Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_770 = __objc_msgSend_770Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSDateComponents1 = _getClass1("NSDateComponents"); - late final _sel_calendar1 = _registerName1("calendar"); - ffi.Pointer _objc_msgSend_771( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_771( - obj, - sel, - ); - } - - late final __objc_msgSend_771Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_771 = __objc_msgSend_771Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setCalendar_1 = _registerName1("setCalendar:"); - void _objc_msgSend_772( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_772( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_772Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_772 = __objc_msgSend_772Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - ffi.Pointer _objc_msgSend_773( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_773( - obj, - sel, - ); - } - - late final __objc_msgSend_773Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_773 = __objc_msgSend_773Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - void _objc_msgSend_774( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_774( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_774Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_774 = __objc_msgSend_774Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_era1 = _registerName1("era"); - late final _sel_setEra_1 = _registerName1("setEra:"); - late final _sel_year1 = _registerName1("year"); - late final _sel_setYear_1 = _registerName1("setYear:"); - late final _sel_month1 = _registerName1("month"); - late final _sel_setMonth_1 = _registerName1("setMonth:"); - late final _sel_day1 = _registerName1("day"); - late final _sel_setDay_1 = _registerName1("setDay:"); - late final _sel_hour1 = _registerName1("hour"); - late final _sel_setHour_1 = _registerName1("setHour:"); - late final _sel_minute1 = _registerName1("minute"); - late final _sel_setMinute_1 = _registerName1("setMinute:"); - late final _sel_second1 = _registerName1("second"); - late final _sel_setSecond_1 = _registerName1("setSecond:"); - late final _sel_nanosecond1 = _registerName1("nanosecond"); - late final _sel_setNanosecond_1 = _registerName1("setNanosecond:"); - late final _sel_weekday1 = _registerName1("weekday"); - late final _sel_setWeekday_1 = _registerName1("setWeekday:"); - late final _sel_weekdayOrdinal1 = _registerName1("weekdayOrdinal"); - late final _sel_setWeekdayOrdinal_1 = _registerName1("setWeekdayOrdinal:"); - late final _sel_quarter1 = _registerName1("quarter"); - late final _sel_setQuarter_1 = _registerName1("setQuarter:"); - late final _sel_weekOfMonth1 = _registerName1("weekOfMonth"); - late final _sel_setWeekOfMonth_1 = _registerName1("setWeekOfMonth:"); - late final _sel_weekOfYear1 = _registerName1("weekOfYear"); - late final _sel_setWeekOfYear_1 = _registerName1("setWeekOfYear:"); - late final _sel_yearForWeekOfYear1 = _registerName1("yearForWeekOfYear"); - late final _sel_setYearForWeekOfYear_1 = - _registerName1("setYearForWeekOfYear:"); - late final _sel_isLeapMonth1 = _registerName1("isLeapMonth"); - late final _sel_setLeapMonth_1 = _registerName1("setLeapMonth:"); - late final _sel_week1 = _registerName1("week"); - late final _sel_setWeek_1 = _registerName1("setWeek:"); - late final _sel_setValue_forComponent_1 = - _registerName1("setValue:forComponent:"); - void _objc_msgSend_775( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - int unit, - ) { - return __objc_msgSend_775( - obj, - sel, - value, - unit, - ); - } - - late final __objc_msgSend_775Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Long, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_775 = __objc_msgSend_775Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, int)>(); - - late final _sel_valueForComponent_1 = _registerName1("valueForComponent:"); - int _objc_msgSend_776( - ffi.Pointer obj, - ffi.Pointer sel, - int unit, - ) { - return __objc_msgSend_776( - obj, - sel, - unit, - ); - } - - late final __objc_msgSend_776Ptr = _lookup< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_776 = __objc_msgSend_776Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_isValidDate1 = _registerName1("isValidDate"); - late final _sel_isValidDateInCalendar_1 = - _registerName1("isValidDateInCalendar:"); - bool _objc_msgSend_777( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer calendar, - ) { - return __objc_msgSend_777( - obj, - sel, - calendar, - ); - } - - late final __objc_msgSend_777Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_777 = __objc_msgSend_777Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_dateFromComponents_1 = _registerName1("dateFromComponents:"); - ffi.Pointer _objc_msgSend_778( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer comps, - ) { - return __objc_msgSend_778( - obj, - sel, - comps, - ); - } - - late final __objc_msgSend_778Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_778 = __objc_msgSend_778Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_components_fromDate_1 = - _registerName1("components:fromDate:"); - ffi.Pointer _objc_msgSend_779( - ffi.Pointer obj, - ffi.Pointer sel, - int unitFlags, - ffi.Pointer date, - ) { - return __objc_msgSend_779( - obj, - sel, - unitFlags, - date, - ); - } - - late final __objc_msgSend_779Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_779 = __objc_msgSend_779Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_dateByAddingComponents_toDate_options_1 = - _registerName1("dateByAddingComponents:toDate:options:"); - ffi.Pointer _objc_msgSend_780( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer comps, - ffi.Pointer date, - int opts, - ) { - return __objc_msgSend_780( - obj, - sel, - comps, - date, - opts, - ); - } - - late final __objc_msgSend_780Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_780 = __objc_msgSend_780Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); - - late final _sel_components_fromDate_toDate_options_1 = - _registerName1("components:fromDate:toDate:options:"); - ffi.Pointer _objc_msgSend_781( - ffi.Pointer obj, - ffi.Pointer sel, - int unitFlags, - ffi.Pointer startingDate, - ffi.Pointer resultDate, - int opts, - ) { - return __objc_msgSend_781( - obj, - sel, - unitFlags, - startingDate, - resultDate, - opts, - ); - } - - late final __objc_msgSend_781Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_781 = __objc_msgSend_781Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - int)>(); - - late final _sel_getEra_year_month_day_fromDate_1 = - _registerName1("getEra:year:month:day:fromDate:"); - void _objc_msgSend_782( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer eraValuePointer, - ffi.Pointer yearValuePointer, - ffi.Pointer monthValuePointer, - ffi.Pointer dayValuePointer, - ffi.Pointer date, - ) { - return __objc_msgSend_782( - obj, - sel, - eraValuePointer, - yearValuePointer, - monthValuePointer, - dayValuePointer, - date, - ); - } - - late final __objc_msgSend_782Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_782 = __objc_msgSend_782Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_1 = - _registerName1("getEra:yearForWeekOfYear:weekOfYear:weekday:fromDate:"); - late final _sel_getHour_minute_second_nanosecond_fromDate_1 = - _registerName1("getHour:minute:second:nanosecond:fromDate:"); - late final _sel_component_fromDate_1 = _registerName1("component:fromDate:"); - int _objc_msgSend_783( - ffi.Pointer obj, - ffi.Pointer sel, - int unit, - ffi.Pointer date, - ) { - return __objc_msgSend_783( - obj, - sel, - unit, - date, - ); - } - - late final __objc_msgSend_783Ptr = _lookup< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_783 = __objc_msgSend_783Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _sel_dateWithEra_year_month_day_hour_minute_second_nanosecond_1 = - _registerName1( - "dateWithEra:year:month:day:hour:minute:second:nanosecond:"); - ffi.Pointer _objc_msgSend_784( - ffi.Pointer obj, - ffi.Pointer sel, - int eraValue, - int yearValue, - int monthValue, - int dayValue, - int hourValue, - int minuteValue, - int secondValue, - int nanosecondValue, - ) { - return __objc_msgSend_784( - obj, - sel, - eraValue, - yearValue, - monthValue, - dayValue, - hourValue, - minuteValue, - secondValue, - nanosecondValue, - ); - } - - late final __objc_msgSend_784Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_784 = __objc_msgSend_784Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, int, int, int, int, int, int, int)>(); - - late final _sel_dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_1 = - _registerName1( - "dateWithEra:yearForWeekOfYear:weekOfYear:weekday:hour:minute:second:nanosecond:"); - late final _sel_startOfDayForDate_1 = _registerName1("startOfDayForDate:"); - late final _sel_componentsInTimeZone_fromDate_1 = - _registerName1("componentsInTimeZone:fromDate:"); - ffi.Pointer _objc_msgSend_785( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer timezone, - ffi.Pointer date, - ) { - return __objc_msgSend_785( - obj, - sel, - timezone, - date, - ); - } - - late final __objc_msgSend_785Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_785 = __objc_msgSend_785Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_compareDate_toDate_toUnitGranularity_1 = - _registerName1("compareDate:toDate:toUnitGranularity:"); - int _objc_msgSend_786( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date1, - ffi.Pointer date2, - int unit, - ) { - return __objc_msgSend_786( - obj, - sel, - date1, - date2, - unit, - ); - } - - late final __objc_msgSend_786Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_786 = __objc_msgSend_786Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_isDate_equalToDate_toUnitGranularity_1 = - _registerName1("isDate:equalToDate:toUnitGranularity:"); - bool _objc_msgSend_787( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date1, - ffi.Pointer date2, - int unit, - ) { - return __objc_msgSend_787( - obj, - sel, - date1, - date2, - unit, - ); - } - - late final __objc_msgSend_787Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_787 = __objc_msgSend_787Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_isDate_inSameDayAsDate_1 = - _registerName1("isDate:inSameDayAsDate:"); - bool _objc_msgSend_788( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date1, - ffi.Pointer date2, - ) { - return __objc_msgSend_788( - obj, - sel, - date1, - date2, - ); - } - - late final __objc_msgSend_788Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_788 = __objc_msgSend_788Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_isDateInToday_1 = _registerName1("isDateInToday:"); - late final _sel_isDateInYesterday_1 = _registerName1("isDateInYesterday:"); - late final _sel_isDateInTomorrow_1 = _registerName1("isDateInTomorrow:"); - late final _sel_isDateInWeekend_1 = _registerName1("isDateInWeekend:"); - late final _sel_rangeOfWeekendStartDate_interval_containingDate_1 = - _registerName1("rangeOfWeekendStartDate:interval:containingDate:"); - bool _objc_msgSend_789( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> datep, - ffi.Pointer tip, - ffi.Pointer date, - ) { - return __objc_msgSend_789( - obj, - sel, - datep, - tip, - date, - ); - } - - late final __objc_msgSend_789Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_789 = __objc_msgSend_789Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_nextWeekendStartDate_interval_options_afterDate_1 = - _registerName1("nextWeekendStartDate:interval:options:afterDate:"); - bool _objc_msgSend_790( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> datep, - ffi.Pointer tip, - int options, - ffi.Pointer date, - ) { - return __objc_msgSend_790( - obj, - sel, - datep, - tip, - options, - date, - ); - } - - late final __objc_msgSend_790Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_790 = __objc_msgSend_790Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - int, - ffi.Pointer)>(); - - late final _sel_components_fromDateComponents_toDateComponents_options_1 = - _registerName1("components:fromDateComponents:toDateComponents:options:"); - ffi.Pointer _objc_msgSend_791( - ffi.Pointer obj, - ffi.Pointer sel, - int unitFlags, - ffi.Pointer startingDateComp, - ffi.Pointer resultDateComp, - int options, - ) { - return __objc_msgSend_791( - obj, - sel, - unitFlags, - startingDateComp, - resultDateComp, - options, - ); - } - - late final __objc_msgSend_791Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_791 = __objc_msgSend_791Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - int)>(); - - late final _sel_dateByAddingUnit_value_toDate_options_1 = - _registerName1("dateByAddingUnit:value:toDate:options:"); - ffi.Pointer _objc_msgSend_792( - ffi.Pointer obj, - ffi.Pointer sel, - int unit, - int value, - ffi.Pointer date, - int options, - ) { - return __objc_msgSend_792( - obj, - sel, - unit, - value, - date, - options, - ); - } - - late final __objc_msgSend_792Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Long, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_792 = __objc_msgSend_792Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer, int)>(); - - late final _sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_1 = - _registerName1( - "enumerateDatesStartingAfterDate:matchingComponents:options:usingBlock:"); - void _objc_msgSend_793( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer start, - ffi.Pointer comps, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_793( - obj, - sel, - start, - comps, - opts, - block, - ); - } - - late final __objc_msgSend_793Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_793 = __objc_msgSend_793Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_nextDateAfterDate_matchingComponents_options_1 = - _registerName1("nextDateAfterDate:matchingComponents:options:"); - ffi.Pointer _objc_msgSend_794( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, - ffi.Pointer comps, - int options, - ) { - return __objc_msgSend_794( - obj, - sel, - date, - comps, - options, - ); - } - - late final __objc_msgSend_794Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_794 = __objc_msgSend_794Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); - - late final _sel_nextDateAfterDate_matchingUnit_value_options_1 = - _registerName1("nextDateAfterDate:matchingUnit:value:options:"); - ffi.Pointer _objc_msgSend_795( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, - int unit, - int value, - int options, - ) { - return __objc_msgSend_795( - obj, - sel, - date, - unit, - value, - options, - ); - } - - late final __objc_msgSend_795Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Long, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_795 = __objc_msgSend_795Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, int, int)>(); - - late final _sel_nextDateAfterDate_matchingHour_minute_second_options_1 = - _registerName1("nextDateAfterDate:matchingHour:minute:second:options:"); - ffi.Pointer _objc_msgSend_796( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, - int hourValue, - int minuteValue, - int secondValue, - int options, - ) { - return __objc_msgSend_796( - obj, - sel, - date, - hourValue, - minuteValue, - secondValue, - options, - ); - } - - late final __objc_msgSend_796Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_796 = __objc_msgSend_796Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, int, int, int)>(); - - late final _sel_dateBySettingUnit_value_ofDate_options_1 = - _registerName1("dateBySettingUnit:value:ofDate:options:"); - late final _sel_dateBySettingHour_minute_second_ofDate_options_1 = - _registerName1("dateBySettingHour:minute:second:ofDate:options:"); - ffi.Pointer _objc_msgSend_797( - ffi.Pointer obj, - ffi.Pointer sel, - int h, - int m, - int s, - ffi.Pointer date, - int opts, - ) { - return __objc_msgSend_797( - obj, - sel, - h, - m, - s, - date, - opts, - ); - } - - late final __objc_msgSend_797Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_797 = __objc_msgSend_797Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, int, int, ffi.Pointer, int)>(); - - late final _sel_date_matchesComponents_1 = - _registerName1("date:matchesComponents:"); - bool _objc_msgSend_798( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, - ffi.Pointer components, - ) { - return __objc_msgSend_798( - obj, - sel, - date, - components, - ); - } - - late final __objc_msgSend_798Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_798 = __objc_msgSend_798Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - void _objc_msgSend_799( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_799( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_799Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_799 = __objc_msgSend_799Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_isLenient1 = _registerName1("isLenient"); - late final _sel_setLenient_1 = _registerName1("setLenient:"); - late final _sel_twoDigitStartDate1 = _registerName1("twoDigitStartDate"); - late final _sel_setTwoDigitStartDate_1 = - _registerName1("setTwoDigitStartDate:"); - void _objc_msgSend_800( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_800( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_800Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_800 = __objc_msgSend_800Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_defaultDate1 = _registerName1("defaultDate"); - late final _sel_setDefaultDate_1 = _registerName1("setDefaultDate:"); - late final _sel_setEraSymbols_1 = _registerName1("setEraSymbols:"); - void _objc_msgSend_801( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_801( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_801Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_801 = __objc_msgSend_801Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_setMonthSymbols_1 = _registerName1("setMonthSymbols:"); - late final _sel_setShortMonthSymbols_1 = - _registerName1("setShortMonthSymbols:"); - late final _sel_setWeekdaySymbols_1 = _registerName1("setWeekdaySymbols:"); - late final _sel_setShortWeekdaySymbols_1 = - _registerName1("setShortWeekdaySymbols:"); - late final _sel_setAMSymbol_1 = _registerName1("setAMSymbol:"); - late final _sel_setPMSymbol_1 = _registerName1("setPMSymbol:"); - late final _sel_setLongEraSymbols_1 = _registerName1("setLongEraSymbols:"); - late final _sel_setVeryShortMonthSymbols_1 = - _registerName1("setVeryShortMonthSymbols:"); - late final _sel_setStandaloneMonthSymbols_1 = - _registerName1("setStandaloneMonthSymbols:"); - late final _sel_setShortStandaloneMonthSymbols_1 = - _registerName1("setShortStandaloneMonthSymbols:"); - late final _sel_setVeryShortStandaloneMonthSymbols_1 = - _registerName1("setVeryShortStandaloneMonthSymbols:"); - late final _sel_setVeryShortWeekdaySymbols_1 = - _registerName1("setVeryShortWeekdaySymbols:"); - late final _sel_setStandaloneWeekdaySymbols_1 = - _registerName1("setStandaloneWeekdaySymbols:"); - late final _sel_setShortStandaloneWeekdaySymbols_1 = - _registerName1("setShortStandaloneWeekdaySymbols:"); - late final _sel_setVeryShortStandaloneWeekdaySymbols_1 = - _registerName1("setVeryShortStandaloneWeekdaySymbols:"); - late final _sel_setQuarterSymbols_1 = _registerName1("setQuarterSymbols:"); - late final _sel_setShortQuarterSymbols_1 = - _registerName1("setShortQuarterSymbols:"); - late final _sel_setStandaloneQuarterSymbols_1 = - _registerName1("setStandaloneQuarterSymbols:"); - late final _sel_setShortStandaloneQuarterSymbols_1 = - _registerName1("setShortStandaloneQuarterSymbols:"); - late final _sel_gregorianStartDate1 = _registerName1("gregorianStartDate"); - late final _sel_setGregorianStartDate_1 = - _registerName1("setGregorianStartDate:"); - late final _sel_doesRelativeDateFormatting1 = - _registerName1("doesRelativeDateFormatting"); - late final _sel_setDoesRelativeDateFormatting_1 = - _registerName1("setDoesRelativeDateFormatting:"); - late final _sel_initWithDateFormat_allowNaturalLanguage_1 = - _registerName1("initWithDateFormat:allowNaturalLanguage:"); - late final _sel_allowsNaturalLanguage1 = - _registerName1("allowsNaturalLanguage"); - late final _class_NSNumberFormatter1 = _getClass1("NSNumberFormatter"); - late final _sel_stringFromNumber_1 = _registerName1("stringFromNumber:"); - ffi.Pointer _objc_msgSend_802( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer number, - ) { - return __objc_msgSend_802( - obj, - sel, - number, - ); - } - - late final __objc_msgSend_802Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_802 = __objc_msgSend_802Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_numberFromString_1 = _registerName1("numberFromString:"); - ffi.Pointer _objc_msgSend_803( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - ) { - return __objc_msgSend_803( - obj, - sel, - string, - ); - } - - late final __objc_msgSend_803Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_803 = __objc_msgSend_803Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_localizedStringFromNumber_numberStyle_1 = - _registerName1("localizedStringFromNumber:numberStyle:"); - ffi.Pointer _objc_msgSend_804( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer num, - int nstyle, - ) { - return __objc_msgSend_804( - obj, - sel, - num, - nstyle, - ); - } - - late final __objc_msgSend_804Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_804 = __objc_msgSend_804Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - int _objc_msgSend_805( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_805( - obj, - sel, - ); - } - - late final __objc_msgSend_805Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_805 = __objc_msgSend_805Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - void _objc_msgSend_806( - ffi.Pointer obj, - ffi.Pointer sel, - int behavior, - ) { - return __objc_msgSend_806( - obj, - sel, - behavior, - ); - } - - late final __objc_msgSend_806Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_806 = __objc_msgSend_806Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_numberStyle1 = _registerName1("numberStyle"); - int _objc_msgSend_807( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_807( - obj, - sel, - ); - } - - late final __objc_msgSend_807Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_807 = __objc_msgSend_807Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setNumberStyle_1 = _registerName1("setNumberStyle:"); - void _objc_msgSend_808( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_808( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_808Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_808 = __objc_msgSend_808Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_generatesDecimalNumbers1 = - _registerName1("generatesDecimalNumbers"); - late final _sel_setGeneratesDecimalNumbers_1 = - _registerName1("setGeneratesDecimalNumbers:"); - void _objc_msgSend_809( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_809( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_809Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_809 = __objc_msgSend_809Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_negativeFormat1 = _registerName1("negativeFormat"); - late final _sel_setNegativeFormat_1 = _registerName1("setNegativeFormat:"); - late final _sel_textAttributesForNegativeValues1 = - _registerName1("textAttributesForNegativeValues"); - late final _sel_setTextAttributesForNegativeValues_1 = - _registerName1("setTextAttributesForNegativeValues:"); - late final _sel_positiveFormat1 = _registerName1("positiveFormat"); - late final _sel_setPositiveFormat_1 = _registerName1("setPositiveFormat:"); - late final _sel_textAttributesForPositiveValues1 = - _registerName1("textAttributesForPositiveValues"); - late final _sel_setTextAttributesForPositiveValues_1 = - _registerName1("setTextAttributesForPositiveValues:"); - late final _sel_allowsFloats1 = _registerName1("allowsFloats"); - late final _sel_setAllowsFloats_1 = _registerName1("setAllowsFloats:"); - late final _sel_setDecimalSeparator_1 = - _registerName1("setDecimalSeparator:"); - late final _sel_alwaysShowsDecimalSeparator1 = - _registerName1("alwaysShowsDecimalSeparator"); - late final _sel_setAlwaysShowsDecimalSeparator_1 = - _registerName1("setAlwaysShowsDecimalSeparator:"); - late final _sel_currencyDecimalSeparator1 = - _registerName1("currencyDecimalSeparator"); - late final _sel_setCurrencyDecimalSeparator_1 = - _registerName1("setCurrencyDecimalSeparator:"); - late final _sel_usesGroupingSeparator1 = - _registerName1("usesGroupingSeparator"); - late final _sel_setUsesGroupingSeparator_1 = - _registerName1("setUsesGroupingSeparator:"); - late final _sel_setGroupingSeparator_1 = - _registerName1("setGroupingSeparator:"); - late final _sel_zeroSymbol1 = _registerName1("zeroSymbol"); - late final _sel_setZeroSymbol_1 = _registerName1("setZeroSymbol:"); - late final _sel_textAttributesForZero1 = - _registerName1("textAttributesForZero"); - late final _sel_setTextAttributesForZero_1 = - _registerName1("setTextAttributesForZero:"); - late final _sel_nilSymbol1 = _registerName1("nilSymbol"); - late final _sel_setNilSymbol_1 = _registerName1("setNilSymbol:"); - late final _sel_textAttributesForNil1 = - _registerName1("textAttributesForNil"); - late final _sel_setTextAttributesForNil_1 = - _registerName1("setTextAttributesForNil:"); - late final _sel_notANumberSymbol1 = _registerName1("notANumberSymbol"); - late final _sel_setNotANumberSymbol_1 = - _registerName1("setNotANumberSymbol:"); - late final _sel_textAttributesForNotANumber1 = - _registerName1("textAttributesForNotANumber"); - late final _sel_setTextAttributesForNotANumber_1 = - _registerName1("setTextAttributesForNotANumber:"); - late final _sel_positiveInfinitySymbol1 = - _registerName1("positiveInfinitySymbol"); - late final _sel_setPositiveInfinitySymbol_1 = - _registerName1("setPositiveInfinitySymbol:"); - late final _sel_textAttributesForPositiveInfinity1 = - _registerName1("textAttributesForPositiveInfinity"); - late final _sel_setTextAttributesForPositiveInfinity_1 = - _registerName1("setTextAttributesForPositiveInfinity:"); - late final _sel_negativeInfinitySymbol1 = - _registerName1("negativeInfinitySymbol"); - late final _sel_setNegativeInfinitySymbol_1 = - _registerName1("setNegativeInfinitySymbol:"); - late final _sel_textAttributesForNegativeInfinity1 = - _registerName1("textAttributesForNegativeInfinity"); - late final _sel_setTextAttributesForNegativeInfinity_1 = - _registerName1("setTextAttributesForNegativeInfinity:"); - late final _sel_positivePrefix1 = _registerName1("positivePrefix"); - late final _sel_setPositivePrefix_1 = _registerName1("setPositivePrefix:"); - late final _sel_positiveSuffix1 = _registerName1("positiveSuffix"); - late final _sel_setPositiveSuffix_1 = _registerName1("setPositiveSuffix:"); - late final _sel_negativePrefix1 = _registerName1("negativePrefix"); - late final _sel_setNegativePrefix_1 = _registerName1("setNegativePrefix:"); - late final _sel_negativeSuffix1 = _registerName1("negativeSuffix"); - late final _sel_setNegativeSuffix_1 = _registerName1("setNegativeSuffix:"); - late final _sel_setCurrencyCode_1 = _registerName1("setCurrencyCode:"); - late final _sel_setCurrencySymbol_1 = _registerName1("setCurrencySymbol:"); - late final _sel_internationalCurrencySymbol1 = - _registerName1("internationalCurrencySymbol"); - late final _sel_setInternationalCurrencySymbol_1 = - _registerName1("setInternationalCurrencySymbol:"); - late final _sel_percentSymbol1 = _registerName1("percentSymbol"); - late final _sel_setPercentSymbol_1 = _registerName1("setPercentSymbol:"); - late final _sel_perMillSymbol1 = _registerName1("perMillSymbol"); - late final _sel_setPerMillSymbol_1 = _registerName1("setPerMillSymbol:"); - late final _sel_minusSign1 = _registerName1("minusSign"); - late final _sel_setMinusSign_1 = _registerName1("setMinusSign:"); - late final _sel_plusSign1 = _registerName1("plusSign"); - late final _sel_setPlusSign_1 = _registerName1("setPlusSign:"); - late final _sel_exponentSymbol1 = _registerName1("exponentSymbol"); - late final _sel_setExponentSymbol_1 = _registerName1("setExponentSymbol:"); - late final _sel_groupingSize1 = _registerName1("groupingSize"); - late final _sel_setGroupingSize_1 = _registerName1("setGroupingSize:"); - late final _sel_secondaryGroupingSize1 = - _registerName1("secondaryGroupingSize"); - late final _sel_setSecondaryGroupingSize_1 = - _registerName1("setSecondaryGroupingSize:"); - late final _sel_multiplier1 = _registerName1("multiplier"); - late final _sel_setMultiplier_1 = _registerName1("setMultiplier:"); - late final _sel_formatWidth1 = _registerName1("formatWidth"); - late final _sel_setFormatWidth_1 = _registerName1("setFormatWidth:"); - late final _sel_paddingCharacter1 = _registerName1("paddingCharacter"); - late final _sel_setPaddingCharacter_1 = - _registerName1("setPaddingCharacter:"); - late final _sel_paddingPosition1 = _registerName1("paddingPosition"); - int _objc_msgSend_810( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_810( - obj, - sel, - ); - } - - late final __objc_msgSend_810Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_810 = __objc_msgSend_810Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setPaddingPosition_1 = _registerName1("setPaddingPosition:"); - void _objc_msgSend_811( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_811( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_811Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_811 = __objc_msgSend_811Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_roundingMode1 = _registerName1("roundingMode"); - int _objc_msgSend_812( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_812( - obj, - sel, - ); - } - - late final __objc_msgSend_812Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_812 = __objc_msgSend_812Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setRoundingMode_1 = _registerName1("setRoundingMode:"); - void _objc_msgSend_813( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_813( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_813Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_813 = __objc_msgSend_813Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_roundingIncrement1 = _registerName1("roundingIncrement"); - ffi.Pointer _objc_msgSend_814( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_814( - obj, - sel, - ); - } - - late final __objc_msgSend_814Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_814 = __objc_msgSend_814Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setRoundingIncrement_1 = - _registerName1("setRoundingIncrement:"); - void _objc_msgSend_815( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_815( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_815Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_815 = __objc_msgSend_815Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_minimumIntegerDigits1 = - _registerName1("minimumIntegerDigits"); - late final _sel_setMinimumIntegerDigits_1 = - _registerName1("setMinimumIntegerDigits:"); - late final _sel_maximumIntegerDigits1 = - _registerName1("maximumIntegerDigits"); - late final _sel_setMaximumIntegerDigits_1 = - _registerName1("setMaximumIntegerDigits:"); - late final _sel_minimumFractionDigits1 = - _registerName1("minimumFractionDigits"); - late final _sel_setMinimumFractionDigits_1 = - _registerName1("setMinimumFractionDigits:"); - late final _sel_maximumFractionDigits1 = - _registerName1("maximumFractionDigits"); - late final _sel_setMaximumFractionDigits_1 = - _registerName1("setMaximumFractionDigits:"); - late final _sel_minimum1 = _registerName1("minimum"); - late final _sel_setMinimum_1 = _registerName1("setMinimum:"); - late final _sel_maximum1 = _registerName1("maximum"); - late final _sel_setMaximum_1 = _registerName1("setMaximum:"); - late final _sel_currencyGroupingSeparator1 = - _registerName1("currencyGroupingSeparator"); - late final _sel_setCurrencyGroupingSeparator_1 = - _registerName1("setCurrencyGroupingSeparator:"); - late final _sel_usesSignificantDigits1 = - _registerName1("usesSignificantDigits"); - late final _sel_setUsesSignificantDigits_1 = - _registerName1("setUsesSignificantDigits:"); - late final _sel_minimumSignificantDigits1 = - _registerName1("minimumSignificantDigits"); - late final _sel_setMinimumSignificantDigits_1 = - _registerName1("setMinimumSignificantDigits:"); - late final _sel_maximumSignificantDigits1 = - _registerName1("maximumSignificantDigits"); - late final _sel_setMaximumSignificantDigits_1 = - _registerName1("setMaximumSignificantDigits:"); - late final _sel_isPartialStringValidationEnabled1 = - _registerName1("isPartialStringValidationEnabled"); - late final _sel_setPartialStringValidationEnabled_1 = - _registerName1("setPartialStringValidationEnabled:"); - late final _sel_hasThousandSeparators1 = - _registerName1("hasThousandSeparators"); - late final _sel_setHasThousandSeparators_1 = - _registerName1("setHasThousandSeparators:"); - late final _sel_thousandSeparator1 = _registerName1("thousandSeparator"); - late final _sel_setThousandSeparator_1 = - _registerName1("setThousandSeparator:"); - late final _sel_localizesFormat1 = _registerName1("localizesFormat"); - late final _sel_setLocalizesFormat_1 = _registerName1("setLocalizesFormat:"); - late final _sel_format1 = _registerName1("format"); - late final _sel_setFormat_1 = _registerName1("setFormat:"); - late final _sel_attributedStringForZero1 = - _registerName1("attributedStringForZero"); - late final _sel_setAttributedStringForZero_1 = - _registerName1("setAttributedStringForZero:"); - void _objc_msgSend_816( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_816( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_816Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_816 = __objc_msgSend_816Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_attributedStringForNil1 = - _registerName1("attributedStringForNil"); - late final _sel_setAttributedStringForNil_1 = - _registerName1("setAttributedStringForNil:"); - late final _sel_attributedStringForNotANumber1 = - _registerName1("attributedStringForNotANumber"); - late final _sel_setAttributedStringForNotANumber_1 = - _registerName1("setAttributedStringForNotANumber:"); - late final _class_NSDecimalNumberHandler1 = - _getClass1("NSDecimalNumberHandler"); - late final _sel_defaultDecimalNumberHandler1 = - _registerName1("defaultDecimalNumberHandler"); - ffi.Pointer _objc_msgSend_817( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_817( - obj, - sel, - ); - } - - late final __objc_msgSend_817Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_817 = __objc_msgSend_817Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_1 = - _registerName1( - "initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:"); - instancetype _objc_msgSend_818( - ffi.Pointer obj, - ffi.Pointer sel, - int roundingMode, - int scale, - bool exact, - bool overflow, - bool underflow, - bool divideByZero, - ) { - return __objc_msgSend_818( - obj, - sel, - roundingMode, - scale, - exact, - overflow, - underflow, - divideByZero, - ); - } - - late final __objc_msgSend_818Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Short, - ffi.Bool, - ffi.Bool, - ffi.Bool, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_818 = __objc_msgSend_818Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - int, bool, bool, bool, bool)>(); - - late final _sel_decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_1 = - _registerName1( - "decimalNumberHandlerWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:"); - late final _sel_roundingBehavior1 = _registerName1("roundingBehavior"); - late final _sel_setRoundingBehavior_1 = - _registerName1("setRoundingBehavior:"); - void _objc_msgSend_819( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_819( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_819Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_819 = __objc_msgSend_819Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSScanner1 = _getClass1("NSScanner"); - late final _sel_scanLocation1 = _registerName1("scanLocation"); - late final _sel_setScanLocation_1 = _registerName1("setScanLocation:"); - late final _sel_charactersToBeSkipped1 = - _registerName1("charactersToBeSkipped"); - ffi.Pointer _objc_msgSend_820( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_820( - obj, - sel, - ); - } - - late final __objc_msgSend_820Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_820 = __objc_msgSend_820Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setCharactersToBeSkipped_1 = - _registerName1("setCharactersToBeSkipped:"); - void _objc_msgSend_821( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_821( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_821Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_821 = __objc_msgSend_821Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_caseSensitive1 = _registerName1("caseSensitive"); - late final _sel_setCaseSensitive_1 = _registerName1("setCaseSensitive:"); - late final _sel_scanInt_1 = _registerName1("scanInt:"); - bool _objc_msgSend_822( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer result, - ) { - return __objc_msgSend_822( - obj, - sel, - result, - ); - } - - late final __objc_msgSend_822Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_822 = __objc_msgSend_822Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_scanInteger_1 = _registerName1("scanInteger:"); - bool _objc_msgSend_823( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer result, - ) { - return __objc_msgSend_823( - obj, - sel, - result, - ); - } - - late final __objc_msgSend_823Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_823 = __objc_msgSend_823Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_scanLongLong_1 = _registerName1("scanLongLong:"); - bool _objc_msgSend_824( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer result, - ) { - return __objc_msgSend_824( - obj, - sel, - result, - ); - } - - late final __objc_msgSend_824Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_824 = __objc_msgSend_824Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_scanUnsignedLongLong_1 = - _registerName1("scanUnsignedLongLong:"); - bool _objc_msgSend_825( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer result, - ) { - return __objc_msgSend_825( - obj, - sel, - result, - ); - } - - late final __objc_msgSend_825Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_825 = __objc_msgSend_825Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_scanFloat_1 = _registerName1("scanFloat:"); - bool _objc_msgSend_826( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer result, - ) { - return __objc_msgSend_826( - obj, - sel, - result, - ); - } - - late final __objc_msgSend_826Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_826 = __objc_msgSend_826Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_scanDouble_1 = _registerName1("scanDouble:"); - bool _objc_msgSend_827( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer result, - ) { - return __objc_msgSend_827( - obj, - sel, - result, - ); - } - - late final __objc_msgSend_827Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_827 = __objc_msgSend_827Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_scanHexInt_1 = _registerName1("scanHexInt:"); - bool _objc_msgSend_828( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer result, - ) { - return __objc_msgSend_828( - obj, - sel, - result, - ); - } - - late final __objc_msgSend_828Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_828 = __objc_msgSend_828Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_scanHexLongLong_1 = _registerName1("scanHexLongLong:"); - late final _sel_scanHexFloat_1 = _registerName1("scanHexFloat:"); - late final _sel_scanHexDouble_1 = _registerName1("scanHexDouble:"); - late final _sel_scanString_intoString_1 = - _registerName1("scanString:intoString:"); - bool _objc_msgSend_829( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - ffi.Pointer> result, - ) { - return __objc_msgSend_829( - obj, - sel, - string, - result, - ); - } - - late final __objc_msgSend_829Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_829 = __objc_msgSend_829Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_scanCharactersFromSet_intoString_1 = - _registerName1("scanCharactersFromSet:intoString:"); - bool _objc_msgSend_830( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer set1, - ffi.Pointer> result, - ) { - return __objc_msgSend_830( - obj, - sel, - set1, - result, - ); - } - - late final __objc_msgSend_830Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_830 = __objc_msgSend_830Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_scanUpToString_intoString_1 = - _registerName1("scanUpToString:intoString:"); - late final _sel_scanUpToCharactersFromSet_intoString_1 = - _registerName1("scanUpToCharactersFromSet:intoString:"); - late final _sel_isAtEnd1 = _registerName1("isAtEnd"); - late final _sel_scannerWithString_1 = _registerName1("scannerWithString:"); - late final _sel_localizedScannerWithString_1 = - _registerName1("localizedScannerWithString:"); - late final _sel_scanDecimal_1 = _registerName1("scanDecimal:"); - bool _objc_msgSend_831( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer dcm, - ) { - return __objc_msgSend_831( - obj, - sel, - dcm, - ); - } - - late final __objc_msgSend_831Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_831 = __objc_msgSend_831Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSException1 = _getClass1("NSException"); - late final _sel_exceptionWithName_reason_userInfo_1 = - _registerName1("exceptionWithName:reason:userInfo:"); - ffi.Pointer _objc_msgSend_832( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer reason, - ffi.Pointer userInfo, - ) { - return __objc_msgSend_832( - obj, - sel, - name, - reason, - userInfo, - ); - } - - late final __objc_msgSend_832Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_832 = __objc_msgSend_832Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithName_reason_userInfo_1 = - _registerName1("initWithName:reason:userInfo:"); - instancetype _objc_msgSend_833( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aName, - ffi.Pointer aReason, - ffi.Pointer aUserInfo, - ) { - return __objc_msgSend_833( - obj, - sel, - aName, - aReason, - aUserInfo, - ); - } - - late final __objc_msgSend_833Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_833 = __objc_msgSend_833Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_reason1 = _registerName1("reason"); - 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_834( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer format, - ffi.Pointer<__va_list_tag> argList, - ) { - return __objc_msgSend_834( - obj, - sel, - name, - format, - argList, - ); - } - - late final __objc_msgSend_834Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>('objc_msgSend'); - late final __objc_msgSend_834 = __objc_msgSend_834Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>(); - - late final _class_NSFileHandle1 = _getClass1("NSFileHandle"); - late final _sel_availableData1 = _registerName1("availableData"); - late final _sel_initWithFileDescriptor_closeOnDealloc_1 = - _registerName1("initWithFileDescriptor:closeOnDealloc:"); - instancetype _objc_msgSend_835( - ffi.Pointer obj, - ffi.Pointer sel, - int fd, - bool closeopt, - ) { - return __objc_msgSend_835( - obj, - sel, - fd, - closeopt, - ); - } - - late final __objc_msgSend_835Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Int, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_835 = __objc_msgSend_835Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, int, bool)>(); - - late final _sel_readDataToEndOfFileAndReturnError_1 = - _registerName1("readDataToEndOfFileAndReturnError:"); - ffi.Pointer _objc_msgSend_836( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> error, - ) { - return __objc_msgSend_836( - obj, - sel, - error, - ); - } - - late final __objc_msgSend_836Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_836 = __objc_msgSend_836Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_readDataUpToLength_error_1 = - _registerName1("readDataUpToLength:error:"); - ffi.Pointer _objc_msgSend_837( - ffi.Pointer obj, - ffi.Pointer sel, - int length, - ffi.Pointer> error, - ) { - return __objc_msgSend_837( - obj, - sel, - length, - error, - ); - } - - late final __objc_msgSend_837Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_837 = __objc_msgSend_837Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer>)>(); - - late final _sel_writeData_error_1 = _registerName1("writeData:error:"); - bool _objc_msgSend_838( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer> error, - ) { - return __objc_msgSend_838( - obj, - sel, - data, - error, - ); - } - - late final __objc_msgSend_838Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_838 = __objc_msgSend_838Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_getOffset_error_1 = _registerName1("getOffset:error:"); - bool _objc_msgSend_839( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer offsetInFile, - ffi.Pointer> error, - ) { - return __objc_msgSend_839( - obj, - sel, - offsetInFile, - error, - ); - } - - late final __objc_msgSend_839Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_839 = __objc_msgSend_839Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_seekToEndReturningOffset_error_1 = - _registerName1("seekToEndReturningOffset:error:"); - late final _sel_seekToOffset_error_1 = _registerName1("seekToOffset:error:"); - bool _objc_msgSend_840( - ffi.Pointer obj, - ffi.Pointer sel, - int offset, - ffi.Pointer> error, - ) { - return __objc_msgSend_840( - obj, - sel, - offset, - error, - ); - } - - late final __objc_msgSend_840Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLongLong, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_840 = __objc_msgSend_840Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer>)>(); - - late final _sel_truncateAtOffset_error_1 = - _registerName1("truncateAtOffset:error:"); - late final _sel_synchronizeAndReturnError_1 = - _registerName1("synchronizeAndReturnError:"); - late final _sel_closeAndReturnError_1 = - _registerName1("closeAndReturnError:"); - late final _sel_fileHandleWithStandardInput1 = - _registerName1("fileHandleWithStandardInput"); - ffi.Pointer _objc_msgSend_841( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_841( - obj, - sel, - ); - } - - late final __objc_msgSend_841Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_841 = __objc_msgSend_841Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_fileHandleWithStandardOutput1 = - _registerName1("fileHandleWithStandardOutput"); - late final _sel_fileHandleWithStandardError1 = - _registerName1("fileHandleWithStandardError"); - late final _sel_fileHandleWithNullDevice1 = - _registerName1("fileHandleWithNullDevice"); - late final _sel_fileHandleForReadingAtPath_1 = - _registerName1("fileHandleForReadingAtPath:"); - late final _sel_fileHandleForWritingAtPath_1 = - _registerName1("fileHandleForWritingAtPath:"); - late final _sel_fileHandleForUpdatingAtPath_1 = - _registerName1("fileHandleForUpdatingAtPath:"); - late final _sel_fileHandleForReadingFromURL_error_1 = - _registerName1("fileHandleForReadingFromURL:error:"); - instancetype _objc_msgSend_842( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> error, - ) { - return __objc_msgSend_842( - obj, - sel, - url, - error, - ); - } - - late final __objc_msgSend_842Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_842 = __objc_msgSend_842Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_fileHandleForWritingToURL_error_1 = - _registerName1("fileHandleForWritingToURL:error:"); - late final _sel_fileHandleForUpdatingURL_error_1 = - _registerName1("fileHandleForUpdatingURL:error:"); - late final _sel_readInBackgroundAndNotifyForModes_1 = - _registerName1("readInBackgroundAndNotifyForModes:"); - void _objc_msgSend_843( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer modes, - ) { - return __objc_msgSend_843( - obj, - sel, - modes, - ); - } - - late final __objc_msgSend_843Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_843 = __objc_msgSend_843Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_readInBackgroundAndNotify1 = - _registerName1("readInBackgroundAndNotify"); - late final _sel_readToEndOfFileInBackgroundAndNotifyForModes_1 = - _registerName1("readToEndOfFileInBackgroundAndNotifyForModes:"); - late final _sel_readToEndOfFileInBackgroundAndNotify1 = - _registerName1("readToEndOfFileInBackgroundAndNotify"); - late final _sel_acceptConnectionInBackgroundAndNotifyForModes_1 = - _registerName1("acceptConnectionInBackgroundAndNotifyForModes:"); - late final _sel_acceptConnectionInBackgroundAndNotify1 = - _registerName1("acceptConnectionInBackgroundAndNotify"); - late final _sel_waitForDataInBackgroundAndNotifyForModes_1 = - _registerName1("waitForDataInBackgroundAndNotifyForModes:"); - late final _sel_waitForDataInBackgroundAndNotify1 = - _registerName1("waitForDataInBackgroundAndNotify"); - late final _sel_readabilityHandler1 = _registerName1("readabilityHandler"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_844( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_844( - obj, - sel, - ); - } - - late final __objc_msgSend_844Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_844 = __objc_msgSend_844Ptr.asFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setReadabilityHandler_1 = - _registerName1("setReadabilityHandler:"); - void _objc_msgSend_845( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> value, - ) { - return __objc_msgSend_845( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_845Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_845 = __objc_msgSend_845Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_writeabilityHandler1 = _registerName1("writeabilityHandler"); - late final _sel_setWriteabilityHandler_1 = - _registerName1("setWriteabilityHandler:"); - late final _sel_initWithFileDescriptor_1 = - _registerName1("initWithFileDescriptor:"); - instancetype _objc_msgSend_846( - ffi.Pointer obj, - ffi.Pointer sel, - int fd, - ) { - return __objc_msgSend_846( - obj, - sel, - fd, - ); - } - - late final __objc_msgSend_846Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Int)>>('objc_msgSend'); - late final __objc_msgSend_846 = __objc_msgSend_846Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_fileDescriptor1 = _registerName1("fileDescriptor"); - late final _sel_readDataToEndOfFile1 = _registerName1("readDataToEndOfFile"); - late final _sel_readDataOfLength_1 = _registerName1("readDataOfLength:"); - ffi.Pointer _objc_msgSend_847( - ffi.Pointer obj, - ffi.Pointer sel, - int length, - ) { - return __objc_msgSend_847( - obj, - sel, - length, - ); - } - - late final __objc_msgSend_847Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_847 = __objc_msgSend_847Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_offsetInFile1 = _registerName1("offsetInFile"); - late final _sel_seekToEndOfFile1 = _registerName1("seekToEndOfFile"); - late final _sel_seekToFileOffset_1 = _registerName1("seekToFileOffset:"); - void _objc_msgSend_848( - ffi.Pointer obj, - ffi.Pointer sel, - int offset, - ) { - return __objc_msgSend_848( - obj, - sel, - offset, - ); - } - - late final __objc_msgSend_848Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLongLong)>>('objc_msgSend'); - late final __objc_msgSend_848 = __objc_msgSend_848Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_truncateFileAtOffset_1 = - _registerName1("truncateFileAtOffset:"); - late final _sel_synchronizeFile1 = _registerName1("synchronizeFile"); - late final _sel_closeFile1 = _registerName1("closeFile"); - late final _class_NSHTTPCookieStorage1 = _getClass1("NSHTTPCookieStorage"); - late final _sel_sharedHTTPCookieStorage1 = - _registerName1("sharedHTTPCookieStorage"); - ffi.Pointer _objc_msgSend_849( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_849( - obj, - sel, - ); - } - - late final __objc_msgSend_849Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_849 = __objc_msgSend_849Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_sharedCookieStorageForGroupContainerIdentifier_1 = - _registerName1("sharedCookieStorageForGroupContainerIdentifier:"); - ffi.Pointer _objc_msgSend_850( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer identifier, - ) { - return __objc_msgSend_850( - obj, - sel, - identifier, - ); - } - - late final __objc_msgSend_850Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_850 = __objc_msgSend_850Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_cookies1 = _registerName1("cookies"); - late final _class_NSHTTPCookie1 = _getClass1("NSHTTPCookie"); - late final _sel_initWithProperties_1 = _registerName1("initWithProperties:"); - instancetype _objc_msgSend_851( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer properties, - ) { - return __objc_msgSend_851( - obj, - sel, - properties, - ); - } - - late final __objc_msgSend_851Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_851 = __objc_msgSend_851Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_cookieWithProperties_1 = - _registerName1("cookieWithProperties:"); - ffi.Pointer _objc_msgSend_852( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer properties, - ) { - return __objc_msgSend_852( - obj, - sel, - properties, - ); - } - - late final __objc_msgSend_852Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_852 = __objc_msgSend_852Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_requestHeaderFieldsWithCookies_1 = - _registerName1("requestHeaderFieldsWithCookies:"); - late final _sel_cookiesWithResponseHeaderFields_forURL_1 = - _registerName1("cookiesWithResponseHeaderFields:forURL:"); - ffi.Pointer _objc_msgSend_853( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer headerFields, - ffi.Pointer URL, - ) { - return __objc_msgSend_853( - obj, - sel, - headerFields, - URL, - ); - } - - late final __objc_msgSend_853Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_853 = __objc_msgSend_853Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_properties1 = _registerName1("properties"); - late final _sel_value1 = _registerName1("value"); - late final _sel_expiresDate1 = _registerName1("expiresDate"); - late final _sel_isSessionOnly1 = _registerName1("isSessionOnly"); - late final _sel_isSecure1 = _registerName1("isSecure"); - late final _sel_isHTTPOnly1 = _registerName1("isHTTPOnly"); - late final _sel_comment1 = _registerName1("comment"); - late final _sel_commentURL1 = _registerName1("commentURL"); - late final _sel_portList1 = _registerName1("portList"); - late final _sel_sameSitePolicy1 = _registerName1("sameSitePolicy"); - late final _sel_setCookie_1 = _registerName1("setCookie:"); - void _objc_msgSend_854( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cookie, - ) { - return __objc_msgSend_854( - obj, - sel, - cookie, - ); - } - - late final __objc_msgSend_854Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_854 = __objc_msgSend_854Ptr.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_855( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cookies, - ffi.Pointer URL, - ffi.Pointer mainDocumentURL, - ) { - return __objc_msgSend_855( - obj, - sel, - cookies, - URL, - mainDocumentURL, - ); - } - - late final __objc_msgSend_855Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_855 = __objc_msgSend_855Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_cookieAcceptPolicy1 = _registerName1("cookieAcceptPolicy"); - int _objc_msgSend_856( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_856( - obj, - sel, - ); - } - - late final __objc_msgSend_856Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_856 = __objc_msgSend_856Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setCookieAcceptPolicy_1 = - _registerName1("setCookieAcceptPolicy:"); - void _objc_msgSend_857( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_857( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_857Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_857 = __objc_msgSend_857Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_sortedCookiesUsingDescriptors_1 = - _registerName1("sortedCookiesUsingDescriptors:"); - late final _class_NSURLSessionTask1 = _getClass1("NSURLSessionTask"); - late final _sel_taskIdentifier1 = _registerName1("taskIdentifier"); - late final _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_858( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer URL, - int cachePolicy, - double timeoutInterval, - ) { - return __objc_msgSend_858( - obj, - sel, - URL, - cachePolicy, - timeoutInterval, - ); - } - - late final __objc_msgSend_858Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_858 = __objc_msgSend_858Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, double)>(); - - 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_859( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_859( - obj, - sel, - ); - } - - late final __objc_msgSend_859Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_859 = __objc_msgSend_859Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_timeoutInterval1 = _registerName1("timeoutInterval"); - late final _sel_mainDocumentURL1 = _registerName1("mainDocumentURL"); - late final _sel_networkServiceType1 = _registerName1("networkServiceType"); - int _objc_msgSend_860( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_860( - obj, - sel, - ); - } - - late final __objc_msgSend_860Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_860 = __objc_msgSend_860Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_allowsCellularAccess1 = - _registerName1("allowsCellularAccess"); - late final _sel_allowsExpensiveNetworkAccess1 = - _registerName1("allowsExpensiveNetworkAccess"); - late final _sel_allowsConstrainedNetworkAccess1 = - _registerName1("allowsConstrainedNetworkAccess"); - late final _sel_assumesHTTP3Capable1 = _registerName1("assumesHTTP3Capable"); - late final _sel_attribution1 = _registerName1("attribution"); - int _objc_msgSend_861( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_861( - obj, - sel, - ); - } - - late final __objc_msgSend_861Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_861 = __objc_msgSend_861Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - 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"); - bool _objc_msgSend_862( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer property, - ffi.Pointer key, - ) { - return __objc_msgSend_862( - obj, - sel, - property, - key, - ); - } - - late final __objc_msgSend_862Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_862 = __objc_msgSend_862Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_streamStatus1 = _registerName1("streamStatus"); - int _objc_msgSend_863( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_863( - obj, - sel, - ); - } - - late final __objc_msgSend_863Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_863 = __objc_msgSend_863Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_streamError1 = _registerName1("streamError"); - late final _class_NSOutputStream1 = _getClass1("NSOutputStream"); - late final _sel_write_maxLength_1 = _registerName1("write:maxLength:"); - int _objc_msgSend_864( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - int len, - ) { - return __objc_msgSend_864( - obj, - sel, - buffer, - len, - ); - } - - late final __objc_msgSend_864Ptr = _lookup< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_864 = __objc_msgSend_864Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_hasSpaceAvailable1 = _registerName1("hasSpaceAvailable"); - late final _sel_initToMemory1 = _registerName1("initToMemory"); - late final _sel_initToBuffer_capacity_1 = - _registerName1("initToBuffer:capacity:"); - instancetype _objc_msgSend_865( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - int capacity, - ) { - return __objc_msgSend_865( - obj, - sel, - buffer, - capacity, - ); - } - - late final __objc_msgSend_865Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_865 = __objc_msgSend_865Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_initWithURL_append_1 = _registerName1("initWithURL:append:"); - instancetype _objc_msgSend_866( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - bool shouldAppend, - ) { - return __objc_msgSend_866( - obj, - sel, - url, - shouldAppend, - ); - } - - late final __objc_msgSend_866Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_866 = __objc_msgSend_866Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_initToFileAtPath_append_1 = - _registerName1("initToFileAtPath:append:"); - late final _sel_outputStreamToMemory1 = - _registerName1("outputStreamToMemory"); - late final _sel_outputStreamToBuffer_capacity_1 = - _registerName1("outputStreamToBuffer:capacity:"); - late final _sel_outputStreamToFileAtPath_append_1 = - _registerName1("outputStreamToFileAtPath:append:"); - late final _sel_outputStreamWithURL_append_1 = - _registerName1("outputStreamWithURL:append:"); - late final _sel_getStreamsToHostWithName_port_inputStream_outputStream_1 = - _registerName1("getStreamsToHostWithName:port:inputStream:outputStream:"); - void _objc_msgSend_867( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer hostname, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream, - ) { - return __objc_msgSend_867( - obj, - sel, - hostname, - port, - inputStream, - outputStream, - ); - } - - late final __objc_msgSend_867Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_867 = __objc_msgSend_867Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _class_NSHost1 = _getClass1("NSHost"); - late final _sel_currentHost1 = _registerName1("currentHost"); - late final _sel_hostWithName_1 = _registerName1("hostWithName:"); - instancetype _objc_msgSend_868( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ) { - return __objc_msgSend_868( - obj, - sel, - name, - ); - } - - late final __objc_msgSend_868Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_868 = __objc_msgSend_868Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_hostWithAddress_1 = _registerName1("hostWithAddress:"); - late final _sel_isEqualToHost_1 = _registerName1("isEqualToHost:"); - bool _objc_msgSend_869( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aHost, - ) { - return __objc_msgSend_869( - obj, - sel, - aHost, - ); - } - - late final __objc_msgSend_869Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_869 = __objc_msgSend_869Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_names1 = _registerName1("names"); - late final _sel_address1 = _registerName1("address"); - late final _sel_addresses1 = _registerName1("addresses"); - late final _sel_localizedName1 = _registerName1("localizedName"); - late final _sel_setHostCacheEnabled_1 = - _registerName1("setHostCacheEnabled:"); - void _objc_msgSend_870( - ffi.Pointer obj, - ffi.Pointer sel, - bool flag, - ) { - return __objc_msgSend_870( - obj, - sel, - flag, - ); - } - - late final __objc_msgSend_870Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_870 = __objc_msgSend_870Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_isHostCacheEnabled1 = _registerName1("isHostCacheEnabled"); - late final _sel_flushHostCache1 = _registerName1("flushHostCache"); - late final _sel_getStreamsToHost_port_inputStream_outputStream_1 = - _registerName1("getStreamsToHost:port:inputStream:outputStream:"); - void _objc_msgSend_871( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer host, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream, - ) { - return __objc_msgSend_871( - obj, - sel, - host, - port, - inputStream, - outputStream, - ); - } - - late final __objc_msgSend_871Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_871 = __objc_msgSend_871Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1 = - _registerName1("getBoundStreamsWithBufferSize:inputStream:outputStream:"); - void _objc_msgSend_872( - ffi.Pointer obj, - ffi.Pointer sel, - int bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream, - ) { - return __objc_msgSend_872( - obj, - sel, - bufferSize, - inputStream, - outputStream, - ); - } - - late final __objc_msgSend_872Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_872 = __objc_msgSend_872Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _sel_read_maxLength_1 = _registerName1("read:maxLength:"); - late final _sel_getBuffer_length_1 = _registerName1("getBuffer:length:"); - bool _objc_msgSend_873( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> buffer, - ffi.Pointer len, - ) { - return __objc_msgSend_873( - obj, - sel, - buffer, - len, - ); - } - - late final __objc_msgSend_873Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_873 = __objc_msgSend_873Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); - - late final _sel_hasBytesAvailable1 = _registerName1("hasBytesAvailable"); - late final _sel_initWithFileAtPath_1 = _registerName1("initWithFileAtPath:"); - late final _sel_inputStreamWithData_1 = - _registerName1("inputStreamWithData:"); - instancetype _objc_msgSend_874( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ) { - return __objc_msgSend_874( - obj, - sel, - data, - ); - } - - late final __objc_msgSend_874Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_874 = __objc_msgSend_874Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_inputStreamWithFileAtPath_1 = - _registerName1("inputStreamWithFileAtPath:"); - late final _sel_inputStreamWithURL_1 = _registerName1("inputStreamWithURL:"); - late final _sel_HTTPBodyStream1 = _registerName1("HTTPBodyStream"); - ffi.Pointer _objc_msgSend_875( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_875( - obj, - sel, - ); - } - - late final __objc_msgSend_875Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_875 = __objc_msgSend_875Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_HTTPShouldHandleCookies1 = - _registerName1("HTTPShouldHandleCookies"); - late final _sel_HTTPShouldUsePipelining1 = - _registerName1("HTTPShouldUsePipelining"); - late final _sel_originalRequest1 = _registerName1("originalRequest"); - ffi.Pointer _objc_msgSend_876( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_876( - obj, - sel, - ); - } - - late final __objc_msgSend_876Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_876 = __objc_msgSend_876Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_currentRequest1 = _registerName1("currentRequest"); - late final _class_NSURLResponse1 = _getClass1("NSURLResponse"); - late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1 = - _registerName1( - "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); - instancetype _objc_msgSend_877( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer URL, - ffi.Pointer MIMEType, - int length, - ffi.Pointer name, - ) { - return __objc_msgSend_877( - obj, - sel, - URL, - MIMEType, - length, - name, - ); - } - - late final __objc_msgSend_877Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_877 = __objc_msgSend_877Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - late final _sel_MIMEType1 = _registerName1("MIMEType"); - late final _sel_expectedContentLength1 = - _registerName1("expectedContentLength"); - late final _sel_textEncodingName1 = _registerName1("textEncodingName"); - late final _sel_suggestedFilename1 = _registerName1("suggestedFilename"); - late final _sel_response1 = _registerName1("response"); - ffi.Pointer _objc_msgSend_878( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_878( - obj, - sel, - ); - } - - late final __objc_msgSend_878Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_878 = __objc_msgSend_878Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_progress1 = _registerName1("progress"); - ffi.Pointer _objc_msgSend_879( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_879( - obj, - sel, - ); - } - - late final __objc_msgSend_879Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_879 = __objc_msgSend_879Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_earliestBeginDate1 = _registerName1("earliestBeginDate"); - late final _sel_setEarliestBeginDate_1 = - _registerName1("setEarliestBeginDate:"); - 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_880( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_880( - obj, - sel, - ); - } - - late final __objc_msgSend_880Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_880 = __objc_msgSend_880Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_suspend1 = _registerName1("suspend"); - late final _sel_priority1 = _registerName1("priority"); - late final _sel_setPriority_1 = _registerName1("setPriority:"); - void _objc_msgSend_881( - ffi.Pointer obj, - ffi.Pointer sel, - double value, - ) { - return __objc_msgSend_881( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_881Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Float)>>('objc_msgSend'); - late final __objc_msgSend_881 = __objc_msgSend_881Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double)>(); - - late final _sel_prefersIncrementalDelivery1 = - _registerName1("prefersIncrementalDelivery"); - late final _sel_setPrefersIncrementalDelivery_1 = - _registerName1("setPrefersIncrementalDelivery:"); - late final _sel_storeCookies_forTask_1 = - _registerName1("storeCookies:forTask:"); - void _objc_msgSend_882( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cookies, - ffi.Pointer task, - ) { - return __objc_msgSend_882( - obj, - sel, - cookies, - task, - ); - } - - late final __objc_msgSend_882Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_882 = __objc_msgSend_882Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_getCookiesForTask_completionHandler_1 = - _registerName1("getCookiesForTask:completionHandler:"); - void _objc_msgSend_883( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer task, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_883( - obj, - sel, - task, - completionHandler, - ); - } - - late final __objc_msgSend_883Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_883 = __objc_msgSend_883Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _class_NSIndexPath1 = _getClass1("NSIndexPath"); - late final _sel_indexPathWithIndex_1 = _registerName1("indexPathWithIndex:"); - late final _sel_indexPathWithIndexes_length_1 = - _registerName1("indexPathWithIndexes:length:"); - instancetype _objc_msgSend_884( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexes, - int length, - ) { - return __objc_msgSend_884( - obj, - sel, - indexes, - length, - ); - } - - late final __objc_msgSend_884Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_884 = __objc_msgSend_884Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_initWithIndexes_length_1 = - _registerName1("initWithIndexes:length:"); - late final _sel_indexPathByAddingIndex_1 = - _registerName1("indexPathByAddingIndex:"); - ffi.Pointer _objc_msgSend_885( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ) { - return __objc_msgSend_885( - obj, - sel, - index, - ); - } - - late final __objc_msgSend_885Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_885 = __objc_msgSend_885Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_indexPathByRemovingLastIndex1 = - _registerName1("indexPathByRemovingLastIndex"); - ffi.Pointer _objc_msgSend_886( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_886( - obj, - sel, - ); - } - - late final __objc_msgSend_886Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_886 = __objc_msgSend_886Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_indexAtPosition_1 = _registerName1("indexAtPosition:"); - late final _sel_getIndexes_range_1 = _registerName1("getIndexes:range:"); - void _objc_msgSend_887( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexes, - _NSRange positionRange, - ) { - return __objc_msgSend_887( - obj, - sel, - indexes, - positionRange, - ); - } - - late final __objc_msgSend_887Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_887 = __objc_msgSend_887Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, _NSRange)>(); - - int _objc_msgSend_888( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherObject, - ) { - return __objc_msgSend_888( - obj, - sel, - otherObject, - ); - } - - late final __objc_msgSend_888Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_888 = __objc_msgSend_888Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_getIndexes_1 = _registerName1("getIndexes:"); - void _objc_msgSend_889( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexes, - ) { - return __objc_msgSend_889( - obj, - sel, - indexes, - ); - } - - late final __objc_msgSend_889Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_889 = __objc_msgSend_889Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSInflectionRule1 = _getClass1("NSInflectionRule"); - late final _sel_automaticRule1 = _registerName1("automaticRule"); - ffi.Pointer _objc_msgSend_890( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_890( - obj, - sel, - ); - } - - late final __objc_msgSend_890Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_890 = __objc_msgSend_890Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_canInflectLanguage_1 = _registerName1("canInflectLanguage:"); - late final _sel_canInflectPreferredLocalization1 = - _registerName1("canInflectPreferredLocalization"); - late final _class_NSMorphology1 = _getClass1("NSMorphology"); - late final _sel_grammaticalGender1 = _registerName1("grammaticalGender"); - int _objc_msgSend_891( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_891( - obj, - sel, - ); - } - - late final __objc_msgSend_891Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_891 = __objc_msgSend_891Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setGrammaticalGender_1 = - _registerName1("setGrammaticalGender:"); - void _objc_msgSend_892( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_892( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_892Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_892 = __objc_msgSend_892Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_partOfSpeech1 = _registerName1("partOfSpeech"); - int _objc_msgSend_893( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_893( - obj, - sel, - ); - } - - late final __objc_msgSend_893Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_893 = __objc_msgSend_893Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setPartOfSpeech_1 = _registerName1("setPartOfSpeech:"); - void _objc_msgSend_894( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_894( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_894Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_894 = __objc_msgSend_894Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_number1 = _registerName1("number"); - int _objc_msgSend_895( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_895( - obj, - sel, - ); - } - - late final __objc_msgSend_895Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_895 = __objc_msgSend_895Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setNumber_1 = _registerName1("setNumber:"); - void _objc_msgSend_896( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_896( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_896Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_896 = __objc_msgSend_896Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_grammaticalCase1 = _registerName1("grammaticalCase"); - int _objc_msgSend_897( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_897( - obj, - sel, - ); - } - - late final __objc_msgSend_897Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_897 = __objc_msgSend_897Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setGrammaticalCase_1 = _registerName1("setGrammaticalCase:"); - void _objc_msgSend_898( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_898( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_898Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_898 = __objc_msgSend_898Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_determination1 = _registerName1("determination"); - int _objc_msgSend_899( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_899( - obj, - sel, - ); - } - - late final __objc_msgSend_899Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_899 = __objc_msgSend_899Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setDetermination_1 = _registerName1("setDetermination:"); - void _objc_msgSend_900( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_900( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_900Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_900 = __objc_msgSend_900Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_grammaticalPerson1 = _registerName1("grammaticalPerson"); - int _objc_msgSend_901( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_901( - obj, - sel, - ); - } - - late final __objc_msgSend_901Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_901 = __objc_msgSend_901Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setGrammaticalPerson_1 = - _registerName1("setGrammaticalPerson:"); - void _objc_msgSend_902( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_902( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_902Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_902 = __objc_msgSend_902Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_pronounType1 = _registerName1("pronounType"); - int _objc_msgSend_903( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_903( - obj, - sel, - ); - } - - late final __objc_msgSend_903Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_903 = __objc_msgSend_903Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setPronounType_1 = _registerName1("setPronounType:"); - void _objc_msgSend_904( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_904( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_904Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_904 = __objc_msgSend_904Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_definiteness1 = _registerName1("definiteness"); - int _objc_msgSend_905( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_905( - obj, - sel, - ); - } - - late final __objc_msgSend_905Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_905 = __objc_msgSend_905Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setDefiniteness_1 = _registerName1("setDefiniteness:"); - void _objc_msgSend_906( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_906( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_906Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_906 = __objc_msgSend_906Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _class_NSMorphologyCustomPronoun1 = - _getClass1("NSMorphologyCustomPronoun"); - late final _sel_isSupportedForLanguage_1 = - _registerName1("isSupportedForLanguage:"); - late final _sel_requiredKeysForLanguage_1 = - _registerName1("requiredKeysForLanguage:"); - late final _sel_subjectForm1 = _registerName1("subjectForm"); - late final _sel_setSubjectForm_1 = _registerName1("setSubjectForm:"); - late final _sel_objectForm1 = _registerName1("objectForm"); - late final _sel_setObjectForm_1 = _registerName1("setObjectForm:"); - late final _sel_possessiveForm1 = _registerName1("possessiveForm"); - late final _sel_setPossessiveForm_1 = _registerName1("setPossessiveForm:"); - late final _sel_possessiveAdjectiveForm1 = - _registerName1("possessiveAdjectiveForm"); - late final _sel_setPossessiveAdjectiveForm_1 = - _registerName1("setPossessiveAdjectiveForm:"); - late final _sel_reflexiveForm1 = _registerName1("reflexiveForm"); - late final _sel_setReflexiveForm_1 = _registerName1("setReflexiveForm:"); - late final _sel_customPronounForLanguage_1 = - _registerName1("customPronounForLanguage:"); - ffi.Pointer _objc_msgSend_907( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer language, - ) { - return __objc_msgSend_907( - obj, - sel, - language, - ); - } - - late final __objc_msgSend_907Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_907 = __objc_msgSend_907Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setCustomPronoun_forLanguage_error_1 = - _registerName1("setCustomPronoun:forLanguage:error:"); - bool _objc_msgSend_908( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer features, - ffi.Pointer language, - ffi.Pointer> error, - ) { - return __objc_msgSend_908( - obj, - sel, - features, - language, - error, - ); - } - - late final __objc_msgSend_908Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_908 = __objc_msgSend_908Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_isUnspecified1 = _registerName1("isUnspecified"); - late final _sel_userMorphology1 = _registerName1("userMorphology"); - ffi.Pointer _objc_msgSend_909( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_909( - obj, - sel, - ); - } - - late final __objc_msgSend_909Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_909 = __objc_msgSend_909Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSOperationQueue1 = _getClass1("NSOperationQueue"); - late final _class_NSOperation1 = _getClass1("NSOperation"); - 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_910( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer op, - ) { - return __objc_msgSend_910( - obj, - sel, - op, - ); - } - - late final __objc_msgSend_910Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_910 = __objc_msgSend_910Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_removeDependency_1 = _registerName1("removeDependency:"); - late final _sel_dependencies1 = _registerName1("dependencies"); - late final _sel_queuePriority1 = _registerName1("queuePriority"); - int _objc_msgSend_911( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_911( - obj, - sel, - ); - } - - late final __objc_msgSend_911Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_911 = __objc_msgSend_911Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setQueuePriority_1 = _registerName1("setQueuePriority:"); - void _objc_msgSend_912( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_912( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_912Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_912 = __objc_msgSend_912Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_completionBlock1 = _registerName1("completionBlock"); - late final _sel_setCompletionBlock_1 = _registerName1("setCompletionBlock:"); - late final _sel_waitUntilFinished1 = _registerName1("waitUntilFinished"); - late final _sel_addOperation_1 = _registerName1("addOperation:"); - late final _sel_addOperations_waitUntilFinished_1 = - _registerName1("addOperations:waitUntilFinished:"); - void _objc_msgSend_913( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer ops, - bool wait, - ) { - return __objc_msgSend_913( - obj, - sel, - ops, - wait, - ); - } - - late final __objc_msgSend_913Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_913 = __objc_msgSend_913Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_addOperationWithBlock_1 = - _registerName1("addOperationWithBlock:"); - late final _sel_addBarrierBlock_1 = _registerName1("addBarrierBlock:"); - late final _sel_maxConcurrentOperationCount1 = - _registerName1("maxConcurrentOperationCount"); - late final _sel_setMaxConcurrentOperationCount_1 = - _registerName1("setMaxConcurrentOperationCount:"); - late final _sel_isSuspended1 = _registerName1("isSuspended"); - late final _sel_setSuspended_1 = _registerName1("setSuspended:"); - late final _sel_underlyingQueue1 = _registerName1("underlyingQueue"); - ffi.Pointer _objc_msgSend_914( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_914( - obj, - sel, - ); - } - - late final __objc_msgSend_914Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_914 = __objc_msgSend_914Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setUnderlyingQueue_1 = _registerName1("setUnderlyingQueue:"); - void _objc_msgSend_915( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_915( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_915Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_915 = __objc_msgSend_915Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_cancelAllOperations1 = _registerName1("cancelAllOperations"); - late final _sel_waitUntilAllOperationsAreFinished1 = - _registerName1("waitUntilAllOperationsAreFinished"); - late final _sel_currentQueue1 = _registerName1("currentQueue"); - ffi.Pointer _objc_msgSend_916( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_916( - obj, - sel, - ); - } - - late final __objc_msgSend_916Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_916 = __objc_msgSend_916Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_mainQueue1 = _registerName1("mainQueue"); - ffi.Pointer _objc_msgSend_917( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_917( - obj, - sel, - ); - } - - late final __objc_msgSend_917Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_917 = __objc_msgSend_917Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_operations1 = _registerName1("operations"); - late final _sel_operationCount1 = _registerName1("operationCount"); - late final _class_NSPointerArray1 = _getClass1("NSPointerArray"); - late final _sel_initWithOptions_1 = _registerName1("initWithOptions:"); - instancetype _objc_msgSend_918( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ) { - return __objc_msgSend_918( - obj, - sel, - options, - ); - } - - late final __objc_msgSend_918Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_918 = __objc_msgSend_918Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _class_NSPointerFunctions1 = _getClass1("NSPointerFunctions"); - late final _sel_pointerFunctionsWithOptions_1 = - _registerName1("pointerFunctionsWithOptions:"); - ffi.Pointer _objc_msgSend_919( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ) { - return __objc_msgSend_919( - obj, - sel, - options, - ); - } - - late final __objc_msgSend_919Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_919 = __objc_msgSend_919Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_hashFunction1 = _registerName1("hashFunction"); - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>)>> - _objc_msgSend_920( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_920( - obj, - sel, - ); - } - - late final __objc_msgSend_920Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - Function(ffi.Pointer, ffi.Pointer)>>( - 'objc_msgSend'); - late final __objc_msgSend_920 = __objc_msgSend_920Ptr.asFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setHashFunction_1 = _registerName1("setHashFunction:"); - void _objc_msgSend_921( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - value, - ) { - return __objc_msgSend_921( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_921Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>>)>>( - 'objc_msgSend'); - late final __objc_msgSend_921 = __objc_msgSend_921Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>>)>(); - - late final _sel_isEqualFunction1 = _registerName1("isEqualFunction"); - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>)>> - _objc_msgSend_922( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_922( - obj, - sel, - ); - } - - late final __objc_msgSend_922Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - Function(ffi.Pointer, ffi.Pointer)>>( - 'objc_msgSend'); - late final __objc_msgSend_922 = __objc_msgSend_922Ptr.asFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setIsEqualFunction_1 = _registerName1("setIsEqualFunction:"); - void _objc_msgSend_923( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - value, - ) { - return __objc_msgSend_923( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_923Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>>)>>( - 'objc_msgSend'); - late final __objc_msgSend_923 = __objc_msgSend_923Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>>)>(); - - late final _sel_sizeFunction1 = _registerName1("sizeFunction"); - ffi.Pointer< - ffi.NativeFunction)>> - _objc_msgSend_924( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_924( - obj, - sel, - ); - } - - late final __objc_msgSend_924Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>> - Function(ffi.Pointer, ffi.Pointer)>>( - 'objc_msgSend'); - late final __objc_msgSend_924 = __objc_msgSend_924Ptr.asFunction< - ffi.Pointer< - ffi - .NativeFunction)>> - Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setSizeFunction_1 = _registerName1("setSizeFunction:"); - void _objc_msgSend_925( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi - .NativeFunction)>> - value, - ) { - return __objc_msgSend_925( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_925Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>>('objc_msgSend'); - late final __objc_msgSend_925 = __objc_msgSend_925Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>)>(); - - late final _sel_descriptionFunction1 = _registerName1("descriptionFunction"); - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> - _objc_msgSend_926( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_926( - obj, - sel, - ); - } - - late final __objc_msgSend_926Ptr = - _lookup< - ffi.NativeFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>> - Function(ffi.Pointer, ffi.Pointer)>>( - 'objc_msgSend'); - late final __objc_msgSend_926 = __objc_msgSend_926Ptr.asFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> - Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setDescriptionFunction_1 = - _registerName1("setDescriptionFunction:"); - void _objc_msgSend_927( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> - value, - ) { - return __objc_msgSend_927( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_927Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>)>>('objc_msgSend'); - late final __objc_msgSend_927 = __objc_msgSend_927Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>)>(); - - late final _sel_relinquishFunction1 = _registerName1("relinquishFunction"); - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>)>> - _objc_msgSend_928( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_928( - obj, - sel, - ); - } - - late final __objc_msgSend_928Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - Function(ffi.Pointer, ffi.Pointer)>>( - 'objc_msgSend'); - late final __objc_msgSend_928 = __objc_msgSend_928Ptr.asFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setRelinquishFunction_1 = - _registerName1("setRelinquishFunction:"); - void _objc_msgSend_929( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - value, - ) { - return __objc_msgSend_929( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_929Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>>)>>( - 'objc_msgSend'); - late final __objc_msgSend_929 = __objc_msgSend_929Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>>)>(); - - late final _sel_acquireFunction1 = _registerName1("acquireFunction"); - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>, - ffi.Bool)>> _objc_msgSend_930( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_930( - obj, - sel, - ); - } - - late final __objc_msgSend_930Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>, - ffi.Bool)>> - Function(ffi.Pointer, ffi.Pointer)>>( - 'objc_msgSend'); - late final __objc_msgSend_930 = __objc_msgSend_930Ptr.asFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>, - ffi.Bool)>> - Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setAcquireFunction_1 = _registerName1("setAcquireFunction:"); - void _objc_msgSend_931( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>, - ffi.Bool)>> - value, - ) { - return __objc_msgSend_931( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_931Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>, - ffi.Bool)>>)>>('objc_msgSend'); - late final __objc_msgSend_931 = __objc_msgSend_931Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>, - ffi.Bool)>>)>(); - - late final _sel_usesStrongWriteBarrier1 = - _registerName1("usesStrongWriteBarrier"); - late final _sel_setUsesStrongWriteBarrier_1 = - _registerName1("setUsesStrongWriteBarrier:"); - late final _sel_usesWeakReadAndWriteBarriers1 = - _registerName1("usesWeakReadAndWriteBarriers"); - late final _sel_setUsesWeakReadAndWriteBarriers_1 = - _registerName1("setUsesWeakReadAndWriteBarriers:"); - late final _sel_initWithPointerFunctions_1 = - _registerName1("initWithPointerFunctions:"); - instancetype _objc_msgSend_932( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer functions, - ) { - return __objc_msgSend_932( - obj, - sel, - functions, - ); - } - - late final __objc_msgSend_932Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_932 = __objc_msgSend_932Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_pointerArrayWithOptions_1 = - _registerName1("pointerArrayWithOptions:"); - ffi.Pointer _objc_msgSend_933( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ) { - return __objc_msgSend_933( - obj, - sel, - options, - ); - } - - late final __objc_msgSend_933Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_933 = __objc_msgSend_933Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_pointerArrayWithPointerFunctions_1 = - _registerName1("pointerArrayWithPointerFunctions:"); - ffi.Pointer _objc_msgSend_934( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer functions, - ) { - return __objc_msgSend_934( - obj, - sel, - functions, - ); - } - - late final __objc_msgSend_934Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_934 = __objc_msgSend_934Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_pointerFunctions1 = _registerName1("pointerFunctions"); - ffi.Pointer _objc_msgSend_935( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_935( - obj, - sel, - ); - } - - late final __objc_msgSend_935Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_935 = __objc_msgSend_935Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_pointerAtIndex_1 = _registerName1("pointerAtIndex:"); - ffi.Pointer _objc_msgSend_936( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ) { - return __objc_msgSend_936( - obj, - sel, - index, - ); - } - - late final __objc_msgSend_936Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_936 = __objc_msgSend_936Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_addPointer_1 = _registerName1("addPointer:"); - late final _sel_removePointerAtIndex_1 = - _registerName1("removePointerAtIndex:"); - late final _sel_insertPointer_atIndex_1 = - _registerName1("insertPointer:atIndex:"); - late final _sel_replacePointerAtIndex_withPointer_1 = - _registerName1("replacePointerAtIndex:withPointer:"); - void _objc_msgSend_937( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ffi.Pointer item, - ) { - return __objc_msgSend_937( - obj, - sel, - index, - item, - ); - } - - late final __objc_msgSend_937Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_937 = __objc_msgSend_937Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _sel_compact1 = _registerName1("compact"); - late final _sel_setCount_1 = _registerName1("setCount:"); - late final _sel_pointerArrayWithStrongObjects1 = - _registerName1("pointerArrayWithStrongObjects"); - late final _sel_pointerArrayWithWeakObjects1 = - _registerName1("pointerArrayWithWeakObjects"); - late final _sel_strongObjectsPointerArray1 = - _registerName1("strongObjectsPointerArray"); - ffi.Pointer _objc_msgSend_938( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_938( - obj, - sel, - ); - } - - late final __objc_msgSend_938Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_938 = __objc_msgSend_938Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_weakObjectsPointerArray1 = - _registerName1("weakObjectsPointerArray"); - late final _class_NSProcessInfo1 = _getClass1("NSProcessInfo"); - late final _sel_processInfo1 = _registerName1("processInfo"); - ffi.Pointer _objc_msgSend_939( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_939( - obj, - sel, - ); - } - - late final __objc_msgSend_939Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_939 = __objc_msgSend_939Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_environment1 = _registerName1("environment"); - late final _sel_hostName1 = _registerName1("hostName"); - late final _sel_processName1 = _registerName1("processName"); - late final _sel_setProcessName_1 = _registerName1("setProcessName:"); - late final _sel_processIdentifier1 = _registerName1("processIdentifier"); - late final _sel_globallyUniqueString1 = - _registerName1("globallyUniqueString"); - late final _sel_operatingSystem1 = _registerName1("operatingSystem"); - late final _sel_operatingSystemName1 = _registerName1("operatingSystemName"); - late final _sel_operatingSystemVersionString1 = - _registerName1("operatingSystemVersionString"); - late final _sel_operatingSystemVersion1 = - _registerName1("operatingSystemVersion"); - NSOperatingSystemVersion _objc_msgSend_940( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_940( - obj, - sel, - ); - } - - late final __objc_msgSend_940Ptr = _lookup< - ffi.NativeFunction< - NSOperatingSystemVersion Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_940 = __objc_msgSend_940Ptr.asFunction< - NSOperatingSystemVersion Function( - ffi.Pointer, ffi.Pointer)>(); - - void _objc_msgSend_940_stret( - ffi.Pointer stret, - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_940_stret( - stret, - obj, - sel, - ); - } - - late final __objc_msgSend_940_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_stret'); - late final __objc_msgSend_940_stret = __objc_msgSend_940_stretPtr.asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_processorCount1 = _registerName1("processorCount"); - late final _sel_activeProcessorCount1 = - _registerName1("activeProcessorCount"); - late final _sel_physicalMemory1 = _registerName1("physicalMemory"); - late final _sel_isOperatingSystemAtLeastVersion_1 = - _registerName1("isOperatingSystemAtLeastVersion:"); - bool _objc_msgSend_941( - ffi.Pointer obj, - ffi.Pointer sel, - NSOperatingSystemVersion version, - ) { - return __objc_msgSend_941( - obj, - sel, - version, - ); - } - - late final __objc_msgSend_941Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - NSOperatingSystemVersion)>>('objc_msgSend'); - late final __objc_msgSend_941 = __objc_msgSend_941Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - NSOperatingSystemVersion)>(); - - late final _sel_systemUptime1 = _registerName1("systemUptime"); - late final _sel_disableSuddenTermination1 = - _registerName1("disableSuddenTermination"); - late final _sel_enableSuddenTermination1 = - _registerName1("enableSuddenTermination"); - late final _sel_disableAutomaticTermination_1 = - _registerName1("disableAutomaticTermination:"); - late final _sel_enableAutomaticTermination_1 = - _registerName1("enableAutomaticTermination:"); - late final _sel_automaticTerminationSupportEnabled1 = - _registerName1("automaticTerminationSupportEnabled"); - late final _sel_setAutomaticTerminationSupportEnabled_1 = - _registerName1("setAutomaticTerminationSupportEnabled:"); - late final _sel_beginActivityWithOptions_reason_1 = - _registerName1("beginActivityWithOptions:reason:"); - ffi.Pointer _objc_msgSend_942( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ffi.Pointer reason, - ) { - return __objc_msgSend_942( - obj, - sel, - options, - reason, - ); - } - - late final __objc_msgSend_942Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_942 = __objc_msgSend_942Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); - - late final _sel_endActivity_1 = _registerName1("endActivity:"); - late final _sel_performActivityWithOptions_reason_usingBlock_1 = - _registerName1("performActivityWithOptions:reason:usingBlock:"); - void _objc_msgSend_943( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ffi.Pointer reason, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_943( - obj, - sel, - options, - reason, - block, - ); - } - - late final __objc_msgSend_943Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_943 = __objc_msgSend_943Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_performExpiringActivityWithReason_usingBlock_1 = - _registerName1("performExpiringActivityWithReason:usingBlock:"); - void _objc_msgSend_944( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer reason, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_944( - obj, - sel, - reason, - block, - ); - } - - late final __objc_msgSend_944Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_944 = __objc_msgSend_944Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_userName1 = _registerName1("userName"); - late final _sel_fullUserName1 = _registerName1("fullUserName"); - late final _sel_thermalState1 = _registerName1("thermalState"); - int _objc_msgSend_945( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_945( - obj, - sel, - ); - } - - late final __objc_msgSend_945Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_945 = __objc_msgSend_945Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_isLowPowerModeEnabled1 = - _registerName1("isLowPowerModeEnabled"); - late final _sel_isMacCatalystApp1 = _registerName1("isMacCatalystApp"); - late final _sel_isiOSAppOnMac1 = _registerName1("isiOSAppOnMac"); - late final _class_NSTextCheckingResult1 = _getClass1("NSTextCheckingResult"); - late final _sel_resultType1 = _registerName1("resultType"); - int _objc_msgSend_946( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_946( - obj, - sel, - ); - } - - late final __objc_msgSend_946Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_946 = __objc_msgSend_946Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_range1 = _registerName1("range"); - late final _sel_orthography1 = _registerName1("orthography"); - ffi.Pointer _objc_msgSend_947( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_947( - obj, - sel, - ); - } - - late final __objc_msgSend_947Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_947 = __objc_msgSend_947Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_grammarDetails1 = _registerName1("grammarDetails"); - late final _sel_duration1 = _registerName1("duration"); - late final _sel_components1 = _registerName1("components"); - late final _sel_replacementString1 = _registerName1("replacementString"); - late final _sel_alternativeStrings1 = _registerName1("alternativeStrings"); - late final _class_NSRegularExpression1 = _getClass1("NSRegularExpression"); - late final _sel_regularExpressionWithPattern_options_error_1 = - _registerName1("regularExpressionWithPattern:options:error:"); - ffi.Pointer _objc_msgSend_948( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer pattern, - int options, - ffi.Pointer> error, - ) { - return __objc_msgSend_948( - obj, - sel, - pattern, - options, - error, - ); - } - - late final __objc_msgSend_948Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_948 = __objc_msgSend_948Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_initWithPattern_options_error_1 = - _registerName1("initWithPattern:options:error:"); - instancetype _objc_msgSend_949( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer pattern, - int options, - ffi.Pointer> error, - ) { - return __objc_msgSend_949( - obj, - sel, - pattern, - options, - error, - ); - } - - late final __objc_msgSend_949Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_949 = __objc_msgSend_949Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_pattern1 = _registerName1("pattern"); - late final _sel_options1 = _registerName1("options"); - int _objc_msgSend_950( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_950( - obj, - sel, - ); - } - - late final __objc_msgSend_950Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_950 = __objc_msgSend_950Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_numberOfCaptureGroups1 = - _registerName1("numberOfCaptureGroups"); - late final _sel_escapedPatternForString_1 = - _registerName1("escapedPatternForString:"); - late final _sel_enumerateMatchesInString_options_range_usingBlock_1 = - _registerName1("enumerateMatchesInString:options:range:usingBlock:"); - void _objc_msgSend_951( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int options, - _NSRange range, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_951( - obj, - sel, - string, - options, - range, - block, - ); - } - - late final __objc_msgSend_951Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_951 = __objc_msgSend_951Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, _NSRange, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_matchesInString_options_range_1 = - _registerName1("matchesInString:options:range:"); - ffi.Pointer _objc_msgSend_952( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int options, - _NSRange range, - ) { - return __objc_msgSend_952( - obj, - sel, - string, - options, - range, - ); - } - - late final __objc_msgSend_952Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_952 = __objc_msgSend_952Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, _NSRange)>(); - - late final _sel_numberOfMatchesInString_options_range_1 = - _registerName1("numberOfMatchesInString:options:range:"); - int _objc_msgSend_953( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int options, - _NSRange range, - ) { - return __objc_msgSend_953( - obj, - sel, - string, - options, - range, - ); - } - - late final __objc_msgSend_953Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_953 = __objc_msgSend_953Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, _NSRange)>(); - - late final _sel_firstMatchInString_options_range_1 = - _registerName1("firstMatchInString:options:range:"); - ffi.Pointer _objc_msgSend_954( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int options, - _NSRange range, - ) { - return __objc_msgSend_954( - obj, - sel, - string, - options, - range, - ); - } - - late final __objc_msgSend_954Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_954 = __objc_msgSend_954Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, _NSRange)>(); - - late final _sel_rangeOfFirstMatchInString_options_range_1 = - _registerName1("rangeOfFirstMatchInString:options:range:"); - _NSRange _objc_msgSend_955( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int options, - _NSRange range, - ) { - return __objc_msgSend_955( - obj, - sel, - string, - options, - range, - ); - } - - late final __objc_msgSend_955Ptr = _lookup< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_955 = __objc_msgSend_955Ptr.asFunction< - _NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, _NSRange)>(); - - void _objc_msgSend_955_stret( - ffi.Pointer<_NSRange> stret, - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int options, - _NSRange range, - ) { - return __objc_msgSend_955_stret( - stret, - obj, - sel, - string, - options, - range, - ); - } - - late final __objc_msgSend_955_stretPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>('objc_msgSend_stret'); - late final __objc_msgSend_955_stret = __objc_msgSend_955_stretPtr.asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, _NSRange)>(); - - late final _sel_stringByReplacingMatchesInString_options_range_withTemplate_1 = - _registerName1( - "stringByReplacingMatchesInString:options:range:withTemplate:"); - ffi.Pointer _objc_msgSend_956( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int options, - _NSRange range, - ffi.Pointer templ, - ) { - return __objc_msgSend_956( - obj, - sel, - string, - options, - range, - templ, - ); - } - - late final __objc_msgSend_956Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_956 = __objc_msgSend_956Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange, - ffi.Pointer)>(); - - late final _sel_replaceMatchesInString_options_range_withTemplate_1 = - _registerName1("replaceMatchesInString:options:range:withTemplate:"); - int _objc_msgSend_957( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int options, - _NSRange range, - ffi.Pointer templ, - ) { - return __objc_msgSend_957( - obj, - sel, - string, - options, - range, - templ, - ); - } - - late final __objc_msgSend_957Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_957 = __objc_msgSend_957Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, _NSRange, ffi.Pointer)>(); - - late final _sel_replacementStringForResult_inString_offset_template_1 = - _registerName1("replacementStringForResult:inString:offset:template:"); - ffi.Pointer _objc_msgSend_958( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer result, - ffi.Pointer string, - int offset, - ffi.Pointer templ, - ) { - return __objc_msgSend_958( - obj, - sel, - result, - string, - offset, - templ, - ); - } - - late final __objc_msgSend_958Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_958 = __objc_msgSend_958Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - late final _sel_escapedTemplateForString_1 = - _registerName1("escapedTemplateForString:"); - late final _sel_regularExpression1 = _registerName1("regularExpression"); - ffi.Pointer _objc_msgSend_959( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_959( - obj, - sel, - ); - } - - late final __objc_msgSend_959Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_959 = __objc_msgSend_959Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_phoneNumber1 = _registerName1("phoneNumber"); - late final _sel_numberOfRanges1 = _registerName1("numberOfRanges"); - late final _sel_rangeAtIndex_1 = _registerName1("rangeAtIndex:"); - late final _sel_rangeWithName_1 = _registerName1("rangeWithName:"); - late final _sel_resultByAdjustingRangesWithOffset_1 = - _registerName1("resultByAdjustingRangesWithOffset:"); - ffi.Pointer _objc_msgSend_960( - ffi.Pointer obj, - ffi.Pointer sel, - int offset, - ) { - return __objc_msgSend_960( - obj, - sel, - offset, - ); - } - - late final __objc_msgSend_960Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_960 = __objc_msgSend_960Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_addressComponents1 = _registerName1("addressComponents"); - late final _sel_orthographyCheckingResultWithRange_orthography_1 = - _registerName1("orthographyCheckingResultWithRange:orthography:"); - ffi.Pointer _objc_msgSend_961( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer orthography, - ) { - return __objc_msgSend_961( - obj, - sel, - range, - orthography, - ); - } - - late final __objc_msgSend_961Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_961 = __objc_msgSend_961Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange, ffi.Pointer)>(); - - late final _sel_spellCheckingResultWithRange_1 = - _registerName1("spellCheckingResultWithRange:"); - ffi.Pointer _objc_msgSend_962( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ) { - return __objc_msgSend_962( - obj, - sel, - range, - ); - } - - late final __objc_msgSend_962Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>('objc_msgSend'); - late final __objc_msgSend_962 = __objc_msgSend_962Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, _NSRange)>(); - - late final _sel_grammarCheckingResultWithRange_details_1 = - _registerName1("grammarCheckingResultWithRange:details:"); - ffi.Pointer _objc_msgSend_963( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer details, - ) { - return __objc_msgSend_963( - obj, - sel, - range, - details, - ); - } - - late final __objc_msgSend_963Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_963 = __objc_msgSend_963Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange, ffi.Pointer)>(); - - late final _sel_dateCheckingResultWithRange_date_1 = - _registerName1("dateCheckingResultWithRange:date:"); - ffi.Pointer _objc_msgSend_964( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer date, - ) { - return __objc_msgSend_964( - obj, - sel, - range, - date, - ); - } - - late final __objc_msgSend_964Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_964 = __objc_msgSend_964Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange, ffi.Pointer)>(); - - late final _sel_dateCheckingResultWithRange_date_timeZone_duration_1 = - _registerName1("dateCheckingResultWithRange:date:timeZone:duration:"); - ffi.Pointer _objc_msgSend_965( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer date, - ffi.Pointer timeZone, - double duration, - ) { - return __objc_msgSend_965( - obj, - sel, - range, - date, - timeZone, - duration, - ); - } - - late final __objc_msgSend_965Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - ffi.Pointer, - ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_965 = __objc_msgSend_965Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - ffi.Pointer, - double)>(); - - late final _sel_addressCheckingResultWithRange_components_1 = - _registerName1("addressCheckingResultWithRange:components:"); - ffi.Pointer _objc_msgSend_966( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer components, - ) { - return __objc_msgSend_966( - obj, - sel, - range, - components, - ); - } - - late final __objc_msgSend_966Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_966 = __objc_msgSend_966Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange, ffi.Pointer)>(); - - late final _sel_linkCheckingResultWithRange_URL_1 = - _registerName1("linkCheckingResultWithRange:URL:"); - ffi.Pointer _objc_msgSend_967( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer url, - ) { - return __objc_msgSend_967( - obj, - sel, - range, - url, - ); - } - - late final __objc_msgSend_967Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_967 = __objc_msgSend_967Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange, ffi.Pointer)>(); - - late final _sel_quoteCheckingResultWithRange_replacementString_1 = - _registerName1("quoteCheckingResultWithRange:replacementString:"); - ffi.Pointer _objc_msgSend_968( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer replacementString, - ) { - return __objc_msgSend_968( - obj, - sel, - range, - replacementString, - ); - } - - late final __objc_msgSend_968Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_968 = __objc_msgSend_968Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange, ffi.Pointer)>(); - - late final _sel_dashCheckingResultWithRange_replacementString_1 = - _registerName1("dashCheckingResultWithRange:replacementString:"); - late final _sel_replacementCheckingResultWithRange_replacementString_1 = - _registerName1("replacementCheckingResultWithRange:replacementString:"); - late final _sel_correctionCheckingResultWithRange_replacementString_1 = - _registerName1("correctionCheckingResultWithRange:replacementString:"); - late final _sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_1 = - _registerName1( - "correctionCheckingResultWithRange:replacementString:alternativeStrings:"); - ffi.Pointer _objc_msgSend_969( - ffi.Pointer obj, - ffi.Pointer sel, - _NSRange range, - ffi.Pointer replacementString, - ffi.Pointer alternativeStrings, - ) { - return __objc_msgSend_969( - obj, - sel, - range, - replacementString, - alternativeStrings, - ); - } - - late final __objc_msgSend_969Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_969 = __objc_msgSend_969Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_1 = - _registerName1( - "regularExpressionCheckingResultWithRanges:count:regularExpression:"); - ffi.Pointer _objc_msgSend_970( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_NSRange> ranges, - int count, - ffi.Pointer regularExpression, - ) { - return __objc_msgSend_970( - obj, - sel, - ranges, - count, - regularExpression, - ); - } - - late final __objc_msgSend_970Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_NSRange>, - ffi.UnsignedLong, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_970 = __objc_msgSend_970Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_NSRange>, - int, - ffi.Pointer)>(); - - late final _sel_phoneNumberCheckingResultWithRange_phoneNumber_1 = - _registerName1("phoneNumberCheckingResultWithRange:phoneNumber:"); - late final _sel_transitInformationCheckingResultWithRange_components_1 = - _registerName1("transitInformationCheckingResultWithRange:components:"); - late final _class_NSURLCache1 = _getClass1("NSURLCache"); - late final _sel_sharedURLCache1 = _registerName1("sharedURLCache"); - ffi.Pointer _objc_msgSend_971( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_971( - obj, - sel, - ); - } - - late final __objc_msgSend_971Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_971 = __objc_msgSend_971Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setSharedURLCache_1 = _registerName1("setSharedURLCache:"); - void _objc_msgSend_972( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_972( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_972Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_972 = __objc_msgSend_972Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithMemoryCapacity_diskCapacity_diskPath_1 = - _registerName1("initWithMemoryCapacity:diskCapacity:diskPath:"); - instancetype _objc_msgSend_973( - ffi.Pointer obj, - ffi.Pointer sel, - int memoryCapacity, - int diskCapacity, - ffi.Pointer path, - ) { - return __objc_msgSend_973( - obj, - sel, - memoryCapacity, - diskCapacity, - path, - ); - } - - late final __objc_msgSend_973Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_973 = __objc_msgSend_973Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - int, ffi.Pointer)>(); - - late final _sel_initWithMemoryCapacity_diskCapacity_directoryURL_1 = - _registerName1("initWithMemoryCapacity:diskCapacity:directoryURL:"); - instancetype _objc_msgSend_974( - ffi.Pointer obj, - ffi.Pointer sel, - int memoryCapacity, - int diskCapacity, - ffi.Pointer directoryURL, - ) { - return __objc_msgSend_974( - obj, - sel, - memoryCapacity, - diskCapacity, - directoryURL, - ); - } - - late final __objc_msgSend_974Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_974 = __objc_msgSend_974Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - int, ffi.Pointer)>(); - - late final _class_NSCachedURLResponse1 = _getClass1("NSCachedURLResponse"); - late final _sel_initWithResponse_data_1 = - _registerName1("initWithResponse:data:"); - instancetype _objc_msgSend_975( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer response, - ffi.Pointer data, - ) { - return __objc_msgSend_975( - obj, - sel, - response, - data, - ); - } - - late final __objc_msgSend_975Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_975 = __objc_msgSend_975Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithResponse_data_userInfo_storagePolicy_1 = - _registerName1("initWithResponse:data:userInfo:storagePolicy:"); - instancetype _objc_msgSend_976( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer response, - ffi.Pointer data, - ffi.Pointer userInfo, - int storagePolicy, - ) { - return __objc_msgSend_976( - obj, - sel, - response, - data, - userInfo, - storagePolicy, - ); - } - - late final __objc_msgSend_976Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_976 = __objc_msgSend_976Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); - - ffi.Pointer _objc_msgSend_977( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_977( - obj, - sel, - ); - } - - late final __objc_msgSend_977Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_977 = __objc_msgSend_977Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_storagePolicy1 = _registerName1("storagePolicy"); - int _objc_msgSend_978( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_978( - obj, - sel, - ); - } - - late final __objc_msgSend_978Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_978 = __objc_msgSend_978Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_cachedResponseForRequest_1 = - _registerName1("cachedResponseForRequest:"); - ffi.Pointer _objc_msgSend_979( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_979( - obj, - sel, - request, - ); - } - - late final __objc_msgSend_979Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_979 = __objc_msgSend_979Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_storeCachedResponse_forRequest_1 = - _registerName1("storeCachedResponse:forRequest:"); - void _objc_msgSend_980( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cachedResponse, - ffi.Pointer request, - ) { - return __objc_msgSend_980( - obj, - sel, - cachedResponse, - request, - ); - } - - late final __objc_msgSend_980Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_980 = __objc_msgSend_980Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_removeCachedResponseForRequest_1 = - _registerName1("removeCachedResponseForRequest:"); - void _objc_msgSend_981( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_981( - obj, - sel, - request, - ); - } - - late final __objc_msgSend_981Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_981 = __objc_msgSend_981Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_removeAllCachedResponses1 = - _registerName1("removeAllCachedResponses"); - late final _sel_removeCachedResponsesSinceDate_1 = - _registerName1("removeCachedResponsesSinceDate:"); - 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 _sel_storeCachedResponse_forDataTask_1 = - _registerName1("storeCachedResponse:forDataTask:"); - void _objc_msgSend_982( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cachedResponse, - ffi.Pointer dataTask, - ) { - return __objc_msgSend_982( - obj, - sel, - cachedResponse, - dataTask, - ); - } - - late final __objc_msgSend_982Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_982 = __objc_msgSend_982Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_getCachedResponseForDataTask_completionHandler_1 = - _registerName1("getCachedResponseForDataTask:completionHandler:"); - void _objc_msgSend_983( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer dataTask, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_983( - obj, - sel, - dataTask, - completionHandler, - ); - } - - late final __objc_msgSend_983Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_983 = __objc_msgSend_983Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_removeCachedResponseForDataTask_1 = - _registerName1("removeCachedResponseForDataTask:"); - void _objc_msgSend_984( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer dataTask, - ) { - return __objc_msgSend_984( - obj, - sel, - dataTask, - ); - } - - late final __objc_msgSend_984Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_984 = __objc_msgSend_984Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSURLConnection1 = _getClass1("NSURLConnection"); - late final _sel_initWithRequest_delegate_startImmediately_1 = - _registerName1("initWithRequest:delegate:startImmediately:"); - instancetype _objc_msgSend_985( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer delegate, - bool startImmediately, - ) { - return __objc_msgSend_985( - obj, - sel, - request, - delegate, - startImmediately, - ); - } - - late final __objc_msgSend_985Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_985 = __objc_msgSend_985Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_initWithRequest_delegate_1 = - _registerName1("initWithRequest:delegate:"); - instancetype _objc_msgSend_986( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer delegate, - ) { - return __objc_msgSend_986( - obj, - sel, - request, - delegate, - ); - } - - late final __objc_msgSend_986Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_986 = __objc_msgSend_986Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_connectionWithRequest_delegate_1 = - _registerName1("connectionWithRequest:delegate:"); - ffi.Pointer _objc_msgSend_987( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer delegate, - ) { - return __objc_msgSend_987( - obj, - sel, - request, - delegate, - ); - } - - late final __objc_msgSend_987Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_987 = __objc_msgSend_987Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - ffi.Pointer _objc_msgSend_988( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_988( - obj, - sel, - ); - } - - late final __objc_msgSend_988Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_988 = __objc_msgSend_988Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_unscheduleFromRunLoop_forMode_1 = - _registerName1("unscheduleFromRunLoop:forMode:"); - late final _sel_setDelegateQueue_1 = _registerName1("setDelegateQueue:"); - void _objc_msgSend_989( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer queue, - ) { - return __objc_msgSend_989( - obj, - sel, - queue, - ); - } - - late final __objc_msgSend_989Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_989 = __objc_msgSend_989Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_canHandleRequest_1 = _registerName1("canHandleRequest:"); - bool _objc_msgSend_990( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_990( - obj, - sel, - request, - ); - } - - late final __objc_msgSend_990Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_990 = __objc_msgSend_990Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_sendSynchronousRequest_returningResponse_error_1 = - _registerName1("sendSynchronousRequest:returningResponse:error:"); - ffi.Pointer _objc_msgSend_991( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer> response, - ffi.Pointer> error, - ) { - return __objc_msgSend_991( - obj, - sel, - request, - response, - error, - ); - } - - late final __objc_msgSend_991Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_991 = __objc_msgSend_991Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _sel_sendAsynchronousRequest_queue_completionHandler_1 = - _registerName1("sendAsynchronousRequest:queue:completionHandler:"); - void _objc_msgSend_992( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer queue, - ffi.Pointer<_ObjCBlock> handler, - ) { - return __objc_msgSend_992( - obj, - sel, - request, - queue, - handler, - ); - } - - late final __objc_msgSend_992Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_992 = __objc_msgSend_992Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _class_NSURLCredential1 = _getClass1("NSURLCredential"); - late final _sel_persistence1 = _registerName1("persistence"); - int _objc_msgSend_993( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_993( - obj, - sel, - ); - } - - late final __objc_msgSend_993Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_993 = __objc_msgSend_993Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithUser_password_persistence_1 = - _registerName1("initWithUser:password:persistence:"); - instancetype _objc_msgSend_994( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer user, - ffi.Pointer password, - int persistence, - ) { - return __objc_msgSend_994( - obj, - sel, - user, - password, - persistence, - ); - } - - late final __objc_msgSend_994Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_994 = __objc_msgSend_994Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_credentialWithUser_password_persistence_1 = - _registerName1("credentialWithUser:password:persistence:"); - ffi.Pointer _objc_msgSend_995( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer user, - ffi.Pointer password, - int persistence, - ) { - return __objc_msgSend_995( - obj, - sel, - user, - password, - persistence, - ); - } - - late final __objc_msgSend_995Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_995 = __objc_msgSend_995Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); - - late final _sel_hasPassword1 = _registerName1("hasPassword"); - late final _sel_initWithIdentity_certificates_persistence_1 = - _registerName1("initWithIdentity:certificates:persistence:"); - instancetype _objc_msgSend_996( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<__SecIdentity> identity, - ffi.Pointer certArray, - int persistence, - ) { - return __objc_msgSend_996( - obj, - sel, - identity, - certArray, - persistence, - ); - } - - late final __objc_msgSend_996Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__SecIdentity>, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_996 = __objc_msgSend_996Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<__SecIdentity>, ffi.Pointer, int)>(); - - late final _sel_credentialWithIdentity_certificates_persistence_1 = - _registerName1("credentialWithIdentity:certificates:persistence:"); - ffi.Pointer _objc_msgSend_997( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<__SecIdentity> identity, - ffi.Pointer certArray, - int persistence, - ) { - return __objc_msgSend_997( - obj, - sel, - identity, - certArray, - persistence, - ); - } - - late final __objc_msgSend_997Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__SecIdentity>, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_997 = __objc_msgSend_997Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__SecIdentity>, - ffi.Pointer, - int)>(); - - late final _sel_identity1 = _registerName1("identity"); - ffi.Pointer<__SecIdentity> _objc_msgSend_998( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_998( - obj, - sel, - ); - } - - late final __objc_msgSend_998Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer<__SecIdentity> Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_998 = __objc_msgSend_998Ptr.asFunction< - ffi.Pointer<__SecIdentity> Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_certificates1 = _registerName1("certificates"); - late final _sel_initWithTrust_1 = _registerName1("initWithTrust:"); - instancetype _objc_msgSend_999( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<__SecTrust> trust, - ) { - return __objc_msgSend_999( - obj, - sel, - trust, - ); - } - - late final __objc_msgSend_999Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<__SecTrust>)>>('objc_msgSend'); - late final __objc_msgSend_999 = __objc_msgSend_999Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<__SecTrust>)>(); - - late final _sel_credentialForTrust_1 = _registerName1("credentialForTrust:"); - ffi.Pointer _objc_msgSend_1000( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<__SecTrust> trust, - ) { - return __objc_msgSend_1000( - obj, - sel, - trust, - ); - } - - late final __objc_msgSend_1000Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<__SecTrust>)>>('objc_msgSend'); - late final __objc_msgSend_1000 = __objc_msgSend_1000Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<__SecTrust>)>(); - - late final _class_NSURLProtectionSpace1 = _getClass1("NSURLProtectionSpace"); - late final _sel_initWithHost_port_protocol_realm_authenticationMethod_1 = - _registerName1("initWithHost:port:protocol:realm:authenticationMethod:"); - instancetype _objc_msgSend_1001( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer host, - int port, - ffi.Pointer protocol, - ffi.Pointer realm, - ffi.Pointer authenticationMethod, - ) { - return __objc_msgSend_1001( - obj, - sel, - host, - port, - protocol, - realm, - authenticationMethod, - ); - } - - late final __objc_msgSend_1001Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1001 = __objc_msgSend_1001Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithProxyHost_port_type_realm_authenticationMethod_1 = - _registerName1("initWithProxyHost:port:type:realm:authenticationMethod:"); - late final _sel_realm1 = _registerName1("realm"); - late final _sel_receivesCredentialSecurely1 = - _registerName1("receivesCredentialSecurely"); - late final _sel_isProxy1 = _registerName1("isProxy"); - late final _sel_proxyType1 = _registerName1("proxyType"); - late final _sel_protocol1 = _registerName1("protocol"); - late final _sel_authenticationMethod1 = - _registerName1("authenticationMethod"); - late final _sel_distinguishedNames1 = _registerName1("distinguishedNames"); - late final _sel_serverTrust1 = _registerName1("serverTrust"); - ffi.Pointer<__SecTrust> _objc_msgSend_1002( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1002( - obj, - sel, - ); - } - - late final __objc_msgSend_1002Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer<__SecTrust> Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1002 = __objc_msgSend_1002Ptr.asFunction< - ffi.Pointer<__SecTrust> Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSURLCredentialStorage1 = - _getClass1("NSURLCredentialStorage"); - late final _sel_sharedCredentialStorage1 = - _registerName1("sharedCredentialStorage"); - ffi.Pointer _objc_msgSend_1003( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1003( - obj, - sel, - ); - } - - late final __objc_msgSend_1003Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1003 = __objc_msgSend_1003Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_credentialsForProtectionSpace_1 = - _registerName1("credentialsForProtectionSpace:"); - ffi.Pointer _objc_msgSend_1004( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer space, - ) { - return __objc_msgSend_1004( - obj, - sel, - space, - ); - } - - late final __objc_msgSend_1004Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1004 = __objc_msgSend_1004Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_allCredentials1 = _registerName1("allCredentials"); - late final _sel_setCredential_forProtectionSpace_1 = - _registerName1("setCredential:forProtectionSpace:"); - void _objc_msgSend_1005( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer credential, - ffi.Pointer space, - ) { - return __objc_msgSend_1005( - obj, - sel, - credential, - space, - ); - } - - late final __objc_msgSend_1005Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1005 = __objc_msgSend_1005Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_removeCredential_forProtectionSpace_1 = - _registerName1("removeCredential:forProtectionSpace:"); - late final _sel_removeCredential_forProtectionSpace_options_1 = - _registerName1("removeCredential:forProtectionSpace:options:"); - void _objc_msgSend_1006( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer credential, - ffi.Pointer space, - ffi.Pointer options, - ) { - return __objc_msgSend_1006( - obj, - sel, - credential, - space, - options, - ); - } - - late final __objc_msgSend_1006Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1006 = __objc_msgSend_1006Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_defaultCredentialForProtectionSpace_1 = - _registerName1("defaultCredentialForProtectionSpace:"); - ffi.Pointer _objc_msgSend_1007( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer space, - ) { - return __objc_msgSend_1007( - obj, - sel, - space, - ); - } - - late final __objc_msgSend_1007Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1007 = __objc_msgSend_1007Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setDefaultCredential_forProtectionSpace_1 = - _registerName1("setDefaultCredential:forProtectionSpace:"); - late final _sel_getCredentialsForProtectionSpace_task_completionHandler_1 = - _registerName1( - "getCredentialsForProtectionSpace:task:completionHandler:"); - void _objc_msgSend_1008( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer protectionSpace, - ffi.Pointer task, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1008( - obj, - sel, - protectionSpace, - task, - completionHandler, - ); - } - - late final __objc_msgSend_1008Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1008 = __objc_msgSend_1008Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_setCredential_forProtectionSpace_task_1 = - _registerName1("setCredential:forProtectionSpace:task:"); - void _objc_msgSend_1009( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer credential, - ffi.Pointer protectionSpace, - ffi.Pointer task, - ) { - return __objc_msgSend_1009( - obj, - sel, - credential, - protectionSpace, - task, - ); - } - - late final __objc_msgSend_1009Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1009 = __objc_msgSend_1009Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_removeCredential_forProtectionSpace_options_task_1 = - _registerName1("removeCredential:forProtectionSpace:options:task:"); - void _objc_msgSend_1010( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer credential, - ffi.Pointer protectionSpace, - ffi.Pointer options, - ffi.Pointer task, - ) { - return __objc_msgSend_1010( - obj, - sel, - credential, - protectionSpace, - options, - task, - ); - } - - late final __objc_msgSend_1010Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1010 = __objc_msgSend_1010Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_1 = - _registerName1( - "getDefaultCredentialForProtectionSpace:task:completionHandler:"); - void _objc_msgSend_1011( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer space, - ffi.Pointer task, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1011( - obj, - sel, - space, - task, - completionHandler, - ); - } - - late final __objc_msgSend_1011Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1011 = __objc_msgSend_1011Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_setDefaultCredential_forProtectionSpace_task_1 = - _registerName1("setDefaultCredential:forProtectionSpace:task:"); - late final _class_NSURLProtocol1 = _getClass1("NSURLProtocol"); - late final _sel_initWithRequest_cachedResponse_client_1 = - _registerName1("initWithRequest:cachedResponse:client:"); - instancetype _objc_msgSend_1012( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer cachedResponse, - ffi.Pointer client, - ) { - return __objc_msgSend_1012( - obj, - sel, - request, - cachedResponse, - client, - ); - } - - late final __objc_msgSend_1012Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1012 = __objc_msgSend_1012Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_client1 = _registerName1("client"); - late final _sel_request1 = _registerName1("request"); - late final _sel_cachedResponse1 = _registerName1("cachedResponse"); - ffi.Pointer _objc_msgSend_1013( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1013( - obj, - sel, - ); - } - - late final __objc_msgSend_1013Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1013 = __objc_msgSend_1013Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_canInitWithRequest_1 = _registerName1("canInitWithRequest:"); - late final _sel_canonicalRequestForRequest_1 = - _registerName1("canonicalRequestForRequest:"); - ffi.Pointer _objc_msgSend_1014( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_1014( - obj, - sel, - request, - ); - } - - late final __objc_msgSend_1014Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1014 = __objc_msgSend_1014Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_requestIsCacheEquivalent_toRequest_1 = - _registerName1("requestIsCacheEquivalent:toRequest:"); - bool _objc_msgSend_1015( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer a, - ffi.Pointer b, - ) { - return __objc_msgSend_1015( - obj, - sel, - a, - b, - ); - } - - late final __objc_msgSend_1015Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1015 = __objc_msgSend_1015Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_startLoading1 = _registerName1("startLoading"); - late final _sel_stopLoading1 = _registerName1("stopLoading"); - late final _sel_propertyForKey_inRequest_1 = - _registerName1("propertyForKey:inRequest:"); - ffi.Pointer _objc_msgSend_1016( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ffi.Pointer request, - ) { - return __objc_msgSend_1016( - obj, - sel, - key, - request, - ); - } - - late final __objc_msgSend_1016Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1016 = __objc_msgSend_1016Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSMutableURLRequest1 = _getClass1("NSMutableURLRequest"); - late final _sel_setURL_1 = _registerName1("setURL:"); - late final _sel_setCachePolicy_1 = _registerName1("setCachePolicy:"); - void _objc_msgSend_1017( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_1017( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1017Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1017 = __objc_msgSend_1017Ptr.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_1018( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_1018( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1018Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1018 = __objc_msgSend_1018Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_setAllowsCellularAccess_1 = - _registerName1("setAllowsCellularAccess:"); - late final _sel_setAllowsExpensiveNetworkAccess_1 = - _registerName1("setAllowsExpensiveNetworkAccess:"); - late final _sel_setAllowsConstrainedNetworkAccess_1 = - _registerName1("setAllowsConstrainedNetworkAccess:"); - late final _sel_setAssumesHTTP3Capable_1 = - _registerName1("setAssumesHTTP3Capable:"); - late final _sel_setAttribution_1 = _registerName1("setAttribution:"); - void _objc_msgSend_1019( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_1019( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1019Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1019 = __objc_msgSend_1019Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_setRequiresDNSSECValidation_1 = - _registerName1("setRequiresDNSSECValidation:"); - late final _sel_setHTTPMethod_1 = _registerName1("setHTTPMethod:"); - late final _sel_setAllHTTPHeaderFields_1 = - _registerName1("setAllHTTPHeaderFields:"); - late final _sel_setValue_forHTTPHeaderField_1 = - _registerName1("setValue:forHTTPHeaderField:"); - void _objc_msgSend_1020( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer field, - ) { - return __objc_msgSend_1020( - obj, - sel, - value, - field, - ); - } - - late final __objc_msgSend_1020Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1020 = __objc_msgSend_1020Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_addValue_forHTTPHeaderField_1 = - _registerName1("addValue:forHTTPHeaderField:"); - late final _sel_setHTTPBody_1 = _registerName1("setHTTPBody:"); - void _objc_msgSend_1021( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_1021( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1021Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1021 = __objc_msgSend_1021Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_setHTTPBodyStream_1 = _registerName1("setHTTPBodyStream:"); - void _objc_msgSend_1022( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_1022( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1022Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1022 = __objc_msgSend_1022Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_setHTTPShouldHandleCookies_1 = - _registerName1("setHTTPShouldHandleCookies:"); - late final _sel_setHTTPShouldUsePipelining_1 = - _registerName1("setHTTPShouldUsePipelining:"); - late final _sel_setProperty_forKey_inRequest_1 = - _registerName1("setProperty:forKey:inRequest:"); - void _objc_msgSend_1023( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer key, - ffi.Pointer request, - ) { - return __objc_msgSend_1023( - obj, - sel, - value, - key, - request, - ); - } - - late final __objc_msgSend_1023Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1023 = __objc_msgSend_1023Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_removePropertyForKey_inRequest_1 = - _registerName1("removePropertyForKey:inRequest:"); - void _objc_msgSend_1024( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer key, - ffi.Pointer request, - ) { - return __objc_msgSend_1024( - obj, - sel, - key, - request, - ); - } - - late final __objc_msgSend_1024Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1024 = __objc_msgSend_1024Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_registerClass_1 = _registerName1("registerClass:"); - late final _sel_unregisterClass_1 = _registerName1("unregisterClass:"); - late final _sel_canInitWithTask_1 = _registerName1("canInitWithTask:"); - bool _objc_msgSend_1025( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer task, - ) { - return __objc_msgSend_1025( - obj, - sel, - task, - ); - } - - late final __objc_msgSend_1025Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1025 = __objc_msgSend_1025Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithTask_cachedResponse_client_1 = - _registerName1("initWithTask:cachedResponse:client:"); - instancetype _objc_msgSend_1026( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer task, - ffi.Pointer cachedResponse, - ffi.Pointer client, - ) { - return __objc_msgSend_1026( - obj, - sel, - task, - cachedResponse, - client, - ); - } - - late final __objc_msgSend_1026Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1026 = __objc_msgSend_1026Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_task1 = _registerName1("task"); - ffi.Pointer _objc_msgSend_1027( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1027( - obj, - sel, - ); - } - - late final __objc_msgSend_1027Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1027 = __objc_msgSend_1027Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSXMLParser1 = _getClass1("NSXMLParser"); - late final _sel_initWithStream_1 = _registerName1("initWithStream:"); - instancetype _objc_msgSend_1028( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer stream, - ) { - return __objc_msgSend_1028( - obj, - sel, - stream, - ); - } - - late final __objc_msgSend_1028Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1028 = __objc_msgSend_1028Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_shouldProcessNamespaces1 = - _registerName1("shouldProcessNamespaces"); - late final _sel_setShouldProcessNamespaces_1 = - _registerName1("setShouldProcessNamespaces:"); - late final _sel_shouldReportNamespacePrefixes1 = - _registerName1("shouldReportNamespacePrefixes"); - late final _sel_setShouldReportNamespacePrefixes_1 = - _registerName1("setShouldReportNamespacePrefixes:"); - late final _sel_externalEntityResolvingPolicy1 = - _registerName1("externalEntityResolvingPolicy"); - int _objc_msgSend_1029( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1029( - obj, - sel, - ); - } - - late final __objc_msgSend_1029Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1029 = __objc_msgSend_1029Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setExternalEntityResolvingPolicy_1 = - _registerName1("setExternalEntityResolvingPolicy:"); - void _objc_msgSend_1030( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_1030( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1030Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1030 = __objc_msgSend_1030Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_allowedExternalEntityURLs1 = - _registerName1("allowedExternalEntityURLs"); - late final _sel_setAllowedExternalEntityURLs_1 = - _registerName1("setAllowedExternalEntityURLs:"); - void _objc_msgSend_1031( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_1031( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1031Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1031 = __objc_msgSend_1031Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_parse1 = _registerName1("parse"); - late final _sel_abortParsing1 = _registerName1("abortParsing"); - late final _sel_parserError1 = _registerName1("parserError"); - late final _sel_shouldResolveExternalEntities1 = - _registerName1("shouldResolveExternalEntities"); - late final _sel_setShouldResolveExternalEntities_1 = - _registerName1("setShouldResolveExternalEntities:"); - late final _sel_publicID1 = _registerName1("publicID"); - late final _sel_systemID1 = _registerName1("systemID"); - late final _sel_lineNumber1 = _registerName1("lineNumber"); - late final _sel_columnNumber1 = _registerName1("columnNumber"); - late final _class_NSFileWrapper1 = _getClass1("NSFileWrapper"); - late final _sel_initWithURL_options_error_1 = - _registerName1("initWithURL:options:error:"); - instancetype _objc_msgSend_1032( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int options, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1032( - obj, - sel, - url, - options, - outError, - ); - } - - late final __objc_msgSend_1032Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1032 = __objc_msgSend_1032Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_initDirectoryWithFileWrappers_1 = - _registerName1("initDirectoryWithFileWrappers:"); - late final _sel_initRegularFileWithContents_1 = - _registerName1("initRegularFileWithContents:"); - late final _sel_initSymbolicLinkWithDestinationURL_1 = - _registerName1("initSymbolicLinkWithDestinationURL:"); - late final _sel_initWithSerializedRepresentation_1 = - _registerName1("initWithSerializedRepresentation:"); - late final _sel_isDirectory1 = _registerName1("isDirectory"); - late final _sel_isRegularFile1 = _registerName1("isRegularFile"); - late final _sel_isSymbolicLink1 = _registerName1("isSymbolicLink"); - late final _sel_preferredFilename1 = _registerName1("preferredFilename"); - late final _sel_setPreferredFilename_1 = - _registerName1("setPreferredFilename:"); - late final _sel_filename1 = _registerName1("filename"); - late final _sel_setFilename_1 = _registerName1("setFilename:"); - late final _sel_fileAttributes1 = _registerName1("fileAttributes"); - late final _sel_setFileAttributes_1 = _registerName1("setFileAttributes:"); - late final _sel_matchesContentsOfURL_1 = - _registerName1("matchesContentsOfURL:"); - late final _sel_readFromURL_options_error_1 = - _registerName1("readFromURL:options:error:"); - bool _objc_msgSend_1033( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int options, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1033( - obj, - sel, - url, - options, - outError, - ); - } - - late final __objc_msgSend_1033Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1033 = __objc_msgSend_1033Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_writeToURL_options_originalContentsURL_error_1 = - _registerName1("writeToURL:options:originalContentsURL:error:"); - bool _objc_msgSend_1034( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int options, - ffi.Pointer originalContentsURL, - ffi.Pointer> outError, - ) { - return __objc_msgSend_1034( - obj, - sel, - url, - options, - originalContentsURL, - outError, - ); - } - - late final __objc_msgSend_1034Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1034 = __objc_msgSend_1034Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_serializedRepresentation1 = - _registerName1("serializedRepresentation"); - late final _sel_addFileWrapper_1 = _registerName1("addFileWrapper:"); - ffi.Pointer _objc_msgSend_1035( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer child, - ) { - return __objc_msgSend_1035( - obj, - sel, - child, - ); - } - - late final __objc_msgSend_1035Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1035 = __objc_msgSend_1035Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_addRegularFileWithContents_preferredFilename_1 = - _registerName1("addRegularFileWithContents:preferredFilename:"); - ffi.Pointer _objc_msgSend_1036( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer fileName, - ) { - return __objc_msgSend_1036( - obj, - sel, - data, - fileName, - ); - } - - late final __objc_msgSend_1036Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1036 = __objc_msgSend_1036Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_removeFileWrapper_1 = _registerName1("removeFileWrapper:"); - void _objc_msgSend_1037( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer child, - ) { - return __objc_msgSend_1037( - obj, - sel, - child, - ); - } - - late final __objc_msgSend_1037Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1037 = __objc_msgSend_1037Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_fileWrappers1 = _registerName1("fileWrappers"); - late final _sel_keyForFileWrapper_1 = _registerName1("keyForFileWrapper:"); - ffi.Pointer _objc_msgSend_1038( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer child, - ) { - return __objc_msgSend_1038( - obj, - sel, - child, - ); - } - - late final __objc_msgSend_1038Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1038 = __objc_msgSend_1038Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_regularFileContents1 = _registerName1("regularFileContents"); - late final _sel_symbolicLinkDestinationURL1 = - _registerName1("symbolicLinkDestinationURL"); - late final _sel_initSymbolicLinkWithDestination_1 = - _registerName1("initSymbolicLinkWithDestination:"); - late final _sel_needsToBeUpdatedFromPath_1 = - _registerName1("needsToBeUpdatedFromPath:"); - late final _sel_updateFromPath_1 = _registerName1("updateFromPath:"); - late final _sel_writeToFile_atomically_updateFilenames_1 = - _registerName1("writeToFile:atomically:updateFilenames:"); - bool _objc_msgSend_1039( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool atomicFlag, - bool updateFilenamesFlag, - ) { - return __objc_msgSend_1039( - obj, - sel, - path, - atomicFlag, - updateFilenamesFlag, - ); - } - - late final __objc_msgSend_1039Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_1039 = __objc_msgSend_1039Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool, bool)>(); - - late final _sel_addFileWithPath_1 = _registerName1("addFileWithPath:"); - late final _sel_addSymbolicLinkWithDestination_preferredFilename_1 = - _registerName1("addSymbolicLinkWithDestination:preferredFilename:"); - late final _sel_symbolicLinkDestination1 = - _registerName1("symbolicLinkDestination"); - late final _class_NSURLSession1 = _getClass1("NSURLSession"); - late final _sel_sharedSession1 = _registerName1("sharedSession"); - ffi.Pointer _objc_msgSend_1040( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1040( - obj, - sel, - ); - } - - late final __objc_msgSend_1040Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1040 = __objc_msgSend_1040Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSURLSessionConfiguration1 = - _getClass1("NSURLSessionConfiguration"); - late final _sel_defaultSessionConfiguration1 = - _registerName1("defaultSessionConfiguration"); - ffi.Pointer _objc_msgSend_1041( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1041( - obj, - sel, - ); - } - - late final __objc_msgSend_1041Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1041 = __objc_msgSend_1041Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_ephemeralSessionConfiguration1 = - _registerName1("ephemeralSessionConfiguration"); - late final _sel_backgroundSessionConfigurationWithIdentifier_1 = - _registerName1("backgroundSessionConfigurationWithIdentifier:"); - ffi.Pointer _objc_msgSend_1042( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer identifier, - ) { - return __objc_msgSend_1042( - obj, - sel, - identifier, - ); - } - - late final __objc_msgSend_1042Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1042 = __objc_msgSend_1042Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_identifier1 = _registerName1("identifier"); - late final _sel_requestCachePolicy1 = _registerName1("requestCachePolicy"); - late final _sel_setRequestCachePolicy_1 = - _registerName1("setRequestCachePolicy:"); - late final _sel_timeoutIntervalForRequest1 = - _registerName1("timeoutIntervalForRequest"); - late final _sel_setTimeoutIntervalForRequest_1 = - _registerName1("setTimeoutIntervalForRequest:"); - late final _sel_timeoutIntervalForResource1 = - _registerName1("timeoutIntervalForResource"); - late final _sel_setTimeoutIntervalForResource_1 = - _registerName1("setTimeoutIntervalForResource:"); - late final _sel_waitsForConnectivity1 = - _registerName1("waitsForConnectivity"); - late final _sel_setWaitsForConnectivity_1 = - _registerName1("setWaitsForConnectivity:"); - late final _sel_isDiscretionary1 = _registerName1("isDiscretionary"); - late final _sel_setDiscretionary_1 = _registerName1("setDiscretionary:"); - late final _sel_sharedContainerIdentifier1 = - _registerName1("sharedContainerIdentifier"); - late final _sel_setSharedContainerIdentifier_1 = - _registerName1("setSharedContainerIdentifier:"); - late final _sel_sessionSendsLaunchEvents1 = - _registerName1("sessionSendsLaunchEvents"); - late final _sel_setSessionSendsLaunchEvents_1 = - _registerName1("setSessionSendsLaunchEvents:"); - late final _sel_connectionProxyDictionary1 = - _registerName1("connectionProxyDictionary"); - late final _sel_setConnectionProxyDictionary_1 = - _registerName1("setConnectionProxyDictionary:"); - late final _sel_TLSMinimumSupportedProtocol1 = - _registerName1("TLSMinimumSupportedProtocol"); - int _objc_msgSend_1043( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1043( - obj, - sel, - ); - } - - late final __objc_msgSend_1043Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1043 = __objc_msgSend_1043Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setTLSMinimumSupportedProtocol_1 = - _registerName1("setTLSMinimumSupportedProtocol:"); - void _objc_msgSend_1044( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_1044( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1044Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1044 = __objc_msgSend_1044Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_TLSMaximumSupportedProtocol1 = - _registerName1("TLSMaximumSupportedProtocol"); - late final _sel_setTLSMaximumSupportedProtocol_1 = - _registerName1("setTLSMaximumSupportedProtocol:"); - late final _sel_TLSMinimumSupportedProtocolVersion1 = - _registerName1("TLSMinimumSupportedProtocolVersion"); - int _objc_msgSend_1045( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1045( - obj, - sel, - ); - } - - late final __objc_msgSend_1045Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1045 = __objc_msgSend_1045Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setTLSMinimumSupportedProtocolVersion_1 = - _registerName1("setTLSMinimumSupportedProtocolVersion:"); - void _objc_msgSend_1046( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_1046( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1046Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1046 = __objc_msgSend_1046Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_TLSMaximumSupportedProtocolVersion1 = - _registerName1("TLSMaximumSupportedProtocolVersion"); - late final _sel_setTLSMaximumSupportedProtocolVersion_1 = - _registerName1("setTLSMaximumSupportedProtocolVersion:"); - late final _sel_HTTPShouldSetCookies1 = - _registerName1("HTTPShouldSetCookies"); - late final _sel_setHTTPShouldSetCookies_1 = - _registerName1("setHTTPShouldSetCookies:"); - late final _sel_HTTPCookieAcceptPolicy1 = - _registerName1("HTTPCookieAcceptPolicy"); - late final _sel_setHTTPCookieAcceptPolicy_1 = - _registerName1("setHTTPCookieAcceptPolicy:"); - late final _sel_HTTPAdditionalHeaders1 = - _registerName1("HTTPAdditionalHeaders"); - late final _sel_setHTTPAdditionalHeaders_1 = - _registerName1("setHTTPAdditionalHeaders:"); - late final _sel_HTTPMaximumConnectionsPerHost1 = - _registerName1("HTTPMaximumConnectionsPerHost"); - late final _sel_setHTTPMaximumConnectionsPerHost_1 = - _registerName1("setHTTPMaximumConnectionsPerHost:"); - late final _sel_HTTPCookieStorage1 = _registerName1("HTTPCookieStorage"); - ffi.Pointer _objc_msgSend_1047( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1047( - obj, - sel, - ); - } - - late final __objc_msgSend_1047Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1047 = __objc_msgSend_1047Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setHTTPCookieStorage_1 = - _registerName1("setHTTPCookieStorage:"); - void _objc_msgSend_1048( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_1048( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1048Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1048 = __objc_msgSend_1048Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_URLCredentialStorage1 = - _registerName1("URLCredentialStorage"); - ffi.Pointer _objc_msgSend_1049( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1049( - obj, - sel, - ); - } - - late final __objc_msgSend_1049Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1049 = __objc_msgSend_1049Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setURLCredentialStorage_1 = - _registerName1("setURLCredentialStorage:"); - void _objc_msgSend_1050( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_1050( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1050Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1050 = __objc_msgSend_1050Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_URLCache1 = _registerName1("URLCache"); - ffi.Pointer _objc_msgSend_1051( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1051( - obj, - sel, - ); - } - - late final __objc_msgSend_1051Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1051 = __objc_msgSend_1051Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setURLCache_1 = _registerName1("setURLCache:"); - void _objc_msgSend_1052( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_1052( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1052Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1052 = __objc_msgSend_1052Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_shouldUseExtendedBackgroundIdleMode1 = - _registerName1("shouldUseExtendedBackgroundIdleMode"); - late final _sel_setShouldUseExtendedBackgroundIdleMode_1 = - _registerName1("setShouldUseExtendedBackgroundIdleMode:"); - late final _sel_protocolClasses1 = _registerName1("protocolClasses"); - late final _sel_setProtocolClasses_1 = _registerName1("setProtocolClasses:"); - void _objc_msgSend_1053( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_1053( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1053Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1053 = __objc_msgSend_1053Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_multipathServiceType1 = - _registerName1("multipathServiceType"); - int _objc_msgSend_1054( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1054( - obj, - sel, - ); - } - - late final __objc_msgSend_1054Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1054 = __objc_msgSend_1054Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setMultipathServiceType_1 = - _registerName1("setMultipathServiceType:"); - void _objc_msgSend_1055( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_1055( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1055Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1055 = __objc_msgSend_1055Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_backgroundSessionConfiguration_1 = - _registerName1("backgroundSessionConfiguration:"); - late final _sel_sessionWithConfiguration_1 = - _registerName1("sessionWithConfiguration:"); - ffi.Pointer _objc_msgSend_1056( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer configuration, - ) { - return __objc_msgSend_1056( - obj, - sel, - configuration, - ); - } - - late final __objc_msgSend_1056Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1056 = __objc_msgSend_1056Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_sessionWithConfiguration_delegate_delegateQueue_1 = - _registerName1("sessionWithConfiguration:delegate:delegateQueue:"); - ffi.Pointer _objc_msgSend_1057( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer configuration, - ffi.Pointer delegate, - ffi.Pointer queue, - ) { - return __objc_msgSend_1057( - obj, - sel, - configuration, - delegate, - queue, - ); - } - - late final __objc_msgSend_1057Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1057 = __objc_msgSend_1057Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_delegateQueue1 = _registerName1("delegateQueue"); - late final _sel_configuration1 = _registerName1("configuration"); - late final _sel_sessionDescription1 = _registerName1("sessionDescription"); - late final _sel_setSessionDescription_1 = - _registerName1("setSessionDescription:"); - late final _sel_finishTasksAndInvalidate1 = - _registerName1("finishTasksAndInvalidate"); - late final _sel_invalidateAndCancel1 = _registerName1("invalidateAndCancel"); - late final _sel_resetWithCompletionHandler_1 = - _registerName1("resetWithCompletionHandler:"); - late final _sel_flushWithCompletionHandler_1 = - _registerName1("flushWithCompletionHandler:"); - late final _sel_getTasksWithCompletionHandler_1 = - _registerName1("getTasksWithCompletionHandler:"); - void _objc_msgSend_1058( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1058( - obj, - sel, - completionHandler, - ); - } - - late final __objc_msgSend_1058Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1058 = __objc_msgSend_1058Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_getAllTasksWithCompletionHandler_1 = - _registerName1("getAllTasksWithCompletionHandler:"); - void _objc_msgSend_1059( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1059( - obj, - sel, - completionHandler, - ); - } - - late final __objc_msgSend_1059Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1059 = __objc_msgSend_1059Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_dataTaskWithRequest_1 = - _registerName1("dataTaskWithRequest:"); - ffi.Pointer _objc_msgSend_1060( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_1060( - obj, - sel, - request, - ); - } - - late final __objc_msgSend_1060Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1060 = __objc_msgSend_1060Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_dataTaskWithURL_1 = _registerName1("dataTaskWithURL:"); - ffi.Pointer _objc_msgSend_1061( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ) { - return __objc_msgSend_1061( - obj, - sel, - url, - ); - } - - late final __objc_msgSend_1061Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1061 = __objc_msgSend_1061Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSURLSessionUploadTask1 = - _getClass1("NSURLSessionUploadTask"); - late final _sel_cancelByProducingResumeData_1 = - _registerName1("cancelByProducingResumeData:"); - void _objc_msgSend_1062( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1062( - obj, - sel, - completionHandler, - ); - } - - late final __objc_msgSend_1062Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1062 = __objc_msgSend_1062Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_uploadTaskWithRequest_fromFile_1 = - _registerName1("uploadTaskWithRequest:fromFile:"); - ffi.Pointer _objc_msgSend_1063( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer fileURL, - ) { - return __objc_msgSend_1063( - obj, - sel, - request, - fileURL, - ); - } - - late final __objc_msgSend_1063Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1063 = __objc_msgSend_1063Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_uploadTaskWithRequest_fromData_1 = - _registerName1("uploadTaskWithRequest:fromData:"); - ffi.Pointer _objc_msgSend_1064( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer bodyData, - ) { - return __objc_msgSend_1064( - obj, - sel, - request, - bodyData, - ); - } - - late final __objc_msgSend_1064Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1064 = __objc_msgSend_1064Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_uploadTaskWithResumeData_1 = - _registerName1("uploadTaskWithResumeData:"); - ffi.Pointer _objc_msgSend_1065( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer resumeData, - ) { - return __objc_msgSend_1065( - obj, - sel, - resumeData, - ); - } - - late final __objc_msgSend_1065Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1065 = __objc_msgSend_1065Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_uploadTaskWithStreamedRequest_1 = - _registerName1("uploadTaskWithStreamedRequest:"); - ffi.Pointer _objc_msgSend_1066( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_1066( - obj, - sel, - request, - ); - } - - late final __objc_msgSend_1066Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1066 = __objc_msgSend_1066Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSURLSessionDownloadTask1 = - _getClass1("NSURLSessionDownloadTask"); - late final _sel_downloadTaskWithRequest_1 = - _registerName1("downloadTaskWithRequest:"); - ffi.Pointer _objc_msgSend_1067( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_1067( - obj, - sel, - request, - ); - } - - late final __objc_msgSend_1067Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1067 = __objc_msgSend_1067Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_downloadTaskWithURL_1 = - _registerName1("downloadTaskWithURL:"); - ffi.Pointer _objc_msgSend_1068( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ) { - return __objc_msgSend_1068( - obj, - sel, - url, - ); - } - - late final __objc_msgSend_1068Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1068 = __objc_msgSend_1068Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_downloadTaskWithResumeData_1 = - _registerName1("downloadTaskWithResumeData:"); - ffi.Pointer _objc_msgSend_1069( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer resumeData, - ) { - return __objc_msgSend_1069( - obj, - sel, - resumeData, - ); - } - - late final __objc_msgSend_1069Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1069 = __objc_msgSend_1069Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSURLSessionStreamTask1 = - _getClass1("NSURLSessionStreamTask"); - late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_1 = - _registerName1( - "readDataOfMinLength:maxLength:timeout:completionHandler:"); - void _objc_msgSend_1070( - ffi.Pointer obj, - ffi.Pointer sel, - int minBytes, - int maxBytes, - double timeout, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1070( - obj, - sel, - minBytes, - maxBytes, - timeout, - completionHandler, - ); - } - - late final __objc_msgSend_1070Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Double, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1070 = __objc_msgSend_1070Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, int, - double, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_writeData_timeout_completionHandler_1 = - _registerName1("writeData:timeout:completionHandler:"); - void _objc_msgSend_1071( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - double timeout, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1071( - obj, - sel, - data, - timeout, - completionHandler, - ); - } - - late final __objc_msgSend_1071Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1071 = __objc_msgSend_1071Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, double, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_captureStreams1 = _registerName1("captureStreams"); - late final _sel_closeWrite1 = _registerName1("closeWrite"); - late final _sel_closeRead1 = _registerName1("closeRead"); - late final _sel_startSecureConnection1 = - _registerName1("startSecureConnection"); - late final _sel_stopSecureConnection1 = - _registerName1("stopSecureConnection"); - late final _sel_streamTaskWithHostName_port_1 = - _registerName1("streamTaskWithHostName:port:"); - ffi.Pointer _objc_msgSend_1072( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer hostname, - int port, - ) { - return __objc_msgSend_1072( - obj, - sel, - hostname, - port, - ); - } - - late final __objc_msgSend_1072Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_1072 = __objc_msgSend_1072Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _class_NSNetService1 = _getClass1("NSNetService"); - late final _sel_initWithDomain_type_name_port_1 = - _registerName1("initWithDomain:type:name:port:"); - instancetype _objc_msgSend_1073( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer domain, - ffi.Pointer type, - ffi.Pointer name, - int port, - ) { - return __objc_msgSend_1073( - obj, - sel, - domain, - type, - name, - port, - ); - } - - late final __objc_msgSend_1073Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int)>>('objc_msgSend'); - late final __objc_msgSend_1073 = __objc_msgSend_1073Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); - - late final _sel_initWithDomain_type_name_1 = - _registerName1("initWithDomain:type:name:"); - instancetype _objc_msgSend_1074( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer domain, - ffi.Pointer type, - ffi.Pointer name, - ) { - return __objc_msgSend_1074( - obj, - sel, - domain, - type, - name, - ); - } - - late final __objc_msgSend_1074Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1074 = __objc_msgSend_1074Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_includesPeerToPeer1 = _registerName1("includesPeerToPeer"); - late final _sel_setIncludesPeerToPeer_1 = - _registerName1("setIncludesPeerToPeer:"); - late final _sel_type1 = _registerName1("type"); - late final _sel_publishWithOptions_1 = _registerName1("publishWithOptions:"); - void _objc_msgSend_1075( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ) { - return __objc_msgSend_1075( - obj, - sel, - options, - ); - } - - late final __objc_msgSend_1075Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1075 = __objc_msgSend_1075Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_resolve1 = _registerName1("resolve"); - late final _sel_stop1 = _registerName1("stop"); - late final _sel_dictionaryFromTXTRecordData_1 = - _registerName1("dictionaryFromTXTRecordData:"); - ffi.Pointer _objc_msgSend_1076( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer txtData, - ) { - return __objc_msgSend_1076( - obj, - sel, - txtData, - ); - } - - late final __objc_msgSend_1076Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1076 = __objc_msgSend_1076Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_dataFromTXTRecordDictionary_1 = - _registerName1("dataFromTXTRecordDictionary:"); - ffi.Pointer _objc_msgSend_1077( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer txtDictionary, - ) { - return __objc_msgSend_1077( - obj, - sel, - txtDictionary, - ); - } - - late final __objc_msgSend_1077Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1077 = __objc_msgSend_1077Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_resolveWithTimeout_1 = _registerName1("resolveWithTimeout:"); - late final _sel_getInputStream_outputStream_1 = - _registerName1("getInputStream:outputStream:"); - bool _objc_msgSend_1078( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream, - ) { - return __objc_msgSend_1078( - obj, - sel, - inputStream, - outputStream, - ); - } - - late final __objc_msgSend_1078Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1078 = __objc_msgSend_1078Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _sel_setTXTRecordData_1 = _registerName1("setTXTRecordData:"); - bool _objc_msgSend_1079( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer recordData, - ) { - return __objc_msgSend_1079( - obj, - sel, - recordData, - ); - } - - late final __objc_msgSend_1079Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1079 = __objc_msgSend_1079Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_TXTRecordData1 = _registerName1("TXTRecordData"); - late final _sel_startMonitoring1 = _registerName1("startMonitoring"); - late final _sel_stopMonitoring1 = _registerName1("stopMonitoring"); - late final _sel_streamTaskWithNetService_1 = - _registerName1("streamTaskWithNetService:"); - ffi.Pointer _objc_msgSend_1080( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer service, - ) { - return __objc_msgSend_1080( - obj, - sel, - service, - ); - } - - late final __objc_msgSend_1080Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1080 = __objc_msgSend_1080Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSURLSessionWebSocketTask1 = - _getClass1("NSURLSessionWebSocketTask"); - late final _class_NSURLSessionWebSocketMessage1 = - _getClass1("NSURLSessionWebSocketMessage"); - int _objc_msgSend_1081( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1081( - obj, - sel, - ); - } - - late final __objc_msgSend_1081Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1081 = __objc_msgSend_1081Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_sendMessage_completionHandler_1 = - _registerName1("sendMessage:completionHandler:"); - void _objc_msgSend_1082( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer message, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1082( - obj, - sel, - message, - completionHandler, - ); - } - - late final __objc_msgSend_1082Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1082 = __objc_msgSend_1082Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_receiveMessageWithCompletionHandler_1 = - _registerName1("receiveMessageWithCompletionHandler:"); - void _objc_msgSend_1083( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1083( - obj, - sel, - completionHandler, - ); - } - - late final __objc_msgSend_1083Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1083 = __objc_msgSend_1083Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_sendPingWithPongReceiveHandler_1 = - _registerName1("sendPingWithPongReceiveHandler:"); - void _objc_msgSend_1084( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> pongReceiveHandler, - ) { - return __objc_msgSend_1084( - obj, - sel, - pongReceiveHandler, - ); - } - - late final __objc_msgSend_1084Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1084 = __objc_msgSend_1084Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_cancelWithCloseCode_reason_1 = - _registerName1("cancelWithCloseCode:reason:"); - void _objc_msgSend_1085( - ffi.Pointer obj, - ffi.Pointer sel, - int closeCode, - ffi.Pointer reason, - ) { - return __objc_msgSend_1085( - obj, - sel, - closeCode, - reason, - ); - } - - late final __objc_msgSend_1085Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1085 = __objc_msgSend_1085Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _sel_maximumMessageSize1 = _registerName1("maximumMessageSize"); - late final _sel_setMaximumMessageSize_1 = - _registerName1("setMaximumMessageSize:"); - late final _sel_closeCode1 = _registerName1("closeCode"); - int _objc_msgSend_1086( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1086( - obj, - sel, - ); - } - - late final __objc_msgSend_1086Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1086 = __objc_msgSend_1086Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_closeReason1 = _registerName1("closeReason"); - late final _sel_webSocketTaskWithURL_1 = - _registerName1("webSocketTaskWithURL:"); - ffi.Pointer _objc_msgSend_1087( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ) { - return __objc_msgSend_1087( - obj, - sel, - url, - ); - } - - late final __objc_msgSend_1087Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1087 = __objc_msgSend_1087Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_webSocketTaskWithURL_protocols_1 = - _registerName1("webSocketTaskWithURL:protocols:"); - ffi.Pointer _objc_msgSend_1088( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer protocols, - ) { - return __objc_msgSend_1088( - obj, - sel, - url, - protocols, - ); - } - - late final __objc_msgSend_1088Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1088 = __objc_msgSend_1088Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_webSocketTaskWithRequest_1 = - _registerName1("webSocketTaskWithRequest:"); - ffi.Pointer _objc_msgSend_1089( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_1089( - obj, - sel, - request, - ); - } - - late final __objc_msgSend_1089Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1089 = __objc_msgSend_1089Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_dataTaskWithRequest_completionHandler_1 = - _registerName1("dataTaskWithRequest:completionHandler:"); - ffi.Pointer _objc_msgSend_1090( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1090( - obj, - sel, - request, - completionHandler, - ); - } - - late final __objc_msgSend_1090Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1090 = __objc_msgSend_1090Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_dataTaskWithURL_completionHandler_1 = - _registerName1("dataTaskWithURL:completionHandler:"); - ffi.Pointer _objc_msgSend_1091( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1091( - obj, - sel, - url, - completionHandler, - ); - } - - late final __objc_msgSend_1091Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1091 = __objc_msgSend_1091Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_uploadTaskWithRequest_fromFile_completionHandler_1 = - _registerName1("uploadTaskWithRequest:fromFile:completionHandler:"); - ffi.Pointer _objc_msgSend_1092( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer fileURL, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1092( - obj, - sel, - request, - fileURL, - completionHandler, - ); - } - - late final __objc_msgSend_1092Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1092 = __objc_msgSend_1092Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_uploadTaskWithRequest_fromData_completionHandler_1 = - _registerName1("uploadTaskWithRequest:fromData:completionHandler:"); - ffi.Pointer _objc_msgSend_1093( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer bodyData, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1093( - obj, - sel, - request, - bodyData, - completionHandler, - ); - } - - late final __objc_msgSend_1093Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1093 = __objc_msgSend_1093Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_uploadTaskWithResumeData_completionHandler_1 = - _registerName1("uploadTaskWithResumeData:completionHandler:"); - ffi.Pointer _objc_msgSend_1094( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer resumeData, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1094( - obj, - sel, - resumeData, - completionHandler, - ); - } - - late final __objc_msgSend_1094Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1094 = __objc_msgSend_1094Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_downloadTaskWithRequest_completionHandler_1 = - _registerName1("downloadTaskWithRequest:completionHandler:"); - ffi.Pointer _objc_msgSend_1095( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1095( - obj, - sel, - request, - completionHandler, - ); - } - - late final __objc_msgSend_1095Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1095 = __objc_msgSend_1095Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_downloadTaskWithURL_completionHandler_1 = - _registerName1("downloadTaskWithURL:completionHandler:"); - ffi.Pointer _objc_msgSend_1096( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1096( - obj, - sel, - url, - completionHandler, - ); - } - - late final __objc_msgSend_1096Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1096 = __objc_msgSend_1096Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_downloadTaskWithResumeData_completionHandler_1 = - _registerName1("downloadTaskWithResumeData:completionHandler:"); - ffi.Pointer _objc_msgSend_1097( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer resumeData, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_1097( - obj, - sel, - resumeData, - completionHandler, - ); - } - - late final __objc_msgSend_1097Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1097 = __objc_msgSend_1097Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _class_NSProtocolChecker1 = _getClass1("NSProtocolChecker"); - ffi.Pointer _objc_msgSend_1098( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1098( - obj, - sel, - ); - } - - late final __objc_msgSend_1098Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1098 = __objc_msgSend_1098Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - ffi.Pointer _objc_msgSend_1099( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1099( - obj, - sel, - ); - } - - late final __objc_msgSend_1099Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1099 = __objc_msgSend_1099Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_protocolCheckerWithTarget_protocol_1 = - _registerName1("protocolCheckerWithTarget:protocol:"); - instancetype _objc_msgSend_1100( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - ffi.Pointer aProtocol, - ) { - return __objc_msgSend_1100( - obj, - sel, - anObject, - aProtocol, - ); - } - - late final __objc_msgSend_1100Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1100 = __objc_msgSend_1100Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithTarget_protocol_1 = - _registerName1("initWithTarget:protocol:"); - late final _class_NSTask1 = _getClass1("NSTask"); - late final _sel_setExecutableURL_1 = _registerName1("setExecutableURL:"); - late final _sel_setEnvironment_1 = _registerName1("setEnvironment:"); - late final _sel_currentDirectoryURL1 = _registerName1("currentDirectoryURL"); - late final _sel_setCurrentDirectoryURL_1 = - _registerName1("setCurrentDirectoryURL:"); - late final _sel_launchRequirementData1 = - _registerName1("launchRequirementData"); - late final _sel_setLaunchRequirementData_1 = - _registerName1("setLaunchRequirementData:"); - late final _sel_standardInput1 = _registerName1("standardInput"); - late final _sel_setStandardInput_1 = _registerName1("setStandardInput:"); - late final _sel_standardOutput1 = _registerName1("standardOutput"); - late final _sel_setStandardOutput_1 = _registerName1("setStandardOutput:"); - late final _sel_standardError1 = _registerName1("standardError"); - late final _sel_setStandardError_1 = _registerName1("setStandardError:"); - late final _sel_launchAndReturnError_1 = - _registerName1("launchAndReturnError:"); - late final _sel_interrupt1 = _registerName1("interrupt"); - late final _sel_terminate1 = _registerName1("terminate"); - late final _sel_isRunning1 = _registerName1("isRunning"); - late final _sel_terminationStatus1 = _registerName1("terminationStatus"); - late final _sel_terminationReason1 = _registerName1("terminationReason"); - int _objc_msgSend_1101( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1101( - obj, - sel, - ); - } - - late final __objc_msgSend_1101Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1101 = __objc_msgSend_1101Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_terminationHandler1 = _registerName1("terminationHandler"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_1102( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1102( - obj, - sel, - ); - } - - late final __objc_msgSend_1102Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1102 = __objc_msgSend_1102Ptr.asFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setTerminationHandler_1 = - _registerName1("setTerminationHandler:"); - void _objc_msgSend_1103( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> value, - ) { - return __objc_msgSend_1103( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1103Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1103 = __objc_msgSend_1103Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_launchedTaskWithExecutableURL_arguments_error_terminationHandler_1 = - _registerName1( - "launchedTaskWithExecutableURL:arguments:error:terminationHandler:"); - ffi.Pointer _objc_msgSend_1104( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer arguments, - ffi.Pointer> error, - ffi.Pointer<_ObjCBlock> terminationHandler, - ) { - return __objc_msgSend_1104( - obj, - sel, - url, - arguments, - error, - terminationHandler, - ); - } - - late final __objc_msgSend_1104Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_1104 = __objc_msgSend_1104Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_waitUntilExit1 = _registerName1("waitUntilExit"); - late final _sel_launchPath1 = _registerName1("launchPath"); - late final _sel_setLaunchPath_1 = _registerName1("setLaunchPath:"); - late final _sel_setCurrentDirectoryPath_1 = - _registerName1("setCurrentDirectoryPath:"); - late final _sel_launch1 = _registerName1("launch"); - late final _sel_launchedTaskWithLaunchPath_arguments_1 = - _registerName1("launchedTaskWithLaunchPath:arguments:"); - ffi.Pointer _objc_msgSend_1105( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer arguments, - ) { - return __objc_msgSend_1105( - obj, - sel, - path, - arguments, - ); - } - - late final __objc_msgSend_1105Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1105 = __objc_msgSend_1105Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSXMLElement1 = _getClass1("NSXMLElement"); - late final _class_NSXMLNode1 = _getClass1("NSXMLNode"); - late final _sel_initWithKind_1 = _registerName1("initWithKind:"); - instancetype _objc_msgSend_1106( - ffi.Pointer obj, - ffi.Pointer sel, - int kind, - ) { - return __objc_msgSend_1106( - obj, - sel, - kind, - ); - } - - late final __objc_msgSend_1106Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1106 = __objc_msgSend_1106Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithKind_options_1 = - _registerName1("initWithKind:options:"); - instancetype _objc_msgSend_1107( - ffi.Pointer obj, - ffi.Pointer sel, - int kind, - int options, - ) { - return __objc_msgSend_1107( - obj, - sel, - kind, - options, - ); - } - - late final __objc_msgSend_1107Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1107 = __objc_msgSend_1107Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, int, int)>(); - - late final _sel_document1 = _registerName1("document"); - late final _sel_documentWithRootElement_1 = - _registerName1("documentWithRootElement:"); - ffi.Pointer _objc_msgSend_1108( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer element, - ) { - return __objc_msgSend_1108( - obj, - sel, - element, - ); - } - - late final __objc_msgSend_1108Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1108 = __objc_msgSend_1108Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_elementWithName_1 = _registerName1("elementWithName:"); - late final _sel_elementWithName_URI_1 = - _registerName1("elementWithName:URI:"); - ffi.Pointer _objc_msgSend_1109( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer URI, - ) { - return __objc_msgSend_1109( - obj, - sel, - name, - URI, - ); - } - - late final __objc_msgSend_1109Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1109 = __objc_msgSend_1109Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_elementWithName_stringValue_1 = - _registerName1("elementWithName:stringValue:"); - late final _sel_elementWithName_children_attributes_1 = - _registerName1("elementWithName:children:attributes:"); - ffi.Pointer _objc_msgSend_1110( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer children, - ffi.Pointer attributes, - ) { - return __objc_msgSend_1110( - obj, - sel, - name, - children, - attributes, - ); - } - - late final __objc_msgSend_1110Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1110 = __objc_msgSend_1110Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_attributeWithName_stringValue_1 = - _registerName1("attributeWithName:stringValue:"); - late final _sel_attributeWithName_URI_stringValue_1 = - _registerName1("attributeWithName:URI:stringValue:"); - late final _sel_namespaceWithName_stringValue_1 = - _registerName1("namespaceWithName:stringValue:"); - late final _sel_processingInstructionWithName_stringValue_1 = - _registerName1("processingInstructionWithName:stringValue:"); - late final _sel_commentWithStringValue_1 = - _registerName1("commentWithStringValue:"); - late final _sel_textWithStringValue_1 = - _registerName1("textWithStringValue:"); - late final _sel_DTDNodeWithXMLString_1 = - _registerName1("DTDNodeWithXMLString:"); - int _objc_msgSend_1111( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1111( - obj, - sel, - ); - } - - late final __objc_msgSend_1111Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1111 = __objc_msgSend_1111Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_objectValue1 = _registerName1("objectValue"); - late final _sel_setObjectValue_1 = _registerName1("setObjectValue:"); - late final _sel_setStringValue_1 = _registerName1("setStringValue:"); - late final _sel_setStringValue_resolvingEntities_1 = - _registerName1("setStringValue:resolvingEntities:"); - void _objc_msgSend_1112( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - bool resolve, - ) { - return __objc_msgSend_1112( - obj, - sel, - string, - resolve, - ); - } - - late final __objc_msgSend_1112Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_1112 = __objc_msgSend_1112Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_index1 = _registerName1("index"); - late final _sel_level1 = _registerName1("level"); - late final _class_NSXMLDocument1 = _getClass1("NSXMLDocument"); - late final _sel_initWithXMLString_options_error_1 = - _registerName1("initWithXMLString:options:error:"); - instancetype _objc_msgSend_1113( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int mask, - ffi.Pointer> error, - ) { - return __objc_msgSend_1113( - obj, - sel, - string, - mask, - error, - ); - } - - late final __objc_msgSend_1113Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1113 = __objc_msgSend_1113Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - instancetype _objc_msgSend_1114( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int mask, - ffi.Pointer> error, - ) { - return __objc_msgSend_1114( - obj, - sel, - url, - mask, - error, - ); - } - - late final __objc_msgSend_1114Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1114 = __objc_msgSend_1114Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_initWithData_options_error_1 = - _registerName1("initWithData:options:error:"); - instancetype _objc_msgSend_1115( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - int mask, - ffi.Pointer> error, - ) { - return __objc_msgSend_1115( - obj, - sel, - data, - mask, - error, - ); - } - - late final __objc_msgSend_1115Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1115 = __objc_msgSend_1115Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_initWithRootElement_1 = - _registerName1("initWithRootElement:"); - instancetype _objc_msgSend_1116( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer element, - ) { - return __objc_msgSend_1116( - obj, - sel, - element, - ); - } - - late final __objc_msgSend_1116Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1116 = __objc_msgSend_1116Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_replacementClassForClass_1 = - _registerName1("replacementClassForClass:"); - late final _sel_characterEncoding1 = _registerName1("characterEncoding"); - late final _sel_setCharacterEncoding_1 = - _registerName1("setCharacterEncoding:"); - late final _sel_isStandalone1 = _registerName1("isStandalone"); - late final _sel_setStandalone_1 = _registerName1("setStandalone:"); - late final _sel_documentContentKind1 = _registerName1("documentContentKind"); - int _objc_msgSend_1117( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1117( - obj, - sel, - ); - } - - late final __objc_msgSend_1117Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1117 = __objc_msgSend_1117Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setDocumentContentKind_1 = - _registerName1("setDocumentContentKind:"); - void _objc_msgSend_1118( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_1118( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1118Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1118 = __objc_msgSend_1118Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_setMIMEType_1 = _registerName1("setMIMEType:"); - late final _class_NSXMLDTD1 = _getClass1("NSXMLDTD"); - late final _sel_setPublicID_1 = _registerName1("setPublicID:"); - late final _sel_setSystemID_1 = _registerName1("setSystemID:"); - late final _sel_insertChild_atIndex_1 = - _registerName1("insertChild:atIndex:"); - void _objc_msgSend_1119( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer child, - int index, - ) { - return __objc_msgSend_1119( - obj, - sel, - child, - index, - ); - } - - late final __objc_msgSend_1119Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_1119 = __objc_msgSend_1119Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_insertChildren_atIndex_1 = - _registerName1("insertChildren:atIndex:"); - void _objc_msgSend_1120( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer children, - int index, - ) { - return __objc_msgSend_1120( - obj, - sel, - children, - index, - ); - } - - late final __objc_msgSend_1120Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_1120 = __objc_msgSend_1120Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_removeChildAtIndex_1 = _registerName1("removeChildAtIndex:"); - late final _sel_setChildren_1 = _registerName1("setChildren:"); - late final _sel_addChild_1 = _registerName1("addChild:"); - void _objc_msgSend_1121( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer child, - ) { - return __objc_msgSend_1121( - obj, - sel, - child, - ); - } - - late final __objc_msgSend_1121Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1121 = __objc_msgSend_1121Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_replaceChildAtIndex_withNode_1 = - _registerName1("replaceChildAtIndex:withNode:"); - void _objc_msgSend_1122( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ffi.Pointer node, - ) { - return __objc_msgSend_1122( - obj, - sel, - index, - node, - ); - } - - late final __objc_msgSend_1122Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1122 = __objc_msgSend_1122Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _class_NSXMLDTDNode1 = _getClass1("NSXMLDTDNode"); - late final _sel_initWithXMLString_1 = _registerName1("initWithXMLString:"); - late final _sel_DTDKind1 = _registerName1("DTDKind"); - int _objc_msgSend_1123( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1123( - obj, - sel, - ); - } - - late final __objc_msgSend_1123Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1123 = __objc_msgSend_1123Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setDTDKind_1 = _registerName1("setDTDKind:"); - void _objc_msgSend_1124( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_1124( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1124Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1124 = __objc_msgSend_1124Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_isExternal1 = _registerName1("isExternal"); - late final _sel_notationName1 = _registerName1("notationName"); - late final _sel_setNotationName_1 = _registerName1("setNotationName:"); - late final _sel_localNameForName_1 = _registerName1("localNameForName:"); - late final _sel_prefixForName_1 = _registerName1("prefixForName:"); - late final _sel_predefinedNamespaceForPrefix_1 = - _registerName1("predefinedNamespaceForPrefix:"); - ffi.Pointer _objc_msgSend_1125( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ) { - return __objc_msgSend_1125( - obj, - sel, - name, - ); - } - - late final __objc_msgSend_1125Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1125 = __objc_msgSend_1125Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_entityDeclarationForName_1 = - _registerName1("entityDeclarationForName:"); - ffi.Pointer _objc_msgSend_1126( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ) { - return __objc_msgSend_1126( - obj, - sel, - name, - ); - } - - late final __objc_msgSend_1126Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1126 = __objc_msgSend_1126Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_notationDeclarationForName_1 = - _registerName1("notationDeclarationForName:"); - late final _sel_elementDeclarationForName_1 = - _registerName1("elementDeclarationForName:"); - late final _sel_attributeDeclarationForName_elementName_1 = - _registerName1("attributeDeclarationForName:elementName:"); - ffi.Pointer _objc_msgSend_1127( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer elementName, - ) { - return __objc_msgSend_1127( - obj, - sel, - name, - elementName, - ); - } - - late final __objc_msgSend_1127Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1127 = __objc_msgSend_1127Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_predefinedEntityDeclarationForName_1 = - _registerName1("predefinedEntityDeclarationForName:"); - late final _sel_DTD1 = _registerName1("DTD"); - ffi.Pointer _objc_msgSend_1128( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1128( - obj, - sel, - ); - } - - late final __objc_msgSend_1128Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1128 = __objc_msgSend_1128Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setDTD_1 = _registerName1("setDTD:"); - void _objc_msgSend_1129( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_1129( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_1129Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1129 = __objc_msgSend_1129Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_setRootElement_1 = _registerName1("setRootElement:"); - void _objc_msgSend_1130( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer root, - ) { - return __objc_msgSend_1130( - obj, - sel, - root, - ); - } - - late final __objc_msgSend_1130Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1130 = __objc_msgSend_1130Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_rootElement1 = _registerName1("rootElement"); - ffi.Pointer _objc_msgSend_1131( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1131( - obj, - sel, - ); - } - - late final __objc_msgSend_1131Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1131 = __objc_msgSend_1131Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_XMLData1 = _registerName1("XMLData"); - late final _sel_XMLDataWithOptions_1 = _registerName1("XMLDataWithOptions:"); - ffi.Pointer _objc_msgSend_1132( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ) { - return __objc_msgSend_1132( - obj, - sel, - options, - ); - } - - late final __objc_msgSend_1132Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1132 = __objc_msgSend_1132Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_objectByApplyingXSLT_arguments_error_1 = - _registerName1("objectByApplyingXSLT:arguments:error:"); - ffi.Pointer _objc_msgSend_1133( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer xslt, - ffi.Pointer arguments, - ffi.Pointer> error, - ) { - return __objc_msgSend_1133( - obj, - sel, - xslt, - arguments, - error, - ); - } - - late final __objc_msgSend_1133Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1133 = __objc_msgSend_1133Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_objectByApplyingXSLTString_arguments_error_1 = - _registerName1("objectByApplyingXSLTString:arguments:error:"); - ffi.Pointer _objc_msgSend_1134( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer xslt, - ffi.Pointer arguments, - ffi.Pointer> error, - ) { - return __objc_msgSend_1134( - obj, - sel, - xslt, - arguments, - error, - ); - } - - late final __objc_msgSend_1134Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1134 = __objc_msgSend_1134Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_objectByApplyingXSLTAtURL_arguments_error_1 = - _registerName1("objectByApplyingXSLTAtURL:arguments:error:"); - ffi.Pointer _objc_msgSend_1135( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer xsltURL, - ffi.Pointer argument, - ffi.Pointer> error, - ) { - return __objc_msgSend_1135( - obj, - sel, - xsltURL, - argument, - error, - ); - } - - late final __objc_msgSend_1135Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1135 = __objc_msgSend_1135Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_validateAndReturnError_1 = - _registerName1("validateAndReturnError:"); - late final _sel_rootDocument1 = _registerName1("rootDocument"); - ffi.Pointer _objc_msgSend_1136( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1136( - obj, - sel, - ); - } - - late final __objc_msgSend_1136Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1136 = __objc_msgSend_1136Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_parent1 = _registerName1("parent"); - ffi.Pointer _objc_msgSend_1137( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_1137( - obj, - sel, - ); - } - - late final __objc_msgSend_1137Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1137 = __objc_msgSend_1137Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_childCount1 = _registerName1("childCount"); - late final _sel_children1 = _registerName1("children"); - late final _sel_childAtIndex_1 = _registerName1("childAtIndex:"); - ffi.Pointer _objc_msgSend_1138( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ) { - return __objc_msgSend_1138( - obj, - sel, - index, - ); - } - - late final __objc_msgSend_1138Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_1138 = __objc_msgSend_1138Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_previousSibling1 = _registerName1("previousSibling"); - late final _sel_nextSibling1 = _registerName1("nextSibling"); - late final _sel_previousNode1 = _registerName1("previousNode"); - late final _sel_nextNode1 = _registerName1("nextNode"); - late final _sel_detach1 = _registerName1("detach"); - late final _sel_XPath1 = _registerName1("XPath"); - late final _sel_localName1 = _registerName1("localName"); - late final _sel_prefix1 = _registerName1("prefix"); - late final _sel_URI1 = _registerName1("URI"); - late final _sel_setURI_1 = _registerName1("setURI:"); - late final _sel_XMLString1 = _registerName1("XMLString"); - late final _sel_XMLStringWithOptions_1 = - _registerName1("XMLStringWithOptions:"); - ffi.Pointer _objc_msgSend_1139( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ) { - return __objc_msgSend_1139( - obj, - sel, - options, - ); - } - - late final __objc_msgSend_1139Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_1139 = __objc_msgSend_1139Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_canonicalXMLStringPreservingComments_1 = - _registerName1("canonicalXMLStringPreservingComments:"); - ffi.Pointer _objc_msgSend_1140( - ffi.Pointer obj, - ffi.Pointer sel, - bool comments, - ) { - return __objc_msgSend_1140( - obj, - sel, - comments, - ); - } - - late final __objc_msgSend_1140Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_1140 = __objc_msgSend_1140Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_nodesForXPath_error_1 = - _registerName1("nodesForXPath:error:"); - late final _sel_objectsForXQuery_constants_error_1 = - _registerName1("objectsForXQuery:constants:error:"); - ffi.Pointer _objc_msgSend_1141( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer xquery, - ffi.Pointer constants, - ffi.Pointer> error, - ) { - return __objc_msgSend_1141( - obj, - sel, - xquery, - constants, - error, - ); - } - - late final __objc_msgSend_1141Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_1141 = __objc_msgSend_1141Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_objectsForXQuery_error_1 = - _registerName1("objectsForXQuery:error:"); - late final _sel_initWithName_URI_1 = _registerName1("initWithName:URI:"); - instancetype _objc_msgSend_1142( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer URI, - ) { - return __objc_msgSend_1142( - obj, - sel, - name, - URI, - ); - } - - late final __objc_msgSend_1142Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1142 = __objc_msgSend_1142Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithName_stringValue_1 = - _registerName1("initWithName:stringValue:"); - late final _sel_initWithXMLString_error_1 = - _registerName1("initWithXMLString:error:"); - late final _sel_elementsForName_1 = _registerName1("elementsForName:"); - late final _sel_elementsForLocalName_URI_1 = - _registerName1("elementsForLocalName:URI:"); - ffi.Pointer _objc_msgSend_1143( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer localName, - ffi.Pointer URI, - ) { - return __objc_msgSend_1143( - obj, - sel, - localName, - URI, - ); - } - - late final __objc_msgSend_1143Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1143 = __objc_msgSend_1143Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_addAttribute_1 = _registerName1("addAttribute:"); - late final _sel_removeAttributeForName_1 = - _registerName1("removeAttributeForName:"); - late final _sel_attributes1 = _registerName1("attributes"); - late final _sel_setAttributes_1 = _registerName1("setAttributes:"); - late final _sel_setAttributesWithDictionary_1 = - _registerName1("setAttributesWithDictionary:"); - late final _sel_attributeForName_1 = _registerName1("attributeForName:"); - late final _sel_attributeForLocalName_URI_1 = - _registerName1("attributeForLocalName:URI:"); - ffi.Pointer _objc_msgSend_1144( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer localName, - ffi.Pointer URI, - ) { - return __objc_msgSend_1144( - obj, - sel, - localName, - URI, - ); - } - - late final __objc_msgSend_1144Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1144 = __objc_msgSend_1144Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_addNamespace_1 = _registerName1("addNamespace:"); - late final _sel_removeNamespaceForPrefix_1 = - _registerName1("removeNamespaceForPrefix:"); - late final _sel_namespaces1 = _registerName1("namespaces"); - late final _sel_setNamespaces_1 = _registerName1("setNamespaces:"); - late final _sel_namespaceForPrefix_1 = _registerName1("namespaceForPrefix:"); - late final _sel_resolveNamespaceForName_1 = - _registerName1("resolveNamespaceForName:"); - late final _sel_resolvePrefixForNamespaceURI_1 = - _registerName1("resolvePrefixForNamespaceURI:"); - late final _sel_normalizeAdjacentTextNodesPreservingCDATA_1 = - _registerName1("normalizeAdjacentTextNodesPreservingCDATA:"); - late final _sel_setAttributesAsDictionary_1 = - _registerName1("setAttributesAsDictionary:"); - late final _class_SwiftClass1 = _getClass1("swift_module.SwiftClass"); - late final _sel_sayHello1 = _registerName1("sayHello"); - late final _sel_someField1 = _registerName1("someField"); - late final _sel_setSomeField_1 = _registerName1("setSomeField:"); -} - -class _ObjCWrapper implements ffi.Finalizable { - final ffi.Pointer _id; - final SwiftLibrary _lib; - bool _pendingRelease; - - _ObjCWrapper._(this._id, this._lib, - {bool retain = false, bool release = false}) - : _pendingRelease = release { - if (retain) { - _lib._objc_retain(_id.cast()); - } - if (release) { - _lib._objc_releaseFinalizer2.attach(this, _id.cast(), detach: this); - } - } - - /// Releases the reference to the underlying ObjC object held by this wrapper. - /// Throws a StateError if this wrapper doesn't currently hold a reference. - void release() { - if (_pendingRelease) { - _pendingRelease = false; - _lib._objc_release(_id.cast()); - _lib._objc_releaseFinalizer2.detach(this); - } else { - throw StateError( - 'Released an ObjC object that was unowned or already released.'); - } - } - - @override - bool operator ==(Object other) { - return other is _ObjCWrapper && _id == other._id; - } - - @override - int get hashCode => _id.hashCode; - - /// Return a pointer to this object. - ffi.Pointer get pointer => _id; - - ffi.Pointer retainAndReturnPointer() { - _lib._objc_retain(_id.cast()); - return _id; - } -} - -class NSObject extends _ObjCWrapper { - NSObject._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSObject] that points to the same underlying object as [other]. - static NSObject castFrom(T other) { - return NSObject._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSObject] that wraps the given raw object pointer. - static NSObject castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSObject._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSObject]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSObject1); - } - - static void load(SwiftLibrary _lib) { - _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_load1); - } - - static void initialize(SwiftLibrary _lib) { - _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_initialize1); - } - - NSObject init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_new1); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - static NSObject allocWithZone_(SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSObject1, _lib._sel_allocWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - static NSObject alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_alloc1); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - void dealloc() { - _lib._objc_msgSend_1(_id, _lib._sel_dealloc1); - } - - void finalize() { - _lib._objc_msgSend_1(_id, _lib._sel_finalize1); - } - - NSObject copy() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_copy1); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - NSObject mutableCopy() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_mutableCopy1); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - static NSObject copyWithZone_(SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSObject1, _lib._sel_copyWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - static NSObject mutableCopyWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSObject1, _lib._sel_mutableCopyWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - static bool instancesRespondToSelector_( - SwiftLibrary _lib, ffi.Pointer aSelector) { - return _lib._objc_msgSend_4(_lib._class_NSObject1, - _lib._sel_instancesRespondToSelector_1, aSelector); - } - - static bool conformsToProtocol_(SwiftLibrary _lib, Protocol protocol) { - return _lib._objc_msgSend_5( - _lib._class_NSObject1, _lib._sel_conformsToProtocol_1, protocol._id); - } - - ffi.Pointer> methodForSelector_( - ffi.Pointer aSelector) { - return _lib._objc_msgSend_6(_id, _lib._sel_methodForSelector_1, aSelector); - } - - static ffi.Pointer> - instanceMethodForSelector_( - SwiftLibrary _lib, ffi.Pointer aSelector) { - return _lib._objc_msgSend_6(_lib._class_NSObject1, - _lib._sel_instanceMethodForSelector_1, aSelector); - } - - void doesNotRecognizeSelector_(ffi.Pointer aSelector) { - _lib._objc_msgSend_7(_id, _lib._sel_doesNotRecognizeSelector_1, aSelector); - } - - NSObject forwardingTargetForSelector_(ffi.Pointer aSelector) { - final _ret = _lib._objc_msgSend_8( - _id, _lib._sel_forwardingTargetForSelector_1, aSelector); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - void forwardInvocation_(NSInvocation anInvocation) { - _lib._objc_msgSend_421( - _id, _lib._sel_forwardInvocation_1, anInvocation._id); - } - - NSMethodSignature methodSignatureForSelector_( - ffi.Pointer aSelector) { - final _ret = _lib._objc_msgSend_422( - _id, _lib._sel_methodSignatureForSelector_1, aSelector); - return NSMethodSignature._(_ret, _lib, retain: true, release: true); - } - - static NSMethodSignature instanceMethodSignatureForSelector_( - SwiftLibrary _lib, ffi.Pointer aSelector) { - final _ret = _lib._objc_msgSend_422(_lib._class_NSObject1, - _lib._sel_instanceMethodSignatureForSelector_1, aSelector); - return NSMethodSignature._(_ret, _lib, retain: true, release: true); - } - - bool allowsWeakReference() { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsWeakReference1); - } - - bool retainWeakReference() { - return _lib._objc_msgSend_12(_id, _lib._sel_retainWeakReference1); - } - - static bool isSubclassOfClass_(SwiftLibrary _lib, NSObject aClass) { - return _lib._objc_msgSend_0( - _lib._class_NSObject1, _lib._sel_isSubclassOfClass_1, aClass._id); - } - - static bool resolveClassMethod_(SwiftLibrary _lib, ffi.Pointer sel) { - return _lib._objc_msgSend_4( - _lib._class_NSObject1, _lib._sel_resolveClassMethod_1, sel); - } - - static bool resolveInstanceMethod_( - SwiftLibrary _lib, ffi.Pointer sel) { - return _lib._objc_msgSend_4( - _lib._class_NSObject1, _lib._sel_resolveInstanceMethod_1, sel); - } - - static int hash(SwiftLibrary _lib) { - return _lib._objc_msgSend_10(_lib._class_NSObject1, _lib._sel_hash1); - } - - static NSObject superclass(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_superclass1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject class1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_class1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSString description(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_21(_lib._class_NSObject1, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString debugDescription(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_21( - _lib._class_NSObject1, _lib._sel_debugDescription1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static int version(SwiftLibrary _lib) { - return _lib._objc_msgSend_83(_lib._class_NSObject1, _lib._sel_version1); - } - - static void setVersion_(SwiftLibrary _lib, int aVersion) { - _lib._objc_msgSend_423( - _lib._class_NSObject1, _lib._sel_setVersion_1, aVersion); - } - - NSObject get classForCoder { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_classForCoder1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? replacementObjectForCoder_(NSCoder coder) { - final _ret = _lib._objc_msgSend_47( - _id, _lib._sel_replacementObjectForCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? awakeAfterUsingCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_awakeAfterUsingCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: false, release: true); - } - - static void poseAsClass_(SwiftLibrary _lib, NSObject aClass) { - _lib._objc_msgSend_15( - _lib._class_NSObject1, _lib._sel_poseAsClass_1, aClass._id); - } - - NSObject get autoContentAccessingProxy { - final _ret = - _lib._objc_msgSend_2(_id, _lib._sel_autoContentAccessingProxy1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - void - attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_( - NSError error, - int recoveryOptionIndex, - NSObject? delegate, - ffi.Pointer didRecoverSelector, - ffi.Pointer contextInfo) { - _lib._objc_msgSend_424( - _id, - _lib._sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1, - error._id, - recoveryOptionIndex, - delegate?._id ?? ffi.nullptr, - didRecoverSelector, - contextInfo); - } - - bool attemptRecoveryFromError_optionIndex_( - NSError error, int recoveryOptionIndex) { - return _lib._objc_msgSend_425( - _id, - _lib._sel_attemptRecoveryFromError_optionIndex_1, - error._id, - recoveryOptionIndex); - } - - void performSelector_withObject_afterDelay_inModes_( - ffi.Pointer aSelector, - NSObject? anArgument, - double delay, - NSArray modes) { - _lib._objc_msgSend_426( - _id, - _lib._sel_performSelector_withObject_afterDelay_inModes_1, - aSelector, - anArgument?._id ?? ffi.nullptr, - delay, - modes._id); - } - - void performSelector_withObject_afterDelay_( - ffi.Pointer aSelector, NSObject? anArgument, double delay) { - _lib._objc_msgSend_427( - _id, - _lib._sel_performSelector_withObject_afterDelay_1, - aSelector, - anArgument?._id ?? ffi.nullptr, - delay); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSObject1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSObject1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - void URL_resourceDataDidBecomeAvailable_(NSURL sender, NSData newBytes) { - _lib._objc_msgSend_428(_id, _lib._sel_URL_resourceDataDidBecomeAvailable_1, - sender._id, newBytes._id); - } - - void URLResourceDidFinishLoading_(NSURL sender) { - _lib._objc_msgSend_429( - _id, _lib._sel_URLResourceDidFinishLoading_1, sender._id); - } - - void URLResourceDidCancelLoading_(NSURL sender) { - _lib._objc_msgSend_429( - _id, _lib._sel_URLResourceDidCancelLoading_1, sender._id); - } - - void URL_resourceDidFailLoadingWithReason_(NSURL sender, NSString reason) { - _lib._objc_msgSend_430( - _id, - _lib._sel_URL_resourceDidFailLoadingWithReason_1, - sender._id, - reason._id); - } - - bool fileManager_shouldProceedAfterError_( - NSFileManager fm, NSDictionary errorInfo) { - return _lib._objc_msgSend_467(_id, - _lib._sel_fileManager_shouldProceedAfterError_1, fm._id, errorInfo._id); - } - - void fileManager_willProcessPath_(NSFileManager fm, NSString path) { - _lib._objc_msgSend_468( - _id, _lib._sel_fileManager_willProcessPath_1, fm._id, path._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSObject1, _lib._sel_accessInstanceVariablesDirectly1); - } - - NSObject? valueForKey_(NSString key) { - final _ret = _lib._objc_msgSend_38(_id, _lib._sel_valueForKey_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void setValue_forKey_(NSObject? value, NSString key) { - _lib._objc_msgSend_135( - _id, _lib._sel_setValue_forKey_1, value?._id ?? ffi.nullptr, key._id); - } - - bool validateValue_forKey_error_(ffi.Pointer> ioValue, - NSString inKey, ffi.Pointer> outError) { - return _lib._objc_msgSend_243(_id, _lib._sel_validateValue_forKey_error_1, - ioValue, inKey._id, outError); - } - - NSMutableArray mutableArrayValueForKey_(NSString key) { - final _ret = _lib._objc_msgSend_488( - _id, _lib._sel_mutableArrayValueForKey_1, key._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - NSMutableOrderedSet mutableOrderedSetValueForKey_(NSString key) { - final _ret = _lib._objc_msgSend_506( - _id, _lib._sel_mutableOrderedSetValueForKey_1, key._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSMutableSet mutableSetValueForKey_(NSString key) { - final _ret = - _lib._objc_msgSend_507(_id, _lib._sel_mutableSetValueForKey_1, key._id); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - NSObject? valueForKeyPath_(NSString keyPath) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_valueForKeyPath_1, keyPath._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void setValue_forKeyPath_(NSObject? value, NSString keyPath) { - _lib._objc_msgSend_135(_id, _lib._sel_setValue_forKeyPath_1, - value?._id ?? ffi.nullptr, keyPath._id); - } - - bool validateValue_forKeyPath_error_( - ffi.Pointer> ioValue, - NSString inKeyPath, - ffi.Pointer> outError) { - return _lib._objc_msgSend_243( - _id, - _lib._sel_validateValue_forKeyPath_error_1, - ioValue, - inKeyPath._id, - outError); - } - - NSMutableArray mutableArrayValueForKeyPath_(NSString keyPath) { - final _ret = _lib._objc_msgSend_488( - _id, _lib._sel_mutableArrayValueForKeyPath_1, keyPath._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - NSMutableOrderedSet mutableOrderedSetValueForKeyPath_(NSString keyPath) { - final _ret = _lib._objc_msgSend_506( - _id, _lib._sel_mutableOrderedSetValueForKeyPath_1, keyPath._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSMutableSet mutableSetValueForKeyPath_(NSString keyPath) { - final _ret = _lib._objc_msgSend_507( - _id, _lib._sel_mutableSetValueForKeyPath_1, keyPath._id); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - NSObject? valueForUndefinedKey_(NSString key) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_valueForUndefinedKey_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void setValue_forUndefinedKey_(NSObject? value, NSString key) { - _lib._objc_msgSend_135(_id, _lib._sel_setValue_forUndefinedKey_1, - value?._id ?? ffi.nullptr, key._id); - } - - void setNilValueForKey_(NSString key) { - _lib._objc_msgSend_247(_id, _lib._sel_setNilValueForKey_1, key._id); - } - - NSDictionary dictionaryWithValuesForKeys_(NSArray keys) { - final _ret = _lib._objc_msgSend_508( - _id, _lib._sel_dictionaryWithValuesForKeys_1, keys._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - void setValuesForKeysWithDictionary_(NSDictionary keyedValues) { - _lib._objc_msgSend_509( - _id, _lib._sel_setValuesForKeysWithDictionary_1, keyedValues._id); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSObject1, _lib._sel_useStoredAccessor1); - } - - NSObject? storedValueForKey_(NSString key) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_storedValueForKey_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void takeStoredValue_forKey_(NSObject? value, NSString key) { - _lib._objc_msgSend_135(_id, _lib._sel_takeStoredValue_forKey_1, - value?._id ?? ffi.nullptr, key._id); - } - - void takeValue_forKey_(NSObject? value, NSString key) { - _lib._objc_msgSend_135( - _id, _lib._sel_takeValue_forKey_1, value?._id ?? ffi.nullptr, key._id); - } - - void takeValue_forKeyPath_(NSObject? value, NSString keyPath) { - _lib._objc_msgSend_135(_id, _lib._sel_takeValue_forKeyPath_1, - value?._id ?? ffi.nullptr, keyPath._id); - } - - NSObject? handleQueryWithUnboundKey_(NSString key) { - final _ret = _lib._objc_msgSend_38( - _id, _lib._sel_handleQueryWithUnboundKey_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void handleTakeValue_forUnboundKey_(NSObject? value, NSString key) { - _lib._objc_msgSend_135(_id, _lib._sel_handleTakeValue_forUnboundKey_1, - value?._id ?? ffi.nullptr, key._id); - } - - void unableToSetNilForKey_(NSString key) { - _lib._objc_msgSend_247(_id, _lib._sel_unableToSetNilForKey_1, key._id); - } - - NSDictionary valuesForKeys_(NSArray keys) { - final _ret = - _lib._objc_msgSend_508(_id, _lib._sel_valuesForKeys_1, keys._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - void takeValuesFromDictionary_(NSDictionary properties) { - _lib._objc_msgSend_509( - _id, _lib._sel_takeValuesFromDictionary_1, properties._id); - } - - void observeValueForKeyPath_ofObject_change_context_(NSString? keyPath, - NSObject? object, NSDictionary? change, ffi.Pointer context) { - _lib._objc_msgSend_510( - _id, - _lib._sel_observeValueForKeyPath_ofObject_change_context_1, - keyPath?._id ?? ffi.nullptr, - object?._id ?? ffi.nullptr, - change?._id ?? ffi.nullptr, - context); - } - - void addObserver_forKeyPath_options_context_(NSObject observer, - NSString keyPath, int options, ffi.Pointer context) { - _lib._objc_msgSend_139( - _id, - _lib._sel_addObserver_forKeyPath_options_context_1, - observer._id, - keyPath._id, - options, - context); - } - - void removeObserver_forKeyPath_context_( - NSObject observer, NSString keyPath, ffi.Pointer context) { - _lib._objc_msgSend_140(_id, _lib._sel_removeObserver_forKeyPath_context_1, - observer._id, keyPath._id, context); - } - - void removeObserver_forKeyPath_(NSObject observer, NSString keyPath) { - _lib._objc_msgSend_141( - _id, _lib._sel_removeObserver_forKeyPath_1, observer._id, keyPath._id); - } - - void willChangeValueForKey_(NSString key) { - _lib._objc_msgSend_247(_id, _lib._sel_willChangeValueForKey_1, key._id); - } - - void didChangeValueForKey_(NSString key) { - _lib._objc_msgSend_247(_id, _lib._sel_didChangeValueForKey_1, key._id); - } - - void willChange_valuesAtIndexes_forKey_( - int changeKind, NSIndexSet indexes, NSString key) { - _lib._objc_msgSend_511(_id, _lib._sel_willChange_valuesAtIndexes_forKey_1, - changeKind, indexes._id, key._id); - } - - void didChange_valuesAtIndexes_forKey_( - int changeKind, NSIndexSet indexes, NSString key) { - _lib._objc_msgSend_511(_id, _lib._sel_didChange_valuesAtIndexes_forKey_1, - changeKind, indexes._id, key._id); - } - - void willChangeValueForKey_withSetMutation_usingObjects_( - NSString key, int mutationKind, NSSet objects) { - _lib._objc_msgSend_512( - _id, - _lib._sel_willChangeValueForKey_withSetMutation_usingObjects_1, - key._id, - mutationKind, - objects._id); - } - - void didChangeValueForKey_withSetMutation_usingObjects_( - NSString key, int mutationKind, NSSet objects) { - _lib._objc_msgSend_512( - _id, - _lib._sel_didChangeValueForKey_withSetMutation_usingObjects_1, - key._id, - mutationKind, - objects._id); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSObject1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSObject1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - ffi.Pointer get observationInfo { - return _lib._objc_msgSend_20(_id, _lib._sel_observationInfo1); - } - - set observationInfo(ffi.Pointer value) { - return _lib._objc_msgSend_513(_id, _lib._sel_setObservationInfo_1, value); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSObject1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - NSObject? get classForKeyedArchiver { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_classForKeyedArchiver1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? replacementObjectForKeyedArchiver_(NSKeyedArchiver archiver) { - final _ret = _lib._objc_msgSend_528( - _id, _lib._sel_replacementObjectForKeyedArchiver_1, archiver._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSObject1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSObject1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - void performSelectorOnMainThread_withObject_waitUntilDone_modes_( - ffi.Pointer aSelector, - NSObject? arg, - bool wait, - NSArray? array) { - _lib._objc_msgSend_529( - _id, - _lib._sel_performSelectorOnMainThread_withObject_waitUntilDone_modes_1, - aSelector, - arg?._id ?? ffi.nullptr, - wait, - array?._id ?? ffi.nullptr); - } - - void performSelectorOnMainThread_withObject_waitUntilDone_( - ffi.Pointer aSelector, NSObject? arg, bool wait) { - _lib._objc_msgSend_530( - _id, - _lib._sel_performSelectorOnMainThread_withObject_waitUntilDone_1, - aSelector, - arg?._id ?? ffi.nullptr, - wait); - } - - void performSelector_onThread_withObject_waitUntilDone_modes_( - ffi.Pointer aSelector, - NSThread thr, - NSObject? arg, - bool wait, - NSArray? array) { - _lib._objc_msgSend_548( - _id, - _lib._sel_performSelector_onThread_withObject_waitUntilDone_modes_1, - aSelector, - thr._id, - arg?._id ?? ffi.nullptr, - wait, - array?._id ?? ffi.nullptr); - } - - void performSelector_onThread_withObject_waitUntilDone_( - ffi.Pointer aSelector, NSThread thr, NSObject? arg, bool wait) { - _lib._objc_msgSend_549( - _id, - _lib._sel_performSelector_onThread_withObject_waitUntilDone_1, - aSelector, - thr._id, - arg?._id ?? ffi.nullptr, - wait); - } - - void performSelectorInBackground_withObject_( - ffi.Pointer aSelector, NSObject? arg) { - _lib._objc_msgSend_90( - _id, - _lib._sel_performSelectorInBackground_withObject_1, - aSelector, - arg?._id ?? ffi.nullptr); - } - - NSObject? get classForArchiver { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_classForArchiver1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? replacementObjectForArchiver_(NSArchiver archiver) { - final _ret = _lib._objc_msgSend_552( - _id, _lib._sel_replacementObjectForArchiver_1, archiver._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject get classForPortCoder { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_classForPortCoder1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? replacementObjectForPortCoder_(NSPortCoder coder) { - final _ret = _lib._objc_msgSend_597( - _id, _lib._sel_replacementObjectForPortCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSClassDescription get classDescription { - final _ret = _lib._objc_msgSend_600(_id, _lib._sel_classDescription1); - return NSClassDescription._(_ret, _lib, retain: true, release: true); - } - - NSArray get attributeKeys { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_attributeKeys1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray get toOneRelationshipKeys { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_toOneRelationshipKeys1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray get toManyRelationshipKeys { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_toManyRelationshipKeys1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSString? inverseForRelationshipKey_(NSString relationshipKey) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_inverseForRelationshipKey_1, relationshipKey._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSObject? scriptingValueForSpecifier_( - NSScriptObjectSpecifier objectSpecifier) { - final _ret = _lib._objc_msgSend_649( - _id, _lib._sel_scriptingValueForSpecifier_1, objectSpecifier._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? get scriptingProperties { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_scriptingProperties1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - set scriptingProperties(NSDictionary? value) { - return _lib._objc_msgSend_634( - _id, _lib._sel_setScriptingProperties_1, value?._id ?? ffi.nullptr); - } - - NSObject? copyScriptingValue_forKey_withProperties_( - NSObject value, NSString key, NSDictionary properties) { - final _ret = _lib._objc_msgSend_650( - _id, - _lib._sel_copyScriptingValue_forKey_withProperties_1, - value._id, - key._id, - properties._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: false, release: true); - } - - NSObject? - newScriptingObjectOfClass_forValueForKey_withContentsValue_properties_( - NSObject objectClass, - NSString key, - NSObject? contentsValue, - NSDictionary properties) { - final _ret = _lib._objc_msgSend_651( - _id, - _lib._sel_newScriptingObjectOfClass_forValueForKey_withContentsValue_properties_1, - objectClass._id, - key._id, - contentsValue?._id ?? ffi.nullptr, - properties._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: false, release: true); - } - - int get classCode { - return _lib._objc_msgSend_214(_id, _lib._sel_classCode1); - } - - NSString? get className { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_className1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSObject? valueAtIndex_inPropertyWithKey_(int index, NSString key) { - final _ret = _lib._objc_msgSend_652( - _id, _lib._sel_valueAtIndex_inPropertyWithKey_1, index, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? valueWithName_inPropertyWithKey_(NSString name, NSString key) { - final _ret = _lib._objc_msgSend_175( - _id, _lib._sel_valueWithName_inPropertyWithKey_1, name._id, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? valueWithUniqueID_inPropertyWithKey_( - NSObject uniqueID, NSString key) { - final _ret = _lib._objc_msgSend_311(_id, - _lib._sel_valueWithUniqueID_inPropertyWithKey_1, uniqueID._id, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void insertValue_atIndex_inPropertyWithKey_( - NSObject value, int index, NSString key) { - _lib._objc_msgSend_653( - _id, - _lib._sel_insertValue_atIndex_inPropertyWithKey_1, - value._id, - index, - key._id); - } - - void removeValueAtIndex_fromPropertyWithKey_(int index, NSString key) { - _lib._objc_msgSend_654(_id, - _lib._sel_removeValueAtIndex_fromPropertyWithKey_1, index, key._id); - } - - void replaceValueAtIndex_inPropertyWithKey_withValue_( - int index, NSString key, NSObject value) { - _lib._objc_msgSend_655( - _id, - _lib._sel_replaceValueAtIndex_inPropertyWithKey_withValue_1, - index, - key._id, - value._id); - } - - void insertValue_inPropertyWithKey_(NSObject value, NSString key) { - _lib._objc_msgSend_656( - _id, _lib._sel_insertValue_inPropertyWithKey_1, value._id, key._id); - } - - NSObject? coerceValue_forKey_(NSObject? value, NSString key) { - final _ret = _lib._objc_msgSend_657(_id, _lib._sel_coerceValue_forKey_1, - value?._id ?? ffi.nullptr, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSScriptObjectSpecifier? get objectSpecifier { - final _ret = _lib._objc_msgSend_632(_id, _lib._sel_objectSpecifier1); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); - } - - NSArray? indicesOfObjectsByEvaluatingObjectSpecifier_( - NSScriptObjectSpecifier specifier) { - final _ret = _lib._objc_msgSend_658(_id, - _lib._sel_indicesOfObjectsByEvaluatingObjectSpecifier_1, specifier._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - bool isEqualTo_(NSObject? object) { - return _lib._objc_msgSend_217( - _id, _lib._sel_isEqualTo_1, object?._id ?? ffi.nullptr); - } - - bool isLessThanOrEqualTo_(NSObject? object) { - return _lib._objc_msgSend_217( - _id, _lib._sel_isLessThanOrEqualTo_1, object?._id ?? ffi.nullptr); - } - - bool isLessThan_(NSObject? object) { - return _lib._objc_msgSend_217( - _id, _lib._sel_isLessThan_1, object?._id ?? ffi.nullptr); - } - - bool isGreaterThanOrEqualTo_(NSObject? object) { - return _lib._objc_msgSend_217( - _id, _lib._sel_isGreaterThanOrEqualTo_1, object?._id ?? ffi.nullptr); - } - - bool isGreaterThan_(NSObject? object) { - return _lib._objc_msgSend_217( - _id, _lib._sel_isGreaterThan_1, object?._id ?? ffi.nullptr); - } - - bool isNotEqualTo_(NSObject? object) { - return _lib._objc_msgSend_217( - _id, _lib._sel_isNotEqualTo_1, object?._id ?? ffi.nullptr); - } - - bool doesContain_(NSObject object) { - return _lib._objc_msgSend_0(_id, _lib._sel_doesContain_1, object._id); - } - - bool isLike_(NSString object) { - return _lib._objc_msgSend_64(_id, _lib._sel_isLike_1, object._id); - } - - bool isCaseInsensitiveLike_(NSString object) { - return _lib._objc_msgSend_64( - _id, _lib._sel_isCaseInsensitiveLike_1, object._id); - } - - bool scriptingIsEqualTo_(NSObject object) { - return _lib._objc_msgSend_0( - _id, _lib._sel_scriptingIsEqualTo_1, object._id); - } - - bool scriptingIsLessThanOrEqualTo_(NSObject object) { - return _lib._objc_msgSend_0( - _id, _lib._sel_scriptingIsLessThanOrEqualTo_1, object._id); - } - - bool scriptingIsLessThan_(NSObject object) { - return _lib._objc_msgSend_0( - _id, _lib._sel_scriptingIsLessThan_1, object._id); - } - - bool scriptingIsGreaterThanOrEqualTo_(NSObject object) { - return _lib._objc_msgSend_0( - _id, _lib._sel_scriptingIsGreaterThanOrEqualTo_1, object._id); - } - - bool scriptingIsGreaterThan_(NSObject object) { - return _lib._objc_msgSend_0( - _id, _lib._sel_scriptingIsGreaterThan_1, object._id); - } - - bool scriptingBeginsWith_(NSObject object) { - return _lib._objc_msgSend_0( - _id, _lib._sel_scriptingBeginsWith_1, object._id); - } - - bool scriptingEndsWith_(NSObject object) { - return _lib._objc_msgSend_0(_id, _lib._sel_scriptingEndsWith_1, object._id); - } - - bool scriptingContains_(NSObject object) { - return _lib._objc_msgSend_0(_id, _lib._sel_scriptingContains_1, object._id); - } -} - -final class ObjCSel extends ffi.Opaque {} - -final class ObjCObject extends ffi.Opaque {} - -typedef instancetype = ffi.Pointer; -typedef Dartinstancetype = NSObject; - -final class _NSZone extends ffi.Opaque {} - -class Protocol extends _ObjCWrapper { - Protocol._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [Protocol] that points to the same underlying object as [other]. - static Protocol castFrom(T other) { - return Protocol._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [Protocol] that wraps the given raw object pointer. - static Protocol castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return Protocol._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [Protocol]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_Protocol1); - } -} - -class NSInvocation extends NSObject { - NSInvocation._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSInvocation] that points to the same underlying object as [other]. - static NSInvocation castFrom(T other) { - return NSInvocation._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSInvocation] that wraps the given raw object pointer. - static NSInvocation castFromPointer( - SwiftLibrary 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); - } - - static NSInvocation invocationWithMethodSignature_( - SwiftLibrary _lib, NSMethodSignature sig) { - final _ret = _lib._objc_msgSend_414(_lib._class_NSInvocation1, - _lib._sel_invocationWithMethodSignature_1, sig._id); - return NSInvocation._(_ret, _lib, retain: true, release: true); - } - - NSMethodSignature get methodSignature { - final _ret = _lib._objc_msgSend_415(_id, _lib._sel_methodSignature1); - return NSMethodSignature._(_ret, _lib, retain: true, release: true); - } - - void retainArguments() { - _lib._objc_msgSend_1(_id, _lib._sel_retainArguments1); - } - - bool get argumentsRetained { - return _lib._objc_msgSend_12(_id, _lib._sel_argumentsRetained1); - } - - NSObject? get target { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_target1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - set target(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setTarget_1, value?._id ?? ffi.nullptr); - } - - ffi.Pointer get selector { - return _lib._objc_msgSend_417(_id, _lib._sel_selector1); - } - - set selector(ffi.Pointer value) { - return _lib._objc_msgSend_418(_id, _lib._sel_setSelector_1, value); - } - - void getReturnValue_(ffi.Pointer retLoc) { - _lib._objc_msgSend_52(_id, _lib._sel_getReturnValue_1, retLoc); - } - - void setReturnValue_(ffi.Pointer retLoc) { - _lib._objc_msgSend_52(_id, _lib._sel_setReturnValue_1, retLoc); - } - - void getArgument_atIndex_(ffi.Pointer argumentLocation, int idx) { - _lib._objc_msgSend_419( - _id, _lib._sel_getArgument_atIndex_1, argumentLocation, idx); - } - - void setArgument_atIndex_(ffi.Pointer argumentLocation, int idx) { - _lib._objc_msgSend_419( - _id, _lib._sel_setArgument_atIndex_1, argumentLocation, idx); - } - - void invoke() { - _lib._objc_msgSend_1(_id, _lib._sel_invoke1); - } - - void invokeWithTarget_(NSObject target) { - _lib._objc_msgSend_15(_id, _lib._sel_invokeWithTarget_1, target._id); - } - - void invokeUsingIMP_( - ffi.Pointer> imp) { - _lib._objc_msgSend_420(_id, _lib._sel_invokeUsingIMP_1, imp); - } - - @override - NSInvocation init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSInvocation._(_ret, _lib, retain: true, release: true); - } - - static NSInvocation new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSInvocation1, _lib._sel_new1); - return NSInvocation._(_ret, _lib, retain: false, release: true); - } - - static NSInvocation allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSInvocation1, _lib._sel_allocWithZone_1, zone); - return NSInvocation._(_ret, _lib, retain: false, release: true); - } - - static NSInvocation alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSInvocation1, _lib._sel_alloc1); - return NSInvocation._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSInvocation1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSInvocation1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSInvocation1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSInvocation1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSInvocation1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSInvocation1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSInvocation1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSInvocation1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSInvocation1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSMethodSignature extends NSObject { - NSMethodSignature._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSMethodSignature] that points to the same underlying object as [other]. - static NSMethodSignature castFrom(T other) { - return NSMethodSignature._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSMethodSignature] that wraps the given raw object pointer. - static NSMethodSignature castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMethodSignature._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMethodSignature]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMethodSignature1); - } - - static NSMethodSignature? signatureWithObjCTypes_( - SwiftLibrary _lib, ffi.Pointer types) { - final _ret = _lib._objc_msgSend_9(_lib._class_NSMethodSignature1, - _lib._sel_signatureWithObjCTypes_1, types); - return _ret.address == 0 - ? null - : NSMethodSignature._(_ret, _lib, retain: true, release: true); - } - - int get numberOfArguments { - return _lib._objc_msgSend_10(_id, _lib._sel_numberOfArguments1); - } - - ffi.Pointer getArgumentTypeAtIndex_(int idx) { - return _lib._objc_msgSend_11(_id, _lib._sel_getArgumentTypeAtIndex_1, idx); - } - - int get frameLength { - return _lib._objc_msgSend_10(_id, _lib._sel_frameLength1); - } - - bool isOneway() { - return _lib._objc_msgSend_12(_id, _lib._sel_isOneway1); - } - - ffi.Pointer get methodReturnType { - return _lib._objc_msgSend_13(_id, _lib._sel_methodReturnType1); - } - - int get methodReturnLength { - return _lib._objc_msgSend_10(_id, _lib._sel_methodReturnLength1); - } - - @override - NSMethodSignature init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMethodSignature._(_ret, _lib, retain: true, release: true); - } - - static NSMethodSignature new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMethodSignature1, _lib._sel_new1); - return NSMethodSignature._(_ret, _lib, retain: false, release: true); - } - - static NSMethodSignature allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMethodSignature1, _lib._sel_allocWithZone_1, zone); - return NSMethodSignature._(_ret, _lib, retain: false, release: true); - } - - static NSMethodSignature alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMethodSignature1, _lib._sel_alloc1); - return NSMethodSignature._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSMethodSignature1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSMethodSignature1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSMethodSignature1, - _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMethodSignature1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSMethodSignature1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSMethodSignature1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSMethodSignature1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSMethodSignature1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMethodSignature1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSSet extends NSObject { - NSSet._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSSet] that points to the same underlying object as [other]. - static NSSet castFrom(T other) { - return NSSet._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSSet] that wraps the given raw object pointer. - static NSSet castFromPointer(SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSSet._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSSet1); - } - - int get count { - return _lib._objc_msgSend_10(_id, _lib._sel_count1); - } - - NSObject? member_(NSObject object) { - final _ret = _lib._objc_msgSend_16(_id, _lib._sel_member_1, object._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSEnumerator objectEnumerator() { - final _ret = _lib._objc_msgSend_77(_id, _lib._sel_objectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } - - @override - NSSet init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - NSSet initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66( - _id, _lib._sel_initWithObjects_count_1, objects, cnt); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - NSSet? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSSet._(_ret, _lib, retain: true, release: true); - } - - NSArray get allObjects { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_allObjects1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSObject? anyObject() { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_anyObject1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - bool containsObject_(NSObject anObject) { - return _lib._objc_msgSend_0(_id, _lib._sel_containsObject_1, anObject._id); - } - - NSString get description { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _lib._objc_msgSend_70( - _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - bool intersectsSet_(NSSet otherSet) { - return _lib._objc_msgSend_403(_id, _lib._sel_intersectsSet_1, otherSet._id); - } - - bool isEqualToSet_(NSSet otherSet) { - return _lib._objc_msgSend_403(_id, _lib._sel_isEqualToSet_1, otherSet._id); - } - - bool isSubsetOfSet_(NSSet otherSet) { - return _lib._objc_msgSend_403(_id, _lib._sel_isSubsetOfSet_1, otherSet._id); - } - - void makeObjectsPerformSelector_(ffi.Pointer aSelector) { - _lib._objc_msgSend_7( - _id, _lib._sel_makeObjectsPerformSelector_1, aSelector); - } - - void makeObjectsPerformSelector_withObject_( - ffi.Pointer aSelector, NSObject? argument) { - _lib._objc_msgSend_90( - _id, - _lib._sel_makeObjectsPerformSelector_withObject_1, - aSelector, - argument?._id ?? ffi.nullptr); - } - - NSSet setByAddingObject_(NSObject anObject) { - final _ret = _lib._objc_msgSend_404( - _id, _lib._sel_setByAddingObject_1, anObject._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - NSSet setByAddingObjectsFromSet_(NSSet other) { - final _ret = _lib._objc_msgSend_405( - _id, _lib._sel_setByAddingObjectsFromSet_1, other._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - NSSet setByAddingObjectsFromArray_(NSArray other) { - final _ret = _lib._objc_msgSend_406( - _id, _lib._sel_setByAddingObjectsFromArray_1, other._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - void enumerateObjectsUsingBlock_(ObjCBlock_ffiVoid_ObjCObject_bool block) { - _lib._objc_msgSend_407( - _id, _lib._sel_enumerateObjectsUsingBlock_1, block._id); - } - - void enumerateObjectsWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_ObjCObject_bool block) { - _lib._objc_msgSend_408(_id, - _lib._sel_enumerateObjectsWithOptions_usingBlock_1, opts, block._id); - } - - NSSet objectsPassingTest_(ObjCBlock_bool_ObjCObject_bool predicate) { - final _ret = _lib._objc_msgSend_409( - _id, _lib._sel_objectsPassingTest_1, predicate._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - NSSet objectsWithOptions_passingTest_( - int opts, ObjCBlock_bool_ObjCObject_bool predicate) { - final _ret = _lib._objc_msgSend_410( - _id, _lib._sel_objectsWithOptions_passingTest_1, opts, predicate._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static NSSet set1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSSet1, _lib._sel_set1); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static NSSet setWithObject_(SwiftLibrary _lib, NSObject object) { - final _ret = _lib._objc_msgSend_124( - _lib._class_NSSet1, _lib._sel_setWithObject_1, object._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static NSSet setWithObjects_count_(SwiftLibrary _lib, - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66( - _lib._class_NSSet1, _lib._sel_setWithObjects_count_1, objects, cnt); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static NSSet setWithObjects_(SwiftLibrary _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_124( - _lib._class_NSSet1, _lib._sel_setWithObjects_1, firstObj._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static NSSet setWithSet_(SwiftLibrary _lib, NSSet set) { - final _ret = _lib._objc_msgSend_411( - _lib._class_NSSet1, _lib._sel_setWithSet_1, set._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static NSSet setWithArray_(SwiftLibrary _lib, NSArray array) { - final _ret = _lib._objc_msgSend_125( - _lib._class_NSSet1, _lib._sel_setWithArray_1, array._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - NSSet initWithObjects_(NSObject firstObj) { - final _ret = - _lib._objc_msgSend_124(_id, _lib._sel_initWithObjects_1, firstObj._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - NSSet initWithSet_(NSSet set) { - final _ret = _lib._objc_msgSend_411(_id, _lib._sel_initWithSet_1, set._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - NSSet initWithSet_copyItems_(NSSet set, bool flag) { - final _ret = _lib._objc_msgSend_412( - _id, _lib._sel_initWithSet_copyItems_1, set._id, flag); - return NSSet._(_ret, _lib, retain: false, release: true); - } - - NSSet initWithArray_(NSArray array) { - final _ret = - _lib._objc_msgSend_125(_id, _lib._sel_initWithArray_1, array._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - NSObject valueForKey_(NSString key) { - final _ret = _lib._objc_msgSend_31(_id, _lib._sel_valueForKey_1, key._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - @override - void setValue_forKey_(NSObject? value, NSString key) { - _lib._objc_msgSend_135( - _id, _lib._sel_setValue_forKey_1, value?._id ?? ffi.nullptr, key._id); - } - - @override - void addObserver_forKeyPath_options_context_(NSObject observer, - NSString keyPath, int options, ffi.Pointer context) { - _lib._objc_msgSend_139( - _id, - _lib._sel_addObserver_forKeyPath_options_context_1, - observer._id, - keyPath._id, - options, - context); - } - - @override - void removeObserver_forKeyPath_context_( - NSObject observer, NSString keyPath, ffi.Pointer context) { - _lib._objc_msgSend_140(_id, _lib._sel_removeObserver_forKeyPath_context_1, - observer._id, keyPath._id, context); - } - - @override - void removeObserver_forKeyPath_(NSObject observer, NSString keyPath) { - _lib._objc_msgSend_141( - _id, _lib._sel_removeObserver_forKeyPath_1, observer._id, keyPath._id); - } - - NSArray sortedArrayUsingDescriptors_(NSArray sortDescriptors) { - final _ret = _lib._objc_msgSend_68( - _id, _lib._sel_sortedArrayUsingDescriptors_1, sortDescriptors._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSSet filteredSetUsingPredicate_(NSPredicate predicate) { - final _ret = _lib._objc_msgSend_413( - _id, _lib._sel_filteredSetUsingPredicate_1, predicate._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static NSSet new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSSet1, _lib._sel_new1); - return NSSet._(_ret, _lib, retain: false, release: true); - } - - static NSSet allocWithZone_(SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSSet1, _lib._sel_allocWithZone_1, zone); - return NSSet._(_ret, _lib, retain: false, release: true); - } - - static NSSet alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSSet1, _lib._sel_alloc1); - return NSSet._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSSet1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSSet1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSSet1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSSet1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSSet1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSSet1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSSet1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSEnumerator extends NSObject { - NSEnumerator._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSEnumerator] that points to the same underlying object as [other]. - static NSEnumerator castFrom(T other) { - return NSEnumerator._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSEnumerator] that wraps the given raw object pointer. - static NSEnumerator castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSEnumerator._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSEnumerator]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSEnumerator1); - } - - NSObject? nextObject() { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_nextObject1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject get allObjects { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_allObjects1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - @override - NSEnumerator init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } - - static NSEnumerator new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_new1); - return NSEnumerator._(_ret, _lib, retain: false, release: true); - } - - static NSEnumerator allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSEnumerator1, _lib._sel_allocWithZone_1, zone); - return NSEnumerator._(_ret, _lib, retain: false, release: true); - } - - static NSEnumerator alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_alloc1); - return NSEnumerator._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSEnumerator1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSEnumerator1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSEnumerator1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSEnumerator1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSEnumerator1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSEnumerator1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSEnumerator1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSEnumerator1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSEnumerator1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSString extends NSObject { - NSString._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSString] that points to the same underlying object as [other]. - static NSString castFrom(T other) { - return NSString._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSString] that wraps the given raw object pointer. - static NSString castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSString._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSString1); - } - - factory NSString(SwiftLibrary _lib, String str) { - final cstr = str.toNativeUtf16(); - final nsstr = stringWithCharacters_length_(_lib, cstr.cast(), str.length); - pkg_ffi.calloc.free(cstr); - return nsstr; - } - - @override - String toString() { - final data = - dataUsingEncoding_(0x94000100 /* NSUTF16LittleEndianStringEncoding */); - return data!.bytes.cast().toDartString(length: length); - } - - int get length { - return _lib._objc_msgSend_10(_id, _lib._sel_length1); - } - - int characterAtIndex_(int index) { - return _lib._objc_msgSend_18(_id, _lib._sel_characterAtIndex_1, index); - } - - @override - NSString init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString substringFromIndex_(int from) { - final _ret = - _lib._objc_msgSend_332(_id, _lib._sel_substringFromIndex_1, from); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString substringToIndex_(int to) { - final _ret = _lib._objc_msgSend_332(_id, _lib._sel_substringToIndex_1, to); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString substringWithRange_(_NSRange range) { - final _ret = - _lib._objc_msgSend_333(_id, _lib._sel_substringWithRange_1, range); - return NSString._(_ret, _lib, retain: true, release: true); - } - - void getCharacters_range_( - ffi.Pointer buffer, _NSRange range) { - _lib._objc_msgSend_334(_id, _lib._sel_getCharacters_range_1, buffer, range); - } - - int compare_(NSString string) { - return _lib._objc_msgSend_335(_id, _lib._sel_compare_1, string._id); - } - - int compare_options_(NSString string, int mask) { - return _lib._objc_msgSend_336( - _id, _lib._sel_compare_options_1, string._id, mask); - } - - int compare_options_range_( - NSString string, int mask, _NSRange rangeOfReceiverToCompare) { - return _lib._objc_msgSend_337(_id, _lib._sel_compare_options_range_1, - string._id, mask, rangeOfReceiverToCompare); - } - - int compare_options_range_locale_(NSString string, int mask, - _NSRange rangeOfReceiverToCompare, NSObject? locale) { - return _lib._objc_msgSend_338(_id, _lib._sel_compare_options_range_locale_1, - string._id, mask, rangeOfReceiverToCompare, locale?._id ?? ffi.nullptr); - } - - int caseInsensitiveCompare_(NSString string) { - return _lib._objc_msgSend_335( - _id, _lib._sel_caseInsensitiveCompare_1, string._id); - } - - int localizedCompare_(NSString string) { - return _lib._objc_msgSend_335( - _id, _lib._sel_localizedCompare_1, string._id); - } - - int localizedCaseInsensitiveCompare_(NSString string) { - return _lib._objc_msgSend_335( - _id, _lib._sel_localizedCaseInsensitiveCompare_1, string._id); - } - - int localizedStandardCompare_(NSString string) { - return _lib._objc_msgSend_335( - _id, _lib._sel_localizedStandardCompare_1, string._id); - } - - bool isEqualToString_(NSString aString) { - return _lib._objc_msgSend_64(_id, _lib._sel_isEqualToString_1, aString._id); - } - - bool hasPrefix_(NSString str) { - return _lib._objc_msgSend_64(_id, _lib._sel_hasPrefix_1, str._id); - } - - bool hasSuffix_(NSString str) { - return _lib._objc_msgSend_64(_id, _lib._sel_hasSuffix_1, str._id); - } - - NSString commonPrefixWithString_options_(NSString str, int mask) { - final _ret = _lib._objc_msgSend_339( - _id, _lib._sel_commonPrefixWithString_options_1, str._id, mask); - return NSString._(_ret, _lib, retain: true, release: true); - } - - bool containsString_(NSString str) { - return _lib._objc_msgSend_64(_id, _lib._sel_containsString_1, str._id); - } - - bool localizedCaseInsensitiveContainsString_(NSString str) { - return _lib._objc_msgSend_64( - _id, _lib._sel_localizedCaseInsensitiveContainsString_1, str._id); - } - - bool localizedStandardContainsString_(NSString str) { - return _lib._objc_msgSend_64( - _id, _lib._sel_localizedStandardContainsString_1, str._id); - } - - void localizedStandardRangeOfString_( - ffi.Pointer<_NSRange> stret, NSString str) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_340_stret( - stret, _id, _lib._sel_localizedStandardRangeOfString_1, str._id) - : stret.ref = _lib._objc_msgSend_340( - _id, _lib._sel_localizedStandardRangeOfString_1, str._id); - } - - void rangeOfString_(ffi.Pointer<_NSRange> stret, NSString searchString) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_340_stret( - stret, _id, _lib._sel_rangeOfString_1, searchString._id) - : stret.ref = _lib._objc_msgSend_340( - _id, _lib._sel_rangeOfString_1, searchString._id); - } - - void rangeOfString_options_( - ffi.Pointer<_NSRange> stret, NSString searchString, int mask) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_341_stret(stret, _id, - _lib._sel_rangeOfString_options_1, searchString._id, mask) - : stret.ref = _lib._objc_msgSend_341( - _id, _lib._sel_rangeOfString_options_1, searchString._id, mask); - } - - void rangeOfString_options_range_(ffi.Pointer<_NSRange> stret, - NSString searchString, int mask, _NSRange rangeOfReceiverToSearch) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_342_stret( - stret, - _id, - _lib._sel_rangeOfString_options_range_1, - searchString._id, - mask, - rangeOfReceiverToSearch) - : stret.ref = _lib._objc_msgSend_342( - _id, - _lib._sel_rangeOfString_options_range_1, - searchString._id, - mask, - rangeOfReceiverToSearch); - } - - void rangeOfString_options_range_locale_( - ffi.Pointer<_NSRange> stret, - NSString searchString, - int mask, - _NSRange rangeOfReceiverToSearch, - NSLocale? locale) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_343_stret( - stret, - _id, - _lib._sel_rangeOfString_options_range_locale_1, - searchString._id, - mask, - rangeOfReceiverToSearch, - locale?._id ?? ffi.nullptr) - : stret.ref = _lib._objc_msgSend_343( - _id, - _lib._sel_rangeOfString_options_range_locale_1, - searchString._id, - mask, - rangeOfReceiverToSearch, - locale?._id ?? ffi.nullptr); - } - - void rangeOfCharacterFromSet_( - ffi.Pointer<_NSRange> stret, NSCharacterSet searchSet) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_344_stret( - stret, _id, _lib._sel_rangeOfCharacterFromSet_1, searchSet._id) - : stret.ref = _lib._objc_msgSend_344( - _id, _lib._sel_rangeOfCharacterFromSet_1, searchSet._id); - } - - void rangeOfCharacterFromSet_options_( - ffi.Pointer<_NSRange> stret, NSCharacterSet searchSet, int mask) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_345_stret(stret, _id, - _lib._sel_rangeOfCharacterFromSet_options_1, searchSet._id, mask) - : stret.ref = _lib._objc_msgSend_345(_id, - _lib._sel_rangeOfCharacterFromSet_options_1, searchSet._id, mask); - } - - void rangeOfCharacterFromSet_options_range_(ffi.Pointer<_NSRange> stret, - NSCharacterSet searchSet, int mask, _NSRange rangeOfReceiverToSearch) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_346_stret( - stret, - _id, - _lib._sel_rangeOfCharacterFromSet_options_range_1, - searchSet._id, - mask, - rangeOfReceiverToSearch) - : stret.ref = _lib._objc_msgSend_346( - _id, - _lib._sel_rangeOfCharacterFromSet_options_range_1, - searchSet._id, - mask, - rangeOfReceiverToSearch); - } - - void rangeOfComposedCharacterSequenceAtIndex_( - ffi.Pointer<_NSRange> stret, int index) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_347_stret(stret, _id, - _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index) - : stret.ref = _lib._objc_msgSend_347( - _id, _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index); - } - - void rangeOfComposedCharacterSequencesForRange_( - ffi.Pointer<_NSRange> stret, _NSRange range) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_348_stret(stret, _id, - _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range) - : stret.ref = _lib._objc_msgSend_348( - _id, _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range); - } - - NSString stringByAppendingString_(NSString aString) { - final _ret = _lib._objc_msgSend_69( - _id, _lib._sel_stringByAppendingString_1, aString._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString stringByAppendingFormat_(NSString format) { - final _ret = _lib._objc_msgSend_69( - _id, _lib._sel_stringByAppendingFormat_1, format._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - double get doubleValue { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_doubleValue1) - : _lib._objc_msgSend_165(_id, _lib._sel_doubleValue1); - } - - double get floatValue { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_239_fpret(_id, _lib._sel_floatValue1) - : _lib._objc_msgSend_239(_id, _lib._sel_floatValue1); - } - - int get intValue { - return _lib._objc_msgSend_237(_id, _lib._sel_intValue1); - } - - int get integerValue { - return _lib._objc_msgSend_83(_id, _lib._sel_integerValue1); - } - - int get longLongValue { - return _lib._objc_msgSend_238(_id, _lib._sel_longLongValue1); - } - - bool get boolValue { - return _lib._objc_msgSend_12(_id, _lib._sel_boolValue1); - } - - NSString get uppercaseString { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_uppercaseString1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get lowercaseString { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_lowercaseString1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get capitalizedString { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_capitalizedString1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get localizedUppercaseString { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_localizedUppercaseString1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get localizedLowercaseString { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_localizedLowercaseString1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get localizedCapitalizedString { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_localizedCapitalizedString1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString uppercaseStringWithLocale_(NSLocale? locale) { - final _ret = _lib._objc_msgSend_349( - _id, _lib._sel_uppercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString lowercaseStringWithLocale_(NSLocale? locale) { - final _ret = _lib._objc_msgSend_349( - _id, _lib._sel_lowercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString capitalizedStringWithLocale_(NSLocale? locale) { - final _ret = _lib._objc_msgSend_349(_id, - _lib._sel_capitalizedStringWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - void getLineStart_end_contentsEnd_forRange_( - ffi.Pointer startPtr, - ffi.Pointer lineEndPtr, - ffi.Pointer contentsEndPtr, - _NSRange range) { - _lib._objc_msgSend_350( - _id, - _lib._sel_getLineStart_end_contentsEnd_forRange_1, - startPtr, - lineEndPtr, - contentsEndPtr, - range); - } - - void lineRangeForRange_(ffi.Pointer<_NSRange> stret, _NSRange range) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_348_stret( - stret, _id, _lib._sel_lineRangeForRange_1, range) - : stret.ref = - _lib._objc_msgSend_348(_id, _lib._sel_lineRangeForRange_1, range); - } - - void getParagraphStart_end_contentsEnd_forRange_( - ffi.Pointer startPtr, - ffi.Pointer parEndPtr, - ffi.Pointer contentsEndPtr, - _NSRange range) { - _lib._objc_msgSend_350( - _id, - _lib._sel_getParagraphStart_end_contentsEnd_forRange_1, - startPtr, - parEndPtr, - contentsEndPtr, - range); - } - - void paragraphRangeForRange_(ffi.Pointer<_NSRange> stret, _NSRange range) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_348_stret( - stret, _id, _lib._sel_paragraphRangeForRange_1, range) - : stret.ref = _lib._objc_msgSend_348( - _id, _lib._sel_paragraphRangeForRange_1, range); - } - - void enumerateSubstringsInRange_options_usingBlock_(_NSRange range, int opts, - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool block) { - _lib._objc_msgSend_351( - _id, - _lib._sel_enumerateSubstringsInRange_options_usingBlock_1, - range, - opts, - block._id); - } - - void enumerateLinesUsingBlock_(ObjCBlock_ffiVoid_NSString_bool block) { - _lib._objc_msgSend_352( - _id, _lib._sel_enumerateLinesUsingBlock_1, block._id); - } - - ffi.Pointer get UTF8String { - return _lib._objc_msgSend_13(_id, _lib._sel_UTF8String1); - } - - int get fastestEncoding { - return _lib._objc_msgSend_10(_id, _lib._sel_fastestEncoding1); - } - - int get smallestEncoding { - return _lib._objc_msgSend_10(_id, _lib._sel_smallestEncoding1); - } - - NSData? dataUsingEncoding_allowLossyConversion_(int encoding, bool lossy) { - final _ret = _lib._objc_msgSend_353(_id, - _lib._sel_dataUsingEncoding_allowLossyConversion_1, encoding, lossy); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData? dataUsingEncoding_(int encoding) { - final _ret = - _lib._objc_msgSend_354(_id, _lib._sel_dataUsingEncoding_1, encoding); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - bool canBeConvertedToEncoding_(int encoding) { - return _lib._objc_msgSend_97( - _id, _lib._sel_canBeConvertedToEncoding_1, encoding); - } - - ffi.Pointer cStringUsingEncoding_(int encoding) { - return _lib._objc_msgSend_11( - _id, _lib._sel_cStringUsingEncoding_1, encoding); - } - - bool getCString_maxLength_encoding_( - ffi.Pointer buffer, int maxBufferCount, int encoding) { - return _lib._objc_msgSend_355( - _id, - _lib._sel_getCString_maxLength_encoding_1, - buffer, - maxBufferCount, - encoding); - } - - bool getBytes_maxLength_usedLength_encoding_options_range_remainingRange_( - ffi.Pointer buffer, - int maxBufferCount, - ffi.Pointer usedBufferCount, - int encoding, - int options, - _NSRange range, - ffi.Pointer<_NSRange> leftover) { - return _lib._objc_msgSend_356( - _id, - _lib._sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1, - buffer, - maxBufferCount, - usedBufferCount, - encoding, - options, - range, - leftover); - } - - int maximumLengthOfBytesUsingEncoding_(int enc) { - return _lib._objc_msgSend_94( - _id, _lib._sel_maximumLengthOfBytesUsingEncoding_1, enc); - } - - int lengthOfBytesUsingEncoding_(int enc) { - return _lib._objc_msgSend_94( - _id, _lib._sel_lengthOfBytesUsingEncoding_1, enc); - } - - static ffi.Pointer getAvailableStringEncodings( - SwiftLibrary _lib) { - return _lib._objc_msgSend_357( - _lib._class_NSString1, _lib._sel_availableStringEncodings1); - } - - static NSString localizedNameOfStringEncoding_( - SwiftLibrary _lib, int encoding) { - final _ret = _lib._objc_msgSend_332(_lib._class_NSString1, - _lib._sel_localizedNameOfStringEncoding_1, encoding); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static int getDefaultCStringEncoding(SwiftLibrary _lib) { - return _lib._objc_msgSend_10( - _lib._class_NSString1, _lib._sel_defaultCStringEncoding1); - } - - NSString get decomposedStringWithCanonicalMapping { - final _ret = _lib._objc_msgSend_21( - _id, _lib._sel_decomposedStringWithCanonicalMapping1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get precomposedStringWithCanonicalMapping { - final _ret = _lib._objc_msgSend_21( - _id, _lib._sel_precomposedStringWithCanonicalMapping1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get decomposedStringWithCompatibilityMapping { - final _ret = _lib._objc_msgSend_21( - _id, _lib._sel_decomposedStringWithCompatibilityMapping1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get precomposedStringWithCompatibilityMapping { - final _ret = _lib._objc_msgSend_21( - _id, _lib._sel_precomposedStringWithCompatibilityMapping1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSArray componentsSeparatedByString_(NSString separator) { - final _ret = _lib._objc_msgSend_358( - _id, _lib._sel_componentsSeparatedByString_1, separator._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray componentsSeparatedByCharactersInSet_(NSCharacterSet separator) { - final _ret = _lib._objc_msgSend_359( - _id, _lib._sel_componentsSeparatedByCharactersInSet_1, separator._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSString stringByTrimmingCharactersInSet_(NSCharacterSet set) { - final _ret = _lib._objc_msgSend_360( - _id, _lib._sel_stringByTrimmingCharactersInSet_1, set._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString stringByPaddingToLength_withString_startingAtIndex_( - int newLength, NSString padString, int padIndex) { - final _ret = _lib._objc_msgSend_361( - _id, - _lib._sel_stringByPaddingToLength_withString_startingAtIndex_1, - newLength, - padString._id, - padIndex); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString stringByFoldingWithOptions_locale_(int options, NSLocale? locale) { - final _ret = _lib._objc_msgSend_362( - _id, - _lib._sel_stringByFoldingWithOptions_locale_1, - options, - locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString stringByReplacingOccurrencesOfString_withString_options_range_( - NSString target, - NSString replacement, - int options, - _NSRange searchRange) { - final _ret = _lib._objc_msgSend_363( - _id, - _lib._sel_stringByReplacingOccurrencesOfString_withString_options_range_1, - target._id, - replacement._id, - options, - searchRange); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString stringByReplacingOccurrencesOfString_withString_( - NSString target, NSString replacement) { - final _ret = _lib._objc_msgSend_364( - _id, - _lib._sel_stringByReplacingOccurrencesOfString_withString_1, - target._id, - replacement._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString stringByReplacingCharactersInRange_withString_( - _NSRange range, NSString replacement) { - final _ret = _lib._objc_msgSend_365( - _id, - _lib._sel_stringByReplacingCharactersInRange_withString_1, - range, - replacement._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? stringByApplyingTransform_reverse_( - NSString transform, bool reverse) { - final _ret = _lib._objc_msgSend_366(_id, - _lib._sel_stringByApplyingTransform_reverse_1, transform._id, reverse); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - bool writeToURL_atomically_encoding_error_(NSURL url, bool useAuxiliaryFile, - int enc, ffi.Pointer> error) { - return _lib._objc_msgSend_367( - _id, - _lib._sel_writeToURL_atomically_encoding_error_1, - url._id, - useAuxiliaryFile, - enc, - error); - } - - bool writeToFile_atomically_encoding_error_( - NSString path, - bool useAuxiliaryFile, - int enc, - ffi.Pointer> error) { - return _lib._objc_msgSend_368( - _id, - _lib._sel_writeToFile_atomically_encoding_error_1, - path._id, - useAuxiliaryFile, - enc, - error); - } - - NSString get description { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - int get hash { - return _lib._objc_msgSend_10(_id, _lib._sel_hash1); - } - - NSString initWithCharactersNoCopy_length_freeWhenDone_( - ffi.Pointer characters, int length, bool freeBuffer) { - final _ret = _lib._objc_msgSend_369( - _id, - _lib._sel_initWithCharactersNoCopy_length_freeWhenDone_1, - characters, - length, - freeBuffer); - return NSString._(_ret, _lib, retain: false, release: true); - } - - NSString initWithCharactersNoCopy_length_deallocator_( - ffi.Pointer chars, - int len, - ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong? deallocator) { - final _ret = _lib._objc_msgSend_370( - _id, - _lib._sel_initWithCharactersNoCopy_length_deallocator_1, - chars, - len, - deallocator?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: false, release: true); - } - - NSString initWithCharacters_length_( - ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_371( - _id, _lib._sel_initWithCharacters_length_1, characters, length); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithUTF8String_(ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_372( - _id, _lib._sel_initWithUTF8String_1, nullTerminatedCString); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString initWithString_(NSString aString) { - final _ret = - _lib._objc_msgSend_31(_id, _lib._sel_initWithString_1, aString._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString initWithFormat_(NSString format) { - final _ret = - _lib._objc_msgSend_31(_id, _lib._sel_initWithFormat_1, format._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString initWithFormat_arguments_( - NSString format, ffi.Pointer<__va_list_tag> argList) { - final _ret = _lib._objc_msgSend_373( - _id, _lib._sel_initWithFormat_arguments_1, format._id, argList); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString initWithFormat_locale_(NSString format, NSObject? locale) { - final _ret = _lib._objc_msgSend_374(_id, _lib._sel_initWithFormat_locale_1, - format._id, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString initWithFormat_locale_arguments_( - NSString format, NSObject? locale, ffi.Pointer<__va_list_tag> argList) { - final _ret = _lib._objc_msgSend_375( - _id, - _lib._sel_initWithFormat_locale_arguments_1, - format._id, - locale?._id ?? ffi.nullptr, - argList); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithValidatedFormat_validFormatSpecifiers_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_376( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_377( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1, - format._id, - validFormatSpecifiers._id, - locale?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithValidatedFormat_validFormatSpecifiers_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer<__va_list_tag> argList, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_378( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1, - format._id, - validFormatSpecifiers._id, - argList, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? - initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - ffi.Pointer<__va_list_tag> argList, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_379( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1, - format._id, - validFormatSpecifiers._id, - locale?._id ?? ffi.nullptr, - argList, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithData_encoding_(NSData data, int encoding) { - final _ret = _lib._objc_msgSend_380( - _id, _lib._sel_initWithData_encoding_1, data._id, encoding); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithBytes_length_encoding_( - ffi.Pointer bytes, int len, int encoding) { - final _ret = _lib._objc_msgSend_381( - _id, _lib._sel_initWithBytes_length_encoding_1, bytes, len, encoding); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithBytesNoCopy_length_encoding_freeWhenDone_( - ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { - final _ret = _lib._objc_msgSend_382( - _id, - _lib._sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1, - bytes, - len, - encoding, - freeBuffer); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: false, release: true); - } - - NSString? initWithBytesNoCopy_length_encoding_deallocator_( - ffi.Pointer bytes, - int len, - int encoding, - ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { - final _ret = _lib._objc_msgSend_383( - _id, - _lib._sel_initWithBytesNoCopy_length_encoding_deallocator_1, - bytes, - len, - encoding, - deallocator?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: false, release: true); - } - - static NSString string(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_string1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString stringWithString_(SwiftLibrary _lib, NSString string) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSString1, _lib._sel_stringWithString_1, string._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString stringWithCharacters_length_(SwiftLibrary _lib, - ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_371(_lib._class_NSString1, - _lib._sel_stringWithCharacters_length_1, characters, length); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? stringWithUTF8String_( - SwiftLibrary _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_372(_lib._class_NSString1, - _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString stringWithFormat_(SwiftLibrary _lib, NSString format) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSString1, _lib._sel_stringWithFormat_1, format._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString localizedStringWithFormat_( - SwiftLibrary _lib, NSString format) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSString1, - _lib._sel_localizedStringWithFormat_1, format._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? stringWithValidatedFormat_validFormatSpecifiers_error_( - SwiftLibrary _lib, - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_376( - _lib._class_NSString1, - _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? - localizedStringWithValidatedFormat_validFormatSpecifiers_error_( - SwiftLibrary _lib, - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_376( - _lib._class_NSString1, - _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithCString_encoding_( - ffi.Pointer nullTerminatedCString, int encoding) { - final _ret = _lib._objc_msgSend_384(_id, - _lib._sel_initWithCString_encoding_1, nullTerminatedCString, encoding); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? stringWithCString_encoding_( - SwiftLibrary _lib, ffi.Pointer cString, int enc) { - final _ret = _lib._objc_msgSend_384(_lib._class_NSString1, - _lib._sel_stringWithCString_encoding_1, cString, enc); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithContentsOfURL_encoding_error_( - NSURL url, int enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_385(_id, - _lib._sel_initWithContentsOfURL_encoding_error_1, url._id, enc, error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithContentsOfFile_encoding_error_( - NSString path, int enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_386( - _id, - _lib._sel_initWithContentsOfFile_encoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? stringWithContentsOfURL_encoding_error_(SwiftLibrary _lib, - NSURL url, int enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_385( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfURL_encoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? stringWithContentsOfFile_encoding_error_(SwiftLibrary _lib, - NSString path, int enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_386( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfFile_encoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithContentsOfURL_usedEncoding_error_( - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_387( - _id, - _lib._sel_initWithContentsOfURL_usedEncoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithContentsOfFile_usedEncoding_error_( - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_388( - _id, - _lib._sel_initWithContentsOfFile_usedEncoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? stringWithContentsOfURL_usedEncoding_error_( - SwiftLibrary _lib, - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_387( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? stringWithContentsOfFile_usedEncoding_error_( - SwiftLibrary _lib, - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_388( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static int - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - SwiftLibrary _lib, - NSData data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_389( - _lib._class_NSString1, - _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data._id, - opts?._id ?? ffi.nullptr, - string, - usedLossyConversion); - } - - NSObject propertyList() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_propertyList1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? propertyListFromStringsFileFormat() { - final _ret = _lib._objc_msgSend_390( - _id, _lib._sel_propertyListFromStringsFileFormat1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - ffi.Pointer cString() { - return _lib._objc_msgSend_13(_id, _lib._sel_cString1); - } - - ffi.Pointer lossyCString() { - return _lib._objc_msgSend_13(_id, _lib._sel_lossyCString1); - } - - int cStringLength() { - return _lib._objc_msgSend_10(_id, _lib._sel_cStringLength1); - } - - void getCString_(ffi.Pointer bytes) { - _lib._objc_msgSend_290(_id, _lib._sel_getCString_1, bytes); - } - - void getCString_maxLength_(ffi.Pointer bytes, int maxLength) { - _lib._objc_msgSend_391( - _id, _lib._sel_getCString_maxLength_1, bytes, maxLength); - } - - void getCString_maxLength_range_remainingRange_(ffi.Pointer bytes, - int maxLength, _NSRange aRange, ffi.Pointer<_NSRange> leftoverRange) { - _lib._objc_msgSend_392( - _id, - _lib._sel_getCString_maxLength_range_remainingRange_1, - bytes, - maxLength, - aRange, - leftoverRange); - } - - bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_26( - _id, _lib._sel_writeToFile_atomically_1, path._id, useAuxiliaryFile); - } - - bool writeToURL_atomically_(NSURL url, bool atomically) { - return _lib._objc_msgSend_134( - _id, _lib._sel_writeToURL_atomically_1, url._id, atomically); - } - - NSObject? initWithContentsOfFile_(NSString path) { - final _ret = _lib._objc_msgSend_38( - _id, _lib._sel_initWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_277(_id, _lib._sel_initWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject? stringWithContentsOfFile_(SwiftLibrary _lib, NSString path) { - final _ret = _lib._objc_msgSend_38( - _lib._class_NSString1, _lib._sel_stringWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject? stringWithContentsOfURL_(SwiftLibrary _lib, NSURL url) { - final _ret = _lib._objc_msgSend_277( - _lib._class_NSString1, _lib._sel_stringWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? initWithCStringNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool freeBuffer) { - final _ret = _lib._objc_msgSend_393( - _id, - _lib._sel_initWithCStringNoCopy_length_freeWhenDone_1, - bytes, - length, - freeBuffer); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: false, release: true); - } - - NSObject? initWithCString_length_(ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_384( - _id, _lib._sel_initWithCString_length_1, bytes, length); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? initWithCString_(ffi.Pointer bytes) { - final _ret = - _lib._objc_msgSend_372(_id, _lib._sel_initWithCString_1, bytes); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject? stringWithCString_length_( - SwiftLibrary _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_384(_lib._class_NSString1, - _lib._sel_stringWithCString_length_1, bytes, length); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject? stringWithCString_( - SwiftLibrary _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_372( - _lib._class_NSString1, _lib._sel_stringWithCString_1, bytes); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void getCharacters_(ffi.Pointer buffer) { - _lib._objc_msgSend_394(_id, _lib._sel_getCharacters_1, buffer); - } - - NSString variantFittingPresentationWidth_(int width) { - final _ret = _lib._objc_msgSend_395( - _id, _lib._sel_variantFittingPresentationWidth_1, width); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString pathWithComponents_(SwiftLibrary _lib, NSArray components) { - final _ret = _lib._objc_msgSend_396( - _lib._class_NSString1, _lib._sel_pathWithComponents_1, components._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSArray get pathComponents { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_pathComponents1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - bool get absolutePath { - return _lib._objc_msgSend_12(_id, _lib._sel_isAbsolutePath1); - } - - NSString get lastPathComponent { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_lastPathComponent1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get stringByDeletingLastPathComponent { - final _ret = _lib._objc_msgSend_21( - _id, _lib._sel_stringByDeletingLastPathComponent1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString stringByAppendingPathComponent_(NSString str) { - final _ret = _lib._objc_msgSend_69( - _id, _lib._sel_stringByAppendingPathComponent_1, str._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get pathExtension { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_pathExtension1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get stringByDeletingPathExtension { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_stringByDeletingPathExtension1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? stringByAppendingPathExtension_(NSString str) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_stringByAppendingPathExtension_1, str._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get stringByAbbreviatingWithTildeInPath { - final _ret = _lib._objc_msgSend_21( - _id, _lib._sel_stringByAbbreviatingWithTildeInPath1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get stringByExpandingTildeInPath { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_stringByExpandingTildeInPath1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get stringByStandardizingPath { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_stringByStandardizingPath1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get stringByResolvingSymlinksInPath { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_stringByResolvingSymlinksInPath1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSArray stringsByAppendingPaths_(NSArray paths) { - final _ret = _lib._objc_msgSend_68( - _id, _lib._sel_stringsByAppendingPaths_1, paths._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - int completePathIntoString_caseSensitive_matchesIntoArray_filterTypes_( - ffi.Pointer> outputName, - bool flag, - ffi.Pointer> outputArray, - NSArray? filterTypes) { - return _lib._objc_msgSend_397( - _id, - _lib._sel_completePathIntoString_caseSensitive_matchesIntoArray_filterTypes_1, - outputName, - flag, - outputArray, - filterTypes?._id ?? ffi.nullptr); - } - - ffi.Pointer get fileSystemRepresentation { - return _lib._objc_msgSend_13(_id, _lib._sel_fileSystemRepresentation1); - } - - bool getFileSystemRepresentation_maxLength_( - ffi.Pointer cname, int max) { - return _lib._objc_msgSend_242( - _id, _lib._sel_getFileSystemRepresentation_maxLength_1, cname, max); - } - - NSString? stringByAddingPercentEncodingWithAllowedCharacters_( - NSCharacterSet allowedCharacters) { - final _ret = _lib._objc_msgSend_398( - _id, - _lib._sel_stringByAddingPercentEncodingWithAllowedCharacters_1, - allowedCharacters._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get stringByRemovingPercentEncoding { - final _ret = - _lib._objc_msgSend_44(_id, _lib._sel_stringByRemovingPercentEncoding1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? stringByAddingPercentEscapesUsingEncoding_(int enc) { - final _ret = _lib._objc_msgSend_399( - _id, _lib._sel_stringByAddingPercentEscapesUsingEncoding_1, enc); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? stringByReplacingPercentEscapesUsingEncoding_(int enc) { - final _ret = _lib._objc_msgSend_399( - _id, _lib._sel_stringByReplacingPercentEscapesUsingEncoding_1, enc); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSArray linguisticTagsInRange_scheme_options_orthography_tokenRanges_( - _NSRange range, - NSString scheme, - int options, - NSOrthography? orthography, - ffi.Pointer> tokenRanges) { - final _ret = _lib._objc_msgSend_401( - _id, - _lib._sel_linguisticTagsInRange_scheme_options_orthography_tokenRanges_1, - range, - scheme._id, - options, - orthography?._id ?? ffi.nullptr, - tokenRanges); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - void enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock_( - _NSRange range, - NSString scheme, - int options, - NSOrthography? orthography, - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool block) { - _lib._objc_msgSend_402( - _id, - _lib._sel_enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock_1, - range, - scheme._id, - options, - orthography?._id ?? ffi.nullptr, - block._id); - } - - static NSString new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_new1); - return NSString._(_ret, _lib, retain: false, release: true); - } - - static NSString allocWithZone_(SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSString1, _lib._sel_allocWithZone_1, zone); - return NSString._(_ret, _lib, retain: false, release: true); - } - - static NSString alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_alloc1); - return NSString._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSString1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSString1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSString1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSString1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSString1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSString1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSString1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSString1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSString1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -extension StringToNSString on String { - NSString toNSString(SwiftLibrary lib) => NSString(lib, this); -} - -class NSCoder extends NSObject { - NSCoder._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSCoder] that points to the same underlying object as [other]. - static NSCoder castFrom(T other) { - return NSCoder._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSCoder] that wraps the given raw object pointer. - static NSCoder castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCoder._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSCoder]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSCoder1); - } - - void encodeValueOfObjCType_at_( - ffi.Pointer type, ffi.Pointer addr) { - _lib._objc_msgSend_19( - _id, _lib._sel_encodeValueOfObjCType_at_1, type, addr); - } - - void encodeDataObject_(NSData data) { - _lib._objc_msgSend_285(_id, _lib._sel_encodeDataObject_1, data._id); - } - - NSData? decodeDataObject() { - final _ret = _lib._objc_msgSend_286(_id, _lib._sel_decodeDataObject1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - void decodeValueOfObjCType_at_size_( - ffi.Pointer type, ffi.Pointer data, int size) { - _lib._objc_msgSend_287( - _id, _lib._sel_decodeValueOfObjCType_at_size_1, type, data, size); - } - - int versionForClassName_(NSString className) { - return _lib._objc_msgSend_288( - _id, _lib._sel_versionForClassName_1, className._id); - } - - void encodeObject_(NSObject? object) { - _lib._objc_msgSend_289( - _id, _lib._sel_encodeObject_1, object?._id ?? ffi.nullptr); - } - - void encodeRootObject_(NSObject rootObject) { - _lib._objc_msgSend_15(_id, _lib._sel_encodeRootObject_1, rootObject._id); - } - - void encodeBycopyObject_(NSObject? anObject) { - _lib._objc_msgSend_289( - _id, _lib._sel_encodeBycopyObject_1, anObject?._id ?? ffi.nullptr); - } - - void encodeByrefObject_(NSObject? anObject) { - _lib._objc_msgSend_289( - _id, _lib._sel_encodeByrefObject_1, anObject?._id ?? ffi.nullptr); - } - - void encodeConditionalObject_(NSObject? object) { - _lib._objc_msgSend_289( - _id, _lib._sel_encodeConditionalObject_1, object?._id ?? ffi.nullptr); - } - - void encodeValuesOfObjCTypes_(ffi.Pointer types) { - _lib._objc_msgSend_290(_id, _lib._sel_encodeValuesOfObjCTypes_1, types); - } - - void encodeArrayOfObjCType_count_at_( - ffi.Pointer type, int count, ffi.Pointer array) { - _lib._objc_msgSend_291( - _id, _lib._sel_encodeArrayOfObjCType_count_at_1, type, count, array); - } - - void encodeBytes_length_(ffi.Pointer byteaddr, int length) { - _lib._objc_msgSend_22( - _id, _lib._sel_encodeBytes_length_1, byteaddr, length); - } - - NSObject? decodeObject() { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_decodeObject1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? decodeTopLevelObjectAndReturnError_( - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_292( - _id, _lib._sel_decodeTopLevelObjectAndReturnError_1, error); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void decodeValuesOfObjCTypes_(ffi.Pointer types) { - _lib._objc_msgSend_290(_id, _lib._sel_decodeValuesOfObjCTypes_1, types); - } - - void decodeArrayOfObjCType_count_at_( - ffi.Pointer itemType, int count, ffi.Pointer array) { - _lib._objc_msgSend_291(_id, _lib._sel_decodeArrayOfObjCType_count_at_1, - itemType, count, array); - } - - ffi.Pointer decodeBytesWithReturnedLength_( - ffi.Pointer lengthp) { - return _lib._objc_msgSend_293( - _id, _lib._sel_decodeBytesWithReturnedLength_1, lengthp); - } - - void encodePropertyList_(NSObject aPropertyList) { - _lib._objc_msgSend_15( - _id, _lib._sel_encodePropertyList_1, aPropertyList._id); - } - - NSObject? decodePropertyList() { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_decodePropertyList1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void setObjectZone_(ffi.Pointer<_NSZone> zone) { - _lib._objc_msgSend_294(_id, _lib._sel_setObjectZone_1, zone); - } - - ffi.Pointer<_NSZone> objectZone() { - return _lib._objc_msgSend_295(_id, _lib._sel_objectZone1); - } - - int get systemVersion { - return _lib._objc_msgSend_214(_id, _lib._sel_systemVersion1); - } - - bool get allowsKeyedCoding { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsKeyedCoding1); - } - - void encodeObject_forKey_(NSObject? object, NSString key) { - _lib._objc_msgSend_135(_id, _lib._sel_encodeObject_forKey_1, - object?._id ?? ffi.nullptr, key._id); - } - - void encodeConditionalObject_forKey_(NSObject? object, NSString key) { - _lib._objc_msgSend_135(_id, _lib._sel_encodeConditionalObject_forKey_1, - object?._id ?? ffi.nullptr, key._id); - } - - void encodeBool_forKey_(bool value, NSString key) { - _lib._objc_msgSend_296(_id, _lib._sel_encodeBool_forKey_1, value, key._id); - } - - void encodeInt_forKey_(int value, NSString key) { - _lib._objc_msgSend_297(_id, _lib._sel_encodeInt_forKey_1, value, key._id); - } - - void encodeInt32_forKey_(int value, NSString key) { - _lib._objc_msgSend_298(_id, _lib._sel_encodeInt32_forKey_1, value, key._id); - } - - void encodeInt64_forKey_(int value, NSString key) { - _lib._objc_msgSend_299(_id, _lib._sel_encodeInt64_forKey_1, value, key._id); - } - - void encodeFloat_forKey_(double value, NSString key) { - _lib._objc_msgSend_300(_id, _lib._sel_encodeFloat_forKey_1, value, key._id); - } - - void encodeDouble_forKey_(double value, NSString key) { - _lib._objc_msgSend_301( - _id, _lib._sel_encodeDouble_forKey_1, value, key._id); - } - - void encodeBytes_length_forKey_( - ffi.Pointer bytes, int length, NSString key) { - _lib._objc_msgSend_302( - _id, _lib._sel_encodeBytes_length_forKey_1, bytes, length, key._id); - } - - bool containsValueForKey_(NSString key) { - return _lib._objc_msgSend_64(_id, _lib._sel_containsValueForKey_1, key._id); - } - - NSObject? decodeObjectForKey_(NSString key) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_decodeObjectForKey_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? decodeTopLevelObjectForKey_error_( - NSString key, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_303( - _id, _lib._sel_decodeTopLevelObjectForKey_error_1, key._id, error); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - bool decodeBoolForKey_(NSString key) { - return _lib._objc_msgSend_64(_id, _lib._sel_decodeBoolForKey_1, key._id); - } - - int decodeIntForKey_(NSString key) { - return _lib._objc_msgSend_304(_id, _lib._sel_decodeIntForKey_1, key._id); - } - - int decodeInt32ForKey_(NSString key) { - return _lib._objc_msgSend_305(_id, _lib._sel_decodeInt32ForKey_1, key._id); - } - - int decodeInt64ForKey_(NSString key) { - return _lib._objc_msgSend_306(_id, _lib._sel_decodeInt64ForKey_1, key._id); - } - - double decodeFloatForKey_(NSString key) { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_307_fpret( - _id, _lib._sel_decodeFloatForKey_1, key._id) - : _lib._objc_msgSend_307(_id, _lib._sel_decodeFloatForKey_1, key._id); - } - - double decodeDoubleForKey_(NSString key) { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_308_fpret( - _id, _lib._sel_decodeDoubleForKey_1, key._id) - : _lib._objc_msgSend_308(_id, _lib._sel_decodeDoubleForKey_1, key._id); - } - - ffi.Pointer decodeBytesForKey_returnedLength_( - NSString key, ffi.Pointer lengthp) { - return _lib._objc_msgSend_309( - _id, _lib._sel_decodeBytesForKey_returnedLength_1, key._id, lengthp); - } - - void encodeInteger_forKey_(int value, NSString key) { - _lib._objc_msgSend_310( - _id, _lib._sel_encodeInteger_forKey_1, value, key._id); - } - - int decodeIntegerForKey_(NSString key) { - return _lib._objc_msgSend_288( - _id, _lib._sel_decodeIntegerForKey_1, key._id); - } - - bool get requiresSecureCoding { - return _lib._objc_msgSend_12(_id, _lib._sel_requiresSecureCoding1); - } - - NSObject? decodeObjectOfClass_forKey_(NSObject aClass, NSString key) { - final _ret = _lib._objc_msgSend_311( - _id, _lib._sel_decodeObjectOfClass_forKey_1, aClass._id, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? decodeTopLevelObjectOfClass_forKey_error_(NSObject aClass, - NSString key, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_312( - _id, - _lib._sel_decodeTopLevelObjectOfClass_forKey_error_1, - aClass._id, - key._id, - error); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSArray? decodeArrayOfObjectsOfClass_forKey_(NSObject cls, NSString key) { - final _ret = _lib._objc_msgSend_313( - _id, _lib._sel_decodeArrayOfObjectsOfClass_forKey_1, cls._id, key._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? decodeDictionaryWithKeysOfClass_objectsOfClass_forKey_( - NSObject keyCls, NSObject objectCls, NSString key) { - final _ret = _lib._objc_msgSend_314( - _id, - _lib._sel_decodeDictionaryWithKeysOfClass_objectsOfClass_forKey_1, - keyCls._id, - objectCls._id, - key._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSObject? decodeObjectOfClasses_forKey_(NSSet? classes, NSString key) { - final _ret = _lib._objc_msgSend_315( - _id, - _lib._sel_decodeObjectOfClasses_forKey_1, - classes?._id ?? ffi.nullptr, - key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? decodeTopLevelObjectOfClasses_forKey_error_(NSSet? classes, - NSString key, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_316( - _id, - _lib._sel_decodeTopLevelObjectOfClasses_forKey_error_1, - classes?._id ?? ffi.nullptr, - key._id, - error); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSArray? decodeArrayOfObjectsOfClasses_forKey_(NSSet classes, NSString key) { - final _ret = _lib._objc_msgSend_317(_id, - _lib._sel_decodeArrayOfObjectsOfClasses_forKey_1, classes._id, key._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey_( - NSSet keyClasses, NSSet objectClasses, NSString key) { - final _ret = _lib._objc_msgSend_318( - _id, - _lib._sel_decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey_1, - keyClasses._id, - objectClasses._id, - key._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSObject? decodePropertyListForKey_(NSString key) { - final _ret = _lib._objc_msgSend_38( - _id, _lib._sel_decodePropertyListForKey_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSSet? get allowedClasses { - final _ret = _lib._objc_msgSend_319(_id, _lib._sel_allowedClasses1); - return _ret.address == 0 - ? null - : NSSet._(_ret, _lib, retain: true, release: true); - } - - void failWithError_(NSError error) { - _lib._objc_msgSend_320(_id, _lib._sel_failWithError_1, error._id); - } - - int get decodingFailurePolicy { - return _lib._objc_msgSend_321(_id, _lib._sel_decodingFailurePolicy1); - } - - NSError? get error { - final _ret = _lib._objc_msgSend_322(_id, _lib._sel_error1); - return _ret.address == 0 - ? null - : NSError._(_ret, _lib, retain: true, release: true); - } - - void encodeNXObject_(NSObject object) { - _lib._objc_msgSend_15(_id, _lib._sel_encodeNXObject_1, object._id); - } - - NSObject? decodeNXObject() { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_decodeNXObject1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void decodeValueOfObjCType_at_( - ffi.Pointer type, ffi.Pointer data) { - _lib._objc_msgSend_19( - _id, _lib._sel_decodeValueOfObjCType_at_1, type, data); - } - - void encodePoint_(CGPoint point) { - _lib._objc_msgSend_323(_id, _lib._sel_encodePoint_1, point); - } - - void decodePoint(ffi.Pointer stret) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_59_stret(stret, _id, _lib._sel_decodePoint1) - : stret.ref = _lib._objc_msgSend_59(_id, _lib._sel_decodePoint1); - } - - void encodeSize_(CGSize size) { - _lib._objc_msgSend_324(_id, _lib._sel_encodeSize_1, size); - } - - void decodeSize(ffi.Pointer stret) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_60_stret(stret, _id, _lib._sel_decodeSize1) - : stret.ref = _lib._objc_msgSend_60(_id, _lib._sel_decodeSize1); - } - - void encodeRect_(CGRect rect) { - _lib._objc_msgSend_325(_id, _lib._sel_encodeRect_1, rect); - } - - void decodeRect(ffi.Pointer stret) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_61_stret(stret, _id, _lib._sel_decodeRect1) - : stret.ref = _lib._objc_msgSend_61(_id, _lib._sel_decodeRect1); - } - - void encodePoint_forKey_(CGPoint point, NSString key) { - _lib._objc_msgSend_326(_id, _lib._sel_encodePoint_forKey_1, point, key._id); - } - - void encodeSize_forKey_(CGSize size, NSString key) { - _lib._objc_msgSend_327(_id, _lib._sel_encodeSize_forKey_1, size, key._id); - } - - void encodeRect_forKey_(CGRect rect, NSString key) { - _lib._objc_msgSend_328(_id, _lib._sel_encodeRect_forKey_1, rect, key._id); - } - - void decodePointForKey_(ffi.Pointer stret, NSString key) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_329_stret( - stret, _id, _lib._sel_decodePointForKey_1, key._id) - : stret.ref = - _lib._objc_msgSend_329(_id, _lib._sel_decodePointForKey_1, key._id); - } - - void decodeSizeForKey_(ffi.Pointer stret, NSString key) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_330_stret( - stret, _id, _lib._sel_decodeSizeForKey_1, key._id) - : stret.ref = - _lib._objc_msgSend_330(_id, _lib._sel_decodeSizeForKey_1, key._id); - } - - void decodeRectForKey_(ffi.Pointer stret, NSString key) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_331_stret( - stret, _id, _lib._sel_decodeRectForKey_1, key._id) - : stret.ref = - _lib._objc_msgSend_331(_id, _lib._sel_decodeRectForKey_1, key._id); - } - - @override - NSCoder init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSCoder._(_ret, _lib, retain: true, release: true); - } - - static NSCoder new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSCoder1, _lib._sel_new1); - return NSCoder._(_ret, _lib, retain: false, release: true); - } - - static NSCoder allocWithZone_(SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSCoder1, _lib._sel_allocWithZone_1, zone); - return NSCoder._(_ret, _lib, retain: false, release: true); - } - - static NSCoder alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSCoder1, _lib._sel_alloc1); - return NSCoder._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSCoder1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSCoder1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSCoder1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSCoder1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSCoder1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSCoder1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSCoder1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSCoder1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSCoder1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSData extends NSObject { - NSData._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSData] that points to the same underlying object as [other]. - static NSData castFrom(T other) { - return NSData._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSData] that wraps the given raw object pointer. - static NSData castFromPointer(SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSData._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSData1); - } - - int get length { - return _lib._objc_msgSend_10(_id, _lib._sel_length1); - } - - ffi.Pointer get bytes { - return _lib._objc_msgSend_20(_id, _lib._sel_bytes1); - } - - NSString get description { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - void getBytes_length_(ffi.Pointer buffer, int length) { - _lib._objc_msgSend_22(_id, _lib._sel_getBytes_length_1, buffer, length); - } - - void getBytes_range_(ffi.Pointer buffer, _NSRange range) { - _lib._objc_msgSend_23(_id, _lib._sel_getBytes_range_1, buffer, range); - } - - bool isEqualToData_(NSData other) { - return _lib._objc_msgSend_24(_id, _lib._sel_isEqualToData_1, other._id); - } - - NSData subdataWithRange_(_NSRange range) { - final _ret = - _lib._objc_msgSend_25(_id, _lib._sel_subdataWithRange_1, range); - return NSData._(_ret, _lib, retain: true, release: true); - } - - bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_26( - _id, _lib._sel_writeToFile_atomically_1, path._id, useAuxiliaryFile); - } - - bool writeToURL_atomically_(NSURL url, bool atomically) { - return _lib._objc_msgSend_134( - _id, _lib._sel_writeToURL_atomically_1, url._id, atomically); - } - - bool writeToFile_options_error_(NSString path, int writeOptionsMask, - ffi.Pointer> errorPtr) { - return _lib._objc_msgSend_269(_id, _lib._sel_writeToFile_options_error_1, - path._id, writeOptionsMask, errorPtr); - } - - bool writeToURL_options_error_(NSURL url, int writeOptionsMask, - ffi.Pointer> errorPtr) { - return _lib._objc_msgSend_270(_id, _lib._sel_writeToURL_options_error_1, - url._id, writeOptionsMask, errorPtr); - } - - void rangeOfData_options_range_(ffi.Pointer<_NSRange> stret, - NSData dataToFind, int mask, _NSRange searchRange) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_271_stret( - stret, - _id, - _lib._sel_rangeOfData_options_range_1, - dataToFind._id, - mask, - searchRange) - : stret.ref = _lib._objc_msgSend_271( - _id, - _lib._sel_rangeOfData_options_range_1, - dataToFind._id, - mask, - searchRange); - } - - void enumerateByteRangesUsingBlock_( - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool block) { - _lib._objc_msgSend_272( - _id, _lib._sel_enumerateByteRangesUsingBlock_1, block._id); - } - - static NSData data(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_data1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - static NSData dataWithBytes_length_( - SwiftLibrary _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_273( - _lib._class_NSData1, _lib._sel_dataWithBytes_length_1, bytes, length); - return NSData._(_ret, _lib, retain: true, release: true); - } - - static NSData dataWithBytesNoCopy_length_( - SwiftLibrary _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_273(_lib._class_NSData1, - _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); - return NSData._(_ret, _lib, retain: false, release: true); - } - - static NSData dataWithBytesNoCopy_length_freeWhenDone_( - SwiftLibrary _lib, ffi.Pointer bytes, int length, bool b) { - final _ret = _lib._objc_msgSend_274(_lib._class_NSData1, - _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSData._(_ret, _lib, retain: false, release: true); - } - - static NSData? dataWithContentsOfFile_options_error_( - SwiftLibrary _lib, - NSString path, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_275( - _lib._class_NSData1, - _lib._sel_dataWithContentsOfFile_options_error_1, - path._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - static NSData? dataWithContentsOfURL_options_error_( - SwiftLibrary _lib, - NSURL url, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_276( - _lib._class_NSData1, - _lib._sel_dataWithContentsOfURL_options_error_1, - url._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - static NSData? dataWithContentsOfFile_(SwiftLibrary _lib, NSString path) { - final _ret = _lib._objc_msgSend_38( - _lib._class_NSData1, _lib._sel_dataWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - static NSData? dataWithContentsOfURL_(SwiftLibrary _lib, NSURL url) { - final _ret = _lib._objc_msgSend_277( - _lib._class_NSData1, _lib._sel_dataWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData initWithBytes_length_(ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_273( - _id, _lib._sel_initWithBytes_length_1, bytes, length); - return NSData._(_ret, _lib, retain: true, release: true); - } - - NSData initWithBytesNoCopy_length_(ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_273( - _id, _lib._sel_initWithBytesNoCopy_length_1, bytes, length); - return NSData._(_ret, _lib, retain: false, release: true); - } - - NSData initWithBytesNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool b) { - final _ret = _lib._objc_msgSend_274(_id, - _lib._sel_initWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSData._(_ret, _lib, retain: false, release: true); - } - - NSData initWithBytesNoCopy_length_deallocator_(ffi.Pointer bytes, - int length, ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { - final _ret = _lib._objc_msgSend_278( - _id, - _lib._sel_initWithBytesNoCopy_length_deallocator_1, - bytes, - length, - deallocator?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: false, release: true); - } - - NSData? initWithContentsOfFile_options_error_(NSString path, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_275( - _id, - _lib._sel_initWithContentsOfFile_options_error_1, - path._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData? initWithContentsOfURL_options_error_(NSURL url, int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_276( - _id, - _lib._sel_initWithContentsOfURL_options_error_1, - url._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData? initWithContentsOfFile_(NSString path) { - final _ret = _lib._objc_msgSend_38( - _id, _lib._sel_initWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_277(_id, _lib._sel_initWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData initWithData_(NSData data) { - final _ret = - _lib._objc_msgSend_279(_id, _lib._sel_initWithData_1, data._id); - return NSData._(_ret, _lib, retain: true, release: true); - } - - static NSData dataWithData_(SwiftLibrary _lib, NSData data) { - final _ret = _lib._objc_msgSend_279( - _lib._class_NSData1, _lib._sel_dataWithData_1, data._id); - return NSData._(_ret, _lib, retain: true, release: true); - } - - NSData? initWithBase64EncodedString_options_( - NSString base64String, int options) { - final _ret = _lib._objc_msgSend_280( - _id, - _lib._sel_initWithBase64EncodedString_options_1, - base64String._id, - options); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSString base64EncodedStringWithOptions_(int options) { - final _ret = _lib._objc_msgSend_281( - _id, _lib._sel_base64EncodedStringWithOptions_1, options); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSData? initWithBase64EncodedData_options_(NSData base64Data, int options) { - final _ret = _lib._objc_msgSend_282(_id, - _lib._sel_initWithBase64EncodedData_options_1, base64Data._id, options); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData base64EncodedDataWithOptions_(int options) { - final _ret = _lib._objc_msgSend_283( - _id, _lib._sel_base64EncodedDataWithOptions_1, options); - return NSData._(_ret, _lib, retain: true, release: true); - } - - NSData? decompressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_284(_id, - _lib._sel_decompressedDataUsingAlgorithm_error_1, algorithm, error); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData? compressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_284( - _id, _lib._sel_compressedDataUsingAlgorithm_error_1, algorithm, error); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - void getBytes_(ffi.Pointer buffer) { - _lib._objc_msgSend_52(_id, _lib._sel_getBytes_1, buffer); - } - - static NSObject? dataWithContentsOfMappedFile_( - SwiftLibrary _lib, NSString path) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSData1, - _lib._sel_dataWithContentsOfMappedFile_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? initWithContentsOfMappedFile_(NSString path) { - final _ret = _lib._objc_msgSend_38( - _id, _lib._sel_initWithContentsOfMappedFile_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? initWithBase64Encoding_(NSString base64String) { - final _ret = _lib._objc_msgSend_38( - _id, _lib._sel_initWithBase64Encoding_1, base64String._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSString base64Encoding() { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_base64Encoding1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - @override - NSData init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - static NSData new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_new1); - return NSData._(_ret, _lib, retain: false, release: true); - } - - static NSData allocWithZone_(SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSData1, _lib._sel_allocWithZone_1, zone); - return NSData._(_ret, _lib, retain: false, release: true); - } - - static NSData alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_alloc1); - return NSData._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSData1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSData1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSData1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSData1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSData1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSData1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSData1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSData1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSData1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -final class _NSRange extends ffi.Struct { - @ffi.UnsignedLong() - external int location; - - @ffi.UnsignedLong() - external int length; -} - -class NSURL extends NSObject { - NSURL._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURL] that points to the same underlying object as [other]. - static NSURL castFrom(T other) { - return NSURL._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSURL] that wraps the given raw object pointer. - static NSURL castFromPointer(SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURL._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSURL]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURL1); - } - - NSURL? initWithScheme_host_path_( - NSString scheme, NSString? host, NSString path) { - final _ret = _lib._objc_msgSend_27( - _id, - _lib._sel_initWithScheme_host_path_1, - scheme._id, - host?._id ?? ffi.nullptr, - path._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL initFileURLWithPath_isDirectory_relativeToURL_( - NSString path, bool isDir, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_28( - _id, - _lib._sel_initFileURLWithPath_isDirectory_relativeToURL_1, - path._id, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL initFileURLWithPath_relativeToURL_(NSString path, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_29( - _id, - _lib._sel_initFileURLWithPath_relativeToURL_1, - path._id, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL initFileURLWithPath_isDirectory_(NSString path, bool isDir) { - final _ret = _lib._objc_msgSend_30( - _id, _lib._sel_initFileURLWithPath_isDirectory_1, path._id, isDir); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL initFileURLWithPath_(NSString path) { - final _ret = - _lib._objc_msgSend_31(_id, _lib._sel_initFileURLWithPath_1, path._id); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL fileURLWithPath_isDirectory_relativeToURL_( - SwiftLibrary _lib, NSString path, bool isDir, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_32( - _lib._class_NSURL1, - _lib._sel_fileURLWithPath_isDirectory_relativeToURL_1, - path._id, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL fileURLWithPath_relativeToURL_( - SwiftLibrary _lib, NSString path, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_33( - _lib._class_NSURL1, - _lib._sel_fileURLWithPath_relativeToURL_1, - path._id, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL fileURLWithPath_isDirectory_( - SwiftLibrary _lib, NSString path, bool isDir) { - final _ret = _lib._objc_msgSend_34(_lib._class_NSURL1, - _lib._sel_fileURLWithPath_isDirectory_1, path._id, isDir); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL fileURLWithPath_(SwiftLibrary _lib, NSString path) { - final _ret = _lib._objc_msgSend_35( - _lib._class_NSURL1, _lib._sel_fileURLWithPath_1, path._id); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( - ffi.Pointer path, bool isDir, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_36( - _id, - _lib._sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, - path, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( - SwiftLibrary _lib, - ffi.Pointer path, - bool isDir, - NSURL? baseURL) { - final _ret = _lib._objc_msgSend_37( - _lib._class_NSURL1, - _lib._sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, - path, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? initWithString_(NSString URLString) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_initWithString_1, URLString._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? initWithString_relativeToURL_(NSString URLString, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_39( - _id, - _lib._sel_initWithString_relativeToURL_1, - URLString._id, - baseURL?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL? URLWithString_(SwiftLibrary _lib, NSString URLString) { - final _ret = _lib._objc_msgSend_38( - _lib._class_NSURL1, _lib._sel_URLWithString_1, URLString._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL? URLWithString_relativeToURL_( - SwiftLibrary _lib, NSString URLString, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_39( - _lib._class_NSURL1, - _lib._sel_URLWithString_relativeToURL_1, - URLString._id, - baseURL?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? initWithString_encodingInvalidCharacters_( - NSString URLString, bool encodingInvalidCharacters) { - final _ret = _lib._objc_msgSend_40( - _id, - _lib._sel_initWithString_encodingInvalidCharacters_1, - URLString._id, - encodingInvalidCharacters); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL? URLWithString_encodingInvalidCharacters_( - SwiftLibrary _lib, NSString URLString, bool encodingInvalidCharacters) { - final _ret = _lib._objc_msgSend_40( - _lib._class_NSURL1, - _lib._sel_URLWithString_encodingInvalidCharacters_1, - URLString._id, - encodingInvalidCharacters); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL initWithDataRepresentation_relativeToURL_(NSData data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_41( - _id, - _lib._sel_initWithDataRepresentation_relativeToURL_1, - data._id, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL URLWithDataRepresentation_relativeToURL_( - SwiftLibrary _lib, NSData data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_42( - _lib._class_NSURL1, - _lib._sel_URLWithDataRepresentation_relativeToURL_1, - data._id, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL initAbsoluteURLWithDataRepresentation_relativeToURL_( - NSData data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_41( - _id, - _lib._sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1, - data._id, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL absoluteURLWithDataRepresentation_relativeToURL_( - SwiftLibrary _lib, NSData data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_42( - _lib._class_NSURL1, - _lib._sel_absoluteURLWithDataRepresentation_relativeToURL_1, - data._id, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - NSData get dataRepresentation { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_dataRepresentation1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - NSString? get absoluteString { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_absoluteString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get relativeString { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_relativeString1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSURL? get baseURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_baseURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? get absoluteURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_absoluteURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSString? get scheme { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_scheme1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get resourceSpecifier { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_resourceSpecifier1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get host { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_host1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSNumber? get port { - final _ret = _lib._objc_msgSend_215(_id, _lib._sel_port1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSString? get user { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_user1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get password { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_password1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get path { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_path1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get fragment { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_fragment1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get parameterString { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_parameterString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get query { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_query1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get relativePath { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_relativePath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - bool get hasDirectoryPath { - return _lib._objc_msgSend_12(_id, _lib._sel_hasDirectoryPath1); - } - - bool getFileSystemRepresentation_maxLength_( - ffi.Pointer buffer, int maxBufferLength) { - return _lib._objc_msgSend_242( - _id, - _lib._sel_getFileSystemRepresentation_maxLength_1, - buffer, - maxBufferLength); - } - - ffi.Pointer get fileSystemRepresentation { - return _lib._objc_msgSend_13(_id, _lib._sel_fileSystemRepresentation1); - } - - bool get fileURL { - return _lib._objc_msgSend_12(_id, _lib._sel_isFileURL1); - } - - NSURL? get standardizedURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_standardizedURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - bool isFileReferenceURL() { - return _lib._objc_msgSend_12(_id, _lib._sel_isFileReferenceURL1); - } - - NSURL? fileReferenceURL() { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_fileReferenceURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? get filePathURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_filePathURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - bool getResourceValue_forKey_error_( - ffi.Pointer> value, - NSString key, - ffi.Pointer> error) { - return _lib._objc_msgSend_243( - _id, _lib._sel_getResourceValue_forKey_error_1, value, key._id, error); - } - - NSObject? resourceValuesForKeys_error_( - NSArray keys, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_244( - _id, _lib._sel_resourceValuesForKeys_error_1, keys._id, error); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - bool setResourceValue_forKey_error_(NSObject? value, NSString key, - ffi.Pointer> error) { - return _lib._objc_msgSend_245( - _id, - _lib._sel_setResourceValue_forKey_error_1, - value?._id ?? ffi.nullptr, - key._id, - error); - } - - bool setResourceValues_error_( - NSObject keyedValues, ffi.Pointer> error) { - return _lib._objc_msgSend_246( - _id, _lib._sel_setResourceValues_error_1, keyedValues._id, error); - } - - void removeCachedResourceValueForKey_(NSString key) { - _lib._objc_msgSend_247( - _id, _lib._sel_removeCachedResourceValueForKey_1, key._id); - } - - void removeAllCachedResourceValues() { - _lib._objc_msgSend_1(_id, _lib._sel_removeAllCachedResourceValues1); - } - - void setTemporaryResourceValue_forKey_(NSObject? value, NSString key) { - _lib._objc_msgSend_135(_id, _lib._sel_setTemporaryResourceValue_forKey_1, - value?._id ?? ffi.nullptr, key._id); - } - - NSData? - bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_( - int options, - NSArray? keys, - NSURL? relativeURL, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_248( - _id, - _lib._sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1, - options, - keys?._id ?? ffi.nullptr, - relativeURL?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSURL? - initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( - NSData bookmarkData, - int options, - NSURL? relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_249( - _id, - _lib._sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, - bookmarkData._id, - options, - relativeURL?._id ?? ffi.nullptr, - isStale, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL? - URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( - SwiftLibrary _lib, - NSData bookmarkData, - int options, - NSURL? relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_249( - _lib._class_NSURL1, - _lib._sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, - bookmarkData._id, - options, - relativeURL?._id ?? ffi.nullptr, - isStale, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSObject? resourceValuesForKeys_fromBookmarkData_( - SwiftLibrary _lib, NSArray keys, NSData bookmarkData) { - final _ret = _lib._objc_msgSend_250( - _lib._class_NSURL1, - _lib._sel_resourceValuesForKeys_fromBookmarkData_1, - keys._id, - bookmarkData._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static bool writeBookmarkData_toURL_options_error_( - SwiftLibrary _lib, - NSData bookmarkData, - NSURL bookmarkFileURL, - int options, - ffi.Pointer> error) { - return _lib._objc_msgSend_251( - _lib._class_NSURL1, - _lib._sel_writeBookmarkData_toURL_options_error_1, - bookmarkData._id, - bookmarkFileURL._id, - options, - error); - } - - static NSData? bookmarkDataWithContentsOfURL_error_(SwiftLibrary _lib, - NSURL bookmarkFileURL, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_252( - _lib._class_NSURL1, - _lib._sel_bookmarkDataWithContentsOfURL_error_1, - bookmarkFileURL._id, - error); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - static NSURL? URLByResolvingAliasFileAtURL_options_error_(SwiftLibrary _lib, - NSURL url, int options, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_253( - _lib._class_NSURL1, - _lib._sel_URLByResolvingAliasFileAtURL_options_error_1, - url._id, - options, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - bool startAccessingSecurityScopedResource() { - return _lib._objc_msgSend_12( - _id, _lib._sel_startAccessingSecurityScopedResource1); - } - - void stopAccessingSecurityScopedResource() { - _lib._objc_msgSend_1(_id, _lib._sel_stopAccessingSecurityScopedResource1); - } - - bool getPromisedItemResourceValue_forKey_error_( - ffi.Pointer> value, - NSString key, - ffi.Pointer> error) { - return _lib._objc_msgSend_243( - _id, - _lib._sel_getPromisedItemResourceValue_forKey_error_1, - value, - key._id, - error); - } - - NSDictionary? promisedItemResourceValuesForKeys_error_( - NSArray keys, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_254(_id, - _lib._sel_promisedItemResourceValuesForKeys_error_1, keys._id, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - bool checkPromisedItemIsReachableAndReturnError_( - ffi.Pointer> error) { - return _lib._objc_msgSend_255( - _id, _lib._sel_checkPromisedItemIsReachableAndReturnError_1, error); - } - - static NSURL? fileURLWithPathComponents_( - SwiftLibrary _lib, NSArray components) { - final _ret = _lib._objc_msgSend_256(_lib._class_NSURL1, - _lib._sel_fileURLWithPathComponents_1, components._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSArray? get pathComponents { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_pathComponents1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSString? get lastPathComponent { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_lastPathComponent1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get pathExtension { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_pathExtension1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSURL? URLByAppendingPathComponent_(NSString pathComponent) { - final _ret = _lib._objc_msgSend_257( - _id, _lib._sel_URLByAppendingPathComponent_1, pathComponent._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? URLByAppendingPathComponent_isDirectory_( - NSString pathComponent, bool isDirectory) { - final _ret = _lib._objc_msgSend_258( - _id, - _lib._sel_URLByAppendingPathComponent_isDirectory_1, - pathComponent._id, - isDirectory); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? get URLByDeletingLastPathComponent { - final _ret = - _lib._objc_msgSend_45(_id, _lib._sel_URLByDeletingLastPathComponent1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? URLByAppendingPathExtension_(NSString pathExtension) { - final _ret = _lib._objc_msgSend_257( - _id, _lib._sel_URLByAppendingPathExtension_1, pathExtension._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? get URLByDeletingPathExtension { - final _ret = - _lib._objc_msgSend_45(_id, _lib._sel_URLByDeletingPathExtension1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - bool checkResourceIsReachableAndReturnError_( - ffi.Pointer> error) { - return _lib._objc_msgSend_255( - _id, _lib._sel_checkResourceIsReachableAndReturnError_1, error); - } - - NSURL? get URLByStandardizingPath { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_URLByStandardizingPath1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? get URLByResolvingSymlinksInPath { - final _ret = - _lib._objc_msgSend_45(_id, _lib._sel_URLByResolvingSymlinksInPath1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSData? resourceDataUsingCache_(bool shouldUseCache) { - final _ret = _lib._objc_msgSend_259( - _id, _lib._sel_resourceDataUsingCache_1, shouldUseCache); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - void loadResourceDataNotifyingClient_usingCache_( - NSObject client, bool shouldUseCache) { - _lib._objc_msgSend_260( - _id, - _lib._sel_loadResourceDataNotifyingClient_usingCache_1, - client._id, - shouldUseCache); - } - - NSObject? propertyForKey_(NSString propertyKey) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_propertyForKey_1, propertyKey._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - bool setResourceData_(NSData data) { - return _lib._objc_msgSend_24(_id, _lib._sel_setResourceData_1, data._id); - } - - bool setProperty_forKey_(NSObject property, NSString propertyKey) { - return _lib._objc_msgSend_261( - _id, _lib._sel_setProperty_forKey_1, property._id, propertyKey._id); - } - - NSURLHandle? URLHandleUsingCache_(bool shouldUseCache) { - final _ret = _lib._objc_msgSend_268( - _id, _lib._sel_URLHandleUsingCache_1, shouldUseCache); - return _ret.address == 0 - ? null - : NSURLHandle._(_ret, _lib, retain: true, release: true); - } - - @override - NSURL init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_new1); - return NSURL._(_ret, _lib, retain: false, release: true); - } - - static NSURL allocWithZone_(SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURL1, _lib._sel_allocWithZone_1, zone); - return NSURL._(_ret, _lib, retain: false, release: true); - } - - static NSURL alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_alloc1); - return NSURL._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURL1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURL1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURL1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURL1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURL1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURL1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURL1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSURL1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURL1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSNumber extends NSValue { - NSNumber._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSNumber] that points to the same underlying object as [other]. - static NSNumber castFrom(T other) { - return NSNumber._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSNumber] that wraps the given raw object pointer. - static NSNumber castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNumber._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSNumber]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSNumber1); - } - - @override - NSNumber? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithChar_(int value) { - final _ret = _lib._objc_msgSend_220(_id, _lib._sel_initWithChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithUnsignedChar_(int value) { - final _ret = - _lib._objc_msgSend_221(_id, _lib._sel_initWithUnsignedChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithShort_(int value) { - final _ret = _lib._objc_msgSend_222(_id, _lib._sel_initWithShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithUnsignedShort_(int value) { - final _ret = - _lib._objc_msgSend_223(_id, _lib._sel_initWithUnsignedShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithInt_(int value) { - final _ret = _lib._objc_msgSend_224(_id, _lib._sel_initWithInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithUnsignedInt_(int value) { - final _ret = - _lib._objc_msgSend_225(_id, _lib._sel_initWithUnsignedInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithLong_(int value) { - final _ret = _lib._objc_msgSend_226(_id, _lib._sel_initWithLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithUnsignedLong_(int value) { - final _ret = - _lib._objc_msgSend_227(_id, _lib._sel_initWithUnsignedLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithLongLong_(int value) { - final _ret = - _lib._objc_msgSend_228(_id, _lib._sel_initWithLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithUnsignedLongLong_(int value) { - final _ret = _lib._objc_msgSend_229( - _id, _lib._sel_initWithUnsignedLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithFloat_(double value) { - final _ret = _lib._objc_msgSend_230(_id, _lib._sel_initWithFloat_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithDouble_(double value) { - final _ret = _lib._objc_msgSend_231(_id, _lib._sel_initWithDouble_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithBool_(bool value) { - final _ret = _lib._objc_msgSend_232(_id, _lib._sel_initWithBool_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithInteger_(int value) { - final _ret = - _lib._objc_msgSend_226(_id, _lib._sel_initWithInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithUnsignedInteger_(int value) { - final _ret = - _lib._objc_msgSend_227(_id, _lib._sel_initWithUnsignedInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - int get charValue { - return _lib._objc_msgSend_233(_id, _lib._sel_charValue1); - } - - int get unsignedCharValue { - return _lib._objc_msgSend_234(_id, _lib._sel_unsignedCharValue1); - } - - int get shortValue { - return _lib._objc_msgSend_235(_id, _lib._sel_shortValue1); - } - - int get unsignedShortValue { - return _lib._objc_msgSend_236(_id, _lib._sel_unsignedShortValue1); - } - - int get intValue { - return _lib._objc_msgSend_237(_id, _lib._sel_intValue1); - } - - int get unsignedIntValue { - return _lib._objc_msgSend_214(_id, _lib._sel_unsignedIntValue1); - } - - int get longValue { - return _lib._objc_msgSend_83(_id, _lib._sel_longValue1); - } - - int get unsignedLongValue { - return _lib._objc_msgSend_10(_id, _lib._sel_unsignedLongValue1); - } - - int get longLongValue { - return _lib._objc_msgSend_238(_id, _lib._sel_longLongValue1); - } - - int get unsignedLongLongValue { - return _lib._objc_msgSend_164(_id, _lib._sel_unsignedLongLongValue1); - } - - double get floatValue { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_239_fpret(_id, _lib._sel_floatValue1) - : _lib._objc_msgSend_239(_id, _lib._sel_floatValue1); - } - - double get doubleValue { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_doubleValue1) - : _lib._objc_msgSend_165(_id, _lib._sel_doubleValue1); - } - - bool get boolValue { - return _lib._objc_msgSend_12(_id, _lib._sel_boolValue1); - } - - int get integerValue { - return _lib._objc_msgSend_83(_id, _lib._sel_integerValue1); - } - - int get unsignedIntegerValue { - return _lib._objc_msgSend_10(_id, _lib._sel_unsignedIntegerValue1); - } - - NSString get stringValue { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_stringValue1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - int compare_(NSNumber otherNumber) { - return _lib._objc_msgSend_240(_id, _lib._sel_compare_1, otherNumber._id); - } - - bool isEqualToNumber_(NSNumber number) { - return _lib._objc_msgSend_241(_id, _lib._sel_isEqualToNumber_1, number._id); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _lib._objc_msgSend_70( - _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithChar_(SwiftLibrary _lib, int value) { - final _ret = _lib._objc_msgSend_220( - _lib._class_NSNumber1, _lib._sel_numberWithChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithUnsignedChar_(SwiftLibrary _lib, int value) { - final _ret = _lib._objc_msgSend_221( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithShort_(SwiftLibrary _lib, int value) { - final _ret = _lib._objc_msgSend_222( - _lib._class_NSNumber1, _lib._sel_numberWithShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithUnsignedShort_(SwiftLibrary _lib, int value) { - final _ret = _lib._objc_msgSend_223( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithInt_(SwiftLibrary _lib, int value) { - final _ret = _lib._objc_msgSend_224( - _lib._class_NSNumber1, _lib._sel_numberWithInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithUnsignedInt_(SwiftLibrary _lib, int value) { - final _ret = _lib._objc_msgSend_225( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithLong_(SwiftLibrary _lib, int value) { - final _ret = _lib._objc_msgSend_226( - _lib._class_NSNumber1, _lib._sel_numberWithLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithUnsignedLong_(SwiftLibrary _lib, int value) { - final _ret = _lib._objc_msgSend_227( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithLongLong_(SwiftLibrary _lib, int value) { - final _ret = _lib._objc_msgSend_228( - _lib._class_NSNumber1, _lib._sel_numberWithLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithUnsignedLongLong_(SwiftLibrary _lib, int value) { - final _ret = _lib._objc_msgSend_229( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithFloat_(SwiftLibrary _lib, double value) { - final _ret = _lib._objc_msgSend_230( - _lib._class_NSNumber1, _lib._sel_numberWithFloat_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithDouble_(SwiftLibrary _lib, double value) { - final _ret = _lib._objc_msgSend_231( - _lib._class_NSNumber1, _lib._sel_numberWithDouble_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithBool_(SwiftLibrary _lib, bool value) { - final _ret = _lib._objc_msgSend_232( - _lib._class_NSNumber1, _lib._sel_numberWithBool_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithInteger_(SwiftLibrary _lib, int value) { - final _ret = _lib._objc_msgSend_226( - _lib._class_NSNumber1, _lib._sel_numberWithInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithUnsignedInteger_(SwiftLibrary _lib, int value) { - final _ret = _lib._objc_msgSend_227( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - @override - NSNumber initWithBytes_objCType_( - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_46( - _id, _lib._sel_initWithBytes_objCType_1, value, type); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithBytes_objCType_(SwiftLibrary _lib, - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_48(_lib._class_NSNumber1, - _lib._sel_valueWithBytes_objCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue value_withObjCType_(SwiftLibrary _lib, - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_48( - _lib._class_NSNumber1, _lib._sel_value_withObjCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithNonretainedObject_( - SwiftLibrary _lib, NSObject? anObject) { - final _ret = _lib._objc_msgSend_49(_lib._class_NSNumber1, - _lib._sel_valueWithNonretainedObject_1, anObject?._id ?? ffi.nullptr); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithPointer_( - SwiftLibrary _lib, ffi.Pointer pointer) { - final _ret = _lib._objc_msgSend_50( - _lib._class_NSNumber1, _lib._sel_valueWithPointer_1, pointer); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithRange_(SwiftLibrary _lib, _NSRange range) { - final _ret = _lib._objc_msgSend_53( - _lib._class_NSNumber1, _lib._sel_valueWithRange_1, range); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithPoint_(SwiftLibrary _lib, CGPoint point) { - final _ret = _lib._objc_msgSend_55( - _lib._class_NSNumber1, _lib._sel_valueWithPoint_1, point); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithSize_(SwiftLibrary _lib, CGSize size) { - final _ret = _lib._objc_msgSend_56( - _lib._class_NSNumber1, _lib._sel_valueWithSize_1, size); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithRect_(SwiftLibrary _lib, CGRect rect) { - final _ret = _lib._objc_msgSend_57( - _lib._class_NSNumber1, _lib._sel_valueWithRect_1, rect); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithEdgeInsets_(SwiftLibrary _lib, NSEdgeInsets insets) { - final _ret = _lib._objc_msgSend_58( - _lib._class_NSNumber1, _lib._sel_valueWithEdgeInsets_1, insets); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - @override - NSNumber init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_new1); - return NSNumber._(_ret, _lib, retain: false, release: true); - } - - static NSNumber allocWithZone_(SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSNumber1, _lib._sel_allocWithZone_1, zone); - return NSNumber._(_ret, _lib, retain: false, release: true); - } - - static NSNumber alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_alloc1); - return NSNumber._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSNumber1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSNumber1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSNumber1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSNumber1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSNumber1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSNumber1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSNumber1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSNumber1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSNumber1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSValue extends NSObject { - NSValue._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSValue] that points to the same underlying object as [other]. - static NSValue castFrom(T other) { - return NSValue._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSValue] that wraps the given raw object pointer. - static NSValue castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSValue._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSValue]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSValue1); - } - - void getValue_size_(ffi.Pointer value, int size) { - _lib._objc_msgSend_22(_id, _lib._sel_getValue_size_1, value, size); - } - - ffi.Pointer get objCType { - return _lib._objc_msgSend_13(_id, _lib._sel_objCType1); - } - - NSValue initWithBytes_objCType_( - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_46( - _id, _lib._sel_initWithBytes_objCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - NSValue? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithBytes_objCType_(SwiftLibrary _lib, - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_48( - _lib._class_NSValue1, _lib._sel_valueWithBytes_objCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue value_withObjCType_(SwiftLibrary _lib, - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_48( - _lib._class_NSValue1, _lib._sel_value_withObjCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithNonretainedObject_( - SwiftLibrary _lib, NSObject? anObject) { - final _ret = _lib._objc_msgSend_49(_lib._class_NSValue1, - _lib._sel_valueWithNonretainedObject_1, anObject?._id ?? ffi.nullptr); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - NSObject? get nonretainedObjectValue { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_nonretainedObjectValue1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithPointer_( - SwiftLibrary _lib, ffi.Pointer pointer) { - final _ret = _lib._objc_msgSend_50( - _lib._class_NSValue1, _lib._sel_valueWithPointer_1, pointer); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - ffi.Pointer get pointerValue { - return _lib._objc_msgSend_20(_id, _lib._sel_pointerValue1); - } - - bool isEqualToValue_(NSValue value) { - return _lib._objc_msgSend_51(_id, _lib._sel_isEqualToValue_1, value._id); - } - - void getValue_(ffi.Pointer value) { - _lib._objc_msgSend_52(_id, _lib._sel_getValue_1, value); - } - - static NSValue valueWithRange_(SwiftLibrary _lib, _NSRange range) { - final _ret = _lib._objc_msgSend_53( - _lib._class_NSValue1, _lib._sel_valueWithRange_1, range); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - void getRangeValue(ffi.Pointer<_NSRange> stret) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_54_stret(stret, _id, _lib._sel_rangeValue1) - : stret.ref = _lib._objc_msgSend_54(_id, _lib._sel_rangeValue1); - } - - static NSValue valueWithPoint_(SwiftLibrary _lib, CGPoint point) { - final _ret = _lib._objc_msgSend_55( - _lib._class_NSValue1, _lib._sel_valueWithPoint_1, point); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithSize_(SwiftLibrary _lib, CGSize size) { - final _ret = _lib._objc_msgSend_56( - _lib._class_NSValue1, _lib._sel_valueWithSize_1, size); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithRect_(SwiftLibrary _lib, CGRect rect) { - final _ret = _lib._objc_msgSend_57( - _lib._class_NSValue1, _lib._sel_valueWithRect_1, rect); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithEdgeInsets_(SwiftLibrary _lib, NSEdgeInsets insets) { - final _ret = _lib._objc_msgSend_58( - _lib._class_NSValue1, _lib._sel_valueWithEdgeInsets_1, insets); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - void getPointValue(ffi.Pointer stret) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_59_stret(stret, _id, _lib._sel_pointValue1) - : stret.ref = _lib._objc_msgSend_59(_id, _lib._sel_pointValue1); - } - - void getSizeValue(ffi.Pointer stret) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_60_stret(stret, _id, _lib._sel_sizeValue1) - : stret.ref = _lib._objc_msgSend_60(_id, _lib._sel_sizeValue1); - } - - void getRectValue(ffi.Pointer stret) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_61_stret(stret, _id, _lib._sel_rectValue1) - : stret.ref = _lib._objc_msgSend_61(_id, _lib._sel_rectValue1); - } - - void getEdgeInsetsValue(ffi.Pointer stret) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_62_stret(stret, _id, _lib._sel_edgeInsetsValue1) - : stret.ref = _lib._objc_msgSend_62(_id, _lib._sel_edgeInsetsValue1); - } - - @override - NSValue init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_new1); - return NSValue._(_ret, _lib, retain: false, release: true); - } - - static NSValue allocWithZone_(SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSValue1, _lib._sel_allocWithZone_1, zone); - return NSValue._(_ret, _lib, retain: false, release: true); - } - - static NSValue alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_alloc1); - return NSValue._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSValue1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSValue1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSValue1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSValue1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSValue1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSValue1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSValue1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSValue1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSValue1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -final class CGPoint extends ffi.Struct { - @ffi.Double() - external double x; - - @ffi.Double() - external double y; -} - -final class CGSize extends ffi.Struct { - @ffi.Double() - external double width; - - @ffi.Double() - external double height; -} - -final class CGRect extends ffi.Struct { - external CGPoint origin; - - external CGSize size; -} - -final class NSEdgeInsets extends ffi.Struct { - @ffi.Double() - external double top; - - @ffi.Double() - external double left; - - @ffi.Double() - external double bottom; - - @ffi.Double() - external double right; -} - -class NSArray extends NSObject { - NSArray._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSArray] that points to the same underlying object as [other]. - static NSArray castFrom(T other) { - return NSArray._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSArray] that wraps the given raw object pointer. - static NSArray castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSArray._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSArray]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSArray1); - } - - int get count { - return _lib._objc_msgSend_10(_id, _lib._sel_count1); - } - - NSObject objectAtIndex_(int index) { - final _ret = _lib._objc_msgSend_65(_id, _lib._sel_objectAtIndex_1, index); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - @override - NSArray init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66( - _id, _lib._sel_initWithObjects_count_1, objects, cnt); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray arrayByAddingObject_(NSObject anObject) { - final _ret = _lib._objc_msgSend_67( - _id, _lib._sel_arrayByAddingObject_1, anObject._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray arrayByAddingObjectsFromArray_(NSArray otherArray) { - final _ret = _lib._objc_msgSend_68( - _id, _lib._sel_arrayByAddingObjectsFromArray_1, otherArray._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSString componentsJoinedByString_(NSString separator) { - final _ret = _lib._objc_msgSend_69( - _id, _lib._sel_componentsJoinedByString_1, separator._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - bool containsObject_(NSObject anObject) { - return _lib._objc_msgSend_0(_id, _lib._sel_containsObject_1, anObject._id); - } - - NSString get description { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _lib._objc_msgSend_70( - _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithLocale_indent_(NSObject? locale, int level) { - final _ret = _lib._objc_msgSend_71( - _id, - _lib._sel_descriptionWithLocale_indent_1, - locale?._id ?? ffi.nullptr, - level); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSObject? firstObjectCommonWithArray_(NSArray otherArray) { - final _ret = _lib._objc_msgSend_72( - _id, _lib._sel_firstObjectCommonWithArray_1, otherArray._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void getObjects_range_( - ffi.Pointer> objects, _NSRange range) { - _lib._objc_msgSend_73(_id, _lib._sel_getObjects_range_1, objects, range); - } - - int indexOfObject_(NSObject anObject) { - return _lib._objc_msgSend_74(_id, _lib._sel_indexOfObject_1, anObject._id); - } - - int indexOfObject_inRange_(NSObject anObject, _NSRange range) { - return _lib._objc_msgSend_75( - _id, _lib._sel_indexOfObject_inRange_1, anObject._id, range); - } - - int indexOfObjectIdenticalTo_(NSObject anObject) { - return _lib._objc_msgSend_74( - _id, _lib._sel_indexOfObjectIdenticalTo_1, anObject._id); - } - - int indexOfObjectIdenticalTo_inRange_(NSObject anObject, _NSRange range) { - return _lib._objc_msgSend_75( - _id, _lib._sel_indexOfObjectIdenticalTo_inRange_1, anObject._id, range); - } - - bool isEqualToArray_(NSArray otherArray) { - return _lib._objc_msgSend_76( - _id, _lib._sel_isEqualToArray_1, otherArray._id); - } - - NSObject? get firstObject { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_firstObject1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? get lastObject { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_lastObject1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSEnumerator objectEnumerator() { - final _ret = _lib._objc_msgSend_77(_id, _lib._sel_objectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } - - NSEnumerator reverseObjectEnumerator() { - final _ret = _lib._objc_msgSend_77(_id, _lib._sel_reverseObjectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } - - NSData get sortedArrayHint { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_sortedArrayHint1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - NSArray sortedArrayUsingFunction_context_( - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context) { - final _ret = _lib._objc_msgSend_78( - _id, _lib._sel_sortedArrayUsingFunction_context_1, comparator, context); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray sortedArrayUsingFunction_context_hint_( - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context, - NSData? hint) { - final _ret = _lib._objc_msgSend_79( - _id, - _lib._sel_sortedArrayUsingFunction_context_hint_1, - comparator, - context, - hint?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray sortedArrayUsingSelector_(ffi.Pointer comparator) { - final _ret = _lib._objc_msgSend_80( - _id, _lib._sel_sortedArrayUsingSelector_1, comparator); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray subarrayWithRange_(_NSRange range) { - final _ret = - _lib._objc_msgSend_81(_id, _lib._sel_subarrayWithRange_1, range); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - bool writeToURL_error_( - NSURL url, ffi.Pointer> error) { - return _lib._objc_msgSend_89( - _id, _lib._sel_writeToURL_error_1, url._id, error); - } - - void makeObjectsPerformSelector_(ffi.Pointer aSelector) { - _lib._objc_msgSend_7( - _id, _lib._sel_makeObjectsPerformSelector_1, aSelector); - } - - void makeObjectsPerformSelector_withObject_( - ffi.Pointer aSelector, NSObject? argument) { - _lib._objc_msgSend_90( - _id, - _lib._sel_makeObjectsPerformSelector_withObject_1, - aSelector, - argument?._id ?? ffi.nullptr); - } - - NSArray objectsAtIndexes_(NSIndexSet indexes) { - final _ret = - _lib._objc_msgSend_111(_id, _lib._sel_objectsAtIndexes_1, indexes._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSObject objectAtIndexedSubscript_(int idx) { - final _ret = - _lib._objc_msgSend_65(_id, _lib._sel_objectAtIndexedSubscript_1, idx); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - void enumerateObjectsUsingBlock_( - ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool block) { - _lib._objc_msgSend_112( - _id, _lib._sel_enumerateObjectsUsingBlock_1, block._id); - } - - void enumerateObjectsWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool block) { - _lib._objc_msgSend_113(_id, - _lib._sel_enumerateObjectsWithOptions_usingBlock_1, opts, block._id); - } - - void enumerateObjectsAtIndexes_options_usingBlock_(NSIndexSet s, int opts, - ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool block) { - _lib._objc_msgSend_114( - _id, - _lib._sel_enumerateObjectsAtIndexes_options_usingBlock_1, - s._id, - opts, - block._id); - } - - int indexOfObjectPassingTest_( - ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - return _lib._objc_msgSend_115( - _id, _lib._sel_indexOfObjectPassingTest_1, predicate._id); - } - - int indexOfObjectWithOptions_passingTest_( - int opts, ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - return _lib._objc_msgSend_116(_id, - _lib._sel_indexOfObjectWithOptions_passingTest_1, opts, predicate._id); - } - - int indexOfObjectAtIndexes_options_passingTest_(NSIndexSet s, int opts, - ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - return _lib._objc_msgSend_117( - _id, - _lib._sel_indexOfObjectAtIndexes_options_passingTest_1, - s._id, - opts, - predicate._id); - } - - NSIndexSet indexesOfObjectsPassingTest_( - ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _lib._objc_msgSend_118( - _id, _lib._sel_indexesOfObjectsPassingTest_1, predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet indexesOfObjectsWithOptions_passingTest_( - int opts, ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _lib._objc_msgSend_119( - _id, - _lib._sel_indexesOfObjectsWithOptions_passingTest_1, - opts, - predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_(NSIndexSet s, - int opts, ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _lib._objc_msgSend_120( - _id, - _lib._sel_indexesOfObjectsAtIndexes_options_passingTest_1, - s._id, - opts, - predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSArray sortedArrayUsingComparator_( - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { - final _ret = _lib._objc_msgSend_121( - _id, _lib._sel_sortedArrayUsingComparator_1, cmptr._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray sortedArrayWithOptions_usingComparator_( - int opts, ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { - final _ret = _lib._objc_msgSend_122(_id, - _lib._sel_sortedArrayWithOptions_usingComparator_1, opts, cmptr._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - int indexOfObject_inSortedRange_options_usingComparator_( - NSObject obj, - _NSRange r, - int opts, - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmp) { - return _lib._objc_msgSend_123( - _id, - _lib._sel_indexOfObject_inSortedRange_options_usingComparator_1, - obj._id, - r, - opts, - cmp._id); - } - - static NSArray array(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_array1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray arrayWithObject_(SwiftLibrary _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_124( - _lib._class_NSArray1, _lib._sel_arrayWithObject_1, anObject._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray arrayWithObjects_count_(SwiftLibrary _lib, - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66( - _lib._class_NSArray1, _lib._sel_arrayWithObjects_count_1, objects, cnt); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray arrayWithObjects_(SwiftLibrary _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_124( - _lib._class_NSArray1, _lib._sel_arrayWithObjects_1, firstObj._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray arrayWithArray_(SwiftLibrary _lib, NSArray array) { - final _ret = _lib._objc_msgSend_125( - _lib._class_NSArray1, _lib._sel_arrayWithArray_1, array._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray initWithObjects_(NSObject firstObj) { - final _ret = - _lib._objc_msgSend_124(_id, _lib._sel_initWithObjects_1, firstObj._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray initWithArray_(NSArray array) { - final _ret = - _lib._objc_msgSend_125(_id, _lib._sel_initWithArray_1, array._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray initWithArray_copyItems_(NSArray array, bool flag) { - final _ret = _lib._objc_msgSend_126( - _id, _lib._sel_initWithArray_copyItems_1, array._id, flag); - return NSArray._(_ret, _lib, retain: false, release: true); - } - - NSArray? initWithContentsOfURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_127( - _id, _lib._sel_initWithContentsOfURL_error_1, url._id, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray? arrayWithContentsOfURL_error_(SwiftLibrary _lib, NSURL url, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_127(_lib._class_NSArray1, - _lib._sel_arrayWithContentsOfURL_error_1, url._id, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSObject differenceFromArray_withOptions_usingEquivalenceTest_( - NSArray other, int options, ObjCBlock_bool_ObjCObject_ObjCObject block) { - final _ret = _lib._objc_msgSend_128( - _id, - _lib._sel_differenceFromArray_withOptions_usingEquivalenceTest_1, - other._id, - options, - block._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject differenceFromArray_withOptions_(NSArray other, int options) { - final _ret = _lib._objc_msgSend_129( - _id, _lib._sel_differenceFromArray_withOptions_1, other._id, options); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject differenceFromArray_(NSArray other) { - final _ret = - _lib._objc_msgSend_125(_id, _lib._sel_differenceFromArray_1, other._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSArray? arrayByApplyingDifference_(NSObject difference) { - final _ret = _lib._objc_msgSend_130( - _id, _lib._sel_arrayByApplyingDifference_1, difference._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - void getObjects_(ffi.Pointer> objects) { - _lib._objc_msgSend_131(_id, _lib._sel_getObjects_1, objects); - } - - static NSArray? arrayWithContentsOfFile_(SwiftLibrary _lib, NSString path) { - final _ret = _lib._objc_msgSend_132( - _lib._class_NSArray1, _lib._sel_arrayWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray? arrayWithContentsOfURL_(SwiftLibrary _lib, NSURL url) { - final _ret = _lib._objc_msgSend_133( - _lib._class_NSArray1, _lib._sel_arrayWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray? initWithContentsOfFile_(NSString path) { - final _ret = _lib._objc_msgSend_132( - _id, _lib._sel_initWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_133(_id, _lib._sel_initWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_26( - _id, _lib._sel_writeToFile_atomically_1, path._id, useAuxiliaryFile); - } - - bool writeToURL_atomically_(NSURL url, bool atomically) { - return _lib._objc_msgSend_134( - _id, _lib._sel_writeToURL_atomically_1, url._id, atomically); - } - - NSArray pathsMatchingExtensions_(NSArray filterTypes) { - final _ret = _lib._objc_msgSend_68( - _id, _lib._sel_pathsMatchingExtensions_1, filterTypes._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSObject valueForKey_(NSString key) { - final _ret = _lib._objc_msgSend_31(_id, _lib._sel_valueForKey_1, key._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - @override - void setValue_forKey_(NSObject? value, NSString key) { - _lib._objc_msgSend_135( - _id, _lib._sel_setValue_forKey_1, value?._id ?? ffi.nullptr, key._id); - } - - void addObserver_toObjectsAtIndexes_forKeyPath_options_context_( - NSObject observer, - NSIndexSet indexes, - NSString keyPath, - int options, - ffi.Pointer context) { - _lib._objc_msgSend_136( - _id, - _lib._sel_addObserver_toObjectsAtIndexes_forKeyPath_options_context_1, - observer._id, - indexes._id, - keyPath._id, - options, - context); - } - - void removeObserver_fromObjectsAtIndexes_forKeyPath_context_( - NSObject observer, - NSIndexSet indexes, - NSString keyPath, - ffi.Pointer context) { - _lib._objc_msgSend_137( - _id, - _lib._sel_removeObserver_fromObjectsAtIndexes_forKeyPath_context_1, - observer._id, - indexes._id, - keyPath._id, - context); - } - - void removeObserver_fromObjectsAtIndexes_forKeyPath_( - NSObject observer, NSIndexSet indexes, NSString keyPath) { - _lib._objc_msgSend_138( - _id, - _lib._sel_removeObserver_fromObjectsAtIndexes_forKeyPath_1, - observer._id, - indexes._id, - keyPath._id); - } - - @override - void addObserver_forKeyPath_options_context_(NSObject observer, - NSString keyPath, int options, ffi.Pointer context) { - _lib._objc_msgSend_139( - _id, - _lib._sel_addObserver_forKeyPath_options_context_1, - observer._id, - keyPath._id, - options, - context); - } - - @override - void removeObserver_forKeyPath_context_( - NSObject observer, NSString keyPath, ffi.Pointer context) { - _lib._objc_msgSend_140(_id, _lib._sel_removeObserver_forKeyPath_context_1, - observer._id, keyPath._id, context); - } - - @override - void removeObserver_forKeyPath_(NSObject observer, NSString keyPath) { - _lib._objc_msgSend_141( - _id, _lib._sel_removeObserver_forKeyPath_1, observer._id, keyPath._id); - } - - NSArray sortedArrayUsingDescriptors_(NSArray sortDescriptors) { - final _ret = _lib._objc_msgSend_68( - _id, _lib._sel_sortedArrayUsingDescriptors_1, sortDescriptors._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray filteredArrayUsingPredicate_(NSPredicate predicate) { - final _ret = _lib._objc_msgSend_219( - _id, _lib._sel_filteredArrayUsingPredicate_1, predicate._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_new1); - return NSArray._(_ret, _lib, retain: false, release: true); - } - - static NSArray allocWithZone_(SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSArray1, _lib._sel_allocWithZone_1, zone); - return NSArray._(_ret, _lib, retain: false, release: true); - } - - static NSArray alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_alloc1); - return NSArray._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSArray1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSArray1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSArray1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSArray1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSArray1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSArray1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSArray1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSArray1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSArray1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSError extends NSObject { - NSError._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSError] that points to the same underlying object as [other]. - static NSError castFrom(T other) { - return NSError._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSError] that wraps the given raw object pointer. - static NSError castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSError._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSError]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSError1); - } - - NSError initWithDomain_code_userInfo_( - NSString domain, int code, NSObject? dict) { - final _ret = _lib._objc_msgSend_82( - _id, - _lib._sel_initWithDomain_code_userInfo_1, - domain._id, - code, - dict?._id ?? ffi.nullptr); - return NSError._(_ret, _lib, retain: true, release: true); - } - - static NSError errorWithDomain_code_userInfo_( - SwiftLibrary _lib, NSString domain, int code, NSObject? dict) { - final _ret = _lib._objc_msgSend_82( - _lib._class_NSError1, - _lib._sel_errorWithDomain_code_userInfo_1, - domain._id, - code, - dict?._id ?? ffi.nullptr); - return NSError._(_ret, _lib, retain: true, release: true); - } - - NSString get domain { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_domain1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - int get code { - return _lib._objc_msgSend_83(_id, _lib._sel_code1); - } - - NSObject get userInfo { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_userInfo1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSString get localizedDescription { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_localizedDescription1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get localizedFailureReason { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_localizedFailureReason1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get localizedRecoverySuggestion { - final _ret = - _lib._objc_msgSend_44(_id, _lib._sel_localizedRecoverySuggestion1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSArray? get localizedRecoveryOptions { - final _ret = - _lib._objc_msgSend_84(_id, _lib._sel_localizedRecoveryOptions1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSObject? get recoveryAttempter { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_recoveryAttempter1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSString? get helpAnchor { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_helpAnchor1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSArray get underlyingErrors { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_underlyingErrors1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static void setUserInfoValueProviderForDomain_provider_(SwiftLibrary _lib, - NSString errorDomain, ObjCBlock_ObjCObject_NSError_NSString? provider) { - _lib._objc_msgSend_86( - _lib._class_NSError1, - _lib._sel_setUserInfoValueProviderForDomain_provider_1, - errorDomain._id, - provider?._id ?? ffi.nullptr); - } - - static ObjCBlock_ObjCObject_NSError_NSString? userInfoValueProviderForDomain_( - SwiftLibrary _lib, - NSError err, - NSString userInfoKey, - NSString errorDomain) { - final _ret = _lib._objc_msgSend_87( - _lib._class_NSError1, - _lib._sel_userInfoValueProviderForDomain_1, - err._id, - userInfoKey._id, - errorDomain._id); - return _ret.address == 0 - ? null - : ObjCBlock_ObjCObject_NSError_NSString._(_ret, _lib, - retain: true, release: true); - } - - @override - NSError init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSError._(_ret, _lib, retain: true, release: true); - } - - static NSError new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_new1); - return NSError._(_ret, _lib, retain: false, release: true); - } - - static NSError allocWithZone_(SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSError1, _lib._sel_allocWithZone_1, zone); - return NSError._(_ret, _lib, retain: false, release: true); - } - - static NSError alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_alloc1); - return NSError._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSError1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSError1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSError1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSError1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSError1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSError1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSError1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSError1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSError1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class _ObjCBlockBase implements ffi.Finalizable { - final ffi.Pointer<_ObjCBlock> _id; - final SwiftLibrary _lib; - bool _pendingRelease; - - _ObjCBlockBase._(this._id, this._lib, - {bool retain = false, bool release = false}) - : _pendingRelease = release { - if (retain) { - _lib._Block_copy(_id.cast()); - } - if (release) { - _lib._objc_releaseFinalizer11.attach(this, _id.cast(), detach: this); - } - } - - /// Releases the reference to the underlying ObjC block held by this wrapper. - /// Throws a StateError if this wrapper doesn't currently hold a reference. - void release() { - if (_pendingRelease) { - _pendingRelease = false; - _lib._Block_release(_id.cast()); - _lib._objc_releaseFinalizer11.detach(this); - } else { - throw StateError( - 'Released an ObjC block that was unowned or already released.'); - } - } - - @override - bool operator ==(Object other) { - return other is _ObjCBlockBase && _id == other._id; - } - - @override - int get hashCode => _id.hashCode; - - /// Return a pointer to this object. - ffi.Pointer<_ObjCBlock> get pointer => _id; - - ffi.Pointer<_ObjCBlock> retainAndReturnPointer() { - _lib._Block_copy(_id.cast()); - return _id; - } -} - -ffi.Pointer _ObjCBlock_ObjCObject_NSError_NSString_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ObjCObject_NSError_NSString_closureRegistry = Function( - ffi.Pointer, ffi.Pointer)>{}; -int _ObjCBlock_ObjCObject_NSError_NSString_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ObjCObject_NSError_NSString_registerClosure( - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_ObjCObject_NSError_NSString_closureRegistryIndex; - _ObjCBlock_ObjCObject_NSError_NSString_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -ffi.Pointer - _ObjCBlock_ObjCObject_NSError_NSString_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ObjCObject_NSError_NSString_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ObjCObject_NSError_NSString extends _ObjCBlockBase { - ObjCBlock_ObjCObject_NSError_NSString._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ObjCObject_NSError_NSString castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ObjCObject_NSError_NSString._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ObjCObject_NSError_NSString.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ObjCObject_NSError_NSString_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ObjCObject_NSError_NSString.fromFunction( - SwiftLibrary lib, NSObject? Function(NSError, NSString) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ObjCObject_NSError_NSString_closureTrampoline) - .cast(), - _ObjCBlock_ObjCObject_NSError_NSString_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(NSError._(arg0, lib, retain: true, release: true), NSString._(arg1, lib, retain: true, release: true)) - ?.retainAndReturnPointer() ?? - ffi.nullptr)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - NSObject? call(NSError arg0, NSString arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>() - (_id, arg0._id, arg1._id) - .address == - 0 - ? null - : NSObject._( - _id.ref.invoke - .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>()(_id, arg0._id, arg1._id), - _lib, - retain: false, - release: true); -} - -final class _ObjCBlockDesc extends ffi.Struct { - @ffi.UnsignedLong() - external int reserved; - - @ffi.UnsignedLong() - external int size; - - external ffi.Pointer copy_helper; - - external ffi.Pointer dispose_helper; - - external ffi.Pointer signature; -} - -final class _ObjCBlock extends ffi.Struct { - external ffi.Pointer isa; - - @ffi.Int() - external int flags; - - @ffi.Int() - external int reserved; - - external ffi.Pointer invoke; - - external ffi.Pointer<_ObjCBlockDesc> descriptor; - - external ffi.Pointer target; -} - -class NSIndexSet extends NSObject { - NSIndexSet._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSIndexSet] that points to the same underlying object as [other]. - static NSIndexSet castFrom(T other) { - return NSIndexSet._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSIndexSet] that wraps the given raw object pointer. - static NSIndexSet castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSIndexSet._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSIndexSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSIndexSet1); - } - - static NSIndexSet indexSet(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_indexSet1); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - static NSIndexSet indexSetWithIndex_(SwiftLibrary _lib, int value) { - final _ret = _lib._objc_msgSend_65( - _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndex_1, value); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - static NSIndexSet indexSetWithIndexesInRange_( - SwiftLibrary _lib, _NSRange range) { - final _ret = _lib._objc_msgSend_91( - _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndexesInRange_1, range); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet initWithIndexesInRange_(_NSRange range) { - final _ret = - _lib._objc_msgSend_91(_id, _lib._sel_initWithIndexesInRange_1, range); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet initWithIndexSet_(NSIndexSet indexSet) { - final _ret = - _lib._objc_msgSend_92(_id, _lib._sel_initWithIndexSet_1, indexSet._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet initWithIndex_(int value) { - final _ret = _lib._objc_msgSend_65(_id, _lib._sel_initWithIndex_1, value); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - bool isEqualToIndexSet_(NSIndexSet indexSet) { - return _lib._objc_msgSend_93( - _id, _lib._sel_isEqualToIndexSet_1, indexSet._id); - } - - int get count { - return _lib._objc_msgSend_10(_id, _lib._sel_count1); - } - - int get firstIndex { - return _lib._objc_msgSend_10(_id, _lib._sel_firstIndex1); - } - - int get lastIndex { - return _lib._objc_msgSend_10(_id, _lib._sel_lastIndex1); - } - - int indexGreaterThanIndex_(int value) { - return _lib._objc_msgSend_94(_id, _lib._sel_indexGreaterThanIndex_1, value); - } - - int indexLessThanIndex_(int value) { - return _lib._objc_msgSend_94(_id, _lib._sel_indexLessThanIndex_1, value); - } - - int indexGreaterThanOrEqualToIndex_(int value) { - return _lib._objc_msgSend_94( - _id, _lib._sel_indexGreaterThanOrEqualToIndex_1, value); - } - - int indexLessThanOrEqualToIndex_(int value) { - return _lib._objc_msgSend_94( - _id, _lib._sel_indexLessThanOrEqualToIndex_1, value); - } - - int getIndexes_maxCount_inIndexRange_( - ffi.Pointer indexBuffer, - int bufferSize, - ffi.Pointer<_NSRange> range) { - return _lib._objc_msgSend_95( - _id, - _lib._sel_getIndexes_maxCount_inIndexRange_1, - indexBuffer, - bufferSize, - range); - } - - int countOfIndexesInRange_(_NSRange range) { - return _lib._objc_msgSend_96(_id, _lib._sel_countOfIndexesInRange_1, range); - } - - bool containsIndex_(int value) { - return _lib._objc_msgSend_97(_id, _lib._sel_containsIndex_1, value); - } - - bool containsIndexesInRange_(_NSRange range) { - return _lib._objc_msgSend_98( - _id, _lib._sel_containsIndexesInRange_1, range); - } - - bool containsIndexes_(NSIndexSet indexSet) { - return _lib._objc_msgSend_93( - _id, _lib._sel_containsIndexes_1, indexSet._id); - } - - bool intersectsIndexesInRange_(_NSRange range) { - return _lib._objc_msgSend_98( - _id, _lib._sel_intersectsIndexesInRange_1, range); - } - - void enumerateIndexesUsingBlock_( - ObjCBlock_ffiVoid_ffiUnsignedLong_bool block) { - _lib._objc_msgSend_99( - _id, _lib._sel_enumerateIndexesUsingBlock_1, block._id); - } - - void enumerateIndexesWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_ffiUnsignedLong_bool block) { - _lib._objc_msgSend_100(_id, - _lib._sel_enumerateIndexesWithOptions_usingBlock_1, opts, block._id); - } - - void enumerateIndexesInRange_options_usingBlock_( - _NSRange range, int opts, ObjCBlock_ffiVoid_ffiUnsignedLong_bool block) { - _lib._objc_msgSend_101( - _id, - _lib._sel_enumerateIndexesInRange_options_usingBlock_1, - range, - opts, - block._id); - } - - int indexPassingTest_(ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - return _lib._objc_msgSend_102( - _id, _lib._sel_indexPassingTest_1, predicate._id); - } - - int indexWithOptions_passingTest_( - int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - return _lib._objc_msgSend_103( - _id, _lib._sel_indexWithOptions_passingTest_1, opts, predicate._id); - } - - int indexInRange_options_passingTest_( - _NSRange range, int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - return _lib._objc_msgSend_104( - _id, - _lib._sel_indexInRange_options_passingTest_1, - range, - opts, - predicate._id); - } - - NSIndexSet indexesPassingTest_( - ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - final _ret = _lib._objc_msgSend_105( - _id, _lib._sel_indexesPassingTest_1, predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet indexesWithOptions_passingTest_( - int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - final _ret = _lib._objc_msgSend_106( - _id, _lib._sel_indexesWithOptions_passingTest_1, opts, predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet indexesInRange_options_passingTest_( - _NSRange range, int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - final _ret = _lib._objc_msgSend_107( - _id, - _lib._sel_indexesInRange_options_passingTest_1, - range, - opts, - predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - void enumerateRangesUsingBlock_(ObjCBlock_ffiVoid_NSRange_bool block) { - _lib._objc_msgSend_108( - _id, _lib._sel_enumerateRangesUsingBlock_1, block._id); - } - - void enumerateRangesWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_NSRange_bool block) { - _lib._objc_msgSend_109(_id, - _lib._sel_enumerateRangesWithOptions_usingBlock_1, opts, block._id); - } - - void enumerateRangesInRange_options_usingBlock_( - _NSRange range, int opts, ObjCBlock_ffiVoid_NSRange_bool block) { - _lib._objc_msgSend_110( - _id, - _lib._sel_enumerateRangesInRange_options_usingBlock_1, - range, - opts, - block._id); - } - - @override - NSIndexSet init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - static NSIndexSet new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_new1); - return NSIndexSet._(_ret, _lib, retain: false, release: true); - } - - static NSIndexSet allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSIndexSet1, _lib._sel_allocWithZone_1, zone); - return NSIndexSet._(_ret, _lib, retain: false, release: true); - } - - static NSIndexSet alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_alloc1); - return NSIndexSet._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSIndexSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSIndexSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSIndexSet1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSIndexSet1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSIndexSet1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSIndexSet1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSIndexSet1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSIndexSet1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSIndexSet1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -void _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() - .asFunction)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_registerClosure( - void Function(int, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_ffiUnsignedLong_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ffiUnsignedLong_bool._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ffiUnsignedLong_bool castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ffiUnsignedLong_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiUnsignedLong_bool.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.UnsignedLong arg0, ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.UnsignedLong, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiUnsignedLong_bool.fromFunction( - SwiftLibrary lib, void Function(int, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.UnsignedLong, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_registerClosure( - (int arg0, ffi.Pointer arg1) => fn(arg0, arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ffiUnsignedLong_bool.listener( - SwiftLibrary lib, void Function(int, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.UnsignedLong, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_registerClosure( - (int arg0, ffi.Pointer arg1) => fn(arg0, arg1))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.UnsignedLong, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(int arg0, ffi.Pointer arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, int, - ffi.Pointer)>()(_id, arg0, arg1); -} - -abstract class NSEnumerationOptions { - static const int NSEnumerationConcurrent = 1; - static const int NSEnumerationReverse = 2; -} - -bool _ObjCBlock_bool_ffiUnsignedLong_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() - .asFunction)>()(arg0, arg1); -final _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistry = - )>{}; -int _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_bool_ffiUnsignedLong_bool_registerClosure( - bool Function(int, ffi.Pointer) fn) { - final id = ++_ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistryIndex; - _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_ffiUnsignedLong_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) => - _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_bool_ffiUnsignedLong_bool extends _ObjCBlockBase { - ObjCBlock_bool_ffiUnsignedLong_bool._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_bool_ffiUnsignedLong_bool castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_bool_ffiUnsignedLong_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ffiUnsignedLong_bool.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.UnsignedLong arg0, ffi.Pointer arg1)>> - ptr) - : this._( - lib - ._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock>, - ffi.UnsignedLong, ffi.Pointer)>( - _ObjCBlock_bool_ffiUnsignedLong_bool_fnPtrTrampoline, - false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ffiUnsignedLong_bool.fromFunction( - SwiftLibrary lib, bool Function(int, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock>, - ffi.UnsignedLong, ffi.Pointer)>( - _ObjCBlock_bool_ffiUnsignedLong_bool_closureTrampoline, - false) - .cast(), - _ObjCBlock_bool_ffiUnsignedLong_bool_registerClosure( - (int arg0, ffi.Pointer arg1) => fn(arg0, arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(int arg0, ffi.Pointer arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, - ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer<_ObjCBlock>, int, - ffi.Pointer)>()(_id, arg0, arg1); -} - -void _ObjCBlock_ffiVoid_NSRange_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - _NSRange arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(_NSRange arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(_NSRange, ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( - void Function(_NSRange, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - _NSRange arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry[block.ref.target.address]!( - arg0, arg1); - -class ObjCBlock_ffiVoid_NSRange_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSRange_bool._(ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSRange_bool castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSRange_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSRange_bool.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(_NSRange arg0, ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSRange_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSRange_bool.fromFunction( - SwiftLibrary lib, void Function(_NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( - (_NSRange arg0, ffi.Pointer arg1) => - fn(arg0, arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSRange_bool.listener( - SwiftLibrary lib, void Function(_NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, _NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( - (_NSRange arg0, ffi.Pointer arg1) => - fn(arg0, arg1))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, _NSRange, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(_NSRange arg0, ffi.Pointer arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, _NSRange arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, _NSRange, - ffi.Pointer)>()(_id, arg0, arg1); -} - -void _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.UnsignedLong arg1, ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, int, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureRegistry = - , int, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_registerClosure( - void Function(ffi.Pointer, int, ffi.Pointer) fn) { - final id = - ++_ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.UnsignedLong arg1, ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool.fromFunction( - SwiftLibrary lib, void Function(NSObject, int, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_registerClosure( - (ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) => - fn(NSObject._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool.listener( - SwiftLibrary lib, void Function(NSObject, int, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool_registerClosure( - (ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) => - fn(NSObject._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSObject arg0, int arg1, ffi.Pointer arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.UnsignedLong arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - int, ffi.Pointer)>()(_id, arg0._id, arg1, arg2); -} - -bool _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.UnsignedLong arg1, ffi.Pointer arg2)>>() - .asFunction< - bool Function(ffi.Pointer, int, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_closureRegistry = - , int, ffi.Pointer)>{}; -int _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_registerClosure( - bool Function(ffi.Pointer, int, ffi.Pointer) fn) { - final id = - ++_ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_closureRegistryIndex; - _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool extends _ObjCBlockBase { - ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.UnsignedLong arg1, ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline, - false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool.fromFunction( - SwiftLibrary lib, bool Function(NSObject, int, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool_registerClosure( - (ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) => - fn(NSObject._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSObject arg0, int arg1, ffi.Pointer arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.UnsignedLong arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - int, ffi.Pointer)>()(_id, arg0._id, arg1, arg2); -} - -int _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_registerClosure( - int Function(ffi.Pointer, ffi.Pointer) fn) { - final id = - ++_ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistryIndex; - _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -int _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject - extends _ObjCBlockBase { - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int32 Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_fnPtrTrampoline, - 0) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject.fromFunction( - SwiftLibrary lib, int Function(NSObject, NSObject) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int32 Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureTrampoline, 0) - .cast(), - _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - NSObject._(arg0, lib, retain: true, release: true), - NSObject._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - int call(NSObject arg0, NSObject arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - int Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1._id); -} - -abstract class NSComparisonResult { - static const int NSOrderedAscending = -1; - static const int NSOrderedSame = 0; - static const int NSOrderedDescending = 1; -} - -abstract class NSSortOptions { - static const int NSSortConcurrent = 1; - static const int NSSortStable = 16; -} - -abstract class NSBinarySearchingOptions { - static const int NSBinarySearchingFirstEqual = 256; - static const int NSBinarySearchingLastEqual = 512; - static const int NSBinarySearchingInsertionIndex = 1024; -} - -abstract class NSOrderedCollectionDifferenceCalculationOptions { - static const int NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = - 1; - static const int NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = - 2; - static const int NSOrderedCollectionDifferenceCalculationInferMoves = 4; -} - -bool _ObjCBlock_bool_ObjCObject_ObjCObject_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_bool_ObjCObject_ObjCObject_registerClosure( - bool Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistryIndex; - _ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_ObjCObject_ObjCObject_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_bool_ObjCObject_ObjCObject extends _ObjCBlockBase { - ObjCBlock_bool_ObjCObject_ObjCObject._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_bool_ObjCObject_ObjCObject castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_bool_ObjCObject_ObjCObject._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_ObjCObject.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi - .NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_ObjCObject_fnPtrTrampoline, - false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_ObjCObject.fromFunction( - SwiftLibrary lib, bool Function(NSObject, NSObject) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_ObjCObject_closureTrampoline, - false) - .cast(), - _ObjCBlock_bool_ObjCObject_ObjCObject_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(NSObject._(arg0, lib, retain: true, release: true), NSObject._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSObject arg0, NSObject arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1._id); -} - -abstract class NSKeyValueObservingOptions { - static const int NSKeyValueObservingOptionNew = 1; - static const int NSKeyValueObservingOptionOld = 2; - static const int NSKeyValueObservingOptionInitial = 4; - static const int NSKeyValueObservingOptionPrior = 8; -} - -class NSPredicate extends NSObject { - NSPredicate._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSPredicate] that points to the same underlying object as [other]. - static NSPredicate castFrom(T other) { - return NSPredicate._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSPredicate] that wraps the given raw object pointer. - static NSPredicate castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPredicate._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSPredicate]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSPredicate1); - } - - static NSPredicate predicateWithFormat_argumentArray_( - SwiftLibrary _lib, NSString predicateFormat, NSArray? arguments) { - final _ret = _lib._objc_msgSend_142( - _lib._class_NSPredicate1, - _lib._sel_predicateWithFormat_argumentArray_1, - predicateFormat._id, - arguments?._id ?? ffi.nullptr); - return NSPredicate._(_ret, _lib, retain: true, release: true); - } - - static NSPredicate predicateWithFormat_( - SwiftLibrary _lib, NSString predicateFormat) { - final _ret = _lib._objc_msgSend_143(_lib._class_NSPredicate1, - _lib._sel_predicateWithFormat_1, predicateFormat._id); - return NSPredicate._(_ret, _lib, retain: true, release: true); - } - - static NSPredicate predicateWithFormat_arguments_(SwiftLibrary _lib, - NSString predicateFormat, ffi.Pointer<__va_list_tag> argList) { - final _ret = _lib._objc_msgSend_144( - _lib._class_NSPredicate1, - _lib._sel_predicateWithFormat_arguments_1, - predicateFormat._id, - argList); - return NSPredicate._(_ret, _lib, retain: true, release: true); - } - - static NSPredicate? predicateFromMetadataQueryString_( - SwiftLibrary _lib, NSString queryString) { - final _ret = _lib._objc_msgSend_145(_lib._class_NSPredicate1, - _lib._sel_predicateFromMetadataQueryString_1, queryString._id); - return _ret.address == 0 - ? null - : NSPredicate._(_ret, _lib, retain: true, release: true); - } - - static NSPredicate predicateWithValue_(SwiftLibrary _lib, bool value) { - final _ret = _lib._objc_msgSend_146( - _lib._class_NSPredicate1, _lib._sel_predicateWithValue_1, value); - return NSPredicate._(_ret, _lib, retain: true, release: true); - } - - static NSPredicate predicateWithBlock_( - SwiftLibrary _lib, ObjCBlock_bool_ObjCObject_NSDictionary block) { - final _ret = _lib._objc_msgSend_216( - _lib._class_NSPredicate1, _lib._sel_predicateWithBlock_1, block._id); - return NSPredicate._(_ret, _lib, retain: true, release: true); - } - - NSString get predicateFormat { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_predicateFormat1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSPredicate predicateWithSubstitutionVariables_(NSDictionary variables) { - final _ret = _lib._objc_msgSend_159( - _id, _lib._sel_predicateWithSubstitutionVariables_1, variables._id); - return NSPredicate._(_ret, _lib, retain: true, release: true); - } - - bool evaluateWithObject_(NSObject? object) { - return _lib._objc_msgSend_217( - _id, _lib._sel_evaluateWithObject_1, object?._id ?? ffi.nullptr); - } - - bool evaluateWithObject_substitutionVariables_( - NSObject? object, NSDictionary? bindings) { - return _lib._objc_msgSend_218( - _id, - _lib._sel_evaluateWithObject_substitutionVariables_1, - object?._id ?? ffi.nullptr, - bindings?._id ?? ffi.nullptr); - } - - void allowEvaluation() { - _lib._objc_msgSend_1(_id, _lib._sel_allowEvaluation1); - } - - @override - NSPredicate init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSPredicate._(_ret, _lib, retain: true, release: true); - } - - static NSPredicate new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSPredicate1, _lib._sel_new1); - return NSPredicate._(_ret, _lib, retain: false, release: true); - } - - static NSPredicate allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSPredicate1, _lib._sel_allocWithZone_1, zone); - return NSPredicate._(_ret, _lib, retain: false, release: true); - } - - static NSPredicate alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPredicate1, _lib._sel_alloc1); - return NSPredicate._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSPredicate1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSPredicate1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSPredicate1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSPredicate1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSPredicate1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSPredicate1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSPredicate1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSPredicate1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSPredicate1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -final class __va_list_tag extends ffi.Struct { - @ffi.UnsignedInt() - external int gp_offset; - - @ffi.UnsignedInt() - external int fp_offset; - - external ffi.Pointer overflow_arg_area; - - external ffi.Pointer reg_save_area; -} - -bool _ObjCBlock_bool_ObjCObject_NSDictionary_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_bool_ObjCObject_NSDictionary_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_bool_ObjCObject_NSDictionary_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_bool_ObjCObject_NSDictionary_registerClosure( - bool Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_bool_ObjCObject_NSDictionary_closureRegistryIndex; - _ObjCBlock_bool_ObjCObject_NSDictionary_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_ObjCObject_NSDictionary_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_bool_ObjCObject_NSDictionary_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_bool_ObjCObject_NSDictionary extends _ObjCBlockBase { - ObjCBlock_bool_ObjCObject_NSDictionary._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_bool_ObjCObject_NSDictionary castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_bool_ObjCObject_NSDictionary._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_NSDictionary.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_NSDictionary_fnPtrTrampoline, - false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_NSDictionary.fromFunction( - SwiftLibrary lib, bool Function(NSObject?, NSDictionary?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_NSDictionary_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_ObjCObject_NSDictionary_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSObject._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSDictionary._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSObject? arg0, NSDictionary? arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); -} - -class NSDictionary extends NSObject { - NSDictionary._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSDictionary] that points to the same underlying object as [other]. - static NSDictionary castFrom(T other) { - return NSDictionary._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSDictionary] that wraps the given raw object pointer. - static NSDictionary castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDictionary._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSDictionary]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDictionary1); - } - - int get count { - return _lib._objc_msgSend_10(_id, _lib._sel_count1); - } - - NSObject? objectForKey_(NSObject aKey) { - final _ret = _lib._objc_msgSend_16(_id, _lib._sel_objectForKey_1, aKey._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSEnumerator keyEnumerator() { - final _ret = _lib._objc_msgSend_77(_id, _lib._sel_keyEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } - - @override - NSDictionary init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary initWithObjects_forKeys_count_( - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _lib._objc_msgSend_147( - _id, _lib._sel_initWithObjects_forKeys_count_1, objects, keys, cnt); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSArray get allKeys { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_allKeys1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray allKeysForObject_(NSObject anObject) { - final _ret = - _lib._objc_msgSend_67(_id, _lib._sel_allKeysForObject_1, anObject._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray get allValues { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_allValues1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSString get description { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get descriptionInStringsFileFormat { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_descriptionInStringsFileFormat1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _lib._objc_msgSend_70( - _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithLocale_indent_(NSObject? locale, int level) { - final _ret = _lib._objc_msgSend_71( - _id, - _lib._sel_descriptionWithLocale_indent_1, - locale?._id ?? ffi.nullptr, - level); - return NSString._(_ret, _lib, retain: true, release: true); - } - - bool isEqualToDictionary_(NSDictionary otherDictionary) { - return _lib._objc_msgSend_148( - _id, _lib._sel_isEqualToDictionary_1, otherDictionary._id); - } - - NSEnumerator objectEnumerator() { - final _ret = _lib._objc_msgSend_77(_id, _lib._sel_objectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } - - NSArray objectsForKeys_notFoundMarker_(NSArray keys, NSObject marker) { - final _ret = _lib._objc_msgSend_149( - _id, _lib._sel_objectsForKeys_notFoundMarker_1, keys._id, marker._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - bool writeToURL_error_( - NSURL url, ffi.Pointer> error) { - return _lib._objc_msgSend_89( - _id, _lib._sel_writeToURL_error_1, url._id, error); - } - - NSArray keysSortedByValueUsingSelector_(ffi.Pointer comparator) { - final _ret = _lib._objc_msgSend_80( - _id, _lib._sel_keysSortedByValueUsingSelector_1, comparator); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - void getObjects_andKeys_count_(ffi.Pointer> objects, - ffi.Pointer> keys, int count) { - _lib._objc_msgSend_150( - _id, _lib._sel_getObjects_andKeys_count_1, objects, keys, count); - } - - NSObject? objectForKeyedSubscript_(NSObject key) { - final _ret = _lib._objc_msgSend_16( - _id, _lib._sel_objectForKeyedSubscript_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void enumerateKeysAndObjectsUsingBlock_( - ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool block) { - _lib._objc_msgSend_151( - _id, _lib._sel_enumerateKeysAndObjectsUsingBlock_1, block._id); - } - - void enumerateKeysAndObjectsWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool block) { - _lib._objc_msgSend_152( - _id, - _lib._sel_enumerateKeysAndObjectsWithOptions_usingBlock_1, - opts, - block._id); - } - - NSArray keysSortedByValueUsingComparator_( - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { - final _ret = _lib._objc_msgSend_121( - _id, _lib._sel_keysSortedByValueUsingComparator_1, cmptr._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray keysSortedByValueWithOptions_usingComparator_( - int opts, ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { - final _ret = _lib._objc_msgSend_122( - _id, - _lib._sel_keysSortedByValueWithOptions_usingComparator_1, - opts, - cmptr._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSObject keysOfEntriesPassingTest_( - ObjCBlock_bool_ObjCObject_ObjCObject_bool predicate) { - final _ret = _lib._objc_msgSend_153( - _id, _lib._sel_keysOfEntriesPassingTest_1, predicate._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject keysOfEntriesWithOptions_passingTest_( - int opts, ObjCBlock_bool_ObjCObject_ObjCObject_bool predicate) { - final _ret = _lib._objc_msgSend_154(_id, - _lib._sel_keysOfEntriesWithOptions_passingTest_1, opts, predicate._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - void getObjects_andKeys_(ffi.Pointer> objects, - ffi.Pointer> keys) { - _lib._objc_msgSend_155(_id, _lib._sel_getObjects_andKeys_1, objects, keys); - } - - static NSDictionary? dictionaryWithContentsOfFile_( - SwiftLibrary _lib, NSString path) { - final _ret = _lib._objc_msgSend_156(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary? dictionaryWithContentsOfURL_( - SwiftLibrary _lib, NSURL url) { - final _ret = _lib._objc_msgSend_157(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? initWithContentsOfFile_(NSString path) { - final _ret = _lib._objc_msgSend_156( - _id, _lib._sel_initWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_157(_id, _lib._sel_initWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_26( - _id, _lib._sel_writeToFile_atomically_1, path._id, useAuxiliaryFile); - } - - bool writeToURL_atomically_(NSURL url, bool atomically) { - return _lib._objc_msgSend_134( - _id, _lib._sel_writeToURL_atomically_1, url._id, atomically); - } - - static NSDictionary dictionary(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_dictionary1); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary dictionaryWithObject_forKey_( - SwiftLibrary _lib, NSObject object, NSObject key) { - final _ret = _lib._objc_msgSend_158(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary dictionaryWithObjects_forKeys_count_( - SwiftLibrary _lib, - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _lib._objc_msgSend_147(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary dictionaryWithObjectsAndKeys_( - SwiftLibrary _lib, NSObject firstObject) { - final _ret = _lib._objc_msgSend_124(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary dictionaryWithDictionary_( - SwiftLibrary _lib, NSDictionary dict) { - final _ret = _lib._objc_msgSend_159(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithDictionary_1, dict._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary dictionaryWithObjects_forKeys_( - SwiftLibrary _lib, NSArray objects, NSArray keys) { - final _ret = _lib._objc_msgSend_160(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_1, objects._id, keys._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary initWithObjectsAndKeys_(NSObject firstObject) { - final _ret = _lib._objc_msgSend_124( - _id, _lib._sel_initWithObjectsAndKeys_1, firstObject._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary initWithDictionary_(NSDictionary otherDictionary) { - final _ret = _lib._objc_msgSend_159( - _id, _lib._sel_initWithDictionary_1, otherDictionary._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary initWithDictionary_copyItems_( - NSDictionary otherDictionary, bool flag) { - final _ret = _lib._objc_msgSend_161(_id, - _lib._sel_initWithDictionary_copyItems_1, otherDictionary._id, flag); - return NSDictionary._(_ret, _lib, retain: false, release: true); - } - - NSDictionary initWithObjects_forKeys_(NSArray objects, NSArray keys) { - final _ret = _lib._objc_msgSend_160( - _id, _lib._sel_initWithObjects_forKeys_1, objects._id, keys._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? initWithContentsOfURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_162( - _id, _lib._sel_initWithContentsOfURL_error_1, url._id, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary? dictionaryWithContentsOfURL_error_(SwiftLibrary _lib, - NSURL url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_162(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfURL_error_1, url._id, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSObject sharedKeySetForKeys_(SwiftLibrary _lib, NSArray keys) { - final _ret = _lib._objc_msgSend_125( - _lib._class_NSDictionary1, _lib._sel_sharedKeySetForKeys_1, keys._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - int countByEnumeratingWithState_objects_count_( - ffi.Pointer state, - ffi.Pointer> buffer, - int len) { - return _lib._objc_msgSend_163( - _id, - _lib._sel_countByEnumeratingWithState_objects_count_1, - state, - buffer, - len); - } - - int fileSize() { - return _lib._objc_msgSend_164(_id, _lib._sel_fileSize1); - } - - NSDate? fileModificationDate() { - final _ret = _lib._objc_msgSend_183(_id, _lib._sel_fileModificationDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - NSString? fileType() { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_fileType1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - int filePosixPermissions() { - return _lib._objc_msgSend_10(_id, _lib._sel_filePosixPermissions1); - } - - NSString? fileOwnerAccountName() { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_fileOwnerAccountName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? fileGroupOwnerAccountName() { - final _ret = - _lib._objc_msgSend_44(_id, _lib._sel_fileGroupOwnerAccountName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - int fileSystemNumber() { - return _lib._objc_msgSend_83(_id, _lib._sel_fileSystemNumber1); - } - - int fileSystemFileNumber() { - return _lib._objc_msgSend_10(_id, _lib._sel_fileSystemFileNumber1); - } - - bool fileExtensionHidden() { - return _lib._objc_msgSend_12(_id, _lib._sel_fileExtensionHidden1); - } - - int fileHFSCreatorCode() { - return _lib._objc_msgSend_214(_id, _lib._sel_fileHFSCreatorCode1); - } - - int fileHFSTypeCode() { - return _lib._objc_msgSend_214(_id, _lib._sel_fileHFSTypeCode1); - } - - bool fileIsImmutable() { - return _lib._objc_msgSend_12(_id, _lib._sel_fileIsImmutable1); - } - - bool fileIsAppendOnly() { - return _lib._objc_msgSend_12(_id, _lib._sel_fileIsAppendOnly1); - } - - NSDate? fileCreationDate() { - final _ret = _lib._objc_msgSend_183(_id, _lib._sel_fileCreationDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - NSNumber? fileOwnerAccountID() { - final _ret = _lib._objc_msgSend_215(_id, _lib._sel_fileOwnerAccountID1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber? fileGroupOwnerAccountID() { - final _ret = - _lib._objc_msgSend_215(_id, _lib._sel_fileGroupOwnerAccountID1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } - - @override - NSObject? valueForKey_(NSString key) { - final _ret = _lib._objc_msgSend_38(_id, _lib._sel_valueForKey_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_new1); - return NSDictionary._(_ret, _lib, retain: false, release: true); - } - - static NSDictionary allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSDictionary1, _lib._sel_allocWithZone_1, zone); - return NSDictionary._(_ret, _lib, retain: false, release: true); - } - - static NSDictionary alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_alloc1); - return NSDictionary._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSDictionary1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSDictionary1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSDictionary1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSDictionary1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSDictionary1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSDictionary1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSDictionary1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSDictionary1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSDictionary1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -void _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_registerClosure( - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool.fromFunction(SwiftLibrary lib, - void Function(NSObject, NSObject, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - NSObject._(arg0, lib, retain: true, release: true), - NSObject._(arg1, lib, retain: true, release: true), - arg2))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool.listener(SwiftLibrary lib, - void Function(NSObject, NSObject, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - fn( - NSObject._(arg0, lib, retain: true, release: true), - NSObject._(arg1, lib, retain: true, release: true), - arg2))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSObject arg0, NSObject arg1, ffi.Pointer arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1._id, arg2); -} - -bool _ObjCBlock_bool_ObjCObject_ObjCObject_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_bool_ObjCObject_ObjCObject_bool_registerClosure( - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer) - fn) { - final id = ++_ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistryIndex; - _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_bool_ObjCObject_ObjCObject_bool extends _ObjCBlockBase { - ObjCBlock_bool_ObjCObject_ObjCObject_bool._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_bool_ObjCObject_ObjCObject_bool castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_bool_ObjCObject_ObjCObject_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_ObjCObject_bool.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_ObjCObject_bool_fnPtrTrampoline, - false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_ObjCObject_bool.fromFunction(SwiftLibrary lib, - bool Function(NSObject, NSObject, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_ObjCObject_ObjCObject_bool_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) => - fn(NSObject._(arg0, lib, retain: true, release: true), NSObject._(arg1, lib, retain: true, release: true), arg2))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSObject arg0, NSObject arg1, ffi.Pointer arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1._id, arg2); -} - -final class NSFastEnumerationState extends ffi.Struct { - @ffi.UnsignedLong() - external int state; - - external ffi.Pointer> itemsPtr; - - external ffi.Pointer mutationsPtr; - - @ffi.Array.multi([5]) - external ffi.Array extra; -} - -class NSDate extends NSObject { - NSDate._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSDate] that points to the same underlying object as [other]. - static NSDate castFrom(T other) { - return NSDate._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSDate] that wraps the given raw object pointer. - static NSDate castFromPointer(SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDate._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSDate]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDate1); - } - - double get timeIntervalSinceReferenceDate { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret( - _id, _lib._sel_timeIntervalSinceReferenceDate1) - : _lib._objc_msgSend_165( - _id, _lib._sel_timeIntervalSinceReferenceDate1); - } - - @override - NSDate init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - NSDate initWithTimeIntervalSinceReferenceDate_(double ti) { - final _ret = _lib._objc_msgSend_166( - _id, _lib._sel_initWithTimeIntervalSinceReferenceDate_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - NSDate? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - double timeIntervalSinceDate_(NSDate anotherDate) { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_167_fpret( - _id, _lib._sel_timeIntervalSinceDate_1, anotherDate._id) - : _lib._objc_msgSend_167( - _id, _lib._sel_timeIntervalSinceDate_1, anotherDate._id); - } - - double get timeIntervalSinceNow { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_timeIntervalSinceNow1) - : _lib._objc_msgSend_165(_id, _lib._sel_timeIntervalSinceNow1); - } - - double get timeIntervalSince1970 { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_timeIntervalSince19701) - : _lib._objc_msgSend_165(_id, _lib._sel_timeIntervalSince19701); - } - - NSObject addTimeInterval_(double seconds) { - final _ret = - _lib._objc_msgSend_166(_id, _lib._sel_addTimeInterval_1, seconds); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSDate dateByAddingTimeInterval_(double ti) { - final _ret = - _lib._objc_msgSend_166(_id, _lib._sel_dateByAddingTimeInterval_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - NSDate earlierDate_(NSDate anotherDate) { - final _ret = - _lib._objc_msgSend_168(_id, _lib._sel_earlierDate_1, anotherDate._id); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - NSDate laterDate_(NSDate anotherDate) { - final _ret = - _lib._objc_msgSend_168(_id, _lib._sel_laterDate_1, anotherDate._id); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - int compare_(NSDate other) { - return _lib._objc_msgSend_169(_id, _lib._sel_compare_1, other._id); - } - - bool isEqualToDate_(NSDate otherDate) { - return _lib._objc_msgSend_170( - _id, _lib._sel_isEqualToDate_1, otherDate._id); - } - - NSString get description { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _lib._objc_msgSend_70( - _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSDate date(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_date1); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate dateWithTimeIntervalSinceNow_(SwiftLibrary _lib, double secs) { - final _ret = _lib._objc_msgSend_166( - _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSinceNow_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate dateWithTimeIntervalSinceReferenceDate_( - SwiftLibrary _lib, double ti) { - final _ret = _lib._objc_msgSend_166(_lib._class_NSDate1, - _lib._sel_dateWithTimeIntervalSinceReferenceDate_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate dateWithTimeIntervalSince1970_(SwiftLibrary _lib, double secs) { - final _ret = _lib._objc_msgSend_166( - _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSince1970_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate dateWithTimeInterval_sinceDate_( - SwiftLibrary _lib, double secsToBeAdded, NSDate date) { - final _ret = _lib._objc_msgSend_171(_lib._class_NSDate1, - _lib._sel_dateWithTimeInterval_sinceDate_1, secsToBeAdded, date._id); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate getDistantFuture(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_172(_lib._class_NSDate1, _lib._sel_distantFuture1); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate getDistantPast(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_172(_lib._class_NSDate1, _lib._sel_distantPast1); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate getNow(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_172(_lib._class_NSDate1, _lib._sel_now1); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - NSDate initWithTimeIntervalSinceNow_(double secs) { - final _ret = _lib._objc_msgSend_166( - _id, _lib._sel_initWithTimeIntervalSinceNow_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - NSDate initWithTimeIntervalSince1970_(double secs) { - final _ret = _lib._objc_msgSend_166( - _id, _lib._sel_initWithTimeIntervalSince1970_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - NSDate initWithTimeInterval_sinceDate_(double secsToBeAdded, NSDate date) { - final _ret = _lib._objc_msgSend_171(_id, - _lib._sel_initWithTimeInterval_sinceDate_1, secsToBeAdded, date._id); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSObject? dateWithNaturalLanguageString_locale_( - SwiftLibrary _lib, NSString string, NSObject? locale) { - final _ret = _lib._objc_msgSend_173( - _lib._class_NSDate1, - _lib._sel_dateWithNaturalLanguageString_locale_1, - string._id, - locale?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject? dateWithNaturalLanguageString_( - SwiftLibrary _lib, NSString string) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSDate1, - _lib._sel_dateWithNaturalLanguageString_1, string._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject dateWithString_(SwiftLibrary _lib, NSString aString) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSDate1, _lib._sel_dateWithString_1, aString._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSCalendarDate dateWithCalendarFormat_timeZone_( - NSString? format, NSTimeZone? aTimeZone) { - final _ret = _lib._objc_msgSend_212( - _id, - _lib._sel_dateWithCalendarFormat_timeZone_1, - format?._id ?? ffi.nullptr, - aTimeZone?._id ?? ffi.nullptr); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - NSString? descriptionWithCalendarFormat_timeZone_locale_( - NSString? format, NSTimeZone? aTimeZone, NSObject? locale) { - final _ret = _lib._objc_msgSend_213( - _id, - _lib._sel_descriptionWithCalendarFormat_timeZone_locale_1, - format?._id ?? ffi.nullptr, - aTimeZone?._id ?? ffi.nullptr, - locale?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSObject? initWithString_(NSString description) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_initWithString_1, description._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSDate new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_new1); - return NSDate._(_ret, _lib, retain: false, release: true); - } - - static NSDate allocWithZone_(SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSDate1, _lib._sel_allocWithZone_1, zone); - return NSDate._(_ret, _lib, retain: false, release: true); - } - - static NSDate alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_alloc1); - return NSDate._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSDate1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSDate1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSDate1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSDate1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSDate1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSDate1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSDate1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSDate1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSDate1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSCalendarDate extends NSDate { - NSCalendarDate._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSCalendarDate] that points to the same underlying object as [other]. - static NSCalendarDate castFrom(T other) { - return NSCalendarDate._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSCalendarDate] that wraps the given raw object pointer. - static NSCalendarDate castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCalendarDate._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSCalendarDate]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSCalendarDate1); - } - - static NSObject calendarDate(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSCalendarDate1, _lib._sel_calendarDate1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject? dateWithString_calendarFormat_locale_(SwiftLibrary _lib, - NSString description, NSString format, NSObject? locale) { - final _ret = _lib._objc_msgSend_174( - _lib._class_NSCalendarDate1, - _lib._sel_dateWithString_calendarFormat_locale_1, - description._id, - format._id, - locale?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject? dateWithString_calendarFormat_( - SwiftLibrary _lib, NSString description, NSString format) { - final _ret = _lib._objc_msgSend_175(_lib._class_NSCalendarDate1, - _lib._sel_dateWithString_calendarFormat_1, description._id, format._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject dateWithYear_month_day_hour_minute_second_timeZone_( - SwiftLibrary _lib, - int year, - int month, - int day, - int hour, - int minute, - int second, - NSTimeZone? aTimeZone) { - final _ret = _lib._objc_msgSend_206( - _lib._class_NSCalendarDate1, - _lib._sel_dateWithYear_month_day_hour_minute_second_timeZone_1, - year, - month, - day, - hour, - minute, - second, - aTimeZone?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSCalendarDate dateByAddingYears_months_days_hours_minutes_seconds_( - int year, int month, int day, int hour, int minute, int second) { - final _ret = _lib._objc_msgSend_207( - _id, - _lib._sel_dateByAddingYears_months_days_hours_minutes_seconds_1, - year, - month, - day, - hour, - minute, - second); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - int dayOfCommonEra() { - return _lib._objc_msgSend_83(_id, _lib._sel_dayOfCommonEra1); - } - - int dayOfMonth() { - return _lib._objc_msgSend_83(_id, _lib._sel_dayOfMonth1); - } - - int dayOfWeek() { - return _lib._objc_msgSend_83(_id, _lib._sel_dayOfWeek1); - } - - int dayOfYear() { - return _lib._objc_msgSend_83(_id, _lib._sel_dayOfYear1); - } - - int hourOfDay() { - return _lib._objc_msgSend_83(_id, _lib._sel_hourOfDay1); - } - - int minuteOfHour() { - return _lib._objc_msgSend_83(_id, _lib._sel_minuteOfHour1); - } - - int monthOfYear() { - return _lib._objc_msgSend_83(_id, _lib._sel_monthOfYear1); - } - - int secondOfMinute() { - return _lib._objc_msgSend_83(_id, _lib._sel_secondOfMinute1); - } - - int yearOfCommonEra() { - return _lib._objc_msgSend_83(_id, _lib._sel_yearOfCommonEra1); - } - - NSString calendarFormat() { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_calendarFormat1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithCalendarFormat_locale_( - NSString format, NSObject? locale) { - final _ret = _lib._objc_msgSend_208( - _id, - _lib._sel_descriptionWithCalendarFormat_locale_1, - format._id, - locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithCalendarFormat_(NSString format) { - final _ret = _lib._objc_msgSend_69( - _id, _lib._sel_descriptionWithCalendarFormat_1, format._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - @override - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _lib._objc_msgSend_70( - _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSTimeZone timeZone() { - final _ret = _lib._objc_msgSend_179(_id, _lib._sel_timeZone1); - return NSTimeZone._(_ret, _lib, retain: true, release: true); - } - - NSObject? initWithString_calendarFormat_locale_( - NSString description, NSString format, NSObject? locale) { - final _ret = _lib._objc_msgSend_174( - _id, - _lib._sel_initWithString_calendarFormat_locale_1, - description._id, - format._id, - locale?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? initWithString_calendarFormat_( - NSString description, NSString format) { - final _ret = _lib._objc_msgSend_175(_id, - _lib._sel_initWithString_calendarFormat_1, description._id, format._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - @override - NSObject? initWithString_(NSString description) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_initWithString_1, description._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject initWithYear_month_day_hour_minute_second_timeZone_( - int year, - int month, - int day, - int hour, - int minute, - int second, - NSTimeZone? aTimeZone) { - final _ret = _lib._objc_msgSend_206( - _id, - _lib._sel_initWithYear_month_day_hour_minute_second_timeZone_1, - year, - month, - day, - hour, - minute, - second, - aTimeZone?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - void setCalendarFormat_(NSString? format) { - _lib._objc_msgSend_209( - _id, _lib._sel_setCalendarFormat_1, format?._id ?? ffi.nullptr); - } - - void setTimeZone_(NSTimeZone? aTimeZone) { - _lib._objc_msgSend_210( - _id, _lib._sel_setTimeZone_1, aTimeZone?._id ?? ffi.nullptr); - } - - void years_months_days_hours_minutes_seconds_sinceDate_( - ffi.Pointer yp, - ffi.Pointer mop, - ffi.Pointer dp, - ffi.Pointer hp, - ffi.Pointer mip, - ffi.Pointer sp, - NSCalendarDate date) { - _lib._objc_msgSend_211( - _id, - _lib._sel_years_months_days_hours_minutes_seconds_sinceDate_1, - yp, - mop, - dp, - hp, - mip, - sp, - date._id); - } - - static NSDate getDistantFuture(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_172( - _lib._class_NSCalendarDate1, _lib._sel_distantFuture1); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate getDistantPast(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_172( - _lib._class_NSCalendarDate1, _lib._sel_distantPast1); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - @override - NSCalendarDate init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - @override - NSCalendarDate initWithTimeIntervalSinceReferenceDate_(double ti) { - final _ret = _lib._objc_msgSend_166( - _id, _lib._sel_initWithTimeIntervalSinceReferenceDate_1, ti); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - @override - NSCalendarDate? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - @override - NSCalendarDate dateByAddingTimeInterval_(double ti) { - final _ret = - _lib._objc_msgSend_166(_id, _lib._sel_dateByAddingTimeInterval_1, ti); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - static NSCalendarDate date(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCalendarDate1, _lib._sel_date1); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - static NSCalendarDate dateWithTimeIntervalSinceNow_( - SwiftLibrary _lib, double secs) { - final _ret = _lib._objc_msgSend_166(_lib._class_NSCalendarDate1, - _lib._sel_dateWithTimeIntervalSinceNow_1, secs); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - static NSCalendarDate dateWithTimeIntervalSinceReferenceDate_( - SwiftLibrary _lib, double ti) { - final _ret = _lib._objc_msgSend_166(_lib._class_NSCalendarDate1, - _lib._sel_dateWithTimeIntervalSinceReferenceDate_1, ti); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - static NSCalendarDate dateWithTimeIntervalSince1970_( - SwiftLibrary _lib, double secs) { - final _ret = _lib._objc_msgSend_166(_lib._class_NSCalendarDate1, - _lib._sel_dateWithTimeIntervalSince1970_1, secs); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - static NSCalendarDate dateWithTimeInterval_sinceDate_( - SwiftLibrary _lib, double secsToBeAdded, NSDate date) { - final _ret = _lib._objc_msgSend_171(_lib._class_NSCalendarDate1, - _lib._sel_dateWithTimeInterval_sinceDate_1, secsToBeAdded, date._id); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate getNow(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_172(_lib._class_NSCalendarDate1, _lib._sel_now1); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - @override - NSCalendarDate initWithTimeIntervalSinceNow_(double secs) { - final _ret = _lib._objc_msgSend_166( - _id, _lib._sel_initWithTimeIntervalSinceNow_1, secs); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - @override - NSCalendarDate initWithTimeIntervalSince1970_(double secs) { - final _ret = _lib._objc_msgSend_166( - _id, _lib._sel_initWithTimeIntervalSince1970_1, secs); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - @override - NSCalendarDate initWithTimeInterval_sinceDate_( - double secsToBeAdded, NSDate date) { - final _ret = _lib._objc_msgSend_171(_id, - _lib._sel_initWithTimeInterval_sinceDate_1, secsToBeAdded, date._id); - return NSCalendarDate._(_ret, _lib, retain: true, release: true); - } - - static NSObject? dateWithNaturalLanguageString_locale_( - SwiftLibrary _lib, NSString string, NSObject? locale) { - final _ret = _lib._objc_msgSend_173( - _lib._class_NSCalendarDate1, - _lib._sel_dateWithNaturalLanguageString_locale_1, - string._id, - locale?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject? dateWithNaturalLanguageString_( - SwiftLibrary _lib, NSString string) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSCalendarDate1, - _lib._sel_dateWithNaturalLanguageString_1, string._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject dateWithString_(SwiftLibrary _lib, NSString aString) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSCalendarDate1, _lib._sel_dateWithString_1, aString._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSCalendarDate new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCalendarDate1, _lib._sel_new1); - return NSCalendarDate._(_ret, _lib, retain: false, release: true); - } - - static NSCalendarDate allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSCalendarDate1, _lib._sel_allocWithZone_1, zone); - return NSCalendarDate._(_ret, _lib, retain: false, release: true); - } - - static NSCalendarDate alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCalendarDate1, _lib._sel_alloc1); - return NSCalendarDate._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSCalendarDate1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSCalendarDate1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSCalendarDate1, - _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSCalendarDate1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSCalendarDate1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSCalendarDate1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSCalendarDate1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSCalendarDate1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSCalendarDate1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSTimeZone extends NSObject { - NSTimeZone._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSTimeZone] that points to the same underlying object as [other]. - static NSTimeZone castFrom(T other) { - return NSTimeZone._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSTimeZone] that wraps the given raw object pointer. - static NSTimeZone castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSTimeZone._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSTimeZone]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSTimeZone1); - } - - NSString get name { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_name1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSData get data { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_data1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - int secondsFromGMTForDate_(NSDate aDate) { - return _lib._objc_msgSend_176( - _id, _lib._sel_secondsFromGMTForDate_1, aDate._id); - } - - NSString? abbreviationForDate_(NSDate aDate) { - final _ret = - _lib._objc_msgSend_177(_id, _lib._sel_abbreviationForDate_1, aDate._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - bool isDaylightSavingTimeForDate_(NSDate aDate) { - return _lib._objc_msgSend_170( - _id, _lib._sel_isDaylightSavingTimeForDate_1, aDate._id); - } - - double daylightSavingTimeOffsetForDate_(NSDate aDate) { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_167_fpret( - _id, _lib._sel_daylightSavingTimeOffsetForDate_1, aDate._id) - : _lib._objc_msgSend_167( - _id, _lib._sel_daylightSavingTimeOffsetForDate_1, aDate._id); - } - - NSDate? nextDaylightSavingTimeTransitionAfterDate_(NSDate aDate) { - final _ret = _lib._objc_msgSend_178( - _id, _lib._sel_nextDaylightSavingTimeTransitionAfterDate_1, aDate._id); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSTimeZone getSystemTimeZone(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_179( - _lib._class_NSTimeZone1, _lib._sel_systemTimeZone1); - return NSTimeZone._(_ret, _lib, retain: true, release: true); - } - - static void resetSystemTimeZone(SwiftLibrary _lib) { - _lib._objc_msgSend_1( - _lib._class_NSTimeZone1, _lib._sel_resetSystemTimeZone1); - } - - static NSTimeZone getDefaultTimeZone(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_179( - _lib._class_NSTimeZone1, _lib._sel_defaultTimeZone1); - return NSTimeZone._(_ret, _lib, retain: true, release: true); - } - - static void setDefaultTimeZone(SwiftLibrary _lib, NSTimeZone value) { - return _lib._objc_msgSend_180( - _lib._class_NSTimeZone1, _lib._sel_setDefaultTimeZone_1, value._id); - } - - static NSTimeZone getLocalTimeZone(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_179( - _lib._class_NSTimeZone1, _lib._sel_localTimeZone1); - return NSTimeZone._(_ret, _lib, retain: true, release: true); - } - - static NSArray getKnownTimeZoneNames(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSTimeZone1, _lib._sel_knownTimeZoneNames1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary getAbbreviationDictionary(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_181( - _lib._class_NSTimeZone1, _lib._sel_abbreviationDictionary1); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static void setAbbreviationDictionary(SwiftLibrary _lib, NSDictionary value) { - return _lib._objc_msgSend_182(_lib._class_NSTimeZone1, - _lib._sel_setAbbreviationDictionary_1, value._id); - } - - static NSString getTimeZoneDataVersion(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_21( - _lib._class_NSTimeZone1, _lib._sel_timeZoneDataVersion1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - int get secondsFromGMT { - return _lib._objc_msgSend_83(_id, _lib._sel_secondsFromGMT1); - } - - NSString? get abbreviation { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_abbreviation1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - bool get daylightSavingTime { - return _lib._objc_msgSend_12(_id, _lib._sel_isDaylightSavingTime1); - } - - double get daylightSavingTimeOffset { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_daylightSavingTimeOffset1) - : _lib._objc_msgSend_165(_id, _lib._sel_daylightSavingTimeOffset1); - } - - NSDate? get nextDaylightSavingTimeTransition { - final _ret = _lib._objc_msgSend_183( - _id, _lib._sel_nextDaylightSavingTimeTransition1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - NSString get description { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - bool isEqualToTimeZone_(NSTimeZone aTimeZone) { - return _lib._objc_msgSend_184( - _id, _lib._sel_isEqualToTimeZone_1, aTimeZone._id); - } - - NSString? localizedName_locale_(int style, NSLocale? locale) { - final _ret = _lib._objc_msgSend_203(_id, _lib._sel_localizedName_locale_1, - style, locale?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSTimeZone? timeZoneWithName_(SwiftLibrary _lib, NSString tzName) { - final _ret = _lib._objc_msgSend_38( - _lib._class_NSTimeZone1, _lib._sel_timeZoneWithName_1, tzName._id); - return _ret.address == 0 - ? null - : NSTimeZone._(_ret, _lib, retain: true, release: true); - } - - static NSTimeZone? timeZoneWithName_data_( - SwiftLibrary _lib, NSString tzName, NSData? aData) { - final _ret = _lib._objc_msgSend_204( - _lib._class_NSTimeZone1, - _lib._sel_timeZoneWithName_data_1, - tzName._id, - aData?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSTimeZone._(_ret, _lib, retain: true, release: true); - } - - NSTimeZone? initWithName_(NSString tzName) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_initWithName_1, tzName._id); - return _ret.address == 0 - ? null - : NSTimeZone._(_ret, _lib, retain: true, release: true); - } - - NSTimeZone? initWithName_data_(NSString tzName, NSData? aData) { - final _ret = _lib._objc_msgSend_204(_id, _lib._sel_initWithName_data_1, - tzName._id, aData?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSTimeZone._(_ret, _lib, retain: true, release: true); - } - - static NSTimeZone timeZoneForSecondsFromGMT_(SwiftLibrary _lib, int seconds) { - final _ret = _lib._objc_msgSend_205(_lib._class_NSTimeZone1, - _lib._sel_timeZoneForSecondsFromGMT_1, seconds); - return NSTimeZone._(_ret, _lib, retain: true, release: true); - } - - static NSTimeZone? timeZoneWithAbbreviation_( - SwiftLibrary _lib, NSString abbreviation) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSTimeZone1, - _lib._sel_timeZoneWithAbbreviation_1, abbreviation._id); - return _ret.address == 0 - ? null - : NSTimeZone._(_ret, _lib, retain: true, release: true); - } - - @override - NSTimeZone init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSTimeZone._(_ret, _lib, retain: true, release: true); - } - - static NSTimeZone new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSTimeZone1, _lib._sel_new1); - return NSTimeZone._(_ret, _lib, retain: false, release: true); - } - - static NSTimeZone allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSTimeZone1, _lib._sel_allocWithZone_1, zone); - return NSTimeZone._(_ret, _lib, retain: false, release: true); - } - - static NSTimeZone alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSTimeZone1, _lib._sel_alloc1); - return NSTimeZone._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSTimeZone1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSTimeZone1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSTimeZone1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSTimeZone1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSTimeZone1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSTimeZone1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSTimeZone1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSTimeZone1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSTimeZone1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -abstract class NSTimeZoneNameStyle { - static const int NSTimeZoneNameStyleStandard = 0; - static const int NSTimeZoneNameStyleShortStandard = 1; - static const int NSTimeZoneNameStyleDaylightSaving = 2; - static const int NSTimeZoneNameStyleShortDaylightSaving = 3; - static const int NSTimeZoneNameStyleGeneric = 4; - static const int NSTimeZoneNameStyleShortGeneric = 5; -} - -class NSLocale extends NSObject { - NSLocale._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSLocale] that points to the same underlying object as [other]. - static NSLocale castFrom(T other) { - return NSLocale._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSLocale] that wraps the given raw object pointer. - static NSLocale castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSLocale._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSLocale]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSLocale1); - } - - NSObject? objectForKey_(NSString key) { - final _ret = _lib._objc_msgSend_38(_id, _lib._sel_objectForKey_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSString? displayNameForKey_value_(NSString key, NSObject value) { - final _ret = _lib._objc_msgSend_185( - _id, _lib._sel_displayNameForKey_value_1, key._id, value._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSLocale initWithLocaleIdentifier_(NSString string) { - final _ret = _lib._objc_msgSend_31( - _id, _lib._sel_initWithLocaleIdentifier_1, string._id); - return NSLocale._(_ret, _lib, retain: true, release: true); - } - - NSLocale? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSLocale._(_ret, _lib, retain: true, release: true); - } - - NSString get localeIdentifier { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_localeIdentifier1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString localizedStringForLocaleIdentifier_(NSString localeIdentifier) { - final _ret = _lib._objc_msgSend_69(_id, - _lib._sel_localizedStringForLocaleIdentifier_1, localeIdentifier._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get languageCode { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_languageCode1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? localizedStringForLanguageCode_(NSString languageCode) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_localizedStringForLanguageCode_1, languageCode._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get languageIdentifier { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_languageIdentifier1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get countryCode { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_countryCode1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? localizedStringForCountryCode_(NSString countryCode) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_localizedStringForCountryCode_1, countryCode._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get regionCode { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_regionCode1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get scriptCode { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_scriptCode1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? localizedStringForScriptCode_(NSString scriptCode) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_localizedStringForScriptCode_1, scriptCode._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get variantCode { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_variantCode1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? localizedStringForVariantCode_(NSString variantCode) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_localizedStringForVariantCode_1, variantCode._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSCharacterSet get exemplarCharacterSet { - final _ret = _lib._objc_msgSend_187(_id, _lib._sel_exemplarCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - NSString get calendarIdentifier { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_calendarIdentifier1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? localizedStringForCalendarIdentifier_(NSString calendarIdentifier) { - final _ret = _lib._objc_msgSend_186( - _id, - _lib._sel_localizedStringForCalendarIdentifier_1, - calendarIdentifier._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get collationIdentifier { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_collationIdentifier1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? localizedStringForCollationIdentifier_( - NSString collationIdentifier) { - final _ret = _lib._objc_msgSend_186( - _id, - _lib._sel_localizedStringForCollationIdentifier_1, - collationIdentifier._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - bool get usesMetricSystem { - return _lib._objc_msgSend_12(_id, _lib._sel_usesMetricSystem1); - } - - NSString get decimalSeparator { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_decimalSeparator1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get groupingSeparator { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_groupingSeparator1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get currencySymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_currencySymbol1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get currencyCode { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_currencyCode1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? localizedStringForCurrencyCode_(NSString currencyCode) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_localizedStringForCurrencyCode_1, currencyCode._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get collatorIdentifier { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_collatorIdentifier1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? localizedStringForCollatorIdentifier_(NSString collatorIdentifier) { - final _ret = _lib._objc_msgSend_186( - _id, - _lib._sel_localizedStringForCollatorIdentifier_1, - collatorIdentifier._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get quotationBeginDelimiter { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_quotationBeginDelimiter1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get quotationEndDelimiter { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_quotationEndDelimiter1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get alternateQuotationBeginDelimiter { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_alternateQuotationBeginDelimiter1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get alternateQuotationEndDelimiter { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_alternateQuotationEndDelimiter1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSLocale getAutoupdatingCurrentLocale(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_197( - _lib._class_NSLocale1, _lib._sel_autoupdatingCurrentLocale1); - return NSLocale._(_ret, _lib, retain: true, release: true); - } - - static NSLocale getCurrentLocale(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_197(_lib._class_NSLocale1, _lib._sel_currentLocale1); - return NSLocale._(_ret, _lib, retain: true, release: true); - } - - static NSLocale getSystemLocale(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_197(_lib._class_NSLocale1, _lib._sel_systemLocale1); - return NSLocale._(_ret, _lib, retain: true, release: true); - } - - static NSLocale localeWithLocaleIdentifier_( - SwiftLibrary _lib, NSString ident) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSLocale1, - _lib._sel_localeWithLocaleIdentifier_1, ident._id); - return NSLocale._(_ret, _lib, retain: true, release: true); - } - - @override - NSLocale init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSLocale._(_ret, _lib, retain: true, release: true); - } - - static NSArray getAvailableLocaleIdentifiers(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSLocale1, _lib._sel_availableLocaleIdentifiers1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray getISOLanguageCodes(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSLocale1, _lib._sel_ISOLanguageCodes1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray getISOCountryCodes(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSLocale1, _lib._sel_ISOCountryCodes1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray getISOCurrencyCodes(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSLocale1, _lib._sel_ISOCurrencyCodes1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray getCommonISOCurrencyCodes(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSLocale1, _lib._sel_commonISOCurrencyCodes1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray getPreferredLanguages(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSLocale1, _lib._sel_preferredLanguages1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary componentsFromLocaleIdentifier_( - SwiftLibrary _lib, NSString string) { - final _ret = _lib._objc_msgSend_198(_lib._class_NSLocale1, - _lib._sel_componentsFromLocaleIdentifier_1, string._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSString localeIdentifierFromComponents_( - SwiftLibrary _lib, NSDictionary dict) { - final _ret = _lib._objc_msgSend_199(_lib._class_NSLocale1, - _lib._sel_localeIdentifierFromComponents_1, dict._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString canonicalLocaleIdentifierFromString_( - SwiftLibrary _lib, NSString string) { - final _ret = _lib._objc_msgSend_69(_lib._class_NSLocale1, - _lib._sel_canonicalLocaleIdentifierFromString_1, string._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString canonicalLanguageIdentifierFromString_( - SwiftLibrary _lib, NSString string) { - final _ret = _lib._objc_msgSend_69(_lib._class_NSLocale1, - _lib._sel_canonicalLanguageIdentifierFromString_1, string._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? localeIdentifierFromWindowsLocaleCode_( - SwiftLibrary _lib, int lcid) { - final _ret = _lib._objc_msgSend_200(_lib._class_NSLocale1, - _lib._sel_localeIdentifierFromWindowsLocaleCode_1, lcid); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static int windowsLocaleCodeFromLocaleIdentifier_( - SwiftLibrary _lib, NSString localeIdentifier) { - return _lib._objc_msgSend_201( - _lib._class_NSLocale1, - _lib._sel_windowsLocaleCodeFromLocaleIdentifier_1, - localeIdentifier._id); - } - - static int characterDirectionForLanguage_( - SwiftLibrary _lib, NSString isoLangCode) { - return _lib._objc_msgSend_202(_lib._class_NSLocale1, - _lib._sel_characterDirectionForLanguage_1, isoLangCode._id); - } - - static int lineDirectionForLanguage_( - SwiftLibrary _lib, NSString isoLangCode) { - return _lib._objc_msgSend_202(_lib._class_NSLocale1, - _lib._sel_lineDirectionForLanguage_1, isoLangCode._id); - } - - static NSLocale new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSLocale1, _lib._sel_new1); - return NSLocale._(_ret, _lib, retain: false, release: true); - } - - static NSLocale allocWithZone_(SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSLocale1, _lib._sel_allocWithZone_1, zone); - return NSLocale._(_ret, _lib, retain: false, release: true); - } - - static NSLocale alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSLocale1, _lib._sel_alloc1); - return NSLocale._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSLocale1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSLocale1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSLocale1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSLocale1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSLocale1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSLocale1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSLocale1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSLocale1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSLocale1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSCharacterSet extends NSObject { - NSCharacterSet._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSCharacterSet] that points to the same underlying object as [other]. - static NSCharacterSet castFrom(T other) { - return NSCharacterSet._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSCharacterSet] that wraps the given raw object pointer. - static NSCharacterSet castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCharacterSet._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSCharacterSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSCharacterSet1); - } - - static NSCharacterSet getControlCharacterSet(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_controlCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getWhitespaceCharacterSet(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_whitespaceCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getWhitespaceAndNewlineCharacterSet(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_187(_lib._class_NSCharacterSet1, - _lib._sel_whitespaceAndNewlineCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getDecimalDigitCharacterSet(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_decimalDigitCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getLetterCharacterSet(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_letterCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getLowercaseLetterCharacterSet(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_lowercaseLetterCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getUppercaseLetterCharacterSet(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_uppercaseLetterCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getNonBaseCharacterSet(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_nonBaseCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getAlphanumericCharacterSet(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_alphanumericCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getDecomposableCharacterSet(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_decomposableCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getIllegalCharacterSet(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_illegalCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getPunctuationCharacterSet(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_punctuationCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getCapitalizedLetterCharacterSet(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_capitalizedLetterCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getSymbolCharacterSet(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_symbolCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getNewlineCharacterSet(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_newlineCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: false, release: true); - } - - static NSCharacterSet characterSetWithRange_( - SwiftLibrary _lib, _NSRange aRange) { - final _ret = _lib._objc_msgSend_188( - _lib._class_NSCharacterSet1, _lib._sel_characterSetWithRange_1, aRange); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet characterSetWithCharactersInString_( - SwiftLibrary _lib, NSString aString) { - final _ret = _lib._objc_msgSend_189(_lib._class_NSCharacterSet1, - _lib._sel_characterSetWithCharactersInString_1, aString._id); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet characterSetWithBitmapRepresentation_( - SwiftLibrary _lib, NSData data) { - final _ret = _lib._objc_msgSend_190(_lib._class_NSCharacterSet1, - _lib._sel_characterSetWithBitmapRepresentation_1, data._id); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet? characterSetWithContentsOfFile_( - SwiftLibrary _lib, NSString fName) { - final _ret = _lib._objc_msgSend_191(_lib._class_NSCharacterSet1, - _lib._sel_characterSetWithContentsOfFile_1, fName._id); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - NSCharacterSet initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_192(_id, _lib._sel_initWithCoder_1, coder._id); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - bool characterIsMember_(int aCharacter) { - return _lib._objc_msgSend_193( - _id, _lib._sel_characterIsMember_1, aCharacter); - } - - NSData get bitmapRepresentation { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_bitmapRepresentation1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - NSCharacterSet get invertedSet { - final _ret = _lib._objc_msgSend_187(_id, _lib._sel_invertedSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - bool longCharacterIsMember_(int theLongChar) { - return _lib._objc_msgSend_194( - _id, _lib._sel_longCharacterIsMember_1, theLongChar); - } - - bool isSupersetOfSet_(NSCharacterSet theOtherSet) { - return _lib._objc_msgSend_195( - _id, _lib._sel_isSupersetOfSet_1, theOtherSet._id); - } - - bool hasMemberInPlane_(int thePlane) { - return _lib._objc_msgSend_196(_id, _lib._sel_hasMemberInPlane_1, thePlane); - } - - static NSCharacterSet getURLUserAllowedCharacterSet(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_URLUserAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getURLPasswordAllowedCharacterSet(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_URLPasswordAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getURLHostAllowedCharacterSet(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_URLHostAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getURLPathAllowedCharacterSet(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_URLPathAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getURLQueryAllowedCharacterSet(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_URLQueryAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getURLFragmentAllowedCharacterSet(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_187( - _lib._class_NSCharacterSet1, _lib._sel_URLFragmentAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSCharacterSet init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_new1); - return NSCharacterSet._(_ret, _lib, retain: false, release: true); - } - - static NSCharacterSet allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSCharacterSet1, _lib._sel_allocWithZone_1, zone); - return NSCharacterSet._(_ret, _lib, retain: false, release: true); - } - - static NSCharacterSet alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_alloc1); - return NSCharacterSet._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSCharacterSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSCharacterSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSCharacterSet1, - _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSCharacterSet1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSCharacterSet1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSCharacterSet1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSCharacterSet1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSCharacterSet1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSCharacterSet1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -abstract class NSLocaleLanguageDirection { - static const int NSLocaleLanguageDirectionUnknown = 0; - static const int NSLocaleLanguageDirectionLeftToRight = 1; - static const int NSLocaleLanguageDirectionRightToLeft = 2; - static const int NSLocaleLanguageDirectionTopToBottom = 3; - static const int NSLocaleLanguageDirectionBottomToTop = 4; -} - -abstract class NSURLBookmarkCreationOptions { - static const int NSURLBookmarkCreationPreferFileIDResolution = 256; - static const int NSURLBookmarkCreationMinimalBookmark = 512; - static const int NSURLBookmarkCreationSuitableForBookmarkFile = 1024; - static const int NSURLBookmarkCreationWithSecurityScope = 2048; - static const int NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; - static const int NSURLBookmarkCreationWithoutImplicitSecurityScope = - 536870912; -} - -abstract class NSURLBookmarkResolutionOptions { - static const int NSURLBookmarkResolutionWithoutUI = 256; - static const int NSURLBookmarkResolutionWithoutMounting = 512; - static const int NSURLBookmarkResolutionWithSecurityScope = 1024; - static const int NSURLBookmarkResolutionWithoutImplicitStartAccessing = 32768; -} - -class NSURLHandle extends NSObject { - NSURLHandle._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLHandle] that points to the same underlying object as [other]. - static NSURLHandle castFrom(T other) { - return NSURLHandle._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSURLHandle] that wraps the given raw object pointer. - static NSURLHandle castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLHandle._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSURLHandle]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLHandle1); - } - - static void registerURLHandleClass_( - SwiftLibrary _lib, NSObject anURLHandleSubclass) { - _lib._objc_msgSend_15(_lib._class_NSURLHandle1, - _lib._sel_registerURLHandleClass_1, anURLHandleSubclass._id); - } - - static NSObject URLHandleClassForURL_(SwiftLibrary _lib, NSURL anURL) { - final _ret = _lib._objc_msgSend_262( - _lib._class_NSURLHandle1, _lib._sel_URLHandleClassForURL_1, anURL._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - int status() { - return _lib._objc_msgSend_263(_id, _lib._sel_status1); - } - - NSString failureReason() { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_failureReason1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - void addClient_(NSObject client) { - _lib._objc_msgSend_15(_id, _lib._sel_addClient_1, client._id); - } - - void removeClient_(NSObject client) { - _lib._objc_msgSend_15(_id, _lib._sel_removeClient_1, client._id); - } - - void loadInBackground() { - _lib._objc_msgSend_1(_id, _lib._sel_loadInBackground1); - } - - void cancelLoadInBackground() { - _lib._objc_msgSend_1(_id, _lib._sel_cancelLoadInBackground1); - } - - NSData resourceData() { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_resourceData1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - NSData availableResourceData() { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_availableResourceData1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - int expectedResourceDataSize() { - return _lib._objc_msgSend_238(_id, _lib._sel_expectedResourceDataSize1); - } - - void flushCachedData() { - _lib._objc_msgSend_1(_id, _lib._sel_flushCachedData1); - } - - void backgroundLoadDidFailWithReason_(NSString reason) { - _lib._objc_msgSend_247( - _id, _lib._sel_backgroundLoadDidFailWithReason_1, reason._id); - } - - void didLoadBytes_loadComplete_(NSData newBytes, bool yorn) { - _lib._objc_msgSend_264( - _id, _lib._sel_didLoadBytes_loadComplete_1, newBytes._id, yorn); - } - - static bool canInitWithURL_(SwiftLibrary _lib, NSURL anURL) { - return _lib._objc_msgSend_265( - _lib._class_NSURLHandle1, _lib._sel_canInitWithURL_1, anURL._id); - } - - static NSURLHandle cachedHandleForURL_(SwiftLibrary _lib, NSURL anURL) { - final _ret = _lib._objc_msgSend_266( - _lib._class_NSURLHandle1, _lib._sel_cachedHandleForURL_1, anURL._id); - return NSURLHandle._(_ret, _lib, retain: true, release: true); - } - - NSObject initWithURL_cached_(NSURL anURL, bool willCache) { - final _ret = _lib._objc_msgSend_267( - _id, _lib._sel_initWithURL_cached_1, anURL._id, willCache); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject propertyForKey_(NSString propertyKey) { - final _ret = - _lib._objc_msgSend_31(_id, _lib._sel_propertyForKey_1, propertyKey._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject propertyForKeyIfAvailable_(NSString propertyKey) { - final _ret = _lib._objc_msgSend_31( - _id, _lib._sel_propertyForKeyIfAvailable_1, propertyKey._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - bool writeProperty_forKey_(NSObject propertyValue, NSString propertyKey) { - return _lib._objc_msgSend_261(_id, _lib._sel_writeProperty_forKey_1, - propertyValue._id, propertyKey._id); - } - - bool writeData_(NSData data) { - return _lib._objc_msgSend_24(_id, _lib._sel_writeData_1, data._id); - } - - NSData loadInForeground() { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_loadInForeground1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - void beginLoadInBackground() { - _lib._objc_msgSend_1(_id, _lib._sel_beginLoadInBackground1); - } - - void endLoadInBackground() { - _lib._objc_msgSend_1(_id, _lib._sel_endLoadInBackground1); - } - - @override - NSURLHandle init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLHandle._(_ret, _lib, retain: true, release: true); - } - - static NSURLHandle new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_new1); - return NSURLHandle._(_ret, _lib, retain: false, release: true); - } - - static NSURLHandle allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLHandle1, _lib._sel_allocWithZone_1, zone); - return NSURLHandle._(_ret, _lib, retain: false, release: true); - } - - static NSURLHandle alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_alloc1); - return NSURLHandle._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLHandle1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLHandle1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLHandle1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLHandle1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLHandle1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLHandle1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLHandle1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSURLHandle1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLHandle1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -abstract class NSURLHandleStatus { - static const int NSURLHandleNotLoaded = 0; - static const int NSURLHandleLoadSucceeded = 1; - static const int NSURLHandleLoadInProgress = 2; - static const int NSURLHandleLoadFailed = 3; -} - -abstract class NSDataWritingOptions { - static const int NSDataWritingAtomic = 1; - static const int NSDataWritingWithoutOverwriting = 2; - static const int NSDataWritingFileProtectionNone = 268435456; - static const int NSDataWritingFileProtectionComplete = 536870912; - static const int NSDataWritingFileProtectionCompleteUnlessOpen = 805306368; - static const int - NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication = - 1073741824; - static const int NSDataWritingFileProtectionCompleteWhenUserInactive = - 1342177280; - static const int NSDataWritingFileProtectionMask = 4026531840; - static const int NSAtomicWrite = 1; -} - -abstract class NSDataSearchOptions { - static const int NSDataSearchBackwards = 1; - static const int NSDataSearchAnchored = 2; -} - -void _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, _NSRange, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( - void Function(ffi.Pointer, _NSRange, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ffiVoid_NSRange_bool castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ffiVoid_NSRange_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.fromFunction(SwiftLibrary lib, - void Function(ffi.Pointer, _NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(arg0, arg1, arg2))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.listener(SwiftLibrary lib, - void Function(ffi.Pointer, _NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(arg0, arg1, arg2))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - _NSRange, ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - _NSRange, ffi.Pointer)>()(_id, arg0, arg1, arg2); -} - -abstract class NSDataReadingOptions { - static const int NSDataReadingMappedIfSafe = 1; - static const int NSDataReadingUncached = 2; - static const int NSDataReadingMappedAlways = 8; - static const int NSDataReadingMapped = 1; - static const int NSMappedRead = 1; - static const int NSUncachedRead = 2; -} - -void _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, ffi.UnsignedLong arg1)>>() - .asFunction, int)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistry = - , int)>{}; -int _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_registerClosure( - void Function(ffi.Pointer, int) fn) { - final id = ++_ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) => - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, ffi.UnsignedLong arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer, ffi.UnsignedLong)>( - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong.fromFunction( - SwiftLibrary lib, void Function(ffi.Pointer, int) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer, ffi.UnsignedLong)>( - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_registerClosure( - (ffi.Pointer arg0, int arg1) => fn(arg0, arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong.listener( - SwiftLibrary lib, void Function(ffi.Pointer, int) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.UnsignedLong)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_registerClosure( - (ffi.Pointer arg0, int arg1) => fn(arg0, arg1))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.UnsignedLong)>? _dartFuncListenerTrampoline; - - void call(ffi.Pointer arg0, int arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.UnsignedLong arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - int)>()(_id, arg0, arg1); -} - -abstract class NSDataBase64DecodingOptions { - static const int NSDataBase64DecodingIgnoreUnknownCharacters = 1; -} - -abstract class NSDataBase64EncodingOptions { - static const int NSDataBase64Encoding64CharacterLineLength = 1; - static const int NSDataBase64Encoding76CharacterLineLength = 2; - static const int NSDataBase64EncodingEndLineWithCarriageReturn = 16; - static const int NSDataBase64EncodingEndLineWithLineFeed = 32; -} - -abstract class NSDataCompressionAlgorithm { - static const int NSDataCompressionAlgorithmLZFSE = 0; - static const int NSDataCompressionAlgorithmLZ4 = 1; - static const int NSDataCompressionAlgorithmLZMA = 2; - static const int NSDataCompressionAlgorithmZlib = 3; -} - -abstract class NSDecodingFailurePolicy { - static const int NSDecodingFailurePolicyRaiseException = 0; - static const int NSDecodingFailurePolicySetErrorAndReturn = 1; -} - -abstract class NSStringCompareOptions { - static const int NSCaseInsensitiveSearch = 1; - static const int NSLiteralSearch = 2; - static const int NSBackwardsSearch = 4; - static const int NSAnchoredSearch = 8; - static const int NSNumericSearch = 64; - static const int NSDiacriticInsensitiveSearch = 128; - static const int NSWidthInsensitiveSearch = 256; - static const int NSForcedOrderingSearch = 512; - static const int NSRegularExpressionSearch = 1024; -} - -abstract class NSStringEnumerationOptions { - static const int NSStringEnumerationByLines = 0; - static const int NSStringEnumerationByParagraphs = 1; - static const int NSStringEnumerationByComposedCharacterSequences = 2; - static const int NSStringEnumerationByWords = 3; - static const int NSStringEnumerationBySentences = 4; - static const int NSStringEnumerationByCaretPositions = 5; - static const int NSStringEnumerationByDeletionClusters = 6; - static const int NSStringEnumerationReverse = 256; - static const int NSStringEnumerationSubstringNotRequired = 512; - static const int NSStringEnumerationLocalized = 1024; -} - -void _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - _NSRange arg2, - ffi.Pointer arg3) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, - _NSRange arg2, ffi.Pointer arg3)>>() - .asFunction< - void Function(ffi.Pointer, _NSRange, _NSRange, - ffi.Pointer)>()(arg0, arg1, arg2, arg3); -final _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry = , _NSRange, _NSRange, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( - void Function(ffi.Pointer, _NSRange, _NSRange, - ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - _NSRange arg2, - ffi.Pointer arg3) => - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2, arg3); - -class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, - _NSRange arg2, ffi.Pointer arg3)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.fromFunction(SwiftLibrary lib, - void Function(NSString?, _NSRange, _NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, _NSRange arg2, - ffi.Pointer arg3) => - fn(arg0.address == 0 ? null : NSString._(arg0, lib, retain: true, release: true), arg1, arg2, arg3))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.listener(SwiftLibrary lib, - void Function(NSString?, _NSRange, _NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - _NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, _NSRange arg2, - ffi.Pointer arg3) => - fn(arg0.address == 0 ? null : NSString._(arg0, lib, retain: true, release: true), arg1, arg2, arg3))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - _NSRange, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSString? arg0, _NSRange arg1, _NSRange arg2, - ffi.Pointer arg3) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - _NSRange arg2, - ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - _NSRange, - ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1, arg2, arg3); -} - -void _ObjCBlock_ffiVoid_NSString_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer, ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_NSString_bool_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSString_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSString_bool_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSString_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSString_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSString_bool_closureRegistry[block.ref.target.address]!( - arg0, arg1); - -class ObjCBlock_ffiVoid_NSString_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSString_bool._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSString_bool castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSString_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSString_bool.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSString_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSString_bool.fromFunction( - SwiftLibrary lib, void Function(NSString, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSString_bool_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - NSString._(arg0, lib, retain: true, release: true), - arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSString_bool.listener( - SwiftLibrary lib, void Function(NSString, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSString_bool_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(NSString._(arg0, lib, retain: true, release: true), - arg1))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSString arg0, ffi.Pointer arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1); -} - -abstract class NSStringEncodingConversionOptions { - static const int NSStringEncodingConversionAllowLossy = 1; - static const int NSStringEncodingConversionExternalRepresentation = 2; -} - -void _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.UnsignedLong arg1)>>() - .asFunction, int)>()( - arg0, arg1); -final _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistry = - , int)>{}; -int _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_registerClosure( - void Function(ffi.Pointer, int) fn) { - final id = - ++_ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1) => - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong - extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.UnsignedLong arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.UnsignedLong)>( - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong.fromFunction( - SwiftLibrary lib, void Function(ffi.Pointer, int) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.UnsignedLong)>( - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_registerClosure( - (ffi.Pointer arg0, int arg1) => - fn(arg0, arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong.listener( - SwiftLibrary lib, void Function(ffi.Pointer, int) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.UnsignedLong)>.listener( - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_registerClosure( - (ffi.Pointer arg0, int arg1) => - fn(arg0, arg1))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.UnsignedLong)>? _dartFuncListenerTrampoline; - - void call(ffi.Pointer arg0, int arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.UnsignedLong arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - int)>()(_id, arg0, arg1); -} - -abstract class NSLinguisticTaggerOptions { - static const int NSLinguisticTaggerOmitWords = 1; - static const int NSLinguisticTaggerOmitPunctuation = 2; - static const int NSLinguisticTaggerOmitWhitespace = 4; - static const int NSLinguisticTaggerOmitOther = 8; - static const int NSLinguisticTaggerJoinNames = 16; -} - -class NSOrthography extends NSObject { - NSOrthography._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSOrthography] that points to the same underlying object as [other]. - static NSOrthography castFrom(T other) { - return NSOrthography._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSOrthography] that wraps the given raw object pointer. - static NSOrthography castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOrthography._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSOrthography]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSOrthography1); - } - - NSString get dominantScript { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_dominantScript1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSDictionary get languageMap { - final _ret = _lib._objc_msgSend_181(_id, _lib._sel_languageMap1); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSOrthography initWithDominantScript_languageMap_( - NSString script, NSDictionary map) { - final _ret = _lib._objc_msgSend_400(_id, - _lib._sel_initWithDominantScript_languageMap_1, script._id, map._id); - return NSOrthography._(_ret, _lib, retain: true, release: true); - } - - NSOrthography? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSOrthography._(_ret, _lib, retain: true, release: true); - } - - NSArray? languagesForScript_(NSString script) { - final _ret = - _lib._objc_msgSend_132(_id, _lib._sel_languagesForScript_1, script._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSString? dominantLanguageForScript_(NSString script) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_dominantLanguageForScript_1, script._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get dominantLanguage { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_dominantLanguage1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSArray get allScripts { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_allScripts1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray get allLanguages { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_allLanguages1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSOrthography defaultOrthographyForLanguage_( - SwiftLibrary _lib, NSString language) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSOrthography1, - _lib._sel_defaultOrthographyForLanguage_1, language._id); - return NSOrthography._(_ret, _lib, retain: true, release: true); - } - - static NSOrthography orthographyWithDominantScript_languageMap_( - SwiftLibrary _lib, NSString script, NSDictionary map) { - final _ret = _lib._objc_msgSend_400( - _lib._class_NSOrthography1, - _lib._sel_orthographyWithDominantScript_languageMap_1, - script._id, - map._id); - return NSOrthography._(_ret, _lib, retain: true, release: true); - } - - @override - NSOrthography init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSOrthography._(_ret, _lib, retain: true, release: true); - } - - static NSOrthography new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOrthography1, _lib._sel_new1); - return NSOrthography._(_ret, _lib, retain: false, release: true); - } - - static NSOrthography allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSOrthography1, _lib._sel_allocWithZone_1, zone); - return NSOrthography._(_ret, _lib, retain: false, release: true); - } - - static NSOrthography alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOrthography1, _lib._sel_alloc1); - return NSOrthography._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSOrthography1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSOrthography1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSOrthography1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSOrthography1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSOrthography1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSOrthography1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSOrthography1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSOrthography1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOrthography1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -void _ObjCBlock_ffiVoid_ObjCObject_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer, ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_ObjCObject_bool_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ObjCObject_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_ObjCObject_bool_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_ObjCObject_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_ObjCObject_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ObjCObject_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_ObjCObject_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_ObjCObject_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ObjCObject_bool._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ObjCObject_bool castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ObjCObject_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_bool.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_bool.fromFunction( - SwiftLibrary lib, void Function(NSObject, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_bool_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - NSObject._(arg0, lib, retain: true, release: true), - arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ObjCObject_bool.listener( - SwiftLibrary lib, void Function(NSObject, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ObjCObject_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_bool_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(NSObject._(arg0, lib, retain: true, release: true), - arg1))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSObject arg0, ffi.Pointer arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1); -} - -bool _ObjCBlock_bool_ObjCObject_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function( - ffi.Pointer, ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_bool_ObjCObject_bool_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_bool_ObjCObject_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_bool_ObjCObject_bool_registerClosure( - bool Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_bool_ObjCObject_bool_closureRegistryIndex; - _ObjCBlock_bool_ObjCObject_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_ObjCObject_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_bool_ObjCObject_bool_closureRegistry[block.ref.target.address]!( - arg0, arg1); - -class ObjCBlock_bool_ObjCObject_bool extends _ObjCBlockBase { - ObjCBlock_bool_ObjCObject_bool._(ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_bool_ObjCObject_bool castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_bool_ObjCObject_bool._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_bool.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_bool_fnPtrTrampoline, false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_bool.fromFunction( - SwiftLibrary lib, bool Function(NSObject, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_bool_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_ObjCObject_bool_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(NSObject._(arg0, lib, retain: true, release: true), arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSObject arg0, ffi.Pointer arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1); -} - -class NSFileManager extends NSObject { - NSFileManager._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSFileManager] that points to the same underlying object as [other]. - static NSFileManager castFrom(T other) { - return NSFileManager._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSFileManager] that wraps the given raw object pointer. - static NSFileManager castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSFileManager._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSFileManager]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSFileManager1); - } - - static NSFileManager getDefaultManager(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_431( - _lib._class_NSFileManager1, _lib._sel_defaultManager1); - return NSFileManager._(_ret, _lib, retain: true, release: true); - } - - NSArray? mountedVolumeURLsIncludingResourceValuesForKeys_options_( - NSArray? propertyKeys, int options) { - final _ret = _lib._objc_msgSend_432( - _id, - _lib._sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_1, - propertyKeys?._id ?? ffi.nullptr, - options); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - void unmountVolumeAtURL_options_completionHandler_( - NSURL url, int mask, ObjCBlock_ffiVoid_NSError completionHandler) { - _lib._objc_msgSend_433( - _id, - _lib._sel_unmountVolumeAtURL_options_completionHandler_1, - url._id, - mask, - completionHandler._id); - } - - NSArray? contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_( - NSURL url, - NSArray? keys, - int mask, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_434( - _id, - _lib._sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_1, - url._id, - keys?._id ?? ffi.nullptr, - mask, - error); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray URLsForDirectory_inDomains_(int directory, int domainMask) { - final _ret = _lib._objc_msgSend_435( - _id, _lib._sel_URLsForDirectory_inDomains_1, directory, domainMask); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSURL? URLForDirectory_inDomain_appropriateForURL_create_error_( - int directory, - int domain, - NSURL? url, - bool shouldCreate, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_436( - _id, - _lib._sel_URLForDirectory_inDomain_appropriateForURL_create_error_1, - directory, - domain, - url?._id ?? ffi.nullptr, - shouldCreate, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - bool getRelationship_ofDirectoryAtURL_toItemAtURL_error_( - ffi.Pointer outRelationship, - NSURL directoryURL, - NSURL otherURL, - ffi.Pointer> error) { - return _lib._objc_msgSend_437( - _id, - _lib._sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_1, - outRelationship, - directoryURL._id, - otherURL._id, - error); - } - - bool getRelationship_ofDirectory_inDomain_toItemAtURL_error_( - ffi.Pointer outRelationship, - int directory, - int domainMask, - NSURL url, - ffi.Pointer> error) { - return _lib._objc_msgSend_438( - _id, - _lib._sel_getRelationship_ofDirectory_inDomain_toItemAtURL_error_1, - outRelationship, - directory, - domainMask, - url._id, - error); - } - - bool createDirectoryAtURL_withIntermediateDirectories_attributes_error_( - NSURL url, - bool createIntermediates, - NSDictionary? attributes, - ffi.Pointer> error) { - return _lib._objc_msgSend_439( - _id, - _lib._sel_createDirectoryAtURL_withIntermediateDirectories_attributes_error_1, - url._id, - createIntermediates, - attributes?._id ?? ffi.nullptr, - error); - } - - bool createSymbolicLinkAtURL_withDestinationURL_error_( - NSURL url, NSURL destURL, ffi.Pointer> error) { - return _lib._objc_msgSend_440( - _id, - _lib._sel_createSymbolicLinkAtURL_withDestinationURL_error_1, - url._id, - destURL._id, - error); - } - - NSObject? get delegate { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - set delegate(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); - } - - bool setAttributes_ofItemAtPath_error_(NSDictionary attributes, NSString path, - ffi.Pointer> error) { - return _lib._objc_msgSend_441( - _id, - _lib._sel_setAttributes_ofItemAtPath_error_1, - attributes._id, - path._id, - error); - } - - bool createDirectoryAtPath_withIntermediateDirectories_attributes_error_( - NSString path, - bool createIntermediates, - NSDictionary? attributes, - ffi.Pointer> error) { - return _lib._objc_msgSend_442( - _id, - _lib._sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_1, - path._id, - createIntermediates, - attributes?._id ?? ffi.nullptr, - error); - } - - NSArray? contentsOfDirectoryAtPath_error_( - NSString path, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_443( - _id, _lib._sel_contentsOfDirectoryAtPath_error_1, path._id, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray? subpathsOfDirectoryAtPath_error_( - NSString path, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_443( - _id, _lib._sel_subpathsOfDirectoryAtPath_error_1, path._id, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? attributesOfItemAtPath_error_( - NSString path, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_444( - _id, _lib._sel_attributesOfItemAtPath_error_1, path._id, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? attributesOfFileSystemForPath_error_( - NSString path, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_444( - _id, _lib._sel_attributesOfFileSystemForPath_error_1, path._id, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - bool createSymbolicLinkAtPath_withDestinationPath_error_(NSString path, - NSString destPath, ffi.Pointer> error) { - return _lib._objc_msgSend_445( - _id, - _lib._sel_createSymbolicLinkAtPath_withDestinationPath_error_1, - path._id, - destPath._id, - error); - } - - NSString? destinationOfSymbolicLinkAtPath_error_( - NSString path, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_446(_id, - _lib._sel_destinationOfSymbolicLinkAtPath_error_1, path._id, error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - bool copyItemAtPath_toPath_error_(NSString srcPath, NSString dstPath, - ffi.Pointer> error) { - return _lib._objc_msgSend_445(_id, _lib._sel_copyItemAtPath_toPath_error_1, - srcPath._id, dstPath._id, error); - } - - bool moveItemAtPath_toPath_error_(NSString srcPath, NSString dstPath, - ffi.Pointer> error) { - return _lib._objc_msgSend_445(_id, _lib._sel_moveItemAtPath_toPath_error_1, - srcPath._id, dstPath._id, error); - } - - bool linkItemAtPath_toPath_error_(NSString srcPath, NSString dstPath, - ffi.Pointer> error) { - return _lib._objc_msgSend_445(_id, _lib._sel_linkItemAtPath_toPath_error_1, - srcPath._id, dstPath._id, error); - } - - bool removeItemAtPath_error_( - NSString path, ffi.Pointer> error) { - return _lib._objc_msgSend_447( - _id, _lib._sel_removeItemAtPath_error_1, path._id, error); - } - - bool copyItemAtURL_toURL_error_( - NSURL srcURL, NSURL dstURL, ffi.Pointer> error) { - return _lib._objc_msgSend_440(_id, _lib._sel_copyItemAtURL_toURL_error_1, - srcURL._id, dstURL._id, error); - } - - bool moveItemAtURL_toURL_error_( - NSURL srcURL, NSURL dstURL, ffi.Pointer> error) { - return _lib._objc_msgSend_440(_id, _lib._sel_moveItemAtURL_toURL_error_1, - srcURL._id, dstURL._id, error); - } - - bool linkItemAtURL_toURL_error_( - NSURL srcURL, NSURL dstURL, ffi.Pointer> error) { - return _lib._objc_msgSend_440(_id, _lib._sel_linkItemAtURL_toURL_error_1, - srcURL._id, dstURL._id, error); - } - - bool removeItemAtURL_error_( - NSURL URL, ffi.Pointer> error) { - return _lib._objc_msgSend_89( - _id, _lib._sel_removeItemAtURL_error_1, URL._id, error); - } - - bool trashItemAtURL_resultingItemURL_error_( - NSURL url, - ffi.Pointer> outResultingURL, - ffi.Pointer> error) { - return _lib._objc_msgSend_448( - _id, - _lib._sel_trashItemAtURL_resultingItemURL_error_1, - url._id, - outResultingURL, - error); - } - - NSDictionary? fileAttributesAtPath_traverseLink_(NSString path, bool yorn) { - final _ret = _lib._objc_msgSend_449( - _id, _lib._sel_fileAttributesAtPath_traverseLink_1, path._id, yorn); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - bool changeFileAttributes_atPath_(NSDictionary attributes, NSString path) { - return _lib._objc_msgSend_450( - _id, _lib._sel_changeFileAttributes_atPath_1, attributes._id, path._id); - } - - NSArray? directoryContentsAtPath_(NSString path) { - final _ret = _lib._objc_msgSend_132( - _id, _lib._sel_directoryContentsAtPath_1, path._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? fileSystemAttributesAtPath_(NSString path) { - final _ret = _lib._objc_msgSend_156( - _id, _lib._sel_fileSystemAttributesAtPath_1, path._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSString? pathContentOfSymbolicLinkAtPath_(NSString path) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_pathContentOfSymbolicLinkAtPath_1, path._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - bool createSymbolicLinkAtPath_pathContent_( - NSString path, NSString otherpath) { - return _lib._objc_msgSend_451( - _id, - _lib._sel_createSymbolicLinkAtPath_pathContent_1, - path._id, - otherpath._id); - } - - bool createDirectoryAtPath_attributes_( - NSString path, NSDictionary attributes) { - return _lib._objc_msgSend_452(_id, - _lib._sel_createDirectoryAtPath_attributes_1, path._id, attributes._id); - } - - bool linkPath_toPath_handler_( - NSString src, NSString dest, NSObject? handler) { - return _lib._objc_msgSend_453(_id, _lib._sel_linkPath_toPath_handler_1, - src._id, dest._id, handler?._id ?? ffi.nullptr); - } - - bool copyPath_toPath_handler_( - NSString src, NSString dest, NSObject? handler) { - return _lib._objc_msgSend_453(_id, _lib._sel_copyPath_toPath_handler_1, - src._id, dest._id, handler?._id ?? ffi.nullptr); - } - - bool movePath_toPath_handler_( - NSString src, NSString dest, NSObject? handler) { - return _lib._objc_msgSend_453(_id, _lib._sel_movePath_toPath_handler_1, - src._id, dest._id, handler?._id ?? ffi.nullptr); - } - - bool removeFileAtPath_handler_(NSString path, NSObject? handler) { - return _lib._objc_msgSend_454(_id, _lib._sel_removeFileAtPath_handler_1, - path._id, handler?._id ?? ffi.nullptr); - } - - NSString get currentDirectoryPath { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_currentDirectoryPath1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - bool changeCurrentDirectoryPath_(NSString path) { - return _lib._objc_msgSend_64( - _id, _lib._sel_changeCurrentDirectoryPath_1, path._id); - } - - bool fileExistsAtPath_(NSString path) { - return _lib._objc_msgSend_64(_id, _lib._sel_fileExistsAtPath_1, path._id); - } - - bool fileExistsAtPath_isDirectory_( - NSString path, ffi.Pointer isDirectory) { - return _lib._objc_msgSend_455( - _id, _lib._sel_fileExistsAtPath_isDirectory_1, path._id, isDirectory); - } - - bool isReadableFileAtPath_(NSString path) { - return _lib._objc_msgSend_64( - _id, _lib._sel_isReadableFileAtPath_1, path._id); - } - - bool isWritableFileAtPath_(NSString path) { - return _lib._objc_msgSend_64( - _id, _lib._sel_isWritableFileAtPath_1, path._id); - } - - bool isExecutableFileAtPath_(NSString path) { - return _lib._objc_msgSend_64( - _id, _lib._sel_isExecutableFileAtPath_1, path._id); - } - - bool isDeletableFileAtPath_(NSString path) { - return _lib._objc_msgSend_64( - _id, _lib._sel_isDeletableFileAtPath_1, path._id); - } - - bool contentsEqualAtPath_andPath_(NSString path1, NSString path2) { - return _lib._objc_msgSend_451( - _id, _lib._sel_contentsEqualAtPath_andPath_1, path1._id, path2._id); - } - - NSString displayNameAtPath_(NSString path) { - final _ret = - _lib._objc_msgSend_69(_id, _lib._sel_displayNameAtPath_1, path._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSArray? componentsToDisplayForPath_(NSString path) { - final _ret = _lib._objc_msgSend_132( - _id, _lib._sel_componentsToDisplayForPath_1, path._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSObject? enumeratorAtPath_(NSString path) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_enumeratorAtPath_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_( - NSURL url, - NSArray? keys, - int mask, - ObjCBlock_bool_NSURL_NSError? handler) { - final _ret = _lib._objc_msgSend_456( - _id, - _lib._sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_1, - url._id, - keys?._id ?? ffi.nullptr, - mask, - handler?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSArray? subpathsAtPath_(NSString path) { - final _ret = - _lib._objc_msgSend_132(_id, _lib._sel_subpathsAtPath_1, path._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSData? contentsAtPath_(NSString path) { - final _ret = - _lib._objc_msgSend_457(_id, _lib._sel_contentsAtPath_1, path._id); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - bool createFileAtPath_contents_attributes_( - NSString path, NSData? data, NSDictionary? attr) { - return _lib._objc_msgSend_458( - _id, - _lib._sel_createFileAtPath_contents_attributes_1, - path._id, - data?._id ?? ffi.nullptr, - attr?._id ?? ffi.nullptr); - } - - ffi.Pointer fileSystemRepresentationWithPath_(NSString path) { - return _lib._objc_msgSend_459( - _id, _lib._sel_fileSystemRepresentationWithPath_1, path._id); - } - - NSString stringWithFileSystemRepresentation_length_( - ffi.Pointer str, int len) { - final _ret = _lib._objc_msgSend_460( - _id, _lib._sel_stringWithFileSystemRepresentation_length_1, str, len); - return NSString._(_ret, _lib, retain: true, release: true); - } - - bool - replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_( - NSURL originalItemURL, - NSURL newItemURL, - NSString? backupItemName, - int options, - ffi.Pointer> resultingURL, - ffi.Pointer> error) { - return _lib._objc_msgSend_461( - _id, - _lib._sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_1, - originalItemURL._id, - newItemURL._id, - backupItemName?._id ?? ffi.nullptr, - options, - resultingURL, - error); - } - - bool setUbiquitous_itemAtURL_destinationURL_error_(bool flag, NSURL url, - NSURL destinationURL, ffi.Pointer> error) { - return _lib._objc_msgSend_462( - _id, - _lib._sel_setUbiquitous_itemAtURL_destinationURL_error_1, - flag, - url._id, - destinationURL._id, - error); - } - - bool isUbiquitousItemAtURL_(NSURL url) { - return _lib._objc_msgSend_265( - _id, _lib._sel_isUbiquitousItemAtURL_1, url._id); - } - - bool startDownloadingUbiquitousItemAtURL_error_( - NSURL url, ffi.Pointer> error) { - return _lib._objc_msgSend_89(_id, - _lib._sel_startDownloadingUbiquitousItemAtURL_error_1, url._id, error); - } - - bool evictUbiquitousItemAtURL_error_( - NSURL url, ffi.Pointer> error) { - return _lib._objc_msgSend_89( - _id, _lib._sel_evictUbiquitousItemAtURL_error_1, url._id, error); - } - - NSURL? URLForUbiquityContainerIdentifier_(NSString? containerIdentifier) { - final _ret = _lib._objc_msgSend_463( - _id, - _lib._sel_URLForUbiquityContainerIdentifier_1, - containerIdentifier?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? URLForPublishingUbiquitousItemAtURL_expirationDate_error_( - NSURL url, - ffi.Pointer> outDate, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_464( - _id, - _lib._sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_1, - url._id, - outDate, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSObject? get ubiquityIdentityToken { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_ubiquityIdentityToken1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void getFileProviderServicesForItemAtURL_completionHandler_( - NSURL url, ObjCBlock_ffiVoid_NSDictionary_NSError completionHandler) { - _lib._objc_msgSend_465( - _id, - _lib._sel_getFileProviderServicesForItemAtURL_completionHandler_1, - url._id, - completionHandler._id); - } - - NSURL? containerURLForSecurityApplicationGroupIdentifier_( - NSString groupIdentifier) { - final _ret = _lib._objc_msgSend_257( - _id, - _lib._sel_containerURLForSecurityApplicationGroupIdentifier_1, - groupIdentifier._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL get homeDirectoryForCurrentUser { - final _ret = - _lib._objc_msgSend_466(_id, _lib._sel_homeDirectoryForCurrentUser1); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL get temporaryDirectory { - final _ret = _lib._objc_msgSend_466(_id, _lib._sel_temporaryDirectory1); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? homeDirectoryForUser_(NSString userName) { - final _ret = _lib._objc_msgSend_257( - _id, _lib._sel_homeDirectoryForUser_1, userName._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - @override - NSFileManager init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSFileManager._(_ret, _lib, retain: true, release: true); - } - - static NSFileManager new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFileManager1, _lib._sel_new1); - return NSFileManager._(_ret, _lib, retain: false, release: true); - } - - static NSFileManager allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSFileManager1, _lib._sel_allocWithZone_1, zone); - return NSFileManager._(_ret, _lib, retain: false, release: true); - } - - static NSFileManager alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFileManager1, _lib._sel_alloc1); - return NSFileManager._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSFileManager1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSFileManager1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSFileManager1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSFileManager1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSFileManager1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSFileManager1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSFileManager1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSFileManager1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSFileManager1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -abstract class NSVolumeEnumerationOptions { - static const int NSVolumeEnumerationSkipHiddenVolumes = 2; - static const int NSVolumeEnumerationProduceFileReferenceURLs = 4; -} - -abstract class NSFileManagerUnmountOptions { - static const int NSFileManagerUnmountAllPartitionsAndEjectDisk = 1; - static const int NSFileManagerUnmountWithoutUI = 2; -} - -void _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSError_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSError_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSError_closureRegistry[block.ref.target.address]!(arg0); - -class ObjCBlock_ffiVoid_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSError._(ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSError castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSError._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSError.fromFunctionPointer( - SwiftLibrary 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>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSError.fromFunction( - SwiftLibrary lib, void Function(NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSError_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSError._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSError.listener( - SwiftLibrary lib, void Function(NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSError_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSError._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(NSError? arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); -} - -abstract class NSDirectoryEnumerationOptions { - static const int NSDirectoryEnumerationSkipsSubdirectoryDescendants = 1; - static const int NSDirectoryEnumerationSkipsPackageDescendants = 2; - static const int NSDirectoryEnumerationSkipsHiddenFiles = 4; - static const int NSDirectoryEnumerationIncludesDirectoriesPostOrder = 8; - static const int NSDirectoryEnumerationProducesRelativePathURLs = 16; -} - -abstract class NSSearchPathDirectory { - static const int NSApplicationDirectory = 1; - static const int NSDemoApplicationDirectory = 2; - static const int NSDeveloperApplicationDirectory = 3; - static const int NSAdminApplicationDirectory = 4; - static const int NSLibraryDirectory = 5; - static const int NSDeveloperDirectory = 6; - static const int NSUserDirectory = 7; - static const int NSDocumentationDirectory = 8; - static const int NSDocumentDirectory = 9; - static const int NSCoreServiceDirectory = 10; - static const int NSAutosavedInformationDirectory = 11; - static const int NSDesktopDirectory = 12; - static const int NSCachesDirectory = 13; - static const int NSApplicationSupportDirectory = 14; - static const int NSDownloadsDirectory = 15; - static const int NSInputMethodsDirectory = 16; - static const int NSMoviesDirectory = 17; - static const int NSMusicDirectory = 18; - static const int NSPicturesDirectory = 19; - static const int NSPrinterDescriptionDirectory = 20; - static const int NSSharedPublicDirectory = 21; - static const int NSPreferencePanesDirectory = 22; - static const int NSApplicationScriptsDirectory = 23; - static const int NSItemReplacementDirectory = 99; - static const int NSAllApplicationsDirectory = 100; - static const int NSAllLibrariesDirectory = 101; - static const int NSTrashDirectory = 102; -} - -abstract class NSSearchPathDomainMask { - static const int NSUserDomainMask = 1; - static const int NSLocalDomainMask = 2; - static const int NSNetworkDomainMask = 4; - static const int NSSystemDomainMask = 8; - static const int NSAllDomainsMask = 65535; -} - -abstract class NSURLRelationship { - static const int NSURLRelationshipContains = 0; - static const int NSURLRelationshipSame = 1; - static const int NSURLRelationshipOther = 2; -} - -bool _ObjCBlock_bool_NSURL_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_bool_NSURL_NSError_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_bool_NSURL_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_bool_NSURL_NSError_registerClosure( - bool Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_bool_NSURL_NSError_closureRegistryIndex; - _ObjCBlock_bool_NSURL_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_NSURL_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_bool_NSURL_NSError_closureRegistry[block.ref.target.address]!( - arg0, arg1); - -class ObjCBlock_bool_NSURL_NSError extends _ObjCBlockBase { - ObjCBlock_bool_NSURL_NSError._(ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_bool_NSURL_NSError castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_bool_NSURL_NSError._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_NSURL_NSError.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_NSURL_NSError_fnPtrTrampoline, false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_NSURL_NSError.fromFunction( - SwiftLibrary lib, bool Function(NSURL, NSError) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_NSURL_NSError_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_NSURL_NSError_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(NSURL._(arg0, lib, retain: true, release: true), NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSURL arg0, NSError arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1._id); -} - -abstract class NSFileManagerItemReplacementOptions { - static const int NSFileManagerItemReplacementUsingNewMetadataOnly = 1; - static const int NSFileManagerItemReplacementWithoutDeletingBackupItem = 2; -} - -void _ObjCBlock_ffiVoid_NSDictionary_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_NSDictionary_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSDictionary_NSError._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSDictionary_NSError castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSDictionary_NSError._(pointer, lib, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSDictionary_NSError.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDictionary_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSDictionary_NSError.fromFunction( - SwiftLibrary lib, void Function(NSDictionary?, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSDictionary._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSDictionary_NSError.listener( - SwiftLibrary lib, void Function(NSDictionary?, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi - .NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSDictionary._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSDictionary? arg0, NSError? arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); -} - -class NSMutableArray extends NSArray { - NSMutableArray._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSMutableArray] that points to the same underlying object as [other]. - static NSMutableArray castFrom(T other) { - return NSMutableArray._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSMutableArray] that wraps the given raw object pointer. - static NSMutableArray castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableArray._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableArray]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableArray1); - } - - void addObject_(NSObject anObject) { - _lib._objc_msgSend_15(_id, _lib._sel_addObject_1, anObject._id); - } - - void insertObject_atIndex_(NSObject anObject, int index) { - _lib._objc_msgSend_469( - _id, _lib._sel_insertObject_atIndex_1, anObject._id, index); - } - - void removeLastObject() { - _lib._objc_msgSend_1(_id, _lib._sel_removeLastObject1); - } - - void removeObjectAtIndex_(int index) { - _lib._objc_msgSend_470(_id, _lib._sel_removeObjectAtIndex_1, index); - } - - void replaceObjectAtIndex_withObject_(int index, NSObject anObject) { - _lib._objc_msgSend_471( - _id, _lib._sel_replaceObjectAtIndex_withObject_1, index, anObject._id); - } - - @override - NSMutableArray init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - NSMutableArray initWithCapacity_(int numItems) { - final _ret = - _lib._objc_msgSend_65(_id, _lib._sel_initWithCapacity_1, numItems); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableArray? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - void addObjectsFromArray_(NSArray otherArray) { - _lib._objc_msgSend_472( - _id, _lib._sel_addObjectsFromArray_1, otherArray._id); - } - - void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { - _lib._objc_msgSend_473( - _id, _lib._sel_exchangeObjectAtIndex_withObjectAtIndex_1, idx1, idx2); - } - - void removeAllObjects() { - _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); - } - - void removeObject_inRange_(NSObject anObject, _NSRange range) { - _lib._objc_msgSend_474( - _id, _lib._sel_removeObject_inRange_1, anObject._id, range); - } - - void removeObject_(NSObject anObject) { - _lib._objc_msgSend_15(_id, _lib._sel_removeObject_1, anObject._id); - } - - void removeObjectIdenticalTo_inRange_(NSObject anObject, _NSRange range) { - _lib._objc_msgSend_474( - _id, _lib._sel_removeObjectIdenticalTo_inRange_1, anObject._id, range); - } - - void removeObjectIdenticalTo_(NSObject anObject) { - _lib._objc_msgSend_15( - _id, _lib._sel_removeObjectIdenticalTo_1, anObject._id); - } - - void removeObjectsFromIndices_numIndices_( - ffi.Pointer indices, int cnt) { - _lib._objc_msgSend_475( - _id, _lib._sel_removeObjectsFromIndices_numIndices_1, indices, cnt); - } - - void removeObjectsInArray_(NSArray otherArray) { - _lib._objc_msgSend_472( - _id, _lib._sel_removeObjectsInArray_1, otherArray._id); - } - - void removeObjectsInRange_(_NSRange range) { - _lib._objc_msgSend_476(_id, _lib._sel_removeObjectsInRange_1, range); - } - - void replaceObjectsInRange_withObjectsFromArray_range_( - _NSRange range, NSArray otherArray, _NSRange otherRange) { - _lib._objc_msgSend_477( - _id, - _lib._sel_replaceObjectsInRange_withObjectsFromArray_range_1, - range, - otherArray._id, - otherRange); - } - - void replaceObjectsInRange_withObjectsFromArray_( - _NSRange range, NSArray otherArray) { - _lib._objc_msgSend_478( - _id, - _lib._sel_replaceObjectsInRange_withObjectsFromArray_1, - range, - otherArray._id); - } - - void setArray_(NSArray otherArray) { - _lib._objc_msgSend_472(_id, _lib._sel_setArray_1, otherArray._id); - } - - void sortUsingFunction_context_( - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - compare, - ffi.Pointer context) { - _lib._objc_msgSend_479( - _id, _lib._sel_sortUsingFunction_context_1, compare, context); - } - - void sortUsingSelector_(ffi.Pointer comparator) { - _lib._objc_msgSend_7(_id, _lib._sel_sortUsingSelector_1, comparator); - } - - void insertObjects_atIndexes_(NSArray objects, NSIndexSet indexes) { - _lib._objc_msgSend_480( - _id, _lib._sel_insertObjects_atIndexes_1, objects._id, indexes._id); - } - - void removeObjectsAtIndexes_(NSIndexSet indexes) { - _lib._objc_msgSend_481( - _id, _lib._sel_removeObjectsAtIndexes_1, indexes._id); - } - - void replaceObjectsAtIndexes_withObjects_( - NSIndexSet indexes, NSArray objects) { - _lib._objc_msgSend_482(_id, _lib._sel_replaceObjectsAtIndexes_withObjects_1, - indexes._id, objects._id); - } - - void setObject_atIndexedSubscript_(NSObject obj, int idx) { - _lib._objc_msgSend_469( - _id, _lib._sel_setObject_atIndexedSubscript_1, obj._id, idx); - } - - void sortUsingComparator_( - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { - _lib._objc_msgSend_483(_id, _lib._sel_sortUsingComparator_1, cmptr._id); - } - - void sortWithOptions_usingComparator_( - int opts, ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { - _lib._objc_msgSend_484( - _id, _lib._sel_sortWithOptions_usingComparator_1, opts, cmptr._id); - } - - static NSMutableArray arrayWithCapacity_(SwiftLibrary _lib, int numItems) { - final _ret = _lib._objc_msgSend_65( - _lib._class_NSMutableArray1, _lib._sel_arrayWithCapacity_1, numItems); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray? arrayWithContentsOfFile_( - SwiftLibrary _lib, NSString path) { - final _ret = _lib._objc_msgSend_485(_lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray? arrayWithContentsOfURL_(SwiftLibrary _lib, NSURL url) { - final _ret = _lib._objc_msgSend_486(_lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - NSMutableArray? initWithContentsOfFile_(NSString path) { - final _ret = _lib._objc_msgSend_485( - _id, _lib._sel_initWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - NSMutableArray? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_486(_id, _lib._sel_initWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - void applyDifference_(NSObject difference) { - _lib._objc_msgSend_15(_id, _lib._sel_applyDifference_1, difference._id); - } - - void sortUsingDescriptors_(NSArray sortDescriptors) { - _lib._objc_msgSend_472( - _id, _lib._sel_sortUsingDescriptors_1, sortDescriptors._id); - } - - void filterUsingPredicate_(NSPredicate predicate) { - _lib._objc_msgSend_487( - _id, _lib._sel_filterUsingPredicate_1, predicate._id); - } - - @override - NSMutableArray initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66( - _id, _lib._sel_initWithObjects_count_1, objects, cnt); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray array(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_array1); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray arrayWithObject_(SwiftLibrary _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_124( - _lib._class_NSMutableArray1, _lib._sel_arrayWithObject_1, anObject._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray arrayWithObjects_count_(SwiftLibrary _lib, - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66(_lib._class_NSMutableArray1, - _lib._sel_arrayWithObjects_count_1, objects, cnt); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray arrayWithObjects_( - SwiftLibrary _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_124(_lib._class_NSMutableArray1, - _lib._sel_arrayWithObjects_1, firstObj._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray arrayWithArray_(SwiftLibrary _lib, NSArray array) { - final _ret = _lib._objc_msgSend_125( - _lib._class_NSMutableArray1, _lib._sel_arrayWithArray_1, array._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableArray initWithObjects_(NSObject firstObj) { - final _ret = - _lib._objc_msgSend_124(_id, _lib._sel_initWithObjects_1, firstObj._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableArray initWithArray_(NSArray array) { - final _ret = - _lib._objc_msgSend_125(_id, _lib._sel_initWithArray_1, array._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableArray initWithArray_copyItems_(NSArray array, bool flag) { - final _ret = _lib._objc_msgSend_126( - _id, _lib._sel_initWithArray_copyItems_1, array._id, flag); - return NSMutableArray._(_ret, _lib, retain: false, release: true); - } - - static NSArray? arrayWithContentsOfURL_error_(SwiftLibrary _lib, NSURL url, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_127(_lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfURL_error_1, url._id, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_new1); - return NSMutableArray._(_ret, _lib, retain: false, release: true); - } - - static NSMutableArray allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMutableArray1, _lib._sel_allocWithZone_1, zone); - return NSMutableArray._(_ret, _lib, retain: false, release: true); - } - - static NSMutableArray alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_alloc1); - return NSMutableArray._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSMutableArray1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSMutableArray1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSMutableArray1, - _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableArray1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSMutableArray1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSMutableArray1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSMutableArray1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSMutableArray1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableArray1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSMutableOrderedSet extends NSOrderedSet { - NSMutableOrderedSet._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSMutableOrderedSet] that points to the same underlying object as [other]. - static NSMutableOrderedSet castFrom(T other) { - return NSMutableOrderedSet._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSMutableOrderedSet] that wraps the given raw object pointer. - static NSMutableOrderedSet castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableOrderedSet._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableOrderedSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableOrderedSet1); - } - - void insertObject_atIndex_(NSObject object, int idx) { - _lib._objc_msgSend_469( - _id, _lib._sel_insertObject_atIndex_1, object._id, idx); - } - - void removeObjectAtIndex_(int idx) { - _lib._objc_msgSend_470(_id, _lib._sel_removeObjectAtIndex_1, idx); - } - - void replaceObjectAtIndex_withObject_(int idx, NSObject object) { - _lib._objc_msgSend_471( - _id, _lib._sel_replaceObjectAtIndex_withObject_1, idx, object._id); - } - - @override - NSMutableOrderedSet? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableOrderedSet init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSMutableOrderedSet initWithCapacity_(int numItems) { - final _ret = - _lib._objc_msgSend_65(_id, _lib._sel_initWithCapacity_1, numItems); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - void addObject_(NSObject object) { - _lib._objc_msgSend_15(_id, _lib._sel_addObject_1, object._id); - } - - void addObjects_count_( - ffi.Pointer> objects, int count) { - _lib._objc_msgSend_500(_id, _lib._sel_addObjects_count_1, objects, count); - } - - void addObjectsFromArray_(NSArray array) { - _lib._objc_msgSend_472(_id, _lib._sel_addObjectsFromArray_1, array._id); - } - - void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { - _lib._objc_msgSend_473( - _id, _lib._sel_exchangeObjectAtIndex_withObjectAtIndex_1, idx1, idx2); - } - - void moveObjectsAtIndexes_toIndex_(NSIndexSet indexes, int idx) { - _lib._objc_msgSend_501( - _id, _lib._sel_moveObjectsAtIndexes_toIndex_1, indexes._id, idx); - } - - void insertObjects_atIndexes_(NSArray objects, NSIndexSet indexes) { - _lib._objc_msgSend_480( - _id, _lib._sel_insertObjects_atIndexes_1, objects._id, indexes._id); - } - - void setObject_atIndex_(NSObject obj, int idx) { - _lib._objc_msgSend_469(_id, _lib._sel_setObject_atIndex_1, obj._id, idx); - } - - void setObject_atIndexedSubscript_(NSObject obj, int idx) { - _lib._objc_msgSend_469( - _id, _lib._sel_setObject_atIndexedSubscript_1, obj._id, idx); - } - - void replaceObjectsInRange_withObjects_count_( - _NSRange range, ffi.Pointer> objects, int count) { - _lib._objc_msgSend_502( - _id, - _lib._sel_replaceObjectsInRange_withObjects_count_1, - range, - objects, - count); - } - - void replaceObjectsAtIndexes_withObjects_( - NSIndexSet indexes, NSArray objects) { - _lib._objc_msgSend_482(_id, _lib._sel_replaceObjectsAtIndexes_withObjects_1, - indexes._id, objects._id); - } - - void removeObjectsInRange_(_NSRange range) { - _lib._objc_msgSend_476(_id, _lib._sel_removeObjectsInRange_1, range); - } - - void removeObjectsAtIndexes_(NSIndexSet indexes) { - _lib._objc_msgSend_481( - _id, _lib._sel_removeObjectsAtIndexes_1, indexes._id); - } - - void removeAllObjects() { - _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); - } - - void removeObject_(NSObject object) { - _lib._objc_msgSend_15(_id, _lib._sel_removeObject_1, object._id); - } - - void removeObjectsInArray_(NSArray array) { - _lib._objc_msgSend_472(_id, _lib._sel_removeObjectsInArray_1, array._id); - } - - void intersectOrderedSet_(NSOrderedSet other) { - _lib._objc_msgSend_503(_id, _lib._sel_intersectOrderedSet_1, other._id); - } - - void minusOrderedSet_(NSOrderedSet other) { - _lib._objc_msgSend_503(_id, _lib._sel_minusOrderedSet_1, other._id); - } - - void unionOrderedSet_(NSOrderedSet other) { - _lib._objc_msgSend_503(_id, _lib._sel_unionOrderedSet_1, other._id); - } - - void intersectSet_(NSSet other) { - _lib._objc_msgSend_504(_id, _lib._sel_intersectSet_1, other._id); - } - - void minusSet_(NSSet other) { - _lib._objc_msgSend_504(_id, _lib._sel_minusSet_1, other._id); - } - - void unionSet_(NSSet other) { - _lib._objc_msgSend_504(_id, _lib._sel_unionSet_1, other._id); - } - - void sortUsingComparator_( - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { - _lib._objc_msgSend_483(_id, _lib._sel_sortUsingComparator_1, cmptr._id); - } - - void sortWithOptions_usingComparator_( - int opts, ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { - _lib._objc_msgSend_484( - _id, _lib._sel_sortWithOptions_usingComparator_1, opts, cmptr._id); - } - - void sortRange_options_usingComparator_(_NSRange range, int opts, - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { - _lib._objc_msgSend_505(_id, _lib._sel_sortRange_options_usingComparator_1, - range, opts, cmptr._id); - } - - static NSMutableOrderedSet orderedSetWithCapacity_( - SwiftLibrary _lib, int numItems) { - final _ret = _lib._objc_msgSend_65(_lib._class_NSMutableOrderedSet1, - _lib._sel_orderedSetWithCapacity_1, numItems); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - void applyDifference_(NSObject difference) { - _lib._objc_msgSend_15(_id, _lib._sel_applyDifference_1, difference._id); - } - - void sortUsingDescriptors_(NSArray sortDescriptors) { - _lib._objc_msgSend_472( - _id, _lib._sel_sortUsingDescriptors_1, sortDescriptors._id); - } - - void filterUsingPredicate_(NSPredicate p) { - _lib._objc_msgSend_487(_id, _lib._sel_filterUsingPredicate_1, p._id); - } - - @override - NSMutableOrderedSet initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66( - _id, _lib._sel_initWithObjects_count_1, objects, cnt); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSet(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableOrderedSet1, _lib._sel_orderedSet1); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithObject_( - SwiftLibrary _lib, NSObject object) { - final _ret = _lib._objc_msgSend_124(_lib._class_NSMutableOrderedSet1, - _lib._sel_orderedSetWithObject_1, object._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithObjects_count_(SwiftLibrary _lib, - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66(_lib._class_NSMutableOrderedSet1, - _lib._sel_orderedSetWithObjects_count_1, objects, cnt); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithObjects_( - SwiftLibrary _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_124(_lib._class_NSMutableOrderedSet1, - _lib._sel_orderedSetWithObjects_1, firstObj._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithOrderedSet_( - SwiftLibrary _lib, NSOrderedSet set) { - final _ret = _lib._objc_msgSend_492(_lib._class_NSMutableOrderedSet1, - _lib._sel_orderedSetWithOrderedSet_1, set._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithOrderedSet_range_copyItems_( - SwiftLibrary _lib, NSOrderedSet set, _NSRange range, bool flag) { - final _ret = _lib._objc_msgSend_493( - _lib._class_NSMutableOrderedSet1, - _lib._sel_orderedSetWithOrderedSet_range_copyItems_1, - set._id, - range, - flag); - return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); - } - - static NSMutableOrderedSet orderedSetWithArray_( - SwiftLibrary _lib, NSArray array) { - final _ret = _lib._objc_msgSend_125(_lib._class_NSMutableOrderedSet1, - _lib._sel_orderedSetWithArray_1, array._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithArray_range_copyItems_( - SwiftLibrary _lib, NSArray array, _NSRange range, bool flag) { - final _ret = _lib._objc_msgSend_494( - _lib._class_NSMutableOrderedSet1, - _lib._sel_orderedSetWithArray_range_copyItems_1, - array._id, - range, - flag); - return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); - } - - static NSMutableOrderedSet orderedSetWithSet_(SwiftLibrary _lib, NSSet set) { - final _ret = _lib._objc_msgSend_411(_lib._class_NSMutableOrderedSet1, - _lib._sel_orderedSetWithSet_1, set._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithSet_copyItems_( - SwiftLibrary _lib, NSSet set, bool flag) { - final _ret = _lib._objc_msgSend_412(_lib._class_NSMutableOrderedSet1, - _lib._sel_orderedSetWithSet_copyItems_1, set._id, flag); - return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableOrderedSet initWithObject_(NSObject object) { - final _ret = - _lib._objc_msgSend_124(_id, _lib._sel_initWithObject_1, object._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableOrderedSet initWithObjects_(NSObject firstObj) { - final _ret = - _lib._objc_msgSend_124(_id, _lib._sel_initWithObjects_1, firstObj._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableOrderedSet initWithOrderedSet_(NSOrderedSet set) { - final _ret = - _lib._objc_msgSend_492(_id, _lib._sel_initWithOrderedSet_1, set._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableOrderedSet initWithOrderedSet_copyItems_( - NSOrderedSet set, bool flag) { - final _ret = _lib._objc_msgSend_495( - _id, _lib._sel_initWithOrderedSet_copyItems_1, set._id, flag); - return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableOrderedSet initWithOrderedSet_range_copyItems_( - NSOrderedSet set, _NSRange range, bool flag) { - final _ret = _lib._objc_msgSend_493(_id, - _lib._sel_initWithOrderedSet_range_copyItems_1, set._id, range, flag); - return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableOrderedSet initWithArray_(NSArray array) { - final _ret = - _lib._objc_msgSend_125(_id, _lib._sel_initWithArray_1, array._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableOrderedSet initWithArray_copyItems_(NSArray set, bool flag) { - final _ret = _lib._objc_msgSend_126( - _id, _lib._sel_initWithArray_copyItems_1, set._id, flag); - return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableOrderedSet initWithArray_range_copyItems_( - NSArray set, _NSRange range, bool flag) { - final _ret = _lib._objc_msgSend_494( - _id, _lib._sel_initWithArray_range_copyItems_1, set._id, range, flag); - return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableOrderedSet initWithSet_(NSSet set) { - final _ret = _lib._objc_msgSend_411(_id, _lib._sel_initWithSet_1, set._id); - return NSMutableOrderedSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableOrderedSet initWithSet_copyItems_(NSSet set, bool flag) { - final _ret = _lib._objc_msgSend_412( - _id, _lib._sel_initWithSet_copyItems_1, set._id, flag); - return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); - } - - static NSMutableOrderedSet new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableOrderedSet1, _lib._sel_new1); - return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); - } - - static NSMutableOrderedSet allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMutableOrderedSet1, _lib._sel_allocWithZone_1, zone); - return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); - } - - static NSMutableOrderedSet alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableOrderedSet1, _lib._sel_alloc1); - return NSMutableOrderedSet._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSMutableOrderedSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSMutableOrderedSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSMutableOrderedSet1, - _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableOrderedSet1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSMutableOrderedSet1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSMutableOrderedSet1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSMutableOrderedSet1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSMutableOrderedSet1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableOrderedSet1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSOrderedSet extends NSObject { - NSOrderedSet._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSOrderedSet] that points to the same underlying object as [other]. - static NSOrderedSet castFrom(T other) { - return NSOrderedSet._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSOrderedSet] that wraps the given raw object pointer. - static NSOrderedSet castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOrderedSet._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSOrderedSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSOrderedSet1); - } - - int get count { - return _lib._objc_msgSend_10(_id, _lib._sel_count1); - } - - NSObject objectAtIndex_(int idx) { - final _ret = _lib._objc_msgSend_65(_id, _lib._sel_objectAtIndex_1, idx); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - int indexOfObject_(NSObject object) { - return _lib._objc_msgSend_74(_id, _lib._sel_indexOfObject_1, object._id); - } - - @override - NSOrderedSet init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSOrderedSet initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66( - _id, _lib._sel_initWithObjects_count_1, objects, cnt); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSOrderedSet? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - void getObjects_range_( - ffi.Pointer> objects, _NSRange range) { - _lib._objc_msgSend_73(_id, _lib._sel_getObjects_range_1, objects, range); - } - - NSArray objectsAtIndexes_(NSIndexSet indexes) { - final _ret = - _lib._objc_msgSend_111(_id, _lib._sel_objectsAtIndexes_1, indexes._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSObject? get firstObject { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_firstObject1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? get lastObject { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_lastObject1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - bool isEqualToOrderedSet_(NSOrderedSet other) { - return _lib._objc_msgSend_489( - _id, _lib._sel_isEqualToOrderedSet_1, other._id); - } - - bool containsObject_(NSObject object) { - return _lib._objc_msgSend_0(_id, _lib._sel_containsObject_1, object._id); - } - - bool intersectsOrderedSet_(NSOrderedSet other) { - return _lib._objc_msgSend_489( - _id, _lib._sel_intersectsOrderedSet_1, other._id); - } - - bool intersectsSet_(NSSet set) { - return _lib._objc_msgSend_403(_id, _lib._sel_intersectsSet_1, set._id); - } - - bool isSubsetOfOrderedSet_(NSOrderedSet other) { - return _lib._objc_msgSend_489( - _id, _lib._sel_isSubsetOfOrderedSet_1, other._id); - } - - bool isSubsetOfSet_(NSSet set) { - return _lib._objc_msgSend_403(_id, _lib._sel_isSubsetOfSet_1, set._id); - } - - NSObject objectAtIndexedSubscript_(int idx) { - final _ret = - _lib._objc_msgSend_65(_id, _lib._sel_objectAtIndexedSubscript_1, idx); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSEnumerator objectEnumerator() { - final _ret = _lib._objc_msgSend_77(_id, _lib._sel_objectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } - - NSEnumerator reverseObjectEnumerator() { - final _ret = _lib._objc_msgSend_77(_id, _lib._sel_reverseObjectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } - - NSOrderedSet get reversedOrderedSet { - final _ret = _lib._objc_msgSend_490(_id, _lib._sel_reversedOrderedSet1); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSArray get array { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_array1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSSet get set1 { - final _ret = _lib._objc_msgSend_491(_id, _lib._sel_set1); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - void enumerateObjectsUsingBlock_( - ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool block) { - _lib._objc_msgSend_112( - _id, _lib._sel_enumerateObjectsUsingBlock_1, block._id); - } - - void enumerateObjectsWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool block) { - _lib._objc_msgSend_113(_id, - _lib._sel_enumerateObjectsWithOptions_usingBlock_1, opts, block._id); - } - - void enumerateObjectsAtIndexes_options_usingBlock_(NSIndexSet s, int opts, - ObjCBlock_ffiVoid_ObjCObject_ffiUnsignedLong_bool block) { - _lib._objc_msgSend_114( - _id, - _lib._sel_enumerateObjectsAtIndexes_options_usingBlock_1, - s._id, - opts, - block._id); - } - - int indexOfObjectPassingTest_( - ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - return _lib._objc_msgSend_115( - _id, _lib._sel_indexOfObjectPassingTest_1, predicate._id); - } - - int indexOfObjectWithOptions_passingTest_( - int opts, ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - return _lib._objc_msgSend_116(_id, - _lib._sel_indexOfObjectWithOptions_passingTest_1, opts, predicate._id); - } - - int indexOfObjectAtIndexes_options_passingTest_(NSIndexSet s, int opts, - ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - return _lib._objc_msgSend_117( - _id, - _lib._sel_indexOfObjectAtIndexes_options_passingTest_1, - s._id, - opts, - predicate._id); - } - - NSIndexSet indexesOfObjectsPassingTest_( - ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _lib._objc_msgSend_118( - _id, _lib._sel_indexesOfObjectsPassingTest_1, predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet indexesOfObjectsWithOptions_passingTest_( - int opts, ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _lib._objc_msgSend_119( - _id, - _lib._sel_indexesOfObjectsWithOptions_passingTest_1, - opts, - predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_(NSIndexSet s, - int opts, ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _lib._objc_msgSend_120( - _id, - _lib._sel_indexesOfObjectsAtIndexes_options_passingTest_1, - s._id, - opts, - predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - int indexOfObject_inSortedRange_options_usingComparator_( - NSObject object, - _NSRange range, - int opts, - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmp) { - return _lib._objc_msgSend_123( - _id, - _lib._sel_indexOfObject_inSortedRange_options_usingComparator_1, - object._id, - range, - opts, - cmp._id); - } - - NSArray sortedArrayUsingComparator_( - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { - final _ret = _lib._objc_msgSend_121( - _id, _lib._sel_sortedArrayUsingComparator_1, cmptr._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray sortedArrayWithOptions_usingComparator_( - int opts, ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject cmptr) { - final _ret = _lib._objc_msgSend_122(_id, - _lib._sel_sortedArrayWithOptions_usingComparator_1, opts, cmptr._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSString get description { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _lib._objc_msgSend_70( - _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithLocale_indent_(NSObject? locale, int level) { - final _ret = _lib._objc_msgSend_71( - _id, - _lib._sel_descriptionWithLocale_indent_1, - locale?._id ?? ffi.nullptr, - level); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSOrderedSet orderedSet(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOrderedSet1, _lib._sel_orderedSet1); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithObject_( - SwiftLibrary _lib, NSObject object) { - final _ret = _lib._objc_msgSend_124(_lib._class_NSOrderedSet1, - _lib._sel_orderedSetWithObject_1, object._id); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithObjects_count_(SwiftLibrary _lib, - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66(_lib._class_NSOrderedSet1, - _lib._sel_orderedSetWithObjects_count_1, objects, cnt); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithObjects_( - SwiftLibrary _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_124(_lib._class_NSOrderedSet1, - _lib._sel_orderedSetWithObjects_1, firstObj._id); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithOrderedSet_( - SwiftLibrary _lib, NSOrderedSet set) { - final _ret = _lib._objc_msgSend_492(_lib._class_NSOrderedSet1, - _lib._sel_orderedSetWithOrderedSet_1, set._id); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithOrderedSet_range_copyItems_( - SwiftLibrary _lib, NSOrderedSet set, _NSRange range, bool flag) { - final _ret = _lib._objc_msgSend_493( - _lib._class_NSOrderedSet1, - _lib._sel_orderedSetWithOrderedSet_range_copyItems_1, - set._id, - range, - flag); - return NSOrderedSet._(_ret, _lib, retain: false, release: true); - } - - static NSOrderedSet orderedSetWithArray_(SwiftLibrary _lib, NSArray array) { - final _ret = _lib._objc_msgSend_125( - _lib._class_NSOrderedSet1, _lib._sel_orderedSetWithArray_1, array._id); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithArray_range_copyItems_( - SwiftLibrary _lib, NSArray array, _NSRange range, bool flag) { - final _ret = _lib._objc_msgSend_494( - _lib._class_NSOrderedSet1, - _lib._sel_orderedSetWithArray_range_copyItems_1, - array._id, - range, - flag); - return NSOrderedSet._(_ret, _lib, retain: false, release: true); - } - - static NSOrderedSet orderedSetWithSet_(SwiftLibrary _lib, NSSet set) { - final _ret = _lib._objc_msgSend_411( - _lib._class_NSOrderedSet1, _lib._sel_orderedSetWithSet_1, set._id); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithSet_copyItems_( - SwiftLibrary _lib, NSSet set, bool flag) { - final _ret = _lib._objc_msgSend_412(_lib._class_NSOrderedSet1, - _lib._sel_orderedSetWithSet_copyItems_1, set._id, flag); - return NSOrderedSet._(_ret, _lib, retain: false, release: true); - } - - NSOrderedSet initWithObject_(NSObject object) { - final _ret = - _lib._objc_msgSend_124(_id, _lib._sel_initWithObject_1, object._id); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSOrderedSet initWithObjects_(NSObject firstObj) { - final _ret = - _lib._objc_msgSend_124(_id, _lib._sel_initWithObjects_1, firstObj._id); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSOrderedSet initWithOrderedSet_(NSOrderedSet set) { - final _ret = - _lib._objc_msgSend_492(_id, _lib._sel_initWithOrderedSet_1, set._id); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSOrderedSet initWithOrderedSet_copyItems_(NSOrderedSet set, bool flag) { - final _ret = _lib._objc_msgSend_495( - _id, _lib._sel_initWithOrderedSet_copyItems_1, set._id, flag); - return NSOrderedSet._(_ret, _lib, retain: false, release: true); - } - - NSOrderedSet initWithOrderedSet_range_copyItems_( - NSOrderedSet set, _NSRange range, bool flag) { - final _ret = _lib._objc_msgSend_493(_id, - _lib._sel_initWithOrderedSet_range_copyItems_1, set._id, range, flag); - return NSOrderedSet._(_ret, _lib, retain: false, release: true); - } - - NSOrderedSet initWithArray_(NSArray array) { - final _ret = - _lib._objc_msgSend_125(_id, _lib._sel_initWithArray_1, array._id); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSOrderedSet initWithArray_copyItems_(NSArray set, bool flag) { - final _ret = _lib._objc_msgSend_126( - _id, _lib._sel_initWithArray_copyItems_1, set._id, flag); - return NSOrderedSet._(_ret, _lib, retain: false, release: true); - } - - NSOrderedSet initWithArray_range_copyItems_( - NSArray set, _NSRange range, bool flag) { - final _ret = _lib._objc_msgSend_494( - _id, _lib._sel_initWithArray_range_copyItems_1, set._id, range, flag); - return NSOrderedSet._(_ret, _lib, retain: false, release: true); - } - - NSOrderedSet initWithSet_(NSSet set) { - final _ret = _lib._objc_msgSend_411(_id, _lib._sel_initWithSet_1, set._id); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSOrderedSet initWithSet_copyItems_(NSSet set, bool flag) { - final _ret = _lib._objc_msgSend_412( - _id, _lib._sel_initWithSet_copyItems_1, set._id, flag); - return NSOrderedSet._(_ret, _lib, retain: false, release: true); - } - - NSObject differenceFromOrderedSet_withOptions_usingEquivalenceTest_( - NSOrderedSet other, - int options, - ObjCBlock_bool_ObjCObject_ObjCObject block) { - final _ret = _lib._objc_msgSend_496( - _id, - _lib._sel_differenceFromOrderedSet_withOptions_usingEquivalenceTest_1, - other._id, - options, - block._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject differenceFromOrderedSet_withOptions_( - NSOrderedSet other, int options) { - final _ret = _lib._objc_msgSend_497(_id, - _lib._sel_differenceFromOrderedSet_withOptions_1, other._id, options); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject differenceFromOrderedSet_(NSOrderedSet other) { - final _ret = _lib._objc_msgSend_492( - _id, _lib._sel_differenceFromOrderedSet_1, other._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSOrderedSet? orderedSetByApplyingDifference_(NSObject difference) { - final _ret = _lib._objc_msgSend_498( - _id, _lib._sel_orderedSetByApplyingDifference_1, difference._id); - return _ret.address == 0 - ? null - : NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - NSObject valueForKey_(NSString key) { - final _ret = _lib._objc_msgSend_31(_id, _lib._sel_valueForKey_1, key._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - @override - void setValue_forKey_(NSObject? value, NSString key) { - _lib._objc_msgSend_135( - _id, _lib._sel_setValue_forKey_1, value?._id ?? ffi.nullptr, key._id); - } - - @override - void addObserver_forKeyPath_options_context_(NSObject observer, - NSString keyPath, int options, ffi.Pointer context) { - _lib._objc_msgSend_139( - _id, - _lib._sel_addObserver_forKeyPath_options_context_1, - observer._id, - keyPath._id, - options, - context); - } - - @override - void removeObserver_forKeyPath_context_( - NSObject observer, NSString keyPath, ffi.Pointer context) { - _lib._objc_msgSend_140(_id, _lib._sel_removeObserver_forKeyPath_context_1, - observer._id, keyPath._id, context); - } - - @override - void removeObserver_forKeyPath_(NSObject observer, NSString keyPath) { - _lib._objc_msgSend_141( - _id, _lib._sel_removeObserver_forKeyPath_1, observer._id, keyPath._id); - } - - NSArray sortedArrayUsingDescriptors_(NSArray sortDescriptors) { - final _ret = _lib._objc_msgSend_68( - _id, _lib._sel_sortedArrayUsingDescriptors_1, sortDescriptors._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSOrderedSet filteredOrderedSetUsingPredicate_(NSPredicate p) { - final _ret = _lib._objc_msgSend_499( - _id, _lib._sel_filteredOrderedSetUsingPredicate_1, p._id); - return NSOrderedSet._(_ret, _lib, retain: true, release: true); - } - - static NSOrderedSet new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOrderedSet1, _lib._sel_new1); - return NSOrderedSet._(_ret, _lib, retain: false, release: true); - } - - static NSOrderedSet allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSOrderedSet1, _lib._sel_allocWithZone_1, zone); - return NSOrderedSet._(_ret, _lib, retain: false, release: true); - } - - static NSOrderedSet alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOrderedSet1, _lib._sel_alloc1); - return NSOrderedSet._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSOrderedSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSOrderedSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSOrderedSet1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSOrderedSet1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSOrderedSet1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSOrderedSet1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSOrderedSet1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSOrderedSet1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOrderedSet1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSMutableSet extends NSSet { - NSMutableSet._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSMutableSet] that points to the same underlying object as [other]. - static NSMutableSet castFrom(T other) { - return NSMutableSet._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSMutableSet] that wraps the given raw object pointer. - static NSMutableSet castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableSet._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSMutableSet1); - } - - void addObject_(NSObject object) { - _lib._objc_msgSend_15(_id, _lib._sel_addObject_1, object._id); - } - - void removeObject_(NSObject object) { - _lib._objc_msgSend_15(_id, _lib._sel_removeObject_1, object._id); - } - - @override - NSMutableSet? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableSet init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - NSMutableSet initWithCapacity_(int numItems) { - final _ret = - _lib._objc_msgSend_65(_id, _lib._sel_initWithCapacity_1, numItems); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - void addObjectsFromArray_(NSArray array) { - _lib._objc_msgSend_472(_id, _lib._sel_addObjectsFromArray_1, array._id); - } - - void intersectSet_(NSSet otherSet) { - _lib._objc_msgSend_504(_id, _lib._sel_intersectSet_1, otherSet._id); - } - - void minusSet_(NSSet otherSet) { - _lib._objc_msgSend_504(_id, _lib._sel_minusSet_1, otherSet._id); - } - - void removeAllObjects() { - _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); - } - - void unionSet_(NSSet otherSet) { - _lib._objc_msgSend_504(_id, _lib._sel_unionSet_1, otherSet._id); - } - - void setSet_(NSSet otherSet) { - _lib._objc_msgSend_504(_id, _lib._sel_setSet_1, otherSet._id); - } - - static NSMutableSet setWithCapacity_(SwiftLibrary _lib, int numItems) { - final _ret = _lib._objc_msgSend_65( - _lib._class_NSMutableSet1, _lib._sel_setWithCapacity_1, numItems); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - void filterUsingPredicate_(NSPredicate predicate) { - _lib._objc_msgSend_487( - _id, _lib._sel_filterUsingPredicate_1, predicate._id); - } - - @override - NSMutableSet initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66( - _id, _lib._sel_initWithObjects_count_1, objects, cnt); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableSet set1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableSet1, _lib._sel_set1); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableSet setWithObject_(SwiftLibrary _lib, NSObject object) { - final _ret = _lib._objc_msgSend_124( - _lib._class_NSMutableSet1, _lib._sel_setWithObject_1, object._id); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableSet setWithObjects_count_(SwiftLibrary _lib, - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_66(_lib._class_NSMutableSet1, - _lib._sel_setWithObjects_count_1, objects, cnt); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableSet setWithObjects_(SwiftLibrary _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_124( - _lib._class_NSMutableSet1, _lib._sel_setWithObjects_1, firstObj._id); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableSet setWithSet_(SwiftLibrary _lib, NSSet set) { - final _ret = _lib._objc_msgSend_411( - _lib._class_NSMutableSet1, _lib._sel_setWithSet_1, set._id); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableSet setWithArray_(SwiftLibrary _lib, NSArray array) { - final _ret = _lib._objc_msgSend_125( - _lib._class_NSMutableSet1, _lib._sel_setWithArray_1, array._id); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableSet initWithObjects_(NSObject firstObj) { - final _ret = - _lib._objc_msgSend_124(_id, _lib._sel_initWithObjects_1, firstObj._id); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableSet initWithSet_(NSSet set) { - final _ret = _lib._objc_msgSend_411(_id, _lib._sel_initWithSet_1, set._id); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableSet initWithSet_copyItems_(NSSet set, bool flag) { - final _ret = _lib._objc_msgSend_412( - _id, _lib._sel_initWithSet_copyItems_1, set._id, flag); - return NSMutableSet._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableSet initWithArray_(NSArray array) { - final _ret = - _lib._objc_msgSend_125(_id, _lib._sel_initWithArray_1, array._id); - return NSMutableSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableSet new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableSet1, _lib._sel_new1); - return NSMutableSet._(_ret, _lib, retain: false, release: true); - } - - static NSMutableSet allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMutableSet1, _lib._sel_allocWithZone_1, zone); - return NSMutableSet._(_ret, _lib, retain: false, release: true); - } - - static NSMutableSet alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableSet1, _lib._sel_alloc1); - return NSMutableSet._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSMutableSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSMutableSet1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableSet1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableSet1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSMutableSet1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSMutableSet1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSMutableSet1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSMutableSet1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableSet1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -abstract class NSKeyValueChange { - static const int NSKeyValueChangeSetting = 1; - static const int NSKeyValueChangeInsertion = 2; - static const int NSKeyValueChangeRemoval = 3; - static const int NSKeyValueChangeReplacement = 4; -} - -abstract class NSKeyValueSetMutationKind { - static const int NSKeyValueUnionSetMutation = 1; - static const int NSKeyValueMinusSetMutation = 2; - static const int NSKeyValueIntersectSetMutation = 3; - static const int NSKeyValueSetSetMutation = 4; -} - -class NSKeyedArchiver extends NSCoder { - NSKeyedArchiver._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSKeyedArchiver] that points to the same underlying object as [other]. - static NSKeyedArchiver castFrom(T other) { - return NSKeyedArchiver._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSKeyedArchiver] that wraps the given raw object pointer. - static NSKeyedArchiver castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSKeyedArchiver._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSKeyedArchiver]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSKeyedArchiver1); - } - - NSKeyedArchiver initRequiringSecureCoding_(bool requiresSecureCoding) { - final _ret = _lib._objc_msgSend_514( - _id, _lib._sel_initRequiringSecureCoding_1, requiresSecureCoding); - return NSKeyedArchiver._(_ret, _lib, retain: true, release: true); - } - - static NSData? archivedDataWithRootObject_requiringSecureCoding_error_( - SwiftLibrary _lib, - NSObject object, - bool requiresSecureCoding, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_515( - _lib._class_NSKeyedArchiver1, - _lib._sel_archivedDataWithRootObject_requiringSecureCoding_error_1, - object._id, - requiresSecureCoding, - error); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - @override - NSKeyedArchiver init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSKeyedArchiver._(_ret, _lib, retain: true, release: true); - } - - NSKeyedArchiver initForWritingWithMutableData_(NSMutableData data) { - final _ret = _lib._objc_msgSend_521( - _id, _lib._sel_initForWritingWithMutableData_1, data._id); - return NSKeyedArchiver._(_ret, _lib, retain: true, release: true); - } - - static NSData archivedDataWithRootObject_( - SwiftLibrary _lib, NSObject rootObject) { - final _ret = _lib._objc_msgSend_522(_lib._class_NSKeyedArchiver1, - _lib._sel_archivedDataWithRootObject_1, rootObject._id); - return NSData._(_ret, _lib, retain: true, release: true); - } - - static bool archiveRootObject_toFile_( - SwiftLibrary _lib, NSObject rootObject, NSString path) { - return _lib._objc_msgSend_261(_lib._class_NSKeyedArchiver1, - _lib._sel_archiveRootObject_toFile_1, rootObject._id, path._id); - } - - NSObject? get delegate { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - set delegate(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); - } - - int get outputFormat { - return _lib._objc_msgSend_523(_id, _lib._sel_outputFormat1); - } - - set outputFormat(int value) { - return _lib._objc_msgSend_524(_id, _lib._sel_setOutputFormat_1, value); - } - - NSData get encodedData { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_encodedData1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - void finishEncoding() { - _lib._objc_msgSend_1(_id, _lib._sel_finishEncoding1); - } - - static void setClassName_forClass_( - SwiftLibrary _lib, NSString? codedName, NSObject cls) { - _lib._objc_msgSend_525( - _lib._class_NSKeyedArchiver1, - _lib._sel_setClassName_forClass_1, - codedName?._id ?? ffi.nullptr, - cls._id); - } - - static NSString? classNameForClass_(SwiftLibrary _lib, NSObject cls) { - final _ret = _lib._objc_msgSend_526( - _lib._class_NSKeyedArchiver1, _lib._sel_classNameForClass_1, cls._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - @override - void encodeObject_forKey_(NSObject? object, NSString key) { - _lib._objc_msgSend_135(_id, _lib._sel_encodeObject_forKey_1, - object?._id ?? ffi.nullptr, key._id); - } - - @override - void encodeConditionalObject_forKey_(NSObject? object, NSString key) { - _lib._objc_msgSend_135(_id, _lib._sel_encodeConditionalObject_forKey_1, - object?._id ?? ffi.nullptr, key._id); - } - - @override - void encodeBool_forKey_(bool value, NSString key) { - _lib._objc_msgSend_296(_id, _lib._sel_encodeBool_forKey_1, value, key._id); - } - - @override - void encodeInt_forKey_(int value, NSString key) { - _lib._objc_msgSend_297(_id, _lib._sel_encodeInt_forKey_1, value, key._id); - } - - @override - void encodeInt32_forKey_(int value, NSString key) { - _lib._objc_msgSend_298(_id, _lib._sel_encodeInt32_forKey_1, value, key._id); - } - - @override - void encodeInt64_forKey_(int value, NSString key) { - _lib._objc_msgSend_299(_id, _lib._sel_encodeInt64_forKey_1, value, key._id); - } - - @override - void encodeFloat_forKey_(double value, NSString key) { - _lib._objc_msgSend_300(_id, _lib._sel_encodeFloat_forKey_1, value, key._id); - } - - @override - void encodeDouble_forKey_(double value, NSString key) { - _lib._objc_msgSend_301( - _id, _lib._sel_encodeDouble_forKey_1, value, key._id); - } - - @override - void encodeBytes_length_forKey_( - ffi.Pointer bytes, int length, NSString key) { - _lib._objc_msgSend_302( - _id, _lib._sel_encodeBytes_length_forKey_1, bytes, length, key._id); - } - - @override - bool get requiresSecureCoding { - return _lib._objc_msgSend_12(_id, _lib._sel_requiresSecureCoding1); - } - - set requiresSecureCoding(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setRequiresSecureCoding_1, value); - } - - static NSKeyedArchiver new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSKeyedArchiver1, _lib._sel_new1); - return NSKeyedArchiver._(_ret, _lib, retain: false, release: true); - } - - static NSKeyedArchiver allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSKeyedArchiver1, _lib._sel_allocWithZone_1, zone); - return NSKeyedArchiver._(_ret, _lib, retain: false, release: true); - } - - static NSKeyedArchiver alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSKeyedArchiver1, _lib._sel_alloc1); - return NSKeyedArchiver._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSKeyedArchiver1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSKeyedArchiver1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSKeyedArchiver1, - _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSKeyedArchiver1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSKeyedArchiver1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSKeyedArchiver1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSKeyedArchiver1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSKeyedArchiver1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSKeyedArchiver1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSMutableData extends NSData { - NSMutableData._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSMutableData] that points to the same underlying object as [other]. - static NSMutableData castFrom(T other) { - return NSMutableData._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSMutableData] that wraps the given raw object pointer. - static NSMutableData castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableData._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSMutableData1); - } - - ffi.Pointer get mutableBytes { - return _lib._objc_msgSend_20(_id, _lib._sel_mutableBytes1); - } - - @override - int get length { - return _lib._objc_msgSend_10(_id, _lib._sel_length1); - } - - set length(int value) { - return _lib._objc_msgSend_516(_id, _lib._sel_setLength_1, value); - } - - void appendBytes_length_(ffi.Pointer bytes, int length) { - _lib._objc_msgSend_22(_id, _lib._sel_appendBytes_length_1, bytes, length); - } - - void appendData_(NSData other) { - _lib._objc_msgSend_285(_id, _lib._sel_appendData_1, other._id); - } - - void increaseLengthBy_(int extraLength) { - _lib._objc_msgSend_470(_id, _lib._sel_increaseLengthBy_1, extraLength); - } - - void replaceBytesInRange_withBytes_( - _NSRange range, ffi.Pointer bytes) { - _lib._objc_msgSend_517( - _id, _lib._sel_replaceBytesInRange_withBytes_1, range, bytes); - } - - void resetBytesInRange_(_NSRange range) { - _lib._objc_msgSend_476(_id, _lib._sel_resetBytesInRange_1, range); - } - - void setData_(NSData data) { - _lib._objc_msgSend_285(_id, _lib._sel_setData_1, data._id); - } - - void replaceBytesInRange_withBytes_length_(_NSRange range, - ffi.Pointer replacementBytes, int replacementLength) { - _lib._objc_msgSend_518( - _id, - _lib._sel_replaceBytesInRange_withBytes_length_1, - range, - replacementBytes, - replacementLength); - } - - static NSMutableData? dataWithCapacity_(SwiftLibrary _lib, int aNumItems) { - final _ret = _lib._objc_msgSend_519( - _lib._class_NSMutableData1, _lib._sel_dataWithCapacity_1, aNumItems); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData? dataWithLength_(SwiftLibrary _lib, int length) { - final _ret = _lib._objc_msgSend_519( - _lib._class_NSMutableData1, _lib._sel_dataWithLength_1, length); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - NSMutableData? initWithCapacity_(int capacity) { - final _ret = - _lib._objc_msgSend_519(_id, _lib._sel_initWithCapacity_1, capacity); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - NSMutableData? initWithLength_(int length) { - final _ret = - _lib._objc_msgSend_519(_id, _lib._sel_initWithLength_1, length); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - bool decompressUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - return _lib._objc_msgSend_520( - _id, _lib._sel_decompressUsingAlgorithm_error_1, algorithm, error); - } - - bool compressUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - return _lib._objc_msgSend_520( - _id, _lib._sel_compressUsingAlgorithm_error_1, algorithm, error); - } - - static NSMutableData data(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_data1); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData dataWithBytes_length_( - SwiftLibrary _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_273(_lib._class_NSMutableData1, - _lib._sel_dataWithBytes_length_1, bytes, length); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData dataWithBytesNoCopy_length_( - SwiftLibrary _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_273(_lib._class_NSMutableData1, - _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - static NSMutableData dataWithBytesNoCopy_length_freeWhenDone_( - SwiftLibrary _lib, ffi.Pointer bytes, int length, bool b) { - final _ret = _lib._objc_msgSend_274(_lib._class_NSMutableData1, - _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - static NSMutableData? dataWithContentsOfFile_options_error_( - SwiftLibrary _lib, - NSString path, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_275( - _lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfFile_options_error_1, - path._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData? dataWithContentsOfURL_options_error_( - SwiftLibrary _lib, - NSURL url, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_276( - _lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfURL_options_error_1, - url._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData? dataWithContentsOfFile_( - SwiftLibrary _lib, NSString path) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData? dataWithContentsOfURL_(SwiftLibrary _lib, NSURL url) { - final _ret = _lib._objc_msgSend_277( - _lib._class_NSMutableData1, _lib._sel_dataWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData initWithBytes_length_(ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_273( - _id, _lib._sel_initWithBytes_length_1, bytes, length); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData initWithBytesNoCopy_length_( - ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_273( - _id, _lib._sel_initWithBytesNoCopy_length_1, bytes, length); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableData initWithBytesNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool b) { - final _ret = _lib._objc_msgSend_274(_id, - _lib._sel_initWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableData initWithBytesNoCopy_length_deallocator_( - ffi.Pointer bytes, - int length, - ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { - final _ret = _lib._objc_msgSend_278( - _id, - _lib._sel_initWithBytesNoCopy_length_deallocator_1, - bytes, - length, - deallocator?._id ?? ffi.nullptr); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableData? initWithContentsOfFile_options_error_(NSString path, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_275( - _id, - _lib._sel_initWithContentsOfFile_options_error_1, - path._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData? initWithContentsOfURL_options_error_(NSURL url, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_276( - _id, - _lib._sel_initWithContentsOfURL_options_error_1, - url._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData? initWithContentsOfFile_(NSString path) { - final _ret = _lib._objc_msgSend_38( - _id, _lib._sel_initWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_277(_id, _lib._sel_initWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData initWithData_(NSData data) { - final _ret = - _lib._objc_msgSend_279(_id, _lib._sel_initWithData_1, data._id); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData dataWithData_(SwiftLibrary _lib, NSData data) { - final _ret = _lib._objc_msgSend_279( - _lib._class_NSMutableData1, _lib._sel_dataWithData_1, data._id); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData? initWithBase64EncodedString_options_( - NSString base64String, int options) { - final _ret = _lib._objc_msgSend_280( - _id, - _lib._sel_initWithBase64EncodedString_options_1, - base64String._id, - options); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData? initWithBase64EncodedData_options_( - NSData base64Data, int options) { - final _ret = _lib._objc_msgSend_282(_id, - _lib._sel_initWithBase64EncodedData_options_1, base64Data._id, options); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData? decompressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_284(_id, - _lib._sel_decompressedDataUsingAlgorithm_error_1, algorithm, error); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData? compressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_284( - _id, _lib._sel_compressedDataUsingAlgorithm_error_1, algorithm, error); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSObject? dataWithContentsOfMappedFile_( - SwiftLibrary _lib, NSString path) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfMappedFile_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_new1); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - static NSMutableData allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMutableData1, _lib._sel_allocWithZone_1, zone); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - static NSMutableData alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_alloc1); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSMutableData1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSMutableData1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableData1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableData1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSMutableData1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSMutableData1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSMutableData1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSMutableData1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableData1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -abstract class NSPropertyListFormat { - static const int NSPropertyListOpenStepFormat = 1; - static const int NSPropertyListXMLFormat_v1_0 = 100; - static const int NSPropertyListBinaryFormat_v1_0 = 200; -} - -class NSThread extends NSObject { - NSThread._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSThread] that points to the same underlying object as [other]. - static NSThread castFrom(T other) { - return NSThread._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSThread] that wraps the given raw object pointer. - static NSThread castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSThread._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSThread]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSThread1); - } - - static NSThread getCurrentThread(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_531(_lib._class_NSThread1, _lib._sel_currentThread1); - return NSThread._(_ret, _lib, retain: true, release: true); - } - - static void detachNewThreadWithBlock_( - SwiftLibrary _lib, ObjCBlock_ffiVoid block) { - _lib._objc_msgSend_532( - _lib._class_NSThread1, _lib._sel_detachNewThreadWithBlock_1, block._id); - } - - static void detachNewThreadSelector_toTarget_withObject_(SwiftLibrary _lib, - ffi.Pointer selector, NSObject target, NSObject? argument) { - _lib._objc_msgSend_533( - _lib._class_NSThread1, - _lib._sel_detachNewThreadSelector_toTarget_withObject_1, - selector, - target._id, - argument?._id ?? ffi.nullptr); - } - - static bool isMultiThreaded(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSThread1, _lib._sel_isMultiThreaded1); - } - - NSMutableDictionary get threadDictionary { - final _ret = _lib._objc_msgSend_539(_id, _lib._sel_threadDictionary1); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static void sleepUntilDate_(SwiftLibrary _lib, NSDate date) { - _lib._objc_msgSend_540( - _lib._class_NSThread1, _lib._sel_sleepUntilDate_1, date._id); - } - - static void sleepForTimeInterval_(SwiftLibrary _lib, double ti) { - _lib._objc_msgSend_541( - _lib._class_NSThread1, _lib._sel_sleepForTimeInterval_1, ti); - } - - static void exit(SwiftLibrary _lib) { - _lib._objc_msgSend_1(_lib._class_NSThread1, _lib._sel_exit1); - } - - double get threadPriority { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_threadPriority1) - : _lib._objc_msgSend_165(_id, _lib._sel_threadPriority1); - } - - set threadPriority(double value) { - return _lib._objc_msgSend_542(_id, _lib._sel_setThreadPriority_1, value); - } - - int get qualityOfService { - return _lib._objc_msgSend_543(_id, _lib._sel_qualityOfService1); - } - - set qualityOfService(int value) { - return _lib._objc_msgSend_544(_id, _lib._sel_setQualityOfService_1, value); - } - - static NSArray getCallStackReturnAddresses(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSThread1, _lib._sel_callStackReturnAddresses1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray getCallStackSymbols(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSThread1, _lib._sel_callStackSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSString? get name { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_name1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - set name(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); - } - - int get stackSize { - return _lib._objc_msgSend_10(_id, _lib._sel_stackSize1); - } - - set stackSize(int value) { - return _lib._objc_msgSend_516(_id, _lib._sel_setStackSize_1, value); - } - - bool get isMainThread { - return _lib._objc_msgSend_12(_id, _lib._sel_isMainThread1); - } - - static NSThread getMainThread(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_531(_lib._class_NSThread1, _lib._sel_mainThread1); - return NSThread._(_ret, _lib, retain: true, release: true); - } - - @override - NSThread init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSThread._(_ret, _lib, retain: true, release: true); - } - - NSThread initWithTarget_selector_object_( - NSObject target, ffi.Pointer selector, NSObject? argument) { - final _ret = _lib._objc_msgSend_546( - _id, - _lib._sel_initWithTarget_selector_object_1, - target._id, - selector, - argument?._id ?? ffi.nullptr); - return NSThread._(_ret, _lib, retain: true, release: true); - } - - NSThread initWithBlock_(ObjCBlock_ffiVoid block) { - final _ret = - _lib._objc_msgSend_547(_id, _lib._sel_initWithBlock_1, block._id); - return NSThread._(_ret, _lib, retain: true, release: true); - } - - bool get executing { - return _lib._objc_msgSend_12(_id, _lib._sel_isExecuting1); - } - - bool get finished { - return _lib._objc_msgSend_12(_id, _lib._sel_isFinished1); - } - - bool get cancelled { - return _lib._objc_msgSend_12(_id, _lib._sel_isCancelled1); - } - - void cancel() { - _lib._objc_msgSend_1(_id, _lib._sel_cancel1); - } - - void start() { - _lib._objc_msgSend_1(_id, _lib._sel_start1); - } - - void main() { - _lib._objc_msgSend_1(_id, _lib._sel_main1); - } - - static NSThread new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSThread1, _lib._sel_new1); - return NSThread._(_ret, _lib, retain: false, release: true); - } - - static NSThread allocWithZone_(SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSThread1, _lib._sel_allocWithZone_1, zone); - return NSThread._(_ret, _lib, retain: false, release: true); - } - - static NSThread alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSThread1, _lib._sel_alloc1); - return NSThread._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSThread1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSThread1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSThread1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSThread1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSThread1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSThread1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSThread1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSThread1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSThread1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -void _ObjCBlock_ffiVoid_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, -) => - block.ref.target - .cast>() - .asFunction()(); -final _ObjCBlock_ffiVoid_closureRegistry = {}; -int _ObjCBlock_ffiVoid_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_registerClosure(void Function() fn) { - final id = ++_ObjCBlock_ffiVoid_closureRegistryIndex; - _ObjCBlock_ffiVoid_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, -) => - _ObjCBlock_ffiVoid_closureRegistry[block.ref.target.address]!(); - -class ObjCBlock_ffiVoid extends _ObjCBlockBase { - ObjCBlock_ffiVoid._(ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid._(pointer, lib, retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid.fromFunctionPointer(SwiftLibrary lib, - ffi.Pointer> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_ffiVoid_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid.fromFunction(SwiftLibrary lib, void Function() fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_ffiVoid_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_registerClosure(() => fn())), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid.listener(SwiftLibrary lib, void Function() fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>)>.listener( - _ObjCBlock_ffiVoid_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_registerClosure(() => fn())), - lib); - static ffi.NativeCallable)>? - _dartFuncListenerTrampoline; - - void call() => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>>() - .asFunction)>()( - _id, - ); -} - -class NSMutableDictionary extends NSDictionary { - NSMutableDictionary._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSMutableDictionary] that points to the same underlying object as [other]. - static NSMutableDictionary castFrom(T other) { - return NSMutableDictionary._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSMutableDictionary] that wraps the given raw object pointer. - static NSMutableDictionary castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableDictionary._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableDictionary]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableDictionary1); - } - - void removeObjectForKey_(NSObject aKey) { - _lib._objc_msgSend_15(_id, _lib._sel_removeObjectForKey_1, aKey._id); - } - - void setObject_forKey_(NSObject anObject, NSObject aKey) { - _lib._objc_msgSend_534( - _id, _lib._sel_setObject_forKey_1, anObject._id, aKey._id); - } - - @override - NSMutableDictionary init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - NSMutableDictionary initWithCapacity_(int numItems) { - final _ret = - _lib._objc_msgSend_65(_id, _lib._sel_initWithCapacity_1, numItems); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableDictionary? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - void addEntriesFromDictionary_(NSDictionary otherDictionary) { - _lib._objc_msgSend_509( - _id, _lib._sel_addEntriesFromDictionary_1, otherDictionary._id); - } - - void removeAllObjects() { - _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); - } - - void removeObjectsForKeys_(NSArray keyArray) { - _lib._objc_msgSend_472(_id, _lib._sel_removeObjectsForKeys_1, keyArray._id); - } - - void setDictionary_(NSDictionary otherDictionary) { - _lib._objc_msgSend_509(_id, _lib._sel_setDictionary_1, otherDictionary._id); - } - - void setObject_forKeyedSubscript_(NSObject? obj, NSObject key) { - _lib._objc_msgSend_535(_id, _lib._sel_setObject_forKeyedSubscript_1, - obj?._id ?? ffi.nullptr, key._id); - } - - static NSMutableDictionary dictionaryWithCapacity_( - SwiftLibrary _lib, int numItems) { - final _ret = _lib._objc_msgSend_65(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithCapacity_1, numItems); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary? dictionaryWithContentsOfFile_( - SwiftLibrary _lib, NSString path) { - final _ret = _lib._objc_msgSend_536(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary? dictionaryWithContentsOfURL_( - SwiftLibrary _lib, NSURL url) { - final _ret = _lib._objc_msgSend_537(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - NSMutableDictionary? initWithContentsOfFile_(NSString path) { - final _ret = _lib._objc_msgSend_536( - _id, _lib._sel_initWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - NSMutableDictionary? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_537(_id, _lib._sel_initWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithSharedKeySet_( - SwiftLibrary _lib, NSObject keyset) { - final _ret = _lib._objc_msgSend_538(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithSharedKeySet_1, keyset._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - void setValue_forKey_(NSObject? value, NSString key) { - _lib._objc_msgSend_135( - _id, _lib._sel_setValue_forKey_1, value?._id ?? ffi.nullptr, key._id); - } - - @override - NSMutableDictionary initWithObjects_forKeys_count_( - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _lib._objc_msgSend_147( - _id, _lib._sel_initWithObjects_forKeys_count_1, objects, keys, cnt); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionary(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableDictionary1, _lib._sel_dictionary1); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObject_forKey_( - SwiftLibrary _lib, NSObject object, NSObject key) { - final _ret = _lib._objc_msgSend_158(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObjects_forKeys_count_( - SwiftLibrary _lib, - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _lib._objc_msgSend_147(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObjectsAndKeys_( - SwiftLibrary _lib, NSObject firstObject) { - final _ret = _lib._objc_msgSend_124(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithDictionary_( - SwiftLibrary _lib, NSDictionary dict) { - final _ret = _lib._objc_msgSend_159(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithDictionary_1, dict._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObjects_forKeys_( - SwiftLibrary _lib, NSArray objects, NSArray keys) { - final _ret = _lib._objc_msgSend_160(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_1, objects._id, keys._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableDictionary initWithObjectsAndKeys_(NSObject firstObject) { - final _ret = _lib._objc_msgSend_124( - _id, _lib._sel_initWithObjectsAndKeys_1, firstObject._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableDictionary initWithDictionary_(NSDictionary otherDictionary) { - final _ret = _lib._objc_msgSend_159( - _id, _lib._sel_initWithDictionary_1, otherDictionary._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableDictionary initWithDictionary_copyItems_( - NSDictionary otherDictionary, bool flag) { - final _ret = _lib._objc_msgSend_161(_id, - _lib._sel_initWithDictionary_copyItems_1, otherDictionary._id, flag); - return NSMutableDictionary._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableDictionary initWithObjects_forKeys_(NSArray objects, NSArray keys) { - final _ret = _lib._objc_msgSend_160( - _id, _lib._sel_initWithObjects_forKeys_1, objects._id, keys._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary? dictionaryWithContentsOfURL_error_(SwiftLibrary _lib, - NSURL url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_162(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithContentsOfURL_error_1, url._id, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSObject sharedKeySetForKeys_(SwiftLibrary _lib, NSArray keys) { - final _ret = _lib._objc_msgSend_125(_lib._class_NSMutableDictionary1, - _lib._sel_sharedKeySetForKeys_1, keys._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableDictionary1, _lib._sel_new1); - return NSMutableDictionary._(_ret, _lib, retain: false, release: true); - } - - static NSMutableDictionary allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMutableDictionary1, _lib._sel_allocWithZone_1, zone); - return NSMutableDictionary._(_ret, _lib, retain: false, release: true); - } - - static NSMutableDictionary alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableDictionary1, _lib._sel_alloc1); - return NSMutableDictionary._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSMutableDictionary1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSMutableDictionary1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSMutableDictionary1, - _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableDictionary1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSMutableDictionary1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSMutableDictionary1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSMutableDictionary1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSMutableDictionary1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableDictionary1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_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; -} - -class NSArchiver extends NSCoder { - NSArchiver._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSArchiver] that points to the same underlying object as [other]. - static NSArchiver castFrom(T other) { - return NSArchiver._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSArchiver] that wraps the given raw object pointer. - static NSArchiver castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSArchiver._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSArchiver]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSArchiver1); - } - - NSArchiver initForWritingWithMutableData_(NSMutableData mdata) { - final _ret = _lib._objc_msgSend_521( - _id, _lib._sel_initForWritingWithMutableData_1, mdata._id); - return NSArchiver._(_ret, _lib, retain: true, release: true); - } - - NSMutableData get archiverData { - final _ret = _lib._objc_msgSend_550(_id, _lib._sel_archiverData1); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - void encodeRootObject_(NSObject rootObject) { - _lib._objc_msgSend_15(_id, _lib._sel_encodeRootObject_1, rootObject._id); - } - - @override - void encodeConditionalObject_(NSObject? object) { - _lib._objc_msgSend_289( - _id, _lib._sel_encodeConditionalObject_1, object?._id ?? ffi.nullptr); - } - - static NSData archivedDataWithRootObject_( - SwiftLibrary _lib, NSObject rootObject) { - final _ret = _lib._objc_msgSend_522(_lib._class_NSArchiver1, - _lib._sel_archivedDataWithRootObject_1, rootObject._id); - return NSData._(_ret, _lib, retain: true, release: true); - } - - static bool archiveRootObject_toFile_( - SwiftLibrary _lib, NSObject rootObject, NSString path) { - return _lib._objc_msgSend_261(_lib._class_NSArchiver1, - _lib._sel_archiveRootObject_toFile_1, rootObject._id, path._id); - } - - void encodeClassName_intoClassName_( - NSString trueName, NSString inArchiveName) { - _lib._objc_msgSend_551(_id, _lib._sel_encodeClassName_intoClassName_1, - trueName._id, inArchiveName._id); - } - - NSString? classNameEncodedForTrueClassName_(NSString trueName) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_classNameEncodedForTrueClassName_1, trueName._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - void replaceObject_withObject_(NSObject object, NSObject newObject) { - _lib._objc_msgSend_534( - _id, _lib._sel_replaceObject_withObject_1, object._id, newObject._id); - } - - @override - NSArchiver init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSArchiver._(_ret, _lib, retain: true, release: true); - } - - static NSArchiver new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArchiver1, _lib._sel_new1); - return NSArchiver._(_ret, _lib, retain: false, release: true); - } - - static NSArchiver allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSArchiver1, _lib._sel_allocWithZone_1, zone); - return NSArchiver._(_ret, _lib, retain: false, release: true); - } - - static NSArchiver alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSArchiver1, _lib._sel_alloc1); - return NSArchiver._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSArchiver1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSArchiver1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSArchiver1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSArchiver1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSArchiver1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSArchiver1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSArchiver1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSArchiver1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSArchiver1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSPortCoder extends NSCoder { - NSPortCoder._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSPortCoder] that points to the same underlying object as [other]. - static NSPortCoder castFrom(T other) { - return NSPortCoder._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSPortCoder] that wraps the given raw object pointer. - static NSPortCoder castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPortCoder._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSPortCoder]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSPortCoder1); - } - - bool isBycopy() { - return _lib._objc_msgSend_12(_id, _lib._sel_isBycopy1); - } - - bool isByref() { - return _lib._objc_msgSend_12(_id, _lib._sel_isByref1); - } - - void encodePortObject_(NSPort aport) { - _lib._objc_msgSend_593(_id, _lib._sel_encodePortObject_1, aport._id); - } - - NSPort? decodePortObject() { - final _ret = _lib._objc_msgSend_594(_id, _lib._sel_decodePortObject1); - return _ret.address == 0 - ? null - : NSPort._(_ret, _lib, retain: true, release: true); - } - - NSConnection? connection() { - final _ret = _lib._objc_msgSend_595(_id, _lib._sel_connection1); - return _ret.address == 0 - ? null - : NSConnection._(_ret, _lib, retain: true, release: true); - } - - static NSObject portCoderWithReceivePort_sendPort_components_( - SwiftLibrary _lib, NSPort? rcvPort, NSPort? sndPort, NSArray? comps) { - final _ret = _lib._objc_msgSend_596( - _lib._class_NSPortCoder1, - _lib._sel_portCoderWithReceivePort_sendPort_components_1, - rcvPort?._id ?? ffi.nullptr, - sndPort?._id ?? ffi.nullptr, - comps?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject initWithReceivePort_sendPort_components_( - NSPort? rcvPort, NSPort? sndPort, NSArray? comps) { - final _ret = _lib._objc_msgSend_596( - _id, - _lib._sel_initWithReceivePort_sendPort_components_1, - rcvPort?._id ?? ffi.nullptr, - sndPort?._id ?? ffi.nullptr, - comps?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - void dispatch() { - _lib._objc_msgSend_1(_id, _lib._sel_dispatch1); - } - - @override - NSPortCoder init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSPortCoder._(_ret, _lib, retain: true, release: true); - } - - static NSPortCoder new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSPortCoder1, _lib._sel_new1); - return NSPortCoder._(_ret, _lib, retain: false, release: true); - } - - static NSPortCoder allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSPortCoder1, _lib._sel_allocWithZone_1, zone); - return NSPortCoder._(_ret, _lib, retain: false, release: true); - } - - static NSPortCoder alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPortCoder1, _lib._sel_alloc1); - return NSPortCoder._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSPortCoder1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSPortCoder1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSPortCoder1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSPortCoder1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSPortCoder1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSPortCoder1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSPortCoder1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSPortCoder1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSPortCoder1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSPort extends NSObject { - NSPort._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSPort] that points to the same underlying object as [other]. - static NSPort castFrom(T other) { - return NSPort._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSPort] that wraps the given raw object pointer. - static NSPort castFromPointer(SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPort._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSPort]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSPort1); - } - - static NSPort port(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_553(_lib._class_NSPort1, _lib._sel_port1); - return NSPort._(_ret, _lib, retain: true, release: true); - } - - void invalidate() { - _lib._objc_msgSend_1(_id, _lib._sel_invalidate1); - } - - bool get valid { - return _lib._objc_msgSend_12(_id, _lib._sel_isValid1); - } - - void setDelegate_(NSObject? anObject) { - _lib._objc_msgSend_289( - _id, _lib._sel_setDelegate_1, anObject?._id ?? ffi.nullptr); - } - - NSObject? delegate() { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void scheduleInRunLoop_forMode_(NSRunLoop runLoop, NSString mode) { - _lib._objc_msgSend_569( - _id, _lib._sel_scheduleInRunLoop_forMode_1, runLoop._id, mode._id); - } - - void removeFromRunLoop_forMode_(NSRunLoop runLoop, NSString mode) { - _lib._objc_msgSend_569( - _id, _lib._sel_removeFromRunLoop_forMode_1, runLoop._id, mode._id); - } - - int get reservedSpaceLength { - return _lib._objc_msgSend_10(_id, _lib._sel_reservedSpaceLength1); - } - - bool sendBeforeDate_components_from_reserved_( - NSDate limitDate, - NSMutableArray? components, - NSPort? receivePort, - int headerSpaceReserved) { - return _lib._objc_msgSend_570( - _id, - _lib._sel_sendBeforeDate_components_from_reserved_1, - limitDate._id, - components?._id ?? ffi.nullptr, - receivePort?._id ?? ffi.nullptr, - headerSpaceReserved); - } - - bool sendBeforeDate_msgid_components_from_reserved_( - NSDate limitDate, - int msgID, - NSMutableArray? components, - NSPort? receivePort, - int headerSpaceReserved) { - return _lib._objc_msgSend_571( - _id, - _lib._sel_sendBeforeDate_msgid_components_from_reserved_1, - limitDate._id, - msgID, - components?._id ?? ffi.nullptr, - receivePort?._id ?? ffi.nullptr, - headerSpaceReserved); - } - - void addConnection_toRunLoop_forMode_( - NSConnection conn, NSRunLoop runLoop, NSString mode) { - _lib._objc_msgSend_592(_id, _lib._sel_addConnection_toRunLoop_forMode_1, - conn._id, runLoop._id, mode._id); - } - - void removeConnection_fromRunLoop_forMode_( - NSConnection conn, NSRunLoop runLoop, NSString mode) { - _lib._objc_msgSend_592( - _id, - _lib._sel_removeConnection_fromRunLoop_forMode_1, - conn._id, - runLoop._id, - mode._id); - } - - @override - NSPort init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSPort._(_ret, _lib, retain: true, release: true); - } - - static NSPort new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSPort1, _lib._sel_new1); - return NSPort._(_ret, _lib, retain: false, release: true); - } - - static NSPort allocWithZone_(SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSPort1, _lib._sel_allocWithZone_1, zone); - return NSPort._(_ret, _lib, retain: false, release: true); - } - - static NSPort alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSPort1, _lib._sel_alloc1); - return NSPort._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSPort1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSPort1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSPort1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSPort1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSPort1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSPort1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSPort1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSPort1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSPort1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSRunLoop extends NSObject { - NSRunLoop._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSRunLoop] that points to the same underlying object as [other]. - static NSRunLoop castFrom(T other) { - return NSRunLoop._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSRunLoop] that wraps the given raw object pointer. - static NSRunLoop castFromPointer( - SwiftLibrary 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); - } - - static NSRunLoop getCurrentRunLoop(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_554( - _lib._class_NSRunLoop1, _lib._sel_currentRunLoop1); - return NSRunLoop._(_ret, _lib, retain: true, release: true); - } - - static NSRunLoop getMainRunLoop(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_554(_lib._class_NSRunLoop1, _lib._sel_mainRunLoop1); - return NSRunLoop._(_ret, _lib, retain: true, release: true); - } - - NSString? get currentMode { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_currentMode1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - ffi.Pointer<__CFRunLoop> getCFRunLoop() { - return _lib._objc_msgSend_555(_id, _lib._sel_getCFRunLoop1); - } - - void addTimer_forMode_(NSTimer timer, NSString mode) { - _lib._objc_msgSend_562( - _id, _lib._sel_addTimer_forMode_1, timer._id, mode._id); - } - - void addPort_forMode_(NSPort aPort, NSString mode) { - _lib._objc_msgSend_563( - _id, _lib._sel_addPort_forMode_1, aPort._id, mode._id); - } - - void removePort_forMode_(NSPort aPort, NSString mode) { - _lib._objc_msgSend_563( - _id, _lib._sel_removePort_forMode_1, aPort._id, mode._id); - } - - NSDate? limitDateForMode_(NSString mode) { - final _ret = - _lib._objc_msgSend_564(_id, _lib._sel_limitDateForMode_1, mode._id); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - void acceptInputForMode_beforeDate_(NSString mode, NSDate limitDate) { - _lib._objc_msgSend_565(_id, _lib._sel_acceptInputForMode_beforeDate_1, - mode._id, limitDate._id); - } - - void run() { - _lib._objc_msgSend_1(_id, _lib._sel_run1); - } - - void runUntilDate_(NSDate limitDate) { - _lib._objc_msgSend_540(_id, _lib._sel_runUntilDate_1, limitDate._id); - } - - bool runMode_beforeDate_(NSString mode, NSDate limitDate) { - return _lib._objc_msgSend_566( - _id, _lib._sel_runMode_beforeDate_1, mode._id, limitDate._id); - } - - void configureAsServer() { - _lib._objc_msgSend_1(_id, _lib._sel_configureAsServer1); - } - - void performInModes_block_(NSArray modes, ObjCBlock_ffiVoid block) { - _lib._objc_msgSend_567( - _id, _lib._sel_performInModes_block_1, modes._id, block._id); - } - - void performBlock_(ObjCBlock_ffiVoid block) { - _lib._objc_msgSend_532(_id, _lib._sel_performBlock_1, block._id); - } - - void performSelector_target_argument_order_modes_( - ffi.Pointer aSelector, - NSObject target, - NSObject? arg, - int order, - NSArray modes) { - _lib._objc_msgSend_568( - _id, - _lib._sel_performSelector_target_argument_order_modes_1, - aSelector, - target._id, - arg?._id ?? ffi.nullptr, - order, - modes._id); - } - - void cancelPerformSelector_target_argument_( - ffi.Pointer aSelector, NSObject target, NSObject? arg) { - _lib._objc_msgSend_533( - _id, - _lib._sel_cancelPerformSelector_target_argument_1, - aSelector, - target._id, - arg?._id ?? ffi.nullptr); - } - - void cancelPerformSelectorsWithTarget_(NSObject target) { - _lib._objc_msgSend_15( - _id, _lib._sel_cancelPerformSelectorsWithTarget_1, target._id); - } - - @override - NSRunLoop init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSRunLoop._(_ret, _lib, retain: true, release: true); - } - - static NSRunLoop new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSRunLoop1, _lib._sel_new1); - return NSRunLoop._(_ret, _lib, retain: false, release: true); - } - - static NSRunLoop allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSRunLoop1, _lib._sel_allocWithZone_1, zone); - return NSRunLoop._(_ret, _lib, retain: false, release: true); - } - - static NSRunLoop alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSRunLoop1, _lib._sel_alloc1); - return NSRunLoop._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSRunLoop1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSRunLoop1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSRunLoop1, _lib._sel_accessInstanceVariablesDirectly1); - } - - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSRunLoop1, _lib._sel_useStoredAccessor1); - } - - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSRunLoop1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSRunLoop1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSRunLoop1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSRunLoop1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSRunLoop1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -final class __CFRunLoop extends ffi.Opaque {} - -class NSTimer extends NSObject { - NSTimer._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSTimer] that points to the same underlying object as [other]. - static NSTimer castFrom(T other) { - return NSTimer._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSTimer] that wraps the given raw object pointer. - static NSTimer castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSTimer._(other, lib, retain: retain, release: release); - } +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. - /// Returns whether [obj] is an instance of [NSTimer]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSTimer1); - } - - static NSTimer timerWithTimeInterval_invocation_repeats_( - SwiftLibrary _lib, double ti, NSInvocation invocation, bool yesOrNo) { - final _ret = _lib._objc_msgSend_556( - _lib._class_NSTimer1, - _lib._sel_timerWithTimeInterval_invocation_repeats_1, - ti, - invocation._id, - yesOrNo); - return NSTimer._(_ret, _lib, retain: true, release: true); - } - - static NSTimer scheduledTimerWithTimeInterval_invocation_repeats_( - SwiftLibrary _lib, double ti, NSInvocation invocation, bool yesOrNo) { - final _ret = _lib._objc_msgSend_556( - _lib._class_NSTimer1, - _lib._sel_scheduledTimerWithTimeInterval_invocation_repeats_1, - ti, - invocation._id, - yesOrNo); - return NSTimer._(_ret, _lib, retain: true, release: true); - } - - static NSTimer timerWithTimeInterval_target_selector_userInfo_repeats_( - SwiftLibrary _lib, - double ti, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? userInfo, - bool yesOrNo) { - final _ret = _lib._objc_msgSend_557( - _lib._class_NSTimer1, - _lib._sel_timerWithTimeInterval_target_selector_userInfo_repeats_1, - ti, - aTarget._id, - aSelector, - userInfo?._id ?? ffi.nullptr, - yesOrNo); - return NSTimer._(_ret, _lib, retain: true, release: true); - } - - static NSTimer - scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_( - SwiftLibrary _lib, - double ti, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? userInfo, - bool yesOrNo) { - final _ret = _lib._objc_msgSend_557( - _lib._class_NSTimer1, - _lib._sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_1, - ti, - aTarget._id, - aSelector, - userInfo?._id ?? ffi.nullptr, - yesOrNo); - return NSTimer._(_ret, _lib, retain: true, release: true); - } - - static NSTimer timerWithTimeInterval_repeats_block_(SwiftLibrary _lib, - double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { - final _ret = _lib._objc_msgSend_558( - _lib._class_NSTimer1, - _lib._sel_timerWithTimeInterval_repeats_block_1, - interval, - repeats, - block._id); - return NSTimer._(_ret, _lib, retain: true, release: true); - } - - static NSTimer scheduledTimerWithTimeInterval_repeats_block_( - SwiftLibrary _lib, - double interval, - bool repeats, - ObjCBlock_ffiVoid_NSTimer block) { - final _ret = _lib._objc_msgSend_558( - _lib._class_NSTimer1, - _lib._sel_scheduledTimerWithTimeInterval_repeats_block_1, - interval, - repeats, - block._id); - return NSTimer._(_ret, _lib, retain: true, release: true); - } - - NSTimer initWithFireDate_interval_repeats_block_(NSDate date, double interval, - bool repeats, ObjCBlock_ffiVoid_NSTimer block) { - final _ret = _lib._objc_msgSend_559( - _id, - _lib._sel_initWithFireDate_interval_repeats_block_1, - date._id, - interval, - repeats, - block._id); - return NSTimer._(_ret, _lib, retain: true, release: true); - } - - NSTimer initWithFireDate_interval_target_selector_userInfo_repeats_( - NSDate date, - double ti, - NSObject t, - ffi.Pointer s, - NSObject? ui, - bool rep) { - final _ret = _lib._objc_msgSend_560( - _id, - _lib._sel_initWithFireDate_interval_target_selector_userInfo_repeats_1, - date._id, - ti, - t._id, - s, - ui?._id ?? ffi.nullptr, - rep); - return NSTimer._(_ret, _lib, retain: true, release: true); - } +// ignore_for_file: camel_case_types, non_constant_identifier_names +// ignore_for_file: unused_element, unused_field, return_of_invalid_type +// ignore_for_file: void_checks, annotate_overrides +// ignore_for_file: no_leading_underscores_for_local_identifiers +// ignore_for_file: library_private_types_in_public_api - void fire() { - _lib._objc_msgSend_1(_id, _lib._sel_fire1); - } +// AUTO GENERATED FILE, DO NOT EDIT. +// +// Generated by `package:ffigen`. +// ignore_for_file: type=lint +import 'package:ffi/ffi.dart' as pkg_ffi; +import 'package:objective_c/objective_c.dart' as objc; +import 'dart:ffi' as ffi; - NSDate get fireDate { - final _ret = _lib._objc_msgSend_172(_id, _lib._sel_fireDate1); - return NSDate._(_ret, _lib, retain: true, release: true); - } +abstract class NSBinarySearchingOptions { + static const int NSBinarySearchingFirstEqual = 256; + static const int NSBinarySearchingLastEqual = 512; + static const int NSBinarySearchingInsertionIndex = 1024; +} - set fireDate(NSDate value) { - return _lib._objc_msgSend_561(_id, _lib._sel_setFireDate_1, value._id); - } +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; +} - double get timeInterval { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_timeInterval1) - : _lib._objc_msgSend_165(_id, _lib._sel_timeInterval1); - } +class NSBundle extends objc.NSObject { + NSBundle._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - double get tolerance { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_tolerance1) - : _lib._objc_msgSend_165(_id, _lib._sel_tolerance1); - } + /// Constructs a [NSBundle] that points to the same underlying object as [other]. + NSBundle.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - set tolerance(double value) { - return _lib._objc_msgSend_542(_id, _lib._sel_setTolerance_1, value); - } + /// Constructs a [NSBundle] that wraps the given raw object pointer. + NSBundle.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - void invalidate() { - _lib._objc_msgSend_1(_id, _lib._sel_invalidate1); + /// Returns whether [obj] is an instance of [NSBundle]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSBundle); } - bool get valid { - return _lib._objc_msgSend_12(_id, _lib._sel_isValid1); + static NSBundle getMainBundle() { + final _ret = _objc_msgSend_1(_class_NSBundle, _sel_mainBundle); + return NSBundle.castFromPointer(_ret, retain: true, release: true); } - NSObject? get userInfo { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_userInfo1); + static NSBundle? bundleWithPath_(objc.NSString path) { + final _ret = + _objc_msgSend_2(_class_NSBundle, _sel_bundleWithPath_, path.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - @override - NSTimer init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSTimer._(_ret, _lib, retain: true, release: true); - } - - static NSTimer new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSTimer1, _lib._sel_new1); - return NSTimer._(_ret, _lib, retain: false, release: true); - } - - static NSTimer allocWithZone_(SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSTimer1, _lib._sel_allocWithZone_1, zone); - return NSTimer._(_ret, _lib, retain: false, release: true); - } - - static NSTimer alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSTimer1, _lib._sel_alloc1); - return NSTimer._(_ret, _lib, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSTimer1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSTimer1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } - - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSTimer1, _lib._sel_accessInstanceVariablesDirectly1); + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSTimer1, _lib._sel_useStoredAccessor1); + NSBundle? initWithPath_(objc.NSString path) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_initWithPath_, path.pointer); + return _ret.address == 0 + ? null + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSTimer1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static NSBundle? bundleWithURL_(objc.NSURL url) { + final _ret = + _objc_msgSend_3(_class_NSBundle, _sel_bundleWithURL_, url.pointer); + return _ret.address == 0 + ? null + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSTimer1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + NSBundle? initWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_3(this.pointer, _sel_initWithURL_, url.pointer); + return _ret.address == 0 + ? null + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSTimer1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static NSBundle bundleForClass_(objc.NSObject aClass) { + final _ret = + _objc_msgSend_4(_class_NSBundle, _sel_bundleForClass_, aClass.pointer); + return NSBundle.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSTimer1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSBundle? bundleWithIdentifier_(objc.NSString identifier) { + final _ret = _objc_msgSend_5( + _class_NSBundle, _sel_bundleWithIdentifier_, identifier.pointer); + return _ret.address == 0 + ? null + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSTimer1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSArray getAllBundles() { + final _ret = _objc_msgSend_6(_class_NSBundle, _sel_allBundles); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } -} - -void _ObjCBlock_ffiVoid_NSTimer_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSTimer_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSTimer_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSTimer_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSTimer_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSTimer_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSTimer_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSTimer_closureRegistry[block.ref.target.address]!(arg0); -class ObjCBlock_ffiVoid_NSTimer extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSTimer._(ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSTimer castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSTimer._(pointer, lib, - retain: retain, release: release); + static objc.NSArray getAllFrameworks() { + final _ret = _objc_msgSend_6(_class_NSBundle, _sel_allFrameworks); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSTimer.fromFunctionPointer( - SwiftLibrary 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>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTimer_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSTimer.fromFunction( - SwiftLibrary lib, void Function(NSTimer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTimer_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSTimer_registerClosure( - (ffi.Pointer arg0) => - fn(NSTimer._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSTimer.listener( - SwiftLibrary lib, void Function(NSTimer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSTimer_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSTimer_registerClosure( - (ffi.Pointer arg0) => - fn(NSTimer._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(NSTimer arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0._id); -} - -class NSConnection extends NSObject { - NSConnection._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSConnection] that points to the same underlying object as [other]. - static NSConnection castFrom(T other) { - return NSConnection._(other._id, other._lib, retain: true, release: true); + bool load() { + return _objc_msgSend_7(this.pointer, _sel_load); } - /// Returns a [NSConnection] that wraps the given raw object pointer. - static NSConnection castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSConnection._(other, lib, retain: retain, release: release); + bool get loaded { + return _objc_msgSend_7(this.pointer, _sel_isLoaded); } - /// Returns whether [obj] is an instance of [NSConnection]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSConnection1); + bool unload() { + return _objc_msgSend_7(this.pointer, _sel_unload); } - NSDictionary get statistics { - final _ret = _lib._objc_msgSend_181(_id, _lib._sel_statistics1); - return NSDictionary._(_ret, _lib, retain: true, release: true); + bool preflightAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_8(this.pointer, _sel_preflightAndReturnError_, error); } - static NSArray allConnections(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSConnection1, _lib._sel_allConnections1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool loadAndReturnError_(ffi.Pointer> error) { + return _objc_msgSend_8(this.pointer, _sel_loadAndReturnError_, error); } - static NSConnection defaultConnection(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_572( - _lib._class_NSConnection1, _lib._sel_defaultConnection1); - return NSConnection._(_ret, _lib, retain: true, release: true); + objc.NSURL get bundleURL { + final _ret = _objc_msgSend_9(this.pointer, _sel_bundleURL); + return objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - static NSConnection? connectionWithRegisteredName_host_( - SwiftLibrary _lib, NSString name, NSString? hostName) { - final _ret = _lib._objc_msgSend_573( - _lib._class_NSConnection1, - _lib._sel_connectionWithRegisteredName_host_1, - name._id, - hostName?._id ?? ffi.nullptr); + objc.NSURL? get resourceURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_resourceURL); return _ret.address == 0 ? null - : NSConnection._(_ret, _lib, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - static NSConnection? connectionWithRegisteredName_host_usingNameServer_( - SwiftLibrary _lib, - NSString name, - NSString? hostName, - NSPortNameServer server) { - final _ret = _lib._objc_msgSend_578( - _lib._class_NSConnection1, - _lib._sel_connectionWithRegisteredName_host_usingNameServer_1, - name._id, - hostName?._id ?? ffi.nullptr, - server._id); + objc.NSURL? get executableURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_executableURL); return _ret.address == 0 ? null - : NSConnection._(_ret, _lib, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - static NSDistantObject? rootProxyForConnectionWithRegisteredName_host_( - SwiftLibrary _lib, NSString name, NSString? hostName) { - final _ret = _lib._objc_msgSend_583( - _lib._class_NSConnection1, - _lib._sel_rootProxyForConnectionWithRegisteredName_host_1, - name._id, - hostName?._id ?? ffi.nullptr); + objc.NSURL? URLForAuxiliaryExecutable_(objc.NSString executableName) { + final _ret = _objc_msgSend_11( + this.pointer, _sel_URLForAuxiliaryExecutable_, executableName.pointer); return _ret.address == 0 ? null - : NSDistantObject._(_ret, _lib, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - static NSDistantObject? - rootProxyForConnectionWithRegisteredName_host_usingNameServer_( - SwiftLibrary _lib, - NSString name, - NSString? hostName, - NSPortNameServer server) { - final _ret = _lib._objc_msgSend_584( - _lib._class_NSConnection1, - _lib._sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_1, - name._id, - hostName?._id ?? ffi.nullptr, - server._id); + objc.NSURL? get privateFrameworksURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_privateFrameworksURL); return _ret.address == 0 ? null - : NSDistantObject._(_ret, _lib, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - static NSConnection? serviceConnectionWithName_rootObject_usingNameServer_( - SwiftLibrary _lib, - NSString name, - NSObject root, - NSPortNameServer server) { - final _ret = _lib._objc_msgSend_585( - _lib._class_NSConnection1, - _lib._sel_serviceConnectionWithName_rootObject_usingNameServer_1, - name._id, - root._id, - server._id); + objc.NSURL? get sharedFrameworksURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_sharedFrameworksURL); return _ret.address == 0 ? null - : NSConnection._(_ret, _lib, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - static NSConnection? serviceConnectionWithName_rootObject_( - SwiftLibrary _lib, NSString name, NSObject root) { - final _ret = _lib._objc_msgSend_586(_lib._class_NSConnection1, - _lib._sel_serviceConnectionWithName_rootObject_1, name._id, root._id); + objc.NSURL? get sharedSupportURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_sharedSupportURL); return _ret.address == 0 ? null - : NSConnection._(_ret, _lib, retain: true, release: true); - } - - double get requestTimeout { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_requestTimeout1) - : _lib._objc_msgSend_165(_id, _lib._sel_requestTimeout1); - } - - set requestTimeout(double value) { - return _lib._objc_msgSend_542(_id, _lib._sel_setRequestTimeout_1, value); - } - - double get replyTimeout { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_replyTimeout1) - : _lib._objc_msgSend_165(_id, _lib._sel_replyTimeout1); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - set replyTimeout(double value) { - return _lib._objc_msgSend_542(_id, _lib._sel_setReplyTimeout_1, value); - } - - NSObject? get rootObject { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_rootObject1); + objc.NSURL? get builtInPlugInsURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_builtInPlugInsURL); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - set rootObject(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setRootObject_1, value?._id ?? ffi.nullptr); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSObject? get delegate { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); + objc.NSURL? get appStoreReceiptURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_appStoreReceiptURL); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - set delegate(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); - } - - bool get independentConversationQueueing { - return _lib._objc_msgSend_12( - _id, _lib._sel_independentConversationQueueing1); - } - - set independentConversationQueueing(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setIndependentConversationQueueing_1, value); - } - - bool get valid { - return _lib._objc_msgSend_12(_id, _lib._sel_isValid1); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSDistantObject get rootProxy { - final _ret = _lib._objc_msgSend_587(_id, _lib._sel_rootProxy1); - return NSDistantObject._(_ret, _lib, retain: true, release: true); - } - - void invalidate() { - _lib._objc_msgSend_1(_id, _lib._sel_invalidate1); - } - - void addRequestMode_(NSString rmode) { - _lib._objc_msgSend_247(_id, _lib._sel_addRequestMode_1, rmode._id); - } - - void removeRequestMode_(NSString rmode) { - _lib._objc_msgSend_247(_id, _lib._sel_removeRequestMode_1, rmode._id); + objc.NSString get bundlePath { + final _ret = _objc_msgSend_12(this.pointer, _sel_bundlePath); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSArray get requestModes { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_requestModes1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - bool registerName_(NSString? name) { - return _lib._objc_msgSend_588( - _id, _lib._sel_registerName_1, name?._id ?? ffi.nullptr); - } - - bool registerName_withNameServer_(NSString? name, NSPortNameServer server) { - return _lib._objc_msgSend_589(_id, _lib._sel_registerName_withNameServer_1, - name?._id ?? ffi.nullptr, server._id); - } - - static NSConnection? connectionWithReceivePort_sendPort_( - SwiftLibrary _lib, NSPort? receivePort, NSPort? sendPort) { - final _ret = _lib._objc_msgSend_590( - _lib._class_NSConnection1, - _lib._sel_connectionWithReceivePort_sendPort_1, - receivePort?._id ?? ffi.nullptr, - sendPort?._id ?? ffi.nullptr); + objc.NSString? get resourcePath { + final _ret = _objc_msgSend_13(this.pointer, _sel_resourcePath); return _ret.address == 0 ? null - : NSConnection._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject? currentConversation(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_17( - _lib._class_NSConnection1, _lib._sel_currentConversation1); + objc.NSString? get executablePath { + final _ret = _objc_msgSend_13(this.pointer, _sel_executablePath); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSConnection? initWithReceivePort_sendPort_( - NSPort? receivePort, NSPort? sendPort) { - final _ret = _lib._objc_msgSend_590( - _id, - _lib._sel_initWithReceivePort_sendPort_1, - receivePort?._id ?? ffi.nullptr, - sendPort?._id ?? ffi.nullptr); + objc.NSString? pathForAuxiliaryExecutable_(objc.NSString executableName) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_pathForAuxiliaryExecutable_, executableName.pointer); return _ret.address == 0 ? null - : NSConnection._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSPort get sendPort { - final _ret = _lib._objc_msgSend_553(_id, _lib._sel_sendPort1); - return NSPort._(_ret, _lib, retain: true, release: true); + objc.NSString? get privateFrameworksPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_privateFrameworksPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSPort get receivePort { - final _ret = _lib._objc_msgSend_553(_id, _lib._sel_receivePort1); - return NSPort._(_ret, _lib, retain: true, release: true); + objc.NSString? get sharedFrameworksPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_sharedFrameworksPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void enableMultipleThreads() { - _lib._objc_msgSend_1(_id, _lib._sel_enableMultipleThreads1); + objc.NSString? get sharedSupportPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_sharedSupportPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool get multipleThreadsEnabled { - return _lib._objc_msgSend_12(_id, _lib._sel_multipleThreadsEnabled1); + objc.NSString? get builtInPlugInsPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_builtInPlugInsPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void addRunLoop_(NSRunLoop runloop) { - _lib._objc_msgSend_591(_id, _lib._sel_addRunLoop_1, runloop._id); + static objc.NSURL? URLForResource_withExtension_subdirectory_inBundleWithURL_( + objc.NSString? name, + objc.NSString? ext, + objc.NSString? subpath, + objc.NSURL bundleURL) { + final _ret = _objc_msgSend_15( + _class_NSBundle, + _sel_URLForResource_withExtension_subdirectory_inBundleWithURL_, + name?.pointer ?? ffi.nullptr, + ext?.pointer ?? ffi.nullptr, + subpath?.pointer ?? ffi.nullptr, + bundleURL.pointer); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void removeRunLoop_(NSRunLoop runloop) { - _lib._objc_msgSend_591(_id, _lib._sel_removeRunLoop_1, runloop._id); + static objc.NSArray? + URLsForResourcesWithExtension_subdirectory_inBundleWithURL_( + objc.NSString? ext, objc.NSString? subpath, objc.NSURL bundleURL) { + final _ret = _objc_msgSend_16( + _class_NSBundle, + _sel_URLsForResourcesWithExtension_subdirectory_inBundleWithURL_, + ext?.pointer ?? ffi.nullptr, + subpath?.pointer ?? ffi.nullptr, + bundleURL.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void runInNewThread() { - _lib._objc_msgSend_1(_id, _lib._sel_runInNewThread1); + objc.NSURL? URLForResource_withExtension_( + objc.NSString? name, objc.NSString? ext) { + final _ret = _objc_msgSend_17( + this.pointer, + _sel_URLForResource_withExtension_, + name?.pointer ?? ffi.nullptr, + ext?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSArray get remoteObjects { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_remoteObjects1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSURL? URLForResource_withExtension_subdirectory_( + objc.NSString? name, objc.NSString? ext, objc.NSString? subpath) { + final _ret = _objc_msgSend_18( + this.pointer, + _sel_URLForResource_withExtension_subdirectory_, + name?.pointer ?? ffi.nullptr, + ext?.pointer ?? ffi.nullptr, + subpath?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSArray get localObjects { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_localObjects1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSURL? URLForResource_withExtension_subdirectory_localization_( + objc.NSString? name, + objc.NSString? ext, + objc.NSString? subpath, + objc.NSString? localizationName) { + final _ret = _objc_msgSend_19( + this.pointer, + _sel_URLForResource_withExtension_subdirectory_localization_, + name?.pointer ?? ffi.nullptr, + ext?.pointer ?? ffi.nullptr, + subpath?.pointer ?? ffi.nullptr, + localizationName?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void dispatchWithComponents_(NSArray components) { - _lib._objc_msgSend_472( - _id, _lib._sel_dispatchWithComponents_1, components._id); + objc.NSArray? URLsForResourcesWithExtension_subdirectory_( + objc.NSString? ext, objc.NSString? subpath) { + final _ret = _objc_msgSend_20( + this.pointer, + _sel_URLsForResourcesWithExtension_subdirectory_, + ext?.pointer ?? ffi.nullptr, + subpath?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - @override - NSConnection init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSConnection._(_ret, _lib, retain: true, release: true); + objc.NSArray? URLsForResourcesWithExtension_subdirectory_localization_( + objc.NSString? ext, + objc.NSString? subpath, + objc.NSString? localizationName) { + final _ret = _objc_msgSend_21( + this.pointer, + _sel_URLsForResourcesWithExtension_subdirectory_localization_, + ext?.pointer ?? ffi.nullptr, + subpath?.pointer ?? ffi.nullptr, + localizationName?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSConnection new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSConnection1, _lib._sel_new1); - return NSConnection._(_ret, _lib, retain: false, release: true); + static objc.NSString? pathForResource_ofType_inDirectory_( + objc.NSString? name, objc.NSString? ext, objc.NSString bundlePath) { + final _ret = _objc_msgSend_22( + _class_NSBundle, + _sel_pathForResource_ofType_inDirectory_, + name?.pointer ?? ffi.nullptr, + ext?.pointer ?? ffi.nullptr, + bundlePath.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSConnection allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSConnection1, _lib._sel_allocWithZone_1, zone); - return NSConnection._(_ret, _lib, retain: false, release: true); + static objc.NSArray pathsForResourcesOfType_inDirectory_( + objc.NSString? ext, objc.NSString bundlePath) { + final _ret = _objc_msgSend_23( + _class_NSBundle, + _sel_pathsForResourcesOfType_inDirectory_, + ext?.pointer ?? ffi.nullptr, + bundlePath.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSConnection alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSConnection1, _lib._sel_alloc1); - return NSConnection._(_ret, _lib, retain: false, release: true); + objc.NSString? pathForResource_ofType_( + objc.NSString? name, objc.NSString? ext) { + final _ret = _objc_msgSend_24(this.pointer, _sel_pathForResource_ofType_, + name?.pointer ?? ffi.nullptr, ext?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSConnection1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + objc.NSString? pathForResource_ofType_inDirectory_forLocalization_( + objc.NSString? name, + objc.NSString? ext, + objc.NSString? subpath, + objc.NSString? localizationName) { + final _ret = _objc_msgSend_25( + this.pointer, + _sel_pathForResource_ofType_inDirectory_forLocalization_, + name?.pointer ?? ffi.nullptr, + ext?.pointer ?? ffi.nullptr, + subpath?.pointer ?? ffi.nullptr, + localizationName?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSConnection1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + objc.NSArray pathsForResourcesOfType_inDirectory_forLocalization_( + objc.NSString? ext, + objc.NSString? subpath, + objc.NSString? localizationName) { + final _ret = _objc_msgSend_26( + this.pointer, + _sel_pathsForResourcesOfType_inDirectory_forLocalization_, + ext?.pointer ?? ffi.nullptr, + subpath?.pointer ?? ffi.nullptr, + localizationName?.pointer ?? ffi.nullptr); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSConnection1, _lib._sel_accessInstanceVariablesDirectly1); + objc.NSString localizedStringForKey_value_table_( + objc.NSString key, objc.NSString? value, objc.NSString? tableName) { + final _ret = _objc_msgSend_27( + this.pointer, + _sel_localizedStringForKey_value_table_, + key.pointer, + value?.pointer ?? ffi.nullptr, + tableName?.pointer ?? ffi.nullptr); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSConnection1, _lib._sel_useStoredAccessor1); + NSAttributedString localizedAttributedStringForKey_value_table_( + objc.NSString key, objc.NSString? value, objc.NSString? tableName) { + final _ret = _objc_msgSend_64( + this.pointer, + _sel_localizedAttributedStringForKey_value_table_, + key.pointer, + value?.pointer ?? ffi.nullptr, + tableName?.pointer ?? ffi.nullptr); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSConnection1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + objc.NSString? get bundleIdentifier { + final _ret = _objc_msgSend_13(this.pointer, _sel_bundleIdentifier); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSConnection1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + objc.NSDictionary? get infoDictionary { + final _ret = _objc_msgSend_65(this.pointer, _sel_infoDictionary); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSConnection1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSDictionary? get localizedInfoDictionary { + final _ret = _objc_msgSend_65(this.pointer, _sel_localizedInfoDictionary); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSConnection1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSObject? objectForInfoDictionaryKey_(objc.NSString key) { + final _ret = _objc_msgSend_2( + this.pointer, _sel_objectForInfoDictionaryKey_, key.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSConnection1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSObject? classNamed_(objc.NSString className) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_classNamed_, className.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } -} -class NSPortNameServer extends NSObject { - NSPortNameServer._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + objc.NSObject? get principalClass { + final _ret = _objc_msgSend_66(this.pointer, _sel_principalClass); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a [NSPortNameServer] that points to the same underlying object as [other]. - static NSPortNameServer castFrom(T other) { - return NSPortNameServer._(other._id, other._lib, - retain: true, release: true); + objc.NSArray get preferredLocalizations { + final _ret = _objc_msgSend_6(this.pointer, _sel_preferredLocalizations); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSPortNameServer] that wraps the given raw object pointer. - static NSPortNameServer castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPortNameServer._(other, lib, retain: retain, release: release); + objc.NSArray get localizations { + final _ret = _objc_msgSend_6(this.pointer, _sel_localizations); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSPortNameServer]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSPortNameServer1); + objc.NSString? get developmentLocalization { + final _ret = _objc_msgSend_13(this.pointer, _sel_developmentLocalization); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSPortNameServer systemDefaultPortNameServer(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_574( - _lib._class_NSPortNameServer1, _lib._sel_systemDefaultPortNameServer1); - return NSPortNameServer._(_ret, _lib, retain: true, release: true); + static objc.NSArray preferredLocalizationsFromArray_( + objc.NSArray localizationsArray) { + final _ret = _objc_msgSend_67(_class_NSBundle, + _sel_preferredLocalizationsFromArray_, localizationsArray.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSPort? portForName_(NSString name) { - final _ret = _lib._objc_msgSend_575(_id, _lib._sel_portForName_1, name._id); - return _ret.address == 0 - ? null - : NSPort._(_ret, _lib, retain: true, release: true); + static objc.NSArray preferredLocalizationsFromArray_forPreferences_( + objc.NSArray localizationsArray, objc.NSArray? preferencesArray) { + final _ret = _objc_msgSend_68( + _class_NSBundle, + _sel_preferredLocalizationsFromArray_forPreferences_, + localizationsArray.pointer, + preferencesArray?.pointer ?? ffi.nullptr); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSPort? portForName_host_(NSString name, NSString? host) { - final _ret = _lib._objc_msgSend_576( - _id, _lib._sel_portForName_host_1, name._id, host?._id ?? ffi.nullptr); + objc.NSArray? get executableArchitectures { + final _ret = _objc_msgSend_69(this.pointer, _sel_executableArchitectures); return _ret.address == 0 ? null - : NSPort._(_ret, _lib, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool registerPort_name_(NSPort port, NSString name) { - return _lib._objc_msgSend_577( - _id, _lib._sel_registerPort_name_1, port._id, name._id); + void setPreservationPriority_forTags_(double priority, objc.NSSet tags) { + _objc_msgSend_70(this.pointer, _sel_setPreservationPriority_forTags_, + priority, tags.pointer); } - bool removePortForName_(NSString name) { - return _lib._objc_msgSend_64(_id, _lib._sel_removePortForName_1, name._id); + double preservationPriorityForTag_(objc.NSString tag) { + return objc.useMsgSendVariants + ? _objc_msgSend_71Fpret( + this.pointer, _sel_preservationPriorityForTag_, tag.pointer) + : _objc_msgSend_71( + this.pointer, _sel_preservationPriorityForTag_, tag.pointer); } @override - NSPortNameServer init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSPortNameServer._(_ret, _lib, retain: true, release: true); + NSBundle init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSBundle.castFromPointer(_ret, retain: true, release: true); } - static NSPortNameServer new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPortNameServer1, _lib._sel_new1); - return NSPortNameServer._(_ret, _lib, retain: false, release: true); + static NSBundle new1() { + final _ret = _objc_msgSend_40(_class_NSBundle, _sel_new); + return NSBundle.castFromPointer(_ret, retain: false, release: true); } - static NSPortNameServer allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSPortNameServer1, _lib._sel_allocWithZone_1, zone); - return NSPortNameServer._(_ret, _lib, retain: false, release: true); + static NSBundle allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSBundle, _sel_allocWithZone_, zone); + return NSBundle.castFromPointer(_ret, retain: false, release: true); } - static NSPortNameServer alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPortNameServer1, _lib._sel_alloc1); - return NSPortNameServer._(_ret, _lib, retain: false, release: true); + static NSBundle alloc() { + final _ret = _objc_msgSend_40(_class_NSBundle, _sel_alloc); + return NSBundle.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSPortNameServer1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSBundle, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSPortNameServer1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSBundle, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSPortNameServer1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSBundle, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSPortNameServer1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSBundle, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSPortNameServer1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSBundle, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSPortNameServer1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSBundle, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSPortNameServer1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSPortNameServer1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSBundle, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSBundle, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSBundle, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSBundle = objc.getClass("NSBundle"); +late final _sel_mainBundle = objc.registerName("mainBundle"); +final _objc_msgSend_1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +typedef instancetype = ffi.Pointer; +typedef Dartinstancetype = objc.NSObject; +late final _sel_bundleWithPath_ = objc.registerName("bundleWithPath:"); +final _objc_msgSend_2 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithPath_ = objc.registerName("initWithPath:"); +late final _sel_bundleWithURL_ = objc.registerName("bundleWithURL:"); +final _objc_msgSend_3 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithURL_ = objc.registerName("initWithURL:"); +late final _sel_bundleForClass_ = objc.registerName("bundleForClass:"); +final _objc_msgSend_4 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_bundleWithIdentifier_ = + objc.registerName("bundleWithIdentifier:"); +final _objc_msgSend_5 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_allBundles = objc.registerName("allBundles"); +final _objc_msgSend_6 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_allFrameworks = objc.registerName("allFrameworks"); +late final _sel_load = objc.registerName("load"); +final _objc_msgSend_7 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isLoaded = objc.registerName("isLoaded"); +late final _sel_unload = objc.registerName("unload"); +late final _sel_preflightAndReturnError_ = + objc.registerName("preflightAndReturnError:"); +final _objc_msgSend_8 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_loadAndReturnError_ = objc.registerName("loadAndReturnError:"); +late final _sel_bundleURL = objc.registerName("bundleURL"); +final _objc_msgSend_9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_resourceURL = objc.registerName("resourceURL"); +final _objc_msgSend_10 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_executableURL = objc.registerName("executableURL"); +late final _sel_URLForAuxiliaryExecutable_ = + objc.registerName("URLForAuxiliaryExecutable:"); +final _objc_msgSend_11 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_privateFrameworksURL = + objc.registerName("privateFrameworksURL"); +late final _sel_sharedFrameworksURL = objc.registerName("sharedFrameworksURL"); +late final _sel_sharedSupportURL = objc.registerName("sharedSupportURL"); +late final _sel_builtInPlugInsURL = objc.registerName("builtInPlugInsURL"); +late final _sel_appStoreReceiptURL = objc.registerName("appStoreReceiptURL"); +late final _sel_bundlePath = objc.registerName("bundlePath"); +final _objc_msgSend_12 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_resourcePath = objc.registerName("resourcePath"); +final _objc_msgSend_13 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_executablePath = objc.registerName("executablePath"); +late final _sel_pathForAuxiliaryExecutable_ = + objc.registerName("pathForAuxiliaryExecutable:"); +final _objc_msgSend_14 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_privateFrameworksPath = + objc.registerName("privateFrameworksPath"); +late final _sel_sharedFrameworksPath = + objc.registerName("sharedFrameworksPath"); +late final _sel_sharedSupportPath = objc.registerName("sharedSupportPath"); +late final _sel_builtInPlugInsPath = objc.registerName("builtInPlugInsPath"); +late final _sel_URLForResource_withExtension_subdirectory_inBundleWithURL_ = + objc.registerName( + "URLForResource:withExtension:subdirectory:inBundleWithURL:"); +final _objc_msgSend_15 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_URLsForResourcesWithExtension_subdirectory_inBundleWithURL_ = + objc.registerName( + "URLsForResourcesWithExtension:subdirectory:inBundleWithURL:"); +final _objc_msgSend_16 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_URLForResource_withExtension_ = + objc.registerName("URLForResource:withExtension:"); +final _objc_msgSend_17 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_URLForResource_withExtension_subdirectory_ = + objc.registerName("URLForResource:withExtension:subdirectory:"); +final _objc_msgSend_18 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_URLForResource_withExtension_subdirectory_localization_ = objc + .registerName("URLForResource:withExtension:subdirectory:localization:"); +final _objc_msgSend_19 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_URLsForResourcesWithExtension_subdirectory_ = + objc.registerName("URLsForResourcesWithExtension:subdirectory:"); +final _objc_msgSend_20 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_URLsForResourcesWithExtension_subdirectory_localization_ = objc + .registerName("URLsForResourcesWithExtension:subdirectory:localization:"); +final _objc_msgSend_21 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_pathForResource_ofType_inDirectory_ = + objc.registerName("pathForResource:ofType:inDirectory:"); +final _objc_msgSend_22 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_pathsForResourcesOfType_inDirectory_ = + objc.registerName("pathsForResourcesOfType:inDirectory:"); +final _objc_msgSend_23 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_pathForResource_ofType_ = + objc.registerName("pathForResource:ofType:"); +final _objc_msgSend_24 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_pathForResource_ofType_inDirectory_forLocalization_ = + objc.registerName("pathForResource:ofType:inDirectory:forLocalization:"); +final _objc_msgSend_25 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_pathsForResourcesOfType_inDirectory_forLocalization_ = + objc.registerName("pathsForResourcesOfType:inDirectory:forLocalization:"); +final _objc_msgSend_26 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_localizedStringForKey_value_table_ = + objc.registerName("localizedStringForKey:value:table:"); +final _objc_msgSend_27 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +class NSAttributedString extends objc.NSObject { + NSAttributedString._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSPortNameServer1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} + /// Constructs a [NSAttributedString] that points to the same underlying object as [other]. + NSAttributedString.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); -class NSDistantObject extends NSProxy { - NSDistantObject._(ffi.Pointer id, SwiftLibrary lib, + /// Constructs a [NSAttributedString] that wraps the given raw object pointer. + NSAttributedString.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : this._(other, retain: retain, release: release); - /// Returns a [NSDistantObject] that points to the same underlying object as [other]. - static NSDistantObject castFrom(T other) { - return NSDistantObject._(other._id, other._lib, - retain: true, release: true); + /// Returns whether [obj] is an instance of [NSAttributedString]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSAttributedString); } - /// Returns a [NSDistantObject] that wraps the given raw object pointer. - static NSDistantObject castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDistantObject._(other, lib, retain: retain, release: release); + objc.NSString get string { + final _ret = _objc_msgSend_12(this.pointer, _sel_string); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSDistantObject]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSDistantObject1); + objc.NSDictionary attributesAtIndex_effectiveRange_( + int location, ffi.Pointer<_NSRange> range) { + final _ret = _objc_msgSend_28( + this.pointer, _sel_attributesAtIndex_effectiveRange_, location, range); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSObject? proxyWithTarget_connection_( - SwiftLibrary _lib, NSObject target, NSConnection connection) { - final _ret = _lib._objc_msgSend_580(_lib._class_NSDistantObject1, - _lib._sel_proxyWithTarget_connection_1, target._id, connection._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + int get length { + return _objc_msgSend_29(this.pointer, _sel_length); } - NSDistantObject? initWithTarget_connection_( - NSObject target, NSConnection connection) { - final _ret = _lib._objc_msgSend_580( - _id, _lib._sel_initWithTarget_connection_1, target._id, connection._id); + objc.NSObject? attribute_atIndex_effectiveRange_( + objc.NSString attrName, int location, ffi.Pointer<_NSRange> range) { + final _ret = _objc_msgSend_30( + this.pointer, + _sel_attribute_atIndex_effectiveRange_, + attrName.pointer, + location, + range); return _ret.address == 0 ? null - : NSDistantObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject proxyWithLocal_connection_( - SwiftLibrary _lib, NSObject target, NSConnection connection) { - final _ret = _lib._objc_msgSend_581(_lib._class_NSDistantObject1, - _lib._sel_proxyWithLocal_connection_1, target._id, connection._id); - return NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSDistantObject initWithLocal_connection_( - NSObject target, NSConnection connection) { - final _ret = _lib._objc_msgSend_581( - _id, _lib._sel_initWithLocal_connection_1, target._id, connection._id); - return NSDistantObject._(_ret, _lib, retain: true, release: true); + NSAttributedString attributedSubstringFromRange_(_NSRange range) { + final _ret = _objc_msgSend_31( + this.pointer, _sel_attributedSubstringFromRange_, range); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSDistantObject? initWithCoder_(NSCoder inCoder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, inCoder._id); + objc.NSDictionary attributesAtIndex_longestEffectiveRange_inRange_( + int location, ffi.Pointer<_NSRange> range, _NSRange rangeLimit) { + final _ret = _objc_msgSend_32( + this.pointer, + _sel_attributesAtIndex_longestEffectiveRange_inRange_, + location, + range, + rangeLimit); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject? attribute_atIndex_longestEffectiveRange_inRange_( + objc.NSString attrName, + int location, + ffi.Pointer<_NSRange> range, + _NSRange rangeLimit) { + final _ret = _objc_msgSend_33( + this.pointer, + _sel_attribute_atIndex_longestEffectiveRange_inRange_, + attrName.pointer, + location, + range, + rangeLimit); return _ret.address == 0 ? null - : NSDistantObject._(_ret, _lib, retain: true, release: true); - } - - void setProtocolForProxy_(Protocol? proto) { - _lib._objc_msgSend_582( - _id, _lib._sel_setProtocolForProxy_1, proto?._id ?? ffi.nullptr); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSConnection get connectionForProxy { - final _ret = _lib._objc_msgSend_572(_id, _lib._sel_connectionForProxy1); - return NSConnection._(_ret, _lib, retain: true, release: true); + bool isEqualToAttributedString_(NSAttributedString other) { + return _objc_msgSend_34( + this.pointer, _sel_isEqualToAttributedString_, other.pointer); } - static NSObject alloc(SwiftLibrary _lib) { + NSAttributedString initWithString_(objc.NSString str) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSDistantObject1, _lib._sel_alloc1); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - static bool respondsToSelector_( - SwiftLibrary _lib, ffi.Pointer aSelector) { - return _lib._objc_msgSend_4(_lib._class_NSDistantObject1, - _lib._sel_respondsToSelector_1, aSelector); - } -} - -class NSProxy extends _ObjCWrapper { - NSProxy._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSProxy] that points to the same underlying object as [other]. - static NSProxy castFrom(T other) { - return NSProxy._(other._id, other._lib, retain: true, release: true); + _objc_msgSend_35(this.pointer, _sel_initWithString_, str.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - /// Returns a [NSProxy] that wraps the given raw object pointer. - static NSProxy castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSProxy._(other, lib, retain: retain, release: release); + NSAttributedString initWithString_attributes_( + objc.NSString str, objc.NSDictionary? attrs) { + final _ret = _objc_msgSend_36(this.pointer, _sel_initWithString_attributes_, + str.pointer, attrs?.pointer ?? ffi.nullptr); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSProxy]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSProxy1); + NSAttributedString initWithAttributedString_(NSAttributedString attrStr) { + final _ret = _objc_msgSend_37( + this.pointer, _sel_initWithAttributedString_, attrStr.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSObject alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSProxy1, _lib._sel_alloc1); - return NSObject._(_ret, _lib, retain: false, release: true); + void enumerateAttributesInRange_options_usingBlock_(_NSRange enumerationRange, + int opts, ObjCBlock_ffiVoid_NSDictionary_NSRange_bool block) { + _objc_msgSend_38( + this.pointer, + _sel_enumerateAttributesInRange_options_usingBlock_, + enumerationRange, + opts, + block.pointer); } - static NSObject allocWithZone_(SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSProxy1, _lib._sel_allocWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); + void enumerateAttribute_inRange_options_usingBlock_( + objc.NSString attrName, + _NSRange enumerationRange, + int opts, + ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool block) { + _objc_msgSend_39( + this.pointer, + _sel_enumerateAttribute_inRange_options_usingBlock_, + attrName.pointer, + enumerationRange, + opts, + block.pointer); } - static NSObject class1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSProxy1, _lib._sel_class1); - return NSObject._(_ret, _lib, retain: true, release: true); + NSAttributedString? + initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( + objc.NSURL markdownFile, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_53( + this.pointer, + _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_, + markdownFile.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSAttributedString.castFromPointer(_ret, retain: true, release: true); } - void forwardInvocation_(NSInvocation invocation) { - _lib._objc_msgSend_421(_id, _lib._sel_forwardInvocation_1, invocation._id); + NSAttributedString? initWithMarkdown_options_baseURL_error_( + objc.NSData markdown, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_54( + this.pointer, + _sel_initWithMarkdown_options_baseURL_error_, + markdown.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSAttributedString.castFromPointer(_ret, retain: true, release: true); } - NSMethodSignature? methodSignatureForSelector_(ffi.Pointer sel) { - final _ret = _lib._objc_msgSend_579( - _id, _lib._sel_methodSignatureForSelector_1, sel); + NSAttributedString? initWithMarkdownString_options_baseURL_error_( + objc.NSString markdownString, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_55( + this.pointer, + _sel_initWithMarkdownString_options_baseURL_error_, + markdownString.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, + error); return _ret.address == 0 ? null - : NSMethodSignature._(_ret, _lib, retain: true, release: true); + : NSAttributedString.castFromPointer(_ret, retain: true, release: true); } - void dealloc() { - _lib._objc_msgSend_1(_id, _lib._sel_dealloc1); + NSAttributedString initWithFormat_options_locale_( + NSAttributedString format, int options, objc.NSLocale? locale) { + final _ret = _objc_msgSend_56( + this.pointer, + _sel_initWithFormat_options_locale_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - void finalize() { - _lib._objc_msgSend_1(_id, _lib._sel_finalize1); + NSAttributedString initWithFormat_options_locale_arguments_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + ffi.Pointer<__va_list_tag> arguments) { + final _ret = _objc_msgSend_57( + this.pointer, + _sel_initWithFormat_options_locale_arguments_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr, + arguments); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSString get description { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSAttributedString localizedAttributedStringWithFormat_( + NSAttributedString format) { + final _ret = _objc_msgSend_37(_class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_, format.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSString get debugDescription { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_debugDescription1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSAttributedString localizedAttributedStringWithFormat_options_( + NSAttributedString format, int options) { + final _ret = _objc_msgSend_58( + _class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_options_, + format.pointer, + options); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static bool respondsToSelector_( - SwiftLibrary _lib, ffi.Pointer aSelector) { - return _lib._objc_msgSend_4( - _lib._class_NSProxy1, _lib._sel_respondsToSelector_1, aSelector); + NSAttributedString initWithFormat_options_locale_context_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + objc.NSDictionary context) { + final _ret = _objc_msgSend_59( + this.pointer, + _sel_initWithFormat_options_locale_context_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr, + context.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - bool allowsWeakReference() { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsWeakReference1); + NSAttributedString initWithFormat_options_locale_context_arguments_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + objc.NSDictionary context, + ffi.Pointer<__va_list_tag> arguments) { + final _ret = _objc_msgSend_60( + this.pointer, + _sel_initWithFormat_options_locale_context_arguments_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr, + context.pointer, + arguments); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - bool retainWeakReference() { - return _lib._objc_msgSend_12(_id, _lib._sel_retainWeakReference1); + static NSAttributedString localizedAttributedStringWithFormat_context_( + NSAttributedString format, objc.NSDictionary context) { + final _ret = _objc_msgSend_61( + _class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_context_, + format.pointer, + context.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } -} - -class NSClassDescription extends NSObject { - NSClassDescription._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSClassDescription] that points to the same underlying object as [other]. - static NSClassDescription castFrom(T other) { - return NSClassDescription._(other._id, other._lib, + static NSAttributedString + localizedAttributedStringWithFormat_options_context_( + NSAttributedString format, int options, objc.NSDictionary context) { + final _ret = _objc_msgSend_62( + _class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_options_context_, + format.pointer, + options, + context.pointer); + return NSAttributedString.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSClassDescription] that wraps the given raw object pointer. - static NSClassDescription castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSClassDescription._(other, lib, retain: retain, release: release); + NSAttributedString attributedStringByInflectingString() { + final _ret = + _objc_msgSend_63(this.pointer, _sel_attributedStringByInflectingString); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSClassDescription]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSClassDescription1); + @override + NSAttributedString init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static void registerClassDescription_forClass_( - SwiftLibrary _lib, NSClassDescription description, NSObject aClass) { - _lib._objc_msgSend_598( - _lib._class_NSClassDescription1, - _lib._sel_registerClassDescription_forClass_1, - description._id, - aClass._id); + static NSAttributedString new1() { + final _ret = _objc_msgSend_40(_class_NSAttributedString, _sel_new); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } - static void invalidateClassDescriptionCache(SwiftLibrary _lib) { - _lib._objc_msgSend_1(_lib._class_NSClassDescription1, - _lib._sel_invalidateClassDescriptionCache1); + static NSAttributedString allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSAttributedString, _sel_allocWithZone_, zone); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } - static NSClassDescription? classDescriptionForClass_( - SwiftLibrary _lib, NSObject aClass) { - final _ret = _lib._objc_msgSend_599(_lib._class_NSClassDescription1, - _lib._sel_classDescriptionForClass_1, aClass._id); - return _ret.address == 0 - ? null - : NSClassDescription._(_ret, _lib, retain: true, release: true); + static NSAttributedString alloc() { + final _ret = _objc_msgSend_40(_class_NSAttributedString, _sel_alloc); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } - @override - NSArray get attributeKeys { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_attributeKeys1); - return NSArray._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSAttributedString, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - @override - NSArray get toOneRelationshipKeys { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_toOneRelationshipKeys1); - return NSArray._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSAttributedString, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - @override - NSArray get toManyRelationshipKeys { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_toManyRelationshipKeys1); - return NSArray._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSAttributedString, _sel_accessInstanceVariablesDirectly); } - @override - NSString? inverseForRelationshipKey_(NSString relationshipKey) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_inverseForRelationshipKey_1, relationshipKey._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSAttributedString, _sel_useStoredAccessor); } - @override - NSClassDescription init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSClassDescription._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSAttributedString, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static NSClassDescription new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSClassDescription1, _lib._sel_new1); - return NSClassDescription._(_ret, _lib, retain: false, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSAttributedString, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static NSClassDescription allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSClassDescription1, _lib._sel_allocWithZone_1, zone); - return NSClassDescription._(_ret, _lib, retain: false, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSAttributedString, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSClassDescription alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSClassDescription1, _lib._sel_alloc1); - return NSClassDescription._(_ret, _lib, retain: false, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSAttributedString, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSClassDescription1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSAttributedString, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSClassDescription1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } +late final _class_NSAttributedString = objc.getClass("NSAttributedString"); +late final _sel_string = objc.registerName("string"); - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSClassDescription1, - _lib._sel_accessInstanceVariablesDirectly1); - } +final class _NSRange extends ffi.Struct { + @ffi.UnsignedLong() + external int location; - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSClassDescription1, _lib._sel_useStoredAccessor1); - } + @ffi.UnsignedLong() + external int length; +} - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSClassDescription1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } +late final _sel_attributesAtIndex_effectiveRange_ = + objc.registerName("attributesAtIndex:effectiveRange:"); +final _objc_msgSend_28 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer<_NSRange>)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_NSRange>)>(); +late final _sel_length = objc.registerName("length"); +final _objc_msgSend_29 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_attribute_atIndex_effectiveRange_ = + objc.registerName("attribute:atIndex:effectiveRange:"); +final _objc_msgSend_30 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer<_NSRange>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_NSRange>)>(); +late final _sel_attributedSubstringFromRange_ = + objc.registerName("attributedSubstringFromRange:"); +final _objc_msgSend_31 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_attributesAtIndex_longestEffectiveRange_inRange_ = + objc.registerName("attributesAtIndex:longestEffectiveRange:inRange:"); +final _objc_msgSend_32 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer<_NSRange>, + _NSRange)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_NSRange>, + _NSRange)>(); +late final _sel_attribute_atIndex_longestEffectiveRange_inRange_ = + objc.registerName("attribute:atIndex:longestEffectiveRange:inRange:"); +final _objc_msgSend_33 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer<_NSRange>, + _NSRange)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_NSRange>, + _NSRange)>(); +late final _sel_isEqualToAttributedString_ = + objc.registerName("isEqualToAttributedString:"); +final _objc_msgSend_34 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithString_ = objc.registerName("initWithString:"); +final _objc_msgSend_35 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithString_attributes_ = + objc.registerName("initWithString:attributes:"); +final _objc_msgSend_36 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithAttributedString_ = + objc.registerName("initWithAttributedString:"); +final _objc_msgSend_37 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSAttributedStringEnumerationOptions { + static const int NSAttributedStringEnumerationReverse = 2; + static const int + NSAttributedStringEnumerationLongestEffectiveRangeNotRequired = 1048576; +} + +void _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + _NSRange arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, _NSRange, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( + void Function( + ffi.Pointer, _NSRange, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_NSDictionary_NSRange_bool extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSDictionary_NSRange_bool._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSClassDescription1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSDictionary_NSRange_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSDictionary_NSRange_bool._(pointer, + retain: retain, release: release); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSClassDescription1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSDictionary_NSRange_bool.fromFunctionPointer( + ffi.Pointer< + ffi + .NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + _NSRange arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSDictionary_NSRange_bool.fromFunction( + void Function(objc.NSDictionary, _NSRange, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + fn(objc.NSDictionary.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.Pointer? _dartFuncTrampoline; - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSClassDescription1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSDictionary_NSRange_bool.listener( + void Function(objc.NSDictionary, _NSRange, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + fn(objc.NSDictionary.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>? _dartFuncListenerTrampoline; - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSClassDescription1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + void call( + objc.NSDictionary arg0, _NSRange arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>()(pointer, arg0.pointer, arg1, arg2); +} + +late final _sel_enumerateAttributesInRange_options_usingBlock_ = + objc.registerName("enumerateAttributesInRange:options:usingBlock:"); +final _objc_msgSend_38 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + _NSRange arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, _NSRange, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_registerClosure( + void Function( + ffi.Pointer, _NSRange, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -class NSScriptObjectSpecifier extends NSObject { - NSScriptObjectSpecifier._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +void _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); - /// Returns a [NSScriptObjectSpecifier] that points to the same underlying object as [other]. - static NSScriptObjectSpecifier castFrom(T other) { - return NSScriptObjectSpecifier._(other._id, other._lib, - retain: true, release: true); - } +class ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); - /// Returns a [NSScriptObjectSpecifier] that wraps the given raw object pointer. - static NSScriptObjectSpecifier castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSScriptObjectSpecifier._(other, lib, + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool._(pointer, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSScriptObjectSpecifier]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSScriptObjectSpecifier1); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + _NSRange arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - static NSScriptObjectSpecifier? objectSpecifierWithDescriptor_( - SwiftLibrary _lib, NSAppleEventDescriptor descriptor) { - final _ret = _lib._objc_msgSend_624(_lib._class_NSScriptObjectSpecifier1, - _lib._sel_objectSpecifierWithDescriptor_1, descriptor._id); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool.fromFunction( + void Function(objc.NSObject?, _NSRange, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : objc.NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.Pointer? _dartFuncTrampoline; - NSScriptObjectSpecifier initWithContainerSpecifier_key_( - NSScriptObjectSpecifier container, NSString property) { - final _ret = _lib._objc_msgSend_625( - _id, - _lib._sel_initWithContainerSpecifier_key_1, - container._id, - property._id); - return NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool.listener( + void Function(objc.NSObject?, _NSRange, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : objc.NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>? _dartFuncListenerTrampoline; - NSScriptObjectSpecifier - initWithContainerClassDescription_containerSpecifier_key_( - NSScriptClassDescription classDesc, - NSScriptObjectSpecifier? container, - NSString property) { - final _ret = _lib._objc_msgSend_645( - _id, - _lib._sel_initWithContainerClassDescription_containerSpecifier_key_1, - classDesc._id, - container?._id ?? ffi.nullptr, - property._id); - return NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); - } + void call(objc.NSObject? arg0, _NSRange arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr, arg1, arg2); +} + +late final _sel_enumerateAttribute_inRange_options_usingBlock_ = + objc.registerName("enumerateAttribute:inRange:options:usingBlock:"); +final _objc_msgSend_39 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); + +class NSAttributedStringMarkdownParsingOptions extends objc.NSObject { + NSAttributedStringMarkdownParsingOptions._( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSAttributedStringMarkdownParsingOptions] that points to the same underlying object as [other]. + NSAttributedStringMarkdownParsingOptions.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSAttributedStringMarkdownParsingOptions] that wraps the given raw object pointer. + NSAttributedStringMarkdownParsingOptions.castFromPointer( + ffi.Pointer other, + {bool retain = false, + bool release = false}) + : this._(other, retain: retain, release: release); - NSScriptObjectSpecifier? initWithCoder_(NSCoder inCoder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, inCoder._id); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSAttributedStringMarkdownParsingOptions]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, + _class_NSAttributedStringMarkdownParsingOptions); } - NSScriptObjectSpecifier? get childSpecifier { - final _ret = _lib._objc_msgSend_632(_id, _lib._sel_childSpecifier1); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); + @override + NSAttributedStringMarkdownParsingOptions init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: true, release: true); } - set childSpecifier(NSScriptObjectSpecifier? value) { - return _lib._objc_msgSend_633( - _id, _lib._sel_setChildSpecifier_1, value?._id ?? ffi.nullptr); + bool get allowsExtendedAttributes { + return _objc_msgSend_7(this.pointer, _sel_allowsExtendedAttributes); } - NSScriptObjectSpecifier? get containerSpecifier { - final _ret = _lib._objc_msgSend_632(_id, _lib._sel_containerSpecifier1); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); + set allowsExtendedAttributes(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAllowsExtendedAttributes_, value); } - set containerSpecifier(NSScriptObjectSpecifier? value) { - return _lib._objc_msgSend_633( - _id, _lib._sel_setContainerSpecifier_1, value?._id ?? ffi.nullptr); + int get interpretedSyntax { + return _objc_msgSend_42(this.pointer, _sel_interpretedSyntax); } - bool get containerIsObjectBeingTested { - return _lib._objc_msgSend_12(_id, _lib._sel_containerIsObjectBeingTested1); + set interpretedSyntax(int value) { + return _objc_msgSend_43(this.pointer, _sel_setInterpretedSyntax_, value); } - set containerIsObjectBeingTested(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setContainerIsObjectBeingTested_1, value); + int get failurePolicy { + return _objc_msgSend_44(this.pointer, _sel_failurePolicy); } - bool get containerIsRangeContainerObject { - return _lib._objc_msgSend_12( - _id, _lib._sel_containerIsRangeContainerObject1); + set failurePolicy(int value) { + return _objc_msgSend_45(this.pointer, _sel_setFailurePolicy_, value); } - set containerIsRangeContainerObject(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setContainerIsRangeContainerObject_1, value); + objc.NSString? get languageCode { + final _ret = _objc_msgSend_13(this.pointer, _sel_languageCode); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString get key { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_key1); - return NSString._(_ret, _lib, retain: true, release: true); + set languageCode(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setLanguageCode_, value?.pointer ?? ffi.nullptr); } - set key(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setKey_1, value._id); + bool get appliesSourcePositionAttributes { + return _objc_msgSend_7(this.pointer, _sel_appliesSourcePositionAttributes); } - NSScriptClassDescription? get containerClassDescription { - final _ret = - _lib._objc_msgSend_628(_id, _lib._sel_containerClassDescription1); - return _ret.address == 0 - ? null - : NSScriptClassDescription._(_ret, _lib, retain: true, release: true); + set appliesSourcePositionAttributes(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAppliesSourcePositionAttributes_, value); } - set containerClassDescription(NSScriptClassDescription? value) { - return _lib._objc_msgSend_647(_id, _lib._sel_setContainerClassDescription_1, - value?._id ?? ffi.nullptr); + static NSAttributedStringMarkdownParsingOptions new1() { + final _ret = _objc_msgSend_40( + _class_NSAttributedStringMarkdownParsingOptions, _sel_new); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: false, release: true); } - NSScriptClassDescription? get keyClassDescription { - final _ret = _lib._objc_msgSend_628(_id, _lib._sel_keyClassDescription1); - return _ret.address == 0 - ? null - : NSScriptClassDescription._(_ret, _lib, retain: true, release: true); + static NSAttributedStringMarkdownParsingOptions allocWithZone_( + ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_allocWithZone_, + zone); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: false, release: true); } - ffi.Pointer indicesOfObjectsByEvaluatingWithContainer_count_( - NSObject container, ffi.Pointer count) { - return _lib._objc_msgSend_648( - _id, - _lib._sel_indicesOfObjectsByEvaluatingWithContainer_count_1, - container._id, - count); + static NSAttributedStringMarkdownParsingOptions alloc() { + final _ret = _objc_msgSend_40( + _class_NSAttributedStringMarkdownParsingOptions, _sel_alloc); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: false, release: true); } - NSObject? objectsByEvaluatingWithContainers_(NSObject containers) { - final _ret = _lib._objc_msgSend_16( - _id, _lib._sel_objectsByEvaluatingWithContainers_1, containers._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSObject? get objectsByEvaluatingSpecifier { - final _ret = - _lib._objc_msgSend_17(_id, _lib._sel_objectsByEvaluatingSpecifier1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSAttributedStringMarkdownParsingOptions, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - int get evaluationErrorNumber { - return _lib._objc_msgSend_83(_id, _lib._sel_evaluationErrorNumber1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7(_class_NSAttributedStringMarkdownParsingOptions, + _sel_accessInstanceVariablesDirectly); } - set evaluationErrorNumber(int value) { - return _lib._objc_msgSend_635( - _id, _lib._sel_setEvaluationErrorNumber_1, value); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSAttributedStringMarkdownParsingOptions, + _sel_useStoredAccessor); } - NSScriptObjectSpecifier? get evaluationErrorSpecifier { - final _ret = - _lib._objc_msgSend_632(_id, _lib._sel_evaluationErrorSpecifier1); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_keyPathsForValuesAffectingValueForKey_, + key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSAppleEventDescriptor? get descriptor { - final _ret = _lib._objc_msgSend_636(_id, _lib._sel_descriptor1); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSAttributedStringMarkdownParsingOptions, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - @override - NSScriptObjectSpecifier init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSAttributedStringMarkdownParsingOptions = + objc.getClass("NSAttributedStringMarkdownParsingOptions"); +late final _sel_init = objc.registerName("init"); +final _objc_msgSend_40 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_allowsExtendedAttributes = + objc.registerName("allowsExtendedAttributes"); +late final _sel_setAllowsExtendedAttributes_ = + objc.registerName("setAllowsExtendedAttributes:"); +final _objc_msgSend_41 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, bool)>(); - static NSScriptObjectSpecifier new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSScriptObjectSpecifier1, _lib._sel_new1); - return NSScriptObjectSpecifier._(_ret, _lib, retain: false, release: true); - } +abstract class NSAttributedStringMarkdownInterpretedSyntax { + static const int NSAttributedStringMarkdownInterpretedSyntaxFull = 0; + static const int NSAttributedStringMarkdownInterpretedSyntaxInlineOnly = 1; + static const int + NSAttributedStringMarkdownInterpretedSyntaxInlineOnlyPreservingWhitespace = + 2; +} - static NSScriptObjectSpecifier allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSScriptObjectSpecifier1, _lib._sel_allocWithZone_1, zone); - return NSScriptObjectSpecifier._(_ret, _lib, retain: false, release: true); - } +late final _sel_interpretedSyntax = objc.registerName("interpretedSyntax"); +final _objc_msgSend_42 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setInterpretedSyntax_ = + objc.registerName("setInterpretedSyntax:"); +final _objc_msgSend_43 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); - static NSScriptObjectSpecifier alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSScriptObjectSpecifier1, _lib._sel_alloc1); - return NSScriptObjectSpecifier._(_ret, _lib, retain: false, release: true); - } +abstract class NSAttributedStringMarkdownParsingFailurePolicy { + static const int NSAttributedStringMarkdownParsingFailureReturnError = 0; + static const int + NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible = + 1; +} - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSScriptObjectSpecifier1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } +late final _sel_failurePolicy = objc.registerName("failurePolicy"); +final _objc_msgSend_44 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setFailurePolicy_ = objc.registerName("setFailurePolicy:"); +final _objc_msgSend_45 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_languageCode = objc.registerName("languageCode"); +late final _sel_setLanguageCode_ = objc.registerName("setLanguageCode:"); +final _objc_msgSend_46 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_appliesSourcePositionAttributes = + objc.registerName("appliesSourcePositionAttributes"); +late final _sel_setAppliesSourcePositionAttributes_ = + objc.registerName("setAppliesSourcePositionAttributes:"); +late final _sel_new = objc.registerName("new"); - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSScriptObjectSpecifier1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } +final class _NSZone extends ffi.Opaque {} - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSScriptObjectSpecifier1, - _lib._sel_accessInstanceVariablesDirectly1); - } +late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); +final _objc_msgSend_47 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_NSZone>)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_NSZone>)>(); +late final _sel_alloc = objc.registerName("alloc"); +late final _sel_cancelPreviousPerformRequestsWithTarget_selector_object_ = objc + .registerName("cancelPreviousPerformRequestsWithTarget:selector:object:"); +final _objc_msgSend_48 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_cancelPreviousPerformRequestsWithTarget_ = + objc.registerName("cancelPreviousPerformRequestsWithTarget:"); +final _objc_msgSend_49 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_accessInstanceVariablesDirectly = + objc.registerName("accessInstanceVariablesDirectly"); +late final _sel_useStoredAccessor = objc.registerName("useStoredAccessor"); +late final _sel_keyPathsForValuesAffectingValueForKey_ = + objc.registerName("keyPathsForValuesAffectingValueForKey:"); +final _objc_msgSend_50 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_automaticallyNotifiesObserversForKey_ = + objc.registerName("automaticallyNotifiesObserversForKey:"); +final _objc_msgSend_51 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setKeys_triggerChangeNotificationsForDependentKey_ = + objc.registerName("setKeys:triggerChangeNotificationsForDependentKey:"); +final _objc_msgSend_52 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_classFallbacksForKeyedArchiver = + objc.registerName("classFallbacksForKeyedArchiver"); +late final _sel_classForKeyedUnarchiver = + objc.registerName("classForKeyedUnarchiver"); +final _objc_msgSend_0 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); +late final _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_ = + objc.registerName( + "initWithContentsOfMarkdownFileAtURL:options:baseURL:error:"); +final _objc_msgSend_53 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_initWithMarkdown_options_baseURL_error_ = + objc.registerName("initWithMarkdown:options:baseURL:error:"); +final _objc_msgSend_54 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_initWithMarkdownString_options_baseURL_error_ = + objc.registerName("initWithMarkdownString:options:baseURL:error:"); +final _objc_msgSend_55 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSScriptObjectSpecifier1, _lib._sel_useStoredAccessor1); - } +abstract class NSAttributedStringFormattingOptions { + static const int + NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging = 1; + static const int NSAttributedStringFormattingApplyReplacementIndexAttribute = + 2; +} - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSScriptObjectSpecifier1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } +late final _sel_initWithFormat_options_locale_ = + objc.registerName("initWithFormat:options:locale:"); +final _objc_msgSend_56 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSScriptObjectSpecifier1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } +final class __va_list_tag extends ffi.Struct { + @ffi.UnsignedInt() + external int gp_offset; - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSScriptObjectSpecifier1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } + @ffi.UnsignedInt() + external int fp_offset; - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSScriptObjectSpecifier1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer overflow_arg_area; - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSScriptObjectSpecifier1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer reg_save_area; } -class NSAppleEventDescriptor extends NSObject { - NSAppleEventDescriptor._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +late final _sel_initWithFormat_options_locale_arguments_ = + objc.registerName("initWithFormat:options:locale:arguments:"); +final _objc_msgSend_57 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>(); +late final _sel_localizedAttributedStringWithFormat_ = + objc.registerName("localizedAttributedStringWithFormat:"); +late final _sel_localizedAttributedStringWithFormat_options_ = + objc.registerName("localizedAttributedStringWithFormat:options:"); +final _objc_msgSend_58 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_initWithFormat_options_locale_context_ = + objc.registerName("initWithFormat:options:locale:context:"); +final _objc_msgSend_59 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithFormat_options_locale_context_arguments_ = + objc.registerName("initWithFormat:options:locale:context:arguments:"); +final _objc_msgSend_60 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>(); +late final _sel_localizedAttributedStringWithFormat_context_ = + objc.registerName("localizedAttributedStringWithFormat:context:"); +final _objc_msgSend_61 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_localizedAttributedStringWithFormat_options_context_ = + objc.registerName("localizedAttributedStringWithFormat:options:context:"); +final _objc_msgSend_62 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_attributedStringByInflectingString = + objc.registerName("attributedStringByInflectingString"); +final _objc_msgSend_63 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_localizedAttributedStringForKey_value_table_ = + objc.registerName("localizedAttributedStringForKey:value:table:"); +final _objc_msgSend_64 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_bundleIdentifier = objc.registerName("bundleIdentifier"); +late final _sel_infoDictionary = objc.registerName("infoDictionary"); +final _objc_msgSend_65 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_localizedInfoDictionary = + objc.registerName("localizedInfoDictionary"); +late final _sel_objectForInfoDictionaryKey_ = + objc.registerName("objectForInfoDictionaryKey:"); +late final _sel_classNamed_ = objc.registerName("classNamed:"); +late final _sel_principalClass = objc.registerName("principalClass"); +final _objc_msgSend_66 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_preferredLocalizations = + objc.registerName("preferredLocalizations"); +late final _sel_localizations = objc.registerName("localizations"); +late final _sel_developmentLocalization = + objc.registerName("developmentLocalization"); +late final _sel_preferredLocalizationsFromArray_ = + objc.registerName("preferredLocalizationsFromArray:"); +final _objc_msgSend_67 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_preferredLocalizationsFromArray_forPreferences_ = + objc.registerName("preferredLocalizationsFromArray:forPreferences:"); +final _objc_msgSend_68 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_executableArchitectures = + objc.registerName("executableArchitectures"); +final _objc_msgSend_69 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setPreservationPriority_forTags_ = + objc.registerName("setPreservationPriority:forTags:"); +final _objc_msgSend_70 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer)>(); +late final _sel_preservationPriorityForTag_ = + objc.registerName("preservationPriorityForTag:"); +final _objc_msgSend_71 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_71Fpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - /// Returns a [NSAppleEventDescriptor] that points to the same underlying object as [other]. - static NSAppleEventDescriptor castFrom(T other) { - return NSAppleEventDescriptor._(other._id, other._lib, - retain: true, release: true); - } +class NSMutableAttributedString extends NSAttributedString { + NSMutableAttributedString._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSAppleEventDescriptor] that wraps the given raw object pointer. - static NSAppleEventDescriptor castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSAppleEventDescriptor._(other, lib, - retain: retain, release: release); - } + /// Constructs a [NSMutableAttributedString] that points to the same underlying object as [other]. + NSMutableAttributedString.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns whether [obj] is an instance of [NSAppleEventDescriptor]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSAppleEventDescriptor1); - } + /// Constructs a [NSMutableAttributedString] that wraps the given raw object pointer. + NSMutableAttributedString.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static NSAppleEventDescriptor nullDescriptor(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_601( - _lib._class_NSAppleEventDescriptor1, _lib._sel_nullDescriptor1); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSMutableAttributedString]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMutableAttributedString); } - static NSAppleEventDescriptor? descriptorWithDescriptorType_bytes_length_( - SwiftLibrary _lib, - int descriptorType, - ffi.Pointer bytes, - int byteCount) { - final _ret = _lib._objc_msgSend_602( - _lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithDescriptorType_bytes_length_1, - descriptorType, - bytes, - byteCount); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void replaceCharactersInRange_withString_(_NSRange range, objc.NSString str) { + _objc_msgSend_72(this.pointer, _sel_replaceCharactersInRange_withString_, + range, str.pointer); } - static NSAppleEventDescriptor? descriptorWithDescriptorType_data_( - SwiftLibrary _lib, int descriptorType, NSData? data) { - final _ret = _lib._objc_msgSend_603( - _lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithDescriptorType_data_1, - descriptorType, - data?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void setAttributes_range_(objc.NSDictionary? attrs, _NSRange range) { + _objc_msgSend_73(this.pointer, _sel_setAttributes_range_, + attrs?.pointer ?? ffi.nullptr, range); } - static NSAppleEventDescriptor descriptorWithBoolean_( - SwiftLibrary _lib, int boolean) { - final _ret = _lib._objc_msgSend_604(_lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithBoolean_1, boolean); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + objc.NSMutableString get mutableString { + final _ret = _objc_msgSend_74(this.pointer, _sel_mutableString); + return objc.NSMutableString.castFromPointer(_ret, + retain: true, release: true); } - static NSAppleEventDescriptor descriptorWithEnumCode_( - SwiftLibrary _lib, int enumerator) { - final _ret = _lib._objc_msgSend_605(_lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithEnumCode_1, enumerator); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void addAttribute_value_range_( + objc.NSString name, objc.NSObject value, _NSRange range) { + _objc_msgSend_75(this.pointer, _sel_addAttribute_value_range_, name.pointer, + value.pointer, range); } - static NSAppleEventDescriptor descriptorWithInt32_( - SwiftLibrary _lib, int signedInt) { - final _ret = _lib._objc_msgSend_606(_lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithInt32_1, signedInt); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void addAttributes_range_(objc.NSDictionary attrs, _NSRange range) { + _objc_msgSend_76( + this.pointer, _sel_addAttributes_range_, attrs.pointer, range); } - static NSAppleEventDescriptor descriptorWithDouble_( - SwiftLibrary _lib, double doubleValue) { - final _ret = _lib._objc_msgSend_607(_lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithDouble_1, doubleValue); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void removeAttribute_range_(objc.NSString name, _NSRange range) { + _objc_msgSend_77( + this.pointer, _sel_removeAttribute_range_, name.pointer, range); } - static NSAppleEventDescriptor descriptorWithTypeCode_( - SwiftLibrary _lib, int typeCode) { - final _ret = _lib._objc_msgSend_605(_lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithTypeCode_1, typeCode); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void replaceCharactersInRange_withAttributedString_( + _NSRange range, NSAttributedString attrString) { + _objc_msgSend_78( + this.pointer, + _sel_replaceCharactersInRange_withAttributedString_, + range, + attrString.pointer); } - static NSAppleEventDescriptor descriptorWithString_( - SwiftLibrary _lib, NSString string) { - final _ret = _lib._objc_msgSend_608(_lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithString_1, string._id); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void insertAttributedString_atIndex_(NSAttributedString attrString, int loc) { + _objc_msgSend_79(this.pointer, _sel_insertAttributedString_atIndex_, + attrString.pointer, loc); } - static NSAppleEventDescriptor descriptorWithDate_( - SwiftLibrary _lib, NSDate date) { - final _ret = _lib._objc_msgSend_609(_lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithDate_1, date._id); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void appendAttributedString_(NSAttributedString attrString) { + _objc_msgSend_80( + this.pointer, _sel_appendAttributedString_, attrString.pointer); } - static NSAppleEventDescriptor descriptorWithFileURL_( - SwiftLibrary _lib, NSURL fileURL) { - final _ret = _lib._objc_msgSend_610(_lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithFileURL_1, fileURL._id); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void deleteCharactersInRange_(_NSRange range) { + _objc_msgSend_81(this.pointer, _sel_deleteCharactersInRange_, range); } - static NSAppleEventDescriptor - appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_( - SwiftLibrary _lib, - int eventClass, - int eventID, - NSAppleEventDescriptor? targetDescriptor, - int returnID, - int transactionID) { - final _ret = _lib._objc_msgSend_611( - _lib._class_NSAppleEventDescriptor1, - _lib._sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_1, - eventClass, - eventID, - targetDescriptor?._id ?? ffi.nullptr, - returnID, - transactionID); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void setAttributedString_(NSAttributedString attrString) { + _objc_msgSend_80( + this.pointer, _sel_setAttributedString_, attrString.pointer); } - static NSAppleEventDescriptor listDescriptor(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_601( - _lib._class_NSAppleEventDescriptor1, _lib._sel_listDescriptor1); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void beginEditing() { + _objc_msgSend_82(this.pointer, _sel_beginEditing); } - static NSAppleEventDescriptor recordDescriptor(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_601( - _lib._class_NSAppleEventDescriptor1, _lib._sel_recordDescriptor1); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void endEditing() { + _objc_msgSend_82(this.pointer, _sel_endEditing); } - static NSAppleEventDescriptor currentProcessDescriptor(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_601(_lib._class_NSAppleEventDescriptor1, - _lib._sel_currentProcessDescriptor1); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void appendLocalizedFormat_(NSAttributedString format) { + _objc_msgSend_80(this.pointer, _sel_appendLocalizedFormat_, format.pointer); } - static NSAppleEventDescriptor descriptorWithProcessIdentifier_( - SwiftLibrary _lib, int processIdentifier) { - final _ret = _lib._objc_msgSend_606(_lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithProcessIdentifier_1, processIdentifier); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + @override + NSMutableAttributedString initWithString_(objc.NSString str) { + final _ret = + _objc_msgSend_35(this.pointer, _sel_initWithString_, str.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSAppleEventDescriptor descriptorWithBundleIdentifier_( - SwiftLibrary _lib, NSString bundleIdentifier) { - final _ret = _lib._objc_msgSend_608(_lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithBundleIdentifier_1, bundleIdentifier._id); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + @override + NSMutableAttributedString initWithString_attributes_( + objc.NSString str, objc.NSDictionary? attrs) { + final _ret = _objc_msgSend_36(this.pointer, _sel_initWithString_attributes_, + str.pointer, attrs?.pointer ?? ffi.nullptr); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSAppleEventDescriptor descriptorWithApplicationURL_( - SwiftLibrary _lib, NSURL applicationURL) { - final _ret = _lib._objc_msgSend_610(_lib._class_NSAppleEventDescriptor1, - _lib._sel_descriptorWithApplicationURL_1, applicationURL._id); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + @override + NSMutableAttributedString initWithAttributedString_( + NSAttributedString attrStr) { + final _ret = _objc_msgSend_37( + this.pointer, _sel_initWithAttributedString_, attrStr.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSAppleEventDescriptor initWithAEDescNoCopy_(ffi.Pointer aeDesc) { - final _ret = - _lib._objc_msgSend_612(_id, _lib._sel_initWithAEDescNoCopy_1, aeDesc); - return NSAppleEventDescriptor._(_ret, _lib, retain: false, release: true); + @override + NSMutableAttributedString? + initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( + objc.NSURL markdownFile, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_53( + this.pointer, + _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_, + markdownFile.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSAppleEventDescriptor? initWithDescriptorType_bytes_length_( - int descriptorType, ffi.Pointer bytes, int byteCount) { - final _ret = _lib._objc_msgSend_613( - _id, - _lib._sel_initWithDescriptorType_bytes_length_1, - descriptorType, - bytes, - byteCount); + @override + NSMutableAttributedString? initWithMarkdown_options_baseURL_error_( + objc.NSData markdown, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_54( + this.pointer, + _sel_initWithMarkdown_options_baseURL_error_, + markdown.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, + error); return _ret.address == 0 ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + : NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSAppleEventDescriptor? initWithDescriptorType_data_( - int descriptorType, NSData? data) { - final _ret = _lib._objc_msgSend_614( - _id, - _lib._sel_initWithDescriptorType_data_1, - descriptorType, - data?._id ?? ffi.nullptr); + @override + NSMutableAttributedString? initWithMarkdownString_options_baseURL_error_( + objc.NSString markdownString, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_55( + this.pointer, + _sel_initWithMarkdownString_options_baseURL_error_, + markdownString.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, + error); return _ret.address == 0 ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + : NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSAppleEventDescriptor - initWithEventClass_eventID_targetDescriptor_returnID_transactionID_( - int eventClass, - int eventID, - NSAppleEventDescriptor? targetDescriptor, - int returnID, - int transactionID) { - final _ret = _lib._objc_msgSend_615( - _id, - _lib._sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_1, - eventClass, - eventID, - targetDescriptor?._id ?? ffi.nullptr, - returnID, - transactionID); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + @override + NSMutableAttributedString initWithFormat_options_locale_( + NSAttributedString format, int options, objc.NSLocale? locale) { + final _ret = _objc_msgSend_56( + this.pointer, + _sel_initWithFormat_options_locale_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSAppleEventDescriptor initListDescriptor() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_initListDescriptor1); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + @override + NSMutableAttributedString initWithFormat_options_locale_arguments_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + ffi.Pointer<__va_list_tag> arguments) { + final _ret = _objc_msgSend_57( + this.pointer, + _sel_initWithFormat_options_locale_arguments_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr, + arguments); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSAppleEventDescriptor initRecordDescriptor() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_initRecordDescriptor1); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + static NSMutableAttributedString localizedAttributedStringWithFormat_( + NSAttributedString format) { + final _ret = _objc_msgSend_37(_class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_, format.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - ffi.Pointer get aeDesc { - return _lib._objc_msgSend_616(_id, _lib._sel_aeDesc1); + static NSMutableAttributedString localizedAttributedStringWithFormat_options_( + NSAttributedString format, int options) { + final _ret = _objc_msgSend_58( + _class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_options_, + format.pointer, + options); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - int get descriptorType { - return _lib._objc_msgSend_214(_id, _lib._sel_descriptorType1); + @override + NSMutableAttributedString initWithFormat_options_locale_context_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + objc.NSDictionary context) { + final _ret = _objc_msgSend_59( + this.pointer, + _sel_initWithFormat_options_locale_context_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr, + context.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSData get data { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_data1); - return NSData._(_ret, _lib, retain: true, release: true); + @override + NSMutableAttributedString initWithFormat_options_locale_context_arguments_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + objc.NSDictionary context, + ffi.Pointer<__va_list_tag> arguments) { + final _ret = _objc_msgSend_60( + this.pointer, + _sel_initWithFormat_options_locale_context_arguments_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr, + context.pointer, + arguments); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - int get booleanValue { - return _lib._objc_msgSend_234(_id, _lib._sel_booleanValue1); + static NSMutableAttributedString localizedAttributedStringWithFormat_context_( + NSAttributedString format, objc.NSDictionary context) { + final _ret = _objc_msgSend_61( + _class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_context_, + format.pointer, + context.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - int get enumCodeValue { - return _lib._objc_msgSend_214(_id, _lib._sel_enumCodeValue1); + static NSMutableAttributedString + localizedAttributedStringWithFormat_options_context_( + NSAttributedString format, int options, objc.NSDictionary context) { + final _ret = _objc_msgSend_62( + _class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_options_context_, + format.pointer, + options, + context.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - int get int32Value { - return _lib._objc_msgSend_237(_id, _lib._sel_int32Value1); + @override + NSMutableAttributedString init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - double get doubleValue { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_doubleValue1) - : _lib._objc_msgSend_165(_id, _lib._sel_doubleValue1); + static NSMutableAttributedString new1() { + final _ret = _objc_msgSend_40(_class_NSMutableAttributedString, _sel_new); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } - int get typeCodeValue { - return _lib._objc_msgSend_214(_id, _lib._sel_typeCodeValue1); + static NSMutableAttributedString allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSMutableAttributedString, _sel_allocWithZone_, zone); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } - NSString? get stringValue { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_stringValue1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static NSMutableAttributedString alloc() { + final _ret = _objc_msgSend_40(_class_NSMutableAttributedString, _sel_alloc); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } - NSDate? get dateValue { - final _ret = _lib._objc_msgSend_183(_id, _lib._sel_dateValue1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSMutableAttributedString, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSURL? get fileURLValue { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_fileURLValue1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSMutableAttributedString, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - int get eventClass { - return _lib._objc_msgSend_214(_id, _lib._sel_eventClass1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSMutableAttributedString, _sel_accessInstanceVariablesDirectly); } - int get eventID { - return _lib._objc_msgSend_214(_id, _lib._sel_eventID1); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSMutableAttributedString, _sel_useStoredAccessor); } - int get returnID { - return _lib._objc_msgSend_235(_id, _lib._sel_returnID1); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSMutableAttributedString, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - int get transactionID { - return _lib._objc_msgSend_237(_id, _lib._sel_transactionID1); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSMutableAttributedString, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - void setParamDescriptor_forKeyword_( - NSAppleEventDescriptor descriptor, int keyword) { - _lib._objc_msgSend_617(_id, _lib._sel_setParamDescriptor_forKeyword_1, - descriptor._id, keyword); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSMutableAttributedString, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSMutableAttributedString, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSMutableAttributedString, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSMutableAttributedString = + objc.getClass("NSMutableAttributedString"); +late final _sel_replaceCharactersInRange_withString_ = + objc.registerName("replaceCharactersInRange:withString:"); +final _objc_msgSend_72 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_setAttributes_range_ = + objc.registerName("setAttributes:range:"); +final _objc_msgSend_73 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); +late final _sel_mutableString = objc.registerName("mutableString"); +final _objc_msgSend_74 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_addAttribute_value_range_ = + objc.registerName("addAttribute:value:range:"); +final _objc_msgSend_75 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); +late final _sel_addAttributes_range_ = + objc.registerName("addAttributes:range:"); +final _objc_msgSend_76 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); +late final _sel_removeAttribute_range_ = + objc.registerName("removeAttribute:range:"); +final _objc_msgSend_77 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); +late final _sel_replaceCharactersInRange_withAttributedString_ = + objc.registerName("replaceCharactersInRange:withAttributedString:"); +final _objc_msgSend_78 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_insertAttributedString_atIndex_ = + objc.registerName("insertAttributedString:atIndex:"); +final _objc_msgSend_79 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_appendAttributedString_ = + objc.registerName("appendAttributedString:"); +final _objc_msgSend_80 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_deleteCharactersInRange_ = + objc.registerName("deleteCharactersInRange:"); +final _objc_msgSend_81 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_setAttributedString_ = + objc.registerName("setAttributedString:"); +late final _sel_beginEditing = objc.registerName("beginEditing"); +final _objc_msgSend_82 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_endEditing = objc.registerName("endEditing"); +late final _sel_appendLocalizedFormat_ = + objc.registerName("appendLocalizedFormat:"); - NSAppleEventDescriptor? paramDescriptorForKeyword_(int keyword) { - final _ret = _lib._objc_msgSend_618( - _id, _lib._sel_paramDescriptorForKeyword_1, keyword); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); - } +class NSDateFormatter extends NSFormatter { + NSDateFormatter._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - void removeParamDescriptorWithKeyword_(int keyword) { - _lib._objc_msgSend_619( - _id, _lib._sel_removeParamDescriptorWithKeyword_1, keyword); - } + /// Constructs a [NSDateFormatter] that points to the same underlying object as [other]. + NSDateFormatter.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - void setAttributeDescriptor_forKeyword_( - NSAppleEventDescriptor descriptor, int keyword) { - _lib._objc_msgSend_617(_id, _lib._sel_setAttributeDescriptor_forKeyword_1, - descriptor._id, keyword); - } + /// Constructs a [NSDateFormatter] that wraps the given raw object pointer. + NSDateFormatter.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - NSAppleEventDescriptor? attributeDescriptorForKeyword_(int keyword) { - final _ret = _lib._objc_msgSend_618( - _id, _lib._sel_attributeDescriptorForKeyword_1, keyword); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSDateFormatter]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSDateFormatter); } - NSAppleEventDescriptor? sendEventWithOptions_timeout_error_(int sendOptions, - double timeoutInSeconds, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_620( - _id, - _lib._sel_sendEventWithOptions_timeout_error_1, - sendOptions, - timeoutInSeconds, - error); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + int get formattingContext { + return _objc_msgSend_89(this.pointer, _sel_formattingContext); } - bool get isRecordDescriptor { - return _lib._objc_msgSend_12(_id, _lib._sel_isRecordDescriptor1); + set formattingContext(int value) { + return _objc_msgSend_90(this.pointer, _sel_setFormattingContext_, value); } - int get numberOfItems { - return _lib._objc_msgSend_83(_id, _lib._sel_numberOfItems1); + bool getObjectValue_forString_range_error_( + ffi.Pointer> obj, + objc.NSString string, + ffi.Pointer<_NSRange> rangep, + ffi.Pointer> error) { + return _objc_msgSend_91( + this.pointer, + _sel_getObjectValue_forString_range_error_, + obj, + string.pointer, + rangep, + error); } - void insertDescriptor_atIndex_(NSAppleEventDescriptor descriptor, int index) { - _lib._objc_msgSend_621( - _id, _lib._sel_insertDescriptor_atIndex_1, descriptor._id, index); + objc.NSString stringFromDate_(objc.NSDate date) { + final _ret = + _objc_msgSend_92(this.pointer, _sel_stringFromDate_, date.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSAppleEventDescriptor? descriptorAtIndex_(int index) { + objc.NSDate? dateFromString_(objc.NSString string) { final _ret = - _lib._objc_msgSend_622(_id, _lib._sel_descriptorAtIndex_1, index); + _objc_msgSend_93(this.pointer, _sel_dateFromString_, string.pointer); return _ret.address == 0 ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - void removeDescriptorAtIndex_(int index) { - _lib._objc_msgSend_423(_id, _lib._sel_removeDescriptorAtIndex_1, index); - } - - void setDescriptor_forKeyword_( - NSAppleEventDescriptor descriptor, int keyword) { - _lib._objc_msgSend_617( - _id, _lib._sel_setDescriptor_forKeyword_1, descriptor._id, keyword); + static objc.NSString localizedStringFromDate_dateStyle_timeStyle_( + objc.NSDate date, int dstyle, int tstyle) { + final _ret = _objc_msgSend_94( + _class_NSDateFormatter, + _sel_localizedStringFromDate_dateStyle_timeStyle_, + date.pointer, + dstyle, + tstyle); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSAppleEventDescriptor? descriptorForKeyword_(int keyword) { - final _ret = - _lib._objc_msgSend_618(_id, _lib._sel_descriptorForKeyword_1, keyword); + static objc.NSString? dateFormatFromTemplate_options_locale_( + objc.NSString tmplate, int opts, objc.NSLocale? locale) { + final _ret = _objc_msgSend_95( + _class_NSDateFormatter, + _sel_dateFormatFromTemplate_options_locale_, + tmplate.pointer, + opts, + locale?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); - } - - void removeDescriptorWithKeyword_(int keyword) { - _lib._objc_msgSend_619( - _id, _lib._sel_removeDescriptorWithKeyword_1, keyword); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int keywordForDescriptorAtIndex_(int index) { - return _lib._objc_msgSend_623( - _id, _lib._sel_keywordForDescriptorAtIndex_1, index); + static int getDefaultFormatterBehavior() { + return _objc_msgSend_96( + _class_NSDateFormatter, _sel_defaultFormatterBehavior); } - NSAppleEventDescriptor? coerceToDescriptorType_(int descriptorType) { - final _ret = _lib._objc_msgSend_618( - _id, _lib._sel_coerceToDescriptorType_1, descriptorType); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + static void setDefaultFormatterBehavior(int value) { + return _objc_msgSend_97( + _class_NSDateFormatter, _sel_setDefaultFormatterBehavior_, value); } - @override - NSAppleEventDescriptor init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + void setLocalizedDateFormatFromTemplate_(objc.NSString dateFormatTemplate) { + _objc_msgSend_98(this.pointer, _sel_setLocalizedDateFormatFromTemplate_, + dateFormatTemplate.pointer); } - static NSAppleEventDescriptor new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSAppleEventDescriptor1, _lib._sel_new1); - return NSAppleEventDescriptor._(_ret, _lib, retain: false, release: true); + objc.NSString get dateFormat { + final _ret = _objc_msgSend_12(this.pointer, _sel_dateFormat); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSAppleEventDescriptor allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSAppleEventDescriptor1, _lib._sel_allocWithZone_1, zone); - return NSAppleEventDescriptor._(_ret, _lib, retain: false, release: true); + set dateFormat(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setDateFormat_, value.pointer); } - static NSAppleEventDescriptor alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSAppleEventDescriptor1, _lib._sel_alloc1); - return NSAppleEventDescriptor._(_ret, _lib, retain: false, release: true); + int get dateStyle { + return _objc_msgSend_100(this.pointer, _sel_dateStyle); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSAppleEventDescriptor1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + set dateStyle(int value) { + return _objc_msgSend_101(this.pointer, _sel_setDateStyle_, value); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSAppleEventDescriptor1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + int get timeStyle { + return _objc_msgSend_100(this.pointer, _sel_timeStyle); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSAppleEventDescriptor1, - _lib._sel_accessInstanceVariablesDirectly1); + set timeStyle(int value) { + return _objc_msgSend_101(this.pointer, _sel_setTimeStyle_, value); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSAppleEventDescriptor1, _lib._sel_useStoredAccessor1); + objc.NSLocale get locale { + final _ret = _objc_msgSend_102(this.pointer, _sel_locale); + return objc.NSLocale.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSAppleEventDescriptor1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + set locale(objc.NSLocale value) { + return _objc_msgSend_103(this.pointer, _sel_setLocale_, value.pointer); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSAppleEventDescriptor1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + bool get generatesCalendarDates { + return _objc_msgSend_7(this.pointer, _sel_generatesCalendarDates); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSAppleEventDescriptor1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + set generatesCalendarDates(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setGeneratesCalendarDates_, value); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSAppleEventDescriptor1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + int get formatterBehavior { + return _objc_msgSend_96(this.pointer, _sel_formatterBehavior); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSAppleEventDescriptor1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + set formatterBehavior(int value) { + return _objc_msgSend_97(this.pointer, _sel_setFormatterBehavior_, value); } -} - -@ffi.Packed(2) -final class AEDesc extends ffi.Struct { - @ffi.UnsignedInt() - external int descriptorType; - - external ffi.Pointer> dataHandle; -} - -final class OpaqueAEDataStorageType extends ffi.Opaque {} - -abstract class NSAppleEventSendOptions { - static const int NSAppleEventSendNoReply = 1; - static const int NSAppleEventSendQueueReply = 2; - static const int NSAppleEventSendWaitForReply = 3; - static const int NSAppleEventSendNeverInteract = 16; - static const int NSAppleEventSendCanInteract = 32; - static const int NSAppleEventSendAlwaysInteract = 48; - static const int NSAppleEventSendCanSwitchLayer = 64; - static const int NSAppleEventSendDontRecord = 4096; - static const int NSAppleEventSendDontExecute = 8192; - static const int NSAppleEventSendDontAnnotate = 65536; - static const int NSAppleEventSendDefaultOptions = 35; -} - -class NSScriptClassDescription extends NSClassDescription { - NSScriptClassDescription._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSScriptClassDescription] that points to the same underlying object as [other]. - static NSScriptClassDescription castFrom(T other) { - return NSScriptClassDescription._(other._id, other._lib, - retain: true, release: true); + NSTimeZone get timeZone { + final _ret = _objc_msgSend_110(this.pointer, _sel_timeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSScriptClassDescription] that wraps the given raw object pointer. - static NSScriptClassDescription castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSScriptClassDescription._(other, lib, - retain: retain, release: release); + set timeZone(NSTimeZone value) { + return _objc_msgSend_111(this.pointer, _sel_setTimeZone_, value.pointer); } - /// Returns whether [obj] is an instance of [NSScriptClassDescription]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSScriptClassDescription1); + NSCalendar get calendar { + final _ret = _objc_msgSend_121(this.pointer, _sel_calendar); + return NSCalendar.castFromPointer(_ret, retain: true, release: true); } - static NSScriptClassDescription? classDescriptionForClass_( - SwiftLibrary _lib, NSObject aClass) { - final _ret = _lib._objc_msgSend_626(_lib._class_NSScriptClassDescription1, - _lib._sel_classDescriptionForClass_1, aClass._id); - return _ret.address == 0 - ? null - : NSScriptClassDescription._(_ret, _lib, retain: true, release: true); + set calendar(NSCalendar value) { + return _objc_msgSend_161(this.pointer, _sel_setCalendar_, value.pointer); } - NSScriptClassDescription? initWithSuiteName_className_dictionary_( - NSString suiteName, NSString className, NSDictionary? classDeclaration) { - final _ret = _lib._objc_msgSend_627( - _id, - _lib._sel_initWithSuiteName_className_dictionary_1, - suiteName._id, - className._id, - classDeclaration?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSScriptClassDescription._(_ret, _lib, retain: true, release: true); + bool get lenient { + return _objc_msgSend_7(this.pointer, _sel_isLenient); } - NSString? get suiteName { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_suiteName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + set lenient(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setLenient_, value); } - NSString? get className { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_className1); + objc.NSDate? get twoDigitStartDate { + final _ret = _objc_msgSend_116(this.pointer, _sel_twoDigitStartDate); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - NSString? get implementationClassName { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_implementationClassName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + set twoDigitStartDate(objc.NSDate? value) { + return _objc_msgSend_162(this.pointer, _sel_setTwoDigitStartDate_, + value?.pointer ?? ffi.nullptr); } - NSScriptClassDescription? get superclassDescription { - final _ret = _lib._objc_msgSend_628(_id, _lib._sel_superclassDescription1); + objc.NSDate? get defaultDate { + final _ret = _objc_msgSend_116(this.pointer, _sel_defaultDate); return _ret.address == 0 ? null - : NSScriptClassDescription._(_ret, _lib, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - int get appleEventCode { - return _lib._objc_msgSend_214(_id, _lib._sel_appleEventCode1); + set defaultDate(objc.NSDate? value) { + return _objc_msgSend_162( + this.pointer, _sel_setDefaultDate_, value?.pointer ?? ffi.nullptr); } - bool matchesAppleEventCode_(int appleEventCode) { - return _lib._objc_msgSend_194( - _id, _lib._sel_matchesAppleEventCode_1, appleEventCode); + objc.NSArray get eraSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_eraSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool supportsCommand_(NSScriptCommandDescription commandDescription) { - return _lib._objc_msgSend_641( - _id, _lib._sel_supportsCommand_1, commandDescription._id); + set eraSymbols(objc.NSArray value) { + return _objc_msgSend_163(this.pointer, _sel_setEraSymbols_, value.pointer); } - ffi.Pointer selectorForCommand_( - NSScriptCommandDescription commandDescription) { - return _lib._objc_msgSend_642( - _id, _lib._sel_selectorForCommand_1, commandDescription._id); + objc.NSArray get monthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_monthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString? typeForKey_(NSString key) { - final _ret = _lib._objc_msgSend_186(_id, _lib._sel_typeForKey_1, key._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + set monthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setMonthSymbols_, value.pointer); } - NSScriptClassDescription? classDescriptionForKey_(NSString key) { - final _ret = _lib._objc_msgSend_643( - _id, _lib._sel_classDescriptionForKey_1, key._id); - return _ret.address == 0 - ? null - : NSScriptClassDescription._(_ret, _lib, retain: true, release: true); + objc.NSArray get shortMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int appleEventCodeForKey_(NSString key) { - return _lib._objc_msgSend_629( - _id, _lib._sel_appleEventCodeForKey_1, key._id); + set shortMonthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortMonthSymbols_, value.pointer); } - NSString? keyWithAppleEventCode_(int appleEventCode) { - final _ret = _lib._objc_msgSend_644( - _id, _lib._sel_keyWithAppleEventCode_1, appleEventCode); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + objc.NSArray get weekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_weekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString? get defaultSubcontainerAttributeKey { - final _ret = - _lib._objc_msgSend_44(_id, _lib._sel_defaultSubcontainerAttributeKey1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + set weekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setWeekdaySymbols_, value.pointer); } - bool isLocationRequiredToCreateForKey_(NSString toManyRelationshipKey) { - return _lib._objc_msgSend_64( - _id, - _lib._sel_isLocationRequiredToCreateForKey_1, - toManyRelationshipKey._id); + objc.NSArray get shortWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool hasPropertyForKey_(NSString key) { - return _lib._objc_msgSend_64(_id, _lib._sel_hasPropertyForKey_1, key._id); + set shortWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortWeekdaySymbols_, value.pointer); } - bool hasOrderedToManyRelationshipForKey_(NSString key) { - return _lib._objc_msgSend_64( - _id, _lib._sel_hasOrderedToManyRelationshipForKey_1, key._id); + objc.NSString get AMSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_AMSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool hasReadablePropertyForKey_(NSString key) { - return _lib._objc_msgSend_64( - _id, _lib._sel_hasReadablePropertyForKey_1, key._id); + set AMSymbol(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setAMSymbol_, value.pointer); } - bool hasWritablePropertyForKey_(NSString key) { - return _lib._objc_msgSend_64( - _id, _lib._sel_hasWritablePropertyForKey_1, key._id); + objc.NSString get PMSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_PMSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool isReadOnlyKey_(NSString key) { - return _lib._objc_msgSend_64(_id, _lib._sel_isReadOnlyKey_1, key._id); + set PMSymbol(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setPMSymbol_, value.pointer); } - static void registerClassDescription_forClass_( - SwiftLibrary _lib, NSClassDescription description, NSObject aClass) { - _lib._objc_msgSend_598( - _lib._class_NSScriptClassDescription1, - _lib._sel_registerClassDescription_forClass_1, - description._id, - aClass._id); + objc.NSArray get longEraSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_longEraSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static void invalidateClassDescriptionCache(SwiftLibrary _lib) { - _lib._objc_msgSend_1(_lib._class_NSScriptClassDescription1, - _lib._sel_invalidateClassDescriptionCache1); + set longEraSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setLongEraSymbols_, value.pointer); } - @override - NSScriptClassDescription init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSScriptClassDescription._(_ret, _lib, retain: true, release: true); + objc.NSArray get veryShortMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_veryShortMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSScriptClassDescription new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSScriptClassDescription1, _lib._sel_new1); - return NSScriptClassDescription._(_ret, _lib, retain: false, release: true); + set veryShortMonthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setVeryShortMonthSymbols_, value.pointer); } - static NSScriptClassDescription allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSScriptClassDescription1, _lib._sel_allocWithZone_1, zone); - return NSScriptClassDescription._(_ret, _lib, retain: false, release: true); + objc.NSArray get standaloneMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSScriptClassDescription alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSScriptClassDescription1, _lib._sel_alloc1); - return NSScriptClassDescription._(_ret, _lib, retain: false, release: true); + set standaloneMonthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setStandaloneMonthSymbols_, value.pointer); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSScriptClassDescription1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + objc.NSArray get shortStandaloneMonthSymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_shortStandaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSScriptClassDescription1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + set shortStandaloneMonthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortStandaloneMonthSymbols_, value.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSScriptClassDescription1, - _lib._sel_accessInstanceVariablesDirectly1); + objc.NSArray get veryShortStandaloneMonthSymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_veryShortStandaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSScriptClassDescription1, _lib._sel_useStoredAccessor1); + set veryShortStandaloneMonthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setVeryShortStandaloneMonthSymbols_, value.pointer); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSScriptClassDescription1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + objc.NSArray get veryShortWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_veryShortWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSScriptClassDescription1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + set veryShortWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setVeryShortWeekdaySymbols_, value.pointer); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSScriptClassDescription1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray get standaloneWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSScriptClassDescription1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + set standaloneWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setStandaloneWeekdaySymbols_, value.pointer); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSScriptClassDescription1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSArray get shortStandaloneWeekdaySymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_shortStandaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } -} - -class NSScriptCommandDescription extends NSObject { - NSScriptCommandDescription._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSScriptCommandDescription] that points to the same underlying object as [other]. - static NSScriptCommandDescription castFrom(T other) { - return NSScriptCommandDescription._(other._id, other._lib, - retain: true, release: true); + set shortStandaloneWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortStandaloneWeekdaySymbols_, value.pointer); } - /// Returns a [NSScriptCommandDescription] that wraps the given raw object pointer. - static NSScriptCommandDescription castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSScriptCommandDescription._(other, lib, - retain: retain, release: release); + objc.NSArray get veryShortStandaloneWeekdaySymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_veryShortStandaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSScriptCommandDescription]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSScriptCommandDescription1); + set veryShortStandaloneWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163(this.pointer, + _sel_setVeryShortStandaloneWeekdaySymbols_, value.pointer); } - @override - NSObject init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSArray get quarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_quarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSScriptCommandDescription? initWithSuiteName_commandName_dictionary_( - NSString suiteName, - NSString commandName, - NSDictionary? commandDeclaration) { - final _ret = _lib._objc_msgSend_627( - _id, - _lib._sel_initWithSuiteName_commandName_dictionary_1, - suiteName._id, - commandName._id, - commandDeclaration?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSScriptCommandDescription._(_ret, _lib, retain: true, release: true); + set quarterSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setQuarterSymbols_, value.pointer); } - NSScriptCommandDescription? initWithCoder_(NSCoder inCoder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, inCoder._id); - return _ret.address == 0 - ? null - : NSScriptCommandDescription._(_ret, _lib, retain: true, release: true); + objc.NSArray get shortQuarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString get suiteName { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_suiteName1); - return NSString._(_ret, _lib, retain: true, release: true); + set shortQuarterSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortQuarterSymbols_, value.pointer); } - NSString get commandName { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_commandName1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSArray get standaloneQuarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int get appleEventClassCode { - return _lib._objc_msgSend_214(_id, _lib._sel_appleEventClassCode1); + set standaloneQuarterSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setStandaloneQuarterSymbols_, value.pointer); } - int get appleEventCode { - return _lib._objc_msgSend_214(_id, _lib._sel_appleEventCode1); + objc.NSArray get shortStandaloneQuarterSymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_shortStandaloneQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString get commandClassName { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_commandClassName1); - return NSString._(_ret, _lib, retain: true, release: true); + set shortStandaloneQuarterSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortStandaloneQuarterSymbols_, value.pointer); } - NSString? get returnType { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_returnType1); + objc.NSDate? get gregorianStartDate { + final _ret = _objc_msgSend_116(this.pointer, _sel_gregorianStartDate); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - int get appleEventCodeForReturnType { - return _lib._objc_msgSend_214(_id, _lib._sel_appleEventCodeForReturnType1); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - NSArray get argumentNames { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_argumentNames1); - return NSArray._(_ret, _lib, retain: true, release: true); + set gregorianStartDate(objc.NSDate? value) { + return _objc_msgSend_162(this.pointer, _sel_setGregorianStartDate_, + value?.pointer ?? ffi.nullptr); } - NSString? typeForArgumentWithName_(NSString argumentName) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_typeForArgumentWithName_1, argumentName._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + bool get doesRelativeDateFormatting { + return _objc_msgSend_7(this.pointer, _sel_doesRelativeDateFormatting); } - int appleEventCodeForArgumentWithName_(NSString argumentName) { - return _lib._objc_msgSend_629( - _id, _lib._sel_appleEventCodeForArgumentWithName_1, argumentName._id); + set doesRelativeDateFormatting(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setDoesRelativeDateFormatting_, value); } - bool isOptionalArgumentWithName_(NSString argumentName) { - return _lib._objc_msgSend_64( - _id, _lib._sel_isOptionalArgumentWithName_1, argumentName._id); + objc.NSObject initWithDateFormat_allowNaturalLanguage_( + objc.NSString format, bool flag) { + final _ret = _objc_msgSend_164(this.pointer, + _sel_initWithDateFormat_allowNaturalLanguage_, format.pointer, flag); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSScriptCommand createCommandInstance() { - final _ret = _lib._objc_msgSend_639(_id, _lib._sel_createCommandInstance1); - return NSScriptCommand._(_ret, _lib, retain: true, release: true); + bool allowsNaturalLanguage() { + return _objc_msgSend_7(this.pointer, _sel_allowsNaturalLanguage); } - NSScriptCommand createCommandInstanceWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_640( - _id, _lib._sel_createCommandInstanceWithZone_1, zone); - return NSScriptCommand._(_ret, _lib, retain: true, release: true); + @override + NSDateFormatter init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSDateFormatter.castFromPointer(_ret, retain: true, release: true); } - static NSScriptCommandDescription new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSScriptCommandDescription1, _lib._sel_new1); - return NSScriptCommandDescription._(_ret, _lib, - retain: false, release: true); + static NSDateFormatter new1() { + final _ret = _objc_msgSend_40(_class_NSDateFormatter, _sel_new); + return NSDateFormatter.castFromPointer(_ret, retain: false, release: true); } - static NSScriptCommandDescription allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3(_lib._class_NSScriptCommandDescription1, - _lib._sel_allocWithZone_1, zone); - return NSScriptCommandDescription._(_ret, _lib, - retain: false, release: true); + static NSDateFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSDateFormatter, _sel_allocWithZone_, zone); + return NSDateFormatter.castFromPointer(_ret, retain: false, release: true); } - static NSScriptCommandDescription alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSScriptCommandDescription1, _lib._sel_alloc1); - return NSScriptCommandDescription._(_ret, _lib, - retain: false, release: true); + static NSDateFormatter alloc() { + final _ret = _objc_msgSend_40(_class_NSDateFormatter, _sel_alloc); + return NSDateFormatter.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSScriptCommandDescription1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSDateFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSScriptCommandDescription1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSDateFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSScriptCommandDescription1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSDateFormatter, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSScriptCommandDescription1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSDateFormatter, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSScriptCommandDescription1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSDateFormatter, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSScriptCommandDescription1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSDateFormatter, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSScriptCommandDescription1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSDateFormatter, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSScriptCommandDescription1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSDateFormatter, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSScriptCommandDescription1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSDateFormatter, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -class NSScriptCommand extends NSObject { - NSScriptCommand._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +late final _class_NSDateFormatter = objc.getClass("NSDateFormatter"); - /// Returns a [NSScriptCommand] that points to the same underlying object as [other]. - static NSScriptCommand castFrom(T other) { - return NSScriptCommand._(other._id, other._lib, - retain: true, release: true); - } +class NSFormatter extends objc.NSObject { + NSFormatter._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSScriptCommand] that wraps the given raw object pointer. - static NSScriptCommand castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSScriptCommand._(other, lib, retain: retain, release: release); - } + /// Constructs a [NSFormatter] that points to the same underlying object as [other]. + NSFormatter.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns whether [obj] is an instance of [NSScriptCommand]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSScriptCommand1); - } + /// Constructs a [NSFormatter] that wraps the given raw object pointer. + NSFormatter.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - NSScriptCommand initWithCommandDescription_( - NSScriptCommandDescription commandDef) { - final _ret = _lib._objc_msgSend_630( - _id, _lib._sel_initWithCommandDescription_1, commandDef._id); - return NSScriptCommand._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSFormatter]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSFormatter); } - NSScriptCommand? initWithCoder_(NSCoder inCoder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, inCoder._id); + objc.NSString? stringForObjectValue_(objc.NSObject? obj) { + final _ret = _objc_msgSend_83( + this.pointer, _sel_stringForObjectValue_, obj?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSScriptCommand._(_ret, _lib, retain: true, release: true); - } - - NSScriptCommandDescription get commandDescription { - final _ret = _lib._objc_msgSend_631(_id, _lib._sel_commandDescription1); - return NSScriptCommandDescription._(_ret, _lib, - retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSObject? get directParameter { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_directParameter1); + NSAttributedString? attributedStringForObjectValue_withDefaultAttributes_( + objc.NSObject obj, objc.NSDictionary? attrs) { + final _ret = _objc_msgSend_84( + this.pointer, + _sel_attributedStringForObjectValue_withDefaultAttributes_, + obj.pointer, + attrs?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - set directParameter(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setDirectParameter_1, value?._id ?? ffi.nullptr); + : NSAttributedString.castFromPointer(_ret, retain: true, release: true); } - NSScriptObjectSpecifier? get receiversSpecifier { - final _ret = _lib._objc_msgSend_632(_id, _lib._sel_receiversSpecifier1); + objc.NSString? editingStringForObjectValue_(objc.NSObject obj) { + final _ret = _objc_msgSend_85( + this.pointer, _sel_editingStringForObjectValue_, obj.pointer); return _ret.address == 0 ? null - : NSScriptObjectSpecifier._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set receiversSpecifier(NSScriptObjectSpecifier? value) { - return _lib._objc_msgSend_633( - _id, _lib._sel_setReceiversSpecifier_1, value?._id ?? ffi.nullptr); + bool getObjectValue_forString_errorDescription_( + ffi.Pointer> obj, + objc.NSString string, + ffi.Pointer> error) { + return _objc_msgSend_86( + this.pointer, + _sel_getObjectValue_forString_errorDescription_, + obj, + string.pointer, + error); } - NSObject? get evaluatedReceivers { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_evaluatedReceivers1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + bool isPartialStringValid_newEditingString_errorDescription_( + objc.NSString partialString, + ffi.Pointer> newString, + ffi.Pointer> error) { + return _objc_msgSend_87( + this.pointer, + _sel_isPartialStringValid_newEditingString_errorDescription_, + partialString.pointer, + newString, + error); } - NSDictionary? get arguments { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_arguments1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + bool + isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_( + ffi.Pointer> partialStringPtr, + ffi.Pointer<_NSRange> proposedSelRangePtr, + objc.NSString origString, + _NSRange origSelRange, + ffi.Pointer> error) { + return _objc_msgSend_88( + this.pointer, + _sel_isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_, + partialStringPtr, + proposedSelRangePtr, + origString.pointer, + origSelRange, + error); } - set arguments(NSDictionary? value) { - return _lib._objc_msgSend_634( - _id, _lib._sel_setArguments_1, value?._id ?? ffi.nullptr); + @override + NSFormatter init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSFormatter.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get evaluatedArguments { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_evaluatedArguments1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + static NSFormatter new1() { + final _ret = _objc_msgSend_40(_class_NSFormatter, _sel_new); + return NSFormatter.castFromPointer(_ret, retain: false, release: true); } - bool get wellFormed { - return _lib._objc_msgSend_12(_id, _lib._sel_isWellFormed1); + static NSFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSFormatter, _sel_allocWithZone_, zone); + return NSFormatter.castFromPointer(_ret, retain: false, release: true); } - NSObject? performDefaultImplementation() { - final _ret = - _lib._objc_msgSend_17(_id, _lib._sel_performDefaultImplementation1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + static NSFormatter alloc() { + final _ret = _objc_msgSend_40(_class_NSFormatter, _sel_alloc); + return NSFormatter.castFromPointer(_ret, retain: false, release: true); } - NSObject? executeCommand() { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_executeCommand1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - int get scriptErrorNumber { - return _lib._objc_msgSend_83(_id, _lib._sel_scriptErrorNumber1); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - set scriptErrorNumber(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setScriptErrorNumber_1, value); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSFormatter, _sel_accessInstanceVariablesDirectly); } - NSAppleEventDescriptor? get scriptErrorOffendingObjectDescriptor { - final _ret = _lib._objc_msgSend_636( - _id, _lib._sel_scriptErrorOffendingObjectDescriptor1); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSFormatter, _sel_useStoredAccessor); } - set scriptErrorOffendingObjectDescriptor(NSAppleEventDescriptor? value) { - return _lib._objc_msgSend_637( - _id, - _lib._sel_setScriptErrorOffendingObjectDescriptor_1, - value?._id ?? ffi.nullptr); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSFormatter, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSAppleEventDescriptor? get scriptErrorExpectedTypeDescriptor { - final _ret = _lib._objc_msgSend_636( - _id, _lib._sel_scriptErrorExpectedTypeDescriptor1); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSFormatter, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - set scriptErrorExpectedTypeDescriptor(NSAppleEventDescriptor? value) { - return _lib._objc_msgSend_637( - _id, - _lib._sel_setScriptErrorExpectedTypeDescriptor_1, - value?._id ?? ffi.nullptr); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSFormatter, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSFormatter, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSFormatter, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSFormatter = objc.getClass("NSFormatter"); +late final _sel_stringForObjectValue_ = + objc.registerName("stringForObjectValue:"); +final _objc_msgSend_83 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_attributedStringForObjectValue_withDefaultAttributes_ = + objc.registerName("attributedStringForObjectValue:withDefaultAttributes:"); +final _objc_msgSend_84 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_editingStringForObjectValue_ = + objc.registerName("editingStringForObjectValue:"); +final _objc_msgSend_85 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_getObjectValue_forString_errorDescription_ = + objc.registerName("getObjectValue:forString:errorDescription:"); +final _objc_msgSend_86 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_isPartialStringValid_newEditingString_errorDescription_ = objc + .registerName("isPartialStringValid:newEditingString:errorDescription:"); +final _objc_msgSend_87 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); +late final _sel_isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_ = + objc.registerName( + "isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription:"); +final _objc_msgSend_88 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer<_NSRange>, + ffi.Pointer, + _NSRange, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer<_NSRange>, + ffi.Pointer, + _NSRange, + ffi.Pointer>)>(); + +abstract class NSFormattingContext { + static const int NSFormattingContextUnknown = 0; + static const int NSFormattingContextDynamic = 1; + static const int NSFormattingContextStandalone = 2; + static const int NSFormattingContextListItem = 3; + static const int NSFormattingContextBeginningOfSentence = 4; + static const int NSFormattingContextMiddleOfSentence = 5; +} + +late final _sel_formattingContext = objc.registerName("formattingContext"); +final _objc_msgSend_89 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setFormattingContext_ = + objc.registerName("setFormattingContext:"); +final _objc_msgSend_90 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_getObjectValue_forString_range_error_ = + objc.registerName("getObjectValue:forString:range:error:"); +final _objc_msgSend_91 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer<_NSRange>, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer<_NSRange>, + ffi.Pointer>)>(); +late final _sel_stringFromDate_ = objc.registerName("stringFromDate:"); +final _objc_msgSend_92 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dateFromString_ = objc.registerName("dateFromString:"); +final _objc_msgSend_93 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSDateFormatterStyle { + static const int NSDateFormatterNoStyle = 0; + static const int NSDateFormatterShortStyle = 1; + static const int NSDateFormatterMediumStyle = 2; + static const int NSDateFormatterLongStyle = 3; + static const int NSDateFormatterFullStyle = 4; +} + +late final _sel_localizedStringFromDate_dateStyle_timeStyle_ = + objc.registerName("localizedStringFromDate:dateStyle:timeStyle:"); +final _objc_msgSend_94 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int)>(); +late final _sel_dateFormatFromTemplate_options_locale_ = + objc.registerName("dateFormatFromTemplate:options:locale:"); +final _objc_msgSend_95 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + +abstract class NSDateFormatterBehavior { + static const int NSDateFormatterBehaviorDefault = 0; + static const int NSDateFormatterBehavior10_0 = 1000; + static const int NSDateFormatterBehavior10_4 = 1040; +} + +late final _sel_defaultFormatterBehavior = + objc.registerName("defaultFormatterBehavior"); +final _objc_msgSend_96 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDefaultFormatterBehavior_ = + objc.registerName("setDefaultFormatterBehavior:"); +final _objc_msgSend_97 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setLocalizedDateFormatFromTemplate_ = + objc.registerName("setLocalizedDateFormatFromTemplate:"); +final _objc_msgSend_98 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dateFormat = objc.registerName("dateFormat"); +late final _sel_setDateFormat_ = objc.registerName("setDateFormat:"); +final _objc_msgSend_99 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dateStyle = objc.registerName("dateStyle"); +final _objc_msgSend_100 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDateStyle_ = objc.registerName("setDateStyle:"); +final _objc_msgSend_101 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_timeStyle = objc.registerName("timeStyle"); +late final _sel_setTimeStyle_ = objc.registerName("setTimeStyle:"); +late final _sel_locale = objc.registerName("locale"); +final _objc_msgSend_102 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setLocale_ = objc.registerName("setLocale:"); +final _objc_msgSend_103 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_generatesCalendarDates = + objc.registerName("generatesCalendarDates"); +late final _sel_setGeneratesCalendarDates_ = + objc.registerName("setGeneratesCalendarDates:"); +late final _sel_formatterBehavior = objc.registerName("formatterBehavior"); +late final _sel_setFormatterBehavior_ = + objc.registerName("setFormatterBehavior:"); + +class NSTimeZone extends objc.NSObject { + NSTimeZone._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSTimeZone] that points to the same underlying object as [other]. + NSTimeZone.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSTimeZone] that wraps the given raw object pointer. + NSTimeZone.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSTimeZone]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSTimeZone); } - NSString? get scriptErrorString { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_scriptErrorString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + objc.NSString get name { + final _ret = _objc_msgSend_12(this.pointer, _sel_name); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set scriptErrorString(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setScriptErrorString_1, value?._id ?? ffi.nullptr); + objc.NSData get data { + final _ret = _objc_msgSend_104(this.pointer, _sel_data); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - static NSScriptCommand? currentCommand(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_638( - _lib._class_NSScriptCommand1, _lib._sel_currentCommand1); - return _ret.address == 0 - ? null - : NSScriptCommand._(_ret, _lib, retain: true, release: true); + int secondsFromGMTForDate_(objc.NSDate aDate) { + return _objc_msgSend_105( + this.pointer, _sel_secondsFromGMTForDate_, aDate.pointer); } - NSAppleEventDescriptor? get appleEvent { - final _ret = _lib._objc_msgSend_636(_id, _lib._sel_appleEvent1); + objc.NSString? abbreviationForDate_(objc.NSDate aDate) { + final _ret = _objc_msgSend_106( + this.pointer, _sel_abbreviationForDate_, aDate.pointer); return _ret.address == 0 ? null - : NSAppleEventDescriptor._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void suspendExecution() { - _lib._objc_msgSend_1(_id, _lib._sel_suspendExecution1); + bool isDaylightSavingTimeForDate_(objc.NSDate aDate) { + return _objc_msgSend_107( + this.pointer, _sel_isDaylightSavingTimeForDate_, aDate.pointer); } - void resumeExecutionWithResult_(NSObject? result) { - _lib._objc_msgSend_289( - _id, _lib._sel_resumeExecutionWithResult_1, result?._id ?? ffi.nullptr); + double daylightSavingTimeOffsetForDate_(objc.NSDate aDate) { + return objc.useMsgSendVariants + ? _objc_msgSend_108Fpret( + this.pointer, _sel_daylightSavingTimeOffsetForDate_, aDate.pointer) + : _objc_msgSend_108( + this.pointer, _sel_daylightSavingTimeOffsetForDate_, aDate.pointer); } - @override - NSScriptCommand init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSScriptCommand._(_ret, _lib, retain: true, release: true); + objc.NSDate? nextDaylightSavingTimeTransitionAfterDate_(objc.NSDate aDate) { + final _ret = _objc_msgSend_109(this.pointer, + _sel_nextDaylightSavingTimeTransitionAfterDate_, aDate.pointer); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - static NSScriptCommand new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSScriptCommand1, _lib._sel_new1); - return NSScriptCommand._(_ret, _lib, retain: false, release: true); + static NSTimeZone getSystemTimeZone() { + final _ret = _objc_msgSend_110(_class_NSTimeZone, _sel_systemTimeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - static NSScriptCommand allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSScriptCommand1, _lib._sel_allocWithZone_1, zone); - return NSScriptCommand._(_ret, _lib, retain: false, release: true); + static void resetSystemTimeZone() { + _objc_msgSend_82(_class_NSTimeZone, _sel_resetSystemTimeZone); } - static NSScriptCommand alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSScriptCommand1, _lib._sel_alloc1); - return NSScriptCommand._(_ret, _lib, retain: false, release: true); + static NSTimeZone getDefaultTimeZone() { + final _ret = _objc_msgSend_110(_class_NSTimeZone, _sel_defaultTimeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSScriptCommand1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static void setDefaultTimeZone(NSTimeZone value) { + return _objc_msgSend_111( + _class_NSTimeZone, _sel_setDefaultTimeZone_, value.pointer); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSScriptCommand1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static NSTimeZone getLocalTimeZone() { + final _ret = _objc_msgSend_110(_class_NSTimeZone, _sel_localTimeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSScriptCommand1, - _lib._sel_accessInstanceVariablesDirectly1); + static objc.NSArray getKnownTimeZoneNames() { + final _ret = _objc_msgSend_6(_class_NSTimeZone, _sel_knownTimeZoneNames); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSScriptCommand1, _lib._sel_useStoredAccessor1); + static objc.NSDictionary getAbbreviationDictionary() { + final _ret = + _objc_msgSend_112(_class_NSTimeZone, _sel_abbreviationDictionary); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSScriptCommand1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static void setAbbreviationDictionary(objc.NSDictionary value) { + return _objc_msgSend_113( + _class_NSTimeZone, _sel_setAbbreviationDictionary_, value.pointer); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSScriptCommand1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static objc.NSString getTimeZoneDataVersion() { + final _ret = _objc_msgSend_12(_class_NSTimeZone, _sel_timeZoneDataVersion); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSScriptCommand1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + int get secondsFromGMT { + return _objc_msgSend_114(this.pointer, _sel_secondsFromGMT); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSScriptCommand1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSString? get abbreviation { + final _ret = _objc_msgSend_13(this.pointer, _sel_abbreviation); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSScriptCommand1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + bool get daylightSavingTime { + return _objc_msgSend_7(this.pointer, _sel_isDaylightSavingTime); } -} - -class NSItemProvider extends NSObject { - NSItemProvider._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSItemProvider] that points to the same underlying object as [other]. - static NSItemProvider castFrom(T other) { - return NSItemProvider._(other._id, other._lib, retain: true, release: true); + double get daylightSavingTimeOffset { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_daylightSavingTimeOffset) + : _objc_msgSend_115(this.pointer, _sel_daylightSavingTimeOffset); } - /// Returns a [NSItemProvider] that wraps the given raw object pointer. - static NSItemProvider castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSItemProvider._(other, lib, retain: retain, release: release); + objc.NSDate? get nextDaylightSavingTimeTransition { + final _ret = + _objc_msgSend_116(this.pointer, _sel_nextDaylightSavingTimeTransition); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// 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); + objc.NSString get description { + final _ret = _objc_msgSend_12(this.pointer, _sel_description); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSItemProvider init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSItemProvider._(_ret, _lib, retain: true, release: true); - } - - void registerDataRepresentationForTypeIdentifier_visibility_loadHandler_( - NSString typeIdentifier, - int visibility, - ObjCBlock_NSProgress_ffiVoidNSDataNSError loadHandler) { - _lib._objc_msgSend_673( - _id, - _lib._sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1, - typeIdentifier._id, - visibility, - loadHandler._id); - } - - void - registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_( - NSString typeIdentifier, - int fileOptions, - int visibility, - ObjCBlock_NSProgress_ffiVoidNSURLboolNSError loadHandler) { - _lib._objc_msgSend_674( - _id, - _lib._sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1, - typeIdentifier._id, - fileOptions, - visibility, - loadHandler._id); - } - - NSArray get registeredTypeIdentifiers { - final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_registeredTypeIdentifiers1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool isEqualToTimeZone_(NSTimeZone aTimeZone) { + return _objc_msgSend_117( + this.pointer, _sel_isEqualToTimeZone_, aTimeZone.pointer); } - NSArray registeredTypeIdentifiersWithFileOptions_(int fileOptions) { - final _ret = _lib._objc_msgSend_675( - _id, _lib._sel_registeredTypeIdentifiersWithFileOptions_1, fileOptions); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSString? localizedName_locale_(int style, objc.NSLocale? locale) { + final _ret = _objc_msgSend_118(this.pointer, _sel_localizedName_locale_, + style, locale?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool hasItemConformingToTypeIdentifier_(NSString typeIdentifier) { - return _lib._objc_msgSend_64( - _id, _lib._sel_hasItemConformingToTypeIdentifier_1, typeIdentifier._id); + static NSTimeZone? timeZoneWithName_(objc.NSString tzName) { + final _ret = _objc_msgSend_2( + _class_NSTimeZone, _sel_timeZoneWithName_, tzName.pointer); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - bool hasRepresentationConformingToTypeIdentifier_fileOptions_( - NSString typeIdentifier, int fileOptions) { - return _lib._objc_msgSend_676( - _id, - _lib._sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1, - typeIdentifier._id, - fileOptions); + static NSTimeZone? timeZoneWithName_data_( + objc.NSString tzName, objc.NSData? aData) { + final _ret = _objc_msgSend_119( + _class_NSTimeZone, + _sel_timeZoneWithName_data_, + tzName.pointer, + aData?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - NSProgress loadDataRepresentationForTypeIdentifier_completionHandler_( - NSString typeIdentifier, - ObjCBlock_ffiVoid_NSData_NSError completionHandler) { - final _ret = _lib._objc_msgSend_677( - _id, - _lib._sel_loadDataRepresentationForTypeIdentifier_completionHandler_1, - typeIdentifier._id, - completionHandler._id); - return NSProgress._(_ret, _lib, retain: true, release: true); + NSTimeZone? initWithName_(objc.NSString tzName) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_initWithName_, tzName.pointer); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - NSProgress loadFileRepresentationForTypeIdentifier_completionHandler_( - NSString typeIdentifier, - ObjCBlock_ffiVoid_NSURL_NSError completionHandler) { - final _ret = _lib._objc_msgSend_678( - _id, - _lib._sel_loadFileRepresentationForTypeIdentifier_completionHandler_1, - typeIdentifier._id, - completionHandler._id); - return NSProgress._(_ret, _lib, retain: true, release: true); + NSTimeZone? initWithName_data_(objc.NSString tzName, objc.NSData? aData) { + final _ret = _objc_msgSend_119(this.pointer, _sel_initWithName_data_, + tzName.pointer, aData?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - NSProgress loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_( - NSString typeIdentifier, - ObjCBlock_ffiVoid_NSURL_bool_NSError completionHandler) { - final _ret = _lib._objc_msgSend_679( - _id, - _lib._sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1, - typeIdentifier._id, - completionHandler._id); - return NSProgress._(_ret, _lib, retain: true, release: true); + static NSTimeZone timeZoneForSecondsFromGMT_(int seconds) { + final _ret = _objc_msgSend_120( + _class_NSTimeZone, _sel_timeZoneForSecondsFromGMT_, seconds); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - NSString? get suggestedName { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_suggestedName1); + static NSTimeZone? timeZoneWithAbbreviation_(objc.NSString abbreviation) { + final _ret = _objc_msgSend_2(_class_NSTimeZone, + _sel_timeZoneWithAbbreviation_, abbreviation.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - set suggestedName(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setSuggestedName_1, value?._id ?? ffi.nullptr); + @override + NSTimeZone init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - NSItemProvider initWithObject_(NSObject object) { - final _ret = - _lib._objc_msgSend_124(_id, _lib._sel_initWithObject_1, object._id); - return NSItemProvider._(_ret, _lib, retain: true, release: true); + static NSTimeZone new1() { + final _ret = _objc_msgSend_40(_class_NSTimeZone, _sel_new); + return NSTimeZone.castFromPointer(_ret, retain: false, release: true); } - void registerObject_visibility_(NSObject object, int visibility) { - _lib._objc_msgSend_680( - _id, _lib._sel_registerObject_visibility_1, object._id, visibility); + static NSTimeZone allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSTimeZone, _sel_allocWithZone_, zone); + return NSTimeZone.castFromPointer(_ret, retain: false, release: true); } - void registerObjectOfClass_visibility_loadHandler_( - NSObject aClass, - int visibility, - ObjCBlock_NSProgress_ffiVoidObjCObjectNSError loadHandler) { - _lib._objc_msgSend_681( - _id, - _lib._sel_registerObjectOfClass_visibility_loadHandler_1, - aClass._id, - visibility, - loadHandler._id); + static NSTimeZone alloc() { + final _ret = _objc_msgSend_40(_class_NSTimeZone, _sel_alloc); + return NSTimeZone.castFromPointer(_ret, retain: false, release: true); } - bool canLoadObjectOfClass_(NSObject aClass) { - return _lib._objc_msgSend_0( - _id, _lib._sel_canLoadObjectOfClass_1, aClass._id); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSTimeZone, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSProgress loadObjectOfClass_completionHandler_( - NSObject aClass, ObjCBlock_ffiVoid_ObjCObject_NSError completionHandler) { - final _ret = _lib._objc_msgSend_682( - _id, - _lib._sel_loadObjectOfClass_completionHandler_1, - aClass._id, - completionHandler._id); - return NSProgress._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSTimeZone, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSItemProvider initWithItem_typeIdentifier_( - NSObject? item, NSString? typeIdentifier) { - final _ret = _lib._objc_msgSend_683( - _id, - _lib._sel_initWithItem_typeIdentifier_1, - item?._id ?? ffi.nullptr, - typeIdentifier?._id ?? ffi.nullptr); - return NSItemProvider._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSTimeZone, _sel_accessInstanceVariablesDirectly); } - NSItemProvider? initWithContentsOfURL_(NSURL fileURL) { - final _ret = _lib._objc_msgSend_277( - _id, _lib._sel_initWithContentsOfURL_1, fileURL._id); - return _ret.address == 0 - ? null - : NSItemProvider._(_ret, _lib, retain: true, release: true); - } - - void registerItemForTypeIdentifier_loadHandler_( - NSString typeIdentifier, - ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary - loadHandler) { - _lib._objc_msgSend_684( - _id, - _lib._sel_registerItemForTypeIdentifier_loadHandler_1, - typeIdentifier._id, - loadHandler._id); - } - - void loadItemForTypeIdentifier_options_completionHandler_( - NSString typeIdentifier, - NSDictionary? options, - ObjCBlock_ffiVoid_ObjCObject_NSError1? completionHandler) { - _lib._objc_msgSend_685( - _id, - _lib._sel_loadItemForTypeIdentifier_options_completionHandler_1, - typeIdentifier._id, - options?._id ?? ffi.nullptr, - completionHandler?._id ?? ffi.nullptr); - } - - ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary? - get previewImageHandler { - final _ret = _lib._objc_msgSend_686(_id, _lib._sel_previewImageHandler1); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary._( - _ret, _lib, - retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSTimeZone, _sel_useStoredAccessor); } - set previewImageHandler( - ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary? - value) { - return _lib._objc_msgSend_687( - _id, _lib._sel_setPreviewImageHandler_1, value?._id ?? ffi.nullptr); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSTimeZone, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - void loadPreviewImageWithOptions_completionHandler_(NSDictionary options, - ObjCBlock_ffiVoid_ObjCObject_NSError1 completionHandler) { - _lib._objc_msgSend_688( - _id, - _lib._sel_loadPreviewImageWithOptions_completionHandler_1, - options._id, - completionHandler._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSTimeZone, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static NSItemProvider new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSItemProvider1, _lib._sel_new1); - return NSItemProvider._(_ret, _lib, retain: false, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSTimeZone, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSTimeZone, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSTimeZone, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSTimeZone = objc.getClass("NSTimeZone"); +late final _sel_name = objc.registerName("name"); +late final _sel_data = objc.registerName("data"); +final _objc_msgSend_104 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_secondsFromGMTForDate_ = + objc.registerName("secondsFromGMTForDate:"); +final _objc_msgSend_105 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_abbreviationForDate_ = + objc.registerName("abbreviationForDate:"); +final _objc_msgSend_106 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isDaylightSavingTimeForDate_ = + objc.registerName("isDaylightSavingTimeForDate:"); +final _objc_msgSend_107 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_daylightSavingTimeOffsetForDate_ = + objc.registerName("daylightSavingTimeOffsetForDate:"); +final _objc_msgSend_108 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_108Fpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_nextDaylightSavingTimeTransitionAfterDate_ = + objc.registerName("nextDaylightSavingTimeTransitionAfterDate:"); +final _objc_msgSend_109 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_systemTimeZone = objc.registerName("systemTimeZone"); +final _objc_msgSend_110 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_resetSystemTimeZone = objc.registerName("resetSystemTimeZone"); +late final _sel_defaultTimeZone = objc.registerName("defaultTimeZone"); +late final _sel_setDefaultTimeZone_ = objc.registerName("setDefaultTimeZone:"); +final _objc_msgSend_111 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_localTimeZone = objc.registerName("localTimeZone"); +late final _sel_knownTimeZoneNames = objc.registerName("knownTimeZoneNames"); +late final _sel_abbreviationDictionary = + objc.registerName("abbreviationDictionary"); +final _objc_msgSend_112 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setAbbreviationDictionary_ = + objc.registerName("setAbbreviationDictionary:"); +final _objc_msgSend_113 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_timeZoneDataVersion = objc.registerName("timeZoneDataVersion"); +late final _sel_secondsFromGMT = objc.registerName("secondsFromGMT"); +final _objc_msgSend_114 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_abbreviation = objc.registerName("abbreviation"); +late final _sel_isDaylightSavingTime = + objc.registerName("isDaylightSavingTime"); +late final _sel_daylightSavingTimeOffset = + objc.registerName("daylightSavingTimeOffset"); +final _objc_msgSend_115 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_115Fpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_nextDaylightSavingTimeTransition = + objc.registerName("nextDaylightSavingTimeTransition"); +final _objc_msgSend_116 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_description = objc.registerName("description"); +late final _sel_isEqualToTimeZone_ = objc.registerName("isEqualToTimeZone:"); +final _objc_msgSend_117 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSTimeZoneNameStyle { + static const int NSTimeZoneNameStyleStandard = 0; + static const int NSTimeZoneNameStyleShortStandard = 1; + static const int NSTimeZoneNameStyleDaylightSaving = 2; + static const int NSTimeZoneNameStyleShortDaylightSaving = 3; + static const int NSTimeZoneNameStyleGeneric = 4; + static const int NSTimeZoneNameStyleShortGeneric = 5; +} + +late final _sel_localizedName_locale_ = + objc.registerName("localizedName:locale:"); +final _objc_msgSend_118 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_timeZoneWithName_ = objc.registerName("timeZoneWithName:"); +late final _sel_timeZoneWithName_data_ = + objc.registerName("timeZoneWithName:data:"); +final _objc_msgSend_119 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithName_ = objc.registerName("initWithName:"); +late final _sel_initWithName_data_ = objc.registerName("initWithName:data:"); +late final _sel_timeZoneForSecondsFromGMT_ = + objc.registerName("timeZoneForSecondsFromGMT:"); +final _objc_msgSend_120 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_timeZoneWithAbbreviation_ = + objc.registerName("timeZoneWithAbbreviation:"); +late final _sel_timeZone = objc.registerName("timeZone"); +late final _sel_setTimeZone_ = objc.registerName("setTimeZone:"); + +class NSCalendar extends objc.NSObject { + NSCalendar._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSCalendar] that points to the same underlying object as [other]. + NSCalendar.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSCalendar] that wraps the given raw object pointer. + NSCalendar.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSCalendar]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSCalendar); } - static NSItemProvider allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSItemProvider1, _lib._sel_allocWithZone_1, zone); - return NSItemProvider._(_ret, _lib, retain: false, release: true); + static NSCalendar getCurrentCalendar() { + final _ret = _objc_msgSend_121(_class_NSCalendar, _sel_currentCalendar); + return NSCalendar.castFromPointer(_ret, retain: true, release: true); } - static NSItemProvider alloc(SwiftLibrary _lib) { + static NSCalendar getAutoupdatingCurrentCalendar() { final _ret = - _lib._objc_msgSend_2(_lib._class_NSItemProvider1, _lib._sel_alloc1); - return NSItemProvider._(_ret, _lib, retain: false, release: true); + _objc_msgSend_121(_class_NSCalendar, _sel_autoupdatingCurrentCalendar); + return NSCalendar.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSItemProvider1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static NSCalendar? calendarWithIdentifier_( + objc.NSString calendarIdentifierConstant) { + final _ret = _objc_msgSend_122(_class_NSCalendar, + _sel_calendarWithIdentifier_, calendarIdentifierConstant.pointer); + return _ret.address == 0 + ? null + : NSCalendar.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSItemProvider1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + @override + NSCalendar init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSCalendar.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSItemProvider1, - _lib._sel_accessInstanceVariablesDirectly1); + objc.NSObject? initWithCalendarIdentifier_(objc.NSString ident) { + final _ret = _objc_msgSend_2( + this.pointer, _sel_initWithCalendarIdentifier_, ident.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSItemProvider1, _lib._sel_useStoredAccessor1); + objc.NSString get calendarIdentifier { + final _ret = _objc_msgSend_12(this.pointer, _sel_calendarIdentifier); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSItemProvider1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + objc.NSLocale? get locale { + final _ret = _objc_msgSend_123(this.pointer, _sel_locale); + return _ret.address == 0 + ? null + : objc.NSLocale.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSItemProvider1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + set locale(objc.NSLocale? value) { + return _objc_msgSend_124( + this.pointer, _sel_setLocale_, value?.pointer ?? ffi.nullptr); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSItemProvider1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + NSTimeZone get timeZone { + final _ret = _objc_msgSend_110(this.pointer, _sel_timeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSItemProvider1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + set timeZone(NSTimeZone value) { + return _objc_msgSend_111(this.pointer, _sel_setTimeZone_, value.pointer); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSItemProvider1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + int get firstWeekday { + return _objc_msgSend_29(this.pointer, _sel_firstWeekday); } -} - -abstract class NSItemProviderRepresentationVisibility { - static const int NSItemProviderRepresentationVisibilityAll = 0; - static const int NSItemProviderRepresentationVisibilityTeam = 1; - static const int NSItemProviderRepresentationVisibilityGroup = 2; - static const int NSItemProviderRepresentationVisibilityOwnProcess = 3; -} - -ffi.Pointer< - ObjCObject> _ObjCBlock_NSProgress_ffiVoidNSDataNSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock>)>()(arg0); -final _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry = - Function(ffi.Pointer<_ObjCBlock>)>{}; -int _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_registerClosure( - ffi.Pointer Function(ffi.Pointer<_ObjCBlock>) fn) { - final id = ++_ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistryIndex; - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry[ - block.ref.target.address]!(arg0); - -class ObjCBlock_NSProgress_ffiVoidNSDataNSError extends _ObjCBlockBase { - ObjCBlock_NSProgress_ffiVoidNSDataNSError._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_NSProgress_ffiVoidNSDataNSError castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_NSProgress_ffiVoidNSDataNSError._(pointer, lib, - retain: retain, release: release); + set firstWeekday(int value) { + return _objc_msgSend_125(this.pointer, _sel_setFirstWeekday_, value); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSProgress_ffiVoidNSDataNSError.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSProgress_ffiVoidNSDataNSError.fromFunction(SwiftLibrary lib, - NSProgress? Function(ObjCBlock_ffiVoid_NSData_NSError) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureTrampoline) - .cast(), - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_registerClosure((ffi - .Pointer<_ObjCBlock> - arg0) => - fn(ObjCBlock_ffiVoid_NSData_NSError._(arg0, lib, retain: true, release: true)) - ?.retainAndReturnPointer() ?? - ffi.nullptr)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - NSProgress? call(ObjCBlock_ffiVoid_NSData_NSError arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>() - (_id, arg0._id) - .address == - 0 - ? null - : NSProgress._( - _id.ref.invoke - .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>()(_id, arg0._id), - _lib, - retain: false, - release: true); -} - -class NSProgress extends NSObject { - NSProgress._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + int get minimumDaysInFirstWeek { + return _objc_msgSend_29(this.pointer, _sel_minimumDaysInFirstWeek); + } - /// 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); + set minimumDaysInFirstWeek(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMinimumDaysInFirstWeek_, value); } - /// Returns a [NSProgress] that wraps the given raw object pointer. - static NSProgress castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSProgress._(other, lib, retain: retain, release: release); + objc.NSArray get eraSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_eraSymbols); + return objc.NSArray.castFromPointer(_ret, 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); + objc.NSArray get longEraSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_longEraSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSProgress? currentProgress(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_659( - _lib._class_NSProgress1, _lib._sel_currentProgress1); - return _ret.address == 0 - ? null - : NSProgress._(_ret, _lib, retain: true, release: true); + objc.NSArray get monthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_monthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSProgress progressWithTotalUnitCount_( - SwiftLibrary _lib, int unitCount) { - final _ret = _lib._objc_msgSend_660(_lib._class_NSProgress1, - _lib._sel_progressWithTotalUnitCount_1, unitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); + objc.NSArray get shortMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSProgress discreteProgressWithTotalUnitCount_( - SwiftLibrary _lib, int unitCount) { - final _ret = _lib._objc_msgSend_660(_lib._class_NSProgress1, - _lib._sel_discreteProgressWithTotalUnitCount_1, unitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); + objc.NSArray get veryShortMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_veryShortMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( - SwiftLibrary _lib, - int unitCount, - NSProgress parent, - int portionOfParentTotalUnitCount) { - final _ret = _lib._objc_msgSend_661( - _lib._class_NSProgress1, - _lib._sel_progressWithTotalUnitCount_parent_pendingUnitCount_1, - unitCount, - parent._id, - portionOfParentTotalUnitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); + objc.NSArray get standaloneMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSProgress initWithParent_userInfo_( - NSProgress? parentProgressOrNil, NSObject? userInfoOrNil) { - final _ret = _lib._objc_msgSend_662( - _id, - _lib._sel_initWithParent_userInfo_1, - parentProgressOrNil?._id ?? ffi.nullptr, - userInfoOrNil?._id ?? ffi.nullptr); - return NSProgress._(_ret, _lib, retain: true, release: true); + objc.NSArray get shortStandaloneMonthSymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_shortStandaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void becomeCurrentWithPendingUnitCount_(int unitCount) { - _lib._objc_msgSend_663( - _id, _lib._sel_becomeCurrentWithPendingUnitCount_1, unitCount); + objc.NSArray get veryShortStandaloneMonthSymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_veryShortStandaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void performAsCurrentWithPendingUnitCount_usingBlock_( - int unitCount, ObjCBlock_ffiVoid work) { - _lib._objc_msgSend_664( - _id, - _lib._sel_performAsCurrentWithPendingUnitCount_usingBlock_1, - unitCount, - work._id); + objc.NSArray get weekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_weekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void resignCurrent() { - _lib._objc_msgSend_1(_id, _lib._sel_resignCurrent1); + objc.NSArray get shortWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void addChild_withPendingUnitCount_(NSProgress child, int inUnitCount) { - _lib._objc_msgSend_665( - _id, _lib._sel_addChild_withPendingUnitCount_1, child._id, inUnitCount); + objc.NSArray get veryShortWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_veryShortWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int get totalUnitCount { - return _lib._objc_msgSend_666(_id, _lib._sel_totalUnitCount1); + objc.NSArray get standaloneWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set totalUnitCount(int value) { - return _lib._objc_msgSend_667(_id, _lib._sel_setTotalUnitCount_1, value); + objc.NSArray get shortStandaloneWeekdaySymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_shortStandaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int get completedUnitCount { - return _lib._objc_msgSend_666(_id, _lib._sel_completedUnitCount1); + objc.NSArray get veryShortStandaloneWeekdaySymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_veryShortStandaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set completedUnitCount(int value) { - return _lib._objc_msgSend_667( - _id, _lib._sel_setCompletedUnitCount_1, value); + objc.NSArray get quarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_quarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString get localizedDescription { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_localizedDescription1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSArray get shortQuarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set localizedDescription(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setLocalizedDescription_1, value._id); + objc.NSArray get standaloneQuarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString get localizedAdditionalDescription { + objc.NSArray get shortStandaloneQuarterSymbols { final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_localizedAdditionalDescription1); - return NSString._(_ret, _lib, retain: true, release: true); + _objc_msgSend_6(this.pointer, _sel_shortStandaloneQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set localizedAdditionalDescription(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setLocalizedAdditionalDescription_1, value._id); + objc.NSString get AMSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_AMSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool get cancellable { - return _lib._objc_msgSend_12(_id, _lib._sel_isCancellable1); + objc.NSString get PMSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_PMSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set cancellable(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setCancellable_1, value); + void minimumRangeOfUnit_(ffi.Pointer<_NSRange> stret, int unit) { + objc.useMsgSendVariants + ? _objc_msgSend_126Stret( + stret, this.pointer, _sel_minimumRangeOfUnit_, unit) + : stret.ref = + _objc_msgSend_126(this.pointer, _sel_minimumRangeOfUnit_, unit); } - bool get pausable { - return _lib._objc_msgSend_12(_id, _lib._sel_isPausable1); + void maximumRangeOfUnit_(ffi.Pointer<_NSRange> stret, int unit) { + objc.useMsgSendVariants + ? _objc_msgSend_126Stret( + stret, this.pointer, _sel_maximumRangeOfUnit_, unit) + : stret.ref = + _objc_msgSend_126(this.pointer, _sel_maximumRangeOfUnit_, unit); } - set pausable(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setPausable_1, value); + void rangeOfUnit_inUnit_forDate_( + ffi.Pointer<_NSRange> stret, int smaller, int larger, objc.NSDate date) { + objc.useMsgSendVariants + ? _objc_msgSend_127Stret(stret, this.pointer, + _sel_rangeOfUnit_inUnit_forDate_, smaller, larger, date.pointer) + : stret.ref = _objc_msgSend_127(this.pointer, + _sel_rangeOfUnit_inUnit_forDate_, smaller, larger, date.pointer); } - bool get cancelled { - return _lib._objc_msgSend_12(_id, _lib._sel_isCancelled1); + int ordinalityOfUnit_inUnit_forDate_( + int smaller, int larger, objc.NSDate date) { + return _objc_msgSend_128(this.pointer, + _sel_ordinalityOfUnit_inUnit_forDate_, smaller, larger, date.pointer); } - bool get paused { - return _lib._objc_msgSend_12(_id, _lib._sel_isPaused1); + bool rangeOfUnit_startDate_interval_forDate_( + int unit, + ffi.Pointer> datep, + ffi.Pointer tip, + objc.NSDate date) { + return _objc_msgSend_129( + this.pointer, + _sel_rangeOfUnit_startDate_interval_forDate_, + unit, + datep, + tip, + date.pointer); } - ObjCBlock_ffiVoid? get cancellationHandler { - final _ret = _lib._objc_msgSend_668(_id, _lib._sel_cancellationHandler1); + objc.NSDate? dateFromComponents_(NSDateComponents comps) { + final _ret = _objc_msgSend_139( + this.pointer, _sel_dateFromComponents_, comps.pointer); return _ret.address == 0 ? null - : ObjCBlock_ffiVoid._(_ret, _lib, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - set cancellationHandler(ObjCBlock_ffiVoid? value) { - return _lib._objc_msgSend_669( - _id, _lib._sel_setCancellationHandler_1, value?._id ?? ffi.nullptr); + NSDateComponents components_fromDate_(int unitFlags, objc.NSDate date) { + final _ret = _objc_msgSend_140( + this.pointer, _sel_components_fromDate_, unitFlags, date.pointer); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } - ObjCBlock_ffiVoid? get pausingHandler { - final _ret = _lib._objc_msgSend_668(_id, _lib._sel_pausingHandler1); + objc.NSDate? dateByAddingComponents_toDate_options_( + NSDateComponents comps, objc.NSDate date, int opts) { + final _ret = _objc_msgSend_141( + this.pointer, + _sel_dateByAddingComponents_toDate_options_, + comps.pointer, + date.pointer, + opts); return _ret.address == 0 ? null - : ObjCBlock_ffiVoid._(_ret, _lib, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - set pausingHandler(ObjCBlock_ffiVoid? value) { - return _lib._objc_msgSend_669( - _id, _lib._sel_setPausingHandler_1, value?._id ?? ffi.nullptr); + NSDateComponents components_fromDate_toDate_options_(int unitFlags, + objc.NSDate startingDate, objc.NSDate resultDate, int opts) { + final _ret = _objc_msgSend_142( + this.pointer, + _sel_components_fromDate_toDate_options_, + unitFlags, + startingDate.pointer, + resultDate.pointer, + opts); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } - ObjCBlock_ffiVoid? get resumingHandler { - final _ret = _lib._objc_msgSend_668(_id, _lib._sel_resumingHandler1); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid._(_ret, _lib, retain: true, release: true); + void getEra_year_month_day_fromDate_( + ffi.Pointer eraValuePointer, + ffi.Pointer yearValuePointer, + ffi.Pointer monthValuePointer, + ffi.Pointer dayValuePointer, + objc.NSDate date) { + _objc_msgSend_143( + this.pointer, + _sel_getEra_year_month_day_fromDate_, + eraValuePointer, + yearValuePointer, + monthValuePointer, + dayValuePointer, + date.pointer); + } + + void getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_( + ffi.Pointer eraValuePointer, + ffi.Pointer yearValuePointer, + ffi.Pointer weekValuePointer, + ffi.Pointer weekdayValuePointer, + objc.NSDate date) { + _objc_msgSend_143( + this.pointer, + _sel_getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_, + eraValuePointer, + yearValuePointer, + weekValuePointer, + weekdayValuePointer, + date.pointer); + } + + void getHour_minute_second_nanosecond_fromDate_( + ffi.Pointer hourValuePointer, + ffi.Pointer minuteValuePointer, + ffi.Pointer secondValuePointer, + ffi.Pointer nanosecondValuePointer, + objc.NSDate date) { + _objc_msgSend_143( + this.pointer, + _sel_getHour_minute_second_nanosecond_fromDate_, + hourValuePointer, + minuteValuePointer, + secondValuePointer, + nanosecondValuePointer, + date.pointer); } - set resumingHandler(ObjCBlock_ffiVoid? value) { - return _lib._objc_msgSend_669( - _id, _lib._sel_setResumingHandler_1, value?._id ?? ffi.nullptr); + int component_fromDate_(int unit, objc.NSDate date) { + return _objc_msgSend_144( + this.pointer, _sel_component_fromDate_, unit, date.pointer); } - void setUserInfoObject_forKey_(NSObject? objectOrNil, NSString key) { - _lib._objc_msgSend_135(_id, _lib._sel_setUserInfoObject_forKey_1, - objectOrNil?._id ?? ffi.nullptr, key._id); + objc.NSDate? dateWithEra_year_month_day_hour_minute_second_nanosecond_( + int eraValue, + int yearValue, + int monthValue, + int dayValue, + int hourValue, + int minuteValue, + int secondValue, + int nanosecondValue) { + final _ret = _objc_msgSend_145( + this.pointer, + _sel_dateWithEra_year_month_day_hour_minute_second_nanosecond_, + eraValue, + yearValue, + monthValue, + dayValue, + hourValue, + minuteValue, + secondValue, + nanosecondValue); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - bool get indeterminate { - return _lib._objc_msgSend_12(_id, _lib._sel_isIndeterminate1); + objc.NSDate? + dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_( + int eraValue, + int yearValue, + int weekValue, + int weekdayValue, + int hourValue, + int minuteValue, + int secondValue, + int nanosecondValue) { + final _ret = _objc_msgSend_145( + this.pointer, + _sel_dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_, + eraValue, + yearValue, + weekValue, + weekdayValue, + hourValue, + minuteValue, + secondValue, + nanosecondValue); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - double get fractionCompleted { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_fractionCompleted1) - : _lib._objc_msgSend_165(_id, _lib._sel_fractionCompleted1); + objc.NSDate startOfDayForDate_(objc.NSDate date) { + final _ret = + _objc_msgSend_146(this.pointer, _sel_startOfDayForDate_, date.pointer); + return objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - bool get finished { - return _lib._objc_msgSend_12(_id, _lib._sel_isFinished1); + NSDateComponents componentsInTimeZone_fromDate_( + NSTimeZone timezone, objc.NSDate date) { + final _ret = _objc_msgSend_147(this.pointer, + _sel_componentsInTimeZone_fromDate_, timezone.pointer, date.pointer); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } - void cancel() { - _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + int compareDate_toDate_toUnitGranularity_( + objc.NSDate date1, objc.NSDate date2, int unit) { + return _objc_msgSend_148( + this.pointer, + _sel_compareDate_toDate_toUnitGranularity_, + date1.pointer, + date2.pointer, + unit); } - void pause() { - _lib._objc_msgSend_1(_id, _lib._sel_pause1); + bool isDate_equalToDate_toUnitGranularity_( + objc.NSDate date1, objc.NSDate date2, int unit) { + return _objc_msgSend_149( + this.pointer, + _sel_isDate_equalToDate_toUnitGranularity_, + date1.pointer, + date2.pointer, + unit); } - void resume() { - _lib._objc_msgSend_1(_id, _lib._sel_resume1); + bool isDate_inSameDayAsDate_(objc.NSDate date1, objc.NSDate date2) { + return _objc_msgSend_150(this.pointer, _sel_isDate_inSameDayAsDate_, + date1.pointer, date2.pointer); } - NSObject get userInfo { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_userInfo1); - return NSObject._(_ret, _lib, retain: true, release: true); + bool isDateInToday_(objc.NSDate date) { + return _objc_msgSend_107(this.pointer, _sel_isDateInToday_, date.pointer); } - NSString? get kind { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_kind1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + bool isDateInYesterday_(objc.NSDate date) { + return _objc_msgSend_107( + this.pointer, _sel_isDateInYesterday_, date.pointer); } - set kind(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setKind_1, value?._id ?? ffi.nullptr); + bool isDateInTomorrow_(objc.NSDate date) { + return _objc_msgSend_107( + this.pointer, _sel_isDateInTomorrow_, date.pointer); } - NSNumber? get estimatedTimeRemaining { - final _ret = _lib._objc_msgSend_215(_id, _lib._sel_estimatedTimeRemaining1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + bool isDateInWeekend_(objc.NSDate date) { + return _objc_msgSend_107(this.pointer, _sel_isDateInWeekend_, date.pointer); } - set estimatedTimeRemaining(NSNumber? value) { - return _lib._objc_msgSend_670( - _id, _lib._sel_setEstimatedTimeRemaining_1, value?._id ?? ffi.nullptr); + bool rangeOfWeekendStartDate_interval_containingDate_( + ffi.Pointer> datep, + ffi.Pointer tip, + objc.NSDate date) { + return _objc_msgSend_151( + this.pointer, + _sel_rangeOfWeekendStartDate_interval_containingDate_, + datep, + tip, + date.pointer); } - NSNumber? get throughput { - final _ret = _lib._objc_msgSend_215(_id, _lib._sel_throughput1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + bool nextWeekendStartDate_interval_options_afterDate_( + ffi.Pointer> datep, + ffi.Pointer tip, + int options, + objc.NSDate date) { + return _objc_msgSend_152( + this.pointer, + _sel_nextWeekendStartDate_interval_options_afterDate_, + datep, + tip, + options, + date.pointer); } - set throughput(NSNumber? value) { - return _lib._objc_msgSend_670( - _id, _lib._sel_setThroughput_1, value?._id ?? ffi.nullptr); + NSDateComponents components_fromDateComponents_toDateComponents_options_( + int unitFlags, + NSDateComponents startingDateComp, + NSDateComponents resultDateComp, + int options) { + final _ret = _objc_msgSend_153( + this.pointer, + _sel_components_fromDateComponents_toDateComponents_options_, + unitFlags, + startingDateComp.pointer, + resultDateComp.pointer, + options); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } - NSString? get fileOperationKind { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_fileOperationKind1); + objc.NSDate? dateByAddingUnit_value_toDate_options_( + int unit, int value, objc.NSDate date, int options) { + final _ret = _objc_msgSend_154( + this.pointer, + _sel_dateByAddingUnit_value_toDate_options_, + unit, + value, + date.pointer, + options); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - set fileOperationKind(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setFileOperationKind_1, value?._id ?? ffi.nullptr); + void enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_( + objc.NSDate start, + NSDateComponents comps, + int opts, + ObjCBlock_ffiVoid_NSDate_bool_bool block) { + _objc_msgSend_155( + this.pointer, + _sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_, + start.pointer, + comps.pointer, + opts, + block.pointer); } - NSURL? get fileURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_fileURL1); + objc.NSDate? nextDateAfterDate_matchingComponents_options_( + objc.NSDate date, NSDateComponents comps, int options) { + final _ret = _objc_msgSend_156( + this.pointer, + _sel_nextDateAfterDate_matchingComponents_options_, + date.pointer, + comps.pointer, + options); return _ret.address == 0 ? null - : NSURL._(_ret, _lib, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - set fileURL(NSURL? value) { - return _lib._objc_msgSend_671( - _id, _lib._sel_setFileURL_1, value?._id ?? ffi.nullptr); + objc.NSDate? nextDateAfterDate_matchingUnit_value_options_( + objc.NSDate date, int unit, int value, int options) { + final _ret = _objc_msgSend_157( + this.pointer, + _sel_nextDateAfterDate_matchingUnit_value_options_, + date.pointer, + unit, + value, + options); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - NSNumber? get fileTotalCount { - final _ret = _lib._objc_msgSend_215(_id, _lib._sel_fileTotalCount1); + objc.NSDate? nextDateAfterDate_matchingHour_minute_second_options_( + objc.NSDate date, + int hourValue, + int minuteValue, + int secondValue, + int options) { + final _ret = _objc_msgSend_158( + this.pointer, + _sel_nextDateAfterDate_matchingHour_minute_second_options_, + date.pointer, + hourValue, + minuteValue, + secondValue, + options); return _ret.address == 0 ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - set fileTotalCount(NSNumber? value) { - return _lib._objc_msgSend_670( - _id, _lib._sel_setFileTotalCount_1, value?._id ?? ffi.nullptr); + objc.NSDate? dateBySettingUnit_value_ofDate_options_( + int unit, int v, objc.NSDate date, int opts) { + final _ret = _objc_msgSend_154( + this.pointer, + _sel_dateBySettingUnit_value_ofDate_options_, + unit, + v, + date.pointer, + opts); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - NSNumber? get fileCompletedCount { - final _ret = _lib._objc_msgSend_215(_id, _lib._sel_fileCompletedCount1); + objc.NSDate? dateBySettingHour_minute_second_ofDate_options_( + int h, int m, int s, objc.NSDate date, int opts) { + final _ret = _objc_msgSend_159( + this.pointer, + _sel_dateBySettingHour_minute_second_ofDate_options_, + h, + m, + s, + date.pointer, + opts); return _ret.address == 0 ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - set fileCompletedCount(NSNumber? value) { - return _lib._objc_msgSend_670( - _id, _lib._sel_setFileCompletedCount_1, value?._id ?? ffi.nullptr); + bool date_matchesComponents_(objc.NSDate date, NSDateComponents components) { + return _objc_msgSend_160(this.pointer, _sel_date_matchesComponents_, + date.pointer, components.pointer); } - void publish() { - _lib._objc_msgSend_1(_id, _lib._sel_publish1); + static NSCalendar new1() { + final _ret = _objc_msgSend_40(_class_NSCalendar, _sel_new); + return NSCalendar.castFromPointer(_ret, retain: false, release: true); } - void unpublish() { - _lib._objc_msgSend_1(_id, _lib._sel_unpublish1); + static NSCalendar allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSCalendar, _sel_allocWithZone_, zone); + return NSCalendar.castFromPointer(_ret, retain: false, release: true); } - static NSObject addSubscriberForFileURL_withPublishingHandler_( - SwiftLibrary _lib, - NSURL url, - ObjCBlock_ffiVoid_NSProgress publishingHandler) { - final _ret = _lib._objc_msgSend_672( - _lib._class_NSProgress1, - _lib._sel_addSubscriberForFileURL_withPublishingHandler_1, - url._id, - publishingHandler._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSCalendar alloc() { + final _ret = _objc_msgSend_40(_class_NSCalendar, _sel_alloc); + return NSCalendar.castFromPointer(_ret, retain: false, release: true); } - static void removeSubscriber_(SwiftLibrary _lib, NSObject subscriber) { - _lib._objc_msgSend_15( - _lib._class_NSProgress1, _lib._sel_removeSubscriber_1, subscriber._id); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSCalendar, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - bool get old { - return _lib._objc_msgSend_12(_id, _lib._sel_isOld1); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSCalendar, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - @override - NSProgress init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSProgress._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSCalendar, _sel_accessInstanceVariablesDirectly); } - static NSProgress new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_new1); - return NSProgress._(_ret, _lib, retain: false, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSCalendar, _sel_useStoredAccessor); } - static NSProgress allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSProgress1, _lib._sel_allocWithZone_1, zone); - return NSProgress._(_ret, _lib, retain: false, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSCalendar, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static NSProgress alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_alloc1); - return NSProgress._(_ret, _lib, retain: false, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSCalendar, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSProgress1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSCalendar, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSCalendar, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSCalendar, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSCalendar = objc.getClass("NSCalendar"); +late final _sel_currentCalendar = objc.registerName("currentCalendar"); +final _objc_msgSend_121 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_autoupdatingCurrentCalendar = + objc.registerName("autoupdatingCurrentCalendar"); +late final _sel_calendarWithIdentifier_ = + objc.registerName("calendarWithIdentifier:"); +final _objc_msgSend_122 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithCalendarIdentifier_ = + objc.registerName("initWithCalendarIdentifier:"); +late final _sel_calendarIdentifier = objc.registerName("calendarIdentifier"); +final _objc_msgSend_123 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_124 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_firstWeekday = objc.registerName("firstWeekday"); +late final _sel_setFirstWeekday_ = objc.registerName("setFirstWeekday:"); +final _objc_msgSend_125 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_minimumDaysInFirstWeek = + objc.registerName("minimumDaysInFirstWeek"); +late final _sel_setMinimumDaysInFirstWeek_ = + objc.registerName("setMinimumDaysInFirstWeek:"); +late final _sel_eraSymbols = objc.registerName("eraSymbols"); +late final _sel_longEraSymbols = objc.registerName("longEraSymbols"); +late final _sel_monthSymbols = objc.registerName("monthSymbols"); +late final _sel_shortMonthSymbols = objc.registerName("shortMonthSymbols"); +late final _sel_veryShortMonthSymbols = + objc.registerName("veryShortMonthSymbols"); +late final _sel_standaloneMonthSymbols = + objc.registerName("standaloneMonthSymbols"); +late final _sel_shortStandaloneMonthSymbols = + objc.registerName("shortStandaloneMonthSymbols"); +late final _sel_veryShortStandaloneMonthSymbols = + objc.registerName("veryShortStandaloneMonthSymbols"); +late final _sel_weekdaySymbols = objc.registerName("weekdaySymbols"); +late final _sel_shortWeekdaySymbols = objc.registerName("shortWeekdaySymbols"); +late final _sel_veryShortWeekdaySymbols = + objc.registerName("veryShortWeekdaySymbols"); +late final _sel_standaloneWeekdaySymbols = + objc.registerName("standaloneWeekdaySymbols"); +late final _sel_shortStandaloneWeekdaySymbols = + objc.registerName("shortStandaloneWeekdaySymbols"); +late final _sel_veryShortStandaloneWeekdaySymbols = + objc.registerName("veryShortStandaloneWeekdaySymbols"); +late final _sel_quarterSymbols = objc.registerName("quarterSymbols"); +late final _sel_shortQuarterSymbols = objc.registerName("shortQuarterSymbols"); +late final _sel_standaloneQuarterSymbols = + objc.registerName("standaloneQuarterSymbols"); +late final _sel_shortStandaloneQuarterSymbols = + objc.registerName("shortStandaloneQuarterSymbols"); +late final _sel_AMSymbol = objc.registerName("AMSymbol"); +late final _sel_PMSymbol = objc.registerName("PMSymbol"); + +abstract class NSCalendarUnit { + static const int NSCalendarUnitEra = 2; + static const int NSCalendarUnitYear = 4; + static const int NSCalendarUnitMonth = 8; + static const int NSCalendarUnitDay = 16; + static const int NSCalendarUnitHour = 32; + static const int NSCalendarUnitMinute = 64; + static const int NSCalendarUnitSecond = 128; + static const int NSCalendarUnitWeekday = 512; + static const int NSCalendarUnitWeekdayOrdinal = 1024; + static const int NSCalendarUnitQuarter = 2048; + static const int NSCalendarUnitWeekOfMonth = 4096; + static const int NSCalendarUnitWeekOfYear = 8192; + static const int NSCalendarUnitYearForWeekOfYear = 16384; + static const int NSCalendarUnitNanosecond = 32768; + static const int NSCalendarUnitCalendar = 1048576; + static const int NSCalendarUnitTimeZone = 2097152; + static const int NSEraCalendarUnit = 2; + static const int NSYearCalendarUnit = 4; + static const int NSMonthCalendarUnit = 8; + static const int NSDayCalendarUnit = 16; + static const int NSHourCalendarUnit = 32; + static const int NSMinuteCalendarUnit = 64; + static const int NSSecondCalendarUnit = 128; + static const int NSWeekCalendarUnit = 256; + static const int NSWeekdayCalendarUnit = 512; + static const int NSWeekdayOrdinalCalendarUnit = 1024; + static const int NSQuarterCalendarUnit = 2048; + static const int NSWeekOfMonthCalendarUnit = 4096; + static const int NSWeekOfYearCalendarUnit = 8192; + static const int NSYearForWeekOfYearCalendarUnit = 16384; + static const int NSCalendarCalendarUnit = 1048576; + static const int NSTimeZoneCalendarUnit = 2097152; +} + +late final _sel_minimumRangeOfUnit_ = objc.registerName("minimumRangeOfUnit:"); +final _objc_msgSend_126 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_126Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_maximumRangeOfUnit_ = objc.registerName("maximumRangeOfUnit:"); +late final _sel_rangeOfUnit_inUnit_forDate_ = + objc.registerName("rangeOfUnit:inUnit:forDate:"); +final _objc_msgSend_127 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); +final _objc_msgSend_127Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); +late final _sel_ordinalityOfUnit_inUnit_forDate_ = + objc.registerName("ordinalityOfUnit:inUnit:forDate:"); +final _objc_msgSend_128 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); +late final _sel_rangeOfUnit_startDate_interval_forDate_ = + objc.registerName("rangeOfUnit:startDate:interval:forDate:"); +final _objc_msgSend_129 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>(); + +class NSDateComponents extends objc.NSObject { + NSDateComponents._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSDateComponents] that points to the same underlying object as [other]. + NSDateComponents.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSDateComponents] that wraps the given raw object pointer. + NSDateComponents.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSDateComponents]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSDateComponents); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSProgress1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + NSCalendar? get calendar { + final _ret = _objc_msgSend_130(this.pointer, _sel_calendar); + return _ret.address == 0 + ? null + : NSCalendar.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSProgress1, _lib._sel_accessInstanceVariablesDirectly1); + set calendar(NSCalendar? value) { + return _objc_msgSend_131( + this.pointer, _sel_setCalendar_, value?.pointer ?? ffi.nullptr); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSProgress1, _lib._sel_useStoredAccessor1); + NSTimeZone? get timeZone { + final _ret = _objc_msgSend_132(this.pointer, _sel_timeZone); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSProgress1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + set timeZone(NSTimeZone? value) { + return _objc_msgSend_133( + this.pointer, _sel_setTimeZone_, value?.pointer ?? ffi.nullptr); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSProgress1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + int get era { + return _objc_msgSend_114(this.pointer, _sel_era); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSProgress1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + set era(int value) { + return _objc_msgSend_134(this.pointer, _sel_setEra_, value); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSProgress1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + int get year { + return _objc_msgSend_114(this.pointer, _sel_year); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSProgress1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + set year(int value) { + return _objc_msgSend_134(this.pointer, _sel_setYear_, value); } -} -ffi.Pointer<_ObjCBlock> _ObjCBlock_ffiVoid_NSProgress_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer<_ObjCBlock> Function(ffi.Pointer)>()(arg0); -final _ObjCBlock_ffiVoid_NSProgress_closureRegistry = - Function(ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSProgress_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSProgress_registerClosure( - ffi.Pointer<_ObjCBlock> Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSProgress_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSProgress_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + int get month { + return _objc_msgSend_114(this.pointer, _sel_month); + } -ffi.Pointer<_ObjCBlock> _ObjCBlock_ffiVoid_NSProgress_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSProgress_closureRegistry[block.ref.target.address]!( - arg0); + set month(int value) { + return _objc_msgSend_134(this.pointer, _sel_setMonth_, value); + } -class ObjCBlock_ffiVoid_NSProgress extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSProgress._(ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + int get day { + return _objc_msgSend_114(this.pointer, _sel_day); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSProgress castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSProgress._(pointer, lib, - retain: retain, release: release); + set day(int value) { + return _objc_msgSend_134(this.pointer, _sel_setDay_, value); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSProgress.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSProgress_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + int get hour { + return _objc_msgSend_114(this.pointer, _sel_hour); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSProgress.fromFunction( - SwiftLibrary lib, ObjCBlock_ffiVoid? Function(NSProgress) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSProgress_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSProgress_registerClosure( - (ffi.Pointer arg0) => - fn(NSProgress._(arg0, lib, retain: true, release: true)) - ?.retainAndReturnPointer() ?? - ffi.nullptr)), - lib); - static ffi.Pointer? _dartFuncTrampoline; + set hour(int value) { + return _objc_msgSend_134(this.pointer, _sel_setHour_, value); + } - ObjCBlock_ffiVoid? call(NSProgress arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>() - (_id, arg0._id) - .address == - 0 - ? null - : ObjCBlock_ffiVoid._( - _id.ref.invoke - .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>()(_id, arg0._id), - _lib, - retain: false, - release: true); -} + int get minute { + return _objc_msgSend_114(this.pointer, _sel_minute); + } -void _ObjCBlock_ffiVoid_NSData_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSData_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSData_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + set minute(int value) { + return _objc_msgSend_134(this.pointer, _sel_setMinute_, value); + } -void _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1); + int get second { + return _objc_msgSend_114(this.pointer, _sel_second); + } -class ObjCBlock_ffiVoid_NSData_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSData_NSError._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + set second(int value) { + return _objc_msgSend_134(this.pointer, _sel_setSecond_, value); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSData_NSError castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSData_NSError._(pointer, lib, - retain: retain, release: release); + int get nanosecond { + return _objc_msgSend_114(this.pointer, _sel_nanosecond); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSData_NSError.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + set nanosecond(int value) { + return _objc_msgSend_134(this.pointer, _sel_setNanosecond_, value); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSData_NSError.fromFunction( - SwiftLibrary lib, void Function(NSData?, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSData._(arg0, lib, retain: true, release: true), - arg1.address == 0 - ? null - : NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + int get weekday { + return _objc_msgSend_114(this.pointer, _sel_weekday); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSData_NSError.listener( - SwiftLibrary lib, void Function(NSData?, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSData._(arg0, lib, retain: true, release: true), - arg1.address == 0 - ? null - : NSError._(arg1, lib, - retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + set weekday(int value) { + return _objc_msgSend_134(this.pointer, _sel_setWeekday_, value); + } - void call(NSData? arg0, NSError? arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); -} + int get weekdayOrdinal { + return _objc_msgSend_114(this.pointer, _sel_weekdayOrdinal); + } -abstract class NSItemProviderFileOptions { - static const int NSItemProviderFileOptionOpenInPlace = 1; -} + set weekdayOrdinal(int value) { + return _objc_msgSend_134(this.pointer, _sel_setWeekdayOrdinal_, value); + } -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>)>()(arg0); -final _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry = - Function(ffi.Pointer<_ObjCBlock>)>{}; -int _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_registerClosure( - ffi.Pointer Function(ffi.Pointer<_ObjCBlock>) fn) { - final id = - ++_ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistryIndex; - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + int get quarter { + return _objc_msgSend_114(this.pointer, _sel_quarter); + } -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry[ - block.ref.target.address]!(arg0); + set quarter(int value) { + return _objc_msgSend_134(this.pointer, _sel_setQuarter_, value); + } -class ObjCBlock_NSProgress_ffiVoidNSURLboolNSError extends _ObjCBlockBase { - ObjCBlock_NSProgress_ffiVoidNSURLboolNSError._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + int get weekOfMonth { + return _objc_msgSend_114(this.pointer, _sel_weekOfMonth); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_NSProgress_ffiVoidNSURLboolNSError castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_NSProgress_ffiVoidNSURLboolNSError._(pointer, lib, - retain: retain, release: release); + set weekOfMonth(int value) { + return _objc_msgSend_134(this.pointer, _sel_setWeekOfMonth_, value); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSProgress_ffiVoidNSURLboolNSError.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + int get weekOfYear { + return _objc_msgSend_114(this.pointer, _sel_weekOfYear); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSProgress_ffiVoidNSURLboolNSError.fromFunction(SwiftLibrary lib, - NSProgress? Function(ObjCBlock_ffiVoid_NSURL_bool_NSError) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureTrampoline) - .cast(), - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_registerClosure( - (ffi.Pointer<_ObjCBlock> arg0) => - fn(ObjCBlock_ffiVoid_NSURL_bool_NSError._(arg0, lib, retain: true, release: true)) - ?.retainAndReturnPointer() ?? - ffi.nullptr)), - lib); - static ffi.Pointer? _dartFuncTrampoline; + set weekOfYear(int value) { + return _objc_msgSend_134(this.pointer, _sel_setWeekOfYear_, value); + } - NSProgress? call(ObjCBlock_ffiVoid_NSURL_bool_NSError arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>() - (_id, arg0._id) - .address == - 0 - ? null - : NSProgress._( - _id.ref.invoke - .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>()(_id, arg0._id), - _lib, - retain: false, - release: true); -} + int get yearForWeekOfYear { + return _objc_msgSend_114(this.pointer, _sel_yearForWeekOfYear); + } -void _ObjCBlock_ffiVoid_NSURL_bool_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, bool, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry = , bool, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( - void Function(ffi.Pointer, bool, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + set yearForWeekOfYear(int value) { + return _objc_msgSend_134(this.pointer, _sel_setYearForWeekOfYear_, value); + } -void _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); + bool get leapMonth { + return _objc_msgSend_7(this.pointer, _sel_isLeapMonth); + } -class ObjCBlock_ffiVoid_NSURL_bool_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSURL_bool_NSError._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + set leapMonth(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setLeapMonth_, value); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSURL_bool_NSError castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSURL_bool_NSError._(pointer, lib, - retain: retain, release: release); + objc.NSDate? get date { + final _ret = _objc_msgSend_116(this.pointer, _sel_date); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURL_bool_NSError.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_bool_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + int week() { + return _objc_msgSend_114(this.pointer, _sel_week); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURL_bool_NSError.fromFunction( - SwiftLibrary lib, void Function(NSURL?, bool, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Bool, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( - (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn( - arg0.address == 0 - ? null - : NSURL._(arg0, lib, retain: true, release: true), - arg1, - arg2.address == 0 - ? null - : NSError._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + void setWeek_(int v) { + _objc_msgSend_135(this.pointer, _sel_setWeek_, v); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSURL_bool_NSError.listener( - SwiftLibrary lib, void Function(NSURL?, bool, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Bool, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( - (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn( - arg0.address == 0 - ? null - : NSURL._(arg0, lib, retain: true, release: true), - arg1, - arg2.address == 0 - ? null - : NSError._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Bool, ffi.Pointer)>? _dartFuncListenerTrampoline; + void setValue_forComponent_(int value, int unit) { + _objc_msgSend_136(this.pointer, _sel_setValue_forComponent_, value, unit); + } - void call(NSURL? arg0, bool arg1, NSError? arg2) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - bool, ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1, arg2?._id ?? ffi.nullptr); -} + int valueForComponent_(int unit) { + return _objc_msgSend_137(this.pointer, _sel_valueForComponent_, unit); + } -void _ObjCBlock_ffiVoid_NSURL_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSURL_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + bool get validDate { + return _objc_msgSend_7(this.pointer, _sel_isValidDate); + } -void _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry[block.ref.target.address]!( - arg0, arg1); + bool isValidDateInCalendar_(NSCalendar calendar) { + return _objc_msgSend_138( + this.pointer, _sel_isValidDateInCalendar_, calendar.pointer); + } -class ObjCBlock_ffiVoid_NSURL_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSURL_NSError._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + @override + NSDateComponents init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSURL_NSError castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSURL_NSError._(pointer, lib, - retain: retain, release: release); + static NSDateComponents new1() { + final _ret = _objc_msgSend_40(_class_NSDateComponents, _sel_new); + return NSDateComponents.castFromPointer(_ret, retain: false, release: true); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURL_NSError.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static NSDateComponents allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSDateComponents, _sel_allocWithZone_, zone); + return NSDateComponents.castFromPointer(_ret, retain: false, release: true); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURL_NSError.fromFunction( - SwiftLibrary lib, void Function(NSURL?, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSURL._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + static NSDateComponents alloc() { + final _ret = _objc_msgSend_40(_class_NSDateComponents, _sel_alloc); + return NSDateComponents.castFromPointer(_ret, retain: false, release: true); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSURL_NSError.listener( - SwiftLibrary lib, void Function(NSURL?, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSURL._(arg0, lib, retain: true, release: true), - arg1.address == 0 - ? null - : NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSDateComponents, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } - void call(NSURL? arg0, NSError? arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); -} + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSDateComponents, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>)>()(arg0); -final _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistry = - Function(ffi.Pointer<_ObjCBlock>)>{}; -int _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_registerClosure( - ffi.Pointer Function(ffi.Pointer<_ObjCBlock>) fn) { - final id = - ++_ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistryIndex; - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSDateComponents, _sel_accessInstanceVariablesDirectly); + } -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistry[ - block.ref.target.address]!(arg0); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSDateComponents, _sel_useStoredAccessor); + } -class ObjCBlock_NSProgress_ffiVoidObjCObjectNSError extends _ObjCBlockBase { - ObjCBlock_NSProgress_ffiVoidObjCObjectNSError._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSDateComponents, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_NSProgress_ffiVoidObjCObjectNSError castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_NSProgress_ffiVoidObjCObjectNSError._(pointer, lib, - retain: retain, release: release); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSDateComponents, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSProgress_ffiVoidObjCObjectNSError.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSDateComponents, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSDateComponents, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSDateComponents, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSDateComponents = objc.getClass("NSDateComponents"); +late final _sel_calendar = objc.registerName("calendar"); +final _objc_msgSend_130 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCalendar_ = objc.registerName("setCalendar:"); +final _objc_msgSend_131 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_132 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_133 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_era = objc.registerName("era"); +late final _sel_setEra_ = objc.registerName("setEra:"); +final _objc_msgSend_134 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_year = objc.registerName("year"); +late final _sel_setYear_ = objc.registerName("setYear:"); +late final _sel_month = objc.registerName("month"); +late final _sel_setMonth_ = objc.registerName("setMonth:"); +late final _sel_day = objc.registerName("day"); +late final _sel_setDay_ = objc.registerName("setDay:"); +late final _sel_hour = objc.registerName("hour"); +late final _sel_setHour_ = objc.registerName("setHour:"); +late final _sel_minute = objc.registerName("minute"); +late final _sel_setMinute_ = objc.registerName("setMinute:"); +late final _sel_second = objc.registerName("second"); +late final _sel_setSecond_ = objc.registerName("setSecond:"); +late final _sel_nanosecond = objc.registerName("nanosecond"); +late final _sel_setNanosecond_ = objc.registerName("setNanosecond:"); +late final _sel_weekday = objc.registerName("weekday"); +late final _sel_setWeekday_ = objc.registerName("setWeekday:"); +late final _sel_weekdayOrdinal = objc.registerName("weekdayOrdinal"); +late final _sel_setWeekdayOrdinal_ = objc.registerName("setWeekdayOrdinal:"); +late final _sel_quarter = objc.registerName("quarter"); +late final _sel_setQuarter_ = objc.registerName("setQuarter:"); +late final _sel_weekOfMonth = objc.registerName("weekOfMonth"); +late final _sel_setWeekOfMonth_ = objc.registerName("setWeekOfMonth:"); +late final _sel_weekOfYear = objc.registerName("weekOfYear"); +late final _sel_setWeekOfYear_ = objc.registerName("setWeekOfYear:"); +late final _sel_yearForWeekOfYear = objc.registerName("yearForWeekOfYear"); +late final _sel_setYearForWeekOfYear_ = + objc.registerName("setYearForWeekOfYear:"); +late final _sel_isLeapMonth = objc.registerName("isLeapMonth"); +late final _sel_setLeapMonth_ = objc.registerName("setLeapMonth:"); +late final _sel_date = objc.registerName("date"); +late final _sel_week = objc.registerName("week"); +late final _sel_setWeek_ = objc.registerName("setWeek:"); +final _objc_msgSend_135 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setValue_forComponent_ = + objc.registerName("setValue:forComponent:"); +final _objc_msgSend_136 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Long, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int, int)>(); +late final _sel_valueForComponent_ = objc.registerName("valueForComponent:"); +final _objc_msgSend_137 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_isValidDate = objc.registerName("isValidDate"); +late final _sel_isValidDateInCalendar_ = + objc.registerName("isValidDateInCalendar:"); +final _objc_msgSend_138 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dateFromComponents_ = objc.registerName("dateFromComponents:"); +final _objc_msgSend_139 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_components_fromDate_ = + objc.registerName("components:fromDate:"); +final _objc_msgSend_140 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSProgress_ffiVoidObjCObjectNSError.fromFunction(SwiftLibrary lib, - NSProgress? Function(ObjCBlock_ffiVoid_ObjCObject_NSError) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureTrampoline) - .cast(), - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_registerClosure( - (ffi.Pointer<_ObjCBlock> arg0) => - fn(ObjCBlock_ffiVoid_ObjCObject_NSError._(arg0, lib, retain: true, release: true)) - ?.retainAndReturnPointer() ?? - ffi.nullptr)), - lib); - static ffi.Pointer? _dartFuncTrampoline; +abstract class NSCalendarOptions { + static const int NSCalendarWrapComponents = 1; + static const int NSCalendarMatchStrictly = 2; + static const int NSCalendarSearchBackwards = 4; + static const int NSCalendarMatchPreviousTimePreservingSmallerUnits = 256; + static const int NSCalendarMatchNextTimePreservingSmallerUnits = 512; + static const int NSCalendarMatchNextTime = 1024; + static const int NSCalendarMatchFirst = 4096; + static const int NSCalendarMatchLast = 8192; +} - NSProgress? call(ObjCBlock_ffiVoid_ObjCObject_NSError arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>() - (_id, arg0._id) - .address == - 0 - ? null - : NSProgress._( - _id.ref.invoke - .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>()(_id, arg0._id), - _lib, - retain: false, - release: true); +late final _sel_dateByAddingComponents_toDate_options_ = + objc.registerName("dateByAddingComponents:toDate:options:"); +final _objc_msgSend_141 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_components_fromDate_toDate_options_ = + objc.registerName("components:fromDate:toDate:options:"); +final _objc_msgSend_142 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_getEra_year_month_day_fromDate_ = + objc.registerName("getEra:year:month:day:fromDate:"); +final _objc_msgSend_143 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_ = + objc.registerName("getEra:yearForWeekOfYear:weekOfYear:weekday:fromDate:"); +late final _sel_getHour_minute_second_nanosecond_fromDate_ = + objc.registerName("getHour:minute:second:nanosecond:fromDate:"); +late final _sel_component_fromDate_ = objc.registerName("component:fromDate:"); +final _objc_msgSend_144 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_dateWithEra_year_month_day_hour_minute_second_nanosecond_ = objc + .registerName("dateWithEra:year:month:day:hour:minute:second:nanosecond:"); +final _objc_msgSend_145 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + int, + int, + int, + int, + int, + int)>(); +late final _sel_dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_ = + objc.registerName( + "dateWithEra:yearForWeekOfYear:weekOfYear:weekday:hour:minute:second:nanosecond:"); +late final _sel_startOfDayForDate_ = objc.registerName("startOfDayForDate:"); +final _objc_msgSend_146 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_componentsInTimeZone_fromDate_ = + objc.registerName("componentsInTimeZone:fromDate:"); +final _objc_msgSend_147 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +abstract class NSComparisonResult { + static const int NSOrderedAscending = -1; + static const int NSOrderedSame = 0; + static const int NSOrderedDescending = 1; } -void _ObjCBlock_ffiVoid_ObjCObject_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => +late final _sel_compareDate_toDate_toUnitGranularity_ = + objc.registerName("compareDate:toDate:toUnitGranularity:"); +final _objc_msgSend_148 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_isDate_equalToDate_toUnitGranularity_ = + objc.registerName("isDate:equalToDate:toUnitGranularity:"); +final _objc_msgSend_149 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_isDate_inSameDayAsDate_ = + objc.registerName("isDate:inSameDayAsDate:"); +final _objc_msgSend_150 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_isDateInToday_ = objc.registerName("isDateInToday:"); +late final _sel_isDateInYesterday_ = objc.registerName("isDateInYesterday:"); +late final _sel_isDateInTomorrow_ = objc.registerName("isDateInTomorrow:"); +late final _sel_isDateInWeekend_ = objc.registerName("isDateInWeekend:"); +late final _sel_rangeOfWeekendStartDate_interval_containingDate_ = + objc.registerName("rangeOfWeekendStartDate:interval:containingDate:"); +final _objc_msgSend_151 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_nextWeekendStartDate_interval_options_afterDate_ = + objc.registerName("nextWeekendStartDate:interval:options:afterDate:"); +final _objc_msgSend_152 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_components_fromDateComponents_toDateComponents_options_ = objc + .registerName("components:fromDateComponents:toDateComponents:options:"); +final _objc_msgSend_153 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_dateByAddingUnit_value_toDate_options_ = + objc.registerName("dateByAddingUnit:value:toDate:options:"); +final _objc_msgSend_154 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Long, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer, + int)>(); +void _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() + ffi.Void Function(ffi.Pointer arg0, + ffi.Bool arg1, ffi.Pointer arg2)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_ObjCObject_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistry[id] = fn; + void Function(ffi.Pointer, bool, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry = , bool, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( + void Function(ffi.Pointer, bool, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_ObjCObject_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1); +void _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock_ffiVoid_ObjCObject_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ObjCObject_NSError._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, +class ObjCBlock_ffiVoid_NSDate_bool_bool extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSDate_bool_bool._(ffi.Pointer pointer, {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ObjCObject_NSError castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ObjCObject_NSError._(pointer, lib, + static ObjCBlock_ffiVoid_NSDate_bool_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSDate_bool_bool._(pointer, retain: retain, release: release); } @@ -54139,24 +6314,22 @@ class ObjCBlock_ffiVoid_ObjCObject_NSError extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_NSError.fromFunctionPointer( - SwiftLibrary lib, + ObjCBlock_ffiVoid_NSDate_bool_bool.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> + ffi.Void Function(ffi.Pointer arg0, + ffi.Bool arg1, ffi.Pointer arg2)>> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. @@ -54164,21 +6337,21 @@ class ObjCBlock_ffiVoid_ObjCObject_NSError extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_NSError.fromFunction(SwiftLibrary lib, void Function(NSObject?, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSObject._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSError._(arg1, lib, retain: true, release: true)))), - lib); + ObjCBlock_ffiVoid_NSDate_bool_bool.fromFunction( + void Function(objc.NSDate?, bool, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( + (ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : objc.NSDate.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -54190,4800 +6363,7067 @@ class ObjCBlock_ffiVoid_ObjCObject_NSError extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ObjCObject_NSError.listener( - SwiftLibrary lib, void Function(NSObject?, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ObjCObject_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSObject._(arg0, lib, - retain: true, release: true), - arg1.address == 0 - ? null - : NSError._(arg1, lib, retain: true, release: true)))), - lib); + ObjCBlock_ffiVoid_NSDate_bool_bool.listener( + void Function(objc.NSDate?, bool, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( + (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : objc.NSDate.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>? _dartFuncListenerTrampoline; - void call(NSObject? arg0, NSError? arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); -} + void call(objc.NSDate? arg0, bool arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr, arg1, arg2); +} + +late final _sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_ = + objc.registerName( + "enumerateDatesStartingAfterDate:matchingComponents:options:usingBlock:"); +final _objc_msgSend_155 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_nextDateAfterDate_matchingComponents_options_ = + objc.registerName("nextDateAfterDate:matchingComponents:options:"); +final _objc_msgSend_156 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_nextDateAfterDate_matchingUnit_value_options_ = + objc.registerName("nextDateAfterDate:matchingUnit:value:options:"); +final _objc_msgSend_157 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Long, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + int)>(); +late final _sel_nextDateAfterDate_matchingHour_minute_second_options_ = + objc.registerName("nextDateAfterDate:matchingHour:minute:second:options:"); +final _objc_msgSend_158 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + int, + int)>(); +late final _sel_dateBySettingUnit_value_ofDate_options_ = + objc.registerName("dateBySettingUnit:value:ofDate:options:"); +late final _sel_dateBySettingHour_minute_second_ofDate_options_ = + objc.registerName("dateBySettingHour:minute:second:ofDate:options:"); +final _objc_msgSend_159 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + int, + ffi.Pointer, + int)>(); +late final _sel_date_matchesComponents_ = + objc.registerName("date:matchesComponents:"); +final _objc_msgSend_160 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +final _objc_msgSend_161 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isLenient = objc.registerName("isLenient"); +late final _sel_setLenient_ = objc.registerName("setLenient:"); +late final _sel_twoDigitStartDate = objc.registerName("twoDigitStartDate"); +late final _sel_setTwoDigitStartDate_ = + objc.registerName("setTwoDigitStartDate:"); +final _objc_msgSend_162 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_defaultDate = objc.registerName("defaultDate"); +late final _sel_setDefaultDate_ = objc.registerName("setDefaultDate:"); +late final _sel_setEraSymbols_ = objc.registerName("setEraSymbols:"); +final _objc_msgSend_163 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setMonthSymbols_ = objc.registerName("setMonthSymbols:"); +late final _sel_setShortMonthSymbols_ = + objc.registerName("setShortMonthSymbols:"); +late final _sel_setWeekdaySymbols_ = objc.registerName("setWeekdaySymbols:"); +late final _sel_setShortWeekdaySymbols_ = + objc.registerName("setShortWeekdaySymbols:"); +late final _sel_setAMSymbol_ = objc.registerName("setAMSymbol:"); +late final _sel_setPMSymbol_ = objc.registerName("setPMSymbol:"); +late final _sel_setLongEraSymbols_ = objc.registerName("setLongEraSymbols:"); +late final _sel_setVeryShortMonthSymbols_ = + objc.registerName("setVeryShortMonthSymbols:"); +late final _sel_setStandaloneMonthSymbols_ = + objc.registerName("setStandaloneMonthSymbols:"); +late final _sel_setShortStandaloneMonthSymbols_ = + objc.registerName("setShortStandaloneMonthSymbols:"); +late final _sel_setVeryShortStandaloneMonthSymbols_ = + objc.registerName("setVeryShortStandaloneMonthSymbols:"); +late final _sel_setVeryShortWeekdaySymbols_ = + objc.registerName("setVeryShortWeekdaySymbols:"); +late final _sel_setStandaloneWeekdaySymbols_ = + objc.registerName("setStandaloneWeekdaySymbols:"); +late final _sel_setShortStandaloneWeekdaySymbols_ = + objc.registerName("setShortStandaloneWeekdaySymbols:"); +late final _sel_setVeryShortStandaloneWeekdaySymbols_ = + objc.registerName("setVeryShortStandaloneWeekdaySymbols:"); +late final _sel_setQuarterSymbols_ = objc.registerName("setQuarterSymbols:"); +late final _sel_setShortQuarterSymbols_ = + objc.registerName("setShortQuarterSymbols:"); +late final _sel_setStandaloneQuarterSymbols_ = + objc.registerName("setStandaloneQuarterSymbols:"); +late final _sel_setShortStandaloneQuarterSymbols_ = + objc.registerName("setShortStandaloneQuarterSymbols:"); +late final _sel_gregorianStartDate = objc.registerName("gregorianStartDate"); +late final _sel_setGregorianStartDate_ = + objc.registerName("setGregorianStartDate:"); +late final _sel_doesRelativeDateFormatting = + objc.registerName("doesRelativeDateFormatting"); +late final _sel_setDoesRelativeDateFormatting_ = + objc.registerName("setDoesRelativeDateFormatting:"); +late final _sel_initWithDateFormat_allowNaturalLanguage_ = + objc.registerName("initWithDateFormat:allowNaturalLanguage:"); +final _objc_msgSend_164 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_allowsNaturalLanguage = + objc.registerName("allowsNaturalLanguage"); -void - _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureRegistry = - , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_registerClosure( - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureRegistry[ - id] = fn; - return ffi.Pointer.fromAddress(id); -} +class NSNumberFormatter extends NSFormatter { + NSNumberFormatter._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); -void _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); + /// Constructs a [NSNumberFormatter] that points to the same underlying object as [other]. + NSNumberFormatter.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); -class ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary - extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + /// Constructs a [NSNumberFormatter] that wraps the given raw object pointer. + NSNumberFormatter.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary - castFromPointer(SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary._( - pointer, lib, - retain: retain, release: release); + /// Returns whether [obj] is an instance of [NSNumberFormatter]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSNumberFormatter); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + int get formattingContext { + return _objc_msgSend_89(this.pointer, _sel_formattingContext); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary.fromFunction( - SwiftLibrary lib, - void Function(ObjCBlock_ffiVoid_ObjCObject_NSError1, NSObject, NSDictionary) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_registerClosure( - (ffi.Pointer<_ObjCBlock> arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - ObjCBlock_ffiVoid_ObjCObject_NSError1._(arg0, lib, retain: true, release: true), - NSObject._(arg1, lib, retain: true, release: true), - NSDictionary._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + set formattingContext(int value) { + return _objc_msgSend_90(this.pointer, _sel_setFormattingContext_, value); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary.listener( - SwiftLibrary lib, - void Function(ObjCBlock_ffiVoid_ObjCObject_NSError1, NSObject, NSDictionary) - fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable, ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiVoidObjCObjectNSError_ObjCObject_NSDictionary_registerClosure( - (ffi.Pointer<_ObjCBlock> arg0, ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - ObjCBlock_ffiVoid_ObjCObject_NSError1._(arg0, lib, retain: true, release: true), - NSObject._(arg1, lib, retain: true, release: true), - NSDictionary._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(ObjCBlock_ffiVoid_ObjCObject_NSError1 arg0, NSObject arg1, - NSDictionary arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>()( - _id, arg0._id, arg1._id, arg2._id); -} + bool getObjectValue_forString_range_error_( + ffi.Pointer> obj, + objc.NSString string, + ffi.Pointer<_NSRange> rangep, + ffi.Pointer> error) { + return _objc_msgSend_91( + this.pointer, + _sel_getObjectValue_forString_range_error_, + obj, + string.pointer, + rangep, + error); + } -void _ObjCBlock_ffiVoid_ObjCObject_NSError1_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_ObjCObject_NSError1_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistryIndex; - _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + objc.NSString? stringFromNumber_(objc.NSNumber number) { + final _ret = + _objc_msgSend_165(this.pointer, _sel_stringFromNumber_, number.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -void _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistry[ - block.ref.target.address]!(arg0, arg1); + objc.NSNumber? numberFromString_(objc.NSString string) { + final _ret = + _objc_msgSend_166(this.pointer, _sel_numberFromString_, string.pointer); + return _ret.address == 0 + ? null + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } -class ObjCBlock_ffiVoid_ObjCObject_NSError1 extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ObjCObject_NSError1._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + static objc.NSString localizedStringFromNumber_numberStyle_( + objc.NSNumber num, int nstyle) { + final _ret = _objc_msgSend_167(_class_NSNumberFormatter, + _sel_localizedStringFromNumber_numberStyle_, num.pointer, nstyle); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ObjCObject_NSError1 castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ObjCObject_NSError1._(pointer, lib, - retain: retain, release: release); + static int defaultFormatterBehavior() { + return _objc_msgSend_168( + _class_NSNumberFormatter, _sel_defaultFormatterBehavior); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_NSError1.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_NSError1_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static void setDefaultFormatterBehavior_(int behavior) { + _objc_msgSend_169( + _class_NSNumberFormatter, _sel_setDefaultFormatterBehavior_, behavior); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_NSError1.fromFunction(SwiftLibrary lib, void Function(NSObject?, NSError) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_NSError1_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSObject._(arg0, lib, retain: true, release: true), - NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + int get numberStyle { + return _objc_msgSend_170(this.pointer, _sel_numberStyle); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ObjCObject_NSError1.listener( - SwiftLibrary lib, void Function(NSObject?, NSError) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi - .NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_NSError1_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSObject._(arg0, lib, retain: true, release: true), - NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + set numberStyle(int value) { + return _objc_msgSend_171(this.pointer, _sel_setNumberStyle_, value); + } + + objc.NSLocale get locale { + final _ret = _objc_msgSend_102(this.pointer, _sel_locale); + return objc.NSLocale.castFromPointer(_ret, retain: true, release: true); + } + + set locale(objc.NSLocale value) { + return _objc_msgSend_103(this.pointer, _sel_setLocale_, value.pointer); + } + + bool get generatesDecimalNumbers { + return _objc_msgSend_7(this.pointer, _sel_generatesDecimalNumbers); + } + + set generatesDecimalNumbers(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setGeneratesDecimalNumbers_, value); + } + + int get formatterBehavior { + return _objc_msgSend_168(this.pointer, _sel_formatterBehavior); + } + + set formatterBehavior(int value) { + return _objc_msgSend_172(this.pointer, _sel_setFormatterBehavior_, value); + } + + objc.NSString get negativeFormat { + final _ret = _objc_msgSend_12(this.pointer, _sel_negativeFormat); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set negativeFormat(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setNegativeFormat_, value.pointer); + } + + objc.NSDictionary? get textAttributesForNegativeValues { + final _ret = + _objc_msgSend_65(this.pointer, _sel_textAttributesForNegativeValues); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + set textAttributesForNegativeValues(objc.NSDictionary? value) { + return _objc_msgSend_173( + this.pointer, + _sel_setTextAttributesForNegativeValues_, + value?.pointer ?? ffi.nullptr); + } + + objc.NSString get positiveFormat { + final _ret = _objc_msgSend_12(this.pointer, _sel_positiveFormat); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set positiveFormat(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPositiveFormat_, value.pointer); + } + + objc.NSDictionary? get textAttributesForPositiveValues { + final _ret = + _objc_msgSend_65(this.pointer, _sel_textAttributesForPositiveValues); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + set textAttributesForPositiveValues(objc.NSDictionary? value) { + return _objc_msgSend_173( + this.pointer, + _sel_setTextAttributesForPositiveValues_, + value?.pointer ?? ffi.nullptr); + } + + bool get allowsFloats { + return _objc_msgSend_7(this.pointer, _sel_allowsFloats); + } + + set allowsFloats(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setAllowsFloats_, value); + } + + objc.NSString get decimalSeparator { + final _ret = _objc_msgSend_12(this.pointer, _sel_decimalSeparator); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set decimalSeparator(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setDecimalSeparator_, value.pointer); + } - void call(NSObject? arg0, NSError arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1._id); -} + bool get alwaysShowsDecimalSeparator { + return _objc_msgSend_7(this.pointer, _sel_alwaysShowsDecimalSeparator); + } -class NSMutableString extends NSString { - NSMutableString._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + set alwaysShowsDecimalSeparator(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAlwaysShowsDecimalSeparator_, value); + } - /// 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); + objc.NSString get currencyDecimalSeparator { + final _ret = _objc_msgSend_12(this.pointer, _sel_currencyDecimalSeparator); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSMutableString] that wraps the given raw object pointer. - static NSMutableString castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableString._(other, lib, retain: retain, release: release); + set currencyDecimalSeparator(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setCurrencyDecimalSeparator_, value.pointer); } - /// 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); + bool get usesGroupingSeparator { + return _objc_msgSend_7(this.pointer, _sel_usesGroupingSeparator); } - void replaceCharactersInRange_withString_(_NSRange range, NSString aString) { - _lib._objc_msgSend_689(_id, _lib._sel_replaceCharactersInRange_withString_1, - range, aString._id); + set usesGroupingSeparator(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setUsesGroupingSeparator_, value); } - void insertString_atIndex_(NSString aString, int loc) { - _lib._objc_msgSend_690( - _id, _lib._sel_insertString_atIndex_1, aString._id, loc); + objc.NSString get groupingSeparator { + final _ret = _objc_msgSend_12(this.pointer, _sel_groupingSeparator); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void deleteCharactersInRange_(_NSRange range) { - _lib._objc_msgSend_476(_id, _lib._sel_deleteCharactersInRange_1, range); + set groupingSeparator(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setGroupingSeparator_, value.pointer); + } + + objc.NSString? get zeroSymbol { + final _ret = _objc_msgSend_13(this.pointer, _sel_zeroSymbol); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void appendString_(NSString aString) { - _lib._objc_msgSend_247(_id, _lib._sel_appendString_1, aString._id); + set zeroSymbol(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setZeroSymbol_, value?.pointer ?? ffi.nullptr); } - void appendFormat_(NSString format) { - _lib._objc_msgSend_247(_id, _lib._sel_appendFormat_1, format._id); + objc.NSDictionary? get textAttributesForZero { + final _ret = _objc_msgSend_65(this.pointer, _sel_textAttributesForZero); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - void setString_(NSString aString) { - _lib._objc_msgSend_247(_id, _lib._sel_setString_1, aString._id); + set textAttributesForZero(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setTextAttributesForZero_, + value?.pointer ?? ffi.nullptr); } - int replaceOccurrencesOfString_withString_options_range_(NSString target, - NSString replacement, int options, _NSRange searchRange) { - return _lib._objc_msgSend_691( - _id, - _lib._sel_replaceOccurrencesOfString_withString_options_range_1, - target._id, - replacement._id, - options, - searchRange); + objc.NSString get nilSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_nilSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool applyTransform_reverse_range_updatedRange_(NSString transform, - bool reverse, _NSRange range, ffi.Pointer<_NSRange> resultingRange) { - return _lib._objc_msgSend_692( - _id, - _lib._sel_applyTransform_reverse_range_updatedRange_1, - transform._id, - reverse, - range, - resultingRange); + set nilSymbol(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setNilSymbol_, value.pointer); } - NSMutableString initWithCapacity_(int capacity) { - final _ret = - _lib._objc_msgSend_693(_id, _lib._sel_initWithCapacity_1, capacity); - return NSMutableString._(_ret, _lib, retain: true, release: true); + objc.NSDictionary? get textAttributesForNil { + final _ret = _objc_msgSend_65(this.pointer, _sel_textAttributesForNil); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSMutableString stringWithCapacity_(SwiftLibrary _lib, int capacity) { - final _ret = _lib._objc_msgSend_693( - _lib._class_NSMutableString1, _lib._sel_stringWithCapacity_1, capacity); - return NSMutableString._(_ret, _lib, retain: true, release: true); + set textAttributesForNil(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setTextAttributesForNil_, + value?.pointer ?? ffi.nullptr); } - @override - NSMutableString init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableString._(_ret, _lib, retain: true, release: true); + objc.NSString get notANumberSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_notANumberSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString? initWithCoder_(NSCoder coder) { + set notANumberSymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setNotANumberSymbol_, value.pointer); + } + + objc.NSDictionary? get textAttributesForNotANumber { final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); + _objc_msgSend_65(this.pointer, _sel_textAttributesForNotANumber); return _ret.address == 0 ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static ffi.Pointer getAvailableStringEncodings( - SwiftLibrary _lib) { - return _lib._objc_msgSend_357( - _lib._class_NSMutableString1, _lib._sel_availableStringEncodings1); + set textAttributesForNotANumber(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setTextAttributesForNotANumber_, + value?.pointer ?? ffi.nullptr); } - static NSString localizedNameOfStringEncoding_( - SwiftLibrary _lib, int encoding) { - final _ret = _lib._objc_msgSend_332(_lib._class_NSMutableString1, - _lib._sel_localizedNameOfStringEncoding_1, encoding); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSString get positiveInfinitySymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_positiveInfinitySymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static int getDefaultCStringEncoding(SwiftLibrary _lib) { - return _lib._objc_msgSend_10( - _lib._class_NSMutableString1, _lib._sel_defaultCStringEncoding1); + set positiveInfinitySymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPositiveInfinitySymbol_, value.pointer); } - @override - NSMutableString initWithCharactersNoCopy_length_freeWhenDone_( - ffi.Pointer characters, int length, bool freeBuffer) { - final _ret = _lib._objc_msgSend_369( - _id, - _lib._sel_initWithCharactersNoCopy_length_freeWhenDone_1, - characters, - length, - freeBuffer); - return NSMutableString._(_ret, _lib, retain: false, release: true); + objc.NSDictionary? get textAttributesForPositiveInfinity { + final _ret = + _objc_msgSend_65(this.pointer, _sel_textAttributesForPositiveInfinity); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString initWithCharactersNoCopy_length_deallocator_( - ffi.Pointer chars, - int len, - ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong? deallocator) { - final _ret = _lib._objc_msgSend_370( - _id, - _lib._sel_initWithCharactersNoCopy_length_deallocator_1, - chars, - len, - deallocator?._id ?? ffi.nullptr); - return NSMutableString._(_ret, _lib, retain: false, release: true); + set textAttributesForPositiveInfinity(objc.NSDictionary? value) { + return _objc_msgSend_173( + this.pointer, + _sel_setTextAttributesForPositiveInfinity_, + value?.pointer ?? ffi.nullptr); } - @override - NSMutableString initWithCharacters_length_( - ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_371( - _id, _lib._sel_initWithCharacters_length_1, characters, length); - return NSMutableString._(_ret, _lib, retain: true, release: true); + objc.NSString get negativeInfinitySymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_negativeInfinitySymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString? initWithUTF8String_( - ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_372( - _id, _lib._sel_initWithUTF8String_1, nullTerminatedCString); + set negativeInfinitySymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setNegativeInfinitySymbol_, value.pointer); + } + + objc.NSDictionary? get textAttributesForNegativeInfinity { + final _ret = + _objc_msgSend_65(this.pointer, _sel_textAttributesForNegativeInfinity); return _ret.address == 0 ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString initWithString_(NSString aString) { - final _ret = - _lib._objc_msgSend_31(_id, _lib._sel_initWithString_1, aString._id); - return NSMutableString._(_ret, _lib, retain: true, release: true); + set textAttributesForNegativeInfinity(objc.NSDictionary? value) { + return _objc_msgSend_173( + this.pointer, + _sel_setTextAttributesForNegativeInfinity_, + value?.pointer ?? ffi.nullptr); } - @override - NSMutableString initWithFormat_(NSString format) { - final _ret = - _lib._objc_msgSend_31(_id, _lib._sel_initWithFormat_1, format._id); - return NSMutableString._(_ret, _lib, retain: true, release: true); + objc.NSString get positivePrefix { + final _ret = _objc_msgSend_12(this.pointer, _sel_positivePrefix); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString initWithFormat_arguments_( - NSString format, ffi.Pointer<__va_list_tag> argList) { - final _ret = _lib._objc_msgSend_373( - _id, _lib._sel_initWithFormat_arguments_1, format._id, argList); - return NSMutableString._(_ret, _lib, retain: true, release: true); + set positivePrefix(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPositivePrefix_, value.pointer); } - @override - NSMutableString initWithFormat_locale_(NSString format, NSObject? locale) { - final _ret = _lib._objc_msgSend_374(_id, _lib._sel_initWithFormat_locale_1, - format._id, locale?._id ?? ffi.nullptr); - return NSMutableString._(_ret, _lib, retain: true, release: true); + objc.NSString get positiveSuffix { + final _ret = _objc_msgSend_12(this.pointer, _sel_positiveSuffix); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString initWithFormat_locale_arguments_( - NSString format, NSObject? locale, ffi.Pointer<__va_list_tag> argList) { - final _ret = _lib._objc_msgSend_375( - _id, - _lib._sel_initWithFormat_locale_arguments_1, - format._id, - locale?._id ?? ffi.nullptr, - argList); - return NSMutableString._(_ret, _lib, retain: true, release: true); + set positiveSuffix(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPositiveSuffix_, value.pointer); } - @override - NSMutableString? initWithValidatedFormat_validFormatSpecifiers_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_376( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + objc.NSString get negativePrefix { + final _ret = _objc_msgSend_12(this.pointer, _sel_negativePrefix); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_377( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1, - format._id, - validFormatSpecifiers._id, - locale?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + set negativePrefix(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setNegativePrefix_, value.pointer); } - @override - NSMutableString? - initWithValidatedFormat_validFormatSpecifiers_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer<__va_list_tag> argList, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_378( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1, - format._id, - validFormatSpecifiers._id, - argList, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + objc.NSString get negativeSuffix { + final _ret = _objc_msgSend_12(this.pointer, _sel_negativeSuffix); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString? - initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - ffi.Pointer<__va_list_tag> argList, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_379( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1, - format._id, - validFormatSpecifiers._id, - locale?._id ?? ffi.nullptr, - argList, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + set negativeSuffix(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setNegativeSuffix_, value.pointer); } - @override - NSMutableString? initWithData_encoding_(NSData data, int encoding) { - final _ret = _lib._objc_msgSend_380( - _id, _lib._sel_initWithData_encoding_1, data._id, encoding); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + objc.NSString get currencyCode { + final _ret = _objc_msgSend_12(this.pointer, _sel_currencyCode); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString? initWithBytes_length_encoding_( - ffi.Pointer bytes, int len, int encoding) { - final _ret = _lib._objc_msgSend_381( - _id, _lib._sel_initWithBytes_length_encoding_1, bytes, len, encoding); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + set currencyCode(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setCurrencyCode_, value.pointer); } - @override - NSMutableString? initWithBytesNoCopy_length_encoding_freeWhenDone_( - ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { - final _ret = _lib._objc_msgSend_382( - _id, - _lib._sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1, - bytes, - len, - encoding, - freeBuffer); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: false, release: true); + objc.NSString get currencySymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_currencySymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString? initWithBytesNoCopy_length_encoding_deallocator_( - ffi.Pointer bytes, - int len, - int encoding, - ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { - final _ret = _lib._objc_msgSend_383( - _id, - _lib._sel_initWithBytesNoCopy_length_encoding_deallocator_1, - bytes, - len, - encoding, - deallocator?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: false, release: true); + set currencySymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setCurrencySymbol_, value.pointer); } - static NSMutableString string(SwiftLibrary _lib) { + objc.NSString get internationalCurrencySymbol { final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_string1); - return NSMutableString._(_ret, _lib, retain: true, release: true); + _objc_msgSend_12(this.pointer, _sel_internationalCurrencySymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSMutableString stringWithString_(SwiftLibrary _lib, NSString string) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSMutableString1, _lib._sel_stringWithString_1, string._id); - return NSMutableString._(_ret, _lib, retain: true, release: true); + set internationalCurrencySymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setInternationalCurrencySymbol_, value.pointer); } - static NSMutableString stringWithCharacters_length_(SwiftLibrary _lib, - ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_371(_lib._class_NSMutableString1, - _lib._sel_stringWithCharacters_length_1, characters, length); - return NSMutableString._(_ret, _lib, retain: true, release: true); + objc.NSString get percentSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_percentSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSMutableString? stringWithUTF8String_( - SwiftLibrary _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_372(_lib._class_NSMutableString1, - _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + set percentSymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPercentSymbol_, value.pointer); } - static NSMutableString stringWithFormat_(SwiftLibrary _lib, NSString format) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSMutableString1, _lib._sel_stringWithFormat_1, format._id); - return NSMutableString._(_ret, _lib, retain: true, release: true); + objc.NSString get perMillSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_perMillSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSMutableString localizedStringWithFormat_( - SwiftLibrary _lib, NSString format) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSMutableString1, - _lib._sel_localizedStringWithFormat_1, format._id); - return NSMutableString._(_ret, _lib, retain: true, release: true); + set perMillSymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPerMillSymbol_, value.pointer); } - static NSMutableString? - stringWithValidatedFormat_validFormatSpecifiers_error_( - SwiftLibrary _lib, - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_376( - _lib._class_NSMutableString1, - _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); - } - - static NSMutableString? - localizedStringWithValidatedFormat_validFormatSpecifiers_error_( - SwiftLibrary _lib, - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_376( - _lib._class_NSMutableString1, - _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + objc.NSString get minusSign { + final _ret = _objc_msgSend_12(this.pointer, _sel_minusSign); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString? initWithCString_encoding_( - ffi.Pointer nullTerminatedCString, int encoding) { - final _ret = _lib._objc_msgSend_384(_id, - _lib._sel_initWithCString_encoding_1, nullTerminatedCString, encoding); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + set minusSign(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setMinusSign_, value.pointer); } - static NSMutableString? stringWithCString_encoding_( - SwiftLibrary _lib, ffi.Pointer cString, int enc) { - final _ret = _lib._objc_msgSend_384(_lib._class_NSMutableString1, - _lib._sel_stringWithCString_encoding_1, cString, enc); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + objc.NSString get plusSign { + final _ret = _objc_msgSend_12(this.pointer, _sel_plusSign); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString? initWithContentsOfURL_encoding_error_( - NSURL url, int enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_385(_id, - _lib._sel_initWithContentsOfURL_encoding_error_1, url._id, enc, error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + set plusSign(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setPlusSign_, value.pointer); } - @override - NSMutableString? initWithContentsOfFile_encoding_error_( - NSString path, int enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_386( - _id, - _lib._sel_initWithContentsOfFile_encoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); - } - - static NSMutableString? stringWithContentsOfURL_encoding_error_( - SwiftLibrary _lib, - NSURL url, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_385( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfURL_encoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); - } - - static NSMutableString? stringWithContentsOfFile_encoding_error_( - SwiftLibrary _lib, - NSString path, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_386( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfFile_encoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + objc.NSString get exponentSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_exponentSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString? initWithContentsOfURL_usedEncoding_error_( - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_387( - _id, - _lib._sel_initWithContentsOfURL_usedEncoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + set exponentSymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setExponentSymbol_, value.pointer); } - @override - NSMutableString? initWithContentsOfFile_usedEncoding_error_( - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_388( - _id, - _lib._sel_initWithContentsOfFile_usedEncoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); - } - - static NSMutableString? stringWithContentsOfURL_usedEncoding_error_( - SwiftLibrary _lib, - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_387( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); - } - - static NSMutableString? stringWithContentsOfFile_usedEncoding_error_( - SwiftLibrary _lib, - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_388( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); - } - - static int - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - SwiftLibrary _lib, - NSData data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_389( - _lib._class_NSMutableString1, - _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data._id, - opts?._id ?? ffi.nullptr, - string, - usedLossyConversion); - } - - static NSObject? stringWithContentsOfFile_(SwiftLibrary _lib, NSString path) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + int get groupingSize { + return _objc_msgSend_29(this.pointer, _sel_groupingSize); } - static NSObject? stringWithContentsOfURL_(SwiftLibrary _lib, NSURL url) { - final _ret = _lib._objc_msgSend_277(_lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + set groupingSize(int value) { + return _objc_msgSend_125(this.pointer, _sel_setGroupingSize_, value); } - static NSObject? stringWithCString_length_( - SwiftLibrary _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_384(_lib._class_NSMutableString1, - _lib._sel_stringWithCString_length_1, bytes, length); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + int get secondaryGroupingSize { + return _objc_msgSend_29(this.pointer, _sel_secondaryGroupingSize); + } + + set secondaryGroupingSize(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setSecondaryGroupingSize_, value); } - static NSObject? stringWithCString_( - SwiftLibrary _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_372( - _lib._class_NSMutableString1, _lib._sel_stringWithCString_1, bytes); + objc.NSNumber? get multiplier { + final _ret = _objc_msgSend_174(this.pointer, _sel_multiplier); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } - static NSString pathWithComponents_(SwiftLibrary _lib, NSArray components) { - final _ret = _lib._objc_msgSend_396(_lib._class_NSMutableString1, - _lib._sel_pathWithComponents_1, components._id); - return NSString._(_ret, _lib, retain: true, release: true); + set multiplier(objc.NSNumber? value) { + return _objc_msgSend_175( + this.pointer, _sel_setMultiplier_, value?.pointer ?? ffi.nullptr); } - static NSMutableString new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_new1); - return NSMutableString._(_ret, _lib, retain: false, release: true); + int get formatWidth { + return _objc_msgSend_29(this.pointer, _sel_formatWidth); } - static NSMutableString allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMutableString1, _lib._sel_allocWithZone_1, zone); - return NSMutableString._(_ret, _lib, retain: false, release: true); + set formatWidth(int value) { + return _objc_msgSend_125(this.pointer, _sel_setFormatWidth_, value); } - static NSMutableString alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_alloc1); - return NSMutableString._(_ret, _lib, retain: false, release: true); + objc.NSString get paddingCharacter { + final _ret = _objc_msgSend_12(this.pointer, _sel_paddingCharacter); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSMutableString1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + set paddingCharacter(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPaddingCharacter_, value.pointer); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSMutableString1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + int get paddingPosition { + return _objc_msgSend_176(this.pointer, _sel_paddingPosition); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSMutableString1, - _lib._sel_accessInstanceVariablesDirectly1); + set paddingPosition(int value) { + return _objc_msgSend_177(this.pointer, _sel_setPaddingPosition_, value); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableString1, _lib._sel_useStoredAccessor1); + int get roundingMode { + return _objc_msgSend_178(this.pointer, _sel_roundingMode); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSMutableString1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + set roundingMode(int value) { + return _objc_msgSend_179(this.pointer, _sel_setRoundingMode_, value); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSMutableString1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + objc.NSNumber get roundingIncrement { + final _ret = _objc_msgSend_180(this.pointer, _sel_roundingIncrement); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSMutableString1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + set roundingIncrement(objc.NSNumber value) { + return _objc_msgSend_181( + this.pointer, _sel_setRoundingIncrement_, value.pointer); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSMutableString1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + int get minimumIntegerDigits { + return _objc_msgSend_29(this.pointer, _sel_minimumIntegerDigits); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableString1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + set minimumIntegerDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMinimumIntegerDigits_, value); } -} -class NSNotification extends NSObject { - NSNotification._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + int get maximumIntegerDigits { + return _objc_msgSend_29(this.pointer, _sel_maximumIntegerDigits); + } - /// 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); + set maximumIntegerDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMaximumIntegerDigits_, value); } - /// Returns a [NSNotification] that wraps the given raw object pointer. - static NSNotification castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNotification._(other, lib, retain: retain, release: release); + int get minimumFractionDigits { + return _objc_msgSend_29(this.pointer, _sel_minimumFractionDigits); } - /// 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); + set minimumFractionDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMinimumFractionDigits_, value); } - NSString get name { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_name1); - return NSString._(_ret, _lib, retain: true, release: true); + int get maximumFractionDigits { + return _objc_msgSend_29(this.pointer, _sel_maximumFractionDigits); } - NSObject? get object { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_object1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + set maximumFractionDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMaximumFractionDigits_, value); } - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_userInfo1); + objc.NSNumber? get minimum { + final _ret = _objc_msgSend_174(this.pointer, _sel_minimum); return _ret.address == 0 ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } - NSNotification initWithName_object_userInfo_( - NSString name, NSObject? object, NSDictionary? userInfo) { - final _ret = _lib._objc_msgSend_694( - _id, - _lib._sel_initWithName_object_userInfo_1, - name._id, - object?._id ?? ffi.nullptr, - userInfo?._id ?? ffi.nullptr); - return NSNotification._(_ret, _lib, retain: true, release: true); + set minimum(objc.NSNumber? value) { + return _objc_msgSend_175( + this.pointer, _sel_setMinimum_, value?.pointer ?? ffi.nullptr); } - NSNotification? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); + objc.NSNumber? get maximum { + final _ret = _objc_msgSend_174(this.pointer, _sel_maximum); return _ret.address == 0 ? null - : NSNotification._(_ret, _lib, retain: true, release: true); + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } - static NSNotification notificationWithName_object_( - SwiftLibrary _lib, NSString aName, NSObject? anObject) { - final _ret = _lib._objc_msgSend_374( - _lib._class_NSNotification1, - _lib._sel_notificationWithName_object_1, - aName._id, - anObject?._id ?? ffi.nullptr); - return NSNotification._(_ret, _lib, retain: true, release: true); + set maximum(objc.NSNumber? value) { + return _objc_msgSend_175( + this.pointer, _sel_setMaximum_, value?.pointer ?? ffi.nullptr); } - static NSNotification notificationWithName_object_userInfo_(SwiftLibrary _lib, - NSString aName, NSObject? anObject, NSDictionary? aUserInfo) { - final _ret = _lib._objc_msgSend_694( - _lib._class_NSNotification1, - _lib._sel_notificationWithName_object_userInfo_1, - aName._id, - anObject?._id ?? ffi.nullptr, - aUserInfo?._id ?? ffi.nullptr); - return NSNotification._(_ret, _lib, retain: true, release: true); + objc.NSString get currencyGroupingSeparator { + final _ret = _objc_msgSend_12(this.pointer, _sel_currencyGroupingSeparator); + return objc.NSString.castFromPointer(_ret, 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); + set currencyGroupingSeparator(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setCurrencyGroupingSeparator_, value.pointer); } - static NSNotification new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_new1); - return NSNotification._(_ret, _lib, retain: false, release: true); + bool get lenient { + return _objc_msgSend_7(this.pointer, _sel_isLenient); } - static NSNotification allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSNotification1, _lib._sel_allocWithZone_1, zone); - return NSNotification._(_ret, _lib, retain: false, release: true); + set lenient(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setLenient_, value); } - static NSNotification alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_alloc1); - return NSNotification._(_ret, _lib, retain: false, release: true); + bool get usesSignificantDigits { + return _objc_msgSend_7(this.pointer, _sel_usesSignificantDigits); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSNotification1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + set usesSignificantDigits(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setUsesSignificantDigits_, value); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSNotification1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + int get minimumSignificantDigits { + return _objc_msgSend_29(this.pointer, _sel_minimumSignificantDigits); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSNotification1, - _lib._sel_accessInstanceVariablesDirectly1); + set minimumSignificantDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMinimumSignificantDigits_, value); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSNotification1, _lib._sel_useStoredAccessor1); + int get maximumSignificantDigits { + return _objc_msgSend_29(this.pointer, _sel_maximumSignificantDigits); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSNotification1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + set maximumSignificantDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMaximumSignificantDigits_, value); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSNotification1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + bool get partialStringValidationEnabled { + return _objc_msgSend_7(this.pointer, _sel_isPartialStringValidationEnabled); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSNotification1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + set partialStringValidationEnabled(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setPartialStringValidationEnabled_, value); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSNotification1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool get hasThousandSeparators { + return _objc_msgSend_7(this.pointer, _sel_hasThousandSeparators); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSNotification1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + set hasThousandSeparators(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setHasThousandSeparators_, value); } -} - -class NSBundle extends NSObject { - NSBundle._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSBundle] that points to the same underlying object as [other]. - static NSBundle castFrom(T other) { - return NSBundle._(other._id, other._lib, retain: true, release: true); + objc.NSString get thousandSeparator { + final _ret = _objc_msgSend_12(this.pointer, _sel_thousandSeparator); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSBundle] that wraps the given raw object pointer. - static NSBundle castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSBundle._(other, lib, retain: retain, release: release); + set thousandSeparator(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setThousandSeparator_, value.pointer); } - /// Returns whether [obj] is an instance of [NSBundle]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSBundle1); + bool get localizesFormat { + return _objc_msgSend_7(this.pointer, _sel_localizesFormat); } - static NSBundle getMainBundle(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_695(_lib._class_NSBundle1, _lib._sel_mainBundle1); - return NSBundle._(_ret, _lib, retain: true, release: true); + set localizesFormat(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setLocalizesFormat_, value); } - static NSBundle? bundleWithPath_(SwiftLibrary _lib, NSString path) { - final _ret = _lib._objc_msgSend_38( - _lib._class_NSBundle1, _lib._sel_bundleWithPath_1, path._id); - return _ret.address == 0 - ? null - : NSBundle._(_ret, _lib, retain: true, release: true); + objc.NSString get format { + final _ret = _objc_msgSend_12(this.pointer, _sel_format); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSBundle? initWithPath_(NSString path) { - final _ret = _lib._objc_msgSend_38(_id, _lib._sel_initWithPath_1, path._id); - return _ret.address == 0 - ? null - : NSBundle._(_ret, _lib, retain: true, release: true); + set format(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setFormat_, value.pointer); } - static NSBundle? bundleWithURL_(SwiftLibrary _lib, NSURL url) { - final _ret = _lib._objc_msgSend_277( - _lib._class_NSBundle1, _lib._sel_bundleWithURL_1, url._id); - return _ret.address == 0 - ? null - : NSBundle._(_ret, _lib, retain: true, release: true); + NSAttributedString get attributedStringForZero { + final _ret = _objc_msgSend_63(this.pointer, _sel_attributedStringForZero); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSBundle? initWithURL_(NSURL url) { - final _ret = _lib._objc_msgSend_277(_id, _lib._sel_initWithURL_1, url._id); - return _ret.address == 0 - ? null - : NSBundle._(_ret, _lib, retain: true, release: true); + set attributedStringForZero(NSAttributedString value) { + return _objc_msgSend_182( + this.pointer, _sel_setAttributedStringForZero_, value.pointer); } - static NSBundle bundleForClass_(SwiftLibrary _lib, NSObject aClass) { - final _ret = _lib._objc_msgSend_696( - _lib._class_NSBundle1, _lib._sel_bundleForClass_1, aClass._id); - return NSBundle._(_ret, _lib, retain: true, release: true); + NSAttributedString get attributedStringForNil { + final _ret = _objc_msgSend_63(this.pointer, _sel_attributedStringForNil); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSBundle? bundleWithIdentifier_( - SwiftLibrary _lib, NSString identifier) { - final _ret = _lib._objc_msgSend_697(_lib._class_NSBundle1, - _lib._sel_bundleWithIdentifier_1, identifier._id); - return _ret.address == 0 - ? null - : NSBundle._(_ret, _lib, retain: true, release: true); + set attributedStringForNil(NSAttributedString value) { + return _objc_msgSend_182( + this.pointer, _sel_setAttributedStringForNil_, value.pointer); } - static NSArray getAllBundles(SwiftLibrary _lib) { + NSAttributedString get attributedStringForNotANumber { final _ret = - _lib._objc_msgSend_85(_lib._class_NSBundle1, _lib._sel_allBundles1); - return NSArray._(_ret, _lib, retain: true, release: true); + _objc_msgSend_63(this.pointer, _sel_attributedStringForNotANumber); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); + } + + set attributedStringForNotANumber(NSAttributedString value) { + return _objc_msgSend_182( + this.pointer, _sel_setAttributedStringForNotANumber_, value.pointer); + } + + NSDecimalNumberHandler get roundingBehavior { + final _ret = _objc_msgSend_183(this.pointer, _sel_roundingBehavior); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); + } + + set roundingBehavior(NSDecimalNumberHandler value) { + return _objc_msgSend_185( + this.pointer, _sel_setRoundingBehavior_, value.pointer); + } + + @override + NSNumberFormatter init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSNumberFormatter.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumberFormatter new1() { + final _ret = _objc_msgSend_40(_class_NSNumberFormatter, _sel_new); + return NSNumberFormatter.castFromPointer(_ret, + retain: false, release: true); } - static NSArray getAllFrameworks(SwiftLibrary _lib) { + static NSNumberFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _lib._objc_msgSend_85(_lib._class_NSBundle1, _lib._sel_allFrameworks1); - return NSArray._(_ret, _lib, retain: true, release: true); + _objc_msgSend_47(_class_NSNumberFormatter, _sel_allocWithZone_, zone); + return NSNumberFormatter.castFromPointer(_ret, + retain: false, release: true); } - bool load() { - return _lib._objc_msgSend_12(_id, _lib._sel_load1); + static NSNumberFormatter alloc() { + final _ret = _objc_msgSend_40(_class_NSNumberFormatter, _sel_alloc); + return NSNumberFormatter.castFromPointer(_ret, + retain: false, release: true); } - bool get loaded { - return _lib._objc_msgSend_12(_id, _lib._sel_isLoaded1); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSNumberFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSNumberFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSNumberFormatter, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSNumberFormatter, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSNumberFormatter, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSNumberFormatter, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - bool unload() { - return _lib._objc_msgSend_12(_id, _lib._sel_unload1); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSNumberFormatter, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSNumberFormatter, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSNumberFormatter, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSNumberFormatter = objc.getClass("NSNumberFormatter"); +late final _sel_stringFromNumber_ = objc.registerName("stringFromNumber:"); +final _objc_msgSend_165 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_numberFromString_ = objc.registerName("numberFromString:"); +final _objc_msgSend_166 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSNumberFormatterStyle { + static const int NSNumberFormatterNoStyle = 0; + static const int NSNumberFormatterDecimalStyle = 1; + static const int NSNumberFormatterCurrencyStyle = 2; + static const int NSNumberFormatterPercentStyle = 3; + static const int NSNumberFormatterScientificStyle = 4; + static const int NSNumberFormatterSpellOutStyle = 5; + static const int NSNumberFormatterOrdinalStyle = 6; + static const int NSNumberFormatterCurrencyISOCodeStyle = 8; + static const int NSNumberFormatterCurrencyPluralStyle = 9; + static const int NSNumberFormatterCurrencyAccountingStyle = 10; +} + +late final _sel_localizedStringFromNumber_numberStyle_ = + objc.registerName("localizedStringFromNumber:numberStyle:"); +final _objc_msgSend_167 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); + +abstract class NSNumberFormatterBehavior { + static const int NSNumberFormatterBehaviorDefault = 0; + static const int NSNumberFormatterBehavior10_0 = 1000; + static const int NSNumberFormatterBehavior10_4 = 1040; +} + +final _objc_msgSend_168 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_169 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_numberStyle = objc.registerName("numberStyle"); +final _objc_msgSend_170 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setNumberStyle_ = objc.registerName("setNumberStyle:"); +final _objc_msgSend_171 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_generatesDecimalNumbers = + objc.registerName("generatesDecimalNumbers"); +late final _sel_setGeneratesDecimalNumbers_ = + objc.registerName("setGeneratesDecimalNumbers:"); +final _objc_msgSend_172 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_negativeFormat = objc.registerName("negativeFormat"); +late final _sel_setNegativeFormat_ = objc.registerName("setNegativeFormat:"); +late final _sel_textAttributesForNegativeValues = + objc.registerName("textAttributesForNegativeValues"); +late final _sel_setTextAttributesForNegativeValues_ = + objc.registerName("setTextAttributesForNegativeValues:"); +final _objc_msgSend_173 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_positiveFormat = objc.registerName("positiveFormat"); +late final _sel_setPositiveFormat_ = objc.registerName("setPositiveFormat:"); +late final _sel_textAttributesForPositiveValues = + objc.registerName("textAttributesForPositiveValues"); +late final _sel_setTextAttributesForPositiveValues_ = + objc.registerName("setTextAttributesForPositiveValues:"); +late final _sel_allowsFloats = objc.registerName("allowsFloats"); +late final _sel_setAllowsFloats_ = objc.registerName("setAllowsFloats:"); +late final _sel_decimalSeparator = objc.registerName("decimalSeparator"); +late final _sel_setDecimalSeparator_ = + objc.registerName("setDecimalSeparator:"); +late final _sel_alwaysShowsDecimalSeparator = + objc.registerName("alwaysShowsDecimalSeparator"); +late final _sel_setAlwaysShowsDecimalSeparator_ = + objc.registerName("setAlwaysShowsDecimalSeparator:"); +late final _sel_currencyDecimalSeparator = + objc.registerName("currencyDecimalSeparator"); +late final _sel_setCurrencyDecimalSeparator_ = + objc.registerName("setCurrencyDecimalSeparator:"); +late final _sel_usesGroupingSeparator = + objc.registerName("usesGroupingSeparator"); +late final _sel_setUsesGroupingSeparator_ = + objc.registerName("setUsesGroupingSeparator:"); +late final _sel_groupingSeparator = objc.registerName("groupingSeparator"); +late final _sel_setGroupingSeparator_ = + objc.registerName("setGroupingSeparator:"); +late final _sel_zeroSymbol = objc.registerName("zeroSymbol"); +late final _sel_setZeroSymbol_ = objc.registerName("setZeroSymbol:"); +late final _sel_textAttributesForZero = + objc.registerName("textAttributesForZero"); +late final _sel_setTextAttributesForZero_ = + objc.registerName("setTextAttributesForZero:"); +late final _sel_nilSymbol = objc.registerName("nilSymbol"); +late final _sel_setNilSymbol_ = objc.registerName("setNilSymbol:"); +late final _sel_textAttributesForNil = + objc.registerName("textAttributesForNil"); +late final _sel_setTextAttributesForNil_ = + objc.registerName("setTextAttributesForNil:"); +late final _sel_notANumberSymbol = objc.registerName("notANumberSymbol"); +late final _sel_setNotANumberSymbol_ = + objc.registerName("setNotANumberSymbol:"); +late final _sel_textAttributesForNotANumber = + objc.registerName("textAttributesForNotANumber"); +late final _sel_setTextAttributesForNotANumber_ = + objc.registerName("setTextAttributesForNotANumber:"); +late final _sel_positiveInfinitySymbol = + objc.registerName("positiveInfinitySymbol"); +late final _sel_setPositiveInfinitySymbol_ = + objc.registerName("setPositiveInfinitySymbol:"); +late final _sel_textAttributesForPositiveInfinity = + objc.registerName("textAttributesForPositiveInfinity"); +late final _sel_setTextAttributesForPositiveInfinity_ = + objc.registerName("setTextAttributesForPositiveInfinity:"); +late final _sel_negativeInfinitySymbol = + objc.registerName("negativeInfinitySymbol"); +late final _sel_setNegativeInfinitySymbol_ = + objc.registerName("setNegativeInfinitySymbol:"); +late final _sel_textAttributesForNegativeInfinity = + objc.registerName("textAttributesForNegativeInfinity"); +late final _sel_setTextAttributesForNegativeInfinity_ = + objc.registerName("setTextAttributesForNegativeInfinity:"); +late final _sel_positivePrefix = objc.registerName("positivePrefix"); +late final _sel_setPositivePrefix_ = objc.registerName("setPositivePrefix:"); +late final _sel_positiveSuffix = objc.registerName("positiveSuffix"); +late final _sel_setPositiveSuffix_ = objc.registerName("setPositiveSuffix:"); +late final _sel_negativePrefix = objc.registerName("negativePrefix"); +late final _sel_setNegativePrefix_ = objc.registerName("setNegativePrefix:"); +late final _sel_negativeSuffix = objc.registerName("negativeSuffix"); +late final _sel_setNegativeSuffix_ = objc.registerName("setNegativeSuffix:"); +late final _sel_currencyCode = objc.registerName("currencyCode"); +late final _sel_setCurrencyCode_ = objc.registerName("setCurrencyCode:"); +late final _sel_currencySymbol = objc.registerName("currencySymbol"); +late final _sel_setCurrencySymbol_ = objc.registerName("setCurrencySymbol:"); +late final _sel_internationalCurrencySymbol = + objc.registerName("internationalCurrencySymbol"); +late final _sel_setInternationalCurrencySymbol_ = + objc.registerName("setInternationalCurrencySymbol:"); +late final _sel_percentSymbol = objc.registerName("percentSymbol"); +late final _sel_setPercentSymbol_ = objc.registerName("setPercentSymbol:"); +late final _sel_perMillSymbol = objc.registerName("perMillSymbol"); +late final _sel_setPerMillSymbol_ = objc.registerName("setPerMillSymbol:"); +late final _sel_minusSign = objc.registerName("minusSign"); +late final _sel_setMinusSign_ = objc.registerName("setMinusSign:"); +late final _sel_plusSign = objc.registerName("plusSign"); +late final _sel_setPlusSign_ = objc.registerName("setPlusSign:"); +late final _sel_exponentSymbol = objc.registerName("exponentSymbol"); +late final _sel_setExponentSymbol_ = objc.registerName("setExponentSymbol:"); +late final _sel_groupingSize = objc.registerName("groupingSize"); +late final _sel_setGroupingSize_ = objc.registerName("setGroupingSize:"); +late final _sel_secondaryGroupingSize = + objc.registerName("secondaryGroupingSize"); +late final _sel_setSecondaryGroupingSize_ = + objc.registerName("setSecondaryGroupingSize:"); +late final _sel_multiplier = objc.registerName("multiplier"); +final _objc_msgSend_174 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setMultiplier_ = objc.registerName("setMultiplier:"); +final _objc_msgSend_175 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_formatWidth = objc.registerName("formatWidth"); +late final _sel_setFormatWidth_ = objc.registerName("setFormatWidth:"); +late final _sel_paddingCharacter = objc.registerName("paddingCharacter"); +late final _sel_setPaddingCharacter_ = + objc.registerName("setPaddingCharacter:"); + +abstract class NSNumberFormatterPadPosition { + static const int NSNumberFormatterPadBeforePrefix = 0; + static const int NSNumberFormatterPadAfterPrefix = 1; + static const int NSNumberFormatterPadBeforeSuffix = 2; + static const int NSNumberFormatterPadAfterSuffix = 3; +} - bool preflightAndReturnError_(ffi.Pointer> error) { - return _lib._objc_msgSend_255( - _id, _lib._sel_preflightAndReturnError_1, error); - } +late final _sel_paddingPosition = objc.registerName("paddingPosition"); +final _objc_msgSend_176 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setPaddingPosition_ = objc.registerName("setPaddingPosition:"); +final _objc_msgSend_177 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); - bool loadAndReturnError_(ffi.Pointer> error) { - return _lib._objc_msgSend_255(_id, _lib._sel_loadAndReturnError_1, error); - } +abstract class NSNumberFormatterRoundingMode { + static const int NSNumberFormatterRoundCeiling = 0; + static const int NSNumberFormatterRoundFloor = 1; + static const int NSNumberFormatterRoundDown = 2; + static const int NSNumberFormatterRoundUp = 3; + static const int NSNumberFormatterRoundHalfEven = 4; + static const int NSNumberFormatterRoundHalfDown = 5; + static const int NSNumberFormatterRoundHalfUp = 6; +} - NSURL get bundleURL { - final _ret = _lib._objc_msgSend_466(_id, _lib._sel_bundleURL1); - return NSURL._(_ret, _lib, retain: true, release: true); - } +late final _sel_roundingMode = objc.registerName("roundingMode"); +final _objc_msgSend_178 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setRoundingMode_ = objc.registerName("setRoundingMode:"); +final _objc_msgSend_179 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_roundingIncrement = objc.registerName("roundingIncrement"); +final _objc_msgSend_180 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setRoundingIncrement_ = + objc.registerName("setRoundingIncrement:"); +final _objc_msgSend_181 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_minimumIntegerDigits = + objc.registerName("minimumIntegerDigits"); +late final _sel_setMinimumIntegerDigits_ = + objc.registerName("setMinimumIntegerDigits:"); +late final _sel_maximumIntegerDigits = + objc.registerName("maximumIntegerDigits"); +late final _sel_setMaximumIntegerDigits_ = + objc.registerName("setMaximumIntegerDigits:"); +late final _sel_minimumFractionDigits = + objc.registerName("minimumFractionDigits"); +late final _sel_setMinimumFractionDigits_ = + objc.registerName("setMinimumFractionDigits:"); +late final _sel_maximumFractionDigits = + objc.registerName("maximumFractionDigits"); +late final _sel_setMaximumFractionDigits_ = + objc.registerName("setMaximumFractionDigits:"); +late final _sel_minimum = objc.registerName("minimum"); +late final _sel_setMinimum_ = objc.registerName("setMinimum:"); +late final _sel_maximum = objc.registerName("maximum"); +late final _sel_setMaximum_ = objc.registerName("setMaximum:"); +late final _sel_currencyGroupingSeparator = + objc.registerName("currencyGroupingSeparator"); +late final _sel_setCurrencyGroupingSeparator_ = + objc.registerName("setCurrencyGroupingSeparator:"); +late final _sel_usesSignificantDigits = + objc.registerName("usesSignificantDigits"); +late final _sel_setUsesSignificantDigits_ = + objc.registerName("setUsesSignificantDigits:"); +late final _sel_minimumSignificantDigits = + objc.registerName("minimumSignificantDigits"); +late final _sel_setMinimumSignificantDigits_ = + objc.registerName("setMinimumSignificantDigits:"); +late final _sel_maximumSignificantDigits = + objc.registerName("maximumSignificantDigits"); +late final _sel_setMaximumSignificantDigits_ = + objc.registerName("setMaximumSignificantDigits:"); +late final _sel_isPartialStringValidationEnabled = + objc.registerName("isPartialStringValidationEnabled"); +late final _sel_setPartialStringValidationEnabled_ = + objc.registerName("setPartialStringValidationEnabled:"); +late final _sel_hasThousandSeparators = + objc.registerName("hasThousandSeparators"); +late final _sel_setHasThousandSeparators_ = + objc.registerName("setHasThousandSeparators:"); +late final _sel_thousandSeparator = objc.registerName("thousandSeparator"); +late final _sel_setThousandSeparator_ = + objc.registerName("setThousandSeparator:"); +late final _sel_localizesFormat = objc.registerName("localizesFormat"); +late final _sel_setLocalizesFormat_ = objc.registerName("setLocalizesFormat:"); +late final _sel_format = objc.registerName("format"); +late final _sel_setFormat_ = objc.registerName("setFormat:"); +late final _sel_attributedStringForZero = + objc.registerName("attributedStringForZero"); +late final _sel_setAttributedStringForZero_ = + objc.registerName("setAttributedStringForZero:"); +final _objc_msgSend_182 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_attributedStringForNil = + objc.registerName("attributedStringForNil"); +late final _sel_setAttributedStringForNil_ = + objc.registerName("setAttributedStringForNil:"); +late final _sel_attributedStringForNotANumber = + objc.registerName("attributedStringForNotANumber"); +late final _sel_setAttributedStringForNotANumber_ = + objc.registerName("setAttributedStringForNotANumber:"); + +class NSDecimalNumberHandler extends objc.NSObject { + NSDecimalNumberHandler._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSURL? get resourceURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_resourceURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSDecimalNumberHandler] that points to the same underlying object as [other]. + NSDecimalNumberHandler.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSURL? get executableURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_executableURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSDecimalNumberHandler] that wraps the given raw object pointer. + NSDecimalNumberHandler.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - NSURL? URLForAuxiliaryExecutable_(NSString executableName) { - final _ret = _lib._objc_msgSend_257( - _id, _lib._sel_URLForAuxiliaryExecutable_1, executableName._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSDecimalNumberHandler]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSDecimalNumberHandler); } - NSURL? get privateFrameworksURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_privateFrameworksURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static NSDecimalNumberHandler getDefaultDecimalNumberHandler() { + final _ret = _objc_msgSend_183( + _class_NSDecimalNumberHandler, _sel_defaultDecimalNumberHandler); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); } - NSURL? get sharedFrameworksURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_sharedFrameworksURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + NSDecimalNumberHandler + initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( + int roundingMode, + int scale, + bool exact, + bool overflow, + bool underflow, + bool divideByZero) { + final _ret = _objc_msgSend_184( + this.pointer, + _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_, + roundingMode, + scale, + exact, + overflow, + underflow, + divideByZero); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); } - NSURL? get sharedSupportURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_sharedSupportURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static NSDecimalNumberHandler + decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( + int roundingMode, + int scale, + bool exact, + bool overflow, + bool underflow, + bool divideByZero) { + final _ret = _objc_msgSend_184( + _class_NSDecimalNumberHandler, + _sel_decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_, + roundingMode, + scale, + exact, + overflow, + underflow, + divideByZero); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); } - NSURL? get builtInPlugInsURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_builtInPlugInsURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + @override + NSDecimalNumberHandler init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); } - NSURL? get appStoreReceiptURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_appStoreReceiptURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static NSDecimalNumberHandler new1() { + final _ret = _objc_msgSend_40(_class_NSDecimalNumberHandler, _sel_new); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: false, release: true); } - NSString get bundlePath { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_bundlePath1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSDecimalNumberHandler allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSDecimalNumberHandler, _sel_allocWithZone_, zone); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: false, release: true); } - NSString? get resourcePath { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_resourcePath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static NSDecimalNumberHandler alloc() { + final _ret = _objc_msgSend_40(_class_NSDecimalNumberHandler, _sel_alloc); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: false, release: true); } - NSString? get executablePath { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_executablePath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSDecimalNumberHandler, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSString? pathForAuxiliaryExecutable_(NSString executableName) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_pathForAuxiliaryExecutable_1, executableName._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSDecimalNumberHandler, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSString? get privateFrameworksPath { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_privateFrameworksPath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSDecimalNumberHandler, _sel_accessInstanceVariablesDirectly); } - NSString? get sharedFrameworksPath { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_sharedFrameworksPath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSDecimalNumberHandler, _sel_useStoredAccessor); } - NSString? get sharedSupportPath { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_sharedSupportPath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSDecimalNumberHandler, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSString? get builtInPlugInsPath { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_builtInPlugInsPath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSURL? URLForResource_withExtension_subdirectory_inBundleWithURL_( - SwiftLibrary _lib, - NSString? name, - NSString? ext, - NSString? subpath, - NSURL bundleURL) { - final _ret = _lib._objc_msgSend_698( - _lib._class_NSBundle1, - _lib._sel_URLForResource_withExtension_subdirectory_inBundleWithURL_1, - name?._id ?? ffi.nullptr, - ext?._id ?? ffi.nullptr, - subpath?._id ?? ffi.nullptr, - bundleURL._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSDecimalNumberHandler, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static NSArray? URLsForResourcesWithExtension_subdirectory_inBundleWithURL_( - SwiftLibrary _lib, NSString? ext, NSString? subpath, NSURL bundleURL) { - final _ret = _lib._objc_msgSend_699( - _lib._class_NSBundle1, - _lib._sel_URLsForResourcesWithExtension_subdirectory_inBundleWithURL_1, - ext?._id ?? ffi.nullptr, - subpath?._id ?? ffi.nullptr, - bundleURL._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSDecimalNumberHandler, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - NSURL? URLForResource_withExtension_(NSString? name, NSString? ext) { - final _ret = _lib._objc_msgSend_700( - _id, - _lib._sel_URLForResource_withExtension_1, - name?._id ?? ffi.nullptr, - ext?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSDecimalNumberHandler, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSURL? URLForResource_withExtension_subdirectory_( - NSString? name, NSString? ext, NSString? subpath) { - final _ret = _lib._objc_msgSend_701( - _id, - _lib._sel_URLForResource_withExtension_subdirectory_1, - name?._id ?? ffi.nullptr, - ext?._id ?? ffi.nullptr, - subpath?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? URLForResource_withExtension_subdirectory_localization_(NSString? name, - NSString? ext, NSString? subpath, NSString? localizationName) { - final _ret = _lib._objc_msgSend_702( - _id, - _lib._sel_URLForResource_withExtension_subdirectory_localization_1, - name?._id ?? ffi.nullptr, - ext?._id ?? ffi.nullptr, - subpath?._id ?? ffi.nullptr, - localizationName?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSDecimalNumberHandler, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - NSArray? URLsForResourcesWithExtension_subdirectory_( - NSString? ext, NSString? subpath) { - final _ret = _lib._objc_msgSend_703( - _id, - _lib._sel_URLsForResourcesWithExtension_subdirectory_1, - ext?._id ?? ffi.nullptr, - subpath?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +late final _class_NSDecimalNumberHandler = + objc.getClass("NSDecimalNumberHandler"); +late final _sel_defaultDecimalNumberHandler = + objc.registerName("defaultDecimalNumberHandler"); +final _objc_msgSend_183 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - NSArray? URLsForResourcesWithExtension_subdirectory_localization_( - NSString? ext, NSString? subpath, NSString? localizationName) { - final _ret = _lib._objc_msgSend_704( - _id, - _lib._sel_URLsForResourcesWithExtension_subdirectory_localization_1, - ext?._id ?? ffi.nullptr, - subpath?._id ?? ffi.nullptr, - localizationName?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +abstract class NSRoundingMode { + static const int NSRoundPlain = 0; + static const int NSRoundDown = 1; + static const int NSRoundUp = 2; + static const int NSRoundBankers = 3; +} - static NSString? pathForResource_ofType_inDirectory_( - SwiftLibrary _lib, NSString? name, NSString? ext, NSString bundlePath) { - final _ret = _lib._objc_msgSend_705( - _lib._class_NSBundle1, - _lib._sel_pathForResource_ofType_inDirectory_1, - name?._id ?? ffi.nullptr, - ext?._id ?? ffi.nullptr, - bundlePath._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +late final _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_ = + objc.registerName( + "initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:"); +final _objc_msgSend_184 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Short, + ffi.Bool, + ffi.Bool, + ffi.Bool, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + bool, + bool, + bool, + bool)>(); +late final _sel_decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_ = + objc.registerName( + "decimalNumberHandlerWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:"); +late final _sel_roundingBehavior = objc.registerName("roundingBehavior"); +late final _sel_setRoundingBehavior_ = + objc.registerName("setRoundingBehavior:"); +final _objc_msgSend_185 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - static NSArray pathsForResourcesOfType_inDirectory_( - SwiftLibrary _lib, NSString? ext, NSString bundlePath) { - final _ret = _lib._objc_msgSend_706( - _lib._class_NSBundle1, - _lib._sel_pathsForResourcesOfType_inDirectory_1, - ext?._id ?? ffi.nullptr, - bundlePath._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } +abstract class NSLocaleLanguageDirection { + static const int NSLocaleLanguageDirectionUnknown = 0; + static const int NSLocaleLanguageDirectionLeftToRight = 1; + static const int NSLocaleLanguageDirectionRightToLeft = 2; + static const int NSLocaleLanguageDirectionTopToBottom = 3; + static const int NSLocaleLanguageDirectionBottomToTop = 4; +} - NSString? pathForResource_ofType_(NSString? name, NSString? ext) { - final _ret = _lib._objc_msgSend_707(_id, _lib._sel_pathForResource_ofType_1, - name?._id ?? ffi.nullptr, ext?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? pathForResource_ofType_inDirectory_forLocalization_(NSString? name, - NSString? ext, NSString? subpath, NSString? localizationName) { - final _ret = _lib._objc_msgSend_708( - _id, - _lib._sel_pathForResource_ofType_inDirectory_forLocalization_1, - name?._id ?? ffi.nullptr, - ext?._id ?? ffi.nullptr, - subpath?._id ?? ffi.nullptr, - localizationName?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +class NSScanner extends objc.NSObject { + NSScanner._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSArray pathsForResourcesOfType_inDirectory_forLocalization_( - NSString? ext, NSString? subpath, NSString? localizationName) { - final _ret = _lib._objc_msgSend_709( - _id, - _lib._sel_pathsForResourcesOfType_inDirectory_forLocalization_1, - ext?._id ?? ffi.nullptr, - subpath?._id ?? ffi.nullptr, - localizationName?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSScanner] that points to the same underlying object as [other]. + NSScanner.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSString localizedStringForKey_value_table_( - NSString key, NSString? value, NSString? tableName) { - final _ret = _lib._objc_msgSend_710( - _id, - _lib._sel_localizedStringForKey_value_table_1, - key._id, - value?._id ?? ffi.nullptr, - tableName?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSScanner] that wraps the given raw object pointer. + NSScanner.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - NSAttributedString localizedAttributedStringForKey_value_table_( - NSString key, NSString? value, NSString? tableName) { - final _ret = _lib._objc_msgSend_736( - _id, - _lib._sel_localizedAttributedStringForKey_value_table_1, - key._id, - value?._id ?? ffi.nullptr, - tableName?._id ?? ffi.nullptr); - return NSAttributedString._(_ret, _lib, retain: true, release: true); - } - - NSString? get bundleIdentifier { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_bundleIdentifier1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSScanner]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSScanner); } - NSDictionary? get infoDictionary { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_infoDictionary1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + objc.NSString get string { + final _ret = _objc_msgSend_12(this.pointer, _sel_string); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get localizedInfoDictionary { - final _ret = - _lib._objc_msgSend_390(_id, _lib._sel_localizedInfoDictionary1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + int get scanLocation { + return _objc_msgSend_29(this.pointer, _sel_scanLocation); } - NSObject? objectForInfoDictionaryKey_(NSString key) { - final _ret = _lib._objc_msgSend_38( - _id, _lib._sel_objectForInfoDictionaryKey_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + set scanLocation(int value) { + return _objc_msgSend_125(this.pointer, _sel_setScanLocation_, value); } - NSObject? classNamed_(NSString className) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_classNamed_1, className._id); + objc.NSCharacterSet? get charactersToBeSkipped { + final _ret = _objc_msgSend_186(this.pointer, _sel_charactersToBeSkipped); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSCharacterSet.castFromPointer(_ret, + retain: true, release: true); } - NSObject? get principalClass { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_principalClass1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + set charactersToBeSkipped(objc.NSCharacterSet? value) { + return _objc_msgSend_187(this.pointer, _sel_setCharactersToBeSkipped_, + value?.pointer ?? ffi.nullptr); } - NSArray get preferredLocalizations { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_preferredLocalizations1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool get caseSensitive { + return _objc_msgSend_7(this.pointer, _sel_caseSensitive); } - NSArray get localizations { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_localizations1); - return NSArray._(_ret, _lib, retain: true, release: true); + set caseSensitive(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setCaseSensitive_, value); } - NSString? get developmentLocalization { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_developmentLocalization1); + objc.NSObject? get locale { + final _ret = _objc_msgSend_66(this.pointer, _sel_locale); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSArray preferredLocalizationsFromArray_( - SwiftLibrary _lib, NSArray localizationsArray) { - final _ret = _lib._objc_msgSend_68(_lib._class_NSBundle1, - _lib._sel_preferredLocalizationsFromArray_1, localizationsArray._id); - return NSArray._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSArray preferredLocalizationsFromArray_forPreferences_( - SwiftLibrary _lib, - NSArray localizationsArray, - NSArray? preferencesArray) { - final _ret = _lib._objc_msgSend_737( - _lib._class_NSBundle1, - _lib._sel_preferredLocalizationsFromArray_forPreferences_1, - localizationsArray._id, - preferencesArray?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + set locale(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setLocale_, value?.pointer ?? ffi.nullptr); } - NSArray? get executableArchitectures { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_executableArchitectures1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + NSScanner initWithString_(objc.NSString string) { + final _ret = + _objc_msgSend_35(this.pointer, _sel_initWithString_, string.pointer); + return NSScanner.castFromPointer(_ret, retain: true, release: true); } - void setPreservationPriority_forTags_(double priority, NSSet tags) { - _lib._objc_msgSend_738( - _id, _lib._sel_setPreservationPriority_forTags_1, priority, tags._id); + bool scanInt_(ffi.Pointer result) { + return _objc_msgSend_189(this.pointer, _sel_scanInt_, result); } - double preservationPriorityForTag_(NSString tag) { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_308_fpret( - _id, _lib._sel_preservationPriorityForTag_1, tag._id) - : _lib._objc_msgSend_308( - _id, _lib._sel_preservationPriorityForTag_1, tag._id); + bool scanInteger_(ffi.Pointer result) { + return _objc_msgSend_190(this.pointer, _sel_scanInteger_, result); } - @override - NSBundle init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSBundle._(_ret, _lib, retain: true, release: true); + bool scanLongLong_(ffi.Pointer result) { + return _objc_msgSend_191(this.pointer, _sel_scanLongLong_, result); } - static NSBundle new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSBundle1, _lib._sel_new1); - return NSBundle._(_ret, _lib, retain: false, release: true); + bool scanUnsignedLongLong_(ffi.Pointer result) { + return _objc_msgSend_192(this.pointer, _sel_scanUnsignedLongLong_, result); } - static NSBundle allocWithZone_(SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSBundle1, _lib._sel_allocWithZone_1, zone); - return NSBundle._(_ret, _lib, retain: false, release: true); + bool scanFloat_(ffi.Pointer result) { + return _objc_msgSend_193(this.pointer, _sel_scanFloat_, result); } - static NSBundle alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSBundle1, _lib._sel_alloc1); - return NSBundle._(_ret, _lib, retain: false, release: true); + bool scanDouble_(ffi.Pointer result) { + return _objc_msgSend_194(this.pointer, _sel_scanDouble_, result); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSBundle1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + bool scanHexInt_(ffi.Pointer result) { + return _objc_msgSend_195(this.pointer, _sel_scanHexInt_, result); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSBundle1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + bool scanHexLongLong_(ffi.Pointer result) { + return _objc_msgSend_192(this.pointer, _sel_scanHexLongLong_, result); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSBundle1, _lib._sel_accessInstanceVariablesDirectly1); + bool scanHexFloat_(ffi.Pointer result) { + return _objc_msgSend_193(this.pointer, _sel_scanHexFloat_, result); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSBundle1, _lib._sel_useStoredAccessor1); + bool scanHexDouble_(ffi.Pointer result) { + return _objc_msgSend_194(this.pointer, _sel_scanHexDouble_, result); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSBundle1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + bool scanString_intoString_( + objc.NSString string, ffi.Pointer> result) { + return _objc_msgSend_196( + this.pointer, _sel_scanString_intoString_, string.pointer, result); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSBundle1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + bool scanCharactersFromSet_intoString_(objc.NSCharacterSet set, + ffi.Pointer> result) { + return _objc_msgSend_197(this.pointer, + _sel_scanCharactersFromSet_intoString_, set.pointer, result); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSBundle1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + bool scanUpToString_intoString_( + objc.NSString string, ffi.Pointer> result) { + return _objc_msgSend_196( + this.pointer, _sel_scanUpToString_intoString_, string.pointer, result); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSBundle1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool scanUpToCharactersFromSet_intoString_(objc.NSCharacterSet set, + ffi.Pointer> result) { + return _objc_msgSend_197(this.pointer, + _sel_scanUpToCharactersFromSet_intoString_, set.pointer, result); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSBundle1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + bool get atEnd { + return _objc_msgSend_7(this.pointer, _sel_isAtEnd); } -} - -class NSAttributedString extends NSObject { - NSAttributedString._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSAttributedString] that points to the same underlying object as [other]. - static NSAttributedString castFrom(T other) { - return NSAttributedString._(other._id, other._lib, - retain: true, release: true); + static NSScanner scannerWithString_(objc.NSString string) { + final _ret = _objc_msgSend_35( + _class_NSScanner, _sel_scannerWithString_, string.pointer); + return NSScanner.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSAttributedString] that wraps the given raw object pointer. - static NSAttributedString castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSAttributedString._(other, lib, retain: retain, release: release); + static objc.NSObject localizedScannerWithString_(objc.NSString string) { + final _ret = _objc_msgSend_35( + _class_NSScanner, _sel_localizedScannerWithString_, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSAttributedString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSAttributedString1); + bool scanDecimal_(ffi.Pointer dcm) { + return _objc_msgSend_198(this.pointer, _sel_scanDecimal_, dcm); } - NSString get string { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_string1); - return NSString._(_ret, _lib, retain: true, release: true); + @override + NSScanner init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSScanner.castFromPointer(_ret, retain: true, release: true); } - NSDictionary attributesAtIndex_effectiveRange_( - int location, ffi.Pointer<_NSRange> range) { - final _ret = _lib._objc_msgSend_711( - _id, _lib._sel_attributesAtIndex_effectiveRange_1, location, range); - return NSDictionary._(_ret, _lib, retain: true, release: true); + static NSScanner new1() { + final _ret = _objc_msgSend_40(_class_NSScanner, _sel_new); + return NSScanner.castFromPointer(_ret, retain: false, release: true); } - int get length { - return _lib._objc_msgSend_10(_id, _lib._sel_length1); + static NSScanner allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSScanner, _sel_allocWithZone_, zone); + return NSScanner.castFromPointer(_ret, retain: false, release: true); } - NSObject? attribute_atIndex_effectiveRange_( - NSString attrName, int location, ffi.Pointer<_NSRange> range) { - final _ret = _lib._objc_msgSend_712( - _id, - _lib._sel_attribute_atIndex_effectiveRange_1, - attrName._id, - location, - range); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + static NSScanner alloc() { + final _ret = _objc_msgSend_40(_class_NSScanner, _sel_alloc); + return NSScanner.castFromPointer(_ret, retain: false, release: true); } - NSAttributedString attributedSubstringFromRange_(_NSRange range) { - final _ret = _lib._objc_msgSend_713( - _id, _lib._sel_attributedSubstringFromRange_1, range); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSScanner, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSDictionary attributesAtIndex_longestEffectiveRange_inRange_( - int location, ffi.Pointer<_NSRange> range, _NSRange rangeLimit) { - final _ret = _lib._objc_msgSend_714( - _id, - _lib._sel_attributesAtIndex_longestEffectiveRange_inRange_1, - location, - range, - rangeLimit); - return NSDictionary._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSScanner, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSObject? attribute_atIndex_longestEffectiveRange_inRange_(NSString attrName, - int location, ffi.Pointer<_NSRange> range, _NSRange rangeLimit) { - final _ret = _lib._objc_msgSend_715( - _id, - _lib._sel_attribute_atIndex_longestEffectiveRange_inRange_1, - attrName._id, - location, - range, - rangeLimit); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSScanner, _sel_accessInstanceVariablesDirectly); } - bool isEqualToAttributedString_(NSAttributedString other) { - return _lib._objc_msgSend_716( - _id, _lib._sel_isEqualToAttributedString_1, other._id); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSScanner, _sel_useStoredAccessor); } - NSAttributedString initWithString_(NSString str) { - final _ret = - _lib._objc_msgSend_31(_id, _lib._sel_initWithString_1, str._id); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSScanner, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSAttributedString initWithString_attributes_( - NSString str, NSDictionary? attrs) { - final _ret = _lib._objc_msgSend_717( - _id, - _lib._sel_initWithString_attributes_1, - str._id, - attrs?._id ?? ffi.nullptr); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSScanner, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSAttributedString initWithAttributedString_(NSAttributedString attrStr) { - final _ret = _lib._objc_msgSend_718( - _id, _lib._sel_initWithAttributedString_1, attrStr._id); - return NSAttributedString._(_ret, _lib, retain: true, release: true); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSScanner, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSScanner, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSScanner, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSScanner = objc.getClass("NSScanner"); +late final _sel_scanLocation = objc.registerName("scanLocation"); +late final _sel_setScanLocation_ = objc.registerName("setScanLocation:"); +late final _sel_charactersToBeSkipped = + objc.registerName("charactersToBeSkipped"); +final _objc_msgSend_186 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCharactersToBeSkipped_ = + objc.registerName("setCharactersToBeSkipped:"); +final _objc_msgSend_187 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_caseSensitive = objc.registerName("caseSensitive"); +late final _sel_setCaseSensitive_ = objc.registerName("setCaseSensitive:"); +final _objc_msgSend_188 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanInt_ = objc.registerName("scanInt:"); +final _objc_msgSend_189 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanInteger_ = objc.registerName("scanInteger:"); +final _objc_msgSend_190 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanLongLong_ = objc.registerName("scanLongLong:"); +final _objc_msgSend_191 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanUnsignedLongLong_ = + objc.registerName("scanUnsignedLongLong:"); +final _objc_msgSend_192 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_scanFloat_ = objc.registerName("scanFloat:"); +final _objc_msgSend_193 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanDouble_ = objc.registerName("scanDouble:"); +final _objc_msgSend_194 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanHexInt_ = objc.registerName("scanHexInt:"); +final _objc_msgSend_195 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanHexLongLong_ = objc.registerName("scanHexLongLong:"); +late final _sel_scanHexFloat_ = objc.registerName("scanHexFloat:"); +late final _sel_scanHexDouble_ = objc.registerName("scanHexDouble:"); +late final _sel_scanString_intoString_ = + objc.registerName("scanString:intoString:"); +final _objc_msgSend_196 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_scanCharactersFromSet_intoString_ = + objc.registerName("scanCharactersFromSet:intoString:"); +final _objc_msgSend_197 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_scanUpToString_intoString_ = + objc.registerName("scanUpToString:intoString:"); +late final _sel_scanUpToCharactersFromSet_intoString_ = + objc.registerName("scanUpToCharactersFromSet:intoString:"); +late final _sel_isAtEnd = objc.registerName("isAtEnd"); +late final _sel_scannerWithString_ = objc.registerName("scannerWithString:"); +late final _sel_localizedScannerWithString_ = + objc.registerName("localizedScannerWithString:"); - void enumerateAttributesInRange_options_usingBlock_(_NSRange enumerationRange, - int opts, ObjCBlock_ffiVoid_NSDictionary_NSRange_bool block) { - _lib._objc_msgSend_719( - _id, - _lib._sel_enumerateAttributesInRange_options_usingBlock_1, - enumerationRange, - opts, - block._id); - } +final class NSDecimal extends ffi.Opaque {} - void enumerateAttribute_inRange_options_usingBlock_( - NSString attrName, - _NSRange enumerationRange, - int opts, - ObjCBlock_ffiVoid_ObjCObject_NSRange_bool block) { - _lib._objc_msgSend_720( - _id, - _lib._sel_enumerateAttribute_inRange_options_usingBlock_1, - attrName._id, - enumerationRange, - opts, - block._id); - } +late final _sel_scanDecimal_ = objc.registerName("scanDecimal:"); +final _objc_msgSend_198 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class NSException extends objc.NSObject { + NSException._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSAttributedString? - initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( - NSURL markdownFile, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_725( - _id, - _lib._sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_1, - markdownFile._id, - options?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSAttributedString._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSException] that points to the same underlying object as [other]. + NSException.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSAttributedString? initWithMarkdown_options_baseURL_error_( - NSData markdown, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_726( - _id, - _lib._sel_initWithMarkdown_options_baseURL_error_1, - markdown._id, - options?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSAttributedString._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSException] that wraps the given raw object pointer. + NSException.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - NSAttributedString? initWithMarkdownString_options_baseURL_error_( - NSString markdownString, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_727( - _id, - _lib._sel_initWithMarkdownString_options_baseURL_error_1, - markdownString._id, - options?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSAttributedString._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSException]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSException); } - NSAttributedString initWithFormat_options_locale_( - NSAttributedString format, int options, NSLocale? locale) { - final _ret = _lib._objc_msgSend_728( - _id, - _lib._sel_initWithFormat_options_locale_1, - format._id, - options, - locale?._id ?? ffi.nullptr); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + static NSException exceptionWithName_reason_userInfo_( + objc.NSString name, objc.NSString? reason, objc.NSDictionary? userInfo) { + final _ret = _objc_msgSend_199( + _class_NSException, + _sel_exceptionWithName_reason_userInfo_, + name.pointer, + reason?.pointer ?? ffi.nullptr, + userInfo?.pointer ?? ffi.nullptr); + return NSException.castFromPointer(_ret, retain: true, release: true); } - - NSAttributedString initWithFormat_options_locale_arguments_( - NSAttributedString format, - int options, - NSLocale? locale, - ffi.Pointer<__va_list_tag> arguments) { - final _ret = _lib._objc_msgSend_729( - _id, - _lib._sel_initWithFormat_options_locale_arguments_1, - format._id, - options, - locale?._id ?? ffi.nullptr, - arguments); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + + NSException initWithName_reason_userInfo_(objc.NSString aName, + objc.NSString? aReason, objc.NSDictionary? aUserInfo) { + final _ret = _objc_msgSend_200( + this.pointer, + _sel_initWithName_reason_userInfo_, + aName.pointer, + aReason?.pointer ?? ffi.nullptr, + aUserInfo?.pointer ?? ffi.nullptr); + return NSException.castFromPointer(_ret, retain: true, release: true); } - static NSAttributedString localizedAttributedStringWithFormat_( - SwiftLibrary _lib, NSAttributedString format) { - final _ret = _lib._objc_msgSend_718(_lib._class_NSAttributedString1, - _lib._sel_localizedAttributedStringWithFormat_1, format._id); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + objc.NSString get name { + final _ret = _objc_msgSend_12(this.pointer, _sel_name); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSAttributedString localizedAttributedStringWithFormat_options_( - SwiftLibrary _lib, NSAttributedString format, int options) { - final _ret = _lib._objc_msgSend_730( - _lib._class_NSAttributedString1, - _lib._sel_localizedAttributedStringWithFormat_options_1, - format._id, - options); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + objc.NSString? get reason { + final _ret = _objc_msgSend_13(this.pointer, _sel_reason); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSAttributedString initWithFormat_options_locale_context_( - NSAttributedString format, - int options, - NSLocale? locale, - NSDictionary context) { - final _ret = _lib._objc_msgSend_731( - _id, - _lib._sel_initWithFormat_options_locale_context_1, - format._id, - options, - locale?._id ?? ffi.nullptr, - context._id); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + objc.NSDictionary? get userInfo { + final _ret = _objc_msgSend_65(this.pointer, _sel_userInfo); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSAttributedString initWithFormat_options_locale_context_arguments_( - NSAttributedString format, - int options, - NSLocale? locale, - NSDictionary context, - ffi.Pointer<__va_list_tag> arguments) { - final _ret = _lib._objc_msgSend_732( - _id, - _lib._sel_initWithFormat_options_locale_context_arguments_1, - format._id, - options, - locale?._id ?? ffi.nullptr, - context._id, - arguments); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + objc.NSArray get callStackReturnAddresses { + final _ret = _objc_msgSend_6(this.pointer, _sel_callStackReturnAddresses); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSAttributedString localizedAttributedStringWithFormat_context_( - SwiftLibrary _lib, NSAttributedString format, NSDictionary context) { - final _ret = _lib._objc_msgSend_733( - _lib._class_NSAttributedString1, - _lib._sel_localizedAttributedStringWithFormat_context_1, - format._id, - context._id); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + objc.NSArray get callStackSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_callStackSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSAttributedString - localizedAttributedStringWithFormat_options_context_(SwiftLibrary _lib, - NSAttributedString format, int options, NSDictionary context) { - final _ret = _lib._objc_msgSend_734( - _lib._class_NSAttributedString1, - _lib._sel_localizedAttributedStringWithFormat_options_context_1, - format._id, - options, - context._id); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + void raise() { + _objc_msgSend_82(this.pointer, _sel_raise); } - NSAttributedString attributedStringByInflectingString() { - final _ret = _lib._objc_msgSend_735( - _id, _lib._sel_attributedStringByInflectingString1); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + static void raise_format_(objc.NSString name, objc.NSString format) { + _objc_msgSend_201( + _class_NSException, _sel_raise_format_, name.pointer, format.pointer); } - @override - NSAttributedString init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + static void raise_format_arguments_(objc.NSString name, objc.NSString format, + ffi.Pointer<__va_list_tag> argList) { + _objc_msgSend_202(_class_NSException, _sel_raise_format_arguments_, + name.pointer, format.pointer, argList); } - static NSAttributedString new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSAttributedString1, _lib._sel_new1); - return NSAttributedString._(_ret, _lib, retain: false, release: true); + @override + NSException init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSException.castFromPointer(_ret, retain: true, release: true); } - static NSAttributedString allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSAttributedString1, _lib._sel_allocWithZone_1, zone); - return NSAttributedString._(_ret, _lib, retain: false, release: true); + static NSException new1() { + final _ret = _objc_msgSend_40(_class_NSException, _sel_new); + return NSException.castFromPointer(_ret, retain: false, release: true); } - static NSAttributedString alloc(SwiftLibrary _lib) { + static NSException allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSAttributedString1, _lib._sel_alloc1); - return NSAttributedString._(_ret, _lib, retain: false, release: true); + _objc_msgSend_47(_class_NSException, _sel_allocWithZone_, zone); + return NSException.castFromPointer(_ret, retain: false, release: true); + } + + static NSException alloc() { + final _ret = _objc_msgSend_40(_class_NSException, _sel_alloc); + return NSException.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSAttributedString1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSException, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSAttributedString1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSException, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSAttributedString1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSException, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSAttributedString1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSException, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSAttributedString1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSException, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSAttributedString1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSException, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSAttributedString1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSException, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSException, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSException, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSException = objc.getClass("NSException"); +late final _sel_exceptionWithName_reason_userInfo_ = + objc.registerName("exceptionWithName:reason:userInfo:"); +final _objc_msgSend_199 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithName_reason_userInfo_ = + objc.registerName("initWithName:reason:userInfo:"); +final _objc_msgSend_200 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_reason = objc.registerName("reason"); +late final _sel_userInfo = objc.registerName("userInfo"); +late final _sel_callStackReturnAddresses = + objc.registerName("callStackReturnAddresses"); +late final _sel_callStackSymbols = objc.registerName("callStackSymbols"); +late final _sel_raise = objc.registerName("raise"); +late final _sel_raise_format_ = objc.registerName("raise:format:"); +final _objc_msgSend_201 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_raise_format_arguments_ = + objc.registerName("raise:format:arguments:"); +final _objc_msgSend_202 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>(); + +class NSRunLoop extends objc.NSObject { + NSRunLoop._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSRunLoop] that points to the same underlying object as [other]. + NSRunLoop.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSRunLoop] that wraps the given raw object pointer. + NSRunLoop.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSRunLoop]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSRunLoop); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSAttributedString1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSRunLoop getCurrentRunLoop() { + final _ret = _objc_msgSend_203(_class_NSRunLoop, _sel_currentRunLoop); + return NSRunLoop.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSAttributedString1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSRunLoop getMainRunLoop() { + final _ret = _objc_msgSend_203(_class_NSRunLoop, _sel_mainRunLoop); + return NSRunLoop.castFromPointer(_ret, retain: true, release: true); } -} -abstract class NSAttributedStringEnumerationOptions { - static const int NSAttributedStringEnumerationReverse = 2; - static const int - NSAttributedStringEnumerationLongestEffectiveRangeNotRequired = 1048576; -} + objc.NSString? get currentMode { + final _ret = _objc_msgSend_13(this.pointer, _sel_currentMode); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -void _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, _NSRange, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( - void Function(ffi.Pointer, _NSRange, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + ffi.Pointer<__CFRunLoop> getCFRunLoop() { + return _objc_msgSend_204(this.pointer, _sel_getCFRunLoop); + } -void _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); + void addTimer_forMode_(NSTimer timer, objc.NSString mode) { + _objc_msgSend_213( + this.pointer, _sel_addTimer_forMode_, timer.pointer, mode.pointer); + } -class ObjCBlock_ffiVoid_NSDictionary_NSRange_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSDictionary_NSRange_bool._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + void addPort_forMode_(NSPort aPort, objc.NSString mode) { + _objc_msgSend_244( + this.pointer, _sel_addPort_forMode_, aPort.pointer, mode.pointer); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSDictionary_NSRange_bool castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSDictionary_NSRange_bool._(pointer, lib, - retain: retain, release: release); + void removePort_forMode_(NSPort aPort, objc.NSString mode) { + _objc_msgSend_244( + this.pointer, _sel_removePort_forMode_, aPort.pointer, mode.pointer); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSDictionary_NSRange_bool.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + objc.NSDate? limitDateForMode_(objc.NSString mode) { + final _ret = + _objc_msgSend_93(this.pointer, _sel_limitDateForMode_, mode.pointer); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSDictionary_NSRange_bool.fromFunction(SwiftLibrary lib, - void Function(NSDictionary, _NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(NSDictionary._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + void acceptInputForMode_beforeDate_( + objc.NSString mode, objc.NSDate limitDate) { + _objc_msgSend_245(this.pointer, _sel_acceptInputForMode_beforeDate_, + mode.pointer, limitDate.pointer); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSDictionary_NSRange_bool.listener(SwiftLibrary lib, - void Function(NSDictionary, _NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(NSDictionary._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - _NSRange, ffi.Pointer)>? _dartFuncListenerTrampoline; + void run() { + _objc_msgSend_82(this.pointer, _sel_run); + } - void call(NSDictionary arg0, _NSRange arg1, ffi.Pointer arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - ffi.Pointer)>()(_id, arg0._id, arg1, arg2); -} + void runUntilDate_(objc.NSDate limitDate) { + _objc_msgSend_246(this.pointer, _sel_runUntilDate_, limitDate.pointer); + } -void _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, _NSRange, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_registerClosure( - void Function(ffi.Pointer, _NSRange, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + bool runMode_beforeDate_(objc.NSString mode, objc.NSDate limitDate) { + return _objc_msgSend_247(this.pointer, _sel_runMode_beforeDate_, + mode.pointer, limitDate.pointer); + } -void _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); + void configureAsServer() { + _objc_msgSend_82(this.pointer, _sel_configureAsServer); + } -class ObjCBlock_ffiVoid_ObjCObject_NSRange_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ObjCObject_NSRange_bool._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + void performInModes_block_(objc.NSArray modes, ObjCBlock_ffiVoid block) { + _objc_msgSend_248( + this.pointer, _sel_performInModes_block_, modes.pointer, block.pointer); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ObjCObject_NSRange_bool castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ObjCObject_NSRange_bool._(pointer, lib, - retain: retain, release: release); + void performBlock_(ObjCBlock_ffiVoid block) { + _objc_msgSend_249(this.pointer, _sel_performBlock_, block.pointer); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_NSRange_bool.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + void performSelector_target_argument_order_modes_( + ffi.Pointer aSelector, + objc.NSObject target, + objc.NSObject? arg, + int order, + objc.NSArray modes) { + _objc_msgSend_250( + this.pointer, + _sel_performSelector_target_argument_order_modes_, + aSelector, + target.pointer, + arg?.pointer ?? ffi.nullptr, + order, + modes.pointer); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_NSRange_bool.fromFunction(SwiftLibrary lib, - void Function(NSObject?, _NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSObject._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + void cancelPerformSelector_target_argument_( + ffi.Pointer aSelector, + objc.NSObject target, + objc.NSObject? arg) { + _objc_msgSend_251(this.pointer, _sel_cancelPerformSelector_target_argument_, + aSelector, target.pointer, arg?.pointer ?? ffi.nullptr); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ObjCObject_NSRange_bool.listener(SwiftLibrary lib, - void Function(NSObject?, _NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - _NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSObject._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - _NSRange, ffi.Pointer)>? _dartFuncListenerTrampoline; + void cancelPerformSelectorsWithTarget_(objc.NSObject target) { + _objc_msgSend_49( + this.pointer, _sel_cancelPerformSelectorsWithTarget_, target.pointer); + } - void call(NSObject? arg0, _NSRange arg1, ffi.Pointer arg2) => _id - .ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - _NSRange, ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1, arg2); -} + @override + NSRunLoop init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSRunLoop.castFromPointer(_ret, retain: true, release: true); + } -class NSAttributedStringMarkdownParsingOptions extends NSObject { - NSAttributedStringMarkdownParsingOptions._( - ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + static NSRunLoop new1() { + final _ret = _objc_msgSend_40(_class_NSRunLoop, _sel_new); + return NSRunLoop.castFromPointer(_ret, retain: false, release: true); + } - /// Returns a [NSAttributedStringMarkdownParsingOptions] that points to the same underlying object as [other]. - static NSAttributedStringMarkdownParsingOptions - castFrom(T other) { - return NSAttributedStringMarkdownParsingOptions._(other._id, other._lib, - retain: true, release: true); + static NSRunLoop allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSRunLoop, _sel_allocWithZone_, zone); + return NSRunLoop.castFromPointer(_ret, retain: false, release: true); } - /// Returns a [NSAttributedStringMarkdownParsingOptions] that wraps the given raw object pointer. - static NSAttributedStringMarkdownParsingOptions castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSAttributedStringMarkdownParsingOptions._(other, lib, - retain: retain, release: release); + static NSRunLoop alloc() { + final _ret = _objc_msgSend_40(_class_NSRunLoop, _sel_alloc); + return NSRunLoop.castFromPointer(_ret, retain: false, release: true); } - /// Returns whether [obj] is an instance of [NSAttributedStringMarkdownParsingOptions]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSAttributedStringMarkdownParsingOptions1); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSRunLoop, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - @override - NSAttributedStringMarkdownParsingOptions init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSAttributedStringMarkdownParsingOptions._(_ret, _lib, - retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSRunLoop, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - bool get allowsExtendedAttributes { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsExtendedAttributes1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSRunLoop, _sel_accessInstanceVariablesDirectly); } - set allowsExtendedAttributes(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setAllowsExtendedAttributes_1, value); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSRunLoop, _sel_useStoredAccessor); } - int get interpretedSyntax { - return _lib._objc_msgSend_721(_id, _lib._sel_interpretedSyntax1); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSRunLoop, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - set interpretedSyntax(int value) { - return _lib._objc_msgSend_722(_id, _lib._sel_setInterpretedSyntax_1, value); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSRunLoop, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - int get failurePolicy { - return _lib._objc_msgSend_723(_id, _lib._sel_failurePolicy1); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSRunLoop, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - set failurePolicy(int value) { - return _lib._objc_msgSend_724(_id, _lib._sel_setFailurePolicy_1, value); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSRunLoop, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString? get languageCode { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_languageCode1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSRunLoop, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSRunLoop = objc.getClass("NSRunLoop"); +late final _sel_currentRunLoop = objc.registerName("currentRunLoop"); +final _objc_msgSend_203 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_mainRunLoop = objc.registerName("mainRunLoop"); +late final _sel_currentMode = objc.registerName("currentMode"); + +final class __CFRunLoop extends ffi.Opaque {} + +late final _sel_getCFRunLoop = objc.registerName("getCFRunLoop"); +final _objc_msgSend_204 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer<__CFRunLoop> Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer<__CFRunLoop> Function( + ffi.Pointer, ffi.Pointer)>(); + +class NSTimer extends objc.NSObject { + NSTimer._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSTimer] that points to the same underlying object as [other]. + NSTimer.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSTimer] that wraps the given raw object pointer. + NSTimer.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSTimer]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSTimer); + } + + static NSTimer timerWithTimeInterval_invocation_repeats_( + double ti, objc.NSInvocation invocation, bool yesOrNo) { + final _ret = _objc_msgSend_205( + _class_NSTimer, + _sel_timerWithTimeInterval_invocation_repeats_, + ti, + invocation.pointer, + yesOrNo); + return NSTimer.castFromPointer(_ret, retain: true, release: true); + } + + static NSTimer scheduledTimerWithTimeInterval_invocation_repeats_( + double ti, objc.NSInvocation invocation, bool yesOrNo) { + final _ret = _objc_msgSend_205( + _class_NSTimer, + _sel_scheduledTimerWithTimeInterval_invocation_repeats_, + ti, + invocation.pointer, + yesOrNo); + return NSTimer.castFromPointer(_ret, retain: true, release: true); + } + + static NSTimer timerWithTimeInterval_target_selector_userInfo_repeats_( + double ti, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? userInfo, + bool yesOrNo) { + final _ret = _objc_msgSend_206( + _class_NSTimer, + _sel_timerWithTimeInterval_target_selector_userInfo_repeats_, + ti, + aTarget.pointer, + aSelector, + userInfo?.pointer ?? ffi.nullptr, + yesOrNo); + return NSTimer.castFromPointer(_ret, retain: true, release: true); + } + + static NSTimer + scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_( + double ti, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? userInfo, + bool yesOrNo) { + final _ret = _objc_msgSend_206( + _class_NSTimer, + _sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_, + ti, + aTarget.pointer, + aSelector, + userInfo?.pointer ?? ffi.nullptr, + yesOrNo); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - set languageCode(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setLanguageCode_1, value?._id ?? ffi.nullptr); + static NSTimer timerWithTimeInterval_repeats_block_( + double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { + final _ret = _objc_msgSend_207( + _class_NSTimer, + _sel_timerWithTimeInterval_repeats_block_, + interval, + repeats, + block.pointer); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - bool get appliesSourcePositionAttributes { - return _lib._objc_msgSend_12( - _id, _lib._sel_appliesSourcePositionAttributes1); + static NSTimer scheduledTimerWithTimeInterval_repeats_block_( + double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { + final _ret = _objc_msgSend_207( + _class_NSTimer, + _sel_scheduledTimerWithTimeInterval_repeats_block_, + interval, + repeats, + block.pointer); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - set appliesSourcePositionAttributes(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setAppliesSourcePositionAttributes_1, value); + NSTimer initWithFireDate_interval_repeats_block_(objc.NSDate date, + double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { + final _ret = _objc_msgSend_208( + this.pointer, + _sel_initWithFireDate_interval_repeats_block_, + date.pointer, + interval, + repeats, + block.pointer); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - static NSAttributedStringMarkdownParsingOptions new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSAttributedStringMarkdownParsingOptions1, _lib._sel_new1); - return NSAttributedStringMarkdownParsingOptions._(_ret, _lib, - retain: false, release: true); + NSTimer initWithFireDate_interval_target_selector_userInfo_repeats_( + objc.NSDate date, + double ti, + objc.NSObject t, + ffi.Pointer s, + objc.NSObject? ui, + bool rep) { + final _ret = _objc_msgSend_209( + this.pointer, + _sel_initWithFireDate_interval_target_selector_userInfo_repeats_, + date.pointer, + ti, + t.pointer, + s, + ui?.pointer ?? ffi.nullptr, + rep); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - static NSAttributedStringMarkdownParsingOptions allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSAttributedStringMarkdownParsingOptions1, - _lib._sel_allocWithZone_1, - zone); - return NSAttributedStringMarkdownParsingOptions._(_ret, _lib, - retain: false, release: true); + void fire() { + _objc_msgSend_82(this.pointer, _sel_fire); } - static NSAttributedStringMarkdownParsingOptions alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSAttributedStringMarkdownParsingOptions1, - _lib._sel_alloc1); - return NSAttributedStringMarkdownParsingOptions._(_ret, _lib, - retain: false, release: true); + objc.NSDate get fireDate { + final _ret = _objc_msgSend_210(this.pointer, _sel_fireDate); + return objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSAttributedStringMarkdownParsingOptions1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + set fireDate(objc.NSDate value) { + return _objc_msgSend_211(this.pointer, _sel_setFireDate_, value.pointer); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSAttributedStringMarkdownParsingOptions1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + double get timeInterval { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_timeInterval) + : _objc_msgSend_115(this.pointer, _sel_timeInterval); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSAttributedStringMarkdownParsingOptions1, - _lib._sel_accessInstanceVariablesDirectly1); + double get tolerance { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_tolerance) + : _objc_msgSend_115(this.pointer, _sel_tolerance); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSAttributedStringMarkdownParsingOptions1, - _lib._sel_useStoredAccessor1); + set tolerance(double value) { + return _objc_msgSend_212(this.pointer, _sel_setTolerance_, value); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63( - _lib._class_NSAttributedStringMarkdownParsingOptions1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, - key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + void invalidate() { + _objc_msgSend_82(this.pointer, _sel_invalidate); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64( - _lib._class_NSAttributedStringMarkdownParsingOptions1, - _lib._sel_automaticallyNotifiesObserversForKey_1, - key._id); + bool get valid { + return _objc_msgSend_7(this.pointer, _sel_isValid); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSAttributedStringMarkdownParsingOptions1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSObject? get userInfo { + final _ret = _objc_msgSend_66(this.pointer, _sel_userInfo); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSAttributedStringMarkdownParsingOptions1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + @override + NSTimer init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSAttributedStringMarkdownParsingOptions1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSTimer new1() { + final _ret = _objc_msgSend_40(_class_NSTimer, _sel_new); + return NSTimer.castFromPointer(_ret, retain: false, release: true); } -} - -abstract class NSAttributedStringMarkdownInterpretedSyntax { - static const int NSAttributedStringMarkdownInterpretedSyntaxFull = 0; - static const int NSAttributedStringMarkdownInterpretedSyntaxInlineOnly = 1; - static const int - NSAttributedStringMarkdownInterpretedSyntaxInlineOnlyPreservingWhitespace = - 2; -} - -abstract class NSAttributedStringMarkdownParsingFailurePolicy { - static const int NSAttributedStringMarkdownParsingFailureReturnError = 0; - static const int - NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible = - 1; -} - -abstract class NSAttributedStringFormattingOptions { - static const int - NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging = 1; - static const int NSAttributedStringFormattingApplyReplacementIndexAttribute = - 2; -} -class NSMutableAttributedString extends NSAttributedString { - NSMutableAttributedString._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSMutableAttributedString] that points to the same underlying object as [other]. - static NSMutableAttributedString castFrom(T other) { - return NSMutableAttributedString._(other._id, other._lib, - retain: true, release: true); + static NSTimer allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSTimer, _sel_allocWithZone_, zone); + return NSTimer.castFromPointer(_ret, retain: false, release: true); } - /// Returns a [NSMutableAttributedString] that wraps the given raw object pointer. - static NSMutableAttributedString castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableAttributedString._(other, lib, - retain: retain, release: release); + static NSTimer alloc() { + final _ret = _objc_msgSend_40(_class_NSTimer, _sel_alloc); + return NSTimer.castFromPointer(_ret, retain: false, release: true); } - /// Returns whether [obj] is an instance of [NSMutableAttributedString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableAttributedString1); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSTimer, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - void replaceCharactersInRange_withString_(_NSRange range, NSString str) { - _lib._objc_msgSend_689( - _id, _lib._sel_replaceCharactersInRange_withString_1, range, str._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSTimer, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - void setAttributes_range_(NSDictionary? attrs, _NSRange range) { - _lib._objc_msgSend_739( - _id, _lib._sel_setAttributes_range_1, attrs?._id ?? ffi.nullptr, range); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSTimer, _sel_accessInstanceVariablesDirectly); } - NSMutableString get mutableString { - final _ret = _lib._objc_msgSend_740(_id, _lib._sel_mutableString1); - return NSMutableString._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSTimer, _sel_useStoredAccessor); } - void addAttribute_value_range_( - NSString name, NSObject value, _NSRange range) { - _lib._objc_msgSend_741( - _id, _lib._sel_addAttribute_value_range_1, name._id, value._id, range); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSTimer, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - void addAttributes_range_(NSDictionary attrs, _NSRange range) { - _lib._objc_msgSend_742( - _id, _lib._sel_addAttributes_range_1, attrs._id, range); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSTimer, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - void removeAttribute_range_(NSString name, _NSRange range) { - _lib._objc_msgSend_743( - _id, _lib._sel_removeAttribute_range_1, name._id, range); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSTimer, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSTimer, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40(_class_NSTimer, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSTimer = objc.getClass("NSTimer"); +late final _sel_timerWithTimeInterval_invocation_repeats_ = + objc.registerName("timerWithTimeInterval:invocation:repeats:"); +final _objc_msgSend_205 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer, + bool)>(); +late final _sel_scheduledTimerWithTimeInterval_invocation_repeats_ = + objc.registerName("scheduledTimerWithTimeInterval:invocation:repeats:"); +late final _sel_timerWithTimeInterval_target_selector_userInfo_repeats_ = objc + .registerName("timerWithTimeInterval:target:selector:userInfo:repeats:"); +final _objc_msgSend_206 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_ = + objc.registerName( + "scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:"); +void _ObjCBlock_ffiVoid_NSTimer_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSTimer_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSTimer_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSTimer_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSTimer_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSTimer_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - void replaceCharactersInRange_withAttributedString_( - _NSRange range, NSAttributedString attrString) { - _lib._objc_msgSend_744( - _id, - _lib._sel_replaceCharactersInRange_withAttributedString_1, - range, - attrString._id); - } +void _ObjCBlock_ffiVoid_NSTimer_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSTimer_closureRegistry[block.ref.target.address]!(arg0); - void insertAttributedString_atIndex_(NSAttributedString attrString, int loc) { - _lib._objc_msgSend_745( - _id, _lib._sel_insertAttributedString_atIndex_1, attrString._id, loc); - } +class ObjCBlock_ffiVoid_NSTimer extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSTimer._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); - void appendAttributedString_(NSAttributedString attrString) { - _lib._objc_msgSend_746( - _id, _lib._sel_appendAttributedString_1, attrString._id); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSTimer castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSTimer._(pointer, + retain: retain, release: release); } - void deleteCharactersInRange_(_NSRange range) { - _lib._objc_msgSend_476(_id, _lib._sel_deleteCharactersInRange_1, range); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSTimer.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTimer_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - void setAttributedString_(NSAttributedString attrString) { - _lib._objc_msgSend_746( - _id, _lib._sel_setAttributedString_1, attrString._id); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSTimer.fromFunction(void Function(NSTimer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTimer_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSTimer_registerClosure( + (ffi.Pointer arg0) => fn( + NSTimer.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; - void beginEditing() { - _lib._objc_msgSend_1(_id, _lib._sel_beginEditing1); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSTimer.listener(void Function(NSTimer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSTimer_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSTimer_registerClosure( + (ffi.Pointer arg0) => fn( + NSTimer.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; - void endEditing() { - _lib._objc_msgSend_1(_id, _lib._sel_endEditing1); - } + void call(NSTimer arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(pointer, arg0.pointer); +} + +late final _sel_timerWithTimeInterval_repeats_block_ = + objc.registerName("timerWithTimeInterval:repeats:block:"); +final _objc_msgSend_207 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Bool, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + double, + bool, + ffi.Pointer)>(); +late final _sel_scheduledTimerWithTimeInterval_repeats_block_ = + objc.registerName("scheduledTimerWithTimeInterval:repeats:block:"); +late final _sel_initWithFireDate_interval_repeats_block_ = + objc.registerName("initWithFireDate:interval:repeats:block:"); +final _objc_msgSend_208 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Bool, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + double, + bool, + ffi.Pointer)>(); +late final _sel_initWithFireDate_interval_target_selector_userInfo_repeats_ = + objc.registerName( + "initWithFireDate:interval:target:selector:userInfo:repeats:"); +final _objc_msgSend_209 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_fire = objc.registerName("fire"); +late final _sel_fireDate = objc.registerName("fireDate"); +final _objc_msgSend_210 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setFireDate_ = objc.registerName("setFireDate:"); +final _objc_msgSend_211 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_timeInterval = objc.registerName("timeInterval"); +late final _sel_tolerance = objc.registerName("tolerance"); +late final _sel_setTolerance_ = objc.registerName("setTolerance:"); +final _objc_msgSend_212 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, double)>(); +late final _sel_invalidate = objc.registerName("invalidate"); +late final _sel_isValid = objc.registerName("isValid"); +late final _sel_addTimer_forMode_ = objc.registerName("addTimer:forMode:"); +final _objc_msgSend_213 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +class NSPort extends objc.NSObject { + NSPort._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - void appendLocalizedFormat_(NSAttributedString format) { - _lib._objc_msgSend_746(_id, _lib._sel_appendLocalizedFormat_1, format._id); - } + /// Constructs a [NSPort] that points to the same underlying object as [other]. + NSPort.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - @override - NSMutableAttributedString initWithString_(NSString str) { - final _ret = - _lib._objc_msgSend_31(_id, _lib._sel_initWithString_1, str._id); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + /// Constructs a [NSPort] that wraps the given raw object pointer. + NSPort.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSPort]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSPort); } - @override - NSMutableAttributedString initWithString_attributes_( - NSString str, NSDictionary? attrs) { - final _ret = _lib._objc_msgSend_717( - _id, - _lib._sel_initWithString_attributes_1, - str._id, - attrs?._id ?? ffi.nullptr); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + static NSPort port() { + final _ret = _objc_msgSend_214(_class_NSPort, _sel_port); + return NSPort.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableAttributedString initWithAttributedString_( - NSAttributedString attrStr) { - final _ret = _lib._objc_msgSend_718( - _id, _lib._sel_initWithAttributedString_1, attrStr._id); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + void invalidate() { + _objc_msgSend_82(this.pointer, _sel_invalidate); } - @override - NSMutableAttributedString? - initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( - NSURL markdownFile, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_725( - _id, - _lib._sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_1, - markdownFile._id, - options?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + bool get valid { + return _objc_msgSend_7(this.pointer, _sel_isValid); } - @override - NSMutableAttributedString? initWithMarkdown_options_baseURL_error_( - NSData markdown, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_726( - _id, - _lib._sel_initWithMarkdown_options_baseURL_error_1, - markdown._id, - options?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + void setDelegate_(objc.NSObject? anObject) { + _objc_msgSend_215( + this.pointer, _sel_setDelegate_, anObject?.pointer ?? ffi.nullptr); } - @override - NSMutableAttributedString? initWithMarkdownString_options_baseURL_error_( - NSString markdownString, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_727( - _id, - _lib._sel_initWithMarkdownString_options_baseURL_error_1, - markdownString._id, - options?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr, - error); + objc.NSObject? delegate() { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); return _ret.address == 0 ? null - : NSMutableAttributedString._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableAttributedString initWithFormat_options_locale_( - NSAttributedString format, int options, NSLocale? locale) { - final _ret = _lib._objc_msgSend_728( - _id, - _lib._sel_initWithFormat_options_locale_1, - format._id, - options, - locale?._id ?? ffi.nullptr); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableAttributedString initWithFormat_options_locale_arguments_( - NSAttributedString format, - int options, - NSLocale? locale, - ffi.Pointer<__va_list_tag> arguments) { - final _ret = _lib._objc_msgSend_729( - _id, - _lib._sel_initWithFormat_options_locale_arguments_1, - format._id, - options, - locale?._id ?? ffi.nullptr, - arguments); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + void scheduleInRunLoop_forMode_(NSRunLoop runLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_scheduleInRunLoop_forMode_, + runLoop.pointer, mode.pointer); } - static NSMutableAttributedString localizedAttributedStringWithFormat_( - SwiftLibrary _lib, NSAttributedString format) { - final _ret = _lib._objc_msgSend_718(_lib._class_NSMutableAttributedString1, - _lib._sel_localizedAttributedStringWithFormat_1, format._id); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + void removeFromRunLoop_forMode_(NSRunLoop runLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_removeFromRunLoop_forMode_, + runLoop.pointer, mode.pointer); } - static NSMutableAttributedString localizedAttributedStringWithFormat_options_( - SwiftLibrary _lib, NSAttributedString format, int options) { - final _ret = _lib._objc_msgSend_730( - _lib._class_NSMutableAttributedString1, - _lib._sel_localizedAttributedStringWithFormat_options_1, - format._id, - options); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + int get reservedSpaceLength { + return _objc_msgSend_29(this.pointer, _sel_reservedSpaceLength); } - @override - NSMutableAttributedString initWithFormat_options_locale_context_( - NSAttributedString format, - int options, - NSLocale? locale, - NSDictionary context) { - final _ret = _lib._objc_msgSend_731( - _id, - _lib._sel_initWithFormat_options_locale_context_1, - format._id, - options, - locale?._id ?? ffi.nullptr, - context._id); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + bool sendBeforeDate_components_from_reserved_( + objc.NSDate limitDate, + objc.NSMutableArray? components, + NSPort? receivePort, + int headerSpaceReserved) { + return _objc_msgSend_217( + this.pointer, + _sel_sendBeforeDate_components_from_reserved_, + limitDate.pointer, + components?.pointer ?? ffi.nullptr, + receivePort?.pointer ?? ffi.nullptr, + headerSpaceReserved); } - @override - NSMutableAttributedString initWithFormat_options_locale_context_arguments_( - NSAttributedString format, - int options, - NSLocale? locale, - NSDictionary context, - ffi.Pointer<__va_list_tag> arguments) { - final _ret = _lib._objc_msgSend_732( - _id, - _lib._sel_initWithFormat_options_locale_context_arguments_1, - format._id, - options, - locale?._id ?? ffi.nullptr, - context._id, - arguments); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + bool sendBeforeDate_msgid_components_from_reserved_( + objc.NSDate limitDate, + int msgID, + objc.NSMutableArray? components, + NSPort? receivePort, + int headerSpaceReserved) { + return _objc_msgSend_218( + this.pointer, + _sel_sendBeforeDate_msgid_components_from_reserved_, + limitDate.pointer, + msgID, + components?.pointer ?? ffi.nullptr, + receivePort?.pointer ?? ffi.nullptr, + headerSpaceReserved); } - static NSMutableAttributedString localizedAttributedStringWithFormat_context_( - SwiftLibrary _lib, NSAttributedString format, NSDictionary context) { - final _ret = _lib._objc_msgSend_733( - _lib._class_NSMutableAttributedString1, - _lib._sel_localizedAttributedStringWithFormat_context_1, - format._id, - context._id); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + void addConnection_toRunLoop_forMode_( + NSConnection conn, NSRunLoop runLoop, objc.NSString mode) { + _objc_msgSend_243(this.pointer, _sel_addConnection_toRunLoop_forMode_, + conn.pointer, runLoop.pointer, mode.pointer); } - static NSMutableAttributedString - localizedAttributedStringWithFormat_options_context_(SwiftLibrary _lib, - NSAttributedString format, int options, NSDictionary context) { - final _ret = _lib._objc_msgSend_734( - _lib._class_NSMutableAttributedString1, - _lib._sel_localizedAttributedStringWithFormat_options_context_1, - format._id, - options, - context._id); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + void removeConnection_fromRunLoop_forMode_( + NSConnection conn, NSRunLoop runLoop, objc.NSString mode) { + _objc_msgSend_243(this.pointer, _sel_removeConnection_fromRunLoop_forMode_, + conn.pointer, runLoop.pointer, mode.pointer); } @override - NSMutableAttributedString init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableAttributedString._(_ret, _lib, retain: true, release: true); + NSPort init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSPort.castFromPointer(_ret, retain: true, release: true); } - static NSMutableAttributedString new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableAttributedString1, _lib._sel_new1); - return NSMutableAttributedString._(_ret, _lib, - retain: false, release: true); + static NSPort new1() { + final _ret = _objc_msgSend_40(_class_NSPort, _sel_new); + return NSPort.castFromPointer(_ret, retain: false, release: true); } - static NSMutableAttributedString allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3(_lib._class_NSMutableAttributedString1, - _lib._sel_allocWithZone_1, zone); - return NSMutableAttributedString._(_ret, _lib, - retain: false, release: true); + static NSPort allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSPort, _sel_allocWithZone_, zone); + return NSPort.castFromPointer(_ret, retain: false, release: true); } - static NSMutableAttributedString alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableAttributedString1, _lib._sel_alloc1); - return NSMutableAttributedString._(_ret, _lib, - retain: false, release: true); + static NSPort alloc() { + final _ret = _objc_msgSend_40(_class_NSPort, _sel_alloc); + return NSPort.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSMutableAttributedString1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSPort, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSMutableAttributedString1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSPort, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSMutableAttributedString1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7(_class_NSPort, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableAttributedString1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSPort, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSMutableAttributedString1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSPort, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSMutableAttributedString1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51( + _class_NSPort, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSMutableAttributedString1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSMutableAttributedString1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSPort, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSPort, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40(_class_NSPort, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSPort = objc.getClass("NSPort"); +late final _sel_port = objc.registerName("port"); +final _objc_msgSend_214 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDelegate_ = objc.registerName("setDelegate:"); +final _objc_msgSend_215 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_delegate = objc.registerName("delegate"); +late final _sel_scheduleInRunLoop_forMode_ = + objc.registerName("scheduleInRunLoop:forMode:"); +final _objc_msgSend_216 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeFromRunLoop_forMode_ = + objc.registerName("removeFromRunLoop:forMode:"); +late final _sel_reservedSpaceLength = objc.registerName("reservedSpaceLength"); +late final _sel_sendBeforeDate_components_from_reserved_ = + objc.registerName("sendBeforeDate:components:from:reserved:"); +final _objc_msgSend_217 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_sendBeforeDate_msgid_components_from_reserved_ = + objc.registerName("sendBeforeDate:msgid:components:from:reserved:"); +final _objc_msgSend_218 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + int)>(); + +class NSConnection extends objc.NSObject { + NSConnection._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSMutableAttributedString1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} + /// Constructs a [NSConnection] that points to the same underlying object as [other]. + NSConnection.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); -class NSDateFormatter extends NSFormatter { - NSDateFormatter._(ffi.Pointer id, SwiftLibrary lib, + /// Constructs a [NSConnection] that wraps the given raw object pointer. + NSConnection.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSDateFormatter] that points to the same underlying object as [other]. - static NSDateFormatter castFrom(T other) { - return NSDateFormatter._(other._id, other._lib, - retain: true, release: true); - } + : this._(other, retain: retain, release: release); - /// Returns a [NSDateFormatter] that wraps the given raw object pointer. - static NSDateFormatter castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDateFormatter._(other, lib, retain: retain, release: release); + /// Returns whether [obj] is an instance of [NSConnection]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSConnection); } - /// Returns whether [obj] is an instance of [NSDateFormatter]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSDateFormatter1); + objc.NSDictionary get statistics { + final _ret = _objc_msgSend_112(this.pointer, _sel_statistics); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - int get formattingContext { - return _lib._objc_msgSend_752(_id, _lib._sel_formattingContext1); + static objc.NSArray allConnections() { + final _ret = _objc_msgSend_6(_class_NSConnection, _sel_allConnections); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set formattingContext(int value) { - return _lib._objc_msgSend_753(_id, _lib._sel_setFormattingContext_1, value); + static NSConnection defaultConnection() { + final _ret = _objc_msgSend_219(_class_NSConnection, _sel_defaultConnection); + return NSConnection.castFromPointer(_ret, retain: true, release: true); } - bool getObjectValue_forString_range_error_( - ffi.Pointer> obj, - NSString string, - ffi.Pointer<_NSRange> rangep, - ffi.Pointer> error) { - return _lib._objc_msgSend_754( - _id, - _lib._sel_getObjectValue_forString_range_error_1, - obj, - string._id, - rangep, - error); + static NSConnection? connectionWithRegisteredName_host_( + objc.NSString name, objc.NSString? hostName) { + final _ret = _objc_msgSend_220( + _class_NSConnection, + _sel_connectionWithRegisteredName_host_, + name.pointer, + hostName?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); } - NSString stringFromDate_(NSDate date) { - final _ret = - _lib._objc_msgSend_755(_id, _lib._sel_stringFromDate_1, date._id); - return NSString._(_ret, _lib, retain: true, release: true); + static NSConnection? connectionWithRegisteredName_host_usingNameServer_( + objc.NSString name, objc.NSString? hostName, NSPortNameServer server) { + final _ret = _objc_msgSend_225( + _class_NSConnection, + _sel_connectionWithRegisteredName_host_usingNameServer_, + name.pointer, + hostName?.pointer ?? ffi.nullptr, + server.pointer); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); } - NSDate? dateFromString_(NSString string) { - final _ret = - _lib._objc_msgSend_564(_id, _lib._sel_dateFromString_1, string._id); + static NSDistantObject? rootProxyForConnectionWithRegisteredName_host_( + objc.NSString name, objc.NSString? hostName) { + final _ret = _objc_msgSend_233( + _class_NSConnection, + _sel_rootProxyForConnectionWithRegisteredName_host_, + name.pointer, + hostName?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : NSDistantObject.castFromPointer(_ret, retain: true, release: true); } - static NSString localizedStringFromDate_dateStyle_timeStyle_( - SwiftLibrary _lib, NSDate date, int dstyle, int tstyle) { - final _ret = _lib._objc_msgSend_756( - _lib._class_NSDateFormatter1, - _lib._sel_localizedStringFromDate_dateStyle_timeStyle_1, - date._id, - dstyle, - tstyle); - return NSString._(_ret, _lib, retain: true, release: true); + static NSDistantObject? + rootProxyForConnectionWithRegisteredName_host_usingNameServer_( + objc.NSString name, + objc.NSString? hostName, + NSPortNameServer server) { + final _ret = _objc_msgSend_234( + _class_NSConnection, + _sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_, + name.pointer, + hostName?.pointer ?? ffi.nullptr, + server.pointer); + return _ret.address == 0 + ? null + : NSDistantObject.castFromPointer(_ret, retain: true, release: true); } - static NSString? dateFormatFromTemplate_options_locale_( - SwiftLibrary _lib, NSString tmplate, int opts, NSLocale? locale) { - final _ret = _lib._objc_msgSend_757( - _lib._class_NSDateFormatter1, - _lib._sel_dateFormatFromTemplate_options_locale_1, - tmplate._id, - opts, - locale?._id ?? ffi.nullptr); + static NSConnection? serviceConnectionWithName_rootObject_usingNameServer_( + objc.NSString name, objc.NSObject root, NSPortNameServer server) { + final _ret = _objc_msgSend_235( + _class_NSConnection, + _sel_serviceConnectionWithName_rootObject_usingNameServer_, + name.pointer, + root.pointer, + server.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSConnection.castFromPointer(_ret, retain: true, release: true); } - static int getDefaultFormatterBehavior(SwiftLibrary _lib) { - return _lib._objc_msgSend_758( - _lib._class_NSDateFormatter1, _lib._sel_defaultFormatterBehavior1); + static NSConnection? serviceConnectionWithName_rootObject_( + objc.NSString name, objc.NSObject root) { + final _ret = _objc_msgSend_236(_class_NSConnection, + _sel_serviceConnectionWithName_rootObject_, name.pointer, root.pointer); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); } - static void setDefaultFormatterBehavior(SwiftLibrary _lib, int value) { - return _lib._objc_msgSend_759(_lib._class_NSDateFormatter1, - _lib._sel_setDefaultFormatterBehavior_1, value); + double get requestTimeout { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_requestTimeout) + : _objc_msgSend_115(this.pointer, _sel_requestTimeout); } - void setLocalizedDateFormatFromTemplate_(NSString dateFormatTemplate) { - _lib._objc_msgSend_247(_id, _lib._sel_setLocalizedDateFormatFromTemplate_1, - dateFormatTemplate._id); + set requestTimeout(double value) { + return _objc_msgSend_212(this.pointer, _sel_setRequestTimeout_, value); } - NSString get dateFormat { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_dateFormat1); - return NSString._(_ret, _lib, retain: true, release: true); + double get replyTimeout { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_replyTimeout) + : _objc_msgSend_115(this.pointer, _sel_replyTimeout); } - set dateFormat(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setDateFormat_1, value._id); + set replyTimeout(double value) { + return _objc_msgSend_212(this.pointer, _sel_setReplyTimeout_, value); } - int get dateStyle { - return _lib._objc_msgSend_760(_id, _lib._sel_dateStyle1); + objc.NSObject? get rootObject { + final _ret = _objc_msgSend_66(this.pointer, _sel_rootObject); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set dateStyle(int value) { - return _lib._objc_msgSend_761(_id, _lib._sel_setDateStyle_1, value); + set rootObject(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setRootObject_, value?.pointer ?? ffi.nullptr); } - int get timeStyle { - return _lib._objc_msgSend_760(_id, _lib._sel_timeStyle1); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set timeStyle(int value) { - return _lib._objc_msgSend_761(_id, _lib._sel_setTimeStyle_1, value); + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } - NSLocale get locale { - final _ret = _lib._objc_msgSend_197(_id, _lib._sel_locale1); - return NSLocale._(_ret, _lib, retain: true, release: true); + bool get independentConversationQueueing { + return _objc_msgSend_7(this.pointer, _sel_independentConversationQueueing); } - set locale(NSLocale value) { - return _lib._objc_msgSend_762(_id, _lib._sel_setLocale_1, value._id); + set independentConversationQueueing(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setIndependentConversationQueueing_, value); } - bool get generatesCalendarDates { - return _lib._objc_msgSend_12(_id, _lib._sel_generatesCalendarDates1); + bool get valid { + return _objc_msgSend_7(this.pointer, _sel_isValid); } - set generatesCalendarDates(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setGeneratesCalendarDates_1, value); + NSDistantObject get rootProxy { + final _ret = _objc_msgSend_237(this.pointer, _sel_rootProxy); + return NSDistantObject.castFromPointer(_ret, retain: true, release: true); } - int get formatterBehavior { - return _lib._objc_msgSend_758(_id, _lib._sel_formatterBehavior1); + void invalidate() { + _objc_msgSend_82(this.pointer, _sel_invalidate); } - set formatterBehavior(int value) { - return _lib._objc_msgSend_759(_id, _lib._sel_setFormatterBehavior_1, value); + void addRequestMode_(objc.NSString rmode) { + _objc_msgSend_98(this.pointer, _sel_addRequestMode_, rmode.pointer); } - NSTimeZone get timeZone { - final _ret = _lib._objc_msgSend_179(_id, _lib._sel_timeZone1); - return NSTimeZone._(_ret, _lib, retain: true, release: true); + void removeRequestMode_(objc.NSString rmode) { + _objc_msgSend_98(this.pointer, _sel_removeRequestMode_, rmode.pointer); } - set timeZone(NSTimeZone value) { - return _lib._objc_msgSend_180(_id, _lib._sel_setTimeZone_1, value._id); + objc.NSArray get requestModes { + final _ret = _objc_msgSend_6(this.pointer, _sel_requestModes); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSCalendar get calendar { - final _ret = _lib._objc_msgSend_763(_id, _lib._sel_calendar1); - return NSCalendar._(_ret, _lib, retain: true, release: true); + bool registerName_(objc.NSString? name) { + return _objc_msgSend_238( + this.pointer, _sel_registerName_, name?.pointer ?? ffi.nullptr); } - set calendar(NSCalendar value) { - return _lib._objc_msgSend_799(_id, _lib._sel_setCalendar_1, value._id); + bool registerName_withNameServer_( + objc.NSString? name, NSPortNameServer server) { + return _objc_msgSend_239(this.pointer, _sel_registerName_withNameServer_, + name?.pointer ?? ffi.nullptr, server.pointer); } - bool get lenient { - return _lib._objc_msgSend_12(_id, _lib._sel_isLenient1); + static NSConnection? connectionWithReceivePort_sendPort_( + NSPort? receivePort, NSPort? sendPort) { + final _ret = _objc_msgSend_240( + _class_NSConnection, + _sel_connectionWithReceivePort_sendPort_, + receivePort?.pointer ?? ffi.nullptr, + sendPort?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); } - set lenient(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setLenient_1, value); + static objc.NSObject? currentConversation() { + final _ret = + _objc_msgSend_66(_class_NSConnection, _sel_currentConversation); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSDate? get twoDigitStartDate { - final _ret = _lib._objc_msgSend_183(_id, _lib._sel_twoDigitStartDate1); + NSConnection? initWithReceivePort_sendPort_( + NSPort? receivePort, NSPort? sendPort) { + final _ret = _objc_msgSend_240( + this.pointer, + _sel_initWithReceivePort_sendPort_, + receivePort?.pointer ?? ffi.nullptr, + sendPort?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : NSConnection.castFromPointer(_ret, retain: true, release: true); } - set twoDigitStartDate(NSDate? value) { - return _lib._objc_msgSend_800( - _id, _lib._sel_setTwoDigitStartDate_1, value?._id ?? ffi.nullptr); + NSPort get sendPort { + final _ret = _objc_msgSend_214(this.pointer, _sel_sendPort); + return NSPort.castFromPointer(_ret, retain: true, release: true); } - NSDate? get defaultDate { - final _ret = _lib._objc_msgSend_183(_id, _lib._sel_defaultDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + NSPort get receivePort { + final _ret = _objc_msgSend_214(this.pointer, _sel_receivePort); + return NSPort.castFromPointer(_ret, retain: true, release: true); } - set defaultDate(NSDate? value) { - return _lib._objc_msgSend_800( - _id, _lib._sel_setDefaultDate_1, value?._id ?? ffi.nullptr); + void enableMultipleThreads() { + _objc_msgSend_82(this.pointer, _sel_enableMultipleThreads); } - NSArray get eraSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_eraSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool get multipleThreadsEnabled { + return _objc_msgSend_7(this.pointer, _sel_multipleThreadsEnabled); } - set eraSymbols(NSArray value) { - return _lib._objc_msgSend_801(_id, _lib._sel_setEraSymbols_1, value._id); + void addRunLoop_(NSRunLoop runloop) { + _objc_msgSend_241(this.pointer, _sel_addRunLoop_, runloop.pointer); } - NSArray get monthSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_monthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + void removeRunLoop_(NSRunLoop runloop) { + _objc_msgSend_241(this.pointer, _sel_removeRunLoop_, runloop.pointer); } - set monthSymbols(NSArray value) { - return _lib._objc_msgSend_801(_id, _lib._sel_setMonthSymbols_1, value._id); + void runInNewThread() { + _objc_msgSend_82(this.pointer, _sel_runInNewThread); } - NSArray get shortMonthSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_shortMonthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSArray get remoteObjects { + final _ret = _objc_msgSend_6(this.pointer, _sel_remoteObjects); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set shortMonthSymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setShortMonthSymbols_1, value._id); + objc.NSArray get localObjects { + final _ret = _objc_msgSend_6(this.pointer, _sel_localObjects); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSArray get weekdaySymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_weekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + void dispatchWithComponents_(objc.NSArray components) { + _objc_msgSend_242( + this.pointer, _sel_dispatchWithComponents_, components.pointer); } - set weekdaySymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setWeekdaySymbols_1, value._id); + @override + NSConnection init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSConnection.castFromPointer(_ret, retain: true, release: true); } - NSArray get shortWeekdaySymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_shortWeekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSConnection new1() { + final _ret = _objc_msgSend_40(_class_NSConnection, _sel_new); + return NSConnection.castFromPointer(_ret, retain: false, release: true); } - set shortWeekdaySymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setShortWeekdaySymbols_1, value._id); + static NSConnection allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSConnection, _sel_allocWithZone_, zone); + return NSConnection.castFromPointer(_ret, retain: false, release: true); } - NSString get AMSymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_AMSymbol1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSConnection alloc() { + final _ret = _objc_msgSend_40(_class_NSConnection, _sel_alloc); + return NSConnection.castFromPointer(_ret, retain: false, release: true); } - set AMSymbol(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setAMSymbol_1, value._id); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSConnection, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSString get PMSymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_PMSymbol1); - return NSString._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSConnection, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - set PMSymbol(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setPMSymbol_1, value._id); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSConnection, _sel_accessInstanceVariablesDirectly); } - NSArray get longEraSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_longEraSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSConnection, _sel_useStoredAccessor); } - set longEraSymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setLongEraSymbols_1, value._id); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSConnection, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSArray get veryShortMonthSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_veryShortMonthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSConnection, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - set veryShortMonthSymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setVeryShortMonthSymbols_1, value._id); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSConnection, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSConnection, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSConnection, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSConnection = objc.getClass("NSConnection"); +late final _sel_statistics = objc.registerName("statistics"); +late final _sel_allConnections = objc.registerName("allConnections"); +late final _sel_defaultConnection = objc.registerName("defaultConnection"); +final _objc_msgSend_219 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_connectionWithRegisteredName_host_ = + objc.registerName("connectionWithRegisteredName:host:"); +final _objc_msgSend_220 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +class NSPortNameServer extends objc.NSObject { + NSPortNameServer._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSPortNameServer] that points to the same underlying object as [other]. + NSPortNameServer.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSPortNameServer] that wraps the given raw object pointer. + NSPortNameServer.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - NSArray get standaloneMonthSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_standaloneMonthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSPortNameServer]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSPortNameServer); } - set standaloneMonthSymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setStandaloneMonthSymbols_1, value._id); + static NSPortNameServer systemDefaultPortNameServer() { + final _ret = _objc_msgSend_221( + _class_NSPortNameServer, _sel_systemDefaultPortNameServer); + return NSPortNameServer.castFromPointer(_ret, retain: true, release: true); } - NSArray get shortStandaloneMonthSymbols { + NSPort? portForName_(objc.NSString name) { final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_shortStandaloneMonthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + _objc_msgSend_222(this.pointer, _sel_portForName_, name.pointer); + return _ret.address == 0 + ? null + : NSPort.castFromPointer(_ret, retain: true, release: true); } - set shortStandaloneMonthSymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setShortStandaloneMonthSymbols_1, value._id); + NSPort? portForName_host_(objc.NSString name, objc.NSString? host) { + final _ret = _objc_msgSend_223(this.pointer, _sel_portForName_host_, + name.pointer, host?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSPort.castFromPointer(_ret, retain: true, release: true); } - NSArray get veryShortStandaloneMonthSymbols { - final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_veryShortStandaloneMonthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool registerPort_name_(NSPort port, objc.NSString name) { + return _objc_msgSend_224( + this.pointer, _sel_registerPort_name_, port.pointer, name.pointer); } - set veryShortStandaloneMonthSymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setVeryShortStandaloneMonthSymbols_1, value._id); + bool removePortForName_(objc.NSString name) { + return _objc_msgSend_51( + this.pointer, _sel_removePortForName_, name.pointer); } - NSArray get veryShortWeekdaySymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_veryShortWeekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + @override + NSPortNameServer init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSPortNameServer.castFromPointer(_ret, retain: true, release: true); } - set veryShortWeekdaySymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setVeryShortWeekdaySymbols_1, value._id); + static NSPortNameServer new1() { + final _ret = _objc_msgSend_40(_class_NSPortNameServer, _sel_new); + return NSPortNameServer.castFromPointer(_ret, retain: false, release: true); } - NSArray get standaloneWeekdaySymbols { + static NSPortNameServer allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_standaloneWeekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + _objc_msgSend_47(_class_NSPortNameServer, _sel_allocWithZone_, zone); + return NSPortNameServer.castFromPointer(_ret, retain: false, release: true); } - set standaloneWeekdaySymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setStandaloneWeekdaySymbols_1, value._id); + static NSPortNameServer alloc() { + final _ret = _objc_msgSend_40(_class_NSPortNameServer, _sel_alloc); + return NSPortNameServer.castFromPointer(_ret, retain: false, release: true); } - NSArray get shortStandaloneWeekdaySymbols { - final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_shortStandaloneWeekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSPortNameServer, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - set shortStandaloneWeekdaySymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setShortStandaloneWeekdaySymbols_1, value._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSPortNameServer, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSArray get veryShortStandaloneWeekdaySymbols { - final _ret = _lib._objc_msgSend_85( - _id, _lib._sel_veryShortStandaloneWeekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSPortNameServer, _sel_accessInstanceVariablesDirectly); } - set veryShortStandaloneWeekdaySymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setVeryShortStandaloneWeekdaySymbols_1, value._id); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSPortNameServer, _sel_useStoredAccessor); } - NSArray get quarterSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_quarterSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSPortNameServer, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - set quarterSymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setQuarterSymbols_1, value._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSPortNameServer, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSArray get shortQuarterSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_shortQuarterSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSPortNameServer, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSPortNameServer, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSPortNameServer, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSPortNameServer = objc.getClass("NSPortNameServer"); +late final _sel_systemDefaultPortNameServer = + objc.registerName("systemDefaultPortNameServer"); +final _objc_msgSend_221 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_portForName_ = objc.registerName("portForName:"); +final _objc_msgSend_222 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_portForName_host_ = objc.registerName("portForName:host:"); +final _objc_msgSend_223 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_registerPort_name_ = objc.registerName("registerPort:name:"); +final _objc_msgSend_224 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removePortForName_ = objc.registerName("removePortForName:"); +late final _sel_connectionWithRegisteredName_host_usingNameServer_ = + objc.registerName("connectionWithRegisteredName:host:usingNameServer:"); +final _objc_msgSend_225 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +class NSDistantObject extends NSProxy { + NSDistantObject._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - set shortQuarterSymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setShortQuarterSymbols_1, value._id); + /// Constructs a [NSDistantObject] that points to the same underlying object as [other]. + NSDistantObject.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSDistantObject] that wraps the given raw object pointer. + NSDistantObject.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSDistantObject]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSDistantObject); } - NSArray get standaloneQuarterSymbols { - final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_standaloneQuarterSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSObject? proxyWithTarget_connection_( + objc.NSObject target, NSConnection connection) { + final _ret = _objc_msgSend_229(_class_NSDistantObject, + _sel_proxyWithTarget_connection_, target.pointer, connection.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set standaloneQuarterSymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setStandaloneQuarterSymbols_1, value._id); + NSDistantObject? initWithTarget_connection_( + objc.NSObject target, NSConnection connection) { + final _ret = _objc_msgSend_229(this.pointer, + _sel_initWithTarget_connection_, target.pointer, connection.pointer); + return _ret.address == 0 + ? null + : NSDistantObject.castFromPointer(_ret, retain: true, release: true); } - NSArray get shortStandaloneQuarterSymbols { - final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_shortStandaloneQuarterSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSObject proxyWithLocal_connection_( + objc.NSObject target, NSConnection connection) { + final _ret = _objc_msgSend_230(_class_NSDistantObject, + _sel_proxyWithLocal_connection_, target.pointer, connection.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set shortStandaloneQuarterSymbols(NSArray value) { - return _lib._objc_msgSend_801( - _id, _lib._sel_setShortStandaloneQuarterSymbols_1, value._id); + NSDistantObject initWithLocal_connection_( + objc.NSObject target, NSConnection connection) { + final _ret = _objc_msgSend_230(this.pointer, _sel_initWithLocal_connection_, + target.pointer, connection.pointer); + return NSDistantObject.castFromPointer(_ret, retain: true, release: true); } - NSDate? get gregorianStartDate { - final _ret = _lib._objc_msgSend_183(_id, _lib._sel_gregorianStartDate1); + NSDistantObject? initWithCoder_(objc.NSCoder inCoder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, inCoder.pointer); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : NSDistantObject.castFromPointer(_ret, retain: true, release: true); } - set gregorianStartDate(NSDate? value) { - return _lib._objc_msgSend_800( - _id, _lib._sel_setGregorianStartDate_1, value?._id ?? ffi.nullptr); + void setProtocolForProxy_(objc.Protocol? proto) { + _objc_msgSend_232( + this.pointer, _sel_setProtocolForProxy_, proto?.pointer ?? ffi.nullptr); } - bool get doesRelativeDateFormatting { - return _lib._objc_msgSend_12(_id, _lib._sel_doesRelativeDateFormatting1); + NSConnection get connectionForProxy { + final _ret = _objc_msgSend_219(this.pointer, _sel_connectionForProxy); + return NSConnection.castFromPointer(_ret, retain: true, release: true); } - set doesRelativeDateFormatting(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setDoesRelativeDateFormatting_1, value); + static objc.NSObject alloc() { + final _ret = _objc_msgSend_40(_class_NSDistantObject, _sel_alloc); + return objc.NSObject.castFromPointer(_ret, retain: false, release: true); } - NSObject initWithDateFormat_allowNaturalLanguage_( - NSString format, bool flag) { - final _ret = _lib._objc_msgSend_30(_id, - _lib._sel_initWithDateFormat_allowNaturalLanguage_1, format._id, flag); - return NSObject._(_ret, _lib, retain: true, release: true); + static bool respondsToSelector_(ffi.Pointer aSelector) { + return _objc_msgSend_228( + _class_NSDistantObject, _sel_respondsToSelector_, aSelector); } +} - bool allowsNaturalLanguage() { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsNaturalLanguage1); - } +late final _class_NSDistantObject = objc.getClass("NSDistantObject"); - @override - NSDateFormatter init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSDateFormatter._(_ret, _lib, retain: true, release: true); +class NSProxy extends objc.ObjCObjectBase { + NSProxy._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [NSProxy] that points to the same underlying object as [other]. + NSProxy.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSProxy] that wraps the given raw object pointer. + NSProxy.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSProxy]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSProxy); } - static NSDateFormatter new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDateFormatter1, _lib._sel_new1); - return NSDateFormatter._(_ret, _lib, retain: false, release: true); + static objc.NSObject alloc() { + final _ret = _objc_msgSend_40(_class_NSProxy, _sel_alloc); + return objc.NSObject.castFromPointer(_ret, retain: false, release: true); } - static NSDateFormatter allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSDateFormatter1, _lib._sel_allocWithZone_1, zone); - return NSDateFormatter._(_ret, _lib, retain: false, release: true); + static objc.NSObject allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSProxy, _sel_allocWithZone_, zone); + return objc.NSObject.castFromPointer(_ret, retain: false, release: true); } - static NSDateFormatter alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDateFormatter1, _lib._sel_alloc1); - return NSDateFormatter._(_ret, _lib, retain: false, release: true); + static objc.NSObject class1() { + final _ret = _objc_msgSend_40(_class_NSProxy, _sel_class); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSDateFormatter1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + void forwardInvocation_(objc.NSInvocation invocation) { + _objc_msgSend_226( + this.pointer, _sel_forwardInvocation_, invocation.pointer); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSDateFormatter1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + objc.NSMethodSignature? methodSignatureForSelector_( + ffi.Pointer sel) { + final _ret = + _objc_msgSend_227(this.pointer, _sel_methodSignatureForSelector_, sel); + return _ret.address == 0 + ? null + : objc.NSMethodSignature.castFromPointer(_ret, + retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSDateFormatter1, - _lib._sel_accessInstanceVariablesDirectly1); + void dealloc() { + _objc_msgSend_82(this.pointer, _sel_dealloc); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSDateFormatter1, _lib._sel_useStoredAccessor1); + void finalize() { + _objc_msgSend_82(this.pointer, _sel_finalize); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSDateFormatter1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + objc.NSString get description { + final _ret = _objc_msgSend_12(this.pointer, _sel_description); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSDateFormatter1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + objc.NSString get debugDescription { + final _ret = _objc_msgSend_12(this.pointer, _sel_debugDescription); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSDateFormatter1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static bool respondsToSelector_(ffi.Pointer aSelector) { + return _objc_msgSend_228( + _class_NSProxy, _sel_respondsToSelector_, aSelector); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSDateFormatter1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool allowsWeakReference() { + return _objc_msgSend_7(this.pointer, _sel_allowsWeakReference); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSDateFormatter1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + bool retainWeakReference() { + return _objc_msgSend_7(this.pointer, _sel_retainWeakReference); + } +} + +late final _class_NSProxy = objc.getClass("NSProxy"); +late final _sel_class = objc.registerName("class"); +late final _sel_forwardInvocation_ = objc.registerName("forwardInvocation:"); +final _objc_msgSend_226 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_methodSignatureForSelector_ = + objc.registerName("methodSignatureForSelector:"); +final _objc_msgSend_227 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dealloc = objc.registerName("dealloc"); +late final _sel_finalize = objc.registerName("finalize"); +late final _sel_debugDescription = objc.registerName("debugDescription"); +late final _sel_respondsToSelector_ = objc.registerName("respondsToSelector:"); +final _objc_msgSend_228 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_allowsWeakReference = objc.registerName("allowsWeakReference"); +late final _sel_retainWeakReference = objc.registerName("retainWeakReference"); +late final _sel_proxyWithTarget_connection_ = + objc.registerName("proxyWithTarget:connection:"); +final _objc_msgSend_229 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithTarget_connection_ = + objc.registerName("initWithTarget:connection:"); +late final _sel_proxyWithLocal_connection_ = + objc.registerName("proxyWithLocal:connection:"); +final _objc_msgSend_230 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithLocal_connection_ = + objc.registerName("initWithLocal:connection:"); +late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); +final _objc_msgSend_231 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setProtocolForProxy_ = + objc.registerName("setProtocolForProxy:"); +final _objc_msgSend_232 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_connectionForProxy = objc.registerName("connectionForProxy"); +late final _sel_rootProxyForConnectionWithRegisteredName_host_ = + objc.registerName("rootProxyForConnectionWithRegisteredName:host:"); +final _objc_msgSend_233 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_ = + objc.registerName( + "rootProxyForConnectionWithRegisteredName:host:usingNameServer:"); +final _objc_msgSend_234 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_serviceConnectionWithName_rootObject_usingNameServer_ = + objc.registerName("serviceConnectionWithName:rootObject:usingNameServer:"); +final _objc_msgSend_235 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_serviceConnectionWithName_rootObject_ = + objc.registerName("serviceConnectionWithName:rootObject:"); +final _objc_msgSend_236 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_requestTimeout = objc.registerName("requestTimeout"); +late final _sel_setRequestTimeout_ = objc.registerName("setRequestTimeout:"); +late final _sel_replyTimeout = objc.registerName("replyTimeout"); +late final _sel_setReplyTimeout_ = objc.registerName("setReplyTimeout:"); +late final _sel_rootObject = objc.registerName("rootObject"); +late final _sel_setRootObject_ = objc.registerName("setRootObject:"); +late final _sel_independentConversationQueueing = + objc.registerName("independentConversationQueueing"); +late final _sel_setIndependentConversationQueueing_ = + objc.registerName("setIndependentConversationQueueing:"); +late final _sel_rootProxy = objc.registerName("rootProxy"); +final _objc_msgSend_237 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_addRequestMode_ = objc.registerName("addRequestMode:"); +late final _sel_removeRequestMode_ = objc.registerName("removeRequestMode:"); +late final _sel_requestModes = objc.registerName("requestModes"); +late final _sel_registerName_ = objc.registerName("registerName:"); +final _objc_msgSend_238 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_registerName_withNameServer_ = + objc.registerName("registerName:withNameServer:"); +final _objc_msgSend_239 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_connectionWithReceivePort_sendPort_ = + objc.registerName("connectionWithReceivePort:sendPort:"); +final _objc_msgSend_240 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_currentConversation = objc.registerName("currentConversation"); +late final _sel_initWithReceivePort_sendPort_ = + objc.registerName("initWithReceivePort:sendPort:"); +late final _sel_sendPort = objc.registerName("sendPort"); +late final _sel_receivePort = objc.registerName("receivePort"); +late final _sel_enableMultipleThreads = + objc.registerName("enableMultipleThreads"); +late final _sel_multipleThreadsEnabled = + objc.registerName("multipleThreadsEnabled"); +late final _sel_addRunLoop_ = objc.registerName("addRunLoop:"); +final _objc_msgSend_241 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_removeRunLoop_ = objc.registerName("removeRunLoop:"); +late final _sel_runInNewThread = objc.registerName("runInNewThread"); +late final _sel_remoteObjects = objc.registerName("remoteObjects"); +late final _sel_localObjects = objc.registerName("localObjects"); +late final _sel_dispatchWithComponents_ = + objc.registerName("dispatchWithComponents:"); +final _objc_msgSend_242 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_addConnection_toRunLoop_forMode_ = + objc.registerName("addConnection:toRunLoop:forMode:"); +final _objc_msgSend_243 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeConnection_fromRunLoop_forMode_ = + objc.registerName("removeConnection:fromRunLoop:forMode:"); +late final _sel_addPort_forMode_ = objc.registerName("addPort:forMode:"); +final _objc_msgSend_244 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removePort_forMode_ = objc.registerName("removePort:forMode:"); +late final _sel_limitDateForMode_ = objc.registerName("limitDateForMode:"); +late final _sel_acceptInputForMode_beforeDate_ = + objc.registerName("acceptInputForMode:beforeDate:"); +final _objc_msgSend_245 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_run = objc.registerName("run"); +late final _sel_runUntilDate_ = objc.registerName("runUntilDate:"); +final _objc_msgSend_246 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_runMode_beforeDate_ = objc.registerName("runMode:beforeDate:"); +final _objc_msgSend_247 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_configureAsServer = objc.registerName("configureAsServer"); +void _ObjCBlock_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, +) => + block.ref.target + .cast>() + .asFunction()(); +final _ObjCBlock_ffiVoid_closureRegistry = {}; +int _ObjCBlock_ffiVoid_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_registerClosure(void Function() fn) { + final id = ++_ObjCBlock_ffiVoid_closureRegistryIndex; + _ObjCBlock_ffiVoid_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_closureTrampoline( + ffi.Pointer block, +) => + _ObjCBlock_ffiVoid_closureRegistry[block.ref.target.address]!(); + +class ObjCBlock_ffiVoid extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) { + return ObjCBlock_ffiVoid._(pointer, retain: retain, release: release); } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid.fromFunctionPointer( + ffi.Pointer> ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer)>( + _ObjCBlock_ffiVoid_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid.fromFunction(void Function() fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer)>( + _ObjCBlock_ffiVoid_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_registerClosure(() => fn()))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid.listener(void Function() fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_registerClosure(() => fn()))); + static ffi.NativeCallable)>? + _dartFuncListenerTrampoline; + + void call() => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block)>>() + .asFunction)>()( + pointer, + ); } -class NSFormatter extends NSObject { - NSFormatter._(ffi.Pointer id, SwiftLibrary lib, +late final _sel_performInModes_block_ = + objc.registerName("performInModes:block:"); +final _objc_msgSend_248 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_performBlock_ = objc.registerName("performBlock:"); +final _objc_msgSend_249 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_performSelector_target_argument_order_modes_ = + objc.registerName("performSelector:target:argument:order:modes:"); +final _objc_msgSend_250 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_cancelPerformSelector_target_argument_ = + objc.registerName("cancelPerformSelector:target:argument:"); +final _objc_msgSend_251 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_cancelPerformSelectorsWithTarget_ = + objc.registerName("cancelPerformSelectorsWithTarget:"); + +class NSFileHandle extends objc.NSObject { + NSFileHandle._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSFileHandle] that points to the same underlying object as [other]. + NSFileHandle.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSFileHandle] that wraps the given raw object pointer. + NSFileHandle.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : this._(other, retain: retain, release: release); - /// Returns a [NSFormatter] that points to the same underlying object as [other]. - static NSFormatter castFrom(T other) { - return NSFormatter._(other._id, other._lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSFileHandle]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSFileHandle); } - /// Returns a [NSFormatter] that wraps the given raw object pointer. - static NSFormatter castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSFormatter._(other, lib, retain: retain, release: release); + objc.NSData get availableData { + final _ret = _objc_msgSend_104(this.pointer, _sel_availableData); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSFormatter]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSFormatter1); + NSFileHandle initWithFileDescriptor_closeOnDealloc_(int fd, bool closeopt) { + final _ret = _objc_msgSend_252(this.pointer, + _sel_initWithFileDescriptor_closeOnDealloc_, fd, closeopt); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - NSString? stringForObjectValue_(NSObject? obj) { - final _ret = _lib._objc_msgSend_747( - _id, _lib._sel_stringForObjectValue_1, obj?._id ?? ffi.nullptr); + NSFileHandle? initWithCoder_(objc.NSCoder coder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, coder.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - NSAttributedString? attributedStringForObjectValue_withDefaultAttributes_( - NSObject obj, NSDictionary? attrs) { - final _ret = _lib._objc_msgSend_748( - _id, - _lib._sel_attributedStringForObjectValue_withDefaultAttributes_1, - obj._id, - attrs?._id ?? ffi.nullptr); + objc.NSData? readDataToEndOfFileAndReturnError_( + ffi.Pointer> error) { + final _ret = _objc_msgSend_253( + this.pointer, _sel_readDataToEndOfFileAndReturnError_, error); return _ret.address == 0 ? null - : NSAttributedString._(_ret, _lib, retain: true, release: true); + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - NSString? editingStringForObjectValue_(NSObject obj) { - final _ret = _lib._objc_msgSend_526( - _id, _lib._sel_editingStringForObjectValue_1, obj._id); + objc.NSData? readDataUpToLength_error_( + int length, ffi.Pointer> error) { + final _ret = _objc_msgSend_254( + this.pointer, _sel_readDataUpToLength_error_, length, error); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - bool getObjectValue_forString_errorDescription_( - ffi.Pointer> obj, - NSString string, - ffi.Pointer> error) { - return _lib._objc_msgSend_749( - _id, - _lib._sel_getObjectValue_forString_errorDescription_1, - obj, - string._id, - error); + bool writeData_error_( + objc.NSData data, ffi.Pointer> error) { + return _objc_msgSend_255( + this.pointer, _sel_writeData_error_, data.pointer, error); } - bool isPartialStringValid_newEditingString_errorDescription_( - NSString partialString, - ffi.Pointer> newString, - ffi.Pointer> error) { - return _lib._objc_msgSend_750( - _id, - _lib._sel_isPartialStringValid_newEditingString_errorDescription_1, - partialString._id, - newString, - error); + bool getOffset_error_(ffi.Pointer offsetInFile, + ffi.Pointer> error) { + return _objc_msgSend_256( + this.pointer, _sel_getOffset_error_, offsetInFile, error); } - bool - isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_( - ffi.Pointer> partialStringPtr, - ffi.Pointer<_NSRange> proposedSelRangePtr, - NSString origString, - _NSRange origSelRange, - ffi.Pointer> error) { - return _lib._objc_msgSend_751( - _id, - _lib._sel_isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_1, - partialStringPtr, - proposedSelRangePtr, - origString._id, - origSelRange, - error); + bool seekToEndReturningOffset_error_( + ffi.Pointer offsetInFile, + ffi.Pointer> error) { + return _objc_msgSend_256(this.pointer, _sel_seekToEndReturningOffset_error_, + offsetInFile, error); } - @override - NSFormatter init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSFormatter._(_ret, _lib, retain: true, release: true); + bool seekToOffset_error_( + int offset, ffi.Pointer> error) { + return _objc_msgSend_257( + this.pointer, _sel_seekToOffset_error_, offset, error); } - static NSFormatter new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSFormatter1, _lib._sel_new1); - return NSFormatter._(_ret, _lib, retain: false, release: true); + bool truncateAtOffset_error_( + int offset, ffi.Pointer> error) { + return _objc_msgSend_257( + this.pointer, _sel_truncateAtOffset_error_, offset, error); } - static NSFormatter allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSFormatter1, _lib._sel_allocWithZone_1, zone); - return NSFormatter._(_ret, _lib, retain: false, release: true); + bool synchronizeAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_8( + this.pointer, _sel_synchronizeAndReturnError_, error); } - static NSFormatter alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFormatter1, _lib._sel_alloc1); - return NSFormatter._(_ret, _lib, retain: false, release: true); + bool closeAndReturnError_(ffi.Pointer> error) { + return _objc_msgSend_8(this.pointer, _sel_closeAndReturnError_, error); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSFormatter1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static NSFileHandle getFileHandleWithStandardInput() { + final _ret = _objc_msgSend_258( + _class_NSFileHandle, _sel_fileHandleWithStandardInput); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSFormatter1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static NSFileHandle getFileHandleWithStandardOutput() { + final _ret = _objc_msgSend_258( + _class_NSFileHandle, _sel_fileHandleWithStandardOutput); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSFormatter1, _lib._sel_accessInstanceVariablesDirectly1); + static NSFileHandle getFileHandleWithStandardError() { + final _ret = _objc_msgSend_258( + _class_NSFileHandle, _sel_fileHandleWithStandardError); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSFormatter1, _lib._sel_useStoredAccessor1); + static NSFileHandle getFileHandleWithNullDevice() { + final _ret = + _objc_msgSend_258(_class_NSFileHandle, _sel_fileHandleWithNullDevice); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSFormatter1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static NSFileHandle? fileHandleForReadingAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_2( + _class_NSFileHandle, _sel_fileHandleForReadingAtPath_, path.pointer); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSFormatter1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static NSFileHandle? fileHandleForWritingAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_2( + _class_NSFileHandle, _sel_fileHandleForWritingAtPath_, path.pointer); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSFormatter1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static NSFileHandle? fileHandleForUpdatingAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_2( + _class_NSFileHandle, _sel_fileHandleForUpdatingAtPath_, path.pointer); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSFormatter1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSFileHandle? fileHandleForReadingFromURL_error_( + objc.NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_259(_class_NSFileHandle, + _sel_fileHandleForReadingFromURL_error_, url.pointer, error); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSFormatter1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSFileHandle? fileHandleForWritingToURL_error_( + objc.NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_259(_class_NSFileHandle, + _sel_fileHandleForWritingToURL_error_, url.pointer, error); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } -} - -abstract class NSFormattingContext { - static const int NSFormattingContextUnknown = 0; - static const int NSFormattingContextDynamic = 1; - static const int NSFormattingContextStandalone = 2; - static const int NSFormattingContextListItem = 3; - static const int NSFormattingContextBeginningOfSentence = 4; - static const int NSFormattingContextMiddleOfSentence = 5; -} - -abstract class NSDateFormatterStyle { - static const int NSDateFormatterNoStyle = 0; - static const int NSDateFormatterShortStyle = 1; - static const int NSDateFormatterMediumStyle = 2; - static const int NSDateFormatterLongStyle = 3; - static const int NSDateFormatterFullStyle = 4; -} -abstract class NSDateFormatterBehavior { - static const int NSDateFormatterBehaviorDefault = 0; - static const int NSDateFormatterBehavior10_0 = 1000; - static const int NSDateFormatterBehavior10_4 = 1040; -} + static NSFileHandle? fileHandleForUpdatingURL_error_( + objc.NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_259(_class_NSFileHandle, + _sel_fileHandleForUpdatingURL_error_, url.pointer, error); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); + } -class NSCalendar extends NSObject { - NSCalendar._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + void readInBackgroundAndNotifyForModes_(objc.NSArray? modes) { + _objc_msgSend_260(this.pointer, _sel_readInBackgroundAndNotifyForModes_, + modes?.pointer ?? ffi.nullptr); + } - /// Returns a [NSCalendar] that points to the same underlying object as [other]. - static NSCalendar castFrom(T other) { - return NSCalendar._(other._id, other._lib, retain: true, release: true); + void readInBackgroundAndNotify() { + _objc_msgSend_82(this.pointer, _sel_readInBackgroundAndNotify); } - /// Returns a [NSCalendar] that wraps the given raw object pointer. - static NSCalendar castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCalendar._(other, lib, retain: retain, release: release); + void readToEndOfFileInBackgroundAndNotifyForModes_(objc.NSArray? modes) { + _objc_msgSend_260( + this.pointer, + _sel_readToEndOfFileInBackgroundAndNotifyForModes_, + modes?.pointer ?? ffi.nullptr); } - /// Returns whether [obj] is an instance of [NSCalendar]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSCalendar1); + void readToEndOfFileInBackgroundAndNotify() { + _objc_msgSend_82(this.pointer, _sel_readToEndOfFileInBackgroundAndNotify); } - static NSCalendar getCurrentCalendar(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_763( - _lib._class_NSCalendar1, _lib._sel_currentCalendar1); - return NSCalendar._(_ret, _lib, retain: true, release: true); + void acceptConnectionInBackgroundAndNotifyForModes_(objc.NSArray? modes) { + _objc_msgSend_260( + this.pointer, + _sel_acceptConnectionInBackgroundAndNotifyForModes_, + modes?.pointer ?? ffi.nullptr); } - static NSCalendar getAutoupdatingCurrentCalendar(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_763( - _lib._class_NSCalendar1, _lib._sel_autoupdatingCurrentCalendar1); - return NSCalendar._(_ret, _lib, retain: true, release: true); + void acceptConnectionInBackgroundAndNotify() { + _objc_msgSend_82(this.pointer, _sel_acceptConnectionInBackgroundAndNotify); } - static NSCalendar? calendarWithIdentifier_( - SwiftLibrary _lib, NSString calendarIdentifierConstant) { - final _ret = _lib._objc_msgSend_764(_lib._class_NSCalendar1, - _lib._sel_calendarWithIdentifier_1, calendarIdentifierConstant._id); - return _ret.address == 0 - ? null - : NSCalendar._(_ret, _lib, retain: true, release: true); + void waitForDataInBackgroundAndNotifyForModes_(objc.NSArray? modes) { + _objc_msgSend_260( + this.pointer, + _sel_waitForDataInBackgroundAndNotifyForModes_, + modes?.pointer ?? ffi.nullptr); } - @override - NSCalendar init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSCalendar._(_ret, _lib, retain: true, release: true); + void waitForDataInBackgroundAndNotify() { + _objc_msgSend_82(this.pointer, _sel_waitForDataInBackgroundAndNotify); } - NSObject? initWithCalendarIdentifier_(NSString ident) { - final _ret = _lib._objc_msgSend_38( - _id, _lib._sel_initWithCalendarIdentifier_1, ident._id); + ObjCBlock_ffiVoid_NSFileHandle? get readabilityHandler { + final _ret = _objc_msgSend_261(this.pointer, _sel_readabilityHandler); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : ObjCBlock_ffiVoid_NSFileHandle.castFromPointer(_ret, + retain: true, release: true); } - NSString get calendarIdentifier { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_calendarIdentifier1); - return NSString._(_ret, _lib, retain: true, release: true); + set readabilityHandler(ObjCBlock_ffiVoid_NSFileHandle? value) { + return _objc_msgSend_262(this.pointer, _sel_setReadabilityHandler_, + value?.pointer ?? ffi.nullptr); } - NSLocale? get locale { - final _ret = _lib._objc_msgSend_765(_id, _lib._sel_locale1); + ObjCBlock_ffiVoid_NSFileHandle? get writeabilityHandler { + final _ret = _objc_msgSend_261(this.pointer, _sel_writeabilityHandler); return _ret.address == 0 ? null - : NSLocale._(_ret, _lib, retain: true, release: true); + : ObjCBlock_ffiVoid_NSFileHandle.castFromPointer(_ret, + retain: true, release: true); + } + + set writeabilityHandler(ObjCBlock_ffiVoid_NSFileHandle? value) { + return _objc_msgSend_262(this.pointer, _sel_setWriteabilityHandler_, + value?.pointer ?? ffi.nullptr); } - set locale(NSLocale? value) { - return _lib._objc_msgSend_766( - _id, _lib._sel_setLocale_1, value?._id ?? ffi.nullptr); + NSFileHandle initWithFileDescriptor_(int fd) { + final _ret = + _objc_msgSend_263(this.pointer, _sel_initWithFileDescriptor_, fd); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - NSTimeZone get timeZone { - final _ret = _lib._objc_msgSend_179(_id, _lib._sel_timeZone1); - return NSTimeZone._(_ret, _lib, retain: true, release: true); + int get fileDescriptor { + return _objc_msgSend_264(this.pointer, _sel_fileDescriptor); } - set timeZone(NSTimeZone value) { - return _lib._objc_msgSend_180(_id, _lib._sel_setTimeZone_1, value._id); + objc.NSData readDataToEndOfFile() { + final _ret = _objc_msgSend_104(this.pointer, _sel_readDataToEndOfFile); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - int get firstWeekday { - return _lib._objc_msgSend_10(_id, _lib._sel_firstWeekday1); + objc.NSData readDataOfLength_(int length) { + final _ret = + _objc_msgSend_265(this.pointer, _sel_readDataOfLength_, length); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - set firstWeekday(int value) { - return _lib._objc_msgSend_516(_id, _lib._sel_setFirstWeekday_1, value); + void writeData_(objc.NSData data) { + _objc_msgSend_266(this.pointer, _sel_writeData_, data.pointer); } - int get minimumDaysInFirstWeek { - return _lib._objc_msgSend_10(_id, _lib._sel_minimumDaysInFirstWeek1); + int get offsetInFile { + return _objc_msgSend_267(this.pointer, _sel_offsetInFile); } - set minimumDaysInFirstWeek(int value) { - return _lib._objc_msgSend_516( - _id, _lib._sel_setMinimumDaysInFirstWeek_1, value); + int seekToEndOfFile() { + return _objc_msgSend_267(this.pointer, _sel_seekToEndOfFile); } - NSArray get eraSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_eraSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + void seekToFileOffset_(int offset) { + _objc_msgSend_268(this.pointer, _sel_seekToFileOffset_, offset); } - NSArray get longEraSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_longEraSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + void truncateFileAtOffset_(int offset) { + _objc_msgSend_268(this.pointer, _sel_truncateFileAtOffset_, offset); } - NSArray get monthSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_monthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + void synchronizeFile() { + _objc_msgSend_82(this.pointer, _sel_synchronizeFile); } - NSArray get shortMonthSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_shortMonthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + void closeFile() { + _objc_msgSend_82(this.pointer, _sel_closeFile); } - NSArray get veryShortMonthSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_veryShortMonthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + @override + NSFileHandle init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - NSArray get standaloneMonthSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_standaloneMonthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSFileHandle new1() { + final _ret = _objc_msgSend_40(_class_NSFileHandle, _sel_new); + return NSFileHandle.castFromPointer(_ret, retain: false, release: true); } - NSArray get shortStandaloneMonthSymbols { + static NSFileHandle allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_shortStandaloneMonthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + _objc_msgSend_47(_class_NSFileHandle, _sel_allocWithZone_, zone); + return NSFileHandle.castFromPointer(_ret, retain: false, release: true); } - NSArray get veryShortStandaloneMonthSymbols { - final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_veryShortStandaloneMonthSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSFileHandle alloc() { + final _ret = _objc_msgSend_40(_class_NSFileHandle, _sel_alloc); + return NSFileHandle.castFromPointer(_ret, retain: false, release: true); } - NSArray get weekdaySymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_weekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSFileHandle, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSArray get shortWeekdaySymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_shortWeekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSFileHandle, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSArray get veryShortWeekdaySymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_veryShortWeekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSFileHandle, _sel_accessInstanceVariablesDirectly); } - NSArray get standaloneWeekdaySymbols { - final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_standaloneWeekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSFileHandle, _sel_useStoredAccessor); } - NSArray get shortStandaloneWeekdaySymbols { - final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_shortStandaloneWeekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSFileHandle, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSArray get veryShortStandaloneWeekdaySymbols { - final _ret = _lib._objc_msgSend_85( - _id, _lib._sel_veryShortStandaloneWeekdaySymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSFileHandle, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSArray get quarterSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_quarterSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSFileHandle, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSFileHandle, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSFileHandle, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSFileHandle = objc.getClass("NSFileHandle"); +late final _sel_availableData = objc.registerName("availableData"); +late final _sel_initWithFileDescriptor_closeOnDealloc_ = + objc.registerName("initWithFileDescriptor:closeOnDealloc:"); +final _objc_msgSend_252 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Int, ffi.Bool)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int, bool)>(); +late final _sel_readDataToEndOfFileAndReturnError_ = + objc.registerName("readDataToEndOfFileAndReturnError:"); +final _objc_msgSend_253 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_readDataUpToLength_error_ = + objc.registerName("readDataUpToLength:error:"); +final _objc_msgSend_254 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_writeData_error_ = objc.registerName("writeData:error:"); +final _objc_msgSend_255 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_getOffset_error_ = objc.registerName("getOffset:error:"); +final _objc_msgSend_256 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_seekToEndReturningOffset_error_ = + objc.registerName("seekToEndReturningOffset:error:"); +late final _sel_seekToOffset_error_ = objc.registerName("seekToOffset:error:"); +final _objc_msgSend_257 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLongLong, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_truncateAtOffset_error_ = + objc.registerName("truncateAtOffset:error:"); +late final _sel_synchronizeAndReturnError_ = + objc.registerName("synchronizeAndReturnError:"); +late final _sel_closeAndReturnError_ = + objc.registerName("closeAndReturnError:"); +late final _sel_fileHandleWithStandardInput = + objc.registerName("fileHandleWithStandardInput"); +final _objc_msgSend_258 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_fileHandleWithStandardOutput = + objc.registerName("fileHandleWithStandardOutput"); +late final _sel_fileHandleWithStandardError = + objc.registerName("fileHandleWithStandardError"); +late final _sel_fileHandleWithNullDevice = + objc.registerName("fileHandleWithNullDevice"); +late final _sel_fileHandleForReadingAtPath_ = + objc.registerName("fileHandleForReadingAtPath:"); +late final _sel_fileHandleForWritingAtPath_ = + objc.registerName("fileHandleForWritingAtPath:"); +late final _sel_fileHandleForUpdatingAtPath_ = + objc.registerName("fileHandleForUpdatingAtPath:"); +late final _sel_fileHandleForReadingFromURL_error_ = + objc.registerName("fileHandleForReadingFromURL:error:"); +final _objc_msgSend_259 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_fileHandleForWritingToURL_error_ = + objc.registerName("fileHandleForWritingToURL:error:"); +late final _sel_fileHandleForUpdatingURL_error_ = + objc.registerName("fileHandleForUpdatingURL:error:"); +late final _sel_readInBackgroundAndNotifyForModes_ = + objc.registerName("readInBackgroundAndNotifyForModes:"); +final _objc_msgSend_260 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_readInBackgroundAndNotify = + objc.registerName("readInBackgroundAndNotify"); +late final _sel_readToEndOfFileInBackgroundAndNotifyForModes_ = + objc.registerName("readToEndOfFileInBackgroundAndNotifyForModes:"); +late final _sel_readToEndOfFileInBackgroundAndNotify = + objc.registerName("readToEndOfFileInBackgroundAndNotify"); +late final _sel_acceptConnectionInBackgroundAndNotifyForModes_ = + objc.registerName("acceptConnectionInBackgroundAndNotifyForModes:"); +late final _sel_acceptConnectionInBackgroundAndNotify = + objc.registerName("acceptConnectionInBackgroundAndNotify"); +late final _sel_waitForDataInBackgroundAndNotifyForModes_ = + objc.registerName("waitForDataInBackgroundAndNotifyForModes:"); +late final _sel_waitForDataInBackgroundAndNotify = + objc.registerName("waitForDataInBackgroundAndNotify"); +void _ObjCBlock_ffiVoid_NSFileHandle_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSFileHandle_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSFileHandle_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - NSArray get shortQuarterSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_shortQuarterSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry[block.ref.target.address]!( + arg0); - NSArray get standaloneQuarterSymbols { - final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_standaloneQuarterSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock_ffiVoid_NSFileHandle extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSFileHandle._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); - NSArray get shortStandaloneQuarterSymbols { - final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_shortStandaloneQuarterSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSFileHandle castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSFileHandle._(pointer, + retain: retain, release: release); } - NSString get AMSymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_AMSymbol1); - return NSString._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSFileHandle.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSFileHandle_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - NSString get PMSymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_PMSymbol1); - return NSString._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSFileHandle.fromFunction(void Function(NSFileHandle) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( + (ffi.Pointer arg0) => fn( + NSFileHandle.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; - void minimumRangeOfUnit_(ffi.Pointer<_NSRange> stret, int unit) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_767_stret( - stret, _id, _lib._sel_minimumRangeOfUnit_1, unit) - : stret.ref = - _lib._objc_msgSend_767(_id, _lib._sel_minimumRangeOfUnit_1, unit); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSFileHandle.listener(void Function(NSFileHandle) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( + (ffi.Pointer arg0) => fn( + NSFileHandle.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; - void maximumRangeOfUnit_(ffi.Pointer<_NSRange> stret, int unit) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_767_stret( - stret, _id, _lib._sel_maximumRangeOfUnit_1, unit) - : stret.ref = - _lib._objc_msgSend_767(_id, _lib._sel_maximumRangeOfUnit_1, unit); - } + void call(NSFileHandle arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(pointer, arg0.pointer); +} + +late final _sel_readabilityHandler = objc.registerName("readabilityHandler"); +final _objc_msgSend_261 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setReadabilityHandler_ = + objc.registerName("setReadabilityHandler:"); +final _objc_msgSend_262 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_writeabilityHandler = objc.registerName("writeabilityHandler"); +late final _sel_setWriteabilityHandler_ = + objc.registerName("setWriteabilityHandler:"); +late final _sel_initWithFileDescriptor_ = + objc.registerName("initWithFileDescriptor:"); +final _objc_msgSend_263 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_fileDescriptor = objc.registerName("fileDescriptor"); +final _objc_msgSend_264 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_readDataToEndOfFile = objc.registerName("readDataToEndOfFile"); +late final _sel_readDataOfLength_ = objc.registerName("readDataOfLength:"); +final _objc_msgSend_265 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_writeData_ = objc.registerName("writeData:"); +final _objc_msgSend_266 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_offsetInFile = objc.registerName("offsetInFile"); +final _objc_msgSend_267 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLongLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_seekToEndOfFile = objc.registerName("seekToEndOfFile"); +late final _sel_seekToFileOffset_ = objc.registerName("seekToFileOffset:"); +final _objc_msgSend_268 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLongLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_truncateFileAtOffset_ = + objc.registerName("truncateFileAtOffset:"); +late final _sel_synchronizeFile = objc.registerName("synchronizeFile"); +late final _sel_closeFile = objc.registerName("closeFile"); - void rangeOfUnit_inUnit_forDate_( - ffi.Pointer<_NSRange> stret, int smaller, int larger, NSDate date) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_768_stret(stret, _id, - _lib._sel_rangeOfUnit_inUnit_forDate_1, smaller, larger, date._id) - : stret.ref = _lib._objc_msgSend_768(_id, - _lib._sel_rangeOfUnit_inUnit_forDate_1, smaller, larger, date._id); +abstract class NSURLBookmarkCreationOptions { + static const int NSURLBookmarkCreationPreferFileIDResolution = 256; + static const int NSURLBookmarkCreationMinimalBookmark = 512; + static const int NSURLBookmarkCreationSuitableForBookmarkFile = 1024; + static const int NSURLBookmarkCreationWithSecurityScope = 2048; + static const int NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; + static const int NSURLBookmarkCreationWithoutImplicitSecurityScope = + 536870912; +} + +abstract class NSURLBookmarkResolutionOptions { + static const int NSURLBookmarkResolutionWithoutUI = 256; + static const int NSURLBookmarkResolutionWithoutMounting = 512; + static const int NSURLBookmarkResolutionWithSecurityScope = 1024; + static const int NSURLBookmarkResolutionWithoutImplicitStartAccessing = 32768; +} + +class NSFileManager extends objc.NSObject { + NSFileManager._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSFileManager] that points to the same underlying object as [other]. + NSFileManager.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSFileManager] that wraps the given raw object pointer. + NSFileManager.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSFileManager]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSFileManager); } - int ordinalityOfUnit_inUnit_forDate_(int smaller, int larger, NSDate date) { - return _lib._objc_msgSend_769(_id, - _lib._sel_ordinalityOfUnit_inUnit_forDate_1, smaller, larger, date._id); + static NSFileManager getDefaultManager() { + final _ret = _objc_msgSend_269(_class_NSFileManager, _sel_defaultManager); + return NSFileManager.castFromPointer(_ret, retain: true, release: true); } - bool rangeOfUnit_startDate_interval_forDate_( - int unit, - ffi.Pointer> datep, - ffi.Pointer tip, - NSDate date) { - return _lib._objc_msgSend_770( - _id, - _lib._sel_rangeOfUnit_startDate_interval_forDate_1, - unit, - datep, - tip, - date._id); + objc.NSArray? mountedVolumeURLsIncludingResourceValuesForKeys_options_( + objc.NSArray? propertyKeys, int options) { + final _ret = _objc_msgSend_270( + this.pointer, + _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_, + propertyKeys?.pointer ?? ffi.nullptr, + options); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSDate? dateFromComponents_(NSDateComponents comps) { - final _ret = - _lib._objc_msgSend_778(_id, _lib._sel_dateFromComponents_1, comps._id); + void unmountVolumeAtURL_options_completionHandler_( + objc.NSURL url, int mask, ObjCBlock_ffiVoid_NSError completionHandler) { + _objc_msgSend_271( + this.pointer, + _sel_unmountVolumeAtURL_options_completionHandler_, + url.pointer, + mask, + completionHandler.pointer); + } + + objc.NSArray? + contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_( + objc.NSURL url, + objc.NSArray? keys, + int mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_272( + this.pointer, + _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_, + url.pointer, + keys?.pointer ?? ffi.nullptr, + mask, + error); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSDateComponents components_fromDate_(int unitFlags, NSDate date) { - final _ret = _lib._objc_msgSend_779( - _id, _lib._sel_components_fromDate_1, unitFlags, date._id); - return NSDateComponents._(_ret, _lib, retain: true, release: true); + objc.NSArray URLsForDirectory_inDomains_(int directory, int domainMask) { + final _ret = _objc_msgSend_273( + this.pointer, _sel_URLsForDirectory_inDomains_, directory, domainMask); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSDate? dateByAddingComponents_toDate_options_( - NSDateComponents comps, NSDate date, int opts) { - final _ret = _lib._objc_msgSend_780( - _id, - _lib._sel_dateByAddingComponents_toDate_options_1, - comps._id, - date._id, - opts); + objc.NSURL? URLForDirectory_inDomain_appropriateForURL_create_error_( + int directory, + int domain, + objc.NSURL? url, + bool shouldCreate, + ffi.Pointer> error) { + final _ret = _objc_msgSend_274( + this.pointer, + _sel_URLForDirectory_inDomain_appropriateForURL_create_error_, + directory, + domain, + url?.pointer ?? ffi.nullptr, + shouldCreate, + error); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - NSDateComponents components_fromDate_toDate_options_( - int unitFlags, NSDate startingDate, NSDate resultDate, int opts) { - final _ret = _lib._objc_msgSend_781( - _id, - _lib._sel_components_fromDate_toDate_options_1, - unitFlags, - startingDate._id, - resultDate._id, - opts); - return NSDateComponents._(_ret, _lib, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void getEra_year_month_day_fromDate_( - ffi.Pointer eraValuePointer, - ffi.Pointer yearValuePointer, - ffi.Pointer monthValuePointer, - ffi.Pointer dayValuePointer, - NSDate date) { - _lib._objc_msgSend_782( - _id, - _lib._sel_getEra_year_month_day_fromDate_1, - eraValuePointer, - yearValuePointer, - monthValuePointer, - dayValuePointer, - date._id); + bool getRelationship_ofDirectoryAtURL_toItemAtURL_error_( + ffi.Pointer outRelationship, + objc.NSURL directoryURL, + objc.NSURL otherURL, + ffi.Pointer> error) { + return _objc_msgSend_275( + this.pointer, + _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_, + outRelationship, + directoryURL.pointer, + otherURL.pointer, + error); } - void getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_( - ffi.Pointer eraValuePointer, - ffi.Pointer yearValuePointer, - ffi.Pointer weekValuePointer, - ffi.Pointer weekdayValuePointer, - NSDate date) { - _lib._objc_msgSend_782( - _id, - _lib._sel_getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_1, - eraValuePointer, - yearValuePointer, - weekValuePointer, - weekdayValuePointer, - date._id); + bool getRelationship_ofDirectory_inDomain_toItemAtURL_error_( + ffi.Pointer outRelationship, + int directory, + int domainMask, + objc.NSURL url, + ffi.Pointer> error) { + return _objc_msgSend_276( + this.pointer, + _sel_getRelationship_ofDirectory_inDomain_toItemAtURL_error_, + outRelationship, + directory, + domainMask, + url.pointer, + error); } - void getHour_minute_second_nanosecond_fromDate_( - ffi.Pointer hourValuePointer, - ffi.Pointer minuteValuePointer, - ffi.Pointer secondValuePointer, - ffi.Pointer nanosecondValuePointer, - NSDate date) { - _lib._objc_msgSend_782( - _id, - _lib._sel_getHour_minute_second_nanosecond_fromDate_1, - hourValuePointer, - minuteValuePointer, - secondValuePointer, - nanosecondValuePointer, - date._id); + bool createDirectoryAtURL_withIntermediateDirectories_attributes_error_( + objc.NSURL url, + bool createIntermediates, + objc.NSDictionary? attributes, + ffi.Pointer> error) { + return _objc_msgSend_277( + this.pointer, + _sel_createDirectoryAtURL_withIntermediateDirectories_attributes_error_, + url.pointer, + createIntermediates, + attributes?.pointer ?? ffi.nullptr, + error); } - int component_fromDate_(int unit, NSDate date) { - return _lib._objc_msgSend_783( - _id, _lib._sel_component_fromDate_1, unit, date._id); + bool createSymbolicLinkAtURL_withDestinationURL_error_(objc.NSURL url, + objc.NSURL destURL, ffi.Pointer> error) { + return _objc_msgSend_278( + this.pointer, + _sel_createSymbolicLinkAtURL_withDestinationURL_error_, + url.pointer, + destURL.pointer, + error); } - NSDate? dateWithEra_year_month_day_hour_minute_second_nanosecond_( - int eraValue, - int yearValue, - int monthValue, - int dayValue, - int hourValue, - int minuteValue, - int secondValue, - int nanosecondValue) { - final _ret = _lib._objc_msgSend_784( - _id, - _lib._sel_dateWithEra_year_month_day_hour_minute_second_nanosecond_1, - eraValue, - yearValue, - monthValue, - dayValue, - hourValue, - minuteValue, - secondValue, - nanosecondValue); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSDate? - dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_( - int eraValue, - int yearValue, - int weekValue, - int weekdayValue, - int hourValue, - int minuteValue, - int secondValue, - int nanosecondValue) { - final _ret = _lib._objc_msgSend_784( - _id, - _lib._sel_dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_1, - eraValue, - yearValue, - weekValue, - weekdayValue, - hourValue, - minuteValue, - secondValue, - nanosecondValue); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } - NSDate startOfDayForDate_(NSDate date) { - final _ret = - _lib._objc_msgSend_168(_id, _lib._sel_startOfDayForDate_1, date._id); - return NSDate._(_ret, _lib, retain: true, release: true); + bool setAttributes_ofItemAtPath_error_(objc.NSDictionary attributes, + objc.NSString path, ffi.Pointer> error) { + return _objc_msgSend_279( + this.pointer, + _sel_setAttributes_ofItemAtPath_error_, + attributes.pointer, + path.pointer, + error); } - NSDateComponents componentsInTimeZone_fromDate_( - NSTimeZone timezone, NSDate date) { - final _ret = _lib._objc_msgSend_785( - _id, _lib._sel_componentsInTimeZone_fromDate_1, timezone._id, date._id); - return NSDateComponents._(_ret, _lib, retain: true, release: true); + bool createDirectoryAtPath_withIntermediateDirectories_attributes_error_( + objc.NSString path, + bool createIntermediates, + objc.NSDictionary? attributes, + ffi.Pointer> error) { + return _objc_msgSend_280( + this.pointer, + _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_, + path.pointer, + createIntermediates, + attributes?.pointer ?? ffi.nullptr, + error); } - int compareDate_toDate_toUnitGranularity_( - NSDate date1, NSDate date2, int unit) { - return _lib._objc_msgSend_786( - _id, - _lib._sel_compareDate_toDate_toUnitGranularity_1, - date1._id, - date2._id, - unit); + objc.NSArray? contentsOfDirectoryAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_281(this.pointer, + _sel_contentsOfDirectoryAtPath_error_, path.pointer, error); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool isDate_equalToDate_toUnitGranularity_( - NSDate date1, NSDate date2, int unit) { - return _lib._objc_msgSend_787( - _id, - _lib._sel_isDate_equalToDate_toUnitGranularity_1, - date1._id, - date2._id, - unit); + objc.NSArray? subpathsOfDirectoryAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_281(this.pointer, + _sel_subpathsOfDirectoryAtPath_error_, path.pointer, error); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool isDate_inSameDayAsDate_(NSDate date1, NSDate date2) { - return _lib._objc_msgSend_788( - _id, _lib._sel_isDate_inSameDayAsDate_1, date1._id, date2._id); + objc.NSDictionary? attributesOfItemAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_282( + this.pointer, _sel_attributesOfItemAtPath_error_, path.pointer, error); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - bool isDateInToday_(NSDate date) { - return _lib._objc_msgSend_170(_id, _lib._sel_isDateInToday_1, date._id); + objc.NSDictionary? attributesOfFileSystemForPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_282(this.pointer, + _sel_attributesOfFileSystemForPath_error_, path.pointer, error); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - bool isDateInYesterday_(NSDate date) { - return _lib._objc_msgSend_170(_id, _lib._sel_isDateInYesterday_1, date._id); + bool createSymbolicLinkAtPath_withDestinationPath_error_(objc.NSString path, + objc.NSString destPath, ffi.Pointer> error) { + return _objc_msgSend_283( + this.pointer, + _sel_createSymbolicLinkAtPath_withDestinationPath_error_, + path.pointer, + destPath.pointer, + error); } - bool isDateInTomorrow_(NSDate date) { - return _lib._objc_msgSend_170(_id, _lib._sel_isDateInTomorrow_1, date._id); + objc.NSString? destinationOfSymbolicLinkAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_284(this.pointer, + _sel_destinationOfSymbolicLinkAtPath_error_, path.pointer, error); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool isDateInWeekend_(NSDate date) { - return _lib._objc_msgSend_170(_id, _lib._sel_isDateInWeekend_1, date._id); + bool copyItemAtPath_toPath_error_(objc.NSString srcPath, + objc.NSString dstPath, ffi.Pointer> error) { + return _objc_msgSend_283(this.pointer, _sel_copyItemAtPath_toPath_error_, + srcPath.pointer, dstPath.pointer, error); } - bool rangeOfWeekendStartDate_interval_containingDate_( - ffi.Pointer> datep, - ffi.Pointer tip, - NSDate date) { - return _lib._objc_msgSend_789( - _id, - _lib._sel_rangeOfWeekendStartDate_interval_containingDate_1, - datep, - tip, - date._id); + bool moveItemAtPath_toPath_error_(objc.NSString srcPath, + objc.NSString dstPath, ffi.Pointer> error) { + return _objc_msgSend_283(this.pointer, _sel_moveItemAtPath_toPath_error_, + srcPath.pointer, dstPath.pointer, error); } - bool nextWeekendStartDate_interval_options_afterDate_( - ffi.Pointer> datep, - ffi.Pointer tip, - int options, - NSDate date) { - return _lib._objc_msgSend_790( - _id, - _lib._sel_nextWeekendStartDate_interval_options_afterDate_1, - datep, - tip, - options, - date._id); + bool linkItemAtPath_toPath_error_(objc.NSString srcPath, + objc.NSString dstPath, ffi.Pointer> error) { + return _objc_msgSend_283(this.pointer, _sel_linkItemAtPath_toPath_error_, + srcPath.pointer, dstPath.pointer, error); } - NSDateComponents components_fromDateComponents_toDateComponents_options_( - int unitFlags, - NSDateComponents startingDateComp, - NSDateComponents resultDateComp, - int options) { - final _ret = _lib._objc_msgSend_791( - _id, - _lib._sel_components_fromDateComponents_toDateComponents_options_1, - unitFlags, - startingDateComp._id, - resultDateComp._id, - options); - return NSDateComponents._(_ret, _lib, retain: true, release: true); + bool removeItemAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + return _objc_msgSend_285( + this.pointer, _sel_removeItemAtPath_error_, path.pointer, error); + } + + bool copyItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, + ffi.Pointer> error) { + return _objc_msgSend_278(this.pointer, _sel_copyItemAtURL_toURL_error_, + srcURL.pointer, dstURL.pointer, error); } - NSDate? dateByAddingUnit_value_toDate_options_( - int unit, int value, NSDate date, int options) { - final _ret = _lib._objc_msgSend_792( - _id, - _lib._sel_dateByAddingUnit_value_toDate_options_1, - unit, - value, - date._id, - options); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + bool moveItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, + ffi.Pointer> error) { + return _objc_msgSend_278(this.pointer, _sel_moveItemAtURL_toURL_error_, + srcURL.pointer, dstURL.pointer, error); } - void enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_( - NSDate start, - NSDateComponents comps, - int opts, - ObjCBlock_ffiVoid_NSDate_bool_bool block) { - _lib._objc_msgSend_793( - _id, - _lib._sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_1, - start._id, - comps._id, - opts, - block._id); + bool linkItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, + ffi.Pointer> error) { + return _objc_msgSend_278(this.pointer, _sel_linkItemAtURL_toURL_error_, + srcURL.pointer, dstURL.pointer, error); } - NSDate? nextDateAfterDate_matchingComponents_options_( - NSDate date, NSDateComponents comps, int options) { - final _ret = _lib._objc_msgSend_794( - _id, - _lib._sel_nextDateAfterDate_matchingComponents_options_1, - date._id, - comps._id, - options); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + bool removeItemAtURL_error_( + objc.NSURL URL, ffi.Pointer> error) { + return _objc_msgSend_286( + this.pointer, _sel_removeItemAtURL_error_, URL.pointer, error); } - NSDate? nextDateAfterDate_matchingUnit_value_options_( - NSDate date, int unit, int value, int options) { - final _ret = _lib._objc_msgSend_795( - _id, - _lib._sel_nextDateAfterDate_matchingUnit_value_options_1, - date._id, - unit, - value, - options); + bool trashItemAtURL_resultingItemURL_error_( + objc.NSURL url, + ffi.Pointer> outResultingURL, + ffi.Pointer> error) { + return _objc_msgSend_287( + this.pointer, + _sel_trashItemAtURL_resultingItemURL_error_, + url.pointer, + outResultingURL, + error); + } + + objc.NSDictionary? fileAttributesAtPath_traverseLink_( + objc.NSString path, bool yorn) { + final _ret = _objc_msgSend_288(this.pointer, + _sel_fileAttributesAtPath_traverseLink_, path.pointer, yorn); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSDate? nextDateAfterDate_matchingHour_minute_second_options_(NSDate date, - int hourValue, int minuteValue, int secondValue, int options) { - final _ret = _lib._objc_msgSend_796( - _id, - _lib._sel_nextDateAfterDate_matchingHour_minute_second_options_1, - date._id, - hourValue, - minuteValue, - secondValue, - options); + bool changeFileAttributes_atPath_( + objc.NSDictionary attributes, objc.NSString path) { + return _objc_msgSend_289(this.pointer, _sel_changeFileAttributes_atPath_, + attributes.pointer, path.pointer); + } + + objc.NSArray? directoryContentsAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_290( + this.pointer, _sel_directoryContentsAtPath_, path.pointer); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSDate? dateBySettingUnit_value_ofDate_options_( - int unit, int v, NSDate date, int opts) { - final _ret = _lib._objc_msgSend_792( - _id, - _lib._sel_dateBySettingUnit_value_ofDate_options_1, - unit, - v, - date._id, - opts); + objc.NSDictionary? fileSystemAttributesAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_291( + this.pointer, _sel_fileSystemAttributesAtPath_, path.pointer); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSDate? dateBySettingHour_minute_second_ofDate_options_( - int h, int m, int s, NSDate date, int opts) { - final _ret = _lib._objc_msgSend_797( - _id, - _lib._sel_dateBySettingHour_minute_second_ofDate_options_1, - h, - m, - s, - date._id, - opts); + objc.NSString? pathContentOfSymbolicLinkAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_pathContentOfSymbolicLinkAtPath_, path.pointer); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool date_matchesComponents_(NSDate date, NSDateComponents components) { - return _lib._objc_msgSend_798( - _id, _lib._sel_date_matchesComponents_1, date._id, components._id); + bool createSymbolicLinkAtPath_pathContent_( + objc.NSString path, objc.NSString otherpath) { + return _objc_msgSend_292( + this.pointer, + _sel_createSymbolicLinkAtPath_pathContent_, + path.pointer, + otherpath.pointer); } - static NSCalendar new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSCalendar1, _lib._sel_new1); - return NSCalendar._(_ret, _lib, retain: false, release: true); + bool createDirectoryAtPath_attributes_( + objc.NSString path, objc.NSDictionary attributes) { + return _objc_msgSend_293( + this.pointer, + _sel_createDirectoryAtPath_attributes_, + path.pointer, + attributes.pointer); } - static NSCalendar allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSCalendar1, _lib._sel_allocWithZone_1, zone); - return NSCalendar._(_ret, _lib, retain: false, release: true); + bool linkPath_toPath_handler_( + objc.NSString src, objc.NSString dest, objc.NSObject? handler) { + return _objc_msgSend_294(this.pointer, _sel_linkPath_toPath_handler_, + src.pointer, dest.pointer, handler?.pointer ?? ffi.nullptr); } - static NSCalendar alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCalendar1, _lib._sel_alloc1); - return NSCalendar._(_ret, _lib, retain: false, release: true); + bool copyPath_toPath_handler_( + objc.NSString src, objc.NSString dest, objc.NSObject? handler) { + return _objc_msgSend_294(this.pointer, _sel_copyPath_toPath_handler_, + src.pointer, dest.pointer, handler?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSCalendar1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + bool movePath_toPath_handler_( + objc.NSString src, objc.NSString dest, objc.NSObject? handler) { + return _objc_msgSend_294(this.pointer, _sel_movePath_toPath_handler_, + src.pointer, dest.pointer, handler?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSCalendar1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + bool removeFileAtPath_handler_(objc.NSString path, objc.NSObject? handler) { + return _objc_msgSend_295(this.pointer, _sel_removeFileAtPath_handler_, + path.pointer, handler?.pointer ?? ffi.nullptr); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSCalendar1, _lib._sel_accessInstanceVariablesDirectly1); + objc.NSString get currentDirectoryPath { + final _ret = _objc_msgSend_12(this.pointer, _sel_currentDirectoryPath); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSCalendar1, _lib._sel_useStoredAccessor1); + bool changeCurrentDirectoryPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_changeCurrentDirectoryPath_, path.pointer); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSCalendar1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + bool fileExistsAtPath_(objc.NSString path) { + return _objc_msgSend_51(this.pointer, _sel_fileExistsAtPath_, path.pointer); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSCalendar1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + bool fileExistsAtPath_isDirectory_( + objc.NSString path, ffi.Pointer isDirectory) { + return _objc_msgSend_296(this.pointer, _sel_fileExistsAtPath_isDirectory_, + path.pointer, isDirectory); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSCalendar1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + bool isReadableFileAtPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_isReadableFileAtPath_, path.pointer); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSCalendar1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool isWritableFileAtPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_isWritableFileAtPath_, path.pointer); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSCalendar1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + bool isExecutableFileAtPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_isExecutableFileAtPath_, path.pointer); } -} - -abstract class NSCalendarUnit { - static const int NSCalendarUnitEra = 2; - static const int NSCalendarUnitYear = 4; - static const int NSCalendarUnitMonth = 8; - static const int NSCalendarUnitDay = 16; - static const int NSCalendarUnitHour = 32; - static const int NSCalendarUnitMinute = 64; - static const int NSCalendarUnitSecond = 128; - static const int NSCalendarUnitWeekday = 512; - static const int NSCalendarUnitWeekdayOrdinal = 1024; - static const int NSCalendarUnitQuarter = 2048; - static const int NSCalendarUnitWeekOfMonth = 4096; - static const int NSCalendarUnitWeekOfYear = 8192; - static const int NSCalendarUnitYearForWeekOfYear = 16384; - static const int NSCalendarUnitNanosecond = 32768; - static const int NSCalendarUnitCalendar = 1048576; - static const int NSCalendarUnitTimeZone = 2097152; - static const int NSEraCalendarUnit = 2; - static const int NSYearCalendarUnit = 4; - static const int NSMonthCalendarUnit = 8; - static const int NSDayCalendarUnit = 16; - static const int NSHourCalendarUnit = 32; - static const int NSMinuteCalendarUnit = 64; - static const int NSSecondCalendarUnit = 128; - static const int NSWeekCalendarUnit = 256; - static const int NSWeekdayCalendarUnit = 512; - static const int NSWeekdayOrdinalCalendarUnit = 1024; - static const int NSQuarterCalendarUnit = 2048; - static const int NSWeekOfMonthCalendarUnit = 4096; - static const int NSWeekOfYearCalendarUnit = 8192; - static const int NSYearForWeekOfYearCalendarUnit = 16384; - static const int NSCalendarCalendarUnit = 1048576; - static const int NSTimeZoneCalendarUnit = 2097152; -} - -class NSDateComponents extends NSObject { - NSDateComponents._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSDateComponents] that points to the same underlying object as [other]. - static NSDateComponents castFrom(T other) { - return NSDateComponents._(other._id, other._lib, - retain: true, release: true); + bool isDeletableFileAtPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_isDeletableFileAtPath_, path.pointer); } - /// Returns a [NSDateComponents] that wraps the given raw object pointer. - static NSDateComponents castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDateComponents._(other, lib, retain: retain, release: release); + bool contentsEqualAtPath_andPath_(objc.NSString path1, objc.NSString path2) { + return _objc_msgSend_292(this.pointer, _sel_contentsEqualAtPath_andPath_, + path1.pointer, path2.pointer); } - /// Returns whether [obj] is an instance of [NSDateComponents]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSDateComponents1); + objc.NSString displayNameAtPath_(objc.NSString path) { + final _ret = + _objc_msgSend_297(this.pointer, _sel_displayNameAtPath_, path.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSCalendar? get calendar { - final _ret = _lib._objc_msgSend_771(_id, _lib._sel_calendar1); + objc.NSArray? componentsToDisplayForPath_(objc.NSString path) { + final _ret = _objc_msgSend_290( + this.pointer, _sel_componentsToDisplayForPath_, path.pointer); return _ret.address == 0 ? null - : NSCalendar._(_ret, _lib, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set calendar(NSCalendar? value) { - return _lib._objc_msgSend_772( - _id, _lib._sel_setCalendar_1, value?._id ?? ffi.nullptr); + objc.NSObject? enumeratorAtPath_(objc.NSString path) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_enumeratorAtPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSTimeZone? get timeZone { - final _ret = _lib._objc_msgSend_773(_id, _lib._sel_timeZone1); + objc.NSObject? + enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_( + objc.NSURL url, + objc.NSArray? keys, + int mask, + ObjCBlock_bool_NSURL_NSError? handler) { + final _ret = _objc_msgSend_298( + this.pointer, + _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_, + url.pointer, + keys?.pointer ?? ffi.nullptr, + mask, + handler?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSTimeZone._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set timeZone(NSTimeZone? value) { - return _lib._objc_msgSend_774( - _id, _lib._sel_setTimeZone_1, value?._id ?? ffi.nullptr); + objc.NSArray? subpathsAtPath_(objc.NSString path) { + final _ret = + _objc_msgSend_290(this.pointer, _sel_subpathsAtPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int get era { - return _lib._objc_msgSend_83(_id, _lib._sel_era1); + objc.NSData? contentsAtPath_(objc.NSString path) { + final _ret = + _objc_msgSend_299(this.pointer, _sel_contentsAtPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - set era(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setEra_1, value); + bool createFileAtPath_contents_attributes_( + objc.NSString path, objc.NSData? data, objc.NSDictionary? attr) { + return _objc_msgSend_300( + this.pointer, + _sel_createFileAtPath_contents_attributes_, + path.pointer, + data?.pointer ?? ffi.nullptr, + attr?.pointer ?? ffi.nullptr); } - int get year { - return _lib._objc_msgSend_83(_id, _lib._sel_year1); + ffi.Pointer fileSystemRepresentationWithPath_(objc.NSString path) { + return _objc_msgSend_301( + this.pointer, _sel_fileSystemRepresentationWithPath_, path.pointer); } - set year(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setYear_1, value); + objc.NSString stringWithFileSystemRepresentation_length_( + ffi.Pointer str, int len) { + final _ret = _objc_msgSend_302(this.pointer, + _sel_stringWithFileSystemRepresentation_length_, str, len); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int get month { - return _lib._objc_msgSend_83(_id, _lib._sel_month1); + bool + replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_( + objc.NSURL originalItemURL, + objc.NSURL newItemURL, + objc.NSString? backupItemName, + int options, + ffi.Pointer> resultingURL, + ffi.Pointer> error) { + return _objc_msgSend_303( + this.pointer, + _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_, + originalItemURL.pointer, + newItemURL.pointer, + backupItemName?.pointer ?? ffi.nullptr, + options, + resultingURL, + error); } - set month(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setMonth_1, value); + bool setUbiquitous_itemAtURL_destinationURL_error_( + bool flag, + objc.NSURL url, + objc.NSURL destinationURL, + ffi.Pointer> error) { + return _objc_msgSend_304( + this.pointer, + _sel_setUbiquitous_itemAtURL_destinationURL_error_, + flag, + url.pointer, + destinationURL.pointer, + error); } - int get day { - return _lib._objc_msgSend_83(_id, _lib._sel_day1); + bool isUbiquitousItemAtURL_(objc.NSURL url) { + return _objc_msgSend_305( + this.pointer, _sel_isUbiquitousItemAtURL_, url.pointer); } - set day(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setDay_1, value); + bool startDownloadingUbiquitousItemAtURL_error_( + objc.NSURL url, ffi.Pointer> error) { + return _objc_msgSend_286(this.pointer, + _sel_startDownloadingUbiquitousItemAtURL_error_, url.pointer, error); } - int get hour { - return _lib._objc_msgSend_83(_id, _lib._sel_hour1); + bool evictUbiquitousItemAtURL_error_( + objc.NSURL url, ffi.Pointer> error) { + return _objc_msgSend_286( + this.pointer, _sel_evictUbiquitousItemAtURL_error_, url.pointer, error); } - set hour(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setHour_1, value); + objc.NSURL? URLForUbiquityContainerIdentifier_( + objc.NSString? containerIdentifier) { + final _ret = _objc_msgSend_306( + this.pointer, + _sel_URLForUbiquityContainerIdentifier_, + containerIdentifier?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - int get minute { - return _lib._objc_msgSend_83(_id, _lib._sel_minute1); + objc.NSURL? URLForPublishingUbiquitousItemAtURL_expirationDate_error_( + objc.NSURL url, + ffi.Pointer> outDate, + ffi.Pointer> error) { + final _ret = _objc_msgSend_307( + this.pointer, + _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_, + url.pointer, + outDate, + error); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - set minute(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setMinute_1, value); + objc.NSObject? get ubiquityIdentityToken { + final _ret = _objc_msgSend_66(this.pointer, _sel_ubiquityIdentityToken); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get second { - return _lib._objc_msgSend_83(_id, _lib._sel_second1); + void getFileProviderServicesForItemAtURL_completionHandler_(objc.NSURL url, + ObjCBlock_ffiVoid_NSDictionary_NSError completionHandler) { + _objc_msgSend_308( + this.pointer, + _sel_getFileProviderServicesForItemAtURL_completionHandler_, + url.pointer, + completionHandler.pointer); } - set second(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setSecond_1, value); + objc.NSURL? containerURLForSecurityApplicationGroupIdentifier_( + objc.NSString groupIdentifier) { + final _ret = _objc_msgSend_11( + this.pointer, + _sel_containerURLForSecurityApplicationGroupIdentifier_, + groupIdentifier.pointer); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - int get nanosecond { - return _lib._objc_msgSend_83(_id, _lib._sel_nanosecond1); + objc.NSURL get homeDirectoryForCurrentUser { + final _ret = + _objc_msgSend_9(this.pointer, _sel_homeDirectoryForCurrentUser); + return objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - set nanosecond(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setNanosecond_1, value); + objc.NSURL get temporaryDirectory { + final _ret = _objc_msgSend_9(this.pointer, _sel_temporaryDirectory); + return objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - int get weekday { - return _lib._objc_msgSend_83(_id, _lib._sel_weekday1); + objc.NSURL? homeDirectoryForUser_(objc.NSString userName) { + final _ret = _objc_msgSend_11( + this.pointer, _sel_homeDirectoryForUser_, userName.pointer); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - set weekday(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setWeekday_1, value); + @override + NSFileManager init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSFileManager.castFromPointer(_ret, retain: true, release: true); } - int get weekdayOrdinal { - return _lib._objc_msgSend_83(_id, _lib._sel_weekdayOrdinal1); + static NSFileManager new1() { + final _ret = _objc_msgSend_40(_class_NSFileManager, _sel_new); + return NSFileManager.castFromPointer(_ret, retain: false, release: true); } - set weekdayOrdinal(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setWeekdayOrdinal_1, value); + static NSFileManager allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSFileManager, _sel_allocWithZone_, zone); + return NSFileManager.castFromPointer(_ret, retain: false, release: true); } - int get quarter { - return _lib._objc_msgSend_83(_id, _lib._sel_quarter1); + static NSFileManager alloc() { + final _ret = _objc_msgSend_40(_class_NSFileManager, _sel_alloc); + return NSFileManager.castFromPointer(_ret, retain: false, release: true); } - set quarter(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setQuarter_1, value); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSFileManager, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - int get weekOfMonth { - return _lib._objc_msgSend_83(_id, _lib._sel_weekOfMonth1); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSFileManager, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - set weekOfMonth(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setWeekOfMonth_1, value); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSFileManager, _sel_accessInstanceVariablesDirectly); } - int get weekOfYear { - return _lib._objc_msgSend_83(_id, _lib._sel_weekOfYear1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSFileManager, _sel_useStoredAccessor); } - set weekOfYear(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setWeekOfYear_1, value); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSFileManager, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - int get yearForWeekOfYear { - return _lib._objc_msgSend_83(_id, _lib._sel_yearForWeekOfYear1); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSFileManager, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - set yearForWeekOfYear(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setYearForWeekOfYear_1, value); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSFileManager, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - bool get leapMonth { - return _lib._objc_msgSend_12(_id, _lib._sel_isLeapMonth1); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSFileManager, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set leapMonth(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setLeapMonth_1, value); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSFileManager, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - NSDate? get date { - final _ret = _lib._objc_msgSend_183(_id, _lib._sel_date1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +late final _class_NSFileManager = objc.getClass("NSFileManager"); +late final _sel_defaultManager = objc.registerName("defaultManager"); +final _objc_msgSend_269 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int week() { - return _lib._objc_msgSend_83(_id, _lib._sel_week1); - } +abstract class NSVolumeEnumerationOptions { + static const int NSVolumeEnumerationSkipHiddenVolumes = 2; + static const int NSVolumeEnumerationProduceFileReferenceURLs = 4; +} - void setWeek_(int v) { - _lib._objc_msgSend_423(_id, _lib._sel_setWeek_1, v); - } +late final _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_ = objc + .registerName("mountedVolumeURLsIncludingResourceValuesForKeys:options:"); +final _objc_msgSend_270 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); - void setValue_forComponent_(int value, int unit) { - _lib._objc_msgSend_775(_id, _lib._sel_setValue_forComponent_1, value, unit); - } +abstract class NSFileManagerUnmountOptions { + static const int NSFileManagerUnmountAllPartitionsAndEjectDisk = 1; + static const int NSFileManagerUnmountWithoutUI = 2; +} - int valueForComponent_(int unit) { - return _lib._objc_msgSend_776(_id, _lib._sel_valueForComponent_1, unit); - } +void _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSError_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSError_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - bool get validDate { - return _lib._objc_msgSend_12(_id, _lib._sel_isValidDate1); - } +void _ObjCBlock_ffiVoid_NSError_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSError_closureRegistry[block.ref.target.address]!(arg0); - bool isValidDateInCalendar_(NSCalendar calendar) { - return _lib._objc_msgSend_777( - _id, _lib._sel_isValidDateInCalendar_1, calendar._id); - } +class ObjCBlock_ffiVoid_NSError extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSError._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); - @override - NSDateComponents init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSDateComponents._(_ret, _lib, retain: true, release: true); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSError._(pointer, + retain: retain, release: release); } - static NSDateComponents new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDateComponents1, _lib._sel_new1); - return NSDateComponents._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSError.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - static NSDateComponents allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSDateComponents1, _lib._sel_allocWithZone_1, zone); - return NSDateComponents._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSError.fromFunction(void Function(objc.NSError?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSError_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSError.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSError.listener(void Function(objc.NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSError_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSError.castFromPointer(arg0, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(objc.NSError? arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr); +} + +late final _sel_unmountVolumeAtURL_options_completionHandler_ = + objc.registerName("unmountVolumeAtURL:options:completionHandler:"); +final _objc_msgSend_271 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + +abstract class NSDirectoryEnumerationOptions { + static const int NSDirectoryEnumerationSkipsSubdirectoryDescendants = 1; + static const int NSDirectoryEnumerationSkipsPackageDescendants = 2; + static const int NSDirectoryEnumerationSkipsHiddenFiles = 4; + static const int NSDirectoryEnumerationIncludesDirectoriesPostOrder = 8; + static const int NSDirectoryEnumerationProducesRelativePathURLs = 16; +} + +late final _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_ = + objc.registerName( + "contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:"); +final _objc_msgSend_272 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + +abstract class NSSearchPathDirectory { + static const int NSApplicationDirectory = 1; + static const int NSDemoApplicationDirectory = 2; + static const int NSDeveloperApplicationDirectory = 3; + static const int NSAdminApplicationDirectory = 4; + static const int NSLibraryDirectory = 5; + static const int NSDeveloperDirectory = 6; + static const int NSUserDirectory = 7; + static const int NSDocumentationDirectory = 8; + static const int NSDocumentDirectory = 9; + static const int NSCoreServiceDirectory = 10; + static const int NSAutosavedInformationDirectory = 11; + static const int NSDesktopDirectory = 12; + static const int NSCachesDirectory = 13; + static const int NSApplicationSupportDirectory = 14; + static const int NSDownloadsDirectory = 15; + static const int NSInputMethodsDirectory = 16; + static const int NSMoviesDirectory = 17; + static const int NSMusicDirectory = 18; + static const int NSPicturesDirectory = 19; + static const int NSPrinterDescriptionDirectory = 20; + static const int NSSharedPublicDirectory = 21; + static const int NSPreferencePanesDirectory = 22; + static const int NSApplicationScriptsDirectory = 23; + static const int NSItemReplacementDirectory = 99; + static const int NSAllApplicationsDirectory = 100; + static const int NSAllLibrariesDirectory = 101; + static const int NSTrashDirectory = 102; +} - static NSDateComponents alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDateComponents1, _lib._sel_alloc1); - return NSDateComponents._(_ret, _lib, retain: false, release: true); - } +abstract class NSSearchPathDomainMask { + static const int NSUserDomainMask = 1; + static const int NSLocalDomainMask = 2; + static const int NSNetworkDomainMask = 4; + static const int NSSystemDomainMask = 8; + static const int NSAllDomainsMask = 65535; +} - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSDateComponents1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } +late final _sel_URLsForDirectory_inDomains_ = + objc.registerName("URLsForDirectory:inDomains:"); +final _objc_msgSend_273 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, int)>(); +late final _sel_URLForDirectory_inDomain_appropriateForURL_create_error_ = objc + .registerName("URLForDirectory:inDomain:appropriateForURL:create:error:"); +final _objc_msgSend_274 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer, + ffi.Bool, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer, + bool, + ffi.Pointer>)>(); - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSDateComponents1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } +abstract class NSURLRelationship { + static const int NSURLRelationshipContains = 0; + static const int NSURLRelationshipSame = 1; + static const int NSURLRelationshipOther = 2; +} - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSDateComponents1, - _lib._sel_accessInstanceVariablesDirectly1); - } +late final _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_ = + objc.registerName("getRelationship:ofDirectoryAtURL:toItemAtURL:error:"); +final _objc_msgSend_275 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_getRelationship_ofDirectory_inDomain_toItemAtURL_error_ = objc + .registerName("getRelationship:ofDirectory:inDomain:toItemAtURL:error:"); +final _objc_msgSend_276 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_createDirectoryAtURL_withIntermediateDirectories_attributes_error_ = + objc.registerName( + "createDirectoryAtURL:withIntermediateDirectories:attributes:error:"); +final _objc_msgSend_277 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_createSymbolicLinkAtURL_withDestinationURL_error_ = + objc.registerName("createSymbolicLinkAtURL:withDestinationURL:error:"); +final _objc_msgSend_278 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_setAttributes_ofItemAtPath_error_ = + objc.registerName("setAttributes:ofItemAtPath:error:"); +final _objc_msgSend_279 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_ = + objc.registerName( + "createDirectoryAtPath:withIntermediateDirectories:attributes:error:"); +final _objc_msgSend_280 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_contentsOfDirectoryAtPath_error_ = + objc.registerName("contentsOfDirectoryAtPath:error:"); +final _objc_msgSend_281 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_subpathsOfDirectoryAtPath_error_ = + objc.registerName("subpathsOfDirectoryAtPath:error:"); +late final _sel_attributesOfItemAtPath_error_ = + objc.registerName("attributesOfItemAtPath:error:"); +final _objc_msgSend_282 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_attributesOfFileSystemForPath_error_ = + objc.registerName("attributesOfFileSystemForPath:error:"); +late final _sel_createSymbolicLinkAtPath_withDestinationPath_error_ = + objc.registerName("createSymbolicLinkAtPath:withDestinationPath:error:"); +final _objc_msgSend_283 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_destinationOfSymbolicLinkAtPath_error_ = + objc.registerName("destinationOfSymbolicLinkAtPath:error:"); +final _objc_msgSend_284 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_copyItemAtPath_toPath_error_ = + objc.registerName("copyItemAtPath:toPath:error:"); +late final _sel_moveItemAtPath_toPath_error_ = + objc.registerName("moveItemAtPath:toPath:error:"); +late final _sel_linkItemAtPath_toPath_error_ = + objc.registerName("linkItemAtPath:toPath:error:"); +late final _sel_removeItemAtPath_error_ = + objc.registerName("removeItemAtPath:error:"); +final _objc_msgSend_285 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_copyItemAtURL_toURL_error_ = + objc.registerName("copyItemAtURL:toURL:error:"); +late final _sel_moveItemAtURL_toURL_error_ = + objc.registerName("moveItemAtURL:toURL:error:"); +late final _sel_linkItemAtURL_toURL_error_ = + objc.registerName("linkItemAtURL:toURL:error:"); +late final _sel_removeItemAtURL_error_ = + objc.registerName("removeItemAtURL:error:"); +final _objc_msgSend_286 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_trashItemAtURL_resultingItemURL_error_ = + objc.registerName("trashItemAtURL:resultingItemURL:error:"); +final _objc_msgSend_287 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); +late final _sel_fileAttributesAtPath_traverseLink_ = + objc.registerName("fileAttributesAtPath:traverseLink:"); +final _objc_msgSend_288 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_changeFileAttributes_atPath_ = + objc.registerName("changeFileAttributes:atPath:"); +final _objc_msgSend_289 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_directoryContentsAtPath_ = + objc.registerName("directoryContentsAtPath:"); +final _objc_msgSend_290 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_fileSystemAttributesAtPath_ = + objc.registerName("fileSystemAttributesAtPath:"); +final _objc_msgSend_291 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_pathContentOfSymbolicLinkAtPath_ = + objc.registerName("pathContentOfSymbolicLinkAtPath:"); +late final _sel_createSymbolicLinkAtPath_pathContent_ = + objc.registerName("createSymbolicLinkAtPath:pathContent:"); +final _objc_msgSend_292 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_createDirectoryAtPath_attributes_ = + objc.registerName("createDirectoryAtPath:attributes:"); +final _objc_msgSend_293 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_linkPath_toPath_handler_ = + objc.registerName("linkPath:toPath:handler:"); +final _objc_msgSend_294 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_copyPath_toPath_handler_ = + objc.registerName("copyPath:toPath:handler:"); +late final _sel_movePath_toPath_handler_ = + objc.registerName("movePath:toPath:handler:"); +late final _sel_removeFileAtPath_handler_ = + objc.registerName("removeFileAtPath:handler:"); +final _objc_msgSend_295 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_currentDirectoryPath = + objc.registerName("currentDirectoryPath"); +late final _sel_changeCurrentDirectoryPath_ = + objc.registerName("changeCurrentDirectoryPath:"); +late final _sel_fileExistsAtPath_ = objc.registerName("fileExistsAtPath:"); +late final _sel_fileExistsAtPath_isDirectory_ = + objc.registerName("fileExistsAtPath:isDirectory:"); +final _objc_msgSend_296 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_isReadableFileAtPath_ = + objc.registerName("isReadableFileAtPath:"); +late final _sel_isWritableFileAtPath_ = + objc.registerName("isWritableFileAtPath:"); +late final _sel_isExecutableFileAtPath_ = + objc.registerName("isExecutableFileAtPath:"); +late final _sel_isDeletableFileAtPath_ = + objc.registerName("isDeletableFileAtPath:"); +late final _sel_contentsEqualAtPath_andPath_ = + objc.registerName("contentsEqualAtPath:andPath:"); +late final _sel_displayNameAtPath_ = objc.registerName("displayNameAtPath:"); +final _objc_msgSend_297 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_componentsToDisplayForPath_ = + objc.registerName("componentsToDisplayForPath:"); +late final _sel_enumeratorAtPath_ = objc.registerName("enumeratorAtPath:"); +bool _ObjCBlock_bool_NSURL_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_bool_NSURL_NSError_closureRegistry = , ffi.Pointer)>{}; +int _ObjCBlock_bool_NSURL_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_bool_NSURL_NSError_registerClosure( + bool Function(ffi.Pointer, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_bool_NSURL_NSError_closureRegistryIndex; + _ObjCBlock_bool_NSURL_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSDateComponents1, _lib._sel_useStoredAccessor1); - } +bool _ObjCBlock_bool_NSURL_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_bool_NSURL_NSError_closureRegistry[block.ref.target.address]!( + arg0, arg1); - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSDateComponents1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock_bool_NSURL_NSError extends objc.ObjCBlockBase { + ObjCBlock_bool_NSURL_NSError._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSDateComponents1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_bool_NSURL_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_bool_NSURL_NSError._(pointer, + retain: retain, release: release); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSDateComponents1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_NSURL_NSError.fromFunctionPointer( + ffi.Pointer arg0, ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_NSURL_NSError_fnPtrTrampoline, false) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSDateComponents1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_NSURL_NSError.fromFunction(bool Function(objc.NSURL, objc.NSError) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_NSURL_NSError_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_NSURL_NSError_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(objc.NSURL.castFromPointer(arg0, retain: true, release: true), objc.NSError.castFromPointer(arg1, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSDateComponents1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} + bool call(objc.NSURL arg0, objc.NSError arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1.pointer); +} + +late final _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_ = + objc.registerName( + "enumeratorAtURL:includingPropertiesForKeys:options:errorHandler:"); +final _objc_msgSend_298 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_subpathsAtPath_ = objc.registerName("subpathsAtPath:"); +late final _sel_contentsAtPath_ = objc.registerName("contentsAtPath:"); +final _objc_msgSend_299 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_createFileAtPath_contents_attributes_ = + objc.registerName("createFileAtPath:contents:attributes:"); +final _objc_msgSend_300 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_fileSystemRepresentationWithPath_ = + objc.registerName("fileSystemRepresentationWithPath:"); +final _objc_msgSend_301 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_stringWithFileSystemRepresentation_length_ = + objc.registerName("stringWithFileSystemRepresentation:length:"); +final _objc_msgSend_302 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); -abstract class NSCalendarOptions { - static const int NSCalendarWrapComponents = 1; - static const int NSCalendarMatchStrictly = 2; - static const int NSCalendarSearchBackwards = 4; - static const int NSCalendarMatchPreviousTimePreservingSmallerUnits = 256; - static const int NSCalendarMatchNextTimePreservingSmallerUnits = 512; - static const int NSCalendarMatchNextTime = 1024; - static const int NSCalendarMatchFirst = 4096; - static const int NSCalendarMatchLast = 8192; +abstract class NSFileManagerItemReplacementOptions { + static const int NSFileManagerItemReplacementUsingNewMetadataOnly = 1; + static const int NSFileManagerItemReplacementWithoutDeletingBackupItem = 2; } -void _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => +late final _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_ = + objc.registerName( + "replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error:"); +final _objc_msgSend_303 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>)>(); +late final _sel_setUbiquitous_itemAtURL_destinationURL_error_ = + objc.registerName("setUbiquitous:itemAtURL:destinationURL:error:"); +final _objc_msgSend_304 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_isUbiquitousItemAtURL_ = + objc.registerName("isUbiquitousItemAtURL:"); +final _objc_msgSend_305 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_startDownloadingUbiquitousItemAtURL_error_ = + objc.registerName("startDownloadingUbiquitousItemAtURL:error:"); +late final _sel_evictUbiquitousItemAtURL_error_ = + objc.registerName("evictUbiquitousItemAtURL:error:"); +late final _sel_URLForUbiquityContainerIdentifier_ = + objc.registerName("URLForUbiquityContainerIdentifier:"); +final _objc_msgSend_306 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_ = objc + .registerName("URLForPublishingUbiquitousItemAtURL:expirationDate:error:"); +final _objc_msgSend_307 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); +late final _sel_ubiquityIdentityToken = + objc.registerName("ubiquityIdentityToken"); +void _ObjCBlock_ffiVoid_NSDictionary_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>>() + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() .asFunction< - void Function(ffi.Pointer, bool, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry = , bool, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( - void Function(ffi.Pointer, bool, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry[id] = fn; + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry = , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); +void _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1); -class ObjCBlock_ffiVoid_NSDate_bool_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSDate_bool_bool._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, +class ObjCBlock_ffiVoid_NSDictionary_NSError extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSDictionary_NSError._(ffi.Pointer pointer, {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSDate_bool_bool castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSDate_bool_bool._(pointer, lib, + static ObjCBlock_ffiVoid_NSDictionary_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSDictionary_NSError._(pointer, retain: retain, release: release); } @@ -58992,25 +13432,21 @@ class ObjCBlock_ffiVoid_NSDate_bool_bool extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSDate_bool_bool.fromFunctionPointer( - SwiftLibrary lib, + ObjCBlock_ffiVoid_NSDictionary_NSError.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>> + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSError_fnPtrTrampoline) + .cast(), + ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. @@ -59018,23 +13454,19 @@ class ObjCBlock_ffiVoid_NSDate_bool_bool extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSDate_bool_bool.fromFunction( - SwiftLibrary lib, void Function(NSDate?, bool, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline) + ObjCBlock_ffiVoid_NSDictionary_NSError.fromFunction( + void Function(objc.NSDictionary?, objc.NSError?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline) .cast(), - _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSDate._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); + _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : objc.NSDictionary.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : objc.NSError.castFromPointer(arg1, retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -59046,1902 +13478,2608 @@ class ObjCBlock_ffiVoid_NSDate_bool_bool extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSDate_bool_bool.listener( - SwiftLibrary lib, void Function(NSDate?, bool, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline) + ObjCBlock_ffiVoid_NSDictionary_NSError.listener( + void Function(objc.NSDictionary?, objc.NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline) ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSDate._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : objc.NSDictionary.castFromPointer(arg0, + retain: true, release: true), + arg1.address == 0 ? null : objc.NSError.castFromPointer(arg1, retain: true, release: true))))); static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Bool, ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSDate? arg0, bool arg1, ffi.Pointer arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer, bool, ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1, arg2); -} + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; -class NSNumberFormatter extends NSFormatter { - NSNumberFormatter._(ffi.Pointer id, SwiftLibrary lib, + void call(objc.NSDictionary? arg0, objc.NSError? arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr, arg1?.pointer ?? ffi.nullptr); +} + +late final _sel_getFileProviderServicesForItemAtURL_completionHandler_ = + objc.registerName("getFileProviderServicesForItemAtURL:completionHandler:"); +final _objc_msgSend_308 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_containerURLForSecurityApplicationGroupIdentifier_ = + objc.registerName("containerURLForSecurityApplicationGroupIdentifier:"); +late final _sel_homeDirectoryForCurrentUser = + objc.registerName("homeDirectoryForCurrentUser"); +late final _sel_temporaryDirectory = objc.registerName("temporaryDirectory"); +late final _sel_homeDirectoryForUser_ = + objc.registerName("homeDirectoryForUser:"); + +class NSHTTPCookieStorage extends objc.NSObject { + NSHTTPCookieStorage._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSNumberFormatter] that points to the same underlying object as [other]. - static NSNumberFormatter castFrom(T other) { - return NSNumberFormatter._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSNumberFormatter] that wraps the given raw object pointer. - static NSNumberFormatter castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNumberFormatter._(other, lib, retain: retain, release: release); - } + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSNumberFormatter]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSNumberFormatter1); - } + /// Constructs a [NSHTTPCookieStorage] that points to the same underlying object as [other]. + NSHTTPCookieStorage.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - int get formattingContext { - return _lib._objc_msgSend_752(_id, _lib._sel_formattingContext1); - } + /// Constructs a [NSHTTPCookieStorage] that wraps the given raw object pointer. + NSHTTPCookieStorage.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - set formattingContext(int value) { - return _lib._objc_msgSend_753(_id, _lib._sel_setFormattingContext_1, value); + /// Returns whether [obj] is an instance of [NSHTTPCookieStorage]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSHTTPCookieStorage); } - bool getObjectValue_forString_range_error_( - ffi.Pointer> obj, - NSString string, - ffi.Pointer<_NSRange> rangep, - ffi.Pointer> error) { - return _lib._objc_msgSend_754( - _id, - _lib._sel_getObjectValue_forString_range_error_1, - obj, - string._id, - rangep, - error); + static NSHTTPCookieStorage getSharedHTTPCookieStorage() { + final _ret = _objc_msgSend_309( + _class_NSHTTPCookieStorage, _sel_sharedHTTPCookieStorage); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } - NSString? stringFromNumber_(NSNumber number) { - final _ret = - _lib._objc_msgSend_802(_id, _lib._sel_stringFromNumber_1, number._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( + objc.NSString identifier) { + final _ret = _objc_msgSend_310( + _class_NSHTTPCookieStorage, + _sel_sharedCookieStorageForGroupContainerIdentifier_, + identifier.pointer); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } - NSNumber? numberFromString_(NSString string) { - final _ret = - _lib._objc_msgSend_803(_id, _lib._sel_numberFromString_1, string._id); + objc.NSArray? get cookies { + final _ret = _objc_msgSend_69(this.pointer, _sel_cookies); return _ret.address == 0 ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSString localizedStringFromNumber_numberStyle_( - SwiftLibrary _lib, NSNumber num, int nstyle) { - final _ret = _lib._objc_msgSend_804(_lib._class_NSNumberFormatter1, - _lib._sel_localizedStringFromNumber_numberStyle_1, num._id, nstyle); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static int defaultFormatterBehavior(SwiftLibrary _lib) { - return _lib._objc_msgSend_805( - _lib._class_NSNumberFormatter1, _lib._sel_defaultFormatterBehavior1); - } - - static void setDefaultFormatterBehavior_(SwiftLibrary _lib, int behavior) { - _lib._objc_msgSend_806(_lib._class_NSNumberFormatter1, - _lib._sel_setDefaultFormatterBehavior_1, behavior); - } - - int get numberStyle { - return _lib._objc_msgSend_807(_id, _lib._sel_numberStyle1); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set numberStyle(int value) { - return _lib._objc_msgSend_808(_id, _lib._sel_setNumberStyle_1, value); - } - - NSLocale get locale { - final _ret = _lib._objc_msgSend_197(_id, _lib._sel_locale1); - return NSLocale._(_ret, _lib, retain: true, release: true); - } - - set locale(NSLocale value) { - return _lib._objc_msgSend_762(_id, _lib._sel_setLocale_1, value._id); - } - - bool get generatesDecimalNumbers { - return _lib._objc_msgSend_12(_id, _lib._sel_generatesDecimalNumbers1); - } - - set generatesDecimalNumbers(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setGeneratesDecimalNumbers_1, value); - } - - int get formatterBehavior { - return _lib._objc_msgSend_805(_id, _lib._sel_formatterBehavior1); - } - - set formatterBehavior(int value) { - return _lib._objc_msgSend_809(_id, _lib._sel_setFormatterBehavior_1, value); + void setCookie_(NSHTTPCookie cookie) { + _objc_msgSend_315(this.pointer, _sel_setCookie_, cookie.pointer); } - NSString get negativeFormat { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_negativeFormat1); - return NSString._(_ret, _lib, retain: true, release: true); + void deleteCookie_(NSHTTPCookie cookie) { + _objc_msgSend_315(this.pointer, _sel_deleteCookie_, cookie.pointer); } - set negativeFormat(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setNegativeFormat_1, value._id); + void removeCookiesSinceDate_(objc.NSDate date) { + _objc_msgSend_246(this.pointer, _sel_removeCookiesSinceDate_, date.pointer); } - NSDictionary? get textAttributesForNegativeValues { + objc.NSArray? cookiesForURL_(objc.NSURL URL) { final _ret = - _lib._objc_msgSend_390(_id, _lib._sel_textAttributesForNegativeValues1); + _objc_msgSend_316(this.pointer, _sel_cookiesForURL_, URL.pointer); return _ret.address == 0 ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - set textAttributesForNegativeValues(NSDictionary? value) { - return _lib._objc_msgSend_634( - _id, - _lib._sel_setTextAttributesForNegativeValues_1, - value?._id ?? ffi.nullptr); - } - - NSString get positiveFormat { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_positiveFormat1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - set positiveFormat(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setPositiveFormat_1, value._id); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get textAttributesForPositiveValues { - final _ret = - _lib._objc_msgSend_390(_id, _lib._sel_textAttributesForPositiveValues1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + void setCookies_forURL_mainDocumentURL_( + objc.NSArray cookies, objc.NSURL? URL, objc.NSURL? mainDocumentURL) { + _objc_msgSend_317( + this.pointer, + _sel_setCookies_forURL_mainDocumentURL_, + cookies.pointer, + URL?.pointer ?? ffi.nullptr, + mainDocumentURL?.pointer ?? ffi.nullptr); } - set textAttributesForPositiveValues(NSDictionary? value) { - return _lib._objc_msgSend_634( - _id, - _lib._sel_setTextAttributesForPositiveValues_1, - value?._id ?? ffi.nullptr); + int get cookieAcceptPolicy { + return _objc_msgSend_318(this.pointer, _sel_cookieAcceptPolicy); } - bool get allowsFloats { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsFloats1); + set cookieAcceptPolicy(int value) { + return _objc_msgSend_319(this.pointer, _sel_setCookieAcceptPolicy_, value); } - set allowsFloats(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setAllowsFloats_1, value); + objc.NSArray sortedCookiesUsingDescriptors_(objc.NSArray sortOrder) { + final _ret = _objc_msgSend_67( + this.pointer, _sel_sortedCookiesUsingDescriptors_, sortOrder.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString get decimalSeparator { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_decimalSeparator1); - return NSString._(_ret, _lib, retain: true, release: true); + void storeCookies_forTask_(objc.NSArray cookies, NSURLSessionTask task) { + _objc_msgSend_353(this.pointer, _sel_storeCookies_forTask_, cookies.pointer, + task.pointer); } - set decimalSeparator(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setDecimalSeparator_1, value._id); + void getCookiesForTask_completionHandler_( + NSURLSessionTask task, ObjCBlock_ffiVoid_NSArray completionHandler) { + _objc_msgSend_354(this.pointer, _sel_getCookiesForTask_completionHandler_, + task.pointer, completionHandler.pointer); } - bool get alwaysShowsDecimalSeparator { - return _lib._objc_msgSend_12(_id, _lib._sel_alwaysShowsDecimalSeparator1); + @override + NSHTTPCookieStorage init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } - set alwaysShowsDecimalSeparator(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setAlwaysShowsDecimalSeparator_1, value); + static NSHTTPCookieStorage new1() { + final _ret = _objc_msgSend_40(_class_NSHTTPCookieStorage, _sel_new); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: false, release: true); } - NSString get currencyDecimalSeparator { + static NSHTTPCookieStorage allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_currencyDecimalSeparator1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - set currencyDecimalSeparator(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setCurrencyDecimalSeparator_1, value._id); - } - - bool get usesGroupingSeparator { - return _lib._objc_msgSend_12(_id, _lib._sel_usesGroupingSeparator1); - } - - set usesGroupingSeparator(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setUsesGroupingSeparator_1, value); - } - - NSString get groupingSeparator { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_groupingSeparator1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - set groupingSeparator(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setGroupingSeparator_1, value._id); - } - - NSString? get zeroSymbol { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_zeroSymbol1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - set zeroSymbol(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setZeroSymbol_1, value?._id ?? ffi.nullptr); - } - - NSDictionary? get textAttributesForZero { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_textAttributesForZero1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + _objc_msgSend_47(_class_NSHTTPCookieStorage, _sel_allocWithZone_, zone); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: false, release: true); } - set textAttributesForZero(NSDictionary? value) { - return _lib._objc_msgSend_634( - _id, _lib._sel_setTextAttributesForZero_1, value?._id ?? ffi.nullptr); + static NSHTTPCookieStorage alloc() { + final _ret = _objc_msgSend_40(_class_NSHTTPCookieStorage, _sel_alloc); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: false, release: true); } - NSString get nilSymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_nilSymbol1); - return NSString._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSHTTPCookieStorage, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - set nilSymbol(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setNilSymbol_1, value._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSHTTPCookieStorage, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSDictionary? get textAttributesForNil { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_textAttributesForNil1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSHTTPCookieStorage, _sel_accessInstanceVariablesDirectly); } - set textAttributesForNil(NSDictionary? value) { - return _lib._objc_msgSend_634( - _id, _lib._sel_setTextAttributesForNil_1, value?._id ?? ffi.nullptr); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSHTTPCookieStorage, _sel_useStoredAccessor); } - NSString get notANumberSymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_notANumberSymbol1); - return NSString._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSHTTPCookieStorage, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - set notANumberSymbol(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setNotANumberSymbol_1, value._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSHTTPCookieStorage, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSDictionary? get textAttributesForNotANumber { - final _ret = - _lib._objc_msgSend_390(_id, _lib._sel_textAttributesForNotANumber1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSHTTPCookieStorage, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSHTTPCookieStorage, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSHTTPCookieStorage, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSHTTPCookieStorage = objc.getClass("NSHTTPCookieStorage"); +late final _sel_sharedHTTPCookieStorage = + objc.registerName("sharedHTTPCookieStorage"); +final _objc_msgSend_309 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_sharedCookieStorageForGroupContainerIdentifier_ = + objc.registerName("sharedCookieStorageForGroupContainerIdentifier:"); +final _objc_msgSend_310 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_cookies = objc.registerName("cookies"); + +class NSHTTPCookie extends objc.NSObject { + NSHTTPCookie._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - set textAttributesForNotANumber(NSDictionary? value) { - return _lib._objc_msgSend_634(_id, - _lib._sel_setTextAttributesForNotANumber_1, value?._id ?? ffi.nullptr); - } + /// Constructs a [NSHTTPCookie] that points to the same underlying object as [other]. + NSHTTPCookie.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSString get positiveInfinitySymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_positiveInfinitySymbol1); - return NSString._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSHTTPCookie] that wraps the given raw object pointer. + NSHTTPCookie.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - set positiveInfinitySymbol(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setPositiveInfinitySymbol_1, value._id); + /// Returns whether [obj] is an instance of [NSHTTPCookie]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSHTTPCookie); } - NSDictionary? get textAttributesForPositiveInfinity { - final _ret = _lib._objc_msgSend_390( - _id, _lib._sel_textAttributesForPositiveInfinity1); + NSHTTPCookie? initWithProperties_(objc.NSDictionary properties) { + final _ret = _objc_msgSend_311( + this.pointer, _sel_initWithProperties_, properties.pointer); return _ret.address == 0 ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + : NSHTTPCookie.castFromPointer(_ret, retain: true, release: true); } - set textAttributesForPositiveInfinity(NSDictionary? value) { - return _lib._objc_msgSend_634( - _id, - _lib._sel_setTextAttributesForPositiveInfinity_1, - value?._id ?? ffi.nullptr); + static NSHTTPCookie? cookieWithProperties_(objc.NSDictionary properties) { + final _ret = _objc_msgSend_312( + _class_NSHTTPCookie, _sel_cookieWithProperties_, properties.pointer); + return _ret.address == 0 + ? null + : NSHTTPCookie.castFromPointer(_ret, retain: true, release: true); } - NSString get negativeInfinitySymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_negativeInfinitySymbol1); - return NSString._(_ret, _lib, retain: true, release: true); + static objc.NSDictionary requestHeaderFieldsWithCookies_( + objc.NSArray cookies) { + final _ret = _objc_msgSend_313(_class_NSHTTPCookie, + _sel_requestHeaderFieldsWithCookies_, cookies.pointer); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - set negativeInfinitySymbol(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setNegativeInfinitySymbol_1, value._id); + static objc.NSArray cookiesWithResponseHeaderFields_forURL_( + objc.NSDictionary headerFields, objc.NSURL URL) { + final _ret = _objc_msgSend_314( + _class_NSHTTPCookie, + _sel_cookiesWithResponseHeaderFields_forURL_, + headerFields.pointer, + URL.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get textAttributesForNegativeInfinity { - final _ret = _lib._objc_msgSend_390( - _id, _lib._sel_textAttributesForNegativeInfinity1); + objc.NSDictionary? get properties { + final _ret = _objc_msgSend_65(this.pointer, _sel_properties); return _ret.address == 0 ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - set textAttributesForNegativeInfinity(NSDictionary? value) { - return _lib._objc_msgSend_634( - _id, - _lib._sel_setTextAttributesForNegativeInfinity_1, - value?._id ?? ffi.nullptr); + int get version { + return _objc_msgSend_29(this.pointer, _sel_version); } - NSString get positivePrefix { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_positivePrefix1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSString get name { + final _ret = _objc_msgSend_12(this.pointer, _sel_name); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set positivePrefix(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setPositivePrefix_1, value._id); + objc.NSString get value { + final _ret = _objc_msgSend_12(this.pointer, _sel_value); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString get positiveSuffix { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_positiveSuffix1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSDate? get expiresDate { + final _ret = _objc_msgSend_116(this.pointer, _sel_expiresDate); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - set positiveSuffix(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setPositiveSuffix_1, value._id); + bool get sessionOnly { + return _objc_msgSend_7(this.pointer, _sel_isSessionOnly); } - NSString get negativePrefix { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_negativePrefix1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSString get domain { + final _ret = _objc_msgSend_12(this.pointer, _sel_domain); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set negativePrefix(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setNegativePrefix_1, value._id); + objc.NSString get path { + final _ret = _objc_msgSend_12(this.pointer, _sel_path); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString get negativeSuffix { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_negativeSuffix1); - return NSString._(_ret, _lib, retain: true, release: true); + bool get secure { + return _objc_msgSend_7(this.pointer, _sel_isSecure); } - set negativeSuffix(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setNegativeSuffix_1, value._id); + bool get HTTPOnly { + return _objc_msgSend_7(this.pointer, _sel_isHTTPOnly); } - NSString get currencyCode { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_currencyCode1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSString? get comment { + final _ret = _objc_msgSend_13(this.pointer, _sel_comment); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set currencyCode(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setCurrencyCode_1, value._id); + objc.NSURL? get commentURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_commentURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSString get currencySymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_currencySymbol1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSArray? get portList { + final _ret = _objc_msgSend_69(this.pointer, _sel_portList); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set currencySymbol(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setCurrencySymbol_1, value._id); + objc.NSString? get sameSitePolicy { + final _ret = _objc_msgSend_13(this.pointer, _sel_sameSitePolicy); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString get internationalCurrencySymbol { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_internationalCurrencySymbol1); - return NSString._(_ret, _lib, retain: true, release: true); + @override + NSHTTPCookie init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSHTTPCookie.castFromPointer(_ret, retain: true, release: true); } - set internationalCurrencySymbol(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setInternationalCurrencySymbol_1, value._id); + static NSHTTPCookie new1() { + final _ret = _objc_msgSend_40(_class_NSHTTPCookie, _sel_new); + return NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); } - NSString get percentSymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_percentSymbol1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSHTTPCookie allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSHTTPCookie, _sel_allocWithZone_, zone); + return NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); } - set percentSymbol(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setPercentSymbol_1, value._id); + static NSHTTPCookie alloc() { + final _ret = _objc_msgSend_40(_class_NSHTTPCookie, _sel_alloc); + return NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); } - NSString get perMillSymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_perMillSymbol1); - return NSString._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSHTTPCookie, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - set perMillSymbol(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setPerMillSymbol_1, value._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSHTTPCookie, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSString get minusSign { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_minusSign1); - return NSString._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSHTTPCookie, _sel_accessInstanceVariablesDirectly); } - set minusSign(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setMinusSign_1, value._id); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSHTTPCookie, _sel_useStoredAccessor); } - NSString get plusSign { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_plusSign1); - return NSString._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSHTTPCookie, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - set plusSign(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setPlusSign_1, value._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSHTTPCookie, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSString get exponentSymbol { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_exponentSymbol1); - return NSString._(_ret, _lib, retain: true, release: true); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSHTTPCookie, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSHTTPCookie, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSHTTPCookie, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSHTTPCookie = objc.getClass("NSHTTPCookie"); +late final _sel_initWithProperties_ = objc.registerName("initWithProperties:"); +final _objc_msgSend_311 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_cookieWithProperties_ = + objc.registerName("cookieWithProperties:"); +final _objc_msgSend_312 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_requestHeaderFieldsWithCookies_ = + objc.registerName("requestHeaderFieldsWithCookies:"); +final _objc_msgSend_313 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_cookiesWithResponseHeaderFields_forURL_ = + objc.registerName("cookiesWithResponseHeaderFields:forURL:"); +final _objc_msgSend_314 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_properties = objc.registerName("properties"); +late final _sel_version = objc.registerName("version"); +late final _sel_value = objc.registerName("value"); +late final _sel_expiresDate = objc.registerName("expiresDate"); +late final _sel_isSessionOnly = objc.registerName("isSessionOnly"); +late final _sel_domain = objc.registerName("domain"); +late final _sel_path = objc.registerName("path"); +late final _sel_isSecure = objc.registerName("isSecure"); +late final _sel_isHTTPOnly = objc.registerName("isHTTPOnly"); +late final _sel_comment = objc.registerName("comment"); +late final _sel_commentURL = objc.registerName("commentURL"); +late final _sel_portList = objc.registerName("portList"); +late final _sel_sameSitePolicy = objc.registerName("sameSitePolicy"); +late final _sel_setCookie_ = objc.registerName("setCookie:"); +final _objc_msgSend_315 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_deleteCookie_ = objc.registerName("deleteCookie:"); +late final _sel_removeCookiesSinceDate_ = + objc.registerName("removeCookiesSinceDate:"); +late final _sel_cookiesForURL_ = objc.registerName("cookiesForURL:"); +final _objc_msgSend_316 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCookies_forURL_mainDocumentURL_ = + objc.registerName("setCookies:forURL:mainDocumentURL:"); +final _objc_msgSend_317 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - set exponentSymbol(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setExponentSymbol_1, value._id); - } +abstract class NSHTTPCookieAcceptPolicy { + static const int NSHTTPCookieAcceptPolicyAlways = 0; + static const int NSHTTPCookieAcceptPolicyNever = 1; + static const int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2; +} - int get groupingSize { - return _lib._objc_msgSend_10(_id, _lib._sel_groupingSize1); - } +late final _sel_cookieAcceptPolicy = objc.registerName("cookieAcceptPolicy"); +final _objc_msgSend_318 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCookieAcceptPolicy_ = + objc.registerName("setCookieAcceptPolicy:"); +final _objc_msgSend_319 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_sortedCookiesUsingDescriptors_ = + objc.registerName("sortedCookiesUsingDescriptors:"); + +class NSURLSessionTask extends objc.NSObject { + NSURLSessionTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - set groupingSize(int value) { - return _lib._objc_msgSend_516(_id, _lib._sel_setGroupingSize_1, value); - } + /// Constructs a [NSURLSessionTask] that points to the same underlying object as [other]. + NSURLSessionTask.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - int get secondaryGroupingSize { - return _lib._objc_msgSend_10(_id, _lib._sel_secondaryGroupingSize1); + /// Constructs a [NSURLSessionTask] that wraps the given raw object pointer. + NSURLSessionTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLSessionTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionTask); } - set secondaryGroupingSize(int value) { - return _lib._objc_msgSend_516( - _id, _lib._sel_setSecondaryGroupingSize_1, value); + int get taskIdentifier { + return _objc_msgSend_29(this.pointer, _sel_taskIdentifier); } - NSNumber? get multiplier { - final _ret = _lib._objc_msgSend_215(_id, _lib._sel_multiplier1); + NSURLRequest? get originalRequest { + final _ret = _objc_msgSend_343(this.pointer, _sel_originalRequest); return _ret.address == 0 ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + : NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - set multiplier(NSNumber? value) { - return _lib._objc_msgSend_670( - _id, _lib._sel_setMultiplier_1, value?._id ?? ffi.nullptr); + NSURLRequest? get currentRequest { + final _ret = _objc_msgSend_343(this.pointer, _sel_currentRequest); + return _ret.address == 0 + ? null + : NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - int get formatWidth { - return _lib._objc_msgSend_10(_id, _lib._sel_formatWidth1); + NSURLResponse? get response { + final _ret = _objc_msgSend_346(this.pointer, _sel_response); + return _ret.address == 0 + ? null + : NSURLResponse.castFromPointer(_ret, retain: true, release: true); } - set formatWidth(int value) { - return _lib._objc_msgSend_516(_id, _lib._sel_setFormatWidth_1, value); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSString get paddingCharacter { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_paddingCharacter1); - return NSString._(_ret, _lib, retain: true, release: true); + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } - set paddingCharacter(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setPaddingCharacter_1, value._id); + objc.NSProgress get progress { + final _ret = _objc_msgSend_347(this.pointer, _sel_progress); + return objc.NSProgress.castFromPointer(_ret, retain: true, release: true); } - int get paddingPosition { - return _lib._objc_msgSend_810(_id, _lib._sel_paddingPosition1); + objc.NSDate? get earliestBeginDate { + final _ret = _objc_msgSend_116(this.pointer, _sel_earliestBeginDate); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - set paddingPosition(int value) { - return _lib._objc_msgSend_811(_id, _lib._sel_setPaddingPosition_1, value); + set earliestBeginDate(objc.NSDate? value) { + return _objc_msgSend_162(this.pointer, _sel_setEarliestBeginDate_, + value?.pointer ?? ffi.nullptr); } - int get roundingMode { - return _lib._objc_msgSend_812(_id, _lib._sel_roundingMode1); + int get countOfBytesClientExpectsToSend { + return _objc_msgSend_348( + this.pointer, _sel_countOfBytesClientExpectsToSend); } - set roundingMode(int value) { - return _lib._objc_msgSend_813(_id, _lib._sel_setRoundingMode_1, value); + set countOfBytesClientExpectsToSend(int value) { + return _objc_msgSend_349( + this.pointer, _sel_setCountOfBytesClientExpectsToSend_, value); } - NSNumber get roundingIncrement { - final _ret = _lib._objc_msgSend_814(_id, _lib._sel_roundingIncrement1); - return NSNumber._(_ret, _lib, retain: true, release: true); + int get countOfBytesClientExpectsToReceive { + return _objc_msgSend_348( + this.pointer, _sel_countOfBytesClientExpectsToReceive); } - set roundingIncrement(NSNumber value) { - return _lib._objc_msgSend_815( - _id, _lib._sel_setRoundingIncrement_1, value._id); + set countOfBytesClientExpectsToReceive(int value) { + return _objc_msgSend_349( + this.pointer, _sel_setCountOfBytesClientExpectsToReceive_, value); } - int get minimumIntegerDigits { - return _lib._objc_msgSend_10(_id, _lib._sel_minimumIntegerDigits1); + int get countOfBytesSent { + return _objc_msgSend_348(this.pointer, _sel_countOfBytesSent); } - set minimumIntegerDigits(int value) { - return _lib._objc_msgSend_516( - _id, _lib._sel_setMinimumIntegerDigits_1, value); + int get countOfBytesReceived { + return _objc_msgSend_348(this.pointer, _sel_countOfBytesReceived); } - int get maximumIntegerDigits { - return _lib._objc_msgSend_10(_id, _lib._sel_maximumIntegerDigits1); + int get countOfBytesExpectedToSend { + return _objc_msgSend_348(this.pointer, _sel_countOfBytesExpectedToSend); } - set maximumIntegerDigits(int value) { - return _lib._objc_msgSend_516( - _id, _lib._sel_setMaximumIntegerDigits_1, value); + int get countOfBytesExpectedToReceive { + return _objc_msgSend_348(this.pointer, _sel_countOfBytesExpectedToReceive); } - int get minimumFractionDigits { - return _lib._objc_msgSend_10(_id, _lib._sel_minimumFractionDigits1); + objc.NSString? get taskDescription { + final _ret = _objc_msgSend_13(this.pointer, _sel_taskDescription); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set minimumFractionDigits(int value) { - return _lib._objc_msgSend_516( - _id, _lib._sel_setMinimumFractionDigits_1, value); + set taskDescription(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setTaskDescription_, value?.pointer ?? ffi.nullptr); } - int get maximumFractionDigits { - return _lib._objc_msgSend_10(_id, _lib._sel_maximumFractionDigits1); + void cancel() { + _objc_msgSend_82(this.pointer, _sel_cancel); } - set maximumFractionDigits(int value) { - return _lib._objc_msgSend_516( - _id, _lib._sel_setMaximumFractionDigits_1, value); + int get state { + return _objc_msgSend_350(this.pointer, _sel_state); } - NSNumber? get minimum { - final _ret = _lib._objc_msgSend_215(_id, _lib._sel_minimum1); + objc.NSError? get error { + final _ret = _objc_msgSend_328(this.pointer, _sel_error); return _ret.address == 0 ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + : objc.NSError.castFromPointer(_ret, retain: true, release: true); } - set minimum(NSNumber? value) { - return _lib._objc_msgSend_670( - _id, _lib._sel_setMinimum_1, value?._id ?? ffi.nullptr); + void suspend() { + _objc_msgSend_82(this.pointer, _sel_suspend); } - NSNumber? get maximum { - final _ret = _lib._objc_msgSend_215(_id, _lib._sel_maximum1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + void resume() { + _objc_msgSend_82(this.pointer, _sel_resume); } - set maximum(NSNumber? value) { - return _lib._objc_msgSend_670( - _id, _lib._sel_setMaximum_1, value?._id ?? ffi.nullptr); + double get priority { + return objc.useMsgSendVariants + ? _objc_msgSend_351Fpret(this.pointer, _sel_priority) + : _objc_msgSend_351(this.pointer, _sel_priority); } - NSString get currencyGroupingSeparator { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_currencyGroupingSeparator1); - return NSString._(_ret, _lib, retain: true, release: true); + set priority(double value) { + return _objc_msgSend_352(this.pointer, _sel_setPriority_, value); } - set currencyGroupingSeparator(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setCurrencyGroupingSeparator_1, value._id); + bool get prefersIncrementalDelivery { + return _objc_msgSend_7(this.pointer, _sel_prefersIncrementalDelivery); } - bool get lenient { - return _lib._objc_msgSend_12(_id, _lib._sel_isLenient1); + set prefersIncrementalDelivery(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setPrefersIncrementalDelivery_, value); } - set lenient(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setLenient_1, value); + @override + NSURLSessionTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionTask.castFromPointer(_ret, retain: true, release: true); } - bool get usesSignificantDigits { - return _lib._objc_msgSend_12(_id, _lib._sel_usesSignificantDigits1); + static NSURLSessionTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionTask, _sel_new); + return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); } - set usesSignificantDigits(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setUsesSignificantDigits_1, value); + static NSURLSessionTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLSessionTask, _sel_allocWithZone_, zone); + return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); } - int get minimumSignificantDigits { - return _lib._objc_msgSend_10(_id, _lib._sel_minimumSignificantDigits1); + static NSURLSessionTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionTask, _sel_alloc); + return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); } - set minimumSignificantDigits(int value) { - return _lib._objc_msgSend_516( - _id, _lib._sel_setMinimumSignificantDigits_1, value); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - int get maximumSignificantDigits { - return _lib._objc_msgSend_10(_id, _lib._sel_maximumSignificantDigits1); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - set maximumSignificantDigits(int value) { - return _lib._objc_msgSend_516( - _id, _lib._sel_setMaximumSignificantDigits_1, value); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLSessionTask, _sel_accessInstanceVariablesDirectly); } - bool get partialStringValidationEnabled { - return _lib._objc_msgSend_12( - _id, _lib._sel_isPartialStringValidationEnabled1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLSessionTask, _sel_useStoredAccessor); } - set partialStringValidationEnabled(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setPartialStringValidationEnabled_1, value); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - bool get hasThousandSeparators { - return _lib._objc_msgSend_12(_id, _lib._sel_hasThousandSeparators1); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionTask, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - set hasThousandSeparators(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setHasThousandSeparators_1, value); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - NSString get thousandSeparator { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_thousandSeparator1); - return NSString._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set thousandSeparator(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setThousandSeparator_1, value._id); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLSessionTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - bool get localizesFormat { - return _lib._objc_msgSend_12(_id, _lib._sel_localizesFormat1); - } +late final _class_NSURLSessionTask = objc.getClass("NSURLSessionTask"); +late final _sel_taskIdentifier = objc.registerName("taskIdentifier"); - set localizesFormat(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setLocalizesFormat_1, value); - } +class NSURLRequest extends objc.NSObject { + NSURLRequest._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSString get format { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_format1); - return NSString._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSURLRequest] that points to the same underlying object as [other]. + NSURLRequest.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - set format(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setFormat_1, value._id); - } + /// Constructs a [NSURLRequest] that wraps the given raw object pointer. + NSURLRequest.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - NSAttributedString get attributedStringForZero { - final _ret = - _lib._objc_msgSend_735(_id, _lib._sel_attributedStringForZero1); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSURLRequest]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLRequest); } - set attributedStringForZero(NSAttributedString value) { - return _lib._objc_msgSend_816( - _id, _lib._sel_setAttributedStringForZero_1, value._id); + static NSURLRequest requestWithURL_(objc.NSURL URL) { + final _ret = _objc_msgSend_320( + _class_NSURLRequest, _sel_requestWithURL_, URL.pointer); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - NSAttributedString get attributedStringForNil { - final _ret = _lib._objc_msgSend_735(_id, _lib._sel_attributedStringForNil1); - return NSAttributedString._(_ret, _lib, retain: true, release: true); + static bool getSupportsSecureCoding() { + return _objc_msgSend_7(_class_NSURLRequest, _sel_supportsSecureCoding); } - set attributedStringForNil(NSAttributedString value) { - return _lib._objc_msgSend_816( - _id, _lib._sel_setAttributedStringForNil_1, value._id); + static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( + objc.NSURL URL, int cachePolicy, double timeoutInterval) { + final _ret = _objc_msgSend_321( + _class_NSURLRequest, + _sel_requestWithURL_cachePolicy_timeoutInterval_, + URL.pointer, + cachePolicy, + timeoutInterval); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - NSAttributedString get attributedStringForNotANumber { + NSURLRequest initWithURL_(objc.NSURL URL) { final _ret = - _lib._objc_msgSend_735(_id, _lib._sel_attributedStringForNotANumber1); - return NSAttributedString._(_ret, _lib, retain: true, release: true); - } - - set attributedStringForNotANumber(NSAttributedString value) { - return _lib._objc_msgSend_816( - _id, _lib._sel_setAttributedStringForNotANumber_1, value._id); - } - - NSDecimalNumberHandler get roundingBehavior { - final _ret = _lib._objc_msgSend_817(_id, _lib._sel_roundingBehavior1); - return NSDecimalNumberHandler._(_ret, _lib, retain: true, release: true); - } - - set roundingBehavior(NSDecimalNumberHandler value) { - return _lib._objc_msgSend_819( - _id, _lib._sel_setRoundingBehavior_1, value._id); + _objc_msgSend_320(this.pointer, _sel_initWithURL_, URL.pointer); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - @override - NSNumberFormatter init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSNumberFormatter._(_ret, _lib, retain: true, release: true); + NSURLRequest initWithURL_cachePolicy_timeoutInterval_( + objc.NSURL URL, int cachePolicy, double timeoutInterval) { + final _ret = _objc_msgSend_321( + this.pointer, + _sel_initWithURL_cachePolicy_timeoutInterval_, + URL.pointer, + cachePolicy, + timeoutInterval); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - static NSNumberFormatter new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSNumberFormatter1, _lib._sel_new1); - return NSNumberFormatter._(_ret, _lib, retain: false, release: true); + objc.NSURL? get URL { + final _ret = _objc_msgSend_10(this.pointer, _sel_URL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - static NSNumberFormatter allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSNumberFormatter1, _lib._sel_allocWithZone_1, zone); - return NSNumberFormatter._(_ret, _lib, retain: false, release: true); + int get cachePolicy { + return _objc_msgSend_322(this.pointer, _sel_cachePolicy); } - static NSNumberFormatter alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSNumberFormatter1, _lib._sel_alloc1); - return NSNumberFormatter._(_ret, _lib, retain: false, release: true); + double get timeoutInterval { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_timeoutInterval) + : _objc_msgSend_115(this.pointer, _sel_timeoutInterval); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSNumberFormatter1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + objc.NSURL? get mainDocumentURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_mainDocumentURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSNumberFormatter1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + int get networkServiceType { + return _objc_msgSend_323(this.pointer, _sel_networkServiceType); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSNumberFormatter1, - _lib._sel_accessInstanceVariablesDirectly1); + bool get allowsCellularAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsCellularAccess); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSNumberFormatter1, _lib._sel_useStoredAccessor1); + bool get allowsExpensiveNetworkAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsExpensiveNetworkAccess); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSNumberFormatter1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + bool get allowsConstrainedNetworkAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsConstrainedNetworkAccess); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSNumberFormatter1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + bool get assumesHTTP3Capable { + return _objc_msgSend_7(this.pointer, _sel_assumesHTTP3Capable); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSNumberFormatter1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + int get attribution { + return _objc_msgSend_324(this.pointer, _sel_attribution); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSNumberFormatter1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool get requiresDNSSECValidation { + return _objc_msgSend_7(this.pointer, _sel_requiresDNSSECValidation); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSNumberFormatter1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSString? get HTTPMethod { + final _ret = _objc_msgSend_13(this.pointer, _sel_HTTPMethod); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } -} - -abstract class NSNumberFormatterStyle { - static const int NSNumberFormatterNoStyle = 0; - static const int NSNumberFormatterDecimalStyle = 1; - static const int NSNumberFormatterCurrencyStyle = 2; - static const int NSNumberFormatterPercentStyle = 3; - static const int NSNumberFormatterScientificStyle = 4; - static const int NSNumberFormatterSpellOutStyle = 5; - static const int NSNumberFormatterOrdinalStyle = 6; - static const int NSNumberFormatterCurrencyISOCodeStyle = 8; - static const int NSNumberFormatterCurrencyPluralStyle = 9; - static const int NSNumberFormatterCurrencyAccountingStyle = 10; -} - -abstract class NSNumberFormatterBehavior { - static const int NSNumberFormatterBehaviorDefault = 0; - static const int NSNumberFormatterBehavior10_0 = 1000; - static const int NSNumberFormatterBehavior10_4 = 1040; -} - -abstract class NSNumberFormatterPadPosition { - static const int NSNumberFormatterPadBeforePrefix = 0; - static const int NSNumberFormatterPadAfterPrefix = 1; - static const int NSNumberFormatterPadBeforeSuffix = 2; - static const int NSNumberFormatterPadAfterSuffix = 3; -} - -abstract class NSNumberFormatterRoundingMode { - static const int NSNumberFormatterRoundCeiling = 0; - static const int NSNumberFormatterRoundFloor = 1; - static const int NSNumberFormatterRoundDown = 2; - static const int NSNumberFormatterRoundUp = 3; - static const int NSNumberFormatterRoundHalfEven = 4; - static const int NSNumberFormatterRoundHalfDown = 5; - static const int NSNumberFormatterRoundHalfUp = 6; -} - -class NSDecimalNumberHandler extends NSObject { - NSDecimalNumberHandler._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSDecimalNumberHandler] that points to the same underlying object as [other]. - static NSDecimalNumberHandler castFrom(T other) { - return NSDecimalNumberHandler._(other._id, other._lib, - retain: true, release: true); + objc.NSDictionary? get allHTTPHeaderFields { + final _ret = _objc_msgSend_65(this.pointer, _sel_allHTTPHeaderFields); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSDecimalNumberHandler] that wraps the given raw object pointer. - static NSDecimalNumberHandler castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDecimalNumberHandler._(other, lib, - retain: retain, release: release); + objc.NSString? valueForHTTPHeaderField_(objc.NSString field) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_valueForHTTPHeaderField_, field.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSDecimalNumberHandler]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSDecimalNumberHandler1); + objc.NSData? get HTTPBody { + final _ret = _objc_msgSend_325(this.pointer, _sel_HTTPBody); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - static NSDecimalNumberHandler getDefaultDecimalNumberHandler( - SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_817(_lib._class_NSDecimalNumberHandler1, - _lib._sel_defaultDecimalNumberHandler1); - return NSDecimalNumberHandler._(_ret, _lib, retain: true, release: true); + NSInputStream? get HTTPBodyStream { + final _ret = _objc_msgSend_342(this.pointer, _sel_HTTPBodyStream); + return _ret.address == 0 + ? null + : NSInputStream.castFromPointer(_ret, retain: true, release: true); } - NSDecimalNumberHandler - initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( - int roundingMode, - int scale, - bool exact, - bool overflow, - bool underflow, - bool divideByZero) { - final _ret = _lib._objc_msgSend_818( - _id, - _lib._sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_1, - roundingMode, - scale, - exact, - overflow, - underflow, - divideByZero); - return NSDecimalNumberHandler._(_ret, _lib, retain: true, release: true); + bool get HTTPShouldHandleCookies { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldHandleCookies); } - static NSDecimalNumberHandler - decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( - SwiftLibrary _lib, - int roundingMode, - int scale, - bool exact, - bool overflow, - bool underflow, - bool divideByZero) { - final _ret = _lib._objc_msgSend_818( - _lib._class_NSDecimalNumberHandler1, - _lib._sel_decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_1, - roundingMode, - scale, - exact, - overflow, - underflow, - divideByZero); - return NSDecimalNumberHandler._(_ret, _lib, retain: true, release: true); + bool get HTTPShouldUsePipelining { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldUsePipelining); } @override - NSDecimalNumberHandler init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSDecimalNumberHandler._(_ret, _lib, retain: true, release: true); + NSURLRequest init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - static NSDecimalNumberHandler new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSDecimalNumberHandler1, _lib._sel_new1); - return NSDecimalNumberHandler._(_ret, _lib, retain: false, release: true); + static NSURLRequest new1() { + final _ret = _objc_msgSend_40(_class_NSURLRequest, _sel_new); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } - static NSDecimalNumberHandler allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSDecimalNumberHandler1, _lib._sel_allocWithZone_1, zone); - return NSDecimalNumberHandler._(_ret, _lib, retain: false, release: true); + static NSURLRequest allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLRequest, _sel_allocWithZone_, zone); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } - static NSDecimalNumberHandler alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSDecimalNumberHandler1, _lib._sel_alloc1); - return NSDecimalNumberHandler._(_ret, _lib, retain: false, release: true); + static NSURLRequest alloc() { + final _ret = _objc_msgSend_40(_class_NSURLRequest, _sel_alloc); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSDecimalNumberHandler1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLRequest, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSDecimalNumberHandler1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLRequest, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSDecimalNumberHandler1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLRequest, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSDecimalNumberHandler1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLRequest, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSDecimalNumberHandler1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLRequest, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSDecimalNumberHandler1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLRequest, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSDecimalNumberHandler1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLRequest, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSDecimalNumberHandler1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLRequest, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDecimalNumberHandler1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLRequest, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -abstract class NSRoundingMode { - static const int NSRoundPlain = 0; - static const int NSRoundDown = 1; - static const int NSRoundUp = 2; - static const int NSRoundBankers = 3; +late final _class_NSURLRequest = objc.getClass("NSURLRequest"); +late final _sel_requestWithURL_ = objc.registerName("requestWithURL:"); +final _objc_msgSend_320 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_supportsSecureCoding = + objc.registerName("supportsSecureCoding"); + +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; +} + +late final _sel_requestWithURL_cachePolicy_timeoutInterval_ = + objc.registerName("requestWithURL:cachePolicy:timeoutInterval:"); +final _objc_msgSend_321 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Double)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + double)>(); +late final _sel_initWithURL_cachePolicy_timeoutInterval_ = + objc.registerName("initWithURL:cachePolicy:timeoutInterval:"); +late final _sel_URL = objc.registerName("URL"); +late final _sel_cachePolicy = objc.registerName("cachePolicy"); +final _objc_msgSend_322 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_timeoutInterval = objc.registerName("timeoutInterval"); +late final _sel_mainDocumentURL = objc.registerName("mainDocumentURL"); + +abstract class NSURLRequestNetworkServiceType { + static const int NSURLNetworkServiceTypeDefault = 0; + static const int NSURLNetworkServiceTypeVoIP = 1; + static const int NSURLNetworkServiceTypeVideo = 2; + static const int NSURLNetworkServiceTypeBackground = 3; + static const int NSURLNetworkServiceTypeVoice = 4; + static const int NSURLNetworkServiceTypeResponsiveData = 6; + static const int NSURLNetworkServiceTypeAVStreaming = 8; + static const int NSURLNetworkServiceTypeResponsiveAV = 9; + static const int NSURLNetworkServiceTypeCallSignaling = 11; +} + +late final _sel_networkServiceType = objc.registerName("networkServiceType"); +final _objc_msgSend_323 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_allowsCellularAccess = + objc.registerName("allowsCellularAccess"); +late final _sel_allowsExpensiveNetworkAccess = + objc.registerName("allowsExpensiveNetworkAccess"); +late final _sel_allowsConstrainedNetworkAccess = + objc.registerName("allowsConstrainedNetworkAccess"); +late final _sel_assumesHTTP3Capable = objc.registerName("assumesHTTP3Capable"); + +abstract class NSURLRequestAttribution { + static const int NSURLRequestAttributionDeveloper = 0; + static const int NSURLRequestAttributionUser = 1; } -class NSScanner extends NSObject { - NSScanner._(ffi.Pointer id, SwiftLibrary lib, +late final _sel_attribution = objc.registerName("attribution"); +final _objc_msgSend_324 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_requiresDNSSECValidation = + objc.registerName("requiresDNSSECValidation"); +late final _sel_HTTPMethod = objc.registerName("HTTPMethod"); +late final _sel_allHTTPHeaderFields = objc.registerName("allHTTPHeaderFields"); +late final _sel_valueForHTTPHeaderField_ = + objc.registerName("valueForHTTPHeaderField:"); +late final _sel_HTTPBody = objc.registerName("HTTPBody"); +final _objc_msgSend_325 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + +class NSInputStream extends NSStream { + NSInputStream._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSScanner] that points to the same underlying object as [other]. - static NSScanner castFrom(T other) { - return NSScanner._(other._id, other._lib, retain: true, release: true); - } + /// Constructs a [NSInputStream] that points to the same underlying object as [other]. + NSInputStream.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSScanner] that wraps the given raw object pointer. - static NSScanner castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSScanner._(other, lib, retain: retain, release: release); + /// Constructs a [NSInputStream] that wraps the given raw object pointer. + NSInputStream.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSInputStream]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSInputStream); } - /// Returns whether [obj] is an instance of [NSScanner]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSScanner1); + int read_maxLength_(ffi.Pointer buffer, int len) { + return _objc_msgSend_329(this.pointer, _sel_read_maxLength_, buffer, len); } - NSString get string { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_string1); - return NSString._(_ret, _lib, retain: true, release: true); + bool getBuffer_length_(ffi.Pointer> buffer, + ffi.Pointer len) { + return _objc_msgSend_339(this.pointer, _sel_getBuffer_length_, buffer, len); } - int get scanLocation { - return _lib._objc_msgSend_10(_id, _lib._sel_scanLocation1); + bool get hasBytesAvailable { + return _objc_msgSend_7(this.pointer, _sel_hasBytesAvailable); } - set scanLocation(int value) { - return _lib._objc_msgSend_516(_id, _lib._sel_setScanLocation_1, value); + NSInputStream initWithData_(objc.NSData data) { + final _ret = + _objc_msgSend_340(this.pointer, _sel_initWithData_, data.pointer); + return NSInputStream.castFromPointer(_ret, retain: true, release: true); } - NSCharacterSet? get charactersToBeSkipped { - final _ret = _lib._objc_msgSend_820(_id, _lib._sel_charactersToBeSkipped1); + NSInputStream? initWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_3(this.pointer, _sel_initWithURL_, url.pointer); return _ret.address == 0 ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + : NSInputStream.castFromPointer(_ret, retain: true, release: true); } - set charactersToBeSkipped(NSCharacterSet? value) { - return _lib._objc_msgSend_821( - _id, _lib._sel_setCharactersToBeSkipped_1, value?._id ?? ffi.nullptr); + NSInputStream? initWithFileAtPath_(objc.NSString path) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_initWithFileAtPath_, path.pointer); + return _ret.address == 0 + ? null + : NSInputStream.castFromPointer(_ret, retain: true, release: true); } - bool get caseSensitive { - return _lib._objc_msgSend_12(_id, _lib._sel_caseSensitive1); + static NSInputStream? inputStreamWithData_(objc.NSData data) { + final _ret = _objc_msgSend_341( + _class_NSInputStream, _sel_inputStreamWithData_, data.pointer); + return _ret.address == 0 + ? null + : NSInputStream.castFromPointer(_ret, retain: true, release: true); } - set caseSensitive(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setCaseSensitive_1, value); + static NSInputStream? inputStreamWithFileAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_2( + _class_NSInputStream, _sel_inputStreamWithFileAtPath_, path.pointer); + return _ret.address == 0 + ? null + : NSInputStream.castFromPointer(_ret, retain: true, release: true); } - NSObject? get locale { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_locale1); + static NSInputStream? inputStreamWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_3( + _class_NSInputStream, _sel_inputStreamWithURL_, url.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : NSInputStream.castFromPointer(_ret, retain: true, release: true); } - set locale(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setLocale_1, value?._id ?? ffi.nullptr); + static void getStreamsToHostWithName_port_inputStream_outputStream_( + objc.NSString hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_333( + _class_NSInputStream, + _sel_getStreamsToHostWithName_port_inputStream_outputStream_, + hostname.pointer, + port, + inputStream, + outputStream); } - NSScanner initWithString_(NSString string) { - final _ret = - _lib._objc_msgSend_31(_id, _lib._sel_initWithString_1, string._id); - return NSScanner._(_ret, _lib, retain: true, release: true); + static void getStreamsToHost_port_inputStream_outputStream_( + NSHost host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_337( + _class_NSInputStream, + _sel_getStreamsToHost_port_inputStream_outputStream_, + host.pointer, + port, + inputStream, + outputStream); } - bool scanInt_(ffi.Pointer result) { - return _lib._objc_msgSend_822(_id, _lib._sel_scanInt_1, result); + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_338( + _class_NSInputStream, + _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, + bufferSize, + inputStream, + outputStream); } - bool scanInteger_(ffi.Pointer result) { - return _lib._objc_msgSend_823(_id, _lib._sel_scanInteger_1, result); + @override + NSInputStream init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSInputStream.castFromPointer(_ret, retain: true, release: true); } - bool scanLongLong_(ffi.Pointer result) { - return _lib._objc_msgSend_824(_id, _lib._sel_scanLongLong_1, result); + static NSInputStream new1() { + final _ret = _objc_msgSend_40(_class_NSInputStream, _sel_new); + return NSInputStream.castFromPointer(_ret, retain: false, release: true); } - bool scanUnsignedLongLong_(ffi.Pointer result) { - return _lib._objc_msgSend_825( - _id, _lib._sel_scanUnsignedLongLong_1, result); + static NSInputStream allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSInputStream, _sel_allocWithZone_, zone); + return NSInputStream.castFromPointer(_ret, retain: false, release: true); } - bool scanFloat_(ffi.Pointer result) { - return _lib._objc_msgSend_826(_id, _lib._sel_scanFloat_1, result); + static NSInputStream alloc() { + final _ret = _objc_msgSend_40(_class_NSInputStream, _sel_alloc); + return NSInputStream.castFromPointer(_ret, retain: false, release: true); } - bool scanDouble_(ffi.Pointer result) { - return _lib._objc_msgSend_827(_id, _lib._sel_scanDouble_1, result); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSInputStream, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - bool scanHexInt_(ffi.Pointer result) { - return _lib._objc_msgSend_828(_id, _lib._sel_scanHexInt_1, result); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSInputStream, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - bool scanHexLongLong_(ffi.Pointer result) { - return _lib._objc_msgSend_825(_id, _lib._sel_scanHexLongLong_1, result); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSInputStream, _sel_accessInstanceVariablesDirectly); } - bool scanHexFloat_(ffi.Pointer result) { - return _lib._objc_msgSend_826(_id, _lib._sel_scanHexFloat_1, result); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSInputStream, _sel_useStoredAccessor); } - bool scanHexDouble_(ffi.Pointer result) { - return _lib._objc_msgSend_827(_id, _lib._sel_scanHexDouble_1, result); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSInputStream, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - bool scanString_intoString_( - NSString string, ffi.Pointer> result) { - return _lib._objc_msgSend_829( - _id, _lib._sel_scanString_intoString_1, string._id, result); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSInputStream, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - bool scanCharactersFromSet_intoString_( - NSCharacterSet set, ffi.Pointer> result) { - return _lib._objc_msgSend_830( - _id, _lib._sel_scanCharactersFromSet_intoString_1, set._id, result); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSInputStream, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - bool scanUpToString_intoString_( - NSString string, ffi.Pointer> result) { - return _lib._objc_msgSend_829( - _id, _lib._sel_scanUpToString_intoString_1, string._id, result); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSInputStream, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool scanUpToCharactersFromSet_intoString_( - NSCharacterSet set, ffi.Pointer> result) { - return _lib._objc_msgSend_830( - _id, _lib._sel_scanUpToCharactersFromSet_intoString_1, set._id, result); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSInputStream, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - bool get atEnd { - return _lib._objc_msgSend_12(_id, _lib._sel_isAtEnd1); - } +late final _class_NSInputStream = objc.getClass("NSInputStream"); - static NSScanner scannerWithString_(SwiftLibrary _lib, NSString string) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSScanner1, _lib._sel_scannerWithString_1, string._id); - return NSScanner._(_ret, _lib, retain: true, release: true); - } +class NSStream extends objc.NSObject { + NSStream._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSStream] that points to the same underlying object as [other]. + NSStream.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSStream] that wraps the given raw object pointer. + NSStream.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static NSObject localizedScannerWithString_( - SwiftLibrary _lib, NSString string) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSScanner1, - _lib._sel_localizedScannerWithString_1, string._id); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSStream]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSStream); } - bool scanDecimal_(ffi.Pointer dcm) { - return _lib._objc_msgSend_831(_id, _lib._sel_scanDecimal_1, dcm); + void open() { + _objc_msgSend_82(this.pointer, _sel_open); } - @override - NSScanner init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSScanner._(_ret, _lib, retain: true, release: true); + void close() { + _objc_msgSend_82(this.pointer, _sel_close); } - static NSScanner new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSScanner1, _lib._sel_new1); - return NSScanner._(_ret, _lib, retain: false, release: true); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSScanner allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSScanner1, _lib._sel_allocWithZone_1, zone); - return NSScanner._(_ret, _lib, retain: false, release: true); + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } - static NSScanner alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSScanner1, _lib._sel_alloc1); - return NSScanner._(_ret, _lib, retain: false, release: true); + objc.NSObject? propertyForKey_(objc.NSString key) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_propertyForKey_, key.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSScanner1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + bool setProperty_forKey_(objc.NSObject? property, objc.NSString key) { + return _objc_msgSend_326(this.pointer, _sel_setProperty_forKey_, + property?.pointer ?? ffi.nullptr, key.pointer); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSScanner1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_scheduleInRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSScanner1, _lib._sel_accessInstanceVariablesDirectly1); + void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_removeFromRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSScanner1, _lib._sel_useStoredAccessor1); + int get streamStatus { + return _objc_msgSend_327(this.pointer, _sel_streamStatus); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSScanner1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + objc.NSError? get streamError { + final _ret = _objc_msgSend_328(this.pointer, _sel_streamError); + return _ret.address == 0 + ? null + : objc.NSError.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSScanner1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static void getStreamsToHostWithName_port_inputStream_outputStream_( + objc.NSString hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_333( + _class_NSStream, + _sel_getStreamsToHostWithName_port_inputStream_outputStream_, + hostname.pointer, + port, + inputStream, + outputStream); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSScanner1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static void getStreamsToHost_port_inputStream_outputStream_( + NSHost host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_337( + _class_NSStream, + _sel_getStreamsToHost_port_inputStream_outputStream_, + host.pointer, + port, + inputStream, + outputStream); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSScanner1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_338( + _class_NSStream, + _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, + bufferSize, + inputStream, + outputStream); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSScanner1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + @override + NSStream init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSStream.castFromPointer(_ret, retain: true, release: true); } -} -final class NSDecimal extends ffi.Opaque {} + static NSStream new1() { + final _ret = _objc_msgSend_40(_class_NSStream, _sel_new); + return NSStream.castFromPointer(_ret, retain: false, release: true); + } -class NSException extends NSObject { - NSException._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + static NSStream allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSStream, _sel_allocWithZone_, zone); + return NSStream.castFromPointer(_ret, retain: false, release: true); + } - /// 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); + static NSStream alloc() { + final _ret = _objc_msgSend_40(_class_NSStream, _sel_alloc); + return NSStream.castFromPointer(_ret, retain: false, release: true); } - /// Returns a [NSException] that wraps the given raw object pointer. - static NSException castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSException._(other, lib, retain: retain, release: release); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSStream, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - /// Returns whether [obj] is an instance of [NSException]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSException1); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSStream, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static NSException exceptionWithName_reason_userInfo_(SwiftLibrary _lib, - NSString name, NSString? reason, NSDictionary? userInfo) { - final _ret = _lib._objc_msgSend_832( - _lib._class_NSException1, - _lib._sel_exceptionWithName_reason_userInfo_1, - name._id, - reason?._id ?? ffi.nullptr, - userInfo?._id ?? ffi.nullptr); - return NSException._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSStream, _sel_accessInstanceVariablesDirectly); } - NSException initWithName_reason_userInfo_( - NSString aName, NSString? aReason, NSDictionary? aUserInfo) { - final _ret = _lib._objc_msgSend_833( - _id, - _lib._sel_initWithName_reason_userInfo_1, - aName._id, - aReason?._id ?? ffi.nullptr, - aUserInfo?._id ?? ffi.nullptr); - return NSException._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSStream, _sel_useStoredAccessor); } - NSString get name { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_name1); - return NSString._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSStream, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSString? get reason { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_reason1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSStream, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_userInfo1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSStream, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - NSArray get callStackReturnAddresses { + static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = - _lib._objc_msgSend_85(_id, _lib._sel_callStackReturnAddresses1); - return NSArray._(_ret, _lib, retain: true, release: true); + _objc_msgSend_6(_class_NSStream, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSArray get callStackSymbols { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_callStackSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSStream, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - void raise() { - _lib._objc_msgSend_1(_id, _lib._sel_raise1); - } +late final _class_NSStream = objc.getClass("NSStream"); +late final _sel_open = objc.registerName("open"); +late final _sel_close = objc.registerName("close"); +late final _sel_propertyForKey_ = objc.registerName("propertyForKey:"); +late final _sel_setProperty_forKey_ = objc.registerName("setProperty:forKey:"); +final _objc_msgSend_326 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - static void raise_format_(SwiftLibrary _lib, NSString name, NSString format) { - _lib._objc_msgSend_551(_lib._class_NSException1, _lib._sel_raise_format_1, - name._id, format._id); - } +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; +} - static void raise_format_arguments_(SwiftLibrary _lib, NSString name, - NSString format, ffi.Pointer<__va_list_tag> argList) { - _lib._objc_msgSend_834(_lib._class_NSException1, - _lib._sel_raise_format_arguments_1, name._id, format._id, argList); - } +late final _sel_streamStatus = objc.registerName("streamStatus"); +final _objc_msgSend_327 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_streamError = objc.registerName("streamError"); +final _objc_msgSend_328 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - @override - NSException init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSException._(_ret, _lib, retain: true, release: true); - } +class NSOutputStream extends NSStream { + NSOutputStream._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - static NSException new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_new1); - return NSException._(_ret, _lib, retain: false, release: true); - } + /// Constructs a [NSOutputStream] that points to the same underlying object as [other]. + NSOutputStream.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - static NSException allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSException1, _lib._sel_allocWithZone_1, zone); - return NSException._(_ret, _lib, retain: false, release: true); - } + /// Constructs a [NSOutputStream] that wraps the given raw object pointer. + NSOutputStream.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static NSException alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_alloc1); - return NSException._(_ret, _lib, retain: false, release: true); + /// Returns whether [obj] is an instance of [NSOutputStream]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSOutputStream); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSException1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + int write_maxLength_(ffi.Pointer buffer, int len) { + return _objc_msgSend_329(this.pointer, _sel_write_maxLength_, buffer, len); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSException1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + bool get hasSpaceAvailable { + return _objc_msgSend_7(this.pointer, _sel_hasSpaceAvailable); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSException1, _lib._sel_accessInstanceVariablesDirectly1); + NSOutputStream initToMemory() { + final _ret = _objc_msgSend_40(this.pointer, _sel_initToMemory); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSException1, _lib._sel_useStoredAccessor1); + NSOutputStream initToBuffer_capacity_( + ffi.Pointer buffer, int capacity) { + final _ret = _objc_msgSend_330( + this.pointer, _sel_initToBuffer_capacity_, buffer, capacity); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSException1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + NSOutputStream? initWithURL_append_(objc.NSURL url, bool shouldAppend) { + final _ret = _objc_msgSend_331( + this.pointer, _sel_initWithURL_append_, url.pointer, shouldAppend); + return _ret.address == 0 + ? null + : NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSException1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + NSOutputStream? initToFileAtPath_append_( + objc.NSString path, bool shouldAppend) { + final _ret = _objc_msgSend_332(this.pointer, _sel_initToFileAtPath_append_, + path.pointer, shouldAppend); + return _ret.address == 0 + ? null + : NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSException1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static NSOutputStream outputStreamToMemory() { + final _ret = + _objc_msgSend_40(_class_NSOutputStream, _sel_outputStreamToMemory); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSException1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSOutputStream outputStreamToBuffer_capacity_( + ffi.Pointer buffer, int capacity) { + final _ret = _objc_msgSend_330(_class_NSOutputStream, + _sel_outputStreamToBuffer_capacity_, buffer, capacity); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSException1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSOutputStream outputStreamToFileAtPath_append_( + objc.NSString path, bool shouldAppend) { + final _ret = _objc_msgSend_164(_class_NSOutputStream, + _sel_outputStreamToFileAtPath_append_, path.pointer, shouldAppend); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } -} -class NSFileHandle extends NSObject { - NSFileHandle._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + static NSOutputStream? outputStreamWithURL_append_( + objc.NSURL url, bool shouldAppend) { + final _ret = _objc_msgSend_331(_class_NSOutputStream, + _sel_outputStreamWithURL_append_, url.pointer, shouldAppend); + return _ret.address == 0 + ? null + : NSOutputStream.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a [NSFileHandle] that points to the same underlying object as [other]. - static NSFileHandle castFrom(T other) { - return NSFileHandle._(other._id, other._lib, retain: true, release: true); + static void getStreamsToHostWithName_port_inputStream_outputStream_( + objc.NSString hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_333( + _class_NSOutputStream, + _sel_getStreamsToHostWithName_port_inputStream_outputStream_, + hostname.pointer, + port, + inputStream, + outputStream); } - /// Returns a [NSFileHandle] that wraps the given raw object pointer. - static NSFileHandle castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSFileHandle._(other, lib, retain: retain, release: release); + static void getStreamsToHost_port_inputStream_outputStream_( + NSHost host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_337( + _class_NSOutputStream, + _sel_getStreamsToHost_port_inputStream_outputStream_, + host.pointer, + port, + inputStream, + outputStream); } - /// Returns whether [obj] is an instance of [NSFileHandle]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSFileHandle1); + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_338( + _class_NSOutputStream, + _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, + bufferSize, + inputStream, + outputStream); } - NSData get availableData { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_availableData1); - return NSData._(_ret, _lib, retain: true, release: true); + @override + NSOutputStream init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - NSFileHandle initWithFileDescriptor_closeOnDealloc_(int fd, bool closeopt) { - final _ret = _lib._objc_msgSend_835( - _id, _lib._sel_initWithFileDescriptor_closeOnDealloc_1, fd, closeopt); - return NSFileHandle._(_ret, _lib, retain: true, release: true); + static NSOutputStream new1() { + final _ret = _objc_msgSend_40(_class_NSOutputStream, _sel_new); + return NSOutputStream.castFromPointer(_ret, retain: false, release: true); } - NSFileHandle? initWithCoder_(NSCoder coder) { + static NSOutputStream allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSFileHandle._(_ret, _lib, retain: true, release: true); + _objc_msgSend_47(_class_NSOutputStream, _sel_allocWithZone_, zone); + return NSOutputStream.castFromPointer(_ret, retain: false, release: true); } - NSData? readDataToEndOfFileAndReturnError_( - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_836( - _id, _lib._sel_readDataToEndOfFileAndReturnError_1, error); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + static NSOutputStream alloc() { + final _ret = _objc_msgSend_40(_class_NSOutputStream, _sel_alloc); + return NSOutputStream.castFromPointer(_ret, retain: false, release: true); } - NSData? readDataUpToLength_error_( - int length, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_837( - _id, _lib._sel_readDataUpToLength_error_1, length, error); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSOutputStream, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - bool writeData_error_( - NSData data, ffi.Pointer> error) { - return _lib._objc_msgSend_838( - _id, _lib._sel_writeData_error_1, data._id, error); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSOutputStream, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - bool getOffset_error_(ffi.Pointer offsetInFile, - ffi.Pointer> error) { - return _lib._objc_msgSend_839( - _id, _lib._sel_getOffset_error_1, offsetInFile, error); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSOutputStream, _sel_accessInstanceVariablesDirectly); } - bool seekToEndReturningOffset_error_( - ffi.Pointer offsetInFile, - ffi.Pointer> error) { - return _lib._objc_msgSend_839( - _id, _lib._sel_seekToEndReturningOffset_error_1, offsetInFile, error); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSOutputStream, _sel_useStoredAccessor); } - bool seekToOffset_error_( - int offset, ffi.Pointer> error) { - return _lib._objc_msgSend_840( - _id, _lib._sel_seekToOffset_error_1, offset, error); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSOutputStream, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - bool truncateAtOffset_error_( - int offset, ffi.Pointer> error) { - return _lib._objc_msgSend_840( - _id, _lib._sel_truncateAtOffset_error_1, offset, error); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSOutputStream, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - bool synchronizeAndReturnError_(ffi.Pointer> error) { - return _lib._objc_msgSend_255( - _id, _lib._sel_synchronizeAndReturnError_1, error); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSOutputStream, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSOutputStream, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSOutputStream, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSOutputStream = objc.getClass("NSOutputStream"); +late final _sel_write_maxLength_ = objc.registerName("write:maxLength:"); +final _objc_msgSend_329 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); +late final _sel_hasSpaceAvailable = objc.registerName("hasSpaceAvailable"); +late final _sel_initToMemory = objc.registerName("initToMemory"); +late final _sel_initToBuffer_capacity_ = + objc.registerName("initToBuffer:capacity:"); +final _objc_msgSend_330 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); +late final _sel_initWithURL_append_ = objc.registerName("initWithURL:append:"); +final _objc_msgSend_331 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_initToFileAtPath_append_ = + objc.registerName("initToFileAtPath:append:"); +final _objc_msgSend_332 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_outputStreamToMemory = + objc.registerName("outputStreamToMemory"); +late final _sel_outputStreamToBuffer_capacity_ = + objc.registerName("outputStreamToBuffer:capacity:"); +late final _sel_outputStreamToFileAtPath_append_ = + objc.registerName("outputStreamToFileAtPath:append:"); +late final _sel_outputStreamWithURL_append_ = + objc.registerName("outputStreamWithURL:append:"); +late final _sel_getStreamsToHostWithName_port_inputStream_outputStream_ = objc + .registerName("getStreamsToHostWithName:port:inputStream:outputStream:"); +final _objc_msgSend_333 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer>, + ffi.Pointer>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>)>(); + +class NSHost extends objc.NSObject { + NSHost._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - bool closeAndReturnError_(ffi.Pointer> error) { - return _lib._objc_msgSend_255(_id, _lib._sel_closeAndReturnError_1, error); - } + /// Constructs a [NSHost] that points to the same underlying object as [other]. + NSHost.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSHost] that wraps the given raw object pointer. + NSHost.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static NSFileHandle getFileHandleWithStandardInput(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_841( - _lib._class_NSFileHandle1, _lib._sel_fileHandleWithStandardInput1); - return NSFileHandle._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSHost]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSHost); } - static NSFileHandle getFileHandleWithStandardOutput(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_841( - _lib._class_NSFileHandle1, _lib._sel_fileHandleWithStandardOutput1); - return NSFileHandle._(_ret, _lib, retain: true, release: true); + static NSHost currentHost() { + final _ret = _objc_msgSend_40(_class_NSHost, _sel_currentHost); + return NSHost.castFromPointer(_ret, retain: true, release: true); } - static NSFileHandle getFileHandleWithStandardError(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_841( - _lib._class_NSFileHandle1, _lib._sel_fileHandleWithStandardError1); - return NSFileHandle._(_ret, _lib, retain: true, release: true); + static NSHost hostWithName_(objc.NSString? name) { + final _ret = _objc_msgSend_334( + _class_NSHost, _sel_hostWithName_, name?.pointer ?? ffi.nullptr); + return NSHost.castFromPointer(_ret, retain: true, release: true); } - static NSFileHandle getFileHandleWithNullDevice(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_841( - _lib._class_NSFileHandle1, _lib._sel_fileHandleWithNullDevice1); - return NSFileHandle._(_ret, _lib, retain: true, release: true); + static NSHost hostWithAddress_(objc.NSString address) { + final _ret = + _objc_msgSend_35(_class_NSHost, _sel_hostWithAddress_, address.pointer); + return NSHost.castFromPointer(_ret, retain: true, release: true); } - static NSFileHandle? fileHandleForReadingAtPath_( - SwiftLibrary _lib, NSString path) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSFileHandle1, - _lib._sel_fileHandleForReadingAtPath_1, path._id); - return _ret.address == 0 - ? null - : NSFileHandle._(_ret, _lib, retain: true, release: true); + bool isEqualToHost_(NSHost aHost) { + return _objc_msgSend_335(this.pointer, _sel_isEqualToHost_, aHost.pointer); } - static NSFileHandle? fileHandleForWritingAtPath_( - SwiftLibrary _lib, NSString path) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSFileHandle1, - _lib._sel_fileHandleForWritingAtPath_1, path._id); + objc.NSString? get name { + final _ret = _objc_msgSend_13(this.pointer, _sel_name); return _ret.address == 0 ? null - : NSFileHandle._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSFileHandle? fileHandleForUpdatingAtPath_( - SwiftLibrary _lib, NSString path) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSFileHandle1, - _lib._sel_fileHandleForUpdatingAtPath_1, path._id); - return _ret.address == 0 - ? null - : NSFileHandle._(_ret, _lib, retain: true, release: true); + objc.NSArray get names { + final _ret = _objc_msgSend_6(this.pointer, _sel_names); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSFileHandle? fileHandleForReadingFromURL_error_(SwiftLibrary _lib, - NSURL url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_842(_lib._class_NSFileHandle1, - _lib._sel_fileHandleForReadingFromURL_error_1, url._id, error); + objc.NSString? get address { + final _ret = _objc_msgSend_13(this.pointer, _sel_address); return _ret.address == 0 ? null - : NSFileHandle._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSFileHandle? fileHandleForWritingToURL_error_(SwiftLibrary _lib, - NSURL url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_842(_lib._class_NSFileHandle1, - _lib._sel_fileHandleForWritingToURL_error_1, url._id, error); - return _ret.address == 0 - ? null - : NSFileHandle._(_ret, _lib, retain: true, release: true); + objc.NSArray get addresses { + final _ret = _objc_msgSend_6(this.pointer, _sel_addresses); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSFileHandle? fileHandleForUpdatingURL_error_(SwiftLibrary _lib, - NSURL url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_842(_lib._class_NSFileHandle1, - _lib._sel_fileHandleForUpdatingURL_error_1, url._id, error); + objc.NSString? get localizedName { + final _ret = _objc_msgSend_13(this.pointer, _sel_localizedName); return _ret.address == 0 ? null - : NSFileHandle._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void readInBackgroundAndNotifyForModes_(NSArray? modes) { - _lib._objc_msgSend_843(_id, _lib._sel_readInBackgroundAndNotifyForModes_1, - modes?._id ?? ffi.nullptr); + static void setHostCacheEnabled_(bool flag) { + _objc_msgSend_336(_class_NSHost, _sel_setHostCacheEnabled_, flag); } - void readInBackgroundAndNotify() { - _lib._objc_msgSend_1(_id, _lib._sel_readInBackgroundAndNotify1); + static bool isHostCacheEnabled() { + return _objc_msgSend_7(_class_NSHost, _sel_isHostCacheEnabled); } - void readToEndOfFileInBackgroundAndNotifyForModes_(NSArray? modes) { - _lib._objc_msgSend_843( - _id, - _lib._sel_readToEndOfFileInBackgroundAndNotifyForModes_1, - modes?._id ?? ffi.nullptr); + static void flushHostCache() { + _objc_msgSend_82(_class_NSHost, _sel_flushHostCache); } - void readToEndOfFileInBackgroundAndNotify() { - _lib._objc_msgSend_1(_id, _lib._sel_readToEndOfFileInBackgroundAndNotify1); + @override + NSHost init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSHost.castFromPointer(_ret, retain: true, release: true); } - void acceptConnectionInBackgroundAndNotifyForModes_(NSArray? modes) { - _lib._objc_msgSend_843( - _id, - _lib._sel_acceptConnectionInBackgroundAndNotifyForModes_1, - modes?._id ?? ffi.nullptr); + static NSHost new1() { + final _ret = _objc_msgSend_40(_class_NSHost, _sel_new); + return NSHost.castFromPointer(_ret, retain: false, release: true); } - void acceptConnectionInBackgroundAndNotify() { - _lib._objc_msgSend_1(_id, _lib._sel_acceptConnectionInBackgroundAndNotify1); + static NSHost allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSHost, _sel_allocWithZone_, zone); + return NSHost.castFromPointer(_ret, retain: false, release: true); } - void waitForDataInBackgroundAndNotifyForModes_(NSArray? modes) { - _lib._objc_msgSend_843( - _id, - _lib._sel_waitForDataInBackgroundAndNotifyForModes_1, - modes?._id ?? ffi.nullptr); + static NSHost alloc() { + final _ret = _objc_msgSend_40(_class_NSHost, _sel_alloc); + return NSHost.castFromPointer(_ret, retain: false, release: true); } - void waitForDataInBackgroundAndNotify() { - _lib._objc_msgSend_1(_id, _lib._sel_waitForDataInBackgroundAndNotify1); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSHost, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - ObjCBlock_ffiVoid_NSFileHandle? get readabilityHandler { - final _ret = _lib._objc_msgSend_844(_id, _lib._sel_readabilityHandler1); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid_NSFileHandle._(_ret, _lib, - retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSHost, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - set readabilityHandler(ObjCBlock_ffiVoid_NSFileHandle? value) { - return _lib._objc_msgSend_845( - _id, _lib._sel_setReadabilityHandler_1, value?._id ?? ffi.nullptr); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7(_class_NSHost, _sel_accessInstanceVariablesDirectly); } - ObjCBlock_ffiVoid_NSFileHandle? get writeabilityHandler { - final _ret = _lib._objc_msgSend_844(_id, _lib._sel_writeabilityHandler1); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid_NSFileHandle._(_ret, _lib, - retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSHost, _sel_useStoredAccessor); } - set writeabilityHandler(ObjCBlock_ffiVoid_NSFileHandle? value) { - return _lib._objc_msgSend_845( - _id, _lib._sel_setWriteabilityHandler_1, value?._id ?? ffi.nullptr); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSHost, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSFileHandle initWithFileDescriptor_(int fd) { - final _ret = - _lib._objc_msgSend_846(_id, _lib._sel_initWithFileDescriptor_1, fd); - return NSFileHandle._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51( + _class_NSHost, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - int get fileDescriptor { - return _lib._objc_msgSend_237(_id, _lib._sel_fileDescriptor1); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSHost, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSHost, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40(_class_NSHost, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSHost = objc.getClass("NSHost"); +late final _sel_currentHost = objc.registerName("currentHost"); +late final _sel_hostWithName_ = objc.registerName("hostWithName:"); +final _objc_msgSend_334 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_hostWithAddress_ = objc.registerName("hostWithAddress:"); +late final _sel_isEqualToHost_ = objc.registerName("isEqualToHost:"); +final _objc_msgSend_335 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_names = objc.registerName("names"); +late final _sel_address = objc.registerName("address"); +late final _sel_addresses = objc.registerName("addresses"); +late final _sel_localizedName = objc.registerName("localizedName"); +late final _sel_setHostCacheEnabled_ = + objc.registerName("setHostCacheEnabled:"); +final _objc_msgSend_336 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, bool)>(); +late final _sel_isHostCacheEnabled = objc.registerName("isHostCacheEnabled"); +late final _sel_flushHostCache = objc.registerName("flushHostCache"); +late final _sel_getStreamsToHost_port_inputStream_outputStream_ = + objc.registerName("getStreamsToHost:port:inputStream:outputStream:"); +final _objc_msgSend_337 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer>, + ffi.Pointer>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>)>(); +late final _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_ = objc + .registerName("getBoundStreamsWithBufferSize:inputStream:outputStream:"); +final _objc_msgSend_338 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer>, + ffi.Pointer>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>)>(); +late final _sel_read_maxLength_ = objc.registerName("read:maxLength:"); +late final _sel_getBuffer_length_ = objc.registerName("getBuffer:length:"); +final _objc_msgSend_339 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>(); +late final _sel_hasBytesAvailable = objc.registerName("hasBytesAvailable"); +late final _sel_initWithData_ = objc.registerName("initWithData:"); +final _objc_msgSend_340 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithFileAtPath_ = objc.registerName("initWithFileAtPath:"); +late final _sel_inputStreamWithData_ = + objc.registerName("inputStreamWithData:"); +final _objc_msgSend_341 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_inputStreamWithFileAtPath_ = + objc.registerName("inputStreamWithFileAtPath:"); +late final _sel_inputStreamWithURL_ = objc.registerName("inputStreamWithURL:"); +late final _sel_HTTPBodyStream = objc.registerName("HTTPBodyStream"); +final _objc_msgSend_342 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_HTTPShouldHandleCookies = + objc.registerName("HTTPShouldHandleCookies"); +late final _sel_HTTPShouldUsePipelining = + objc.registerName("HTTPShouldUsePipelining"); +late final _sel_originalRequest = objc.registerName("originalRequest"); +final _objc_msgSend_343 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_currentRequest = objc.registerName("currentRequest"); + +class NSURLResponse extends objc.NSObject { + NSURLResponse._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSData readDataToEndOfFile() { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_readDataToEndOfFile1); - return NSData._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSURLResponse] that points to the same underlying object as [other]. + NSURLResponse.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSData readDataOfLength_(int length) { - final _ret = - _lib._objc_msgSend_847(_id, _lib._sel_readDataOfLength_1, length); - return NSData._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSURLResponse] that wraps the given raw object pointer. + NSURLResponse.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - void writeData_(NSData data) { - _lib._objc_msgSend_285(_id, _lib._sel_writeData_1, data._id); + /// Returns whether [obj] is an instance of [NSURLResponse]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLResponse); } - int get offsetInFile { - return _lib._objc_msgSend_164(_id, _lib._sel_offsetInFile1); + NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( + objc.NSURL URL, + objc.NSString? MIMEType, + int length, + objc.NSString? name) { + final _ret = _objc_msgSend_344( + this.pointer, + _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_, + URL.pointer, + MIMEType?.pointer ?? ffi.nullptr, + length, + name?.pointer ?? ffi.nullptr); + return NSURLResponse.castFromPointer(_ret, retain: true, release: true); } - int seekToEndOfFile() { - return _lib._objc_msgSend_164(_id, _lib._sel_seekToEndOfFile1); + objc.NSURL? get URL { + final _ret = _objc_msgSend_10(this.pointer, _sel_URL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void seekToFileOffset_(int offset) { - _lib._objc_msgSend_848(_id, _lib._sel_seekToFileOffset_1, offset); + objc.NSString? get MIMEType { + final _ret = _objc_msgSend_13(this.pointer, _sel_MIMEType); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void truncateFileAtOffset_(int offset) { - _lib._objc_msgSend_848(_id, _lib._sel_truncateFileAtOffset_1, offset); + int get expectedContentLength { + return _objc_msgSend_345(this.pointer, _sel_expectedContentLength); } - void synchronizeFile() { - _lib._objc_msgSend_1(_id, _lib._sel_synchronizeFile1); + objc.NSString? get textEncodingName { + final _ret = _objc_msgSend_13(this.pointer, _sel_textEncodingName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void closeFile() { - _lib._objc_msgSend_1(_id, _lib._sel_closeFile1); + objc.NSString? get suggestedFilename { + final _ret = _objc_msgSend_13(this.pointer, _sel_suggestedFilename); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } @override - NSFileHandle init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSFileHandle._(_ret, _lib, retain: true, release: true); + NSURLResponse init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLResponse.castFromPointer(_ret, retain: true, release: true); } - static NSFileHandle new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFileHandle1, _lib._sel_new1); - return NSFileHandle._(_ret, _lib, retain: false, release: true); + static NSURLResponse new1() { + final _ret = _objc_msgSend_40(_class_NSURLResponse, _sel_new); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } - static NSFileHandle allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSFileHandle1, _lib._sel_allocWithZone_1, zone); - return NSFileHandle._(_ret, _lib, retain: false, release: true); + static NSURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLResponse, _sel_allocWithZone_, zone); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } - static NSFileHandle alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFileHandle1, _lib._sel_alloc1); - return NSFileHandle._(_ret, _lib, retain: false, release: true); + static NSURLResponse alloc() { + final _ret = _objc_msgSend_40(_class_NSURLResponse, _sel_alloc); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSFileHandle1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLResponse, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSFileHandle1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLResponse, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSFileHandle1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLResponse, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSFileHandle1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLResponse, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSFileHandle1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLResponse, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSFileHandle1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLResponse, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSFileHandle1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSFileHandle1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLResponse, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLResponse, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLResponse, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSURLResponse = objc.getClass("NSURLResponse"); +late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_ = + objc.registerName( + "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); +final _objc_msgSend_344 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_MIMEType = objc.registerName("MIMEType"); +late final _sel_expectedContentLength = + objc.registerName("expectedContentLength"); +final _objc_msgSend_345 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.LongLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_textEncodingName = objc.registerName("textEncodingName"); +late final _sel_suggestedFilename = objc.registerName("suggestedFilename"); +late final _sel_response = objc.registerName("response"); +final _objc_msgSend_346 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_progress = objc.registerName("progress"); +final _objc_msgSend_347 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_earliestBeginDate = objc.registerName("earliestBeginDate"); +late final _sel_setEarliestBeginDate_ = + objc.registerName("setEarliestBeginDate:"); +late final _sel_countOfBytesClientExpectsToSend = + objc.registerName("countOfBytesClientExpectsToSend"); +final _objc_msgSend_348 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int64 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCountOfBytesClientExpectsToSend_ = + objc.registerName("setCountOfBytesClientExpectsToSend:"); +final _objc_msgSend_349 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int64)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_countOfBytesClientExpectsToReceive = + objc.registerName("countOfBytesClientExpectsToReceive"); +late final _sel_setCountOfBytesClientExpectsToReceive_ = + objc.registerName("setCountOfBytesClientExpectsToReceive:"); +late final _sel_countOfBytesSent = objc.registerName("countOfBytesSent"); +late final _sel_countOfBytesReceived = + objc.registerName("countOfBytesReceived"); +late final _sel_countOfBytesExpectedToSend = + objc.registerName("countOfBytesExpectedToSend"); +late final _sel_countOfBytesExpectedToReceive = + objc.registerName("countOfBytesExpectedToReceive"); +late final _sel_taskDescription = objc.registerName("taskDescription"); +late final _sel_setTaskDescription_ = objc.registerName("setTaskDescription:"); +late final _sel_cancel = objc.registerName("cancel"); - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSFileHandle1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +abstract class NSURLSessionTaskState { + static const int NSURLSessionTaskStateRunning = 0; + static const int NSURLSessionTaskStateSuspended = 1; + static const int NSURLSessionTaskStateCanceling = 2; + static const int NSURLSessionTaskStateCompleted = 3; } -void _ObjCBlock_ffiVoid_NSFileHandle_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => +late final _sel_state = objc.registerName("state"); +final _objc_msgSend_350 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_error = objc.registerName("error"); +late final _sel_suspend = objc.registerName("suspend"); +late final _sel_resume = objc.registerName("resume"); +late final _sel_priority = objc.registerName("priority"); +final _objc_msgSend_351 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_351Fpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setPriority_ = objc.registerName("setPriority:"); +final _objc_msgSend_352 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Float)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, double)>(); +late final _sel_prefersIncrementalDelivery = + objc.registerName("prefersIncrementalDelivery"); +late final _sel_setPrefersIncrementalDelivery_ = + objc.registerName("setPrefersIncrementalDelivery:"); +late final _sel_storeCookies_forTask_ = + objc.registerName("storeCookies:forTask:"); +final _objc_msgSend_353 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => block.ref.target .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSFileHandle_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSFileHandle_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry[id] = fn; + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSArray_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSArray_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSArray_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSArray_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSArray_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry[block.ref.target.address]!( - arg0); +void _ObjCBlock_ffiVoid_NSArray_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSArray_closureRegistry[block.ref.target.address]!(arg0); -class ObjCBlock_ffiVoid_NSFileHandle extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSFileHandle._(ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, +class ObjCBlock_ffiVoid_NSArray extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSArray._(ffi.Pointer pointer, {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSFileHandle castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSFileHandle._(pointer, lib, + static ObjCBlock_ffiVoid_NSArray castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSArray._(pointer, retain: retain, release: release); } @@ -60950,22 +16088,18 @@ class ObjCBlock_ffiVoid_NSFileHandle extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSFileHandle.fromFunctionPointer( - SwiftLibrary lib, + ObjCBlock_ffiVoid_NSArray.fromFunctionPointer( ffi.Pointer< - ffi - .NativeFunction arg0)>> + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> ptr) - : this._( - lib - ._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSFileHandle_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline) + .cast(), + ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. @@ -60973,20 +16107,18 @@ class ObjCBlock_ffiVoid_NSFileHandle extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSFileHandle.fromFunction( - SwiftLibrary lib, void Function(NSFileHandle) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSFileHandle_registerClosure((ffi - .Pointer - arg0) => - fn(NSFileHandle._(arg0, lib, retain: true, release: true)))), - lib); + ObjCBlock_ffiVoid_NSArray.fromFunction(void Function(objc.NSArray?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSArray_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSArray.castFromPointer(arg0, + retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -60998,4133 +16130,6859 @@ class ObjCBlock_ffiVoid_NSFileHandle extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSFileHandle.listener( - SwiftLibrary lib, void Function(NSFileHandle) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( - (ffi.Pointer arg0) => fn(NSFileHandle._( - arg0, lib, - retain: true, release: true)))), - lib); + ObjCBlock_ffiVoid_NSArray.listener(void Function(objc.NSArray?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSArray_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSArray.castFromPointer(arg0, retain: true, release: true))))); static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? _dartFuncListenerTrampoline; - void call(NSFileHandle arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0._id); -} - -class NSHTTPCookieStorage extends NSObject { - NSHTTPCookieStorage._(ffi.Pointer id, SwiftLibrary lib, + void call(objc.NSArray? arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr); +} + +late final _sel_getCookiesForTask_completionHandler_ = + objc.registerName("getCookiesForTask:completionHandler:"); +final _objc_msgSend_354 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +class NSIndexPath extends objc.NSObject { + NSIndexPath._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSHTTPCookieStorage] that points to the same underlying object as [other]. - static NSHTTPCookieStorage castFrom(T other) { - return NSHTTPCookieStorage._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSHTTPCookieStorage] that wraps the given raw object pointer. - static NSHTTPCookieStorage castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHTTPCookieStorage._(other, lib, retain: retain, release: release); - } + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSHTTPCookieStorage]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSHTTPCookieStorage1); - } + /// Constructs a [NSIndexPath] that points to the same underlying object as [other]. + NSIndexPath.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - static NSHTTPCookieStorage getSharedHTTPCookieStorage(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_849( - _lib._class_NSHTTPCookieStorage1, _lib._sel_sharedHTTPCookieStorage1); - return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSIndexPath] that wraps the given raw object pointer. + NSIndexPath.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( - SwiftLibrary _lib, NSString identifier) { - final _ret = _lib._objc_msgSend_850( - _lib._class_NSHTTPCookieStorage1, - _lib._sel_sharedCookieStorageForGroupContainerIdentifier_1, - identifier._id); - return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSIndexPath]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSIndexPath); } - NSArray? get cookies { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_cookies1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + static NSIndexPath indexPathWithIndex_(int index) { + final _ret = + _objc_msgSend_355(_class_NSIndexPath, _sel_indexPathWithIndex_, index); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - void setCookie_(NSHTTPCookie cookie) { - _lib._objc_msgSend_854(_id, _lib._sel_setCookie_1, cookie._id); + static NSIndexPath indexPathWithIndexes_length_( + ffi.Pointer indexes, int length) { + final _ret = _objc_msgSend_356( + _class_NSIndexPath, _sel_indexPathWithIndexes_length_, indexes, length); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - void deleteCookie_(NSHTTPCookie cookie) { - _lib._objc_msgSend_854(_id, _lib._sel_deleteCookie_1, cookie._id); + NSIndexPath initWithIndexes_length_( + ffi.Pointer indexes, int length) { + final _ret = _objc_msgSend_356( + this.pointer, _sel_initWithIndexes_length_, indexes, length); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - void removeCookiesSinceDate_(NSDate date) { - _lib._objc_msgSend_540(_id, _lib._sel_removeCookiesSinceDate_1, date._id); + NSIndexPath initWithIndex_(int index) { + final _ret = _objc_msgSend_355(this.pointer, _sel_initWithIndex_, index); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - NSArray? cookiesForURL_(NSURL URL) { + NSIndexPath indexPathByAddingIndex_(int index) { final _ret = - _lib._objc_msgSend_133(_id, _lib._sel_cookiesForURL_1, URL._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + _objc_msgSend_357(this.pointer, _sel_indexPathByAddingIndex_, index); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - void setCookies_forURL_mainDocumentURL_( - NSArray cookies, NSURL? URL, NSURL? mainDocumentURL) { - _lib._objc_msgSend_855( - _id, - _lib._sel_setCookies_forURL_mainDocumentURL_1, - cookies._id, - URL?._id ?? ffi.nullptr, - mainDocumentURL?._id ?? ffi.nullptr); + NSIndexPath indexPathByRemovingLastIndex() { + final _ret = + _objc_msgSend_358(this.pointer, _sel_indexPathByRemovingLastIndex); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - int get cookieAcceptPolicy { - return _lib._objc_msgSend_856(_id, _lib._sel_cookieAcceptPolicy1); + int indexAtPosition_(int position) { + return _objc_msgSend_359(this.pointer, _sel_indexAtPosition_, position); } - set cookieAcceptPolicy(int value) { - return _lib._objc_msgSend_857( - _id, _lib._sel_setCookieAcceptPolicy_1, value); + int get length { + return _objc_msgSend_29(this.pointer, _sel_length); } - NSArray sortedCookiesUsingDescriptors_(NSArray sortOrder) { - final _ret = _lib._objc_msgSend_68( - _id, _lib._sel_sortedCookiesUsingDescriptors_1, sortOrder._id); - return NSArray._(_ret, _lib, retain: true, release: true); + void getIndexes_range_( + ffi.Pointer indexes, _NSRange positionRange) { + _objc_msgSend_360( + this.pointer, _sel_getIndexes_range_, indexes, positionRange); } - void storeCookies_forTask_(NSArray cookies, NSURLSessionTask task) { - _lib._objc_msgSend_882( - _id, _lib._sel_storeCookies_forTask_1, cookies._id, task._id); + int compare_(NSIndexPath otherObject) { + return _objc_msgSend_361(this.pointer, _sel_compare_, otherObject.pointer); } - void getCookiesForTask_completionHandler_( - NSURLSessionTask task, ObjCBlock_ffiVoid_NSArray completionHandler) { - _lib._objc_msgSend_883(_id, _lib._sel_getCookiesForTask_completionHandler_1, - task._id, completionHandler._id); + void getIndexes_(ffi.Pointer indexes) { + _objc_msgSend_362(this.pointer, _sel_getIndexes_, indexes); } @override - NSHTTPCookieStorage init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + NSIndexPath init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - static NSHTTPCookieStorage new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSHTTPCookieStorage1, _lib._sel_new1); - return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + static NSIndexPath new1() { + final _ret = _objc_msgSend_40(_class_NSIndexPath, _sel_new); + return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } - static NSHTTPCookieStorage allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSHTTPCookieStorage1, _lib._sel_allocWithZone_1, zone); - return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + static NSIndexPath allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSIndexPath, _sel_allocWithZone_, zone); + return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } - static NSHTTPCookieStorage alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSHTTPCookieStorage1, _lib._sel_alloc1); - return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + static NSIndexPath alloc() { + final _ret = _objc_msgSend_40(_class_NSIndexPath, _sel_alloc); + return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSHTTPCookieStorage1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSIndexPath, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSHTTPCookieStorage1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSIndexPath, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSHTTPCookieStorage1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSIndexPath, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSHTTPCookieStorage1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSIndexPath, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSHTTPCookieStorage1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSIndexPath, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSHTTPCookieStorage1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSIndexPath, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSHTTPCookieStorage1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSHTTPCookieStorage1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSHTTPCookieStorage1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -class NSHTTPCookie extends NSObject { - NSHTTPCookie._(ffi.Pointer id, SwiftLibrary lib, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSIndexPath, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSIndexPath, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSIndexPath, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSIndexPath = objc.getClass("NSIndexPath"); +late final _sel_indexPathWithIndex_ = objc.registerName("indexPathWithIndex:"); +final _objc_msgSend_355 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_indexPathWithIndexes_length_ = + objc.registerName("indexPathWithIndexes:length:"); +final _objc_msgSend_356 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_initWithIndexes_length_ = + objc.registerName("initWithIndexes:length:"); +late final _sel_initWithIndex_ = objc.registerName("initWithIndex:"); +late final _sel_indexPathByAddingIndex_ = + objc.registerName("indexPathByAddingIndex:"); +final _objc_msgSend_357 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_indexPathByRemovingLastIndex = + objc.registerName("indexPathByRemovingLastIndex"); +final _objc_msgSend_358 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_indexAtPosition_ = objc.registerName("indexAtPosition:"); +final _objc_msgSend_359 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_getIndexes_range_ = objc.registerName("getIndexes:range:"); +final _objc_msgSend_360 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); +late final _sel_compare_ = objc.registerName("compare:"); +final _objc_msgSend_361 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_getIndexes_ = objc.registerName("getIndexes:"); +final _objc_msgSend_362 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class NSInflectionRule extends objc.NSObject { + NSInflectionRule._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSHTTPCookie] that points to the same underlying object as [other]. - static NSHTTPCookie castFrom(T other) { - return NSHTTPCookie._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSHTTPCookie] that wraps the given raw object pointer. - static NSHTTPCookie castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHTTPCookie._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSHTTPCookie]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSHTTPCookie1); - } - - NSHTTPCookie? initWithProperties_(NSDictionary properties) { - final _ret = _lib._objc_msgSend_851( - _id, _lib._sel_initWithProperties_1, properties._id); - return _ret.address == 0 - ? null - : NSHTTPCookie._(_ret, _lib, retain: true, release: true); - } - - static NSHTTPCookie? cookieWithProperties_( - SwiftLibrary _lib, NSDictionary properties) { - final _ret = _lib._objc_msgSend_852(_lib._class_NSHTTPCookie1, - _lib._sel_cookieWithProperties_1, properties._id); - return _ret.address == 0 - ? null - : NSHTTPCookie._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSInflectionRule] that points to the same underlying object as [other]. + NSInflectionRule.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - static NSDictionary requestHeaderFieldsWithCookies_( - SwiftLibrary _lib, NSArray cookies) { - final _ret = _lib._objc_msgSend_508(_lib._class_NSHTTPCookie1, - _lib._sel_requestHeaderFieldsWithCookies_1, cookies._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSInflectionRule] that wraps the given raw object pointer. + NSInflectionRule.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static NSArray cookiesWithResponseHeaderFields_forURL_( - SwiftLibrary _lib, NSDictionary headerFields, NSURL URL) { - final _ret = _lib._objc_msgSend_853( - _lib._class_NSHTTPCookie1, - _lib._sel_cookiesWithResponseHeaderFields_forURL_1, - headerFields._id, - URL._id); - return NSArray._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSInflectionRule]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSInflectionRule); } - NSDictionary? get properties { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_properties1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + @override + objc.NSObject init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get version { - return _lib._objc_msgSend_10(_id, _lib._sel_version1); + static NSInflectionRule getAutomaticRule() { + final _ret = _objc_msgSend_363(_class_NSInflectionRule, _sel_automaticRule); + return NSInflectionRule.castFromPointer(_ret, retain: true, release: true); } - NSString get name { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_name1); - return NSString._(_ret, _lib, retain: true, release: true); + static bool canInflectLanguage_(objc.NSString language) { + return _objc_msgSend_51( + _class_NSInflectionRule, _sel_canInflectLanguage_, language.pointer); } - NSString get value { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_value1); - return NSString._(_ret, _lib, retain: true, release: true); + static bool getCanInflectPreferredLocalization() { + return _objc_msgSend_7( + _class_NSInflectionRule, _sel_canInflectPreferredLocalization); } - NSDate? get expiresDate { - final _ret = _lib._objc_msgSend_183(_id, _lib._sel_expiresDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + static NSInflectionRule new1() { + final _ret = _objc_msgSend_40(_class_NSInflectionRule, _sel_new); + return NSInflectionRule.castFromPointer(_ret, retain: false, release: true); } - bool get sessionOnly { - return _lib._objc_msgSend_12(_id, _lib._sel_isSessionOnly1); + static NSInflectionRule allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSInflectionRule, _sel_allocWithZone_, zone); + return NSInflectionRule.castFromPointer(_ret, retain: false, release: true); } - NSString get domain { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_domain1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSInflectionRule alloc() { + final _ret = _objc_msgSend_40(_class_NSInflectionRule, _sel_alloc); + return NSInflectionRule.castFromPointer(_ret, retain: false, release: true); } - NSString get path { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_path1); - return NSString._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSInflectionRule, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - bool get secure { - return _lib._objc_msgSend_12(_id, _lib._sel_isSecure1); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSInflectionRule, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - bool get HTTPOnly { - return _lib._objc_msgSend_12(_id, _lib._sel_isHTTPOnly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSInflectionRule, _sel_accessInstanceVariablesDirectly); } - NSString? get comment { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_comment1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSInflectionRule, _sel_useStoredAccessor); } - NSURL? get commentURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_commentURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSInflectionRule, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSArray? get portList { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_portList1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSInflectionRule, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSString? get sameSitePolicy { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_sameSitePolicy1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSInflectionRule, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - @override - NSHTTPCookie init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSHTTPCookie._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSInflectionRule, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSHTTPCookie new1(SwiftLibrary _lib) { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _lib._objc_msgSend_2(_lib._class_NSHTTPCookie1, _lib._sel_new1); - return NSHTTPCookie._(_ret, _lib, retain: false, release: true); + _objc_msgSend_40(_class_NSInflectionRule, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - static NSHTTPCookie allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSHTTPCookie1, _lib._sel_allocWithZone_1, zone); - return NSHTTPCookie._(_ret, _lib, retain: false, release: true); - } +late final _class_NSInflectionRule = objc.getClass("NSInflectionRule"); +late final _sel_automaticRule = objc.registerName("automaticRule"); +final _objc_msgSend_363 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_canInflectLanguage_ = objc.registerName("canInflectLanguage:"); +late final _sel_canInflectPreferredLocalization = + objc.registerName("canInflectPreferredLocalization"); - static NSHTTPCookie alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSHTTPCookie1, _lib._sel_alloc1); - return NSHTTPCookie._(_ret, _lib, retain: false, release: true); - } +class NSOrderedSet extends objc.NSObject { + NSOrderedSet._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSHTTPCookie1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } + /// Constructs a [NSOrderedSet] that points to the same underlying object as [other]. + NSOrderedSet.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSHTTPCookie1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } + /// Constructs a [NSOrderedSet] that wraps the given raw object pointer. + NSOrderedSet.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSHTTPCookie1, _lib._sel_accessInstanceVariablesDirectly1); + /// Returns whether [obj] is an instance of [NSOrderedSet]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSOrderedSet); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSHTTPCookie1, _lib._sel_useStoredAccessor1); + int get count { + return _objc_msgSend_29(this.pointer, _sel_count); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSHTTPCookie1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + objc.NSObject objectAtIndex_(int idx) { + final _ret = _objc_msgSend_355(this.pointer, _sel_objectAtIndex_, idx); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSHTTPCookie1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + int indexOfObject_(objc.NSObject object) { + return _objc_msgSend_364(this.pointer, _sel_indexOfObject_, object.pointer); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSHTTPCookie1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + @override + NSOrderedSet init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSHTTPCookie1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + NSOrderedSet initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_365( + this.pointer, _sel_initWithObjects_count_, objects, cnt); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSHTTPCookie1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + NSOrderedSet? initWithCoder_(objc.NSCoder coder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } -} - -abstract class NSHTTPCookieAcceptPolicy { - static const int NSHTTPCookieAcceptPolicyAlways = 0; - static const int NSHTTPCookieAcceptPolicyNever = 1; - static const int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2; -} -class NSURLSessionTask extends NSObject { - NSURLSessionTask._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + void getObjects_range_( + ffi.Pointer> objects, _NSRange range) { + _objc_msgSend_366(this.pointer, _sel_getObjects_range_, objects, range); + } - /// 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); + objc.NSArray objectsAtIndexes_(objc.NSIndexSet indexes) { + final _ret = _objc_msgSend_367( + this.pointer, _sel_objectsAtIndexes_, indexes.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSURLSessionTask] that wraps the given raw object pointer. - static NSURLSessionTask castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionTask._(other, lib, retain: retain, release: release); + objc.NSObject? get firstObject { + final _ret = _objc_msgSend_66(this.pointer, _sel_firstObject); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSURLSessionTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionTask1); + objc.NSObject? get lastObject { + final _ret = _objc_msgSend_66(this.pointer, _sel_lastObject); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get taskIdentifier { - return _lib._objc_msgSend_10(_id, _lib._sel_taskIdentifier1); + bool isEqualToOrderedSet_(NSOrderedSet other) { + return _objc_msgSend_368( + this.pointer, _sel_isEqualToOrderedSet_, other.pointer); } - NSURLRequest? get originalRequest { - final _ret = _lib._objc_msgSend_876(_id, _lib._sel_originalRequest1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); + bool containsObject_(objc.NSObject object) { + return _objc_msgSend_0(this.pointer, _sel_containsObject_, object.pointer); } - NSURLRequest? get currentRequest { - final _ret = _lib._objc_msgSend_876(_id, _lib._sel_currentRequest1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); + bool intersectsOrderedSet_(NSOrderedSet other) { + return _objc_msgSend_368( + this.pointer, _sel_intersectsOrderedSet_, other.pointer); } - NSURLResponse? get response { - final _ret = _lib._objc_msgSend_878(_id, _lib._sel_response1); - return _ret.address == 0 - ? null - : NSURLResponse._(_ret, _lib, retain: true, release: true); + bool intersectsSet_(objc.NSSet set) { + return _objc_msgSend_369(this.pointer, _sel_intersectsSet_, set.pointer); } - NSObject? get delegate { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + bool isSubsetOfOrderedSet_(NSOrderedSet other) { + return _objc_msgSend_368( + this.pointer, _sel_isSubsetOfOrderedSet_, other.pointer); } - set delegate(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); + bool isSubsetOfSet_(objc.NSSet set) { + return _objc_msgSend_369(this.pointer, _sel_isSubsetOfSet_, set.pointer); } - NSProgress get progress { - final _ret = _lib._objc_msgSend_879(_id, _lib._sel_progress1); - return NSProgress._(_ret, _lib, retain: true, release: true); + objc.NSObject objectAtIndexedSubscript_(int idx) { + final _ret = + _objc_msgSend_355(this.pointer, _sel_objectAtIndexedSubscript_, idx); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSDate? get earliestBeginDate { - final _ret = _lib._objc_msgSend_183(_id, _lib._sel_earliestBeginDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + objc.NSEnumerator objectEnumerator() { + final _ret = _objc_msgSend_370(this.pointer, _sel_objectEnumerator); + return objc.NSEnumerator.castFromPointer(_ret, retain: true, release: true); } - set earliestBeginDate(NSDate? value) { - return _lib._objc_msgSend_800( - _id, _lib._sel_setEarliestBeginDate_1, value?._id ?? ffi.nullptr); + objc.NSEnumerator reverseObjectEnumerator() { + final _ret = _objc_msgSend_370(this.pointer, _sel_reverseObjectEnumerator); + return objc.NSEnumerator.castFromPointer(_ret, retain: true, release: true); } - int get countOfBytesClientExpectsToSend { - return _lib._objc_msgSend_666( - _id, _lib._sel_countOfBytesClientExpectsToSend1); + NSOrderedSet get reversedOrderedSet { + final _ret = _objc_msgSend_371(this.pointer, _sel_reversedOrderedSet); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - set countOfBytesClientExpectsToSend(int value) { - return _lib._objc_msgSend_667( - _id, _lib._sel_setCountOfBytesClientExpectsToSend_1, value); + objc.NSArray get array { + final _ret = _objc_msgSend_6(this.pointer, _sel_array); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int get countOfBytesClientExpectsToReceive { - return _lib._objc_msgSend_666( - _id, _lib._sel_countOfBytesClientExpectsToReceive1); + objc.NSSet get set1 { + final _ret = _objc_msgSend_372(this.pointer, _sel_set); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - set countOfBytesClientExpectsToReceive(int value) { - return _lib._objc_msgSend_667( - _id, _lib._sel_setCountOfBytesClientExpectsToReceive_1, value); + void enumerateObjectsUsingBlock_( + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { + _objc_msgSend_373( + this.pointer, _sel_enumerateObjectsUsingBlock_, block.pointer); } - int get countOfBytesSent { - return _lib._objc_msgSend_666(_id, _lib._sel_countOfBytesSent1); + void enumerateObjectsWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { + _objc_msgSend_374(this.pointer, + _sel_enumerateObjectsWithOptions_usingBlock_, opts, block.pointer); } - int get countOfBytesReceived { - return _lib._objc_msgSend_666(_id, _lib._sel_countOfBytesReceived1); + void enumerateObjectsAtIndexes_options_usingBlock_(objc.NSIndexSet s, + int opts, ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { + _objc_msgSend_375( + this.pointer, + _sel_enumerateObjectsAtIndexes_options_usingBlock_, + s.pointer, + opts, + block.pointer); } - int get countOfBytesExpectedToSend { - return _lib._objc_msgSend_666(_id, _lib._sel_countOfBytesExpectedToSend1); + int indexOfObjectPassingTest_( + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_376( + this.pointer, _sel_indexOfObjectPassingTest_, predicate.pointer); } - int get countOfBytesExpectedToReceive { - return _lib._objc_msgSend_666( - _id, _lib._sel_countOfBytesExpectedToReceive1); + int indexOfObjectWithOptions_passingTest_( + int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_377(this.pointer, + _sel_indexOfObjectWithOptions_passingTest_, opts, predicate.pointer); } - NSString? get taskDescription { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_taskDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + int indexOfObjectAtIndexes_options_passingTest_(objc.NSIndexSet s, int opts, + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_378( + this.pointer, + _sel_indexOfObjectAtIndexes_options_passingTest_, + s.pointer, + opts, + predicate.pointer); } - set taskDescription(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setTaskDescription_1, value?._id ?? ffi.nullptr); + objc.NSIndexSet indexesOfObjectsPassingTest_( + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_379( + this.pointer, _sel_indexesOfObjectsPassingTest_, predicate.pointer); + return objc.NSIndexSet.castFromPointer(_ret, retain: true, release: true); } - void cancel() { - _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + objc.NSIndexSet indexesOfObjectsWithOptions_passingTest_( + int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_380(this.pointer, + _sel_indexesOfObjectsWithOptions_passingTest_, opts, predicate.pointer); + return objc.NSIndexSet.castFromPointer(_ret, retain: true, release: true); } - int get state { - return _lib._objc_msgSend_880(_id, _lib._sel_state1); + objc.NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_( + objc.NSIndexSet s, + int opts, + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_381( + this.pointer, + _sel_indexesOfObjectsAtIndexes_options_passingTest_, + s.pointer, + opts, + predicate.pointer); + return objc.NSIndexSet.castFromPointer(_ret, retain: true, release: true); } - NSError? get error { - final _ret = _lib._objc_msgSend_322(_id, _lib._sel_error1); - return _ret.address == 0 - ? null - : NSError._(_ret, _lib, retain: true, release: true); + int indexOfObject_inSortedRange_options_usingComparator_( + objc.NSObject object, + _NSRange range, + int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmp) { + return _objc_msgSend_382( + this.pointer, + _sel_indexOfObject_inSortedRange_options_usingComparator_, + object.pointer, + range, + opts, + cmp.pointer); } - void suspend() { - _lib._objc_msgSend_1(_id, _lib._sel_suspend1); + objc.NSArray sortedArrayUsingComparator_( + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + final _ret = _objc_msgSend_383( + this.pointer, _sel_sortedArrayUsingComparator_, cmptr.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void resume() { - _lib._objc_msgSend_1(_id, _lib._sel_resume1); + objc.NSArray sortedArrayWithOptions_usingComparator_(int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + final _ret = _objc_msgSend_384(this.pointer, + _sel_sortedArrayWithOptions_usingComparator_, opts, cmptr.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - double get priority { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_239_fpret(_id, _lib._sel_priority1) - : _lib._objc_msgSend_239(_id, _lib._sel_priority1); + objc.NSString get description { + final _ret = _objc_msgSend_12(this.pointer, _sel_description); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set priority(double value) { - return _lib._objc_msgSend_881(_id, _lib._sel_setPriority_1, value); + objc.NSString descriptionWithLocale_(objc.NSObject? locale) { + final _ret = _objc_msgSend_385(this.pointer, _sel_descriptionWithLocale_, + locale?.pointer ?? ffi.nullptr); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool get prefersIncrementalDelivery { - return _lib._objc_msgSend_12(_id, _lib._sel_prefersIncrementalDelivery1); + objc.NSString descriptionWithLocale_indent_( + objc.NSObject? locale, int level) { + final _ret = _objc_msgSend_386( + this.pointer, + _sel_descriptionWithLocale_indent_, + locale?.pointer ?? ffi.nullptr, + level); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set prefersIncrementalDelivery(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setPrefersIncrementalDelivery_1, value); + static NSOrderedSet orderedSet() { + final _ret = _objc_msgSend_40(_class_NSOrderedSet, _sel_orderedSet); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - @override - NSURLSessionTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionTask._(_ret, _lib, retain: true, release: true); + static NSOrderedSet orderedSetWithObject_(objc.NSObject object) { + final _ret = _objc_msgSend_387( + _class_NSOrderedSet, _sel_orderedSetWithObject_, object.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionTask new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_new1); - return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + static NSOrderedSet orderedSetWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_365( + _class_NSOrderedSet, _sel_orderedSetWithObjects_count_, objects, cnt); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionTask allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLSessionTask1, _lib._sel_allocWithZone_1, zone); - return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + static NSOrderedSet orderedSetWithObjects_(objc.NSObject firstObj) { + final _ret = _objc_msgSend_387( + _class_NSOrderedSet, _sel_orderedSetWithObjects_, firstObj.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionTask alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_alloc1); - return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + static NSOrderedSet orderedSetWithOrderedSet_(NSOrderedSet set) { + final _ret = _objc_msgSend_388( + _class_NSOrderedSet, _sel_orderedSetWithOrderedSet_, set.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLSessionTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static NSOrderedSet orderedSetWithOrderedSet_range_copyItems_( + NSOrderedSet set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_389( + _class_NSOrderedSet, + _sel_orderedSetWithOrderedSet_range_copyItems_, + set.pointer, + range, + flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLSessionTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static NSOrderedSet orderedSetWithArray_(objc.NSArray array) { + final _ret = _objc_msgSend_390( + _class_NSOrderedSet, _sel_orderedSetWithArray_, array.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLSessionTask1, - _lib._sel_accessInstanceVariablesDirectly1); + static NSOrderedSet orderedSetWithArray_range_copyItems_( + objc.NSArray array, _NSRange range, bool flag) { + final _ret = _objc_msgSend_391(_class_NSOrderedSet, + _sel_orderedSetWithArray_range_copyItems_, array.pointer, range, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLSessionTask1, _lib._sel_useStoredAccessor1); + static NSOrderedSet orderedSetWithSet_(objc.NSSet set) { + final _ret = _objc_msgSend_392( + _class_NSOrderedSet, _sel_orderedSetWithSet_, set.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLSessionTask1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static NSOrderedSet orderedSetWithSet_copyItems_(objc.NSSet set, bool flag) { + final _ret = _objc_msgSend_393(_class_NSOrderedSet, + _sel_orderedSetWithSet_copyItems_, set.pointer, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLSessionTask1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + NSOrderedSet initWithObject_(objc.NSObject object) { + final _ret = + _objc_msgSend_387(this.pointer, _sel_initWithObject_, object.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLSessionTask1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + NSOrderedSet initWithObjects_(objc.NSObject firstObj) { + final _ret = _objc_msgSend_387( + this.pointer, _sel_initWithObjects_, firstObj.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSURLSessionTask1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + NSOrderedSet initWithOrderedSet_(NSOrderedSet set) { + final _ret = + _objc_msgSend_388(this.pointer, _sel_initWithOrderedSet_, set.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionTask1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + NSOrderedSet initWithOrderedSet_copyItems_(NSOrderedSet set, bool flag) { + final _ret = _objc_msgSend_394( + this.pointer, _sel_initWithOrderedSet_copyItems_, set.pointer, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } -} -class NSURLRequest extends NSObject { - NSURLRequest._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + NSOrderedSet initWithOrderedSet_range_copyItems_( + NSOrderedSet set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_389(this.pointer, + _sel_initWithOrderedSet_range_copyItems_, set.pointer, range, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, 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); + NSOrderedSet initWithArray_(objc.NSArray array) { + final _ret = + _objc_msgSend_390(this.pointer, _sel_initWithArray_, array.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSURLRequest] that wraps the given raw object pointer. - static NSURLRequest castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLRequest._(other, lib, retain: retain, release: release); + NSOrderedSet initWithArray_copyItems_(objc.NSArray set, bool flag) { + final _ret = _objc_msgSend_395( + this.pointer, _sel_initWithArray_copyItems_, set.pointer, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, 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); + NSOrderedSet initWithArray_range_copyItems_( + objc.NSArray set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_391(this.pointer, + _sel_initWithArray_range_copyItems_, set.pointer, range, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - static NSURLRequest requestWithURL_(SwiftLibrary _lib, NSURL URL) { - final _ret = _lib._objc_msgSend_262( - _lib._class_NSURLRequest1, _lib._sel_requestWithURL_1, URL._id); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + NSOrderedSet initWithSet_(objc.NSSet set) { + final _ret = + _objc_msgSend_392(this.pointer, _sel_initWithSet_, set.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static bool getSupportsSecureCoding(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLRequest1, _lib._sel_supportsSecureCoding1); + NSOrderedSet initWithSet_copyItems_(objc.NSSet set, bool flag) { + final _ret = _objc_msgSend_393( + this.pointer, _sel_initWithSet_copyItems_, set.pointer, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( - SwiftLibrary _lib, NSURL URL, int cachePolicy, double timeoutInterval) { - final _ret = _lib._objc_msgSend_858( - _lib._class_NSURLRequest1, - _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, - URL._id, - cachePolicy, - timeoutInterval); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + objc.NSObject differenceFromOrderedSet_withOptions_usingEquivalenceTest_( + NSOrderedSet other, + int options, + ObjCBlock_bool_objcObjCObject_objcObjCObject block) { + final _ret = _objc_msgSend_396( + this.pointer, + _sel_differenceFromOrderedSet_withOptions_usingEquivalenceTest_, + other.pointer, + options, + block.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSURLRequest initWithURL_(NSURL URL) { - final _ret = _lib._objc_msgSend_262(_id, _lib._sel_initWithURL_1, URL._id); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + objc.NSObject differenceFromOrderedSet_withOptions_( + NSOrderedSet other, int options) { + final _ret = _objc_msgSend_397(this.pointer, + _sel_differenceFromOrderedSet_withOptions_, other.pointer, options); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSURLRequest initWithURL_cachePolicy_timeoutInterval_( - NSURL URL, int cachePolicy, double timeoutInterval) { - final _ret = _lib._objc_msgSend_858( - _id, - _lib._sel_initWithURL_cachePolicy_timeoutInterval_1, - URL._id, - cachePolicy, - timeoutInterval); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + objc.NSObject differenceFromOrderedSet_(NSOrderedSet other) { + final _ret = _objc_msgSend_388( + this.pointer, _sel_differenceFromOrderedSet_, other.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSURL? get URL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_URL1); + NSOrderedSet? orderedSetByApplyingDifference_(objc.NSObject difference) { + final _ret = _objc_msgSend_398( + this.pointer, _sel_orderedSetByApplyingDifference_, difference.pointer); return _ret.address == 0 ? null - : NSURL._(_ret, _lib, retain: true, release: true); + : NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - int get cachePolicy { - return _lib._objc_msgSend_859(_id, _lib._sel_cachePolicy1); + objc.NSObject valueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_35(this.pointer, _sel_valueForKey_, key.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - double get timeoutInterval { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_timeoutInterval1) - : _lib._objc_msgSend_165(_id, _lib._sel_timeoutInterval1); + void setValue_forKey_(objc.NSObject? value, objc.NSString key) { + _objc_msgSend_399(this.pointer, _sel_setValue_forKey_, + value?.pointer ?? ffi.nullptr, key.pointer); } - NSURL? get mainDocumentURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_mainDocumentURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + void addObserver_forKeyPath_options_context_(objc.NSObject observer, + objc.NSString keyPath, int options, ffi.Pointer context) { + _objc_msgSend_400( + this.pointer, + _sel_addObserver_forKeyPath_options_context_, + observer.pointer, + keyPath.pointer, + options, + context); } - int get networkServiceType { - return _lib._objc_msgSend_860(_id, _lib._sel_networkServiceType1); + void removeObserver_forKeyPath_context_(objc.NSObject observer, + objc.NSString keyPath, ffi.Pointer context) { + _objc_msgSend_401(this.pointer, _sel_removeObserver_forKeyPath_context_, + observer.pointer, keyPath.pointer, context); } - bool get allowsCellularAccess { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsCellularAccess1); + void removeObserver_forKeyPath_( + objc.NSObject observer, objc.NSString keyPath) { + _objc_msgSend_402(this.pointer, _sel_removeObserver_forKeyPath_, + observer.pointer, keyPath.pointer); } - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsExpensiveNetworkAccess1); + objc.NSArray sortedArrayUsingDescriptors_(objc.NSArray sortDescriptors) { + final _ret = _objc_msgSend_67(this.pointer, + _sel_sortedArrayUsingDescriptors_, sortDescriptors.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool get allowsConstrainedNetworkAccess { - return _lib._objc_msgSend_12( - _id, _lib._sel_allowsConstrainedNetworkAccess1); + NSOrderedSet filteredOrderedSetUsingPredicate_(NSPredicate p) { + final _ret = _objc_msgSend_412( + this.pointer, _sel_filteredOrderedSetUsingPredicate_, p.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - bool get assumesHTTP3Capable { - return _lib._objc_msgSend_12(_id, _lib._sel_assumesHTTP3Capable1); + static NSOrderedSet new1() { + final _ret = _objc_msgSend_40(_class_NSOrderedSet, _sel_new); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - int get attribution { - return _lib._objc_msgSend_861(_id, _lib._sel_attribution1); + static NSOrderedSet allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSOrderedSet, _sel_allocWithZone_, zone); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - bool get requiresDNSSECValidation { - return _lib._objc_msgSend_12(_id, _lib._sel_requiresDNSSECValidation1); + static NSOrderedSet alloc() { + final _ret = _objc_msgSend_40(_class_NSOrderedSet, _sel_alloc); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - NSString? get HTTPMethod { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_HTTPMethod1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSOrderedSet, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSDictionary? get allHTTPHeaderFields { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_allHTTPHeaderFields1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSOrderedSet, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSString? valueForHTTPHeaderField_(NSString field) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_valueForHTTPHeaderField_1, field._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSOrderedSet, _sel_accessInstanceVariablesDirectly); } - NSData? get HTTPBody { - final _ret = _lib._objc_msgSend_286(_id, _lib._sel_HTTPBody1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSOrderedSet, _sel_useStoredAccessor); } - NSInputStream? get HTTPBodyStream { - final _ret = _lib._objc_msgSend_875(_id, _lib._sel_HTTPBodyStream1); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSOrderedSet, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - bool get HTTPShouldHandleCookies { - return _lib._objc_msgSend_12(_id, _lib._sel_HTTPShouldHandleCookies1); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSOrderedSet, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - bool get HTTPShouldUsePipelining { - return _lib._objc_msgSend_12(_id, _lib._sel_HTTPShouldUsePipelining1); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSOrderedSet, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSOrderedSet, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSOrderedSet, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSOrderedSet = objc.getClass("NSOrderedSet"); +late final _sel_count = objc.registerName("count"); +late final _sel_objectAtIndex_ = objc.registerName("objectAtIndex:"); +late final _sel_indexOfObject_ = objc.registerName("indexOfObject:"); +final _objc_msgSend_364 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithObjects_count_ = + objc.registerName("initWithObjects:count:"); +final _objc_msgSend_365 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>(); +late final _sel_getObjects_range_ = objc.registerName("getObjects:range:"); +final _objc_msgSend_366 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + _NSRange)>(); +late final _sel_objectsAtIndexes_ = objc.registerName("objectsAtIndexes:"); +final _objc_msgSend_367 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_firstObject = objc.registerName("firstObject"); +late final _sel_lastObject = objc.registerName("lastObject"); +late final _sel_isEqualToOrderedSet_ = + objc.registerName("isEqualToOrderedSet:"); +final _objc_msgSend_368 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_containsObject_ = objc.registerName("containsObject:"); +late final _sel_intersectsOrderedSet_ = + objc.registerName("intersectsOrderedSet:"); +late final _sel_intersectsSet_ = objc.registerName("intersectsSet:"); +final _objc_msgSend_369 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isSubsetOfOrderedSet_ = + objc.registerName("isSubsetOfOrderedSet:"); +late final _sel_isSubsetOfSet_ = objc.registerName("isSubsetOfSet:"); +late final _sel_objectAtIndexedSubscript_ = + objc.registerName("objectAtIndexedSubscript:"); +late final _sel_objectEnumerator = objc.registerName("objectEnumerator"); +final _objc_msgSend_370 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_reverseObjectEnumerator = + objc.registerName("reverseObjectEnumerator"); +late final _sel_reversedOrderedSet = objc.registerName("reversedOrderedSet"); +final _objc_msgSend_371 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_array = objc.registerName("array"); +late final _sel_set = objc.registerName("set"); +final _objc_msgSend_372 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, int, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistry = + , int, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + void Function(ffi.Pointer, int, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[id] = + fn; + return ffi.Pointer.fromAddress(id); +} - @override - NSURLRequest init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); - static NSURLRequest new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_new1); - return NSURLRequest._(_ret, _lib, retain: false, release: true); - } +class ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); - static NSURLRequest allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLRequest1, _lib._sel_allocWithZone_1, zone); - return NSURLRequest._(_ret, _lib, retain: false, release: true); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool._(pointer, + retain: retain, release: release); } - static NSURLRequest alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_alloc1); - return NSURLRequest._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLRequest1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.fromFunction( + void Function(objc.NSObject, int, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(objc.NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.Pointer? _dartFuncTrampoline; - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLRequest1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.listener( + void Function(objc.NSObject, int, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(objc.NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(objc.NSObject arg0, int arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.UnsignedLong arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>()(pointer, arg0.pointer, arg1, arg2); +} + +late final _sel_enumerateObjectsUsingBlock_ = + objc.registerName("enumerateObjectsUsingBlock:"); +final _objc_msgSend_373 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSEnumerationOptions { + static const int NSEnumerationConcurrent = 1; + static const int NSEnumerationReverse = 2; +} - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLRequest1, _lib._sel_accessInstanceVariablesDirectly1); +late final _sel_enumerateObjectsWithOptions_usingBlock_ = + objc.registerName("enumerateObjectsWithOptions:usingBlock:"); +final _objc_msgSend_374 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_enumerateObjectsAtIndexes_options_usingBlock_ = + objc.registerName("enumerateObjectsAtIndexes:options:usingBlock:"); +final _objc_msgSend_375 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +bool _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>>() + .asFunction< + bool Function(ffi.Pointer, int, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistry = + , int, ffi.Pointer)>{}; +int _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + bool Function(ffi.Pointer, int, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex; + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool + extends objc.ObjCBlockBase { + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool._(pointer, + retain: retain, release: release); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLRequest1, _lib._sel_useStoredAccessor1); + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline, + false) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool.fromFunction( + bool Function(objc.NSObject, int, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => + fn(objc.NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.Pointer? _dartFuncTrampoline; + + bool call(objc.NSObject arg0, int arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.UnsignedLong arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>()(pointer, arg0.pointer, arg1, arg2); +} + +late final _sel_indexOfObjectPassingTest_ = + objc.registerName("indexOfObjectPassingTest:"); +final _objc_msgSend_376 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_indexOfObjectWithOptions_passingTest_ = + objc.registerName("indexOfObjectWithOptions:passingTest:"); +final _objc_msgSend_377 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_indexOfObjectAtIndexes_options_passingTest_ = + objc.registerName("indexOfObjectAtIndexes:options:passingTest:"); +final _objc_msgSend_378 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_indexesOfObjectsPassingTest_ = + objc.registerName("indexesOfObjectsPassingTest:"); +final _objc_msgSend_379 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_indexesOfObjectsWithOptions_passingTest_ = + objc.registerName("indexesOfObjectsWithOptions:passingTest:"); +final _objc_msgSend_380 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_indexesOfObjectsAtIndexes_options_passingTest_ = + objc.registerName("indexesOfObjectsAtIndexes:options:passingTest:"); +final _objc_msgSend_381 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_registerClosure( + int Function(ffi.Pointer, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistryIndex; + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistry[ + id] = fn; + return ffi.Pointer.fromAddress(id); +} + +int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject + extends objc.ObjCBlockBase { + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) { + return ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject._(pointer, + retain: retain, release: release); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLRequest1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_fnPtrTrampoline, + 0) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject.fromFunction( + int Function(objc.NSObject, objc.NSObject) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureTrampoline, 0) + .cast(), + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(objc.NSObject.castFromPointer(arg0, retain: true, release: true), objc.NSObject.castFromPointer(arg1, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + int call(objc.NSObject arg0, objc.NSObject arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1.pointer); +} + +late final _sel_indexOfObject_inSortedRange_options_usingComparator_ = + objc.registerName("indexOfObject:inSortedRange:options:usingComparator:"); +final _objc_msgSend_382 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); +late final _sel_sortedArrayUsingComparator_ = + objc.registerName("sortedArrayUsingComparator:"); +final _objc_msgSend_383 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSSortOptions { + static const int NSSortConcurrent = 1; + static const int NSSortStable = 16; +} + +late final _sel_sortedArrayWithOptions_usingComparator_ = + objc.registerName("sortedArrayWithOptions:usingComparator:"); +final _objc_msgSend_384 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_descriptionWithLocale_ = + objc.registerName("descriptionWithLocale:"); +final _objc_msgSend_385 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_descriptionWithLocale_indent_ = + objc.registerName("descriptionWithLocale:indent:"); +final _objc_msgSend_386 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_orderedSet = objc.registerName("orderedSet"); +late final _sel_orderedSetWithObject_ = + objc.registerName("orderedSetWithObject:"); +final _objc_msgSend_387 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_orderedSetWithObjects_count_ = + objc.registerName("orderedSetWithObjects:count:"); +late final _sel_orderedSetWithObjects_ = + objc.registerName("orderedSetWithObjects:"); +late final _sel_orderedSetWithOrderedSet_ = + objc.registerName("orderedSetWithOrderedSet:"); +final _objc_msgSend_388 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_orderedSetWithOrderedSet_range_copyItems_ = + objc.registerName("orderedSetWithOrderedSet:range:copyItems:"); +final _objc_msgSend_389 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + bool)>(); +late final _sel_orderedSetWithArray_ = + objc.registerName("orderedSetWithArray:"); +final _objc_msgSend_390 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_orderedSetWithArray_range_copyItems_ = + objc.registerName("orderedSetWithArray:range:copyItems:"); +final _objc_msgSend_391 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + bool)>(); +late final _sel_orderedSetWithSet_ = objc.registerName("orderedSetWithSet:"); +final _objc_msgSend_392 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_orderedSetWithSet_copyItems_ = + objc.registerName("orderedSetWithSet:copyItems:"); +final _objc_msgSend_393 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_initWithObject_ = objc.registerName("initWithObject:"); +late final _sel_initWithObjects_ = objc.registerName("initWithObjects:"); +late final _sel_initWithOrderedSet_ = objc.registerName("initWithOrderedSet:"); +late final _sel_initWithOrderedSet_copyItems_ = + objc.registerName("initWithOrderedSet:copyItems:"); +final _objc_msgSend_394 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_initWithOrderedSet_range_copyItems_ = + objc.registerName("initWithOrderedSet:range:copyItems:"); +late final _sel_initWithArray_ = objc.registerName("initWithArray:"); +late final _sel_initWithArray_copyItems_ = + objc.registerName("initWithArray:copyItems:"); +final _objc_msgSend_395 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_initWithArray_range_copyItems_ = + objc.registerName("initWithArray:range:copyItems:"); +late final _sel_initWithSet_ = objc.registerName("initWithSet:"); +late final _sel_initWithSet_copyItems_ = + objc.registerName("initWithSet:copyItems:"); + +abstract class NSOrderedCollectionDifferenceCalculationOptions { + static const int NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = + 1; + static const int NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = + 2; + static const int NSOrderedCollectionDifferenceCalculationInferMoves = 4; +} + +bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistry = , ffi.Pointer)>{}; +int _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_bool_objcObjCObject_objcObjCObject_registerClosure( + bool Function( + ffi.Pointer, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistryIndex; + _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLRequest1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } +bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistry[ + block.ref.target.address]!(arg0, arg1); - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLRequest1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } +class ObjCBlock_bool_objcObjCObject_objcObjCObject extends objc.ObjCBlockBase { + ObjCBlock_bool_objcObjCObject_objcObjCObject._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSURLRequest1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_bool_objcObjCObject_objcObjCObject castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_bool_objcObjCObject_objcObjCObject._(pointer, + retain: retain, release: release); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLRequest1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_objcObjCObject.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_objcObjCObject_fnPtrTrampoline, + false) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; -abstract class NSURLRequestCachePolicy { - static const int NSURLRequestUseProtocolCachePolicy = 0; - static const int NSURLRequestReloadIgnoringLocalCacheData = 1; - static const int NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4; - static const int NSURLRequestReloadIgnoringCacheData = 1; - static const int NSURLRequestReturnCacheDataElseLoad = 2; - static const int NSURLRequestReturnCacheDataDontLoad = 3; - static const int NSURLRequestReloadRevalidatingCacheData = 5; -} + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_objcObjCObject.fromFunction( + bool Function(objc.NSObject, objc.NSObject) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_objcObjCObject_objcObjCObject_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(objc.NSObject.castFromPointer(arg0, retain: true, release: true), objc.NSObject.castFromPointer(arg1, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; -abstract class NSURLRequestNetworkServiceType { - static const int NSURLNetworkServiceTypeDefault = 0; - static const int NSURLNetworkServiceTypeVoIP = 1; - static const int NSURLNetworkServiceTypeVideo = 2; - static const int NSURLNetworkServiceTypeBackground = 3; - static const int NSURLNetworkServiceTypeVoice = 4; - static const int NSURLNetworkServiceTypeResponsiveData = 6; - static const int NSURLNetworkServiceTypeAVStreaming = 8; - static const int NSURLNetworkServiceTypeResponsiveAV = 9; - static const int NSURLNetworkServiceTypeCallSignaling = 11; -} + bool call(objc.NSObject arg0, objc.NSObject arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1.pointer); +} + +late final _sel_differenceFromOrderedSet_withOptions_usingEquivalenceTest_ = + objc.registerName( + "differenceFromOrderedSet:withOptions:usingEquivalenceTest:"); +final _objc_msgSend_396 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_differenceFromOrderedSet_withOptions_ = + objc.registerName("differenceFromOrderedSet:withOptions:"); +final _objc_msgSend_397 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_differenceFromOrderedSet_ = + objc.registerName("differenceFromOrderedSet:"); +late final _sel_orderedSetByApplyingDifference_ = + objc.registerName("orderedSetByApplyingDifference:"); +final _objc_msgSend_398 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_valueForKey_ = objc.registerName("valueForKey:"); +late final _sel_setValue_forKey_ = objc.registerName("setValue:forKey:"); +final _objc_msgSend_399 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); -abstract class NSURLRequestAttribution { - static const int NSURLRequestAttributionDeveloper = 0; - static const int NSURLRequestAttributionUser = 1; +abstract class NSKeyValueObservingOptions { + static const int NSKeyValueObservingOptionNew = 1; + static const int NSKeyValueObservingOptionOld = 2; + static const int NSKeyValueObservingOptionInitial = 4; + static const int NSKeyValueObservingOptionPrior = 8; } -class NSInputStream extends NSStream { - NSInputStream._(ffi.Pointer id, SwiftLibrary lib, +late final _sel_addObserver_forKeyPath_options_context_ = + objc.registerName("addObserver:forKeyPath:options:context:"); +final _objc_msgSend_400 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_removeObserver_forKeyPath_context_ = + objc.registerName("removeObserver:forKeyPath:context:"); +final _objc_msgSend_401 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeObserver_forKeyPath_ = + objc.registerName("removeObserver:forKeyPath:"); +final _objc_msgSend_402 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_sortedArrayUsingDescriptors_ = + objc.registerName("sortedArrayUsingDescriptors:"); + +class NSPredicate extends objc.NSObject { + NSPredicate._(ffi.Pointer pointer, {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); - } + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSInputStream] that wraps the given raw object pointer. - static NSInputStream castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInputStream._(other, lib, retain: retain, release: release); - } + /// Constructs a [NSPredicate] that points to the same underlying object as [other]. + NSPredicate.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// 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); - } + /// Constructs a [NSPredicate] that wraps the given raw object pointer. + NSPredicate.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - int read_maxLength_(ffi.Pointer buffer, int len) { - return _lib._objc_msgSend_864(_id, _lib._sel_read_maxLength_1, buffer, len); + /// Returns whether [obj] is an instance of [NSPredicate]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSPredicate); } - bool getBuffer_length_(ffi.Pointer> buffer, - ffi.Pointer len) { - return _lib._objc_msgSend_873( - _id, _lib._sel_getBuffer_length_1, buffer, len); + static NSPredicate predicateWithFormat_argumentArray_( + objc.NSString predicateFormat, objc.NSArray? arguments) { + final _ret = _objc_msgSend_403( + _class_NSPredicate, + _sel_predicateWithFormat_argumentArray_, + predicateFormat.pointer, + arguments?.pointer ?? ffi.nullptr); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - bool get hasBytesAvailable { - return _lib._objc_msgSend_12(_id, _lib._sel_hasBytesAvailable1); + static NSPredicate predicateWithFormat_(objc.NSString predicateFormat) { + final _ret = _objc_msgSend_404( + _class_NSPredicate, _sel_predicateWithFormat_, predicateFormat.pointer); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - NSInputStream initWithData_(NSData data) { - final _ret = - _lib._objc_msgSend_279(_id, _lib._sel_initWithData_1, data._id); - return NSInputStream._(_ret, _lib, retain: true, release: true); + static NSPredicate predicateWithFormat_arguments_( + objc.NSString predicateFormat, ffi.Pointer<__va_list_tag> argList) { + final _ret = _objc_msgSend_405(_class_NSPredicate, + _sel_predicateWithFormat_arguments_, predicateFormat.pointer, argList); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - NSInputStream? initWithURL_(NSURL url) { - final _ret = _lib._objc_msgSend_277(_id, _lib._sel_initWithURL_1, url._id); + static NSPredicate? predicateFromMetadataQueryString_( + objc.NSString queryString) { + final _ret = _objc_msgSend_406(_class_NSPredicate, + _sel_predicateFromMetadataQueryString_, queryString.pointer); return _ret.address == 0 ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); + : NSPredicate.castFromPointer(_ret, retain: true, release: true); } - NSInputStream? initWithFileAtPath_(NSString path) { + static NSPredicate predicateWithValue_(bool value) { final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_initWithFileAtPath_1, path._id); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); + _objc_msgSend_407(_class_NSPredicate, _sel_predicateWithValue_, value); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - static NSInputStream? inputStreamWithData_(SwiftLibrary _lib, NSData data) { - final _ret = _lib._objc_msgSend_874( - _lib._class_NSInputStream1, _lib._sel_inputStreamWithData_1, data._id); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); + static NSPredicate predicateWithBlock_( + ObjCBlock_bool_objcObjCObject_NSDictionary block) { + final _ret = _objc_msgSend_408( + _class_NSPredicate, _sel_predicateWithBlock_, block.pointer); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - static NSInputStream? inputStreamWithFileAtPath_( - SwiftLibrary _lib, NSString path) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSInputStream1, - _lib._sel_inputStreamWithFileAtPath_1, path._id); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); + objc.NSString get predicateFormat { + final _ret = _objc_msgSend_12(this.pointer, _sel_predicateFormat); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSInputStream? inputStreamWithURL_(SwiftLibrary _lib, NSURL url) { - final _ret = _lib._objc_msgSend_277( - _lib._class_NSInputStream1, _lib._sel_inputStreamWithURL_1, url._id); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); + NSPredicate predicateWithSubstitutionVariables_(objc.NSDictionary variables) { + final _ret = _objc_msgSend_409(this.pointer, + _sel_predicateWithSubstitutionVariables_, variables.pointer); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - static void getStreamsToHostWithName_port_inputStream_outputStream_( - SwiftLibrary _lib, - NSString hostname, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_867( - _lib._class_NSInputStream1, - _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, - hostname._id, - port, - inputStream, - outputStream); + bool evaluateWithObject_(objc.NSObject? object) { + return _objc_msgSend_410( + this.pointer, _sel_evaluateWithObject_, object?.pointer ?? ffi.nullptr); } - static void getStreamsToHost_port_inputStream_outputStream_( - SwiftLibrary _lib, - NSHost host, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_871( - _lib._class_NSInputStream1, - _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, - host._id, - port, - inputStream, - outputStream); + bool evaluateWithObject_substitutionVariables_( + objc.NSObject? object, objc.NSDictionary? bindings) { + return _objc_msgSend_411( + this.pointer, + _sel_evaluateWithObject_substitutionVariables_, + object?.pointer ?? ffi.nullptr, + bindings?.pointer ?? ffi.nullptr); } - static void getBoundStreamsWithBufferSize_inputStream_outputStream_( - SwiftLibrary _lib, - int bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_872( - _lib._class_NSInputStream1, - _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, - bufferSize, - inputStream, - outputStream); + void allowEvaluation() { + _objc_msgSend_82(this.pointer, _sel_allowEvaluation); } @override - NSInputStream init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSInputStream._(_ret, _lib, retain: true, release: true); + NSPredicate init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - static NSInputStream new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSInputStream1, _lib._sel_new1); - return NSInputStream._(_ret, _lib, retain: false, release: true); + static NSPredicate new1() { + final _ret = _objc_msgSend_40(_class_NSPredicate, _sel_new); + return NSPredicate.castFromPointer(_ret, retain: false, release: true); } - static NSInputStream allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSInputStream1, _lib._sel_allocWithZone_1, zone); - return NSInputStream._(_ret, _lib, retain: false, release: true); + static NSPredicate allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSPredicate, _sel_allocWithZone_, zone); + return NSPredicate.castFromPointer(_ret, retain: false, release: true); } - static NSInputStream alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSInputStream1, _lib._sel_alloc1); - return NSInputStream._(_ret, _lib, retain: false, release: true); + static NSPredicate alloc() { + final _ret = _objc_msgSend_40(_class_NSPredicate, _sel_alloc); + return NSPredicate.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSInputStream1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSPredicate, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSInputStream1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSPredicate, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSInputStream1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSPredicate, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSInputStream1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSPredicate, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSInputStream1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSPredicate, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSInputStream1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSPredicate, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSInputStream1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSInputStream1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSInputStream1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSPredicate, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSPredicate, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSPredicate, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSPredicate = objc.getClass("NSPredicate"); +late final _sel_predicateWithFormat_argumentArray_ = + objc.registerName("predicateWithFormat:argumentArray:"); +final _objc_msgSend_403 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_predicateWithFormat_ = + objc.registerName("predicateWithFormat:"); +final _objc_msgSend_404 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_predicateWithFormat_arguments_ = + objc.registerName("predicateWithFormat:arguments:"); +final _objc_msgSend_405 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>(); +late final _sel_predicateFromMetadataQueryString_ = + objc.registerName("predicateFromMetadataQueryString:"); +final _objc_msgSend_406 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_predicateWithValue_ = objc.registerName("predicateWithValue:"); +final _objc_msgSend_407 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, bool)>(); +bool _ObjCBlock_bool_objcObjCObject_NSDictionary_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistry = , ffi.Pointer)>{}; +int _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_bool_objcObjCObject_NSDictionary_registerClosure( + bool Function( + ffi.Pointer, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistryIndex; + _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -class NSStream extends NSObject { - NSStream._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +bool _ObjCBlock_bool_objcObjCObject_NSDictionary_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistry[ + block.ref.target.address]!(arg0, arg1); - /// 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); - } +class ObjCBlock_bool_objcObjCObject_NSDictionary extends objc.ObjCBlockBase { + ObjCBlock_bool_objcObjCObject_NSDictionary._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); - /// Returns a [NSStream] that wraps the given raw object pointer. - static NSStream castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSStream._(other, lib, retain: retain, release: release); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_bool_objcObjCObject_NSDictionary castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_bool_objcObjCObject_NSDictionary._(pointer, + retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSStream]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSStream1); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_NSDictionary.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_NSDictionary_fnPtrTrampoline, + false) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - void open() { - _lib._objc_msgSend_1(_id, _lib._sel_open1); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_NSDictionary.fromFunction( + bool Function(objc.NSObject?, objc.NSDictionary?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_NSDictionary_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_objcObjCObject_NSDictionary_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : objc.NSObject.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : objc.NSDictionary.castFromPointer(arg1, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; - void close() { - _lib._objc_msgSend_1(_id, _lib._sel_close1); - } + bool call(objc.NSObject? arg0, objc.NSDictionary? arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr, arg1?.pointer ?? ffi.nullptr); +} + +late final _sel_predicateWithBlock_ = objc.registerName("predicateWithBlock:"); +final _objc_msgSend_408 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_predicateFormat = objc.registerName("predicateFormat"); +late final _sel_predicateWithSubstitutionVariables_ = + objc.registerName("predicateWithSubstitutionVariables:"); +final _objc_msgSend_409 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_evaluateWithObject_ = objc.registerName("evaluateWithObject:"); +final _objc_msgSend_410 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_evaluateWithObject_substitutionVariables_ = + objc.registerName("evaluateWithObject:substitutionVariables:"); +final _objc_msgSend_411 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_allowEvaluation = objc.registerName("allowEvaluation"); +late final _sel_filteredOrderedSetUsingPredicate_ = + objc.registerName("filteredOrderedSetUsingPredicate:"); +final _objc_msgSend_412 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - NSObject? get delegate { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } +class NSMutableOrderedSet extends NSOrderedSet { + NSMutableOrderedSet._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - set delegate(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); - } + /// Constructs a [NSMutableOrderedSet] that points to the same underlying object as [other]. + NSMutableOrderedSet.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSObject? propertyForKey_(NSString key) { - final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_propertyForKey_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSMutableOrderedSet] that wraps the given raw object pointer. + NSMutableOrderedSet.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - bool setProperty_forKey_(NSObject? property, NSString key) { - return _lib._objc_msgSend_862(_id, _lib._sel_setProperty_forKey_1, - property?._id ?? ffi.nullptr, key._id); + /// Returns whether [obj] is an instance of [NSMutableOrderedSet]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMutableOrderedSet); } - void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _lib._objc_msgSend_569( - _id, _lib._sel_scheduleInRunLoop_forMode_1, aRunLoop._id, mode._id); + void insertObject_atIndex_(objc.NSObject object, int idx) { + _objc_msgSend_413( + this.pointer, _sel_insertObject_atIndex_, object.pointer, idx); } - void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _lib._objc_msgSend_569( - _id, _lib._sel_removeFromRunLoop_forMode_1, aRunLoop._id, mode._id); + void removeObjectAtIndex_(int idx) { + _objc_msgSend_414(this.pointer, _sel_removeObjectAtIndex_, idx); } - int get streamStatus { - return _lib._objc_msgSend_863(_id, _lib._sel_streamStatus1); + void replaceObjectAtIndex_withObject_(int idx, objc.NSObject object) { + _objc_msgSend_415(this.pointer, _sel_replaceObjectAtIndex_withObject_, idx, + object.pointer); } - NSError? get streamError { - final _ret = _lib._objc_msgSend_322(_id, _lib._sel_streamError1); + @override + NSMutableOrderedSet? initWithCoder_(objc.NSCoder coder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, coder.pointer); return _ret.address == 0 ? null - : NSError._(_ret, _lib, retain: true, release: true); - } - - static void getStreamsToHostWithName_port_inputStream_outputStream_( - SwiftLibrary _lib, - NSString hostname, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_867( - _lib._class_NSStream1, - _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, - hostname._id, - port, - inputStream, - outputStream); - } - - static void getStreamsToHost_port_inputStream_outputStream_( - SwiftLibrary _lib, - NSHost host, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_871( - _lib._class_NSStream1, - _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, - host._id, - port, - inputStream, - outputStream); - } - - static void getBoundStreamsWithBufferSize_inputStream_outputStream_( - SwiftLibrary _lib, - int bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_872( - _lib._class_NSStream1, - _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, - bufferSize, - inputStream, - outputStream); + : NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } @override - NSStream init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSStream._(_ret, _lib, retain: true, release: true); + NSMutableOrderedSet init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static NSStream new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSStream1, _lib._sel_new1); - return NSStream._(_ret, _lib, retain: false, release: true); + NSMutableOrderedSet initWithCapacity_(int numItems) { + final _ret = + _objc_msgSend_355(this.pointer, _sel_initWithCapacity_, numItems); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static NSStream allocWithZone_(SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSStream1, _lib._sel_allocWithZone_1, zone); - return NSStream._(_ret, _lib, retain: false, release: true); + void addObject_(objc.NSObject object) { + _objc_msgSend_49(this.pointer, _sel_addObject_, object.pointer); } - static NSStream alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSStream1, _lib._sel_alloc1); - return NSStream._(_ret, _lib, retain: false, release: true); + void addObjects_count_( + ffi.Pointer> objects, int count) { + _objc_msgSend_416(this.pointer, _sel_addObjects_count_, objects, count); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSStream1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + void addObjectsFromArray_(objc.NSArray array) { + _objc_msgSend_242(this.pointer, _sel_addObjectsFromArray_, array.pointer); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSStream1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { + _objc_msgSend_417(this.pointer, + _sel_exchangeObjectAtIndex_withObjectAtIndex_, idx1, idx2); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSStream1, _lib._sel_accessInstanceVariablesDirectly1); + void moveObjectsAtIndexes_toIndex_(objc.NSIndexSet indexes, int idx) { + _objc_msgSend_418( + this.pointer, _sel_moveObjectsAtIndexes_toIndex_, indexes.pointer, idx); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSStream1, _lib._sel_useStoredAccessor1); + void insertObjects_atIndexes_(objc.NSArray objects, objc.NSIndexSet indexes) { + _objc_msgSend_419(this.pointer, _sel_insertObjects_atIndexes_, + objects.pointer, indexes.pointer); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSStream1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + void setObject_atIndex_(objc.NSObject obj, int idx) { + _objc_msgSend_413(this.pointer, _sel_setObject_atIndex_, obj.pointer, idx); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSStream1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + void setObject_atIndexedSubscript_(objc.NSObject obj, int idx) { + _objc_msgSend_413( + this.pointer, _sel_setObject_atIndexedSubscript_, obj.pointer, idx); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSStream1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + void replaceObjectsInRange_withObjects_count_(_NSRange range, + ffi.Pointer> objects, int count) { + _objc_msgSend_420(this.pointer, + _sel_replaceObjectsInRange_withObjects_count_, range, objects, count); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSStream1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + void replaceObjectsAtIndexes_withObjects_( + objc.NSIndexSet indexes, objc.NSArray objects) { + _objc_msgSend_421(this.pointer, _sel_replaceObjectsAtIndexes_withObjects_, + indexes.pointer, objects.pointer); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSStream1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + void removeObjectsInRange_(_NSRange range) { + _objc_msgSend_81(this.pointer, _sel_removeObjectsInRange_, range); } -} - -abstract class NSStreamStatus { - static const int NSStreamStatusNotOpen = 0; - static const int NSStreamStatusOpening = 1; - static const int NSStreamStatusOpen = 2; - static const int NSStreamStatusReading = 3; - static const int NSStreamStatusWriting = 4; - static const int NSStreamStatusAtEnd = 5; - static const int NSStreamStatusClosed = 6; - static const int NSStreamStatusError = 7; -} -class NSOutputStream extends NSStream { - NSOutputStream._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + void removeObjectsAtIndexes_(objc.NSIndexSet indexes) { + _objc_msgSend_422( + this.pointer, _sel_removeObjectsAtIndexes_, indexes.pointer); + } - /// 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); + void removeAllObjects() { + _objc_msgSend_82(this.pointer, _sel_removeAllObjects); } - /// Returns a [NSOutputStream] that wraps the given raw object pointer. - static NSOutputStream castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOutputStream._(other, lib, retain: retain, release: release); + void removeObject_(objc.NSObject object) { + _objc_msgSend_49(this.pointer, _sel_removeObject_, object.pointer); } - /// Returns whether [obj] is an instance of [NSOutputStream]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSOutputStream1); + void removeObjectsInArray_(objc.NSArray array) { + _objc_msgSend_242(this.pointer, _sel_removeObjectsInArray_, array.pointer); } - int write_maxLength_(ffi.Pointer buffer, int len) { - return _lib._objc_msgSend_864( - _id, _lib._sel_write_maxLength_1, buffer, len); + void intersectOrderedSet_(NSOrderedSet other) { + _objc_msgSend_423(this.pointer, _sel_intersectOrderedSet_, other.pointer); } - bool get hasSpaceAvailable { - return _lib._objc_msgSend_12(_id, _lib._sel_hasSpaceAvailable1); + void minusOrderedSet_(NSOrderedSet other) { + _objc_msgSend_423(this.pointer, _sel_minusOrderedSet_, other.pointer); } - NSOutputStream initToMemory() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_initToMemory1); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + void unionOrderedSet_(NSOrderedSet other) { + _objc_msgSend_423(this.pointer, _sel_unionOrderedSet_, other.pointer); } - NSOutputStream initToBuffer_capacity_( - ffi.Pointer buffer, int capacity) { - final _ret = _lib._objc_msgSend_865( - _id, _lib._sel_initToBuffer_capacity_1, buffer, capacity); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + void intersectSet_(objc.NSSet other) { + _objc_msgSend_424(this.pointer, _sel_intersectSet_, other.pointer); } - NSOutputStream? initWithURL_append_(NSURL url, bool shouldAppend) { - final _ret = _lib._objc_msgSend_866( - _id, _lib._sel_initWithURL_append_1, url._id, shouldAppend); - return _ret.address == 0 - ? null - : NSOutputStream._(_ret, _lib, retain: true, release: true); + void minusSet_(objc.NSSet other) { + _objc_msgSend_424(this.pointer, _sel_minusSet_, other.pointer); } - NSOutputStream? initToFileAtPath_append_(NSString path, bool shouldAppend) { - final _ret = _lib._objc_msgSend_40( - _id, _lib._sel_initToFileAtPath_append_1, path._id, shouldAppend); - return _ret.address == 0 - ? null - : NSOutputStream._(_ret, _lib, retain: true, release: true); + void unionSet_(objc.NSSet other) { + _objc_msgSend_424(this.pointer, _sel_unionSet_, other.pointer); } - static NSOutputStream outputStreamToMemory(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOutputStream1, _lib._sel_outputStreamToMemory1); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + void sortUsingComparator_( + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + _objc_msgSend_425(this.pointer, _sel_sortUsingComparator_, cmptr.pointer); } - static NSOutputStream outputStreamToBuffer_capacity_( - SwiftLibrary _lib, ffi.Pointer buffer, int capacity) { - final _ret = _lib._objc_msgSend_865(_lib._class_NSOutputStream1, - _lib._sel_outputStreamToBuffer_capacity_1, buffer, capacity); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + void sortWithOptions_usingComparator_(int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + _objc_msgSend_426(this.pointer, _sel_sortWithOptions_usingComparator_, opts, + cmptr.pointer); } - static NSOutputStream outputStreamToFileAtPath_append_( - SwiftLibrary _lib, NSString path, bool shouldAppend) { - final _ret = _lib._objc_msgSend_30(_lib._class_NSOutputStream1, - _lib._sel_outputStreamToFileAtPath_append_1, path._id, shouldAppend); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + void sortRange_options_usingComparator_(_NSRange range, int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + _objc_msgSend_427(this.pointer, _sel_sortRange_options_usingComparator_, + range, opts, cmptr.pointer); } - static NSOutputStream? outputStreamWithURL_append_( - SwiftLibrary _lib, NSURL url, bool shouldAppend) { - final _ret = _lib._objc_msgSend_866(_lib._class_NSOutputStream1, - _lib._sel_outputStreamWithURL_append_1, url._id, shouldAppend); - return _ret.address == 0 - ? null - : NSOutputStream._(_ret, _lib, retain: true, release: true); + static NSMutableOrderedSet orderedSetWithCapacity_(int numItems) { + final _ret = _objc_msgSend_355( + _class_NSMutableOrderedSet, _sel_orderedSetWithCapacity_, numItems); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static void getStreamsToHostWithName_port_inputStream_outputStream_( - SwiftLibrary _lib, - NSString hostname, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_867( - _lib._class_NSOutputStream1, - _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, - hostname._id, - port, - inputStream, - outputStream); + void applyDifference_(objc.NSObject difference) { + _objc_msgSend_49(this.pointer, _sel_applyDifference_, difference.pointer); } - static void getStreamsToHost_port_inputStream_outputStream_( - SwiftLibrary _lib, - NSHost host, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_871( - _lib._class_NSOutputStream1, - _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, - host._id, - port, - inputStream, - outputStream); + void sortUsingDescriptors_(objc.NSArray sortDescriptors) { + _objc_msgSend_242( + this.pointer, _sel_sortUsingDescriptors_, sortDescriptors.pointer); } - static void getBoundStreamsWithBufferSize_inputStream_outputStream_( - SwiftLibrary _lib, - int bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_872( - _lib._class_NSOutputStream1, - _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, - bufferSize, - inputStream, - outputStream); + void filterUsingPredicate_(NSPredicate p) { + _objc_msgSend_428(this.pointer, _sel_filterUsingPredicate_, p.pointer); } @override - NSOutputStream init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + NSMutableOrderedSet initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_365( + this.pointer, _sel_initWithObjects_count_, objects, cnt); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static NSOutputStream new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOutputStream1, _lib._sel_new1); - return NSOutputStream._(_ret, _lib, retain: false, release: true); + static NSMutableOrderedSet orderedSet() { + final _ret = _objc_msgSend_40(_class_NSMutableOrderedSet, _sel_orderedSet); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static NSOutputStream allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSOutputStream1, _lib._sel_allocWithZone_1, zone); - return NSOutputStream._(_ret, _lib, retain: false, release: true); + static NSMutableOrderedSet orderedSetWithObject_(objc.NSObject object) { + final _ret = _objc_msgSend_387( + _class_NSMutableOrderedSet, _sel_orderedSetWithObject_, object.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static NSOutputStream alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOutputStream1, _lib._sel_alloc1); - return NSOutputStream._(_ret, _lib, retain: false, release: true); + static NSMutableOrderedSet orderedSetWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_365(_class_NSMutableOrderedSet, + _sel_orderedSetWithObjects_count_, objects, cnt); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSOutputStream1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static NSMutableOrderedSet orderedSetWithObjects_(objc.NSObject firstObj) { + final _ret = _objc_msgSend_387(_class_NSMutableOrderedSet, + _sel_orderedSetWithObjects_, firstObj.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSOutputStream1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static NSMutableOrderedSet orderedSetWithOrderedSet_(NSOrderedSet set) { + final _ret = _objc_msgSend_388(_class_NSMutableOrderedSet, + _sel_orderedSetWithOrderedSet_, set.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSOutputStream1, - _lib._sel_accessInstanceVariablesDirectly1); + static NSMutableOrderedSet orderedSetWithOrderedSet_range_copyItems_( + NSOrderedSet set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_389( + _class_NSMutableOrderedSet, + _sel_orderedSetWithOrderedSet_range_copyItems_, + set.pointer, + range, + flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSOutputStream1, _lib._sel_useStoredAccessor1); + static NSMutableOrderedSet orderedSetWithArray_(objc.NSArray array) { + final _ret = _objc_msgSend_390( + _class_NSMutableOrderedSet, _sel_orderedSetWithArray_, array.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSOutputStream1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static NSMutableOrderedSet orderedSetWithArray_range_copyItems_( + objc.NSArray array, _NSRange range, bool flag) { + final _ret = _objc_msgSend_391(_class_NSMutableOrderedSet, + _sel_orderedSetWithArray_range_copyItems_, array.pointer, range, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSOutputStream1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static NSMutableOrderedSet orderedSetWithSet_(objc.NSSet set) { + final _ret = _objc_msgSend_392( + _class_NSMutableOrderedSet, _sel_orderedSetWithSet_, set.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSOutputStream1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static NSMutableOrderedSet orderedSetWithSet_copyItems_( + objc.NSSet set, bool flag) { + final _ret = _objc_msgSend_393(_class_NSMutableOrderedSet, + _sel_orderedSetWithSet_copyItems_, set.pointer, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSOutputStream1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + @override + NSMutableOrderedSet initWithObject_(objc.NSObject object) { + final _ret = + _objc_msgSend_387(this.pointer, _sel_initWithObject_, object.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOutputStream1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + @override + NSMutableOrderedSet initWithObjects_(objc.NSObject firstObj) { + final _ret = _objc_msgSend_387( + this.pointer, _sel_initWithObjects_, firstObj.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } -} - -class NSHost extends NSObject { - NSHost._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSHost] that points to the same underlying object as [other]. - static NSHost castFrom(T other) { - return NSHost._(other._id, other._lib, retain: true, release: true); + @override + NSMutableOrderedSet initWithOrderedSet_(NSOrderedSet set) { + final _ret = + _objc_msgSend_388(this.pointer, _sel_initWithOrderedSet_, set.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - /// Returns a [NSHost] that wraps the given raw object pointer. - static NSHost castFromPointer(SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHost._(other, lib, retain: retain, release: release); + @override + NSMutableOrderedSet initWithOrderedSet_copyItems_( + NSOrderedSet set, bool flag) { + final _ret = _objc_msgSend_394( + this.pointer, _sel_initWithOrderedSet_copyItems_, set.pointer, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - /// Returns whether [obj] is an instance of [NSHost]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSHost1); + @override + NSMutableOrderedSet initWithOrderedSet_range_copyItems_( + NSOrderedSet set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_389(this.pointer, + _sel_initWithOrderedSet_range_copyItems_, set.pointer, range, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - static NSHost currentHost(SwiftLibrary _lib) { + @override + NSMutableOrderedSet initWithArray_(objc.NSArray array) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSHost1, _lib._sel_currentHost1); - return NSHost._(_ret, _lib, retain: true, release: true); + _objc_msgSend_390(this.pointer, _sel_initWithArray_, array.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static NSHost hostWithName_(SwiftLibrary _lib, NSString? name) { - final _ret = _lib._objc_msgSend_868(_lib._class_NSHost1, - _lib._sel_hostWithName_1, name?._id ?? ffi.nullptr); - return NSHost._(_ret, _lib, retain: true, release: true); + @override + NSMutableOrderedSet initWithArray_copyItems_(objc.NSArray set, bool flag) { + final _ret = _objc_msgSend_395( + this.pointer, _sel_initWithArray_copyItems_, set.pointer, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - static NSHost hostWithAddress_(SwiftLibrary _lib, NSString address) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSHost1, _lib._sel_hostWithAddress_1, address._id); - return NSHost._(_ret, _lib, retain: true, release: true); + @override + NSMutableOrderedSet initWithArray_range_copyItems_( + objc.NSArray set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_391(this.pointer, + _sel_initWithArray_range_copyItems_, set.pointer, range, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - bool isEqualToHost_(NSHost aHost) { - return _lib._objc_msgSend_869(_id, _lib._sel_isEqualToHost_1, aHost._id); + @override + NSMutableOrderedSet initWithSet_(objc.NSSet set) { + final _ret = + _objc_msgSend_392(this.pointer, _sel_initWithSet_, set.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - NSString? get name { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_name1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + @override + NSMutableOrderedSet initWithSet_copyItems_(objc.NSSet set, bool flag) { + final _ret = _objc_msgSend_393( + this.pointer, _sel_initWithSet_copyItems_, set.pointer, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - NSArray get names { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_names1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSMutableOrderedSet new1() { + final _ret = _objc_msgSend_40(_class_NSMutableOrderedSet, _sel_new); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - NSString? get address { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_address1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static NSMutableOrderedSet allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSMutableOrderedSet, _sel_allocWithZone_, zone); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - NSArray get addresses { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_addresses1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSMutableOrderedSet alloc() { + final _ret = _objc_msgSend_40(_class_NSMutableOrderedSet, _sel_alloc); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - NSString? get localizedName { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_localizedName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSMutableOrderedSet, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - static void setHostCacheEnabled_(SwiftLibrary _lib, bool flag) { - _lib._objc_msgSend_870( - _lib._class_NSHost1, _lib._sel_setHostCacheEnabled_1, flag); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSMutableOrderedSet, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool isHostCacheEnabled(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSHost1, _lib._sel_isHostCacheEnabled1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSMutableOrderedSet, _sel_accessInstanceVariablesDirectly); } - static void flushHostCache(SwiftLibrary _lib) { - _lib._objc_msgSend_1(_lib._class_NSHost1, _lib._sel_flushHostCache1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSMutableOrderedSet, _sel_useStoredAccessor); } - @override - NSHost init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSHost._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSMutableOrderedSet, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static NSHost new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSHost1, _lib._sel_new1); - return NSHost._(_ret, _lib, retain: false, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSMutableOrderedSet, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static NSHost allocWithZone_(SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSHost1, _lib._sel_allocWithZone_1, zone); - return NSHost._(_ret, _lib, retain: false, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSMutableOrderedSet, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSMutableOrderedSet, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSMutableOrderedSet, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSMutableOrderedSet = objc.getClass("NSMutableOrderedSet"); +late final _sel_insertObject_atIndex_ = + objc.registerName("insertObject:atIndex:"); +final _objc_msgSend_413 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_removeObjectAtIndex_ = + objc.registerName("removeObjectAtIndex:"); +final _objc_msgSend_414 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_replaceObjectAtIndex_withObject_ = + objc.registerName("replaceObjectAtIndex:withObject:"); +final _objc_msgSend_415 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_initWithCapacity_ = objc.registerName("initWithCapacity:"); +late final _sel_addObject_ = objc.registerName("addObject:"); +late final _sel_addObjects_count_ = objc.registerName("addObjects:count:"); +final _objc_msgSend_416 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>(); +late final _sel_addObjectsFromArray_ = + objc.registerName("addObjectsFromArray:"); +late final _sel_exchangeObjectAtIndex_withObjectAtIndex_ = + objc.registerName("exchangeObjectAtIndex:withObjectAtIndex:"); +final _objc_msgSend_417 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int, int)>(); +late final _sel_moveObjectsAtIndexes_toIndex_ = + objc.registerName("moveObjectsAtIndexes:toIndex:"); +final _objc_msgSend_418 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_insertObjects_atIndexes_ = + objc.registerName("insertObjects:atIndexes:"); +final _objc_msgSend_419 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_setObject_atIndex_ = objc.registerName("setObject:atIndex:"); +late final _sel_setObject_atIndexedSubscript_ = + objc.registerName("setObject:atIndexedSubscript:"); +late final _sel_replaceObjectsInRange_withObjects_count_ = + objc.registerName("replaceObjectsInRange:withObjects:count:"); +final _objc_msgSend_420 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer>, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer>, + int)>(); +late final _sel_replaceObjectsAtIndexes_withObjects_ = + objc.registerName("replaceObjectsAtIndexes:withObjects:"); +final _objc_msgSend_421 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeObjectsInRange_ = + objc.registerName("removeObjectsInRange:"); +late final _sel_removeObjectsAtIndexes_ = + objc.registerName("removeObjectsAtIndexes:"); +final _objc_msgSend_422 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_removeAllObjects = objc.registerName("removeAllObjects"); +late final _sel_removeObject_ = objc.registerName("removeObject:"); +late final _sel_removeObjectsInArray_ = + objc.registerName("removeObjectsInArray:"); +late final _sel_intersectOrderedSet_ = + objc.registerName("intersectOrderedSet:"); +final _objc_msgSend_423 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_minusOrderedSet_ = objc.registerName("minusOrderedSet:"); +late final _sel_unionOrderedSet_ = objc.registerName("unionOrderedSet:"); +late final _sel_intersectSet_ = objc.registerName("intersectSet:"); +final _objc_msgSend_424 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_minusSet_ = objc.registerName("minusSet:"); +late final _sel_unionSet_ = objc.registerName("unionSet:"); +late final _sel_sortUsingComparator_ = + objc.registerName("sortUsingComparator:"); +final _objc_msgSend_425 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_sortWithOptions_usingComparator_ = + objc.registerName("sortWithOptions:usingComparator:"); +final _objc_msgSend_426 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_sortRange_options_usingComparator_ = + objc.registerName("sortRange:options:usingComparator:"); +final _objc_msgSend_427 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); +late final _sel_orderedSetWithCapacity_ = + objc.registerName("orderedSetWithCapacity:"); +late final _sel_applyDifference_ = objc.registerName("applyDifference:"); +late final _sel_sortUsingDescriptors_ = + objc.registerName("sortUsingDescriptors:"); +late final _sel_filterUsingPredicate_ = + objc.registerName("filterUsingPredicate:"); +final _objc_msgSend_428 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class NSMorphology extends objc.NSObject { + NSMorphology._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSMorphology] that points to the same underlying object as [other]. + NSMorphology.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSMorphology] that wraps the given raw object pointer. + NSMorphology.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSMorphology]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMorphology); } - static NSHost alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSHost1, _lib._sel_alloc1); - return NSHost._(_ret, _lib, retain: false, release: true); + int get grammaticalGender { + return _objc_msgSend_429(this.pointer, _sel_grammaticalGender); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSHost1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + set grammaticalGender(int value) { + return _objc_msgSend_430(this.pointer, _sel_setGrammaticalGender_, value); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSHost1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + int get partOfSpeech { + return _objc_msgSend_431(this.pointer, _sel_partOfSpeech); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSHost1, _lib._sel_accessInstanceVariablesDirectly1); + set partOfSpeech(int value) { + return _objc_msgSend_432(this.pointer, _sel_setPartOfSpeech_, value); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSHost1, _lib._sel_useStoredAccessor1); + int get number { + return _objc_msgSend_433(this.pointer, _sel_number); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSHost1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + set number(int value) { + return _objc_msgSend_434(this.pointer, _sel_setNumber_, value); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSHost1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + int get grammaticalCase { + return _objc_msgSend_435(this.pointer, _sel_grammaticalCase); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSHost1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + set grammaticalCase(int value) { + return _objc_msgSend_436(this.pointer, _sel_setGrammaticalCase_, value); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSHost1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + int get determination { + return _objc_msgSend_437(this.pointer, _sel_determination); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSHost1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + set determination(int value) { + return _objc_msgSend_438(this.pointer, _sel_setDetermination_, value); } -} -class NSURLResponse extends NSObject { - NSURLResponse._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + int get grammaticalPerson { + return _objc_msgSend_439(this.pointer, _sel_grammaticalPerson); + } - /// 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); + set grammaticalPerson(int value) { + return _objc_msgSend_440(this.pointer, _sel_setGrammaticalPerson_, value); } - /// Returns a [NSURLResponse] that wraps the given raw object pointer. - static NSURLResponse castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLResponse._(other, lib, retain: retain, release: release); + int get pronounType { + return _objc_msgSend_441(this.pointer, _sel_pronounType); } - /// 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); + set pronounType(int value) { + return _objc_msgSend_442(this.pointer, _sel_setPronounType_, value); } - NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( - NSURL URL, NSString? MIMEType, int length, NSString? name) { - final _ret = _lib._objc_msgSend_877( - _id, - _lib._sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1, - URL._id, - MIMEType?._id ?? ffi.nullptr, - length, - name?._id ?? ffi.nullptr); - return NSURLResponse._(_ret, _lib, retain: true, release: true); + int get definiteness { + return _objc_msgSend_443(this.pointer, _sel_definiteness); } - NSURL? get URL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + set definiteness(int value) { + return _objc_msgSend_444(this.pointer, _sel_setDefiniteness_, value); } - NSString? get MIMEType { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_MIMEType1); + NSMorphologyCustomPronoun? customPronounForLanguage_(objc.NSString language) { + final _ret = _objc_msgSend_446( + this.pointer, _sel_customPronounForLanguage_, language.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: true, release: true); } - int get expectedContentLength { - return _lib._objc_msgSend_238(_id, _lib._sel_expectedContentLength1); + bool setCustomPronoun_forLanguage_error_(NSMorphologyCustomPronoun? features, + objc.NSString language, ffi.Pointer> error) { + return _objc_msgSend_447( + this.pointer, + _sel_setCustomPronoun_forLanguage_error_, + features?.pointer ?? ffi.nullptr, + language.pointer, + error); } - NSString? get textEncodingName { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_textEncodingName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + bool get unspecified { + return _objc_msgSend_7(this.pointer, _sel_isUnspecified); } - NSString? get suggestedFilename { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_suggestedFilename1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static NSMorphology getUserMorphology() { + final _ret = _objc_msgSend_448(_class_NSMorphology, _sel_userMorphology); + return NSMorphology.castFromPointer(_ret, retain: true, release: true); } @override - NSURLResponse init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLResponse._(_ret, _lib, retain: true, release: true); + NSMorphology init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSMorphology.castFromPointer(_ret, retain: true, release: true); } - static NSURLResponse new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_new1); - return NSURLResponse._(_ret, _lib, retain: false, release: true); + static NSMorphology new1() { + final _ret = _objc_msgSend_40(_class_NSMorphology, _sel_new); + return NSMorphology.castFromPointer(_ret, retain: false, release: true); } - static NSURLResponse allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLResponse1, _lib._sel_allocWithZone_1, zone); - return NSURLResponse._(_ret, _lib, retain: false, release: true); + static NSMorphology allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSMorphology, _sel_allocWithZone_, zone); + return NSMorphology.castFromPointer(_ret, retain: false, release: true); } - static NSURLResponse alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_alloc1); - return NSURLResponse._(_ret, _lib, retain: false, release: true); + static NSMorphology alloc() { + final _ret = _objc_msgSend_40(_class_NSMorphology, _sel_alloc); + return NSMorphology.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLResponse1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSMorphology, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLResponse1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSMorphology, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLResponse1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSMorphology, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLResponse1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSMorphology, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLResponse1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSMorphology, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLResponse1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSMorphology, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLResponse1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSMorphology, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSURLResponse1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSMorphology, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLResponse1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSMorphology, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -abstract class NSURLSessionTaskState { - static const int NSURLSessionTaskStateRunning = 0; - static const int NSURLSessionTaskStateSuspended = 1; - static const int NSURLSessionTaskStateCanceling = 2; - static const int NSURLSessionTaskStateCompleted = 3; +late final _class_NSMorphology = objc.getClass("NSMorphology"); + +abstract class NSGrammaticalGender { + static const int NSGrammaticalGenderNotSet = 0; + static const int NSGrammaticalGenderFeminine = 1; + static const int NSGrammaticalGenderMasculine = 2; + static const int NSGrammaticalGenderNeuter = 3; } -void _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSArray_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSArray_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSArray_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSArray_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSArray_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +late final _sel_grammaticalGender = objc.registerName("grammaticalGender"); +final _objc_msgSend_429 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setGrammaticalGender_ = + objc.registerName("setGrammaticalGender:"); +final _objc_msgSend_430 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); + +abstract class NSGrammaticalPartOfSpeech { + static const int NSGrammaticalPartOfSpeechNotSet = 0; + static const int NSGrammaticalPartOfSpeechDeterminer = 1; + static const int NSGrammaticalPartOfSpeechPronoun = 2; + static const int NSGrammaticalPartOfSpeechLetter = 3; + static const int NSGrammaticalPartOfSpeechAdverb = 4; + static const int NSGrammaticalPartOfSpeechParticle = 5; + static const int NSGrammaticalPartOfSpeechAdjective = 6; + static const int NSGrammaticalPartOfSpeechAdposition = 7; + static const int NSGrammaticalPartOfSpeechVerb = 8; + static const int NSGrammaticalPartOfSpeechNoun = 9; + static const int NSGrammaticalPartOfSpeechConjunction = 10; + static const int NSGrammaticalPartOfSpeechNumeral = 11; + static const int NSGrammaticalPartOfSpeechInterjection = 12; + static const int NSGrammaticalPartOfSpeechPreposition = 13; + static const int NSGrammaticalPartOfSpeechAbbreviation = 14; } -void _ObjCBlock_ffiVoid_NSArray_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSArray_closureRegistry[block.ref.target.address]!(arg0); +late final _sel_partOfSpeech = objc.registerName("partOfSpeech"); +final _objc_msgSend_431 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setPartOfSpeech_ = objc.registerName("setPartOfSpeech:"); +final _objc_msgSend_432 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); -class ObjCBlock_ffiVoid_NSArray extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSArray._(ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); +abstract class NSGrammaticalNumber { + static const int NSGrammaticalNumberNotSet = 0; + static const int NSGrammaticalNumberSingular = 1; + static const int NSGrammaticalNumberZero = 2; + static const int NSGrammaticalNumberPlural = 3; + static const int NSGrammaticalNumberPluralTwo = 4; + static const int NSGrammaticalNumberPluralFew = 5; + static const int NSGrammaticalNumberPluralMany = 6; +} - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSArray castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSArray._(pointer, lib, - retain: retain, release: release); - } +late final _sel_number = objc.registerName("number"); +final _objc_msgSend_433 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setNumber_ = objc.registerName("setNumber:"); +final _objc_msgSend_434 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSArray.fromFunctionPointer( - SwiftLibrary 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>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +abstract class NSGrammaticalCase { + static const int NSGrammaticalCaseNotSet = 0; + static const int NSGrammaticalCaseNominative = 1; + static const int NSGrammaticalCaseAccusative = 2; + static const int NSGrammaticalCaseDative = 3; + static const int NSGrammaticalCaseGenitive = 4; + static const int NSGrammaticalCasePrepositional = 5; + static const int NSGrammaticalCaseAblative = 6; + static const int NSGrammaticalCaseAdessive = 7; + static const int NSGrammaticalCaseAllative = 8; + static const int NSGrammaticalCaseElative = 9; + static const int NSGrammaticalCaseIllative = 10; + static const int NSGrammaticalCaseEssive = 11; + static const int NSGrammaticalCaseInessive = 12; + static const int NSGrammaticalCaseLocative = 13; + static const int NSGrammaticalCaseTranslative = 14; +} - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSArray.fromFunction( - SwiftLibrary lib, void Function(NSArray?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSArray_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSArray._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; +late final _sel_grammaticalCase = objc.registerName("grammaticalCase"); +final _objc_msgSend_435 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setGrammaticalCase_ = objc.registerName("setGrammaticalCase:"); +final _objc_msgSend_436 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSArray.listener( - SwiftLibrary lib, void Function(NSArray?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSArray_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSArray_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSArray._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; +abstract class NSGrammaticalDetermination { + static const int NSGrammaticalDeterminationNotSet = 0; + static const int NSGrammaticalDeterminationIndependent = 1; + static const int NSGrammaticalDeterminationDependent = 2; +} + +late final _sel_determination = objc.registerName("determination"); +final _objc_msgSend_437 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDetermination_ = objc.registerName("setDetermination:"); +final _objc_msgSend_438 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); + +abstract class NSGrammaticalPerson { + static const int NSGrammaticalPersonNotSet = 0; + static const int NSGrammaticalPersonFirst = 1; + static const int NSGrammaticalPersonSecond = 2; + static const int NSGrammaticalPersonThird = 3; +} - void call(NSArray? arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); +late final _sel_grammaticalPerson = objc.registerName("grammaticalPerson"); +final _objc_msgSend_439 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setGrammaticalPerson_ = + objc.registerName("setGrammaticalPerson:"); +final _objc_msgSend_440 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); + +abstract class NSGrammaticalPronounType { + static const int NSGrammaticalPronounTypeNotSet = 0; + static const int NSGrammaticalPronounTypePersonal = 1; + static const int NSGrammaticalPronounTypeReflexive = 2; + static const int NSGrammaticalPronounTypePossessive = 3; +} + +late final _sel_pronounType = objc.registerName("pronounType"); +final _objc_msgSend_441 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setPronounType_ = objc.registerName("setPronounType:"); +final _objc_msgSend_442 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); + +abstract class NSGrammaticalDefiniteness { + static const int NSGrammaticalDefinitenessNotSet = 0; + static const int NSGrammaticalDefinitenessIndefinite = 1; + static const int NSGrammaticalDefinitenessDefinite = 2; } -class NSIndexPath extends NSObject { - NSIndexPath._(ffi.Pointer id, SwiftLibrary lib, +late final _sel_definiteness = objc.registerName("definiteness"); +final _objc_msgSend_443 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDefiniteness_ = objc.registerName("setDefiniteness:"); +final _objc_msgSend_444 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); + +class NSMorphologyCustomPronoun extends objc.NSObject { + NSMorphologyCustomPronoun._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSIndexPath] that points to the same underlying object as [other]. - static NSIndexPath castFrom(T other) { - return NSIndexPath._(other._id, other._lib, retain: true, release: true); - } + /// Constructs a [NSMorphologyCustomPronoun] that points to the same underlying object as [other]. + NSMorphologyCustomPronoun.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSIndexPath] that wraps the given raw object pointer. - static NSIndexPath castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSIndexPath._(other, lib, retain: retain, release: release); + /// Constructs a [NSMorphologyCustomPronoun] that wraps the given raw object pointer. + NSMorphologyCustomPronoun.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSMorphologyCustomPronoun]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMorphologyCustomPronoun); } - /// Returns whether [obj] is an instance of [NSIndexPath]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSIndexPath1); + static bool isSupportedForLanguage_(objc.NSString language) { + return _objc_msgSend_51(_class_NSMorphologyCustomPronoun, + _sel_isSupportedForLanguage_, language.pointer); } - static NSIndexPath indexPathWithIndex_(SwiftLibrary _lib, int index) { - final _ret = _lib._objc_msgSend_65( - _lib._class_NSIndexPath1, _lib._sel_indexPathWithIndex_1, index); - return NSIndexPath._(_ret, _lib, retain: true, release: true); + static objc.NSArray requiredKeysForLanguage_(objc.NSString language) { + final _ret = _objc_msgSend_445(_class_NSMorphologyCustomPronoun, + _sel_requiredKeysForLanguage_, language.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSIndexPath indexPathWithIndexes_length_( - SwiftLibrary _lib, ffi.Pointer indexes, int length) { - final _ret = _lib._objc_msgSend_884(_lib._class_NSIndexPath1, - _lib._sel_indexPathWithIndexes_length_1, indexes, length); - return NSIndexPath._(_ret, _lib, retain: true, release: true); + objc.NSString? get subjectForm { + final _ret = _objc_msgSend_13(this.pointer, _sel_subjectForm); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSIndexPath initWithIndexes_length_( - ffi.Pointer indexes, int length) { - final _ret = _lib._objc_msgSend_884( - _id, _lib._sel_initWithIndexes_length_1, indexes, length); - return NSIndexPath._(_ret, _lib, retain: true, release: true); + set subjectForm(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setSubjectForm_, value?.pointer ?? ffi.nullptr); } - NSIndexPath initWithIndex_(int index) { - final _ret = _lib._objc_msgSend_65(_id, _lib._sel_initWithIndex_1, index); - return NSIndexPath._(_ret, _lib, retain: true, release: true); + objc.NSString? get objectForm { + final _ret = _objc_msgSend_13(this.pointer, _sel_objectForm); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSIndexPath indexPathByAddingIndex_(int index) { - final _ret = - _lib._objc_msgSend_885(_id, _lib._sel_indexPathByAddingIndex_1, index); - return NSIndexPath._(_ret, _lib, retain: true, release: true); + set objectForm(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setObjectForm_, value?.pointer ?? ffi.nullptr); } - NSIndexPath indexPathByRemovingLastIndex() { - final _ret = - _lib._objc_msgSend_886(_id, _lib._sel_indexPathByRemovingLastIndex1); - return NSIndexPath._(_ret, _lib, retain: true, release: true); + objc.NSString? get possessiveForm { + final _ret = _objc_msgSend_13(this.pointer, _sel_possessiveForm); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int indexAtPosition_(int position) { - return _lib._objc_msgSend_94(_id, _lib._sel_indexAtPosition_1, position); + set possessiveForm(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setPossessiveForm_, value?.pointer ?? ffi.nullptr); } - int get length { - return _lib._objc_msgSend_10(_id, _lib._sel_length1); + objc.NSString? get possessiveAdjectiveForm { + final _ret = _objc_msgSend_13(this.pointer, _sel_possessiveAdjectiveForm); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void getIndexes_range_( - ffi.Pointer indexes, _NSRange positionRange) { - _lib._objc_msgSend_887( - _id, _lib._sel_getIndexes_range_1, indexes, positionRange); + set possessiveAdjectiveForm(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setPossessiveAdjectiveForm_, + value?.pointer ?? ffi.nullptr); } - int compare_(NSIndexPath otherObject) { - return _lib._objc_msgSend_888(_id, _lib._sel_compare_1, otherObject._id); + objc.NSString? get reflexiveForm { + final _ret = _objc_msgSend_13(this.pointer, _sel_reflexiveForm); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void getIndexes_(ffi.Pointer indexes) { - _lib._objc_msgSend_889(_id, _lib._sel_getIndexes_1, indexes); + set reflexiveForm(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setReflexiveForm_, value?.pointer ?? ffi.nullptr); } @override - NSIndexPath init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSIndexPath._(_ret, _lib, retain: true, release: true); + NSMorphologyCustomPronoun init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: true, release: true); } - static NSIndexPath new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSIndexPath1, _lib._sel_new1); - return NSIndexPath._(_ret, _lib, retain: false, release: true); + static NSMorphologyCustomPronoun new1() { + final _ret = _objc_msgSend_40(_class_NSMorphologyCustomPronoun, _sel_new); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: false, release: true); } - static NSIndexPath allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSIndexPath1, _lib._sel_allocWithZone_1, zone); - return NSIndexPath._(_ret, _lib, retain: false, release: true); + static NSMorphologyCustomPronoun allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSMorphologyCustomPronoun, _sel_allocWithZone_, zone); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: false, release: true); } - static NSIndexPath alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSIndexPath1, _lib._sel_alloc1); - return NSIndexPath._(_ret, _lib, retain: false, release: true); + static NSMorphologyCustomPronoun alloc() { + final _ret = _objc_msgSend_40(_class_NSMorphologyCustomPronoun, _sel_alloc); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSIndexPath1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSMorphologyCustomPronoun, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSIndexPath1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSMorphologyCustomPronoun, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSIndexPath1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSMorphologyCustomPronoun, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSIndexPath1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSMorphologyCustomPronoun, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSIndexPath1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSMorphologyCustomPronoun, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSIndexPath1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSMorphologyCustomPronoun, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSIndexPath1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSMorphologyCustomPronoun, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSMorphologyCustomPronoun, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSMorphologyCustomPronoun, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSMorphologyCustomPronoun = + objc.getClass("NSMorphologyCustomPronoun"); +late final _sel_isSupportedForLanguage_ = + objc.registerName("isSupportedForLanguage:"); +late final _sel_requiredKeysForLanguage_ = + objc.registerName("requiredKeysForLanguage:"); +final _objc_msgSend_445 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_subjectForm = objc.registerName("subjectForm"); +late final _sel_setSubjectForm_ = objc.registerName("setSubjectForm:"); +late final _sel_objectForm = objc.registerName("objectForm"); +late final _sel_setObjectForm_ = objc.registerName("setObjectForm:"); +late final _sel_possessiveForm = objc.registerName("possessiveForm"); +late final _sel_setPossessiveForm_ = objc.registerName("setPossessiveForm:"); +late final _sel_possessiveAdjectiveForm = + objc.registerName("possessiveAdjectiveForm"); +late final _sel_setPossessiveAdjectiveForm_ = + objc.registerName("setPossessiveAdjectiveForm:"); +late final _sel_reflexiveForm = objc.registerName("reflexiveForm"); +late final _sel_setReflexiveForm_ = objc.registerName("setReflexiveForm:"); +late final _sel_customPronounForLanguage_ = + objc.registerName("customPronounForLanguage:"); +final _objc_msgSend_446 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCustomPronoun_forLanguage_error_ = + objc.registerName("setCustomPronoun:forLanguage:error:"); +final _objc_msgSend_447 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_isUnspecified = objc.registerName("isUnspecified"); +late final _sel_userMorphology = objc.registerName("userMorphology"); +final _objc_msgSend_448 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + +class NSOperationQueue extends objc.NSObject { + NSOperationQueue._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSOperationQueue] that points to the same underlying object as [other]. + NSOperationQueue.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSOperationQueue] that wraps the given raw object pointer. + NSOperationQueue.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSOperationQueue]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSOperationQueue); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSIndexPath1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSProgress get progress { + final _ret = _objc_msgSend_347(this.pointer, _sel_progress); + return objc.NSProgress.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSIndexPath1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + void addOperation_(NSOperation op) { + _objc_msgSend_449(this.pointer, _sel_addOperation_, op.pointer); } -} -class NSInflectionRule extends NSObject { - NSInflectionRule._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + void addOperations_waitUntilFinished_(objc.NSArray ops, bool wait) { + _objc_msgSend_456( + this.pointer, _sel_addOperations_waitUntilFinished_, ops.pointer, wait); + } - /// Returns a [NSInflectionRule] that points to the same underlying object as [other]. - static NSInflectionRule castFrom(T other) { - return NSInflectionRule._(other._id, other._lib, - retain: true, release: true); + void addOperationWithBlock_(ObjCBlock_ffiVoid block) { + _objc_msgSend_249(this.pointer, _sel_addOperationWithBlock_, block.pointer); } - /// Returns a [NSInflectionRule] that wraps the given raw object pointer. - static NSInflectionRule castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInflectionRule._(other, lib, retain: retain, release: release); + void addBarrierBlock_(ObjCBlock_ffiVoid barrier) { + _objc_msgSend_249(this.pointer, _sel_addBarrierBlock_, barrier.pointer); } - /// Returns whether [obj] is an instance of [NSInflectionRule]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSInflectionRule1); + int get maxConcurrentOperationCount { + return _objc_msgSend_114(this.pointer, _sel_maxConcurrentOperationCount); } - @override - NSObject init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSObject._(_ret, _lib, retain: true, release: true); + set maxConcurrentOperationCount(int value) { + return _objc_msgSend_134( + this.pointer, _sel_setMaxConcurrentOperationCount_, value); } - static NSInflectionRule getAutomaticRule(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_890( - _lib._class_NSInflectionRule1, _lib._sel_automaticRule1); - return NSInflectionRule._(_ret, _lib, retain: true, release: true); + bool get suspended { + return _objc_msgSend_7(this.pointer, _sel_isSuspended); } - static bool canInflectLanguage_(SwiftLibrary _lib, NSString language) { - return _lib._objc_msgSend_64(_lib._class_NSInflectionRule1, - _lib._sel_canInflectLanguage_1, language._id); + set suspended(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setSuspended_, value); } - static bool getCanInflectPreferredLocalization(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSInflectionRule1, - _lib._sel_canInflectPreferredLocalization1); + objc.NSString? get name { + final _ret = _objc_msgSend_13(this.pointer, _sel_name); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSInflectionRule new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSInflectionRule1, _lib._sel_new1); - return NSInflectionRule._(_ret, _lib, retain: false, release: true); + set name(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); } - static NSInflectionRule allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSInflectionRule1, _lib._sel_allocWithZone_1, zone); - return NSInflectionRule._(_ret, _lib, retain: false, release: true); + int get qualityOfService { + return _objc_msgSend_454(this.pointer, _sel_qualityOfService); } - static NSInflectionRule alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSInflectionRule1, _lib._sel_alloc1); - return NSInflectionRule._(_ret, _lib, retain: false, release: true); + set qualityOfService(int value) { + return _objc_msgSend_455(this.pointer, _sel_setQualityOfService_, value); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSInflectionRule1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + objc.NSObject? get underlyingQueue { + final _ret = _objc_msgSend_457(this.pointer, _sel_underlyingQueue); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSInflectionRule1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + set underlyingQueue(objc.NSObject? value) { + return _objc_msgSend_458( + this.pointer, _sel_setUnderlyingQueue_, value?.pointer ?? ffi.nullptr); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSInflectionRule1, - _lib._sel_accessInstanceVariablesDirectly1); + void cancelAllOperations() { + _objc_msgSend_82(this.pointer, _sel_cancelAllOperations); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSInflectionRule1, _lib._sel_useStoredAccessor1); + void waitUntilAllOperationsAreFinished() { + _objc_msgSend_82(this.pointer, _sel_waitUntilAllOperationsAreFinished); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSInflectionRule1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static NSOperationQueue? getCurrentQueue() { + final _ret = _objc_msgSend_459(_class_NSOperationQueue, _sel_currentQueue); + return _ret.address == 0 + ? null + : NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSInflectionRule1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static NSOperationQueue getMainQueue() { + final _ret = _objc_msgSend_460(_class_NSOperationQueue, _sel_mainQueue); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSInflectionRule1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray get operations { + final _ret = _objc_msgSend_6(this.pointer, _sel_operations); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSInflectionRule1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + int get operationCount { + return _objc_msgSend_29(this.pointer, _sel_operationCount); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSInflectionRule1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + @override + NSOperationQueue init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } -} -class NSMorphology extends NSObject { - NSMorphology._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + static NSOperationQueue new1() { + final _ret = _objc_msgSend_40(_class_NSOperationQueue, _sel_new); + return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); + } - /// Returns a [NSMorphology] that points to the same underlying object as [other]. - static NSMorphology castFrom(T other) { - return NSMorphology._(other._id, other._lib, retain: true, release: true); + static NSOperationQueue allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSOperationQueue, _sel_allocWithZone_, zone); + return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } - /// Returns a [NSMorphology] that wraps the given raw object pointer. - static NSMorphology castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMorphology._(other, lib, retain: retain, release: release); + static NSOperationQueue alloc() { + final _ret = _objc_msgSend_40(_class_NSOperationQueue, _sel_alloc); + return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } - /// Returns whether [obj] is an instance of [NSMorphology]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSMorphology1); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSOperationQueue, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - int get grammaticalGender { - return _lib._objc_msgSend_891(_id, _lib._sel_grammaticalGender1); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSOperationQueue, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - set grammaticalGender(int value) { - return _lib._objc_msgSend_892(_id, _lib._sel_setGrammaticalGender_1, value); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSOperationQueue, _sel_accessInstanceVariablesDirectly); } - int get partOfSpeech { - return _lib._objc_msgSend_893(_id, _lib._sel_partOfSpeech1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSOperationQueue, _sel_useStoredAccessor); } - set partOfSpeech(int value) { - return _lib._objc_msgSend_894(_id, _lib._sel_setPartOfSpeech_1, value); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSOperationQueue, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - int get number { - return _lib._objc_msgSend_895(_id, _lib._sel_number1); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSOperationQueue, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - set number(int value) { - return _lib._objc_msgSend_896(_id, _lib._sel_setNumber_1, value); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSOperationQueue, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - int get grammaticalCase { - return _lib._objc_msgSend_897(_id, _lib._sel_grammaticalCase1); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSOperationQueue, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set grammaticalCase(int value) { - return _lib._objc_msgSend_898(_id, _lib._sel_setGrammaticalCase_1, value); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSOperationQueue, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - int get determination { - return _lib._objc_msgSend_899(_id, _lib._sel_determination1); +late final _class_NSOperationQueue = objc.getClass("NSOperationQueue"); + +class NSOperation extends objc.NSObject { + NSOperation._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSOperation] that points to the same underlying object as [other]. + NSOperation.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSOperation] that wraps the given raw object pointer. + NSOperation.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSOperation]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSOperation); } - set determination(int value) { - return _lib._objc_msgSend_900(_id, _lib._sel_setDetermination_1, value); + void start() { + _objc_msgSend_82(this.pointer, _sel_start); } - int get grammaticalPerson { - return _lib._objc_msgSend_901(_id, _lib._sel_grammaticalPerson1); + void main() { + _objc_msgSend_82(this.pointer, _sel_main); } - set grammaticalPerson(int value) { - return _lib._objc_msgSend_902(_id, _lib._sel_setGrammaticalPerson_1, value); + bool get cancelled { + return _objc_msgSend_7(this.pointer, _sel_isCancelled); } - int get pronounType { - return _lib._objc_msgSend_903(_id, _lib._sel_pronounType1); + void cancel() { + _objc_msgSend_82(this.pointer, _sel_cancel); } - set pronounType(int value) { - return _lib._objc_msgSend_904(_id, _lib._sel_setPronounType_1, value); + bool get executing { + return _objc_msgSend_7(this.pointer, _sel_isExecuting); } - int get definiteness { - return _lib._objc_msgSend_905(_id, _lib._sel_definiteness1); + bool get finished { + return _objc_msgSend_7(this.pointer, _sel_isFinished); } - set definiteness(int value) { - return _lib._objc_msgSend_906(_id, _lib._sel_setDefiniteness_1, value); + bool get concurrent { + return _objc_msgSend_7(this.pointer, _sel_isConcurrent); } - NSMorphologyCustomPronoun? customPronounForLanguage_(NSString language) { - final _ret = _lib._objc_msgSend_907( - _id, _lib._sel_customPronounForLanguage_1, language._id); - return _ret.address == 0 - ? null - : NSMorphologyCustomPronoun._(_ret, _lib, retain: true, release: true); + bool get asynchronous { + return _objc_msgSend_7(this.pointer, _sel_isAsynchronous); } - bool setCustomPronoun_forLanguage_error_(NSMorphologyCustomPronoun? features, - NSString language, ffi.Pointer> error) { - return _lib._objc_msgSend_908( - _id, - _lib._sel_setCustomPronoun_forLanguage_error_1, - features?._id ?? ffi.nullptr, - language._id, - error); + bool get ready { + return _objc_msgSend_7(this.pointer, _sel_isReady); } - bool get unspecified { - return _lib._objc_msgSend_12(_id, _lib._sel_isUnspecified1); + void addDependency_(NSOperation op) { + _objc_msgSend_449(this.pointer, _sel_addDependency_, op.pointer); } - static NSMorphology getUserMorphology(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_909( - _lib._class_NSMorphology1, _lib._sel_userMorphology1); - return NSMorphology._(_ret, _lib, retain: true, release: true); + void removeDependency_(NSOperation op) { + _objc_msgSend_449(this.pointer, _sel_removeDependency_, op.pointer); } - @override - NSMorphology init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMorphology._(_ret, _lib, retain: true, release: true); + objc.NSArray get dependencies { + final _ret = _objc_msgSend_6(this.pointer, _sel_dependencies); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSMorphology new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMorphology1, _lib._sel_new1); - return NSMorphology._(_ret, _lib, retain: false, release: true); + int get queuePriority { + return _objc_msgSend_450(this.pointer, _sel_queuePriority); } - static NSMorphology allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMorphology1, _lib._sel_allocWithZone_1, zone); - return NSMorphology._(_ret, _lib, retain: false, release: true); + set queuePriority(int value) { + return _objc_msgSend_451(this.pointer, _sel_setQueuePriority_, value); } - static NSMorphology alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMorphology1, _lib._sel_alloc1); - return NSMorphology._(_ret, _lib, retain: false, release: true); + ObjCBlock_ffiVoid? get completionBlock { + final _ret = _objc_msgSend_452(this.pointer, _sel_completionBlock); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSMorphology1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + set completionBlock(ObjCBlock_ffiVoid? value) { + return _objc_msgSend_453( + this.pointer, _sel_setCompletionBlock_, value?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSMorphology1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + void waitUntilFinished() { + _objc_msgSend_82(this.pointer, _sel_waitUntilFinished); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMorphology1, _lib._sel_accessInstanceVariablesDirectly1); + double get threadPriority { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_threadPriority) + : _objc_msgSend_115(this.pointer, _sel_threadPriority); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMorphology1, _lib._sel_useStoredAccessor1); + set threadPriority(double value) { + return _objc_msgSend_212(this.pointer, _sel_setThreadPriority_, value); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSMorphology1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + int get qualityOfService { + return _objc_msgSend_454(this.pointer, _sel_qualityOfService); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSMorphology1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + set qualityOfService(int value) { + return _objc_msgSend_455(this.pointer, _sel_setQualityOfService_, value); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSMorphology1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSString? get name { + final _ret = _objc_msgSend_13(this.pointer, _sel_name); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSMorphology1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + set name(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMorphology1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + @override + NSOperation init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSOperation.castFromPointer(_ret, retain: true, release: true); } -} -abstract class NSGrammaticalGender { - static const int NSGrammaticalGenderNotSet = 0; - static const int NSGrammaticalGenderFeminine = 1; - static const int NSGrammaticalGenderMasculine = 2; - static const int NSGrammaticalGenderNeuter = 3; -} + static NSOperation new1() { + final _ret = _objc_msgSend_40(_class_NSOperation, _sel_new); + return NSOperation.castFromPointer(_ret, retain: false, release: true); + } -abstract class NSGrammaticalPartOfSpeech { - static const int NSGrammaticalPartOfSpeechNotSet = 0; - static const int NSGrammaticalPartOfSpeechDeterminer = 1; - static const int NSGrammaticalPartOfSpeechPronoun = 2; - static const int NSGrammaticalPartOfSpeechLetter = 3; - static const int NSGrammaticalPartOfSpeechAdverb = 4; - static const int NSGrammaticalPartOfSpeechParticle = 5; - static const int NSGrammaticalPartOfSpeechAdjective = 6; - static const int NSGrammaticalPartOfSpeechAdposition = 7; - static const int NSGrammaticalPartOfSpeechVerb = 8; - static const int NSGrammaticalPartOfSpeechNoun = 9; - static const int NSGrammaticalPartOfSpeechConjunction = 10; - static const int NSGrammaticalPartOfSpeechNumeral = 11; - static const int NSGrammaticalPartOfSpeechInterjection = 12; - static const int NSGrammaticalPartOfSpeechPreposition = 13; - static const int NSGrammaticalPartOfSpeechAbbreviation = 14; -} + static NSOperation allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSOperation, _sel_allocWithZone_, zone); + return NSOperation.castFromPointer(_ret, retain: false, release: true); + } -abstract class NSGrammaticalNumber { - static const int NSGrammaticalNumberNotSet = 0; - static const int NSGrammaticalNumberSingular = 1; - static const int NSGrammaticalNumberZero = 2; - static const int NSGrammaticalNumberPlural = 3; - static const int NSGrammaticalNumberPluralTwo = 4; - static const int NSGrammaticalNumberPluralFew = 5; - static const int NSGrammaticalNumberPluralMany = 6; -} + static NSOperation alloc() { + final _ret = _objc_msgSend_40(_class_NSOperation, _sel_alloc); + return NSOperation.castFromPointer(_ret, retain: false, release: true); + } -abstract class NSGrammaticalCase { - static const int NSGrammaticalCaseNotSet = 0; - static const int NSGrammaticalCaseNominative = 1; - static const int NSGrammaticalCaseAccusative = 2; - static const int NSGrammaticalCaseDative = 3; - static const int NSGrammaticalCaseGenitive = 4; - static const int NSGrammaticalCasePrepositional = 5; - static const int NSGrammaticalCaseAblative = 6; - static const int NSGrammaticalCaseAdessive = 7; - static const int NSGrammaticalCaseAllative = 8; - static const int NSGrammaticalCaseElative = 9; - static const int NSGrammaticalCaseIllative = 10; - static const int NSGrammaticalCaseEssive = 11; - static const int NSGrammaticalCaseInessive = 12; - static const int NSGrammaticalCaseLocative = 13; - static const int NSGrammaticalCaseTranslative = 14; -} + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSOperation, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } -abstract class NSGrammaticalDetermination { - static const int NSGrammaticalDeterminationNotSet = 0; - static const int NSGrammaticalDeterminationIndependent = 1; - static const int NSGrammaticalDeterminationDependent = 2; -} + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSOperation, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } -abstract class NSGrammaticalPerson { - static const int NSGrammaticalPersonNotSet = 0; - static const int NSGrammaticalPersonFirst = 1; - static const int NSGrammaticalPersonSecond = 2; - static const int NSGrammaticalPersonThird = 3; -} + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSOperation, _sel_accessInstanceVariablesDirectly); + } -abstract class NSGrammaticalPronounType { - static const int NSGrammaticalPronounTypeNotSet = 0; - static const int NSGrammaticalPronounTypePersonal = 1; - static const int NSGrammaticalPronounTypeReflexive = 2; - static const int NSGrammaticalPronounTypePossessive = 3; -} + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSOperation, _sel_useStoredAccessor); + } -abstract class NSGrammaticalDefiniteness { - static const int NSGrammaticalDefinitenessNotSet = 0; - static const int NSGrammaticalDefinitenessIndefinite = 1; - static const int NSGrammaticalDefinitenessDefinite = 2; + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSOperation, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSOperation, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSOperation, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSOperation, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSOperation, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSOperation = objc.getClass("NSOperation"); +late final _sel_start = objc.registerName("start"); +late final _sel_main = objc.registerName("main"); +late final _sel_isCancelled = objc.registerName("isCancelled"); +late final _sel_isExecuting = objc.registerName("isExecuting"); +late final _sel_isFinished = objc.registerName("isFinished"); +late final _sel_isConcurrent = objc.registerName("isConcurrent"); +late final _sel_isAsynchronous = objc.registerName("isAsynchronous"); +late final _sel_isReady = objc.registerName("isReady"); +late final _sel_addDependency_ = objc.registerName("addDependency:"); +final _objc_msgSend_449 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_removeDependency_ = objc.registerName("removeDependency:"); +late final _sel_dependencies = objc.registerName("dependencies"); + +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 NSMorphologyCustomPronoun extends NSObject { - NSMorphologyCustomPronoun._(ffi.Pointer id, SwiftLibrary lib, +late final _sel_queuePriority = objc.registerName("queuePriority"); +final _objc_msgSend_450 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setQueuePriority_ = objc.registerName("setQueuePriority:"); +final _objc_msgSend_451 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_completionBlock = objc.registerName("completionBlock"); +final _objc_msgSend_452 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCompletionBlock_ = objc.registerName("setCompletionBlock:"); +final _objc_msgSend_453 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_waitUntilFinished = objc.registerName("waitUntilFinished"); +late final _sel_threadPriority = objc.registerName("threadPriority"); +late final _sel_setThreadPriority_ = objc.registerName("setThreadPriority:"); + +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; +} + +late final _sel_qualityOfService = objc.registerName("qualityOfService"); +final _objc_msgSend_454 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setQualityOfService_ = + objc.registerName("setQualityOfService:"); +final _objc_msgSend_455 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setName_ = objc.registerName("setName:"); +late final _sel_addOperation_ = objc.registerName("addOperation:"); +late final _sel_addOperations_waitUntilFinished_ = + objc.registerName("addOperations:waitUntilFinished:"); +final _objc_msgSend_456 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_addOperationWithBlock_ = + objc.registerName("addOperationWithBlock:"); +late final _sel_addBarrierBlock_ = objc.registerName("addBarrierBlock:"); +late final _sel_maxConcurrentOperationCount = + objc.registerName("maxConcurrentOperationCount"); +late final _sel_setMaxConcurrentOperationCount_ = + objc.registerName("setMaxConcurrentOperationCount:"); +late final _sel_isSuspended = objc.registerName("isSuspended"); +late final _sel_setSuspended_ = objc.registerName("setSuspended:"); +late final _sel_underlyingQueue = objc.registerName("underlyingQueue"); +final _objc_msgSend_457 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setUnderlyingQueue_ = objc.registerName("setUnderlyingQueue:"); +final _objc_msgSend_458 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_cancelAllOperations = objc.registerName("cancelAllOperations"); +late final _sel_waitUntilAllOperationsAreFinished = + objc.registerName("waitUntilAllOperationsAreFinished"); +late final _sel_currentQueue = objc.registerName("currentQueue"); +final _objc_msgSend_459 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_mainQueue = objc.registerName("mainQueue"); +final _objc_msgSend_460 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_operations = objc.registerName("operations"); +late final _sel_operationCount = objc.registerName("operationCount"); + +class NSOrthography extends objc.NSObject { + NSOrthography._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSMorphologyCustomPronoun] that points to the same underlying object as [other]. - static NSMorphologyCustomPronoun castFrom(T other) { - return NSMorphologyCustomPronoun._(other._id, other._lib, - retain: true, release: true); - } + /// Constructs a [NSOrthography] that points to the same underlying object as [other]. + NSOrthography.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSMorphologyCustomPronoun] that wraps the given raw object pointer. - static NSMorphologyCustomPronoun castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMorphologyCustomPronoun._(other, lib, - retain: retain, release: release); + /// Constructs a [NSOrthography] that wraps the given raw object pointer. + NSOrthography.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSOrthography]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSOrthography); } - /// Returns whether [obj] is an instance of [NSMorphologyCustomPronoun]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMorphologyCustomPronoun1); + objc.NSString get dominantScript { + final _ret = _objc_msgSend_12(this.pointer, _sel_dominantScript); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool isSupportedForLanguage_(SwiftLibrary _lib, NSString language) { - return _lib._objc_msgSend_64(_lib._class_NSMorphologyCustomPronoun1, - _lib._sel_isSupportedForLanguage_1, language._id); + objc.NSDictionary get languageMap { + final _ret = _objc_msgSend_112(this.pointer, _sel_languageMap); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSArray requiredKeysForLanguage_( - SwiftLibrary _lib, NSString language) { - final _ret = _lib._objc_msgSend_358(_lib._class_NSMorphologyCustomPronoun1, - _lib._sel_requiredKeysForLanguage_1, language._id); - return NSArray._(_ret, _lib, retain: true, release: true); + NSOrthography initWithDominantScript_languageMap_( + objc.NSString script, objc.NSDictionary map) { + final _ret = _objc_msgSend_461(this.pointer, + _sel_initWithDominantScript_languageMap_, script.pointer, map.pointer); + return NSOrthography.castFromPointer(_ret, retain: true, release: true); } - NSString? get subjectForm { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_subjectForm1); + NSOrthography? initWithCoder_(objc.NSCoder coder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, coder.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - set subjectForm(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setSubjectForm_1, value?._id ?? ffi.nullptr); + : NSOrthography.castFromPointer(_ret, retain: true, release: true); } - NSString? get objectForm { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_objectForm1); + objc.NSArray? languagesForScript_(objc.NSString script) { + final _ret = _objc_msgSend_290( + this.pointer, _sel_languagesForScript_, script.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - set objectForm(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setObjectForm_1, value?._id ?? ffi.nullptr); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString? get possessiveForm { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_possessiveForm1); + objc.NSString? dominantLanguageForScript_(objc.NSString script) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_dominantLanguageForScript_, script.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set possessiveForm(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setPossessiveForm_1, value?._id ?? ffi.nullptr); + objc.NSString get dominantLanguage { + final _ret = _objc_msgSend_12(this.pointer, _sel_dominantLanguage); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get possessiveAdjectiveForm { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_possessiveAdjectiveForm1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + objc.NSArray get allScripts { + final _ret = _objc_msgSend_6(this.pointer, _sel_allScripts); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set possessiveAdjectiveForm(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setPossessiveAdjectiveForm_1, value?._id ?? ffi.nullptr); + objc.NSArray get allLanguages { + final _ret = _objc_msgSend_6(this.pointer, _sel_allLanguages); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString? get reflexiveForm { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_reflexiveForm1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static NSOrthography defaultOrthographyForLanguage_(objc.NSString language) { + final _ret = _objc_msgSend_35(_class_NSOrthography, + _sel_defaultOrthographyForLanguage_, language.pointer); + return NSOrthography.castFromPointer(_ret, retain: true, release: true); } - set reflexiveForm(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setReflexiveForm_1, value?._id ?? ffi.nullptr); + static NSOrthography orthographyWithDominantScript_languageMap_( + objc.NSString script, objc.NSDictionary map) { + final _ret = _objc_msgSend_461( + _class_NSOrthography, + _sel_orthographyWithDominantScript_languageMap_, + script.pointer, + map.pointer); + return NSOrthography.castFromPointer(_ret, retain: true, release: true); } @override - NSMorphologyCustomPronoun init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMorphologyCustomPronoun._(_ret, _lib, retain: true, release: true); + NSOrthography init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSOrthography.castFromPointer(_ret, retain: true, release: true); } - static NSMorphologyCustomPronoun new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMorphologyCustomPronoun1, _lib._sel_new1); - return NSMorphologyCustomPronoun._(_ret, _lib, - retain: false, release: true); + static NSOrthography new1() { + final _ret = _objc_msgSend_40(_class_NSOrthography, _sel_new); + return NSOrthography.castFromPointer(_ret, retain: false, release: true); } - static NSMorphologyCustomPronoun allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3(_lib._class_NSMorphologyCustomPronoun1, - _lib._sel_allocWithZone_1, zone); - return NSMorphologyCustomPronoun._(_ret, _lib, - retain: false, release: true); + static NSOrthography allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSOrthography, _sel_allocWithZone_, zone); + return NSOrthography.castFromPointer(_ret, retain: false, release: true); } - static NSMorphologyCustomPronoun alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMorphologyCustomPronoun1, _lib._sel_alloc1); - return NSMorphologyCustomPronoun._(_ret, _lib, - retain: false, release: true); + static NSOrthography alloc() { + final _ret = _objc_msgSend_40(_class_NSOrthography, _sel_alloc); + return NSOrthography.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSMorphologyCustomPronoun1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSOrthography, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSMorphologyCustomPronoun1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSOrthography, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSMorphologyCustomPronoun1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSOrthography, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMorphologyCustomPronoun1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSOrthography, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSMorphologyCustomPronoun1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSOrthography, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSMorphologyCustomPronoun1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSOrthography, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSMorphologyCustomPronoun1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSMorphologyCustomPronoun1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSOrthography, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSOrthography, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSOrthography, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSOrthography = objc.getClass("NSOrthography"); +late final _sel_dominantScript = objc.registerName("dominantScript"); +late final _sel_languageMap = objc.registerName("languageMap"); +late final _sel_initWithDominantScript_languageMap_ = + objc.registerName("initWithDominantScript:languageMap:"); +final _objc_msgSend_461 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_languagesForScript_ = objc.registerName("languagesForScript:"); +late final _sel_dominantLanguageForScript_ = + objc.registerName("dominantLanguageForScript:"); +late final _sel_dominantLanguage = objc.registerName("dominantLanguage"); +late final _sel_allScripts = objc.registerName("allScripts"); +late final _sel_allLanguages = objc.registerName("allLanguages"); +late final _sel_defaultOrthographyForLanguage_ = + objc.registerName("defaultOrthographyForLanguage:"); +late final _sel_orthographyWithDominantScript_languageMap_ = + objc.registerName("orthographyWithDominantScript:languageMap:"); + +class NSPointerArray extends objc.NSObject { + NSPointerArray._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSMorphologyCustomPronoun1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} + /// Constructs a [NSPointerArray] that points to the same underlying object as [other]. + NSPointerArray.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); -class NSOperationQueue extends NSObject { - NSOperationQueue._(ffi.Pointer id, SwiftLibrary lib, + /// Constructs a [NSPointerArray] that wraps the given raw object pointer. + NSPointerArray.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : this._(other, retain: retain, release: release); - /// Returns a [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 [obj] is an instance of [NSPointerArray]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSPointerArray); } - /// Returns a [NSOperationQueue] that wraps the given raw object pointer. - static NSOperationQueue castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOperationQueue._(other, lib, retain: retain, release: release); + NSPointerArray initWithOptions_(int options) { + final _ret = + _objc_msgSend_462(this.pointer, _sel_initWithOptions_, options); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSOperationQueue]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSOperationQueue1); + NSPointerArray initWithPointerFunctions_(NSPointerFunctions functions) { + final _ret = _objc_msgSend_476( + this.pointer, _sel_initWithPointerFunctions_, functions.pointer); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - NSProgress get progress { - final _ret = _lib._objc_msgSend_879(_id, _lib._sel_progress1); - return NSProgress._(_ret, _lib, retain: true, release: true); + static NSPointerArray pointerArrayWithOptions_(int options) { + final _ret = _objc_msgSend_477( + _class_NSPointerArray, _sel_pointerArrayWithOptions_, options); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - void addOperation_(NSOperation op) { - _lib._objc_msgSend_910(_id, _lib._sel_addOperation_1, op._id); + static NSPointerArray pointerArrayWithPointerFunctions_( + NSPointerFunctions functions) { + final _ret = _objc_msgSend_478(_class_NSPointerArray, + _sel_pointerArrayWithPointerFunctions_, functions.pointer); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - void addOperations_waitUntilFinished_(NSArray ops, bool wait) { - _lib._objc_msgSend_913( - _id, _lib._sel_addOperations_waitUntilFinished_1, ops._id, wait); + NSPointerFunctions get pointerFunctions { + final _ret = _objc_msgSend_479(this.pointer, _sel_pointerFunctions); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); } - void addOperationWithBlock_(ObjCBlock_ffiVoid block) { - _lib._objc_msgSend_532(_id, _lib._sel_addOperationWithBlock_1, block._id); + ffi.Pointer pointerAtIndex_(int index) { + return _objc_msgSend_480(this.pointer, _sel_pointerAtIndex_, index); } - void addBarrierBlock_(ObjCBlock_ffiVoid barrier) { - _lib._objc_msgSend_532(_id, _lib._sel_addBarrierBlock_1, barrier._id); + void addPointer_(ffi.Pointer pointer) { + _objc_msgSend_481(this.pointer, _sel_addPointer_, pointer); } - int get maxConcurrentOperationCount { - return _lib._objc_msgSend_83(_id, _lib._sel_maxConcurrentOperationCount1); + void removePointerAtIndex_(int index) { + _objc_msgSend_414(this.pointer, _sel_removePointerAtIndex_, index); } - set maxConcurrentOperationCount(int value) { - return _lib._objc_msgSend_635( - _id, _lib._sel_setMaxConcurrentOperationCount_1, value); + void insertPointer_atIndex_(ffi.Pointer item, int index) { + _objc_msgSend_482(this.pointer, _sel_insertPointer_atIndex_, item, index); } - bool get suspended { - return _lib._objc_msgSend_12(_id, _lib._sel_isSuspended1); + void replacePointerAtIndex_withPointer_( + int index, ffi.Pointer item) { + _objc_msgSend_483( + this.pointer, _sel_replacePointerAtIndex_withPointer_, index, item); } - set suspended(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setSuspended_1, value); + void compact() { + _objc_msgSend_82(this.pointer, _sel_compact); } - NSString? get name { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_name1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + int get count { + return _objc_msgSend_29(this.pointer, _sel_count); } - set name(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + set count(int value) { + return _objc_msgSend_125(this.pointer, _sel_setCount_, value); } - int get qualityOfService { - return _lib._objc_msgSend_543(_id, _lib._sel_qualityOfService1); + static objc.NSObject pointerArrayWithStrongObjects() { + final _ret = _objc_msgSend_40( + _class_NSPointerArray, _sel_pointerArrayWithStrongObjects); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set qualityOfService(int value) { - return _lib._objc_msgSend_544(_id, _lib._sel_setQualityOfService_1, value); + static objc.NSObject pointerArrayWithWeakObjects() { + final _ret = _objc_msgSend_40( + _class_NSPointerArray, _sel_pointerArrayWithWeakObjects); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - ffi.Pointer get underlyingQueue { - return _lib._objc_msgSend_914(_id, _lib._sel_underlyingQueue1); + static NSPointerArray strongObjectsPointerArray() { + final _ret = _objc_msgSend_484( + _class_NSPointerArray, _sel_strongObjectsPointerArray); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - set underlyingQueue(ffi.Pointer value) { - return _lib._objc_msgSend_915(_id, _lib._sel_setUnderlyingQueue_1, value); + static NSPointerArray weakObjectsPointerArray() { + final _ret = + _objc_msgSend_484(_class_NSPointerArray, _sel_weakObjectsPointerArray); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - void cancelAllOperations() { - _lib._objc_msgSend_1(_id, _lib._sel_cancelAllOperations1); + objc.NSArray get allObjects { + final _ret = _objc_msgSend_6(this.pointer, _sel_allObjects); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void waitUntilAllOperationsAreFinished() { - _lib._objc_msgSend_1(_id, _lib._sel_waitUntilAllOperationsAreFinished1); + @override + NSPointerArray init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - static NSOperationQueue? getCurrentQueue(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_916( - _lib._class_NSOperationQueue1, _lib._sel_currentQueue1); - return _ret.address == 0 - ? null - : NSOperationQueue._(_ret, _lib, retain: true, release: true); + static NSPointerArray new1() { + final _ret = _objc_msgSend_40(_class_NSPointerArray, _sel_new); + return NSPointerArray.castFromPointer(_ret, retain: false, release: true); } - static NSOperationQueue getMainQueue(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_917( - _lib._class_NSOperationQueue1, _lib._sel_mainQueue1); - return NSOperationQueue._(_ret, _lib, retain: true, release: true); + static NSPointerArray allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSPointerArray, _sel_allocWithZone_, zone); + return NSPointerArray.castFromPointer(_ret, retain: false, release: true); } - NSArray get operations { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_operations1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSPointerArray alloc() { + final _ret = _objc_msgSend_40(_class_NSPointerArray, _sel_alloc); + return NSPointerArray.castFromPointer(_ret, retain: false, release: true); } - int get operationCount { - return _lib._objc_msgSend_10(_id, _lib._sel_operationCount1); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSPointerArray, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - @override - NSOperationQueue init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSOperationQueue._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSPointerArray, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static NSOperationQueue new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_new1); - return NSOperationQueue._(_ret, _lib, retain: false, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSPointerArray, _sel_accessInstanceVariablesDirectly); } - static NSOperationQueue allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSOperationQueue1, _lib._sel_allocWithZone_1, zone); - return NSOperationQueue._(_ret, _lib, retain: false, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSPointerArray, _sel_useStoredAccessor); } - static NSOperationQueue alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_alloc1); - return NSOperationQueue._(_ret, _lib, retain: false, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSPointerArray, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSOperationQueue1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSPointerArray, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSOperationQueue1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSPointerArray, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSOperationQueue1, - _lib._sel_accessInstanceVariablesDirectly1); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSPointerArray, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSOperationQueue1, _lib._sel_useStoredAccessor1); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSPointerArray, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSOperationQueue1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } +late final _class_NSPointerArray = objc.getClass("NSPointerArray"); + +abstract class NSPointerFunctionsOptions { + static const int NSPointerFunctionsStrongMemory = 0; + static const int NSPointerFunctionsZeroingWeakMemory = 1; + static const int NSPointerFunctionsOpaqueMemory = 2; + static const int NSPointerFunctionsMallocMemory = 3; + static const int NSPointerFunctionsMachVirtualMemory = 4; + static const int NSPointerFunctionsWeakMemory = 5; + static const int NSPointerFunctionsObjectPersonality = 0; + static const int NSPointerFunctionsOpaquePersonality = 256; + static const int NSPointerFunctionsObjectPointerPersonality = 512; + static const int NSPointerFunctionsCStringPersonality = 768; + static const int NSPointerFunctionsStructPersonality = 1024; + static const int NSPointerFunctionsIntegerPersonality = 1280; + static const int NSPointerFunctionsCopyIn = 65536; +} + +late final _sel_initWithOptions_ = objc.registerName("initWithOptions:"); +final _objc_msgSend_462 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); + +class NSPointerFunctions extends objc.NSObject { + NSPointerFunctions._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSPointerFunctions] that points to the same underlying object as [other]. + NSPointerFunctions.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSPointerFunctions] that wraps the given raw object pointer. + NSPointerFunctions.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSOperationQueue1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + /// Returns whether [obj] is an instance of [NSPointerFunctions]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSPointerFunctions); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSOperationQueue1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + NSPointerFunctions initWithOptions_(int options) { + final _ret = + _objc_msgSend_462(this.pointer, _sel_initWithOptions_, options); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSOperationQueue1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSPointerFunctions pointerFunctionsWithOptions_(int options) { + final _ret = _objc_msgSend_463( + _class_NSPointerFunctions, _sel_pointerFunctionsWithOptions_, options); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOperationQueue1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>> + get hashFunction { + return _objc_msgSend_464(this.pointer, _sel_hashFunction); } -} -class NSOperation extends NSObject { - NSOperation._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + set hashFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + value) { + return _objc_msgSend_465(this.pointer, _sel_setHashFunction_, value); + } - /// Returns a [NSOperation] that points to the same underlying object as [other]. - static NSOperation castFrom(T other) { - return NSOperation._(other._id, other._lib, retain: true, release: true); + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>> + get isEqualFunction { + return _objc_msgSend_466(this.pointer, _sel_isEqualFunction); } - /// Returns a [NSOperation] that wraps the given raw object pointer. - static NSOperation castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOperation._(other, lib, retain: retain, release: release); + set isEqualFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + value) { + return _objc_msgSend_467(this.pointer, _sel_setIsEqualFunction_, value); } - /// Returns whether [obj] is an instance of [NSOperation]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSOperation1); + ffi.Pointer< + ffi.NativeFunction)>> + get sizeFunction { + return _objc_msgSend_468(this.pointer, _sel_sizeFunction); } - void start() { - _lib._objc_msgSend_1(_id, _lib._sel_start1); + set sizeFunction( + ffi.Pointer< + ffi + .NativeFunction)>> + value) { + return _objc_msgSend_469(this.pointer, _sel_setSizeFunction_, value); } - void main() { - _lib._objc_msgSend_1(_id, _lib._sel_main1); + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> + get descriptionFunction { + return _objc_msgSend_470(this.pointer, _sel_descriptionFunction); } - bool get cancelled { - return _lib._objc_msgSend_12(_id, _lib._sel_isCancelled1); + set descriptionFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> + value) { + return _objc_msgSend_471(this.pointer, _sel_setDescriptionFunction_, value); } - void cancel() { - _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>> + get relinquishFunction { + return _objc_msgSend_472(this.pointer, _sel_relinquishFunction); } - bool get executing { - return _lib._objc_msgSend_12(_id, _lib._sel_isExecuting1); + set relinquishFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + value) { + return _objc_msgSend_473(this.pointer, _sel_setRelinquishFunction_, value); } - bool get finished { - return _lib._objc_msgSend_12(_id, _lib._sel_isFinished1); + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>, + ffi.Bool)>> get acquireFunction { + return _objc_msgSend_474(this.pointer, _sel_acquireFunction); } - bool get concurrent { - return _lib._objc_msgSend_12(_id, _lib._sel_isConcurrent1); + set acquireFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>, + ffi.Bool)>> + value) { + return _objc_msgSend_475(this.pointer, _sel_setAcquireFunction_, value); } - bool get asynchronous { - return _lib._objc_msgSend_12(_id, _lib._sel_isAsynchronous1); + bool get usesStrongWriteBarrier { + return _objc_msgSend_7(this.pointer, _sel_usesStrongWriteBarrier); } - bool get ready { - return _lib._objc_msgSend_12(_id, _lib._sel_isReady1); + set usesStrongWriteBarrier(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setUsesStrongWriteBarrier_, value); } - void addDependency_(NSOperation op) { - _lib._objc_msgSend_910(_id, _lib._sel_addDependency_1, op._id); + bool get usesWeakReadAndWriteBarriers { + return _objc_msgSend_7(this.pointer, _sel_usesWeakReadAndWriteBarriers); } - void removeDependency_(NSOperation op) { - _lib._objc_msgSend_910(_id, _lib._sel_removeDependency_1, op._id); + set usesWeakReadAndWriteBarriers(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setUsesWeakReadAndWriteBarriers_, value); } - NSArray get dependencies { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_dependencies1); - return NSArray._(_ret, _lib, retain: true, release: true); + @override + NSPointerFunctions init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); } - int get queuePriority { - return _lib._objc_msgSend_911(_id, _lib._sel_queuePriority1); + static NSPointerFunctions new1() { + final _ret = _objc_msgSend_40(_class_NSPointerFunctions, _sel_new); + return NSPointerFunctions.castFromPointer(_ret, + retain: false, release: true); } - set queuePriority(int value) { - return _lib._objc_msgSend_912(_id, _lib._sel_setQueuePriority_1, value); + static NSPointerFunctions allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSPointerFunctions, _sel_allocWithZone_, zone); + return NSPointerFunctions.castFromPointer(_ret, + retain: false, release: true); } - ObjCBlock_ffiVoid? get completionBlock { - final _ret = _lib._objc_msgSend_668(_id, _lib._sel_completionBlock1); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid._(_ret, _lib, retain: true, release: true); + static NSPointerFunctions alloc() { + final _ret = _objc_msgSend_40(_class_NSPointerFunctions, _sel_alloc); + return NSPointerFunctions.castFromPointer(_ret, + retain: false, release: true); } - set completionBlock(ObjCBlock_ffiVoid? value) { - return _lib._objc_msgSend_669( - _id, _lib._sel_setCompletionBlock_1, value?._id ?? ffi.nullptr); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSPointerFunctions, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - void waitUntilFinished() { - _lib._objc_msgSend_1(_id, _lib._sel_waitUntilFinished1); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSPointerFunctions, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - double get threadPriority { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_threadPriority1) - : _lib._objc_msgSend_165(_id, _lib._sel_threadPriority1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSPointerFunctions, _sel_accessInstanceVariablesDirectly); } - set threadPriority(double value) { - return _lib._objc_msgSend_542(_id, _lib._sel_setThreadPriority_1, value); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSPointerFunctions, _sel_useStoredAccessor); } - int get qualityOfService { - return _lib._objc_msgSend_543(_id, _lib._sel_qualityOfService1); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSPointerFunctions, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - set qualityOfService(int value) { - return _lib._objc_msgSend_544(_id, _lib._sel_setQualityOfService_1, value); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSPointerFunctions, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSString? get name { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_name1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSPointerFunctions, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSPointerFunctions, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSPointerFunctions, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSPointerFunctions = objc.getClass("NSPointerFunctions"); +late final _sel_pointerFunctionsWithOptions_ = + objc.registerName("pointerFunctionsWithOptions:"); +final _objc_msgSend_463 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_hashFunction = objc.registerName("hashFunction"); +final _objc_msgSend_464 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer, ffi.Pointer)>>)>> Function( + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + Function(ffi.Pointer, ffi.Pointer)>(); +late final _sel_setHashFunction_ = objc.registerName("setHashFunction:"); +final _objc_msgSend_465 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>>)>(); +late final _sel_isEqualFunction = objc.registerName("isEqualFunction"); +final _objc_msgSend_466 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer, ffi.Pointer, ffi.Pointer)>>)>> Function( + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + Function(ffi.Pointer, ffi.Pointer)>(); +late final _sel_setIsEqualFunction_ = objc.registerName("setIsEqualFunction:"); +final _objc_msgSend_467 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>>)>(); +late final _sel_sizeFunction = objc.registerName("sizeFunction"); +final _objc_msgSend_468 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer)>> Function( + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>> + Function(ffi.Pointer, ffi.Pointer)>(); +late final _sel_setSizeFunction_ = objc.registerName("setSizeFunction:"); +final _objc_msgSend_469 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>(); +late final _sel_descriptionFunction = objc.registerName("descriptionFunction"); +final _objc_msgSend_470 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> Function( + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>> + Function(ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDescriptionFunction_ = + objc.registerName("setDescriptionFunction:"); +final _objc_msgSend_471 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>)>(); +late final _sel_relinquishFunction = objc.registerName("relinquishFunction"); +final _objc_msgSend_472 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer, ffi.Pointer)>>)>> Function( + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + Function(ffi.Pointer, ffi.Pointer)>(); +late final _sel_setRelinquishFunction_ = + objc.registerName("setRelinquishFunction:"); +final _objc_msgSend_473 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>>)>(); +late final _sel_acquireFunction = objc.registerName("acquireFunction"); +final _objc_msgSend_474 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>, ffi.Bool)>> Function( + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>, + ffi.Bool)>> + Function(ffi.Pointer, ffi.Pointer)>(); +late final _sel_setAcquireFunction_ = objc.registerName("setAcquireFunction:"); +final _objc_msgSend_475 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>, + ffi.Bool)>>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi + .NativeFunction)>>, + ffi.Bool)>>)>(); +late final _sel_usesStrongWriteBarrier = + objc.registerName("usesStrongWriteBarrier"); +late final _sel_setUsesStrongWriteBarrier_ = + objc.registerName("setUsesStrongWriteBarrier:"); +late final _sel_usesWeakReadAndWriteBarriers = + objc.registerName("usesWeakReadAndWriteBarriers"); +late final _sel_setUsesWeakReadAndWriteBarriers_ = + objc.registerName("setUsesWeakReadAndWriteBarriers:"); +late final _sel_initWithPointerFunctions_ = + objc.registerName("initWithPointerFunctions:"); +final _objc_msgSend_476 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_pointerArrayWithOptions_ = + objc.registerName("pointerArrayWithOptions:"); +final _objc_msgSend_477 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_pointerArrayWithPointerFunctions_ = + objc.registerName("pointerArrayWithPointerFunctions:"); +final _objc_msgSend_478 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_pointerFunctions = objc.registerName("pointerFunctions"); +final _objc_msgSend_479 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_pointerAtIndex_ = objc.registerName("pointerAtIndex:"); +final _objc_msgSend_480 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_addPointer_ = objc.registerName("addPointer:"); +final _objc_msgSend_481 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_removePointerAtIndex_ = + objc.registerName("removePointerAtIndex:"); +late final _sel_insertPointer_atIndex_ = + objc.registerName("insertPointer:atIndex:"); +final _objc_msgSend_482 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); +late final _sel_replacePointerAtIndex_withPointer_ = + objc.registerName("replacePointerAtIndex:withPointer:"); +final _objc_msgSend_483 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer)>(); +late final _sel_compact = objc.registerName("compact"); +late final _sel_setCount_ = objc.registerName("setCount:"); +late final _sel_pointerArrayWithStrongObjects = + objc.registerName("pointerArrayWithStrongObjects"); +late final _sel_pointerArrayWithWeakObjects = + objc.registerName("pointerArrayWithWeakObjects"); +late final _sel_strongObjectsPointerArray = + objc.registerName("strongObjectsPointerArray"); +final _objc_msgSend_484 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_weakObjectsPointerArray = + objc.registerName("weakObjectsPointerArray"); +late final _sel_allObjects = objc.registerName("allObjects"); + +class NSProcessInfo extends objc.NSObject { + NSProcessInfo._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSProcessInfo] that points to the same underlying object as [other]. + NSProcessInfo.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - set name(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); - } + /// Constructs a [NSProcessInfo] that wraps the given raw object pointer. + NSProcessInfo.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - @override - NSOperation init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSOperation._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSProcessInfo]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSProcessInfo); } - static NSOperation new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_new1); - return NSOperation._(_ret, _lib, retain: false, release: true); + static NSProcessInfo getProcessInfo() { + final _ret = _objc_msgSend_485(_class_NSProcessInfo, _sel_processInfo); + return NSProcessInfo.castFromPointer(_ret, retain: true, release: true); } - static NSOperation allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSOperation1, _lib._sel_allocWithZone_1, zone); - return NSOperation._(_ret, _lib, retain: false, release: true); + objc.NSDictionary get environment { + final _ret = _objc_msgSend_112(this.pointer, _sel_environment); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSOperation alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_alloc1); - return NSOperation._(_ret, _lib, retain: false, release: true); + objc.NSArray get arguments { + final _ret = _objc_msgSend_6(this.pointer, _sel_arguments); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSOperation1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + objc.NSString get hostName { + final _ret = _objc_msgSend_12(this.pointer, _sel_hostName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSOperation1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + objc.NSString get processName { + final _ret = _objc_msgSend_12(this.pointer, _sel_processName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSOperation1, _lib._sel_accessInstanceVariablesDirectly1); + set processName(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setProcessName_, value.pointer); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSOperation1, _lib._sel_useStoredAccessor1); + int get processIdentifier { + return _objc_msgSend_264(this.pointer, _sel_processIdentifier); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSOperation1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + objc.NSString get globallyUniqueString { + final _ret = _objc_msgSend_12(this.pointer, _sel_globallyUniqueString); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSOperation1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + int operatingSystem() { + return _objc_msgSend_29(this.pointer, _sel_operatingSystem); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSOperation1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSString operatingSystemName() { + final _ret = _objc_msgSend_12(this.pointer, _sel_operatingSystemName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSOperation1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSString get operatingSystemVersionString { + final _ret = + _objc_msgSend_12(this.pointer, _sel_operatingSystemVersionString); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOperation1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + void getOperatingSystemVersion(ffi.Pointer stret) { + objc.useMsgSendVariants + ? _objc_msgSend_486Stret( + stret, this.pointer, _sel_operatingSystemVersion) + : stret.ref = + _objc_msgSend_486(this.pointer, _sel_operatingSystemVersion); } -} - -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; -} -final class dispatch_queue_s extends ffi.Opaque {} - -class NSPointerArray extends NSObject { - NSPointerArray._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSPointerArray] that points to the same underlying object as [other]. - static NSPointerArray castFrom(T other) { - return NSPointerArray._(other._id, other._lib, retain: true, release: true); + int get processorCount { + return _objc_msgSend_29(this.pointer, _sel_processorCount); } - /// Returns a [NSPointerArray] that wraps the given raw object pointer. - static NSPointerArray castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPointerArray._(other, lib, retain: retain, release: release); + int get activeProcessorCount { + return _objc_msgSend_29(this.pointer, _sel_activeProcessorCount); } - /// Returns whether [obj] is an instance of [NSPointerArray]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSPointerArray1); + int get physicalMemory { + return _objc_msgSend_267(this.pointer, _sel_physicalMemory); } - NSPointerArray initWithOptions_(int options) { - final _ret = - _lib._objc_msgSend_918(_id, _lib._sel_initWithOptions_1, options); - return NSPointerArray._(_ret, _lib, retain: true, release: true); + bool isOperatingSystemAtLeastVersion_(NSOperatingSystemVersion version) { + return _objc_msgSend_487( + this.pointer, _sel_isOperatingSystemAtLeastVersion_, version); } - NSPointerArray initWithPointerFunctions_(NSPointerFunctions functions) { - final _ret = _lib._objc_msgSend_932( - _id, _lib._sel_initWithPointerFunctions_1, functions._id); - return NSPointerArray._(_ret, _lib, retain: true, release: true); + double get systemUptime { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_systemUptime) + : _objc_msgSend_115(this.pointer, _sel_systemUptime); } - static NSPointerArray pointerArrayWithOptions_( - SwiftLibrary _lib, int options) { - final _ret = _lib._objc_msgSend_933(_lib._class_NSPointerArray1, - _lib._sel_pointerArrayWithOptions_1, options); - return NSPointerArray._(_ret, _lib, retain: true, release: true); + void disableSuddenTermination() { + _objc_msgSend_82(this.pointer, _sel_disableSuddenTermination); } - static NSPointerArray pointerArrayWithPointerFunctions_( - SwiftLibrary _lib, NSPointerFunctions functions) { - final _ret = _lib._objc_msgSend_934(_lib._class_NSPointerArray1, - _lib._sel_pointerArrayWithPointerFunctions_1, functions._id); - return NSPointerArray._(_ret, _lib, retain: true, release: true); + void enableSuddenTermination() { + _objc_msgSend_82(this.pointer, _sel_enableSuddenTermination); } - NSPointerFunctions get pointerFunctions { - final _ret = _lib._objc_msgSend_935(_id, _lib._sel_pointerFunctions1); - return NSPointerFunctions._(_ret, _lib, retain: true, release: true); + void disableAutomaticTermination_(objc.NSString reason) { + _objc_msgSend_98( + this.pointer, _sel_disableAutomaticTermination_, reason.pointer); } - ffi.Pointer pointerAtIndex_(int index) { - return _lib._objc_msgSend_936(_id, _lib._sel_pointerAtIndex_1, index); + void enableAutomaticTermination_(objc.NSString reason) { + _objc_msgSend_98( + this.pointer, _sel_enableAutomaticTermination_, reason.pointer); } - void addPointer_(ffi.Pointer pointer) { - _lib._objc_msgSend_52(_id, _lib._sel_addPointer_1, pointer); + bool get automaticTerminationSupportEnabled { + return _objc_msgSend_7( + this.pointer, _sel_automaticTerminationSupportEnabled); } - void removePointerAtIndex_(int index) { - _lib._objc_msgSend_470(_id, _lib._sel_removePointerAtIndex_1, index); + set automaticTerminationSupportEnabled(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAutomaticTerminationSupportEnabled_, value); } - void insertPointer_atIndex_(ffi.Pointer item, int index) { - _lib._objc_msgSend_22(_id, _lib._sel_insertPointer_atIndex_1, item, index); + objc.NSObject beginActivityWithOptions_reason_( + int options, objc.NSString reason) { + final _ret = _objc_msgSend_488(this.pointer, + _sel_beginActivityWithOptions_reason_, options, reason.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void replacePointerAtIndex_withPointer_( - int index, ffi.Pointer item) { - _lib._objc_msgSend_937( - _id, _lib._sel_replacePointerAtIndex_withPointer_1, index, item); + void endActivity_(objc.NSObject activity) { + _objc_msgSend_49(this.pointer, _sel_endActivity_, activity.pointer); } - void compact() { - _lib._objc_msgSend_1(_id, _lib._sel_compact1); + void performActivityWithOptions_reason_usingBlock_( + int options, objc.NSString reason, ObjCBlock_ffiVoid block) { + _objc_msgSend_489( + this.pointer, + _sel_performActivityWithOptions_reason_usingBlock_, + options, + reason.pointer, + block.pointer); } - int get count { - return _lib._objc_msgSend_10(_id, _lib._sel_count1); + void performExpiringActivityWithReason_usingBlock_( + objc.NSString reason, ObjCBlock_ffiVoid_bool block) { + _objc_msgSend_490( + this.pointer, + _sel_performExpiringActivityWithReason_usingBlock_, + reason.pointer, + block.pointer); } - set count(int value) { - return _lib._objc_msgSend_516(_id, _lib._sel_setCount_1, value); + objc.NSString get userName { + final _ret = _objc_msgSend_12(this.pointer, _sel_userName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject pointerArrayWithStrongObjects(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSPointerArray1, _lib._sel_pointerArrayWithStrongObjects1); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSString get fullUserName { + final _ret = _objc_msgSend_12(this.pointer, _sel_fullUserName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject pointerArrayWithWeakObjects(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSPointerArray1, _lib._sel_pointerArrayWithWeakObjects1); - return NSObject._(_ret, _lib, retain: true, release: true); + int get thermalState { + return _objc_msgSend_491(this.pointer, _sel_thermalState); } - static NSPointerArray strongObjectsPointerArray(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_938( - _lib._class_NSPointerArray1, _lib._sel_strongObjectsPointerArray1); - return NSPointerArray._(_ret, _lib, retain: true, release: true); + bool get lowPowerModeEnabled { + return _objc_msgSend_7(this.pointer, _sel_isLowPowerModeEnabled); } - static NSPointerArray weakObjectsPointerArray(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_938( - _lib._class_NSPointerArray1, _lib._sel_weakObjectsPointerArray1); - return NSPointerArray._(_ret, _lib, retain: true, release: true); + bool get macCatalystApp { + return _objc_msgSend_7(this.pointer, _sel_isMacCatalystApp); } - NSArray get allObjects { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_allObjects1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool get iOSAppOnMac { + return _objc_msgSend_7(this.pointer, _sel_isiOSAppOnMac); } @override - NSPointerArray init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSPointerArray._(_ret, _lib, retain: true, release: true); + NSProcessInfo init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSProcessInfo.castFromPointer(_ret, retain: true, release: true); } - static NSPointerArray new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPointerArray1, _lib._sel_new1); - return NSPointerArray._(_ret, _lib, retain: false, release: true); + static NSProcessInfo new1() { + final _ret = _objc_msgSend_40(_class_NSProcessInfo, _sel_new); + return NSProcessInfo.castFromPointer(_ret, retain: false, release: true); } - static NSPointerArray allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSPointerArray1, _lib._sel_allocWithZone_1, zone); - return NSPointerArray._(_ret, _lib, retain: false, release: true); + static NSProcessInfo allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSProcessInfo, _sel_allocWithZone_, zone); + return NSProcessInfo.castFromPointer(_ret, retain: false, release: true); } - static NSPointerArray alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPointerArray1, _lib._sel_alloc1); - return NSPointerArray._(_ret, _lib, retain: false, release: true); + static NSProcessInfo alloc() { + final _ret = _objc_msgSend_40(_class_NSProcessInfo, _sel_alloc); + return NSProcessInfo.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSPointerArray1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSProcessInfo, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSPointerArray1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSProcessInfo, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSPointerArray1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSProcessInfo, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSPointerArray1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSProcessInfo, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSPointerArray1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSProcessInfo, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSPointerArray1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSProcessInfo, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSPointerArray1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSProcessInfo, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSProcessInfo, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSProcessInfo, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSProcessInfo = objc.getClass("NSProcessInfo"); +late final _sel_processInfo = objc.registerName("processInfo"); +final _objc_msgSend_485 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_environment = objc.registerName("environment"); +late final _sel_arguments = objc.registerName("arguments"); +late final _sel_hostName = objc.registerName("hostName"); +late final _sel_processName = objc.registerName("processName"); +late final _sel_setProcessName_ = objc.registerName("setProcessName:"); +late final _sel_processIdentifier = objc.registerName("processIdentifier"); +late final _sel_globallyUniqueString = + objc.registerName("globallyUniqueString"); +late final _sel_operatingSystem = objc.registerName("operatingSystem"); +late final _sel_operatingSystemName = objc.registerName("operatingSystemName"); +late final _sel_operatingSystemVersionString = + objc.registerName("operatingSystemVersionString"); - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSPointerArray1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } +final class NSOperatingSystemVersion extends ffi.Struct { + @ffi.Long() + external int majorVersion; - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSPointerArray1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Long() + external int minorVersion; + + @ffi.Long() + external int patchVersion; } -abstract class NSPointerFunctionsOptions { - static const int NSPointerFunctionsStrongMemory = 0; - static const int NSPointerFunctionsZeroingWeakMemory = 1; - static const int NSPointerFunctionsOpaqueMemory = 2; - static const int NSPointerFunctionsMallocMemory = 3; - static const int NSPointerFunctionsMachVirtualMemory = 4; - static const int NSPointerFunctionsWeakMemory = 5; - static const int NSPointerFunctionsObjectPersonality = 0; - static const int NSPointerFunctionsOpaquePersonality = 256; - static const int NSPointerFunctionsObjectPointerPersonality = 512; - static const int NSPointerFunctionsCStringPersonality = 768; - static const int NSPointerFunctionsStructPersonality = 1024; - static const int NSPointerFunctionsIntegerPersonality = 1280; - static const int NSPointerFunctionsCopyIn = 65536; +late final _sel_operatingSystemVersion = + objc.registerName("operatingSystemVersion"); +final _objc_msgSend_486 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSOperatingSystemVersion Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + NSOperatingSystemVersion Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_486Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_processorCount = objc.registerName("processorCount"); +late final _sel_activeProcessorCount = + objc.registerName("activeProcessorCount"); +late final _sel_physicalMemory = objc.registerName("physicalMemory"); +late final _sel_isOperatingSystemAtLeastVersion_ = + objc.registerName("isOperatingSystemAtLeastVersion:"); +final _objc_msgSend_487 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, NSOperatingSystemVersion)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, NSOperatingSystemVersion)>(); +late final _sel_systemUptime = objc.registerName("systemUptime"); +late final _sel_disableSuddenTermination = + objc.registerName("disableSuddenTermination"); +late final _sel_enableSuddenTermination = + objc.registerName("enableSuddenTermination"); +late final _sel_disableAutomaticTermination_ = + objc.registerName("disableAutomaticTermination:"); +late final _sel_enableAutomaticTermination_ = + objc.registerName("enableAutomaticTermination:"); +late final _sel_automaticTerminationSupportEnabled = + objc.registerName("automaticTerminationSupportEnabled"); +late final _sel_setAutomaticTerminationSupportEnabled_ = + objc.registerName("setAutomaticTerminationSupportEnabled:"); + +abstract class NSActivityOptions { + static const int NSActivityIdleDisplaySleepDisabled = 1099511627776; + static const int NSActivityIdleSystemSleepDisabled = 1048576; + static const int NSActivitySuddenTerminationDisabled = 16384; + static const int NSActivityAutomaticTerminationDisabled = 32768; + static const int NSActivityAnimationTrackingEnabled = 35184372088832; + static const int NSActivityTrackingEnabled = 70368744177664; + static const int NSActivityUserInitiated = 16777215; + static const int NSActivityUserInitiatedAllowingIdleSystemSleep = 15728639; + static const int NSActivityBackground = 255; + static const int NSActivityLatencyCritical = 1095216660480; + static const int NSActivityUserInteractive = 1095233437695; } -class NSPointerFunctions extends NSObject { - NSPointerFunctions._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +late final _sel_beginActivityWithOptions_reason_ = + objc.registerName("beginActivityWithOptions:reason:"); +final _objc_msgSend_488 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_endActivity_ = objc.registerName("endActivity:"); +late final _sel_performActivityWithOptions_reason_usingBlock_ = + objc.registerName("performActivityWithOptions:reason:usingBlock:"); +final _objc_msgSend_489 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_bool_fnPtrTrampoline( + ffi.Pointer block, bool arg0) => + block.ref.target + .cast>() + .asFunction()(arg0); +final _ObjCBlock_ffiVoid_bool_closureRegistry = {}; +int _ObjCBlock_ffiVoid_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_bool_registerClosure( + void Function(bool) fn) { + final id = ++_ObjCBlock_ffiVoid_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - /// Returns a [NSPointerFunctions] that points to the same underlying object as [other]. - static NSPointerFunctions castFrom(T other) { - return NSPointerFunctions._(other._id, other._lib, - retain: true, release: true); - } +void _ObjCBlock_ffiVoid_bool_closureTrampoline( + ffi.Pointer block, bool arg0) => + _ObjCBlock_ffiVoid_bool_closureRegistry[block.ref.target.address]!(arg0); - /// Returns a [NSPointerFunctions] that wraps the given raw object pointer. - static NSPointerFunctions castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPointerFunctions._(other, lib, retain: retain, release: release); - } +class ObjCBlock_ffiVoid_bool extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_bool._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSPointerFunctions]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSPointerFunctions1); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_bool._(pointer, retain: retain, release: release); } - NSPointerFunctions initWithOptions_(int options) { - final _ret = - _lib._objc_msgSend_918(_id, _lib._sel_initWithOptions_1, options); - return NSPointerFunctions._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_bool.fromFunctionPointer( + ffi.Pointer> ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Bool)>(_ObjCBlock_ffiVoid_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - static NSPointerFunctions pointerFunctionsWithOptions_( - SwiftLibrary _lib, int options) { - final _ret = _lib._objc_msgSend_919(_lib._class_NSPointerFunctions1, - _lib._sel_pointerFunctionsWithOptions_1, options); - return NSPointerFunctions._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_bool.fromFunction(void Function(bool) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Bool)>(_ObjCBlock_ffiVoid_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_bool_registerClosure((bool arg0) => fn(arg0)))); + static ffi.Pointer? _dartFuncTrampoline; - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>)>> - get hashFunction { - return _lib._objc_msgSend_920(_id, _lib._sel_hashFunction1); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_bool.listener(void Function(bool) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Bool)>.listener( + _ObjCBlock_ffiVoid_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_bool_registerClosure((bool arg0) => fn(arg0)))); + static ffi + .NativeCallable, ffi.Bool)>? + _dartFuncListenerTrampoline; - set hashFunction( - ffi.Pointer< + void call(bool arg0) => pointer.ref.invoke + .cast< ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - value) { - return _lib._objc_msgSend_921(_id, _lib._sel_setHashFunction_1, value); - } + ffi.Void Function( + ffi.Pointer block, ffi.Bool arg0)>>() + .asFunction, bool)>()( + pointer, arg0); +} + +late final _sel_performExpiringActivityWithReason_usingBlock_ = + objc.registerName("performExpiringActivityWithReason:usingBlock:"); +final _objc_msgSend_490 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_userName = objc.registerName("userName"); +late final _sel_fullUserName = objc.registerName("fullUserName"); - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>)>> - get isEqualFunction { - return _lib._objc_msgSend_922(_id, _lib._sel_isEqualFunction1); - } +abstract class NSProcessInfoThermalState { + static const int NSProcessInfoThermalStateNominal = 0; + static const int NSProcessInfoThermalStateFair = 1; + static const int NSProcessInfoThermalStateSerious = 2; + static const int NSProcessInfoThermalStateCritical = 3; +} - set isEqualFunction( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - value) { - return _lib._objc_msgSend_923(_id, _lib._sel_setIsEqualFunction_1, value); - } +late final _sel_thermalState = objc.registerName("thermalState"); +final _objc_msgSend_491 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isLowPowerModeEnabled = + objc.registerName("isLowPowerModeEnabled"); +late final _sel_isMacCatalystApp = objc.registerName("isMacCatalystApp"); +late final _sel_isiOSAppOnMac = objc.registerName("isiOSAppOnMac"); + +class NSTextCheckingResult extends objc.NSObject { + NSTextCheckingResult._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - ffi.Pointer< - ffi.NativeFunction)>> - get sizeFunction { - return _lib._objc_msgSend_924(_id, _lib._sel_sizeFunction1); - } + /// Constructs a [NSTextCheckingResult] that points to the same underlying object as [other]. + NSTextCheckingResult.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - set sizeFunction( - ffi.Pointer< - ffi - .NativeFunction)>> - value) { - return _lib._objc_msgSend_925(_id, _lib._sel_setSizeFunction_1, value); - } + /// Constructs a [NSTextCheckingResult] that wraps the given raw object pointer. + NSTextCheckingResult.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> - get descriptionFunction { - return _lib._objc_msgSend_926(_id, _lib._sel_descriptionFunction1); + /// Returns whether [obj] is an instance of [NSTextCheckingResult]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSTextCheckingResult); } - set descriptionFunction( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> - value) { - return _lib._objc_msgSend_927( - _id, _lib._sel_setDescriptionFunction_1, value); + int get resultType { + return _objc_msgSend_492(this.pointer, _sel_resultType); } - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>)>> - get relinquishFunction { - return _lib._objc_msgSend_928(_id, _lib._sel_relinquishFunction1); + void getRange(ffi.Pointer<_NSRange> stret) { + objc.useMsgSendVariants + ? _objc_msgSend_493Stret(stret, this.pointer, _sel_range) + : stret.ref = _objc_msgSend_493(this.pointer, _sel_range); } - set relinquishFunction( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - value) { - return _lib._objc_msgSend_929( - _id, _lib._sel_setRelinquishFunction_1, value); + NSOrthography? get orthography { + final _ret = _objc_msgSend_494(this.pointer, _sel_orthography); + return _ret.address == 0 + ? null + : NSOrthography.castFromPointer(_ret, retain: true, release: true); } - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>, - ffi.Bool)>> get acquireFunction { - return _lib._objc_msgSend_930(_id, _lib._sel_acquireFunction1); + objc.NSArray? get grammarDetails { + final _ret = _objc_msgSend_69(this.pointer, _sel_grammarDetails); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set acquireFunction( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>, - ffi.Bool)>> - value) { - return _lib._objc_msgSend_931(_id, _lib._sel_setAcquireFunction_1, value); + objc.NSDate? get date { + final _ret = _objc_msgSend_116(this.pointer, _sel_date); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - bool get usesStrongWriteBarrier { - return _lib._objc_msgSend_12(_id, _lib._sel_usesStrongWriteBarrier1); + NSTimeZone? get timeZone { + final _ret = _objc_msgSend_132(this.pointer, _sel_timeZone); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - set usesStrongWriteBarrier(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setUsesStrongWriteBarrier_1, value); + double get duration { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_duration) + : _objc_msgSend_115(this.pointer, _sel_duration); } - bool get usesWeakReadAndWriteBarriers { - return _lib._objc_msgSend_12(_id, _lib._sel_usesWeakReadAndWriteBarriers1); + objc.NSDictionary? get components { + final _ret = _objc_msgSend_65(this.pointer, _sel_components); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - set usesWeakReadAndWriteBarriers(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setUsesWeakReadAndWriteBarriers_1, value); + objc.NSURL? get URL { + final _ret = _objc_msgSend_10(this.pointer, _sel_URL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - @override - NSPointerFunctions init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSPointerFunctions._(_ret, _lib, retain: true, release: true); + objc.NSString? get replacementString { + final _ret = _objc_msgSend_13(this.pointer, _sel_replacementString); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSPointerFunctions new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPointerFunctions1, _lib._sel_new1); - return NSPointerFunctions._(_ret, _lib, retain: false, release: true); + objc.NSArray? get alternativeStrings { + final _ret = _objc_msgSend_69(this.pointer, _sel_alternativeStrings); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSPointerFunctions allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSPointerFunctions1, _lib._sel_allocWithZone_1, zone); - return NSPointerFunctions._(_ret, _lib, retain: false, release: true); + NSRegularExpression? get regularExpression { + final _ret = _objc_msgSend_506(this.pointer, _sel_regularExpression); + return _ret.address == 0 + ? null + : NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); } - static NSPointerFunctions alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPointerFunctions1, _lib._sel_alloc1); - return NSPointerFunctions._(_ret, _lib, retain: false, release: true); + objc.NSString? get phoneNumber { + final _ret = _objc_msgSend_13(this.pointer, _sel_phoneNumber); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSPointerFunctions1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + int get numberOfRanges { + return _objc_msgSend_29(this.pointer, _sel_numberOfRanges); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSPointerFunctions1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + void rangeAtIndex_(ffi.Pointer<_NSRange> stret, int idx) { + objc.useMsgSendVariants + ? _objc_msgSend_507Stret(stret, this.pointer, _sel_rangeAtIndex_, idx) + : stret.ref = _objc_msgSend_507(this.pointer, _sel_rangeAtIndex_, idx); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSPointerFunctions1, - _lib._sel_accessInstanceVariablesDirectly1); + void rangeWithName_(ffi.Pointer<_NSRange> stret, objc.NSString name) { + objc.useMsgSendVariants + ? _objc_msgSend_508Stret( + stret, this.pointer, _sel_rangeWithName_, name.pointer) + : stret.ref = + _objc_msgSend_508(this.pointer, _sel_rangeWithName_, name.pointer); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSPointerFunctions1, _lib._sel_useStoredAccessor1); + NSTextCheckingResult resultByAdjustingRangesWithOffset_(int offset) { + final _ret = _objc_msgSend_509( + this.pointer, _sel_resultByAdjustingRangesWithOffset_, offset); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSPointerFunctions1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + objc.NSDictionary? get addressComponents { + final _ret = _objc_msgSend_65(this.pointer, _sel_addressComponents); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSPointerFunctions1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static NSTextCheckingResult orthographyCheckingResultWithRange_orthography_( + _NSRange range, NSOrthography orthography) { + final _ret = _objc_msgSend_510( + _class_NSTextCheckingResult, + _sel_orthographyCheckingResultWithRange_orthography_, + range, + orthography.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSPointerFunctions1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static NSTextCheckingResult spellCheckingResultWithRange_(_NSRange range) { + final _ret = _objc_msgSend_511( + _class_NSTextCheckingResult, _sel_spellCheckingResultWithRange_, range); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSPointerFunctions1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSTextCheckingResult grammarCheckingResultWithRange_details_( + _NSRange range, objc.NSArray details) { + final _ret = _objc_msgSend_512(_class_NSTextCheckingResult, + _sel_grammarCheckingResultWithRange_details_, range, details.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSPointerFunctions1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSTextCheckingResult dateCheckingResultWithRange_date_( + _NSRange range, objc.NSDate date) { + final _ret = _objc_msgSend_513(_class_NSTextCheckingResult, + _sel_dateCheckingResultWithRange_date_, range, date.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } -} -class NSProcessInfo extends NSObject { - NSProcessInfo._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + static NSTextCheckingResult + dateCheckingResultWithRange_date_timeZone_duration_(_NSRange range, + objc.NSDate date, NSTimeZone timeZone, double duration) { + final _ret = _objc_msgSend_514( + _class_NSTextCheckingResult, + _sel_dateCheckingResultWithRange_date_timeZone_duration_, + range, + date.pointer, + timeZone.pointer, + duration); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } - /// Returns a [NSProcessInfo] that points to the same underlying object as [other]. - static NSProcessInfo castFrom(T other) { - return NSProcessInfo._(other._id, other._lib, retain: true, release: true); + static NSTextCheckingResult addressCheckingResultWithRange_components_( + _NSRange range, objc.NSDictionary components) { + final _ret = _objc_msgSend_515( + _class_NSTextCheckingResult, + _sel_addressCheckingResultWithRange_components_, + range, + components.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - /// Returns a [NSProcessInfo] that wraps the given raw object pointer. - static NSProcessInfo castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSProcessInfo._(other, lib, retain: retain, release: release); + static NSTextCheckingResult linkCheckingResultWithRange_URL_( + _NSRange range, objc.NSURL url) { + final _ret = _objc_msgSend_516(_class_NSTextCheckingResult, + _sel_linkCheckingResultWithRange_URL_, range, url.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSProcessInfo]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSProcessInfo1); + static NSTextCheckingResult quoteCheckingResultWithRange_replacementString_( + _NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_517( + _class_NSTextCheckingResult, + _sel_quoteCheckingResultWithRange_replacementString_, + range, + replacementString.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - static NSProcessInfo getProcessInfo(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_939( - _lib._class_NSProcessInfo1, _lib._sel_processInfo1); - return NSProcessInfo._(_ret, _lib, retain: true, release: true); + static NSTextCheckingResult dashCheckingResultWithRange_replacementString_( + _NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_517( + _class_NSTextCheckingResult, + _sel_dashCheckingResultWithRange_replacementString_, + range, + replacementString.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - NSDictionary get environment { - final _ret = _lib._objc_msgSend_181(_id, _lib._sel_environment1); - return NSDictionary._(_ret, _lib, retain: true, release: true); + static NSTextCheckingResult + replacementCheckingResultWithRange_replacementString_( + _NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_517( + _class_NSTextCheckingResult, + _sel_replacementCheckingResultWithRange_replacementString_, + range, + replacementString.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - NSArray get arguments { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_arguments1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSTextCheckingResult + correctionCheckingResultWithRange_replacementString_( + _NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_517( + _class_NSTextCheckingResult, + _sel_correctionCheckingResultWithRange_replacementString_, + range, + replacementString.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - NSString get hostName { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_hostName1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSTextCheckingResult + correctionCheckingResultWithRange_replacementString_alternativeStrings_( + _NSRange range, + objc.NSString replacementString, + objc.NSArray alternativeStrings) { + final _ret = _objc_msgSend_518( + _class_NSTextCheckingResult, + _sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_, + range, + replacementString.pointer, + alternativeStrings.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - NSString get processName { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_processName1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSTextCheckingResult + regularExpressionCheckingResultWithRanges_count_regularExpression_( + ffi.Pointer<_NSRange> ranges, + int count, + NSRegularExpression regularExpression) { + final _ret = _objc_msgSend_519( + _class_NSTextCheckingResult, + _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_, + ranges, + count, + regularExpression.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - set processName(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setProcessName_1, value._id); + static NSTextCheckingResult phoneNumberCheckingResultWithRange_phoneNumber_( + _NSRange range, objc.NSString phoneNumber) { + final _ret = _objc_msgSend_517( + _class_NSTextCheckingResult, + _sel_phoneNumberCheckingResultWithRange_phoneNumber_, + range, + phoneNumber.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - int get processIdentifier { - return _lib._objc_msgSend_237(_id, _lib._sel_processIdentifier1); + static NSTextCheckingResult + transitInformationCheckingResultWithRange_components_( + _NSRange range, objc.NSDictionary components) { + final _ret = _objc_msgSend_515( + _class_NSTextCheckingResult, + _sel_transitInformationCheckingResultWithRange_components_, + range, + components.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - NSString get globallyUniqueString { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_globallyUniqueString1); - return NSString._(_ret, _lib, retain: true, release: true); + @override + NSTextCheckingResult init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - int operatingSystem() { - return _lib._objc_msgSend_10(_id, _lib._sel_operatingSystem1); + static NSTextCheckingResult new1() { + final _ret = _objc_msgSend_40(_class_NSTextCheckingResult, _sel_new); + return NSTextCheckingResult.castFromPointer(_ret, + retain: false, release: true); } - NSString operatingSystemName() { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_operatingSystemName1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSTextCheckingResult allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSTextCheckingResult, _sel_allocWithZone_, zone); + return NSTextCheckingResult.castFromPointer(_ret, + retain: false, release: true); } - NSString get operatingSystemVersionString { - final _ret = - _lib._objc_msgSend_21(_id, _lib._sel_operatingSystemVersionString1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSTextCheckingResult alloc() { + final _ret = _objc_msgSend_40(_class_NSTextCheckingResult, _sel_alloc); + return NSTextCheckingResult.castFromPointer(_ret, + retain: false, release: true); } - void getOperatingSystemVersion(ffi.Pointer stret) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_940_stret( - stret, _id, _lib._sel_operatingSystemVersion1) - : stret.ref = - _lib._objc_msgSend_940(_id, _lib._sel_operatingSystemVersion1); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSTextCheckingResult, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - int get processorCount { - return _lib._objc_msgSend_10(_id, _lib._sel_processorCount1); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSTextCheckingResult, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - int get activeProcessorCount { - return _lib._objc_msgSend_10(_id, _lib._sel_activeProcessorCount1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSTextCheckingResult, _sel_accessInstanceVariablesDirectly); } - int get physicalMemory { - return _lib._objc_msgSend_164(_id, _lib._sel_physicalMemory1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSTextCheckingResult, _sel_useStoredAccessor); } - bool isOperatingSystemAtLeastVersion_(NSOperatingSystemVersion version) { - return _lib._objc_msgSend_941( - _id, _lib._sel_isOperatingSystemAtLeastVersion_1, version); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSTextCheckingResult, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - double get systemUptime { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_systemUptime1) - : _lib._objc_msgSend_165(_id, _lib._sel_systemUptime1); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSTextCheckingResult, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - void disableSuddenTermination() { - _lib._objc_msgSend_1(_id, _lib._sel_disableSuddenTermination1); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSTextCheckingResult, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - void enableSuddenTermination() { - _lib._objc_msgSend_1(_id, _lib._sel_enableSuddenTermination1); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSTextCheckingResult, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSTextCheckingResult, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSTextCheckingResult = objc.getClass("NSTextCheckingResult"); + +abstract class NSTextCheckingType { + static const int NSTextCheckingTypeOrthography = 1; + static const int NSTextCheckingTypeSpelling = 2; + static const int NSTextCheckingTypeGrammar = 4; + static const int NSTextCheckingTypeDate = 8; + static const int NSTextCheckingTypeAddress = 16; + static const int NSTextCheckingTypeLink = 32; + static const int NSTextCheckingTypeQuote = 64; + static const int NSTextCheckingTypeDash = 128; + static const int NSTextCheckingTypeReplacement = 256; + static const int NSTextCheckingTypeCorrection = 512; + static const int NSTextCheckingTypeRegularExpression = 1024; + static const int NSTextCheckingTypePhoneNumber = 2048; + static const int NSTextCheckingTypeTransitInformation = 4096; +} + +late final _sel_resultType = objc.registerName("resultType"); +final _objc_msgSend_492 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_range = objc.registerName("range"); +final _objc_msgSend_493 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_493Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer)>(); +late final _sel_orthography = objc.registerName("orthography"); +final _objc_msgSend_494 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_grammarDetails = objc.registerName("grammarDetails"); +late final _sel_duration = objc.registerName("duration"); +late final _sel_components = objc.registerName("components"); +late final _sel_replacementString = objc.registerName("replacementString"); +late final _sel_alternativeStrings = objc.registerName("alternativeStrings"); + +class NSRegularExpression extends objc.NSObject { + NSRegularExpression._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSRegularExpression] that points to the same underlying object as [other]. + NSRegularExpression.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSRegularExpression] that wraps the given raw object pointer. + NSRegularExpression.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSRegularExpression]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSRegularExpression); } - void disableAutomaticTermination_(NSString reason) { - _lib._objc_msgSend_247( - _id, _lib._sel_disableAutomaticTermination_1, reason._id); + static NSRegularExpression? regularExpressionWithPattern_options_error_( + objc.NSString pattern, + int options, + ffi.Pointer> error) { + final _ret = _objc_msgSend_495( + _class_NSRegularExpression, + _sel_regularExpressionWithPattern_options_error_, + pattern.pointer, + options, + error); + return _ret.address == 0 + ? null + : NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); } - void enableAutomaticTermination_(NSString reason) { - _lib._objc_msgSend_247( - _id, _lib._sel_enableAutomaticTermination_1, reason._id); + NSRegularExpression? initWithPattern_options_error_(objc.NSString pattern, + int options, ffi.Pointer> error) { + final _ret = _objc_msgSend_496(this.pointer, + _sel_initWithPattern_options_error_, pattern.pointer, options, error); + return _ret.address == 0 + ? null + : NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); } - bool get automaticTerminationSupportEnabled { - return _lib._objc_msgSend_12( - _id, _lib._sel_automaticTerminationSupportEnabled1); + objc.NSString get pattern { + final _ret = _objc_msgSend_12(this.pointer, _sel_pattern); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set automaticTerminationSupportEnabled(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setAutomaticTerminationSupportEnabled_1, value); + int get options { + return _objc_msgSend_497(this.pointer, _sel_options); } - NSObject beginActivityWithOptions_reason_(int options, NSString reason) { - final _ret = _lib._objc_msgSend_942( - _id, _lib._sel_beginActivityWithOptions_reason_1, options, reason._id); - return NSObject._(_ret, _lib, retain: true, release: true); + int get numberOfCaptureGroups { + return _objc_msgSend_29(this.pointer, _sel_numberOfCaptureGroups); } - void endActivity_(NSObject activity) { - _lib._objc_msgSend_15(_id, _lib._sel_endActivity_1, activity._id); + static objc.NSString escapedPatternForString_(objc.NSString string) { + final _ret = _objc_msgSend_297(_class_NSRegularExpression, + _sel_escapedPatternForString_, string.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void performActivityWithOptions_reason_usingBlock_( - int options, NSString reason, ObjCBlock_ffiVoid block) { - _lib._objc_msgSend_943( - _id, - _lib._sel_performActivityWithOptions_reason_usingBlock_1, + void enumerateMatchesInString_options_range_usingBlock_( + objc.NSString string, + int options, + _NSRange range, + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool block) { + _objc_msgSend_498( + this.pointer, + _sel_enumerateMatchesInString_options_range_usingBlock_, + string.pointer, options, - reason._id, - block._id); + range, + block.pointer); } - void performExpiringActivityWithReason_usingBlock_( - NSString reason, ObjCBlock_ffiVoid_bool block) { - _lib._objc_msgSend_944( - _id, - _lib._sel_performExpiringActivityWithReason_usingBlock_1, - reason._id, - block._id); + objc.NSArray matchesInString_options_range_( + objc.NSString string, int options, _NSRange range) { + final _ret = _objc_msgSend_499(this.pointer, + _sel_matchesInString_options_range_, string.pointer, options, range); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + int numberOfMatchesInString_options_range_( + objc.NSString string, int options, _NSRange range) { + return _objc_msgSend_500( + this.pointer, + _sel_numberOfMatchesInString_options_range_, + string.pointer, + options, + range); } - NSString get userName { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_userName1); - return NSString._(_ret, _lib, retain: true, release: true); + NSTextCheckingResult? firstMatchInString_options_range_( + objc.NSString string, int options, _NSRange range) { + final _ret = _objc_msgSend_501(this.pointer, + _sel_firstMatchInString_options_range_, string.pointer, options, range); + return _ret.address == 0 + ? null + : NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - NSString get fullUserName { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_fullUserName1); - return NSString._(_ret, _lib, retain: true, release: true); + void rangeOfFirstMatchInString_options_range_(ffi.Pointer<_NSRange> stret, + objc.NSString string, int options, _NSRange range) { + objc.useMsgSendVariants + ? _objc_msgSend_502Stret( + stret, + this.pointer, + _sel_rangeOfFirstMatchInString_options_range_, + string.pointer, + options, + range) + : stret.ref = _objc_msgSend_502( + this.pointer, + _sel_rangeOfFirstMatchInString_options_range_, + string.pointer, + options, + range); } - int get thermalState { - return _lib._objc_msgSend_945(_id, _lib._sel_thermalState1); + objc.NSString stringByReplacingMatchesInString_options_range_withTemplate_( + objc.NSString string, int options, _NSRange range, objc.NSString templ) { + final _ret = _objc_msgSend_503( + this.pointer, + _sel_stringByReplacingMatchesInString_options_range_withTemplate_, + string.pointer, + options, + range, + templ.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool get lowPowerModeEnabled { - return _lib._objc_msgSend_12(_id, _lib._sel_isLowPowerModeEnabled1); + int replaceMatchesInString_options_range_withTemplate_( + objc.NSMutableString string, + int options, + _NSRange range, + objc.NSString templ) { + return _objc_msgSend_504( + this.pointer, + _sel_replaceMatchesInString_options_range_withTemplate_, + string.pointer, + options, + range, + templ.pointer); } - bool get macCatalystApp { - return _lib._objc_msgSend_12(_id, _lib._sel_isMacCatalystApp1); + objc.NSString replacementStringForResult_inString_offset_template_( + NSTextCheckingResult result, + objc.NSString string, + int offset, + objc.NSString templ) { + final _ret = _objc_msgSend_505( + this.pointer, + _sel_replacementStringForResult_inString_offset_template_, + result.pointer, + string.pointer, + offset, + templ.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool get iOSAppOnMac { - return _lib._objc_msgSend_12(_id, _lib._sel_isiOSAppOnMac1); + static objc.NSString escapedTemplateForString_(objc.NSString string) { + final _ret = _objc_msgSend_297(_class_NSRegularExpression, + _sel_escapedTemplateForString_, string.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } @override - NSProcessInfo init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSProcessInfo._(_ret, _lib, retain: true, release: true); + NSRegularExpression init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); } - static NSProcessInfo new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSProcessInfo1, _lib._sel_new1); - return NSProcessInfo._(_ret, _lib, retain: false, release: true); + static NSRegularExpression new1() { + final _ret = _objc_msgSend_40(_class_NSRegularExpression, _sel_new); + return NSRegularExpression.castFromPointer(_ret, + retain: false, release: true); } - static NSProcessInfo allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSProcessInfo1, _lib._sel_allocWithZone_1, zone); - return NSProcessInfo._(_ret, _lib, retain: false, release: true); + static NSRegularExpression allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSRegularExpression, _sel_allocWithZone_, zone); + return NSRegularExpression.castFromPointer(_ret, + retain: false, release: true); } - static NSProcessInfo alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSProcessInfo1, _lib._sel_alloc1); - return NSProcessInfo._(_ret, _lib, retain: false, release: true); + static NSRegularExpression alloc() { + final _ret = _objc_msgSend_40(_class_NSRegularExpression, _sel_alloc); + return NSRegularExpression.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSProcessInfo1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSRegularExpression, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSProcessInfo1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSRegularExpression, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSProcessInfo1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSRegularExpression, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSProcessInfo1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSRegularExpression, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSProcessInfo1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSRegularExpression, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSProcessInfo1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSRegularExpression, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSProcessInfo1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSRegularExpression, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSProcessInfo1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSRegularExpression, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSProcessInfo1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSRegularExpression, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -final class NSOperatingSystemVersion extends ffi.Struct { - @ffi.Long() - external int majorVersion; - - @ffi.Long() - external int minorVersion; +late final _class_NSRegularExpression = objc.getClass("NSRegularExpression"); - @ffi.Long() - external int patchVersion; +abstract class NSRegularExpressionOptions { + static const int NSRegularExpressionCaseInsensitive = 1; + static const int NSRegularExpressionAllowCommentsAndWhitespace = 2; + static const int NSRegularExpressionIgnoreMetacharacters = 4; + static const int NSRegularExpressionDotMatchesLineSeparators = 8; + static const int NSRegularExpressionAnchorsMatchLines = 16; + static const int NSRegularExpressionUseUnixLineSeparators = 32; + static const int NSRegularExpressionUseUnicodeWordBoundaries = 64; } -abstract class NSActivityOptions { - static const int NSActivityIdleDisplaySleepDisabled = 1099511627776; - static const int NSActivityIdleSystemSleepDisabled = 1048576; - static const int NSActivitySuddenTerminationDisabled = 16384; - static const int NSActivityAutomaticTerminationDisabled = 32768; - static const int NSActivityAnimationTrackingEnabled = 35184372088832; - static const int NSActivityTrackingEnabled = 70368744177664; - static const int NSActivityUserInitiated = 16777215; - static const int NSActivityUserInitiatedAllowingIdleSystemSleep = 15728639; - static const int NSActivityBackground = 255; - static const int NSActivityLatencyCritical = 1095216660480; - static const int NSActivityUserInteractive = 1095233437695; +late final _sel_regularExpressionWithPattern_options_error_ = + objc.registerName("regularExpressionWithPattern:options:error:"); +final _objc_msgSend_495 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_initWithPattern_options_error_ = + objc.registerName("initWithPattern:options:error:"); +final _objc_msgSend_496 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_pattern = objc.registerName("pattern"); +late final _sel_options = objc.registerName("options"); +final _objc_msgSend_497 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_numberOfCaptureGroups = + objc.registerName("numberOfCaptureGroups"); +late final _sel_escapedPatternForString_ = + objc.registerName("escapedPatternForString:"); + +abstract class NSMatchingOptions { + static const int NSMatchingReportProgress = 1; + static const int NSMatchingReportCompletion = 2; + static const int NSMatchingAnchored = 4; + static const int NSMatchingWithTransparentBounds = 8; + static const int NSMatchingWithoutAnchoringBounds = 16; } -void _ObjCBlock_ffiVoid_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, bool arg0) => - block.ref.target - .cast>() - .asFunction()(arg0); -final _ObjCBlock_ffiVoid_bool_closureRegistry = {}; -int _ObjCBlock_ffiVoid_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_bool_registerClosure( - void Function(bool) fn) { - final id = ++_ObjCBlock_ffiVoid_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_bool_closureRegistry[id] = fn; +void + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Int32 arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, int, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry = + , int, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( + void Function(ffi.Pointer, int, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry[ + id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, bool arg0) => - _ObjCBlock_ffiVoid_bool_closureRegistry[block.ref.target.address]!(arg0); +void _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock_ffiVoid_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_bool._(ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); +class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_bool castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_bool._(pointer, lib, - retain: retain, release: release); + static ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) { + return ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool._( + pointer, + retain: retain, + release: release); } /// Creates a block from a C function pointer. @@ -65132,16 +22990,22 @@ class ObjCBlock_ffiVoid_bool extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_bool.fromFunctionPointer(SwiftLibrary lib, - ffi.Pointer> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Bool)>(_ObjCBlock_ffiVoid_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Int32 arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. @@ -65149,17 +23013,21 @@ class ObjCBlock_ffiVoid_bool extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_bool.fromFunction(SwiftLibrary lib, void Function(bool) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Bool)>( - _ObjCBlock_ffiVoid_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_bool_registerClosure( - (bool arg0) => fn(arg0))), - lib); + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool.fromFunction( + void Function(NSTextCheckingResult?, int, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : NSTextCheckingResult.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -65171,771 +23039,1610 @@ class ObjCBlock_ffiVoid_bool extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_bool.listener(SwiftLibrary lib, void Function(bool) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Bool)>.listener( - _ObjCBlock_ffiVoid_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_bool_registerClosure( - (bool arg0) => fn(arg0))), - lib); - static ffi - .NativeCallable, ffi.Bool)>? - _dartFuncListenerTrampoline; + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool.listener( + void Function(NSTextCheckingResult?, int, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( + (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : NSTextCheckingResult.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>? _dartFuncListenerTrampoline; - void call(bool arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, ffi.Bool arg0)>>() - .asFunction, bool)>()(_id, arg0); + void call(NSTextCheckingResult? arg0, int arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Int32 arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr, arg1, arg2); } -abstract class NSProcessInfoThermalState { - static const int NSProcessInfoThermalStateNominal = 0; - static const int NSProcessInfoThermalStateFair = 1; - static const int NSProcessInfoThermalStateSerious = 2; - static const int NSProcessInfoThermalStateCritical = 3; +abstract class NSMatchingFlags { + static const int NSMatchingProgress = 1; + static const int NSMatchingCompleted = 2; + static const int NSMatchingHitEnd = 4; + static const int NSMatchingRequiredEnd = 8; + static const int NSMatchingInternalError = 16; } -class NSTextCheckingResult extends NSObject { - NSTextCheckingResult._(ffi.Pointer id, SwiftLibrary lib, +late final _sel_enumerateMatchesInString_options_range_usingBlock_ = + objc.registerName("enumerateMatchesInString:options:range:usingBlock:"); +final _objc_msgSend_498 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange, + ffi.Pointer)>(); +late final _sel_matchesInString_options_range_ = + objc.registerName("matchesInString:options:range:"); +final _objc_msgSend_499 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +late final _sel_numberOfMatchesInString_options_range_ = + objc.registerName("numberOfMatchesInString:options:range:"); +final _objc_msgSend_500 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +late final _sel_firstMatchInString_options_range_ = + objc.registerName("firstMatchInString:options:range:"); +final _objc_msgSend_501 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +late final _sel_rangeOfFirstMatchInString_options_range_ = + objc.registerName("rangeOfFirstMatchInString:options:range:"); +final _objc_msgSend_502 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +final _objc_msgSend_502Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +late final _sel_stringByReplacingMatchesInString_options_range_withTemplate_ = + objc.registerName( + "stringByReplacingMatchesInString:options:range:withTemplate:"); +final _objc_msgSend_503 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange, + ffi.Pointer)>(); +late final _sel_replaceMatchesInString_options_range_withTemplate_ = + objc.registerName("replaceMatchesInString:options:range:withTemplate:"); +final _objc_msgSend_504 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange, + ffi.Pointer)>(); +late final _sel_replacementStringForResult_inString_offset_template_ = + objc.registerName("replacementStringForResult:inString:offset:template:"); +final _objc_msgSend_505 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_escapedTemplateForString_ = + objc.registerName("escapedTemplateForString:"); +late final _sel_regularExpression = objc.registerName("regularExpression"); +final _objc_msgSend_506 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_phoneNumber = objc.registerName("phoneNumber"); +late final _sel_numberOfRanges = objc.registerName("numberOfRanges"); +late final _sel_rangeAtIndex_ = objc.registerName("rangeAtIndex:"); +final _objc_msgSend_507 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_507Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_rangeWithName_ = objc.registerName("rangeWithName:"); +final _objc_msgSend_508 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_508Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_resultByAdjustingRangesWithOffset_ = + objc.registerName("resultByAdjustingRangesWithOffset:"); +final _objc_msgSend_509 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_addressComponents = objc.registerName("addressComponents"); +late final _sel_orthographyCheckingResultWithRange_orthography_ = + objc.registerName("orthographyCheckingResultWithRange:orthography:"); +final _objc_msgSend_510 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_spellCheckingResultWithRange_ = + objc.registerName("spellCheckingResultWithRange:"); +final _objc_msgSend_511 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_grammarCheckingResultWithRange_details_ = + objc.registerName("grammarCheckingResultWithRange:details:"); +final _objc_msgSend_512 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_dateCheckingResultWithRange_date_ = + objc.registerName("dateCheckingResultWithRange:date:"); +final _objc_msgSend_513 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_dateCheckingResultWithRange_date_timeZone_duration_ = + objc.registerName("dateCheckingResultWithRange:date:timeZone:duration:"); +final _objc_msgSend_514 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.Pointer, + ffi.Double)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.Pointer, + double)>(); +late final _sel_addressCheckingResultWithRange_components_ = + objc.registerName("addressCheckingResultWithRange:components:"); +final _objc_msgSend_515 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_linkCheckingResultWithRange_URL_ = + objc.registerName("linkCheckingResultWithRange:URL:"); +final _objc_msgSend_516 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_quoteCheckingResultWithRange_replacementString_ = + objc.registerName("quoteCheckingResultWithRange:replacementString:"); +final _objc_msgSend_517 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_dashCheckingResultWithRange_replacementString_ = + objc.registerName("dashCheckingResultWithRange:replacementString:"); +late final _sel_replacementCheckingResultWithRange_replacementString_ = + objc.registerName("replacementCheckingResultWithRange:replacementString:"); +late final _sel_correctionCheckingResultWithRange_replacementString_ = + objc.registerName("correctionCheckingResultWithRange:replacementString:"); +late final _sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_ = + objc.registerName( + "correctionCheckingResultWithRange:replacementString:alternativeStrings:"); +final _objc_msgSend_518 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_ = + objc.registerName( + "regularExpressionCheckingResultWithRanges:count:regularExpression:"); +final _objc_msgSend_519 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_NSRange>, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_NSRange>, + int, + ffi.Pointer)>(); +late final _sel_phoneNumberCheckingResultWithRange_phoneNumber_ = + objc.registerName("phoneNumberCheckingResultWithRange:phoneNumber:"); +late final _sel_transitInformationCheckingResultWithRange_components_ = + objc.registerName("transitInformationCheckingResultWithRange:components:"); + +class NSURLCache extends objc.NSObject { + NSURLCache._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSTextCheckingResult] that points to the same underlying object as [other]. - static NSTextCheckingResult castFrom(T other) { - return NSTextCheckingResult._(other._id, other._lib, - retain: true, release: true); + /// Constructs a [NSURLCache] that points to the same underlying object as [other]. + NSURLCache.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSURLCache] that wraps the given raw object pointer. + NSURLCache.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLCache]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSURLCache); } - /// Returns a [NSTextCheckingResult] that wraps the given raw object pointer. - static NSTextCheckingResult castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSTextCheckingResult._(other, lib, retain: retain, release: release); + static NSURLCache getSharedURLCache() { + final _ret = _objc_msgSend_520(_class_NSURLCache, _sel_sharedURLCache); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSTextCheckingResult]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSTextCheckingResult1); + static void setSharedURLCache(NSURLCache value) { + return _objc_msgSend_521( + _class_NSURLCache, _sel_setSharedURLCache_, value.pointer); } - int get resultType { - return _lib._objc_msgSend_946(_id, _lib._sel_resultType1); + NSURLCache initWithMemoryCapacity_diskCapacity_diskPath_( + int memoryCapacity, int diskCapacity, objc.NSString? path) { + final _ret = _objc_msgSend_522( + this.pointer, + _sel_initWithMemoryCapacity_diskCapacity_diskPath_, + memoryCapacity, + diskCapacity, + path?.pointer ?? ffi.nullptr); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); } - void getRange(ffi.Pointer<_NSRange> stret) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_54_stret(stret, _id, _lib._sel_range1) - : stret.ref = _lib._objc_msgSend_54(_id, _lib._sel_range1); + NSURLCache initWithMemoryCapacity_diskCapacity_directoryURL_( + int memoryCapacity, int diskCapacity, objc.NSURL? directoryURL) { + final _ret = _objc_msgSend_523( + this.pointer, + _sel_initWithMemoryCapacity_diskCapacity_directoryURL_, + memoryCapacity, + diskCapacity, + directoryURL?.pointer ?? ffi.nullptr); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); } - NSOrthography? get orthography { - final _ret = _lib._objc_msgSend_947(_id, _lib._sel_orthography1); + NSCachedURLResponse? cachedResponseForRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_528( + this.pointer, _sel_cachedResponseForRequest_, request.pointer); return _ret.address == 0 ? null - : NSOrthography._(_ret, _lib, retain: true, release: true); + : NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } - NSArray? get grammarDetails { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_grammarDetails1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + void storeCachedResponse_forRequest_( + NSCachedURLResponse cachedResponse, NSURLRequest request) { + _objc_msgSend_529(this.pointer, _sel_storeCachedResponse_forRequest_, + cachedResponse.pointer, request.pointer); } - NSDate? get date { - final _ret = _lib._objc_msgSend_183(_id, _lib._sel_date1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + void removeCachedResponseForRequest_(NSURLRequest request) { + _objc_msgSend_530( + this.pointer, _sel_removeCachedResponseForRequest_, request.pointer); } - NSTimeZone? get timeZone { - final _ret = _lib._objc_msgSend_773(_id, _lib._sel_timeZone1); - return _ret.address == 0 - ? null - : NSTimeZone._(_ret, _lib, retain: true, release: true); + void removeAllCachedResponses() { + _objc_msgSend_82(this.pointer, _sel_removeAllCachedResponses); } - double get duration { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_duration1) - : _lib._objc_msgSend_165(_id, _lib._sel_duration1); + void removeCachedResponsesSinceDate_(objc.NSDate date) { + _objc_msgSend_246( + this.pointer, _sel_removeCachedResponsesSinceDate_, date.pointer); } - NSDictionary? get components { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_components1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + int get memoryCapacity { + return _objc_msgSend_29(this.pointer, _sel_memoryCapacity); } - NSURL? get URL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + set memoryCapacity(int value) { + return _objc_msgSend_125(this.pointer, _sel_setMemoryCapacity_, value); } - NSString? get replacementString { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_replacementString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + int get diskCapacity { + return _objc_msgSend_29(this.pointer, _sel_diskCapacity); } - NSArray? get alternativeStrings { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_alternativeStrings1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + set diskCapacity(int value) { + return _objc_msgSend_125(this.pointer, _sel_setDiskCapacity_, value); } - NSRegularExpression? get regularExpression { - final _ret = _lib._objc_msgSend_959(_id, _lib._sel_regularExpression1); - return _ret.address == 0 - ? null - : NSRegularExpression._(_ret, _lib, retain: true, release: true); + int get currentMemoryUsage { + return _objc_msgSend_29(this.pointer, _sel_currentMemoryUsage); } - NSString? get phoneNumber { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_phoneNumber1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + int get currentDiskUsage { + return _objc_msgSend_29(this.pointer, _sel_currentDiskUsage); } - int get numberOfRanges { - return _lib._objc_msgSend_10(_id, _lib._sel_numberOfRanges1); + void storeCachedResponse_forDataTask_( + NSCachedURLResponse cachedResponse, NSURLSessionDataTask dataTask) { + _objc_msgSend_531(this.pointer, _sel_storeCachedResponse_forDataTask_, + cachedResponse.pointer, dataTask.pointer); } - void rangeAtIndex_(ffi.Pointer<_NSRange> stret, int idx) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_347_stret( - stret, _id, _lib._sel_rangeAtIndex_1, idx) - : stret.ref = - _lib._objc_msgSend_347(_id, _lib._sel_rangeAtIndex_1, idx); + void getCachedResponseForDataTask_completionHandler_( + NSURLSessionDataTask dataTask, + ObjCBlock_ffiVoid_NSCachedURLResponse completionHandler) { + _objc_msgSend_532( + this.pointer, + _sel_getCachedResponseForDataTask_completionHandler_, + dataTask.pointer, + completionHandler.pointer); } - void rangeWithName_(ffi.Pointer<_NSRange> stret, NSString name) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_340_stret( - stret, _id, _lib._sel_rangeWithName_1, name._id) - : stret.ref = - _lib._objc_msgSend_340(_id, _lib._sel_rangeWithName_1, name._id); + void removeCachedResponseForDataTask_(NSURLSessionDataTask dataTask) { + _objc_msgSend_533( + this.pointer, _sel_removeCachedResponseForDataTask_, dataTask.pointer); } - NSTextCheckingResult resultByAdjustingRangesWithOffset_(int offset) { - final _ret = _lib._objc_msgSend_960( - _id, _lib._sel_resultByAdjustingRangesWithOffset_1, offset); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + @override + NSURLCache init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get addressComponents { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_addressComponents1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + static NSURLCache new1() { + final _ret = _objc_msgSend_40(_class_NSURLCache, _sel_new); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); } - static NSTextCheckingResult orthographyCheckingResultWithRange_orthography_( - SwiftLibrary _lib, _NSRange range, NSOrthography orthography) { - final _ret = _lib._objc_msgSend_961( - _lib._class_NSTextCheckingResult1, - _lib._sel_orthographyCheckingResultWithRange_orthography_1, - range, - orthography._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + static NSURLCache allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSURLCache, _sel_allocWithZone_, zone); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); } - static NSTextCheckingResult spellCheckingResultWithRange_( - SwiftLibrary _lib, _NSRange range) { - final _ret = _lib._objc_msgSend_962(_lib._class_NSTextCheckingResult1, - _lib._sel_spellCheckingResultWithRange_1, range); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + static NSURLCache alloc() { + final _ret = _objc_msgSend_40(_class_NSURLCache, _sel_alloc); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); } - static NSTextCheckingResult grammarCheckingResultWithRange_details_( - SwiftLibrary _lib, _NSRange range, NSArray details) { - final _ret = _lib._objc_msgSend_963(_lib._class_NSTextCheckingResult1, - _lib._sel_grammarCheckingResultWithRange_details_1, range, details._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLCache, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - static NSTextCheckingResult dateCheckingResultWithRange_date_( - SwiftLibrary _lib, _NSRange range, NSDate date) { - final _ret = _lib._objc_msgSend_964(_lib._class_NSTextCheckingResult1, - _lib._sel_dateCheckingResultWithRange_date_1, range, date._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLCache, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static NSTextCheckingResult - dateCheckingResultWithRange_date_timeZone_duration_(SwiftLibrary _lib, - _NSRange range, NSDate date, NSTimeZone timeZone, double duration) { - final _ret = _lib._objc_msgSend_965( - _lib._class_NSTextCheckingResult1, - _lib._sel_dateCheckingResultWithRange_date_timeZone_duration_1, - range, - date._id, - timeZone._id, - duration); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLCache, _sel_accessInstanceVariablesDirectly); } - static NSTextCheckingResult addressCheckingResultWithRange_components_( - SwiftLibrary _lib, _NSRange range, NSDictionary components) { - final _ret = _lib._objc_msgSend_966( - _lib._class_NSTextCheckingResult1, - _lib._sel_addressCheckingResultWithRange_components_1, - range, - components._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLCache, _sel_useStoredAccessor); } - static NSTextCheckingResult linkCheckingResultWithRange_URL_( - SwiftLibrary _lib, _NSRange range, NSURL url) { - final _ret = _lib._objc_msgSend_967(_lib._class_NSTextCheckingResult1, - _lib._sel_linkCheckingResultWithRange_URL_1, range, url._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLCache, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static NSTextCheckingResult quoteCheckingResultWithRange_replacementString_( - SwiftLibrary _lib, _NSRange range, NSString replacementString) { - final _ret = _lib._objc_msgSend_968( - _lib._class_NSTextCheckingResult1, - _lib._sel_quoteCheckingResultWithRange_replacementString_1, - range, - replacementString._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLCache, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static NSTextCheckingResult dashCheckingResultWithRange_replacementString_( - SwiftLibrary _lib, _NSRange range, NSString replacementString) { - final _ret = _lib._objc_msgSend_968( - _lib._class_NSTextCheckingResult1, - _lib._sel_dashCheckingResultWithRange_replacementString_1, - range, - replacementString._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLCache, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSURLCache, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLCache, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSURLCache = objc.getClass("NSURLCache"); +late final _sel_sharedURLCache = objc.registerName("sharedURLCache"); +final _objc_msgSend_520 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setSharedURLCache_ = objc.registerName("setSharedURLCache:"); +final _objc_msgSend_521 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithMemoryCapacity_diskCapacity_diskPath_ = + objc.registerName("initWithMemoryCapacity:diskCapacity:diskPath:"); +final _objc_msgSend_522 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); +late final _sel_initWithMemoryCapacity_diskCapacity_directoryURL_ = + objc.registerName("initWithMemoryCapacity:diskCapacity:directoryURL:"); +final _objc_msgSend_523 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); + +class NSCachedURLResponse extends objc.NSObject { + NSCachedURLResponse._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSCachedURLResponse] that points to the same underlying object as [other]. + NSCachedURLResponse.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSCachedURLResponse] that wraps the given raw object pointer. + NSCachedURLResponse.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSCachedURLResponse]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSCachedURLResponse); } - static NSTextCheckingResult - replacementCheckingResultWithRange_replacementString_( - SwiftLibrary _lib, _NSRange range, NSString replacementString) { - final _ret = _lib._objc_msgSend_968( - _lib._class_NSTextCheckingResult1, - _lib._sel_replacementCheckingResultWithRange_replacementString_1, - range, - replacementString._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + NSCachedURLResponse initWithResponse_data_( + NSURLResponse response, objc.NSData data) { + final _ret = _objc_msgSend_524(this.pointer, _sel_initWithResponse_data_, + response.pointer, data.pointer); + return NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } - static NSTextCheckingResult - correctionCheckingResultWithRange_replacementString_( - SwiftLibrary _lib, _NSRange range, NSString replacementString) { - final _ret = _lib._objc_msgSend_968( - _lib._class_NSTextCheckingResult1, - _lib._sel_correctionCheckingResultWithRange_replacementString_1, - range, - replacementString._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + NSCachedURLResponse initWithResponse_data_userInfo_storagePolicy_( + NSURLResponse response, + objc.NSData data, + objc.NSDictionary? userInfo, + int storagePolicy) { + final _ret = _objc_msgSend_525( + this.pointer, + _sel_initWithResponse_data_userInfo_storagePolicy_, + response.pointer, + data.pointer, + userInfo?.pointer ?? ffi.nullptr, + storagePolicy); + return NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } - static NSTextCheckingResult - correctionCheckingResultWithRange_replacementString_alternativeStrings_( - SwiftLibrary _lib, - _NSRange range, - NSString replacementString, - NSArray alternativeStrings) { - final _ret = _lib._objc_msgSend_969( - _lib._class_NSTextCheckingResult1, - _lib._sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_1, - range, - replacementString._id, - alternativeStrings._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + NSURLResponse get response { + final _ret = _objc_msgSend_526(this.pointer, _sel_response); + return NSURLResponse.castFromPointer(_ret, retain: true, release: true); } - static NSTextCheckingResult - regularExpressionCheckingResultWithRanges_count_regularExpression_( - SwiftLibrary _lib, - ffi.Pointer<_NSRange> ranges, - int count, - NSRegularExpression regularExpression) { - final _ret = _lib._objc_msgSend_970( - _lib._class_NSTextCheckingResult1, - _lib._sel_regularExpressionCheckingResultWithRanges_count_regularExpression_1, - ranges, - count, - regularExpression._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + objc.NSData get data { + final _ret = _objc_msgSend_104(this.pointer, _sel_data); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - static NSTextCheckingResult phoneNumberCheckingResultWithRange_phoneNumber_( - SwiftLibrary _lib, _NSRange range, NSString phoneNumber) { - final _ret = _lib._objc_msgSend_968( - _lib._class_NSTextCheckingResult1, - _lib._sel_phoneNumberCheckingResultWithRange_phoneNumber_1, - range, - phoneNumber._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + objc.NSDictionary? get userInfo { + final _ret = _objc_msgSend_65(this.pointer, _sel_userInfo); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSTextCheckingResult - transitInformationCheckingResultWithRange_components_( - SwiftLibrary _lib, _NSRange range, NSDictionary components) { - final _ret = _lib._objc_msgSend_966( - _lib._class_NSTextCheckingResult1, - _lib._sel_transitInformationCheckingResultWithRange_components_1, - range, - components._id); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + int get storagePolicy { + return _objc_msgSend_527(this.pointer, _sel_storagePolicy); + } + + @override + NSCachedURLResponse init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); + } + + static NSCachedURLResponse new1() { + final _ret = _objc_msgSend_40(_class_NSCachedURLResponse, _sel_new); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); + } + + static NSCachedURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSCachedURLResponse, _sel_allocWithZone_, zone); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); + } + + static NSCachedURLResponse alloc() { + final _ret = _objc_msgSend_40(_class_NSCachedURLResponse, _sel_alloc); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSCachedURLResponse, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSCachedURLResponse, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSCachedURLResponse, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSCachedURLResponse, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSCachedURLResponse, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSCachedURLResponse, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSCachedURLResponse, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSCachedURLResponse, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSCachedURLResponse, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSCachedURLResponse = objc.getClass("NSCachedURLResponse"); +late final _sel_initWithResponse_data_ = + objc.registerName("initWithResponse:data:"); +final _objc_msgSend_524 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +abstract class NSURLCacheStoragePolicy { + static const int NSURLCacheStorageAllowed = 0; + static const int NSURLCacheStorageAllowedInMemoryOnly = 1; + static const int NSURLCacheStorageNotAllowed = 2; +} + +late final _sel_initWithResponse_data_userInfo_storagePolicy_ = + objc.registerName("initWithResponse:data:userInfo:storagePolicy:"); +final _objc_msgSend_525 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +final _objc_msgSend_526 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_storagePolicy = objc.registerName("storagePolicy"); +final _objc_msgSend_527 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_cachedResponseForRequest_ = + objc.registerName("cachedResponseForRequest:"); +final _objc_msgSend_528 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_storeCachedResponse_forRequest_ = + objc.registerName("storeCachedResponse:forRequest:"); +final _objc_msgSend_529 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeCachedResponseForRequest_ = + objc.registerName("removeCachedResponseForRequest:"); +final _objc_msgSend_530 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_removeAllCachedResponses = + objc.registerName("removeAllCachedResponses"); +late final _sel_removeCachedResponsesSinceDate_ = + objc.registerName("removeCachedResponsesSinceDate:"); +late final _sel_memoryCapacity = objc.registerName("memoryCapacity"); +late final _sel_setMemoryCapacity_ = objc.registerName("setMemoryCapacity:"); +late final _sel_diskCapacity = objc.registerName("diskCapacity"); +late final _sel_setDiskCapacity_ = objc.registerName("setDiskCapacity:"); +late final _sel_currentMemoryUsage = objc.registerName("currentMemoryUsage"); +late final _sel_currentDiskUsage = objc.registerName("currentDiskUsage"); + +class NSURLSessionDataTask extends NSURLSessionTask { + NSURLSessionDataTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLSessionDataTask] that points to the same underlying object as [other]. + NSURLSessionDataTask.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSURLSessionDataTask] that wraps the given raw object pointer. + NSURLSessionDataTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLSessionDataTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionDataTask); } @override - NSTextCheckingResult init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + NSURLSessionDataTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } - static NSTextCheckingResult new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSTextCheckingResult1, _lib._sel_new1); - return NSTextCheckingResult._(_ret, _lib, retain: false, release: true); + static NSURLSessionDataTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionDataTask, _sel_new); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: false, release: true); } - static NSTextCheckingResult allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSTextCheckingResult1, _lib._sel_allocWithZone_1, zone); - return NSTextCheckingResult._(_ret, _lib, retain: false, release: true); + static NSURLSessionDataTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionDataTask, _sel_allocWithZone_, zone); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: false, release: true); } - static NSTextCheckingResult alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSTextCheckingResult1, _lib._sel_alloc1); - return NSTextCheckingResult._(_ret, _lib, retain: false, release: true); + static NSURLSessionDataTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionDataTask, _sel_alloc); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSTextCheckingResult1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionDataTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSTextCheckingResult1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionDataTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSTextCheckingResult1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLSessionDataTask, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSTextCheckingResult1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLSessionDataTask, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSTextCheckingResult1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionDataTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSTextCheckingResult1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionDataTask, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSTextCheckingResult1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionDataTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionDataTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionDataTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSURLSessionDataTask = objc.getClass("NSURLSessionDataTask"); +late final _sel_storeCachedResponse_forDataTask_ = + objc.registerName("storeCachedResponse:forDataTask:"); +final _objc_msgSend_531 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSTextCheckingResult1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry[ + block.ref.target.address]!(arg0); + +class ObjCBlock_ffiVoid_NSCachedURLResponse extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSCachedURLResponse._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSTextCheckingResult1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSCachedURLResponse castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSCachedURLResponse._(pointer, + retain: retain, release: release); } -} -abstract class NSTextCheckingType { - static const int NSTextCheckingTypeOrthography = 1; - static const int NSTextCheckingTypeSpelling = 2; - static const int NSTextCheckingTypeGrammar = 4; - static const int NSTextCheckingTypeDate = 8; - static const int NSTextCheckingTypeAddress = 16; - static const int NSTextCheckingTypeLink = 32; - static const int NSTextCheckingTypeQuote = 64; - static const int NSTextCheckingTypeDash = 128; - static const int NSTextCheckingTypeReplacement = 256; - static const int NSTextCheckingTypeCorrection = 512; - static const int NSTextCheckingTypeRegularExpression = 1024; - static const int NSTextCheckingTypePhoneNumber = 2048; - static const int NSTextCheckingTypeTransitInformation = 4096; -} + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSCachedURLResponse.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSCachedURLResponse.fromFunction( + void Function(NSCachedURLResponse?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(arg0, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSCachedURLResponse.listener(void Function(NSCachedURLResponse?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(arg0, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; -class NSRegularExpression extends NSObject { - NSRegularExpression._(ffi.Pointer id, SwiftLibrary lib, + void call(NSCachedURLResponse? arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr); +} + +late final _sel_getCachedResponseForDataTask_completionHandler_ = + objc.registerName("getCachedResponseForDataTask:completionHandler:"); +final _objc_msgSend_532 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeCachedResponseForDataTask_ = + objc.registerName("removeCachedResponseForDataTask:"); +final _objc_msgSend_533 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class NSURLConnection extends objc.NSObject { + NSURLConnection._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSRegularExpression] that points to the same underlying object as [other]. - static NSRegularExpression castFrom(T other) { - return NSRegularExpression._(other._id, other._lib, - retain: true, release: true); - } + /// Constructs a [NSURLConnection] that points to the same underlying object as [other]. + NSURLConnection.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSRegularExpression] that wraps the given raw object pointer. - static NSRegularExpression castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSRegularExpression._(other, lib, retain: retain, release: release); - } + /// Constructs a [NSURLConnection] that wraps the given raw object pointer. + NSURLConnection.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSRegularExpression]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSRegularExpression1); + /// Returns whether [obj] is an instance of [NSURLConnection]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLConnection); } - static NSRegularExpression? regularExpressionWithPattern_options_error_( - SwiftLibrary _lib, - NSString pattern, - int options, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_948( - _lib._class_NSRegularExpression1, - _lib._sel_regularExpressionWithPattern_options_error_1, - pattern._id, - options, - error); + NSURLConnection? initWithRequest_delegate_startImmediately_( + NSURLRequest request, objc.NSObject? delegate, bool startImmediately) { + final _ret = _objc_msgSend_534( + this.pointer, + _sel_initWithRequest_delegate_startImmediately_, + request.pointer, + delegate?.pointer ?? ffi.nullptr, + startImmediately); return _ret.address == 0 ? null - : NSRegularExpression._(_ret, _lib, retain: true, release: true); + : NSURLConnection.castFromPointer(_ret, retain: true, release: true); } - NSRegularExpression? initWithPattern_options_error_(NSString pattern, - int options, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_949(_id, - _lib._sel_initWithPattern_options_error_1, pattern._id, options, error); + NSURLConnection? initWithRequest_delegate_( + NSURLRequest request, objc.NSObject? delegate) { + final _ret = _objc_msgSend_535(this.pointer, _sel_initWithRequest_delegate_, + request.pointer, delegate?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSRegularExpression._(_ret, _lib, retain: true, release: true); + : NSURLConnection.castFromPointer(_ret, retain: true, release: true); } - NSString get pattern { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_pattern1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - int get options { - return _lib._objc_msgSend_950(_id, _lib._sel_options1); - } - - int get numberOfCaptureGroups { - return _lib._objc_msgSend_10(_id, _lib._sel_numberOfCaptureGroups1); + static NSURLConnection? connectionWithRequest_delegate_( + NSURLRequest request, objc.NSObject? delegate) { + final _ret = _objc_msgSend_536( + _class_NSURLConnection, + _sel_connectionWithRequest_delegate_, + request.pointer, + delegate?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSURLConnection.castFromPointer(_ret, retain: true, release: true); } - static NSString escapedPatternForString_(SwiftLibrary _lib, NSString string) { - final _ret = _lib._objc_msgSend_69(_lib._class_NSRegularExpression1, - _lib._sel_escapedPatternForString_1, string._id); - return NSString._(_ret, _lib, retain: true, release: true); + NSURLRequest get originalRequest { + final _ret = _objc_msgSend_537(this.pointer, _sel_originalRequest); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - void enumerateMatchesInString_options_range_usingBlock_( - NSString string, - int options, - _NSRange range, - ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool block) { - _lib._objc_msgSend_951( - _id, - _lib._sel_enumerateMatchesInString_options_range_usingBlock_1, - string._id, - options, - range, - block._id); + NSURLRequest get currentRequest { + final _ret = _objc_msgSend_537(this.pointer, _sel_currentRequest); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - NSArray matchesInString_options_range_( - NSString string, int options, _NSRange range) { - final _ret = _lib._objc_msgSend_952(_id, - _lib._sel_matchesInString_options_range_1, string._id, options, range); - return NSArray._(_ret, _lib, retain: true, release: true); + void start() { + _objc_msgSend_82(this.pointer, _sel_start); } - int numberOfMatchesInString_options_range_( - NSString string, int options, _NSRange range) { - return _lib._objc_msgSend_953( - _id, - _lib._sel_numberOfMatchesInString_options_range_1, - string._id, - options, - range); + void cancel() { + _objc_msgSend_82(this.pointer, _sel_cancel); } - NSTextCheckingResult? firstMatchInString_options_range_( - NSString string, int options, _NSRange range) { - final _ret = _lib._objc_msgSend_954( - _id, - _lib._sel_firstMatchInString_options_range_1, - string._id, - options, - range); - return _ret.address == 0 - ? null - : NSTextCheckingResult._(_ret, _lib, retain: true, release: true); + void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_scheduleInRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); } - void rangeOfFirstMatchInString_options_range_(ffi.Pointer<_NSRange> stret, - NSString string, int options, _NSRange range) { - _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_955_stret( - stret, - _id, - _lib._sel_rangeOfFirstMatchInString_options_range_1, - string._id, - options, - range) - : stret.ref = _lib._objc_msgSend_955( - _id, - _lib._sel_rangeOfFirstMatchInString_options_range_1, - string._id, - options, - range); + void unscheduleFromRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_unscheduleFromRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); } - NSString stringByReplacingMatchesInString_options_range_withTemplate_( - NSString string, int options, _NSRange range, NSString templ) { - final _ret = _lib._objc_msgSend_956( - _id, - _lib._sel_stringByReplacingMatchesInString_options_range_withTemplate_1, - string._id, - options, - range, - templ._id); - return NSString._(_ret, _lib, retain: true, release: true); + void setDelegateQueue_(NSOperationQueue? queue) { + _objc_msgSend_538( + this.pointer, _sel_setDelegateQueue_, queue?.pointer ?? ffi.nullptr); } - int replaceMatchesInString_options_range_withTemplate_( - NSMutableString string, int options, _NSRange range, NSString templ) { - return _lib._objc_msgSend_957( - _id, - _lib._sel_replaceMatchesInString_options_range_withTemplate_1, - string._id, - options, - range, - templ._id); + static bool canHandleRequest_(NSURLRequest request) { + return _objc_msgSend_539( + _class_NSURLConnection, _sel_canHandleRequest_, request.pointer); } - NSString replacementStringForResult_inString_offset_template_( - NSTextCheckingResult result, - NSString string, - int offset, - NSString templ) { - final _ret = _lib._objc_msgSend_958( - _id, - _lib._sel_replacementStringForResult_inString_offset_template_1, - result._id, - string._id, - offset, - templ._id); - return NSString._(_ret, _lib, retain: true, release: true); + static objc.NSData? sendSynchronousRequest_returningResponse_error_( + NSURLRequest request, + ffi.Pointer> response, + ffi.Pointer> error) { + final _ret = _objc_msgSend_540( + _class_NSURLConnection, + _sel_sendSynchronousRequest_returningResponse_error_, + request.pointer, + response, + error); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - static NSString escapedTemplateForString_( - SwiftLibrary _lib, NSString string) { - final _ret = _lib._objc_msgSend_69(_lib._class_NSRegularExpression1, - _lib._sel_escapedTemplateForString_1, string._id); - return NSString._(_ret, _lib, retain: true, release: true); + static void sendAsynchronousRequest_queue_completionHandler_( + NSURLRequest request, + NSOperationQueue queue, + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError handler) { + _objc_msgSend_541( + _class_NSURLConnection, + _sel_sendAsynchronousRequest_queue_completionHandler_, + request.pointer, + queue.pointer, + handler.pointer); } @override - NSRegularExpression init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSRegularExpression._(_ret, _lib, retain: true, release: true); + NSURLConnection init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLConnection.castFromPointer(_ret, retain: true, release: true); } - static NSRegularExpression new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSRegularExpression1, _lib._sel_new1); - return NSRegularExpression._(_ret, _lib, retain: false, release: true); + static NSURLConnection new1() { + final _ret = _objc_msgSend_40(_class_NSURLConnection, _sel_new); + return NSURLConnection.castFromPointer(_ret, retain: false, release: true); } - static NSRegularExpression allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSRegularExpression1, _lib._sel_allocWithZone_1, zone); - return NSRegularExpression._(_ret, _lib, retain: false, release: true); + static NSURLConnection allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLConnection, _sel_allocWithZone_, zone); + return NSURLConnection.castFromPointer(_ret, retain: false, release: true); } - static NSRegularExpression alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSRegularExpression1, _lib._sel_alloc1); - return NSRegularExpression._(_ret, _lib, retain: false, release: true); + static NSURLConnection alloc() { + final _ret = _objc_msgSend_40(_class_NSURLConnection, _sel_alloc); + return NSURLConnection.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSRegularExpression1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLConnection, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSRegularExpression1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLConnection, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSRegularExpression1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLConnection, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSRegularExpression1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLConnection, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSRegularExpression1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLConnection, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSRegularExpression1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLConnection, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSRegularExpression1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSRegularExpression1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSRegularExpression1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -abstract class NSRegularExpressionOptions { - static const int NSRegularExpressionCaseInsensitive = 1; - static const int NSRegularExpressionAllowCommentsAndWhitespace = 2; - static const int NSRegularExpressionIgnoreMetacharacters = 4; - static const int NSRegularExpressionDotMatchesLineSeparators = 8; - static const int NSRegularExpressionAnchorsMatchLines = 16; - static const int NSRegularExpressionUseUnixLineSeparators = 32; - static const int NSRegularExpressionUseUnicodeWordBoundaries = 64; -} - -abstract class NSMatchingOptions { - static const int NSMatchingReportProgress = 1; - static const int NSMatchingReportCompletion = 2; - static const int NSMatchingAnchored = 4; - static const int NSMatchingWithTransparentBounds = 8; - static const int NSMatchingWithoutAnchoringBounds = 16; -} - -void - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Int32 arg1, ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, int, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry = - , int, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistryIndex = - 0; + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLConnection, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLConnection, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLConnection, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSURLConnection = objc.getClass("NSURLConnection"); +late final _sel_initWithRequest_delegate_startImmediately_ = + objc.registerName("initWithRequest:delegate:startImmediately:"); +final _objc_msgSend_534 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_initWithRequest_delegate_ = + objc.registerName("initWithRequest:delegate:"); +final _objc_msgSend_535 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_connectionWithRequest_delegate_ = + objc.registerName("connectionWithRequest:delegate:"); +final _objc_msgSend_536 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +final _objc_msgSend_537 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_unscheduleFromRunLoop_forMode_ = + objc.registerName("unscheduleFromRunLoop:forMode:"); +late final _sel_setDelegateQueue_ = objc.registerName("setDelegateQueue:"); +final _objc_msgSend_538 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_canHandleRequest_ = objc.registerName("canHandleRequest:"); +final _objc_msgSend_539 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_sendSynchronousRequest_returningResponse_error_ = + objc.registerName("sendSynchronousRequest:returningResponse:error:"); +final _objc_msgSend_540 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); +void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistryIndex = 0; ffi.Pointer - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( - void Function(ffi.Pointer, int, ffi.Pointer) fn) { + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer) + fn) { final id = - ++_ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry[ - id] = fn; + ++_ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry[ +void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry[ block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool - extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); +class ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool - castFromPointer(SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool._( - pointer, lib, + static ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError._(pointer, retain: retain, release: release); } @@ -65944,25 +24651,24 @@ class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool.fromFunctionPointer( - SwiftLibrary lib, + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Int32 arg1, ffi.Pointer arg2)>> + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline) + .cast(), + ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. @@ -65970,24 +24676,21 @@ class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool.fromFunction( - SwiftLibrary lib, - void Function(NSTextCheckingResult?, int, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline) + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.fromFunction( + void Function(NSURLResponse?, objc.NSData?, objc.NSError?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline) .cast(), - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( - (ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSTextCheckingResult._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 ? null : NSURLResponse.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : objc.NSData.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -65999,578 +24702,1127 @@ class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool.listener( - SwiftLibrary lib, - void Function(NSTextCheckingResult?, int, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline) + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.listener( + void Function(NSURLResponse?, objc.NSData?, objc.NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline) ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( - (ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSTextCheckingResult._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : NSURLResponse.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : objc.NSData.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))))); static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Int32, ffi.Pointer)>? _dartFuncListenerTrampoline; + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; - void call(NSTextCheckingResult? arg0, int arg1, ffi.Pointer arg2) => - _id.ref.invoke + void call(NSURLResponse? arg0, objc.NSData? arg1, objc.NSError? arg2) => + pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Int32 arg1, - ffi.Pointer arg2)>>() + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer, int, ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1, arg2); -} - -abstract class NSMatchingFlags { - static const int NSMatchingProgress = 1; - static const int NSMatchingCompleted = 2; - static const int NSMatchingHitEnd = 4; - static const int NSMatchingRequiredEnd = 8; - static const int NSMatchingInternalError = 16; -} - -class NSURLCache extends NSObject { - NSURLCache._(ffi.Pointer id, SwiftLibrary lib, + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, + arg0?.pointer ?? ffi.nullptr, + arg1?.pointer ?? ffi.nullptr, + arg2?.pointer ?? ffi.nullptr); +} + +late final _sel_sendAsynchronousRequest_queue_completionHandler_ = + objc.registerName("sendAsynchronousRequest:queue:completionHandler:"); +final _objc_msgSend_541 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +class NSURLCredential extends objc.NSObject { + NSURLCredential._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [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); - } + /// Constructs a [NSURLCredential] that points to the same underlying object as [other]. + NSURLCredential.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSURLCache] that wraps the given raw object pointer. - static NSURLCache castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLCache._(other, lib, retain: retain, release: release); - } + /// Constructs a [NSURLCredential] that wraps the given raw object pointer. + NSURLCredential.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSURLCache]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLCache1); + /// Returns whether [obj] is an instance of [NSURLCredential]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLCredential); } - static NSURLCache getSharedURLCache(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_971( - _lib._class_NSURLCache1, _lib._sel_sharedURLCache1); - return NSURLCache._(_ret, _lib, retain: true, release: true); + int get persistence { + return _objc_msgSend_542(this.pointer, _sel_persistence); } - static void setSharedURLCache(SwiftLibrary _lib, NSURLCache value) { - return _lib._objc_msgSend_972( - _lib._class_NSURLCache1, _lib._sel_setSharedURLCache_1, value._id); + NSURLCredential initWithUser_password_persistence_( + objc.NSString user, objc.NSString password, int persistence) { + final _ret = _objc_msgSend_543( + this.pointer, + _sel_initWithUser_password_persistence_, + user.pointer, + password.pointer, + persistence); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } - NSURLCache initWithMemoryCapacity_diskCapacity_diskPath_( - int memoryCapacity, int diskCapacity, NSString? path) { - final _ret = _lib._objc_msgSend_973( - _id, - _lib._sel_initWithMemoryCapacity_diskCapacity_diskPath_1, - memoryCapacity, - diskCapacity, - path?._id ?? ffi.nullptr); - return NSURLCache._(_ret, _lib, retain: true, release: true); + static NSURLCredential credentialWithUser_password_persistence_( + objc.NSString user, objc.NSString password, int persistence) { + final _ret = _objc_msgSend_544( + _class_NSURLCredential, + _sel_credentialWithUser_password_persistence_, + user.pointer, + password.pointer, + persistence); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } - NSURLCache initWithMemoryCapacity_diskCapacity_directoryURL_( - int memoryCapacity, int diskCapacity, NSURL? directoryURL) { - final _ret = _lib._objc_msgSend_974( - _id, - _lib._sel_initWithMemoryCapacity_diskCapacity_directoryURL_1, - memoryCapacity, - diskCapacity, - directoryURL?._id ?? ffi.nullptr); - return NSURLCache._(_ret, _lib, retain: true, release: true); + objc.NSString? get user { + final _ret = _objc_msgSend_13(this.pointer, _sel_user); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSCachedURLResponse? cachedResponseForRequest_(NSURLRequest request) { - final _ret = _lib._objc_msgSend_979( - _id, _lib._sel_cachedResponseForRequest_1, request._id); + objc.NSString? get password { + final _ret = _objc_msgSend_13(this.pointer, _sel_password); return _ret.address == 0 ? null - : NSCachedURLResponse._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void storeCachedResponse_forRequest_( - NSCachedURLResponse cachedResponse, NSURLRequest request) { - _lib._objc_msgSend_980(_id, _lib._sel_storeCachedResponse_forRequest_1, - cachedResponse._id, request._id); + bool get hasPassword { + return _objc_msgSend_7(this.pointer, _sel_hasPassword); } - void removeCachedResponseForRequest_(NSURLRequest request) { - _lib._objc_msgSend_981( - _id, _lib._sel_removeCachedResponseForRequest_1, request._id); + NSURLCredential initWithIdentity_certificates_persistence_( + ffi.Pointer<__SecIdentity> identity, + objc.NSArray? certArray, + int persistence) { + final _ret = _objc_msgSend_545( + this.pointer, + _sel_initWithIdentity_certificates_persistence_, + identity, + certArray?.pointer ?? ffi.nullptr, + persistence); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } - void removeAllCachedResponses() { - _lib._objc_msgSend_1(_id, _lib._sel_removeAllCachedResponses1); + static NSURLCredential credentialWithIdentity_certificates_persistence_( + ffi.Pointer<__SecIdentity> identity, + objc.NSArray? certArray, + int persistence) { + final _ret = _objc_msgSend_546( + _class_NSURLCredential, + _sel_credentialWithIdentity_certificates_persistence_, + identity, + certArray?.pointer ?? ffi.nullptr, + persistence); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } - void removeCachedResponsesSinceDate_(NSDate date) { - _lib._objc_msgSend_540( - _id, _lib._sel_removeCachedResponsesSinceDate_1, date._id); + ffi.Pointer<__SecIdentity> get identity { + return _objc_msgSend_547(this.pointer, _sel_identity); } - int get memoryCapacity { - return _lib._objc_msgSend_10(_id, _lib._sel_memoryCapacity1); + objc.NSArray get certificates { + final _ret = _objc_msgSend_6(this.pointer, _sel_certificates); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set memoryCapacity(int value) { - return _lib._objc_msgSend_516(_id, _lib._sel_setMemoryCapacity_1, value); + NSURLCredential initWithTrust_(ffi.Pointer<__SecTrust> trust) { + final _ret = _objc_msgSend_548(this.pointer, _sel_initWithTrust_, trust); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } - int get diskCapacity { - return _lib._objc_msgSend_10(_id, _lib._sel_diskCapacity1); + static NSURLCredential credentialForTrust_(ffi.Pointer<__SecTrust> trust) { + final _ret = _objc_msgSend_549( + _class_NSURLCredential, _sel_credentialForTrust_, trust); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } - set diskCapacity(int value) { - return _lib._objc_msgSend_516(_id, _lib._sel_setDiskCapacity_1, value); + @override + NSURLCredential init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); } - int get currentMemoryUsage { - return _lib._objc_msgSend_10(_id, _lib._sel_currentMemoryUsage1); + static NSURLCredential new1() { + final _ret = _objc_msgSend_40(_class_NSURLCredential, _sel_new); + return NSURLCredential.castFromPointer(_ret, retain: false, release: true); } - int get currentDiskUsage { - return _lib._objc_msgSend_10(_id, _lib._sel_currentDiskUsage1); + static NSURLCredential allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLCredential, _sel_allocWithZone_, zone); + return NSURLCredential.castFromPointer(_ret, retain: false, release: true); } - void storeCachedResponse_forDataTask_( - NSCachedURLResponse cachedResponse, NSURLSessionDataTask dataTask) { - _lib._objc_msgSend_982(_id, _lib._sel_storeCachedResponse_forDataTask_1, - cachedResponse._id, dataTask._id); + static NSURLCredential alloc() { + final _ret = _objc_msgSend_40(_class_NSURLCredential, _sel_alloc); + return NSURLCredential.castFromPointer(_ret, retain: false, release: true); } - void getCachedResponseForDataTask_completionHandler_( - NSURLSessionDataTask dataTask, - ObjCBlock_ffiVoid_NSCachedURLResponse completionHandler) { - _lib._objc_msgSend_983( - _id, - _lib._sel_getCachedResponseForDataTask_completionHandler_1, - dataTask._id, - completionHandler._id); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLCredential, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - void removeCachedResponseForDataTask_(NSURLSessionDataTask dataTask) { - _lib._objc_msgSend_984( - _id, _lib._sel_removeCachedResponseForDataTask_1, dataTask._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLCredential, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - @override - NSURLCache init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLCache._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLCredential, _sel_accessInstanceVariablesDirectly); } - static NSURLCache new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLCache1, _lib._sel_new1); - return NSURLCache._(_ret, _lib, retain: false, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLCredential, _sel_useStoredAccessor); } - static NSURLCache allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLCache1, _lib._sel_allocWithZone_1, zone); - return NSURLCache._(_ret, _lib, retain: false, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLCredential, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static NSURLCache alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLCache1, _lib._sel_alloc1); - return NSURLCache._(_ret, _lib, retain: false, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLCredential, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLCache1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLCredential, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLCache1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLCredential, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLCache1, _lib._sel_accessInstanceVariablesDirectly1); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLCredential, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLCache1, _lib._sel_useStoredAccessor1); - } +late final _class_NSURLCredential = objc.getClass("NSURLCredential"); - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLCache1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); - } +abstract class NSURLCredentialPersistence { + static const int NSURLCredentialPersistenceNone = 0; + static const int NSURLCredentialPersistenceForSession = 1; + static const int NSURLCredentialPersistencePermanent = 2; + static const int NSURLCredentialPersistenceSynchronizable = 3; +} - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLCache1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); - } +late final _sel_persistence = objc.registerName("persistence"); +final _objc_msgSend_542 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithUser_password_persistence_ = + objc.registerName("initWithUser:password:persistence:"); +final _objc_msgSend_543 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_credentialWithUser_password_persistence_ = + objc.registerName("credentialWithUser:password:persistence:"); +final _objc_msgSend_544 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_user = objc.registerName("user"); +late final _sel_password = objc.registerName("password"); +late final _sel_hasPassword = objc.registerName("hasPassword"); - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLCache1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); +final class __SecIdentity extends ffi.Opaque {} + +late final _sel_initWithIdentity_certificates_persistence_ = + objc.registerName("initWithIdentity:certificates:persistence:"); +final _objc_msgSend_545 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__SecIdentity>, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__SecIdentity>, + ffi.Pointer, + int)>(); +late final _sel_credentialWithIdentity_certificates_persistence_ = + objc.registerName("credentialWithIdentity:certificates:persistence:"); +final _objc_msgSend_546 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__SecIdentity>, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__SecIdentity>, + ffi.Pointer, + int)>(); +late final _sel_identity = objc.registerName("identity"); +final _objc_msgSend_547 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer<__SecIdentity> Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer<__SecIdentity> Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_certificates = objc.registerName("certificates"); + +final class __SecTrust extends ffi.Opaque {} + +late final _sel_initWithTrust_ = objc.registerName("initWithTrust:"); +final _objc_msgSend_548 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<__SecTrust>)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<__SecTrust>)>(); +late final _sel_credentialForTrust_ = objc.registerName("credentialForTrust:"); +final _objc_msgSend_549 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<__SecTrust>)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<__SecTrust>)>(); + +class NSURLProtectionSpace extends objc.NSObject { + NSURLProtectionSpace._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLProtectionSpace] that points to the same underlying object as [other]. + NSURLProtectionSpace.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSURLProtectionSpace] that wraps the given raw object pointer. + NSURLProtectionSpace.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLProtectionSpace]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLProtectionSpace); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSURLCache1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + NSURLProtectionSpace initWithHost_port_protocol_realm_authenticationMethod_( + objc.NSString host, + int port, + objc.NSString? protocol, + objc.NSString? realm, + objc.NSString? authenticationMethod) { + final _ret = _objc_msgSend_550( + this.pointer, + _sel_initWithHost_port_protocol_realm_authenticationMethod_, + host.pointer, + port, + protocol?.pointer ?? ffi.nullptr, + realm?.pointer ?? ffi.nullptr, + authenticationMethod?.pointer ?? ffi.nullptr); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLCache1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + NSURLProtectionSpace initWithProxyHost_port_type_realm_authenticationMethod_( + objc.NSString host, + int port, + objc.NSString? type, + objc.NSString? realm, + objc.NSString? authenticationMethod) { + final _ret = _objc_msgSend_550( + this.pointer, + _sel_initWithProxyHost_port_type_realm_authenticationMethod_, + host.pointer, + port, + type?.pointer ?? ffi.nullptr, + realm?.pointer ?? ffi.nullptr, + authenticationMethod?.pointer ?? ffi.nullptr); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: true, release: true); } -} -class NSCachedURLResponse extends NSObject { - NSCachedURLResponse._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + objc.NSString? get realm { + final _ret = _objc_msgSend_13(this.pointer, _sel_realm); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a [NSCachedURLResponse] that points to the same underlying object as [other]. - static NSCachedURLResponse castFrom(T other) { - return NSCachedURLResponse._(other._id, other._lib, - retain: true, release: true); + bool get receivesCredentialSecurely { + return _objc_msgSend_7(this.pointer, _sel_receivesCredentialSecurely); } - /// Returns a [NSCachedURLResponse] that wraps the given raw object pointer. - static NSCachedURLResponse castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCachedURLResponse._(other, lib, retain: retain, release: release); + bool get isProxy { + return _objc_msgSend_7(this.pointer, _sel_isProxy); } - /// 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); + objc.NSString get host { + final _ret = _objc_msgSend_12(this.pointer, _sel_host); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSCachedURLResponse initWithResponse_data_( - NSURLResponse response, NSData data) { - final _ret = _lib._objc_msgSend_975( - _id, _lib._sel_initWithResponse_data_1, response._id, data._id); - return NSCachedURLResponse._(_ret, _lib, retain: true, release: true); + int get port { + return _objc_msgSend_114(this.pointer, _sel_port); } - NSCachedURLResponse initWithResponse_data_userInfo_storagePolicy_( - NSURLResponse response, - NSData data, - NSDictionary? userInfo, - int storagePolicy) { - final _ret = _lib._objc_msgSend_976( - _id, - _lib._sel_initWithResponse_data_userInfo_storagePolicy_1, - response._id, - data._id, - userInfo?._id ?? ffi.nullptr, - storagePolicy); - return NSCachedURLResponse._(_ret, _lib, retain: true, release: true); + objc.NSString? get proxyType { + final _ret = _objc_msgSend_13(this.pointer, _sel_proxyType); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSURLResponse get response { - final _ret = _lib._objc_msgSend_977(_id, _lib._sel_response1); - return NSURLResponse._(_ret, _lib, retain: true, release: true); + objc.NSString? get protocol { + final _ret = _objc_msgSend_13(this.pointer, _sel_protocol); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSData get data { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_data1); - return NSData._(_ret, _lib, retain: true, release: true); + objc.NSString get authenticationMethod { + final _ret = _objc_msgSend_12(this.pointer, _sel_authenticationMethod); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_userInfo1); + objc.NSArray? get distinguishedNames { + final _ret = _objc_msgSend_69(this.pointer, _sel_distinguishedNames); return _ret.address == 0 ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int get storagePolicy { - return _lib._objc_msgSend_978(_id, _lib._sel_storagePolicy1); + ffi.Pointer<__SecTrust> get serverTrust { + return _objc_msgSend_551(this.pointer, _sel_serverTrust); } @override - NSCachedURLResponse init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSCachedURLResponse._(_ret, _lib, retain: true, release: true); + NSURLProtectionSpace init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: true, release: true); } - static NSCachedURLResponse new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCachedURLResponse1, _lib._sel_new1); - return NSCachedURLResponse._(_ret, _lib, retain: false, release: true); + static NSURLProtectionSpace new1() { + final _ret = _objc_msgSend_40(_class_NSURLProtectionSpace, _sel_new); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: false, release: true); } - static NSCachedURLResponse allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSCachedURLResponse1, _lib._sel_allocWithZone_1, zone); - return NSCachedURLResponse._(_ret, _lib, retain: false, release: true); + static NSURLProtectionSpace allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLProtectionSpace, _sel_allocWithZone_, zone); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: false, release: true); } - static NSCachedURLResponse alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSCachedURLResponse1, _lib._sel_alloc1); - return NSCachedURLResponse._(_ret, _lib, retain: false, release: true); + static NSURLProtectionSpace alloc() { + final _ret = _objc_msgSend_40(_class_NSURLProtectionSpace, _sel_alloc); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSCachedURLResponse1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLProtectionSpace, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSCachedURLResponse1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLProtectionSpace, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSCachedURLResponse1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLProtectionSpace, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSCachedURLResponse1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLProtectionSpace, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSCachedURLResponse1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLProtectionSpace, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSCachedURLResponse1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLProtectionSpace, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSCachedURLResponse1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLProtectionSpace, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLProtectionSpace, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLProtectionSpace, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSURLProtectionSpace = objc.getClass("NSURLProtectionSpace"); +late final _sel_initWithHost_port_protocol_realm_authenticationMethod_ = + objc.registerName("initWithHost:port:protocol:realm:authenticationMethod:"); +final _objc_msgSend_550 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithProxyHost_port_type_realm_authenticationMethod_ = objc + .registerName("initWithProxyHost:port:type:realm:authenticationMethod:"); +late final _sel_realm = objc.registerName("realm"); +late final _sel_receivesCredentialSecurely = + objc.registerName("receivesCredentialSecurely"); +late final _sel_isProxy = objc.registerName("isProxy"); +late final _sel_host = objc.registerName("host"); +late final _sel_proxyType = objc.registerName("proxyType"); +late final _sel_protocol = objc.registerName("protocol"); +late final _sel_authenticationMethod = + objc.registerName("authenticationMethod"); +late final _sel_distinguishedNames = objc.registerName("distinguishedNames"); +late final _sel_serverTrust = objc.registerName("serverTrust"); +final _objc_msgSend_551 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer<__SecTrust> Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer<__SecTrust> Function( + ffi.Pointer, ffi.Pointer)>(); + +class NSURLCredentialStorage extends objc.NSObject { + NSURLCredentialStorage._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLCredentialStorage] that points to the same underlying object as [other]. + NSURLCredentialStorage.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSURLCredentialStorage] that wraps the given raw object pointer. + NSURLCredentialStorage.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLCredentialStorage]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLCredentialStorage); + } + + static NSURLCredentialStorage getSharedCredentialStorage() { + final _ret = _objc_msgSend_552( + _class_NSURLCredentialStorage, _sel_sharedCredentialStorage); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: true, release: true); + } + + objc.NSDictionary? credentialsForProtectionSpace_( + NSURLProtectionSpace space) { + final _ret = _objc_msgSend_553( + this.pointer, _sel_credentialsForProtectionSpace_, space.pointer); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSCachedURLResponse1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSDictionary get allCredentials { + final _ret = _objc_msgSend_112(this.pointer, _sel_allCredentials); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSCachedURLResponse1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + void setCredential_forProtectionSpace_( + NSURLCredential credential, NSURLProtectionSpace space) { + _objc_msgSend_554(this.pointer, _sel_setCredential_forProtectionSpace_, + credential.pointer, space.pointer); } -} -abstract class NSURLCacheStoragePolicy { - static const int NSURLCacheStorageAllowed = 0; - static const int NSURLCacheStorageAllowedInMemoryOnly = 1; - static const int NSURLCacheStorageNotAllowed = 2; -} + void removeCredential_forProtectionSpace_( + NSURLCredential credential, NSURLProtectionSpace space) { + _objc_msgSend_554(this.pointer, _sel_removeCredential_forProtectionSpace_, + credential.pointer, space.pointer); + } -class NSURLSessionDataTask extends NSURLSessionTask { - NSURLSessionDataTask._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + void removeCredential_forProtectionSpace_options_(NSURLCredential credential, + NSURLProtectionSpace space, objc.NSDictionary? options) { + _objc_msgSend_555( + this.pointer, + _sel_removeCredential_forProtectionSpace_options_, + credential.pointer, + space.pointer, + options?.pointer ?? ffi.nullptr); + } - /// 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); + NSURLCredential? defaultCredentialForProtectionSpace_( + NSURLProtectionSpace space) { + final _ret = _objc_msgSend_556( + this.pointer, _sel_defaultCredentialForProtectionSpace_, space.pointer); + return _ret.address == 0 + ? null + : NSURLCredential.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSURLSessionDataTask] that wraps the given raw object pointer. - static NSURLSessionDataTask castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionDataTask._(other, lib, retain: retain, release: release); + void setDefaultCredential_forProtectionSpace_( + NSURLCredential credential, NSURLProtectionSpace space) { + _objc_msgSend_554( + this.pointer, + _sel_setDefaultCredential_forProtectionSpace_, + credential.pointer, + space.pointer); } - /// Returns whether [obj] is an instance of [NSURLSessionDataTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionDataTask1); + void getCredentialsForProtectionSpace_task_completionHandler_( + NSURLProtectionSpace protectionSpace, + NSURLSessionTask task, + ObjCBlock_ffiVoid_NSDictionary completionHandler) { + _objc_msgSend_557( + this.pointer, + _sel_getCredentialsForProtectionSpace_task_completionHandler_, + protectionSpace.pointer, + task.pointer, + completionHandler.pointer); + } + + void setCredential_forProtectionSpace_task_(NSURLCredential credential, + NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { + _objc_msgSend_558(this.pointer, _sel_setCredential_forProtectionSpace_task_, + credential.pointer, protectionSpace.pointer, task.pointer); + } + + void removeCredential_forProtectionSpace_options_task_( + NSURLCredential credential, + NSURLProtectionSpace protectionSpace, + objc.NSDictionary? options, + NSURLSessionTask task) { + _objc_msgSend_559( + this.pointer, + _sel_removeCredential_forProtectionSpace_options_task_, + credential.pointer, + protectionSpace.pointer, + options?.pointer ?? ffi.nullptr, + task.pointer); + } + + void getDefaultCredentialForProtectionSpace_task_completionHandler_( + NSURLProtectionSpace space, + NSURLSessionTask task, + ObjCBlock_ffiVoid_NSURLCredential completionHandler) { + _objc_msgSend_560( + this.pointer, + _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_, + space.pointer, + task.pointer, + completionHandler.pointer); + } + + void setDefaultCredential_forProtectionSpace_task_(NSURLCredential credential, + NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { + _objc_msgSend_558( + this.pointer, + _sel_setDefaultCredential_forProtectionSpace_task_, + credential.pointer, + protectionSpace.pointer, + task.pointer); } @override - NSURLSessionDataTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + NSURLCredentialStorage init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: true, release: true); } - static NSURLSessionDataTask new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionDataTask1, _lib._sel_new1); - return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); + static NSURLCredentialStorage new1() { + final _ret = _objc_msgSend_40(_class_NSURLCredentialStorage, _sel_new); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: false, release: true); } - static NSURLSessionDataTask allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLSessionDataTask1, _lib._sel_allocWithZone_1, zone); - return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); + static NSURLCredentialStorage allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLCredentialStorage, _sel_allocWithZone_, zone); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: false, release: true); } - static NSURLSessionDataTask alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionDataTask1, _lib._sel_alloc1); - return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); + static NSURLCredentialStorage alloc() { + final _ret = _objc_msgSend_40(_class_NSURLCredentialStorage, _sel_alloc); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLSessionDataTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLCredentialStorage, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLSessionDataTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLCredentialStorage, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLSessionDataTask1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLCredentialStorage, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLSessionDataTask1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSURLCredentialStorage, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLSessionDataTask1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLCredentialStorage, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLSessionDataTask1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLCredentialStorage, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLSessionDataTask1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLCredentialStorage, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLCredentialStorage, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLCredentialStorage, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSURLCredentialStorage = + objc.getClass("NSURLCredentialStorage"); +late final _sel_sharedCredentialStorage = + objc.registerName("sharedCredentialStorage"); +final _objc_msgSend_552 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_credentialsForProtectionSpace_ = + objc.registerName("credentialsForProtectionSpace:"); +final _objc_msgSend_553 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_allCredentials = objc.registerName("allCredentials"); +late final _sel_setCredential_forProtectionSpace_ = + objc.registerName("setCredential:forProtectionSpace:"); +final _objc_msgSend_554 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeCredential_forProtectionSpace_ = + objc.registerName("removeCredential:forProtectionSpace:"); +late final _sel_removeCredential_forProtectionSpace_options_ = + objc.registerName("removeCredential:forProtectionSpace:options:"); +final _objc_msgSend_555 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_defaultCredentialForProtectionSpace_ = + objc.registerName("defaultCredentialForProtectionSpace:"); +final _objc_msgSend_556 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDefaultCredential_forProtectionSpace_ = + objc.registerName("setDefaultCredential:forProtectionSpace:"); +void _ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSDictionary_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSDictionary_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSDictionary_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSDictionary_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSURLSessionDataTask1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSDictionary_closureRegistry[block.ref.target.address]!( + arg0); + +class ObjCBlock_ffiVoid_NSDictionary extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSDictionary._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionDataTask1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSDictionary castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSDictionary._(pointer, + retain: retain, release: release); } -} -void _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSDictionary.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSDictionary.fromFunction(void Function(objc.NSDictionary?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSDictionary.castFromPointer(arg0, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSDictionary.listener(void Function(objc.NSDictionary?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSDictionary.castFromPointer(arg0, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(objc.NSDictionary? arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr); +} + +late final _sel_getCredentialsForProtectionSpace_task_completionHandler_ = objc + .registerName("getCredentialsForProtectionSpace:task:completionHandler:"); +final _objc_msgSend_557 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_setCredential_forProtectionSpace_task_ = + objc.registerName("setCredential:forProtectionSpace:task:"); +final _objc_msgSend_558 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeCredential_forProtectionSpace_options_task_ = + objc.registerName("removeCredential:forProtectionSpace:options:task:"); +final _objc_msgSend_559 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSURLCredential_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => block.ref.target .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry[id] = fn; + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSURLCredential_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSURLCredential_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry[ +void _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry[ block.ref.target.address]!(arg0); -class ObjCBlock_ffiVoid_NSCachedURLResponse extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSCachedURLResponse._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, +class ObjCBlock_ffiVoid_NSURLCredential extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSURLCredential._(ffi.Pointer pointer, {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSCachedURLResponse castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSCachedURLResponse._(pointer, lib, + static ObjCBlock_ffiVoid_NSURLCredential castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSURLCredential._(pointer, retain: retain, release: release); } @@ -66579,21 +25831,18 @@ class ObjCBlock_ffiVoid_NSCachedURLResponse extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSCachedURLResponse.fromFunctionPointer( - SwiftLibrary lib, + ObjCBlock_ffiVoid_NSURLCredential.fromFunctionPointer( ffi.Pointer< - ffi - .NativeFunction arg0)>> + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLCredential_fnPtrTrampoline) + .cast(), + ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. @@ -66601,20 +25850,18 @@ class ObjCBlock_ffiVoid_NSCachedURLResponse extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSCachedURLResponse.fromFunction( - SwiftLibrary lib, void Function(NSCachedURLResponse?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSCachedURLResponse._(arg0, lib, retain: true, release: true)))), - lib); + ObjCBlock_ffiVoid_NSURLCredential.fromFunction( + void Function(NSURLCredential?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSURLCredential.castFromPointer(arg0, retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -66626,3352 +25873,4914 @@ class ObjCBlock_ffiVoid_NSCachedURLResponse extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSCachedURLResponse.listener( - SwiftLibrary lib, void Function(NSCachedURLResponse?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( - (ffi.Pointer arg0) => fn( - arg0.address == 0 ? null : NSCachedURLResponse._(arg0, lib, retain: true, release: true)))), - lib); + ObjCBlock_ffiVoid_NSURLCredential.listener(void Function(NSURLCredential?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSURLCredential.castFromPointer(arg0, retain: true, release: true))))); static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? _dartFuncListenerTrampoline; - void call(NSCachedURLResponse? arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); -} - -class NSURLConnection extends NSObject { - NSURLConnection._(ffi.Pointer id, SwiftLibrary lib, + void call(NSURLCredential? arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr); +} + +late final _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_ = + objc.registerName( + "getDefaultCredentialForProtectionSpace:task:completionHandler:"); +final _objc_msgSend_560 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_setDefaultCredential_forProtectionSpace_task_ = + objc.registerName("setDefaultCredential:forProtectionSpace:task:"); + +class NSURLProtocol extends objc.NSObject { + NSURLProtocol._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLConnection] that points to the same underlying object as [other]. - static NSURLConnection castFrom(T other) { - return NSURLConnection._(other._id, other._lib, - retain: true, release: true); - } + /// Constructs a [NSURLProtocol] that points to the same underlying object as [other]. + NSURLProtocol.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSURLConnection] that wraps the given raw object pointer. - static NSURLConnection castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLConnection._(other, lib, retain: retain, release: release); + /// Constructs a [NSURLProtocol] that wraps the given raw object pointer. + NSURLProtocol.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLProtocol]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLProtocol); } - /// Returns whether [obj] is an instance of [NSURLConnection]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLConnection1); + NSURLProtocol initWithRequest_cachedResponse_client_(NSURLRequest request, + NSCachedURLResponse? cachedResponse, objc.NSObject? client) { + final _ret = _objc_msgSend_561( + this.pointer, + _sel_initWithRequest_cachedResponse_client_, + request.pointer, + cachedResponse?.pointer ?? ffi.nullptr, + client?.pointer ?? ffi.nullptr); + return NSURLProtocol.castFromPointer(_ret, retain: true, release: true); } - NSURLConnection? initWithRequest_delegate_startImmediately_( - NSURLRequest request, NSObject? delegate, bool startImmediately) { - final _ret = _lib._objc_msgSend_985( - _id, - _lib._sel_initWithRequest_delegate_startImmediately_1, - request._id, - delegate?._id ?? ffi.nullptr, - startImmediately); + objc.NSObject? get client { + final _ret = _objc_msgSend_66(this.pointer, _sel_client); return _ret.address == 0 ? null - : NSURLConnection._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSURLConnection? initWithRequest_delegate_( - NSURLRequest request, NSObject? delegate) { - final _ret = _lib._objc_msgSend_986( - _id, - _lib._sel_initWithRequest_delegate_1, - request._id, - delegate?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURLConnection._(_ret, _lib, retain: true, release: true); + NSURLRequest get request { + final _ret = _objc_msgSend_537(this.pointer, _sel_request); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - static NSURLConnection? connectionWithRequest_delegate_( - SwiftLibrary _lib, NSURLRequest request, NSObject? delegate) { - final _ret = _lib._objc_msgSend_987( - _lib._class_NSURLConnection1, - _lib._sel_connectionWithRequest_delegate_1, - request._id, - delegate?._id ?? ffi.nullptr); + NSCachedURLResponse? get cachedResponse { + final _ret = _objc_msgSend_562(this.pointer, _sel_cachedResponse); return _ret.address == 0 ? null - : NSURLConnection._(_ret, _lib, retain: true, release: true); - } - - NSURLRequest get originalRequest { - final _ret = _lib._objc_msgSend_988(_id, _lib._sel_originalRequest1); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } - - NSURLRequest get currentRequest { - final _ret = _lib._objc_msgSend_988(_id, _lib._sel_currentRequest1); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } - - void start() { - _lib._objc_msgSend_1(_id, _lib._sel_start1); + : NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } - void cancel() { - _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + static bool canInitWithRequest_(NSURLRequest request) { + return _objc_msgSend_539( + _class_NSURLProtocol, _sel_canInitWithRequest_, request.pointer); } - void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _lib._objc_msgSend_569( - _id, _lib._sel_scheduleInRunLoop_forMode_1, aRunLoop._id, mode._id); + static NSURLRequest canonicalRequestForRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_563(_class_NSURLProtocol, + _sel_canonicalRequestForRequest_, request.pointer); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - void unscheduleFromRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _lib._objc_msgSend_569( - _id, _lib._sel_unscheduleFromRunLoop_forMode_1, aRunLoop._id, mode._id); + static bool requestIsCacheEquivalent_toRequest_( + NSURLRequest a, NSURLRequest b) { + return _objc_msgSend_564(_class_NSURLProtocol, + _sel_requestIsCacheEquivalent_toRequest_, a.pointer, b.pointer); } - void setDelegateQueue_(NSOperationQueue? queue) { - _lib._objc_msgSend_989( - _id, _lib._sel_setDelegateQueue_1, queue?._id ?? ffi.nullptr); + void startLoading() { + _objc_msgSend_82(this.pointer, _sel_startLoading); } - static bool canHandleRequest_(SwiftLibrary _lib, NSURLRequest request) { - return _lib._objc_msgSend_990(_lib._class_NSURLConnection1, - _lib._sel_canHandleRequest_1, request._id); + void stopLoading() { + _objc_msgSend_82(this.pointer, _sel_stopLoading); } - static NSData? sendSynchronousRequest_returningResponse_error_( - SwiftLibrary _lib, - NSURLRequest request, - ffi.Pointer> response, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_991( - _lib._class_NSURLConnection1, - _lib._sel_sendSynchronousRequest_returningResponse_error_1, - request._id, - response, - error); + static objc.NSObject? propertyForKey_inRequest_( + objc.NSString key, NSURLRequest request) { + final _ret = _objc_msgSend_565(_class_NSURLProtocol, + _sel_propertyForKey_inRequest_, key.pointer, request.pointer); return _ret.address == 0 ? null - : NSData._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void sendAsynchronousRequest_queue_completionHandler_( - SwiftLibrary _lib, - NSURLRequest request, - NSOperationQueue queue, - ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError handler) { - _lib._objc_msgSend_992( - _lib._class_NSURLConnection1, - _lib._sel_sendAsynchronousRequest_queue_completionHandler_1, - request._id, - queue._id, - handler._id); + static void setProperty_forKey_inRequest_( + objc.NSObject value, objc.NSString key, NSMutableURLRequest request) { + _objc_msgSend_573(_class_NSURLProtocol, _sel_setProperty_forKey_inRequest_, + value.pointer, key.pointer, request.pointer); } - @override - NSURLConnection init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLConnection._(_ret, _lib, retain: true, release: true); + static void removePropertyForKey_inRequest_( + objc.NSString key, NSMutableURLRequest request) { + _objc_msgSend_574(_class_NSURLProtocol, + _sel_removePropertyForKey_inRequest_, key.pointer, request.pointer); } - static NSURLConnection new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLConnection1, _lib._sel_new1); - return NSURLConnection._(_ret, _lib, retain: false, release: true); + static bool registerClass_(objc.NSObject protocolClass) { + return _objc_msgSend_0( + _class_NSURLProtocol, _sel_registerClass_, protocolClass.pointer); } - static NSURLConnection allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLConnection1, _lib._sel_allocWithZone_1, zone); - return NSURLConnection._(_ret, _lib, retain: false, release: true); + static void unregisterClass_(objc.NSObject protocolClass) { + _objc_msgSend_49( + _class_NSURLProtocol, _sel_unregisterClass_, protocolClass.pointer); } - static NSURLConnection alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLConnection1, _lib._sel_alloc1); - return NSURLConnection._(_ret, _lib, retain: false, release: true); + static bool canInitWithTask_(NSURLSessionTask task) { + return _objc_msgSend_575( + _class_NSURLProtocol, _sel_canInitWithTask_, task.pointer); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLConnection1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + NSURLProtocol initWithTask_cachedResponse_client_(NSURLSessionTask task, + NSCachedURLResponse? cachedResponse, objc.NSObject? client) { + final _ret = _objc_msgSend_576( + this.pointer, + _sel_initWithTask_cachedResponse_client_, + task.pointer, + cachedResponse?.pointer ?? ffi.nullptr, + client?.pointer ?? ffi.nullptr); + return NSURLProtocol.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLConnection1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + NSURLSessionTask? get task { + final _ret = _objc_msgSend_577(this.pointer, _sel_task); + return _ret.address == 0 + ? null + : NSURLSessionTask.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLConnection1, - _lib._sel_accessInstanceVariablesDirectly1); + @override + NSURLProtocol init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLProtocol.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLConnection1, _lib._sel_useStoredAccessor1); + static NSURLProtocol new1() { + final _ret = _objc_msgSend_40(_class_NSURLProtocol, _sel_new); + return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLConnection1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static NSURLProtocol allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLProtocol, _sel_allocWithZone_, zone); + return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLConnection1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static NSURLProtocol alloc() { + final _ret = _objc_msgSend_40(_class_NSURLProtocol, _sel_alloc); + return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLConnection1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLProtocol, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSURLConnection1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLProtocol, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLConnection1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLProtocol, _sel_accessInstanceVariablesDirectly); } -} - -void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLProtocol, _sel_useStoredAccessor); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError._(pointer, lib, - retain: retain, release: release); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLProtocol, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLProtocol, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.fromFunction( - SwiftLibrary lib, void Function(NSURLResponse?, NSData?, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : NSURLResponse._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSData._(arg1, lib, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLProtocol, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLProtocol, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLProtocol, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSURLProtocol = objc.getClass("NSURLProtocol"); +late final _sel_initWithRequest_cachedResponse_client_ = + objc.registerName("initWithRequest:cachedResponse:client:"); +final _objc_msgSend_561 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_client = objc.registerName("client"); +late final _sel_request = objc.registerName("request"); +late final _sel_cachedResponse = objc.registerName("cachedResponse"); +final _objc_msgSend_562 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_canInitWithRequest_ = objc.registerName("canInitWithRequest:"); +late final _sel_canonicalRequestForRequest_ = + objc.registerName("canonicalRequestForRequest:"); +final _objc_msgSend_563 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_requestIsCacheEquivalent_toRequest_ = + objc.registerName("requestIsCacheEquivalent:toRequest:"); +final _objc_msgSend_564 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_startLoading = objc.registerName("startLoading"); +late final _sel_stopLoading = objc.registerName("stopLoading"); +late final _sel_propertyForKey_inRequest_ = + objc.registerName("propertyForKey:inRequest:"); +final _objc_msgSend_565 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.listener( - SwiftLibrary lib, void Function(NSURLResponse?, NSData?, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : NSURLResponse._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSData._(arg1, lib, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; +class NSMutableURLRequest extends NSURLRequest { + NSMutableURLRequest._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - void call(NSURLResponse? arg0, NSData? arg1, NSError? arg2) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>()( - _id, - arg0?._id ?? ffi.nullptr, - arg1?._id ?? ffi.nullptr, - arg2?._id ?? ffi.nullptr); -} + /// Constructs a [NSMutableURLRequest] that points to the same underlying object as [other]. + NSMutableURLRequest.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); -class NSURLCredential extends NSObject { - NSURLCredential._(ffi.Pointer id, SwiftLibrary lib, + /// Constructs a [NSMutableURLRequest] that wraps the given raw object pointer. + NSMutableURLRequest.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : this._(other, retain: retain, release: release); - /// Returns a [NSURLCredential] that points to the same underlying object as [other]. - static NSURLCredential castFrom(T other) { - return NSURLCredential._(other._id, other._lib, - retain: true, release: true); + /// Returns whether [obj] is an instance of [NSMutableURLRequest]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMutableURLRequest); } - /// Returns a [NSURLCredential] that wraps the given raw object pointer. - static NSURLCredential castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLCredential._(other, lib, retain: retain, release: release); + @override + objc.NSURL? get URL { + final _ret = _objc_msgSend_10(this.pointer, _sel_URL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSURLCredential]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLCredential1); + set URL(objc.NSURL? value) { + return _objc_msgSend_566( + this.pointer, _sel_setURL_, value?.pointer ?? ffi.nullptr); } - int get persistence { - return _lib._objc_msgSend_993(_id, _lib._sel_persistence1); + @override + int get cachePolicy { + return _objc_msgSend_322(this.pointer, _sel_cachePolicy); } - NSURLCredential initWithUser_password_persistence_( - NSString user, NSString password, int persistence) { - final _ret = _lib._objc_msgSend_994( - _id, - _lib._sel_initWithUser_password_persistence_1, - user._id, - password._id, - persistence); - return NSURLCredential._(_ret, _lib, retain: true, release: true); + set cachePolicy(int value) { + return _objc_msgSend_567(this.pointer, _sel_setCachePolicy_, value); } - static NSURLCredential credentialWithUser_password_persistence_( - SwiftLibrary _lib, NSString user, NSString password, int persistence) { - final _ret = _lib._objc_msgSend_995( - _lib._class_NSURLCredential1, - _lib._sel_credentialWithUser_password_persistence_1, - user._id, - password._id, - persistence); - return NSURLCredential._(_ret, _lib, retain: true, release: true); + @override + double get timeoutInterval { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_timeoutInterval) + : _objc_msgSend_115(this.pointer, _sel_timeoutInterval); } - NSString? get user { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_user1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + set timeoutInterval(double value) { + return _objc_msgSend_212(this.pointer, _sel_setTimeoutInterval_, value); } - NSString? get password { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_password1); + @override + objc.NSURL? get mainDocumentURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_mainDocumentURL); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - bool get hasPassword { - return _lib._objc_msgSend_12(_id, _lib._sel_hasPassword1); - } - - NSURLCredential initWithIdentity_certificates_persistence_( - ffi.Pointer<__SecIdentity> identity, - NSArray? certArray, - int persistence) { - final _ret = _lib._objc_msgSend_996( - _id, - _lib._sel_initWithIdentity_certificates_persistence_1, - identity, - certArray?._id ?? ffi.nullptr, - persistence); - return NSURLCredential._(_ret, _lib, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - static NSURLCredential credentialWithIdentity_certificates_persistence_( - SwiftLibrary _lib, - ffi.Pointer<__SecIdentity> identity, - NSArray? certArray, - int persistence) { - final _ret = _lib._objc_msgSend_997( - _lib._class_NSURLCredential1, - _lib._sel_credentialWithIdentity_certificates_persistence_1, - identity, - certArray?._id ?? ffi.nullptr, - persistence); - return NSURLCredential._(_ret, _lib, retain: true, release: true); + set mainDocumentURL(objc.NSURL? value) { + return _objc_msgSend_566( + this.pointer, _sel_setMainDocumentURL_, value?.pointer ?? ffi.nullptr); } - ffi.Pointer<__SecIdentity> get identity { - return _lib._objc_msgSend_998(_id, _lib._sel_identity1); + @override + int get networkServiceType { + return _objc_msgSend_323(this.pointer, _sel_networkServiceType); } - NSArray get certificates { - final _ret = _lib._objc_msgSend_85(_id, _lib._sel_certificates1); - return NSArray._(_ret, _lib, retain: true, release: true); + set networkServiceType(int value) { + return _objc_msgSend_568(this.pointer, _sel_setNetworkServiceType_, value); } - NSURLCredential initWithTrust_(ffi.Pointer<__SecTrust> trust) { - final _ret = _lib._objc_msgSend_999(_id, _lib._sel_initWithTrust_1, trust); - return NSURLCredential._(_ret, _lib, retain: true, release: true); + @override + bool get allowsCellularAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsCellularAccess); } - static NSURLCredential credentialForTrust_( - SwiftLibrary _lib, ffi.Pointer<__SecTrust> trust) { - final _ret = _lib._objc_msgSend_1000( - _lib._class_NSURLCredential1, _lib._sel_credentialForTrust_1, trust); - return NSURLCredential._(_ret, _lib, retain: true, release: true); + set allowsCellularAccess(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setAllowsCellularAccess_, value); } @override - NSURLCredential init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLCredential._(_ret, _lib, retain: true, release: true); + bool get allowsExpensiveNetworkAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsExpensiveNetworkAccess); } - static NSURLCredential new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLCredential1, _lib._sel_new1); - return NSURLCredential._(_ret, _lib, retain: false, release: true); + set allowsExpensiveNetworkAccess(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); } - static NSURLCredential allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLCredential1, _lib._sel_allocWithZone_1, zone); - return NSURLCredential._(_ret, _lib, retain: false, release: true); + @override + bool get allowsConstrainedNetworkAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsConstrainedNetworkAccess); } - static NSURLCredential alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLCredential1, _lib._sel_alloc1); - return NSURLCredential._(_ret, _lib, retain: false, release: true); + set allowsConstrainedNetworkAccess(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLCredential1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + @override + bool get assumesHTTP3Capable { + return _objc_msgSend_7(this.pointer, _sel_assumesHTTP3Capable); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLCredential1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + set assumesHTTP3Capable(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setAssumesHTTP3Capable_, value); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLCredential1, - _lib._sel_accessInstanceVariablesDirectly1); + @override + int get attribution { + return _objc_msgSend_324(this.pointer, _sel_attribution); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLCredential1, _lib._sel_useStoredAccessor1); + set attribution(int value) { + return _objc_msgSend_569(this.pointer, _sel_setAttribution_, value); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLCredential1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + @override + bool get requiresDNSSECValidation { + return _objc_msgSend_7(this.pointer, _sel_requiresDNSSECValidation); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLCredential1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + set requiresDNSSECValidation(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setRequiresDNSSECValidation_, value); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLCredential1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSString get HTTPMethod { + final _ret = _objc_msgSend_12(this.pointer, _sel_HTTPMethod); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSURLCredential1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + set HTTPMethod(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setHTTPMethod_, value.pointer); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLCredential1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + @override + objc.NSDictionary? get allHTTPHeaderFields { + final _ret = _objc_msgSend_65(this.pointer, _sel_allHTTPHeaderFields); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } -} -abstract class NSURLCredentialPersistence { - static const int NSURLCredentialPersistenceNone = 0; - static const int NSURLCredentialPersistenceForSession = 1; - static const int NSURLCredentialPersistencePermanent = 2; - static const int NSURLCredentialPersistenceSynchronizable = 3; -} - -final class __SecIdentity extends ffi.Opaque {} - -final class __SecTrust extends ffi.Opaque {} - -class NSURLProtectionSpace extends NSObject { - NSURLProtectionSpace._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLProtectionSpace] that points to the same underlying object as [other]. - static NSURLProtectionSpace castFrom(T other) { - return NSURLProtectionSpace._(other._id, other._lib, - retain: true, release: true); + set allHTTPHeaderFields(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setAllHTTPHeaderFields_, + value?.pointer ?? ffi.nullptr); } - /// Returns a [NSURLProtectionSpace] that wraps the given raw object pointer. - static NSURLProtectionSpace castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLProtectionSpace._(other, lib, retain: retain, release: release); + void setValue_forHTTPHeaderField_(objc.NSString? value, objc.NSString field) { + _objc_msgSend_570(this.pointer, _sel_setValue_forHTTPHeaderField_, + value?.pointer ?? ffi.nullptr, field.pointer); } - /// Returns whether [obj] is an instance of [NSURLProtectionSpace]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLProtectionSpace1); + void addValue_forHTTPHeaderField_(objc.NSString value, objc.NSString field) { + _objc_msgSend_201(this.pointer, _sel_addValue_forHTTPHeaderField_, + value.pointer, field.pointer); } - NSURLProtectionSpace initWithHost_port_protocol_realm_authenticationMethod_( - NSString host, - int port, - NSString? protocol, - NSString? realm, - NSString? authenticationMethod) { - final _ret = _lib._objc_msgSend_1001( - _id, - _lib._sel_initWithHost_port_protocol_realm_authenticationMethod_1, - host._id, - port, - protocol?._id ?? ffi.nullptr, - realm?._id ?? ffi.nullptr, - authenticationMethod?._id ?? ffi.nullptr); - return NSURLProtectionSpace._(_ret, _lib, retain: true, release: true); + @override + objc.NSData? get HTTPBody { + final _ret = _objc_msgSend_325(this.pointer, _sel_HTTPBody); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - NSURLProtectionSpace initWithProxyHost_port_type_realm_authenticationMethod_( - NSString host, - int port, - NSString? type, - NSString? realm, - NSString? authenticationMethod) { - final _ret = _lib._objc_msgSend_1001( - _id, - _lib._sel_initWithProxyHost_port_type_realm_authenticationMethod_1, - host._id, - port, - type?._id ?? ffi.nullptr, - realm?._id ?? ffi.nullptr, - authenticationMethod?._id ?? ffi.nullptr); - return NSURLProtectionSpace._(_ret, _lib, retain: true, release: true); + set HTTPBody(objc.NSData? value) { + return _objc_msgSend_571( + this.pointer, _sel_setHTTPBody_, value?.pointer ?? ffi.nullptr); } - NSString? get realm { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_realm1); + @override + NSInputStream? get HTTPBodyStream { + final _ret = _objc_msgSend_342(this.pointer, _sel_HTTPBodyStream); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSInputStream.castFromPointer(_ret, retain: true, release: true); } - bool get receivesCredentialSecurely { - return _lib._objc_msgSend_12(_id, _lib._sel_receivesCredentialSecurely1); + set HTTPBodyStream(NSInputStream? value) { + return _objc_msgSend_572( + this.pointer, _sel_setHTTPBodyStream_, value?.pointer ?? ffi.nullptr); + } + + @override + bool get HTTPShouldHandleCookies { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldHandleCookies); } - bool get isProxy { - return _lib._objc_msgSend_12(_id, _lib._sel_isProxy1); + set HTTPShouldHandleCookies(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setHTTPShouldHandleCookies_, value); } - NSString get host { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_host1); - return NSString._(_ret, _lib, retain: true, release: true); + @override + bool get HTTPShouldUsePipelining { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldUsePipelining); } - int get port { - return _lib._objc_msgSend_83(_id, _lib._sel_port1); + set HTTPShouldUsePipelining(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setHTTPShouldUsePipelining_, value); } - NSString? get proxyType { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_proxyType1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static NSMutableURLRequest requestWithURL_(objc.NSURL URL) { + final _ret = _objc_msgSend_320( + _class_NSMutableURLRequest, _sel_requestWithURL_, URL.pointer); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); } - NSString? get protocol { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_protocol1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static bool getSupportsSecureCoding() { + return _objc_msgSend_7( + _class_NSMutableURLRequest, _sel_supportsSecureCoding); } - NSString get authenticationMethod { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_authenticationMethod1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( + objc.NSURL URL, int cachePolicy, double timeoutInterval) { + final _ret = _objc_msgSend_321( + _class_NSMutableURLRequest, + _sel_requestWithURL_cachePolicy_timeoutInterval_, + URL.pointer, + cachePolicy, + timeoutInterval); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); } - NSArray? get distinguishedNames { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_distinguishedNames1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + @override + NSMutableURLRequest initWithURL_(objc.NSURL URL) { + final _ret = + _objc_msgSend_320(this.pointer, _sel_initWithURL_, URL.pointer); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); } - ffi.Pointer<__SecTrust> get serverTrust { - return _lib._objc_msgSend_1002(_id, _lib._sel_serverTrust1); + @override + NSMutableURLRequest initWithURL_cachePolicy_timeoutInterval_( + objc.NSURL URL, int cachePolicy, double timeoutInterval) { + final _ret = _objc_msgSend_321( + this.pointer, + _sel_initWithURL_cachePolicy_timeoutInterval_, + URL.pointer, + cachePolicy, + timeoutInterval); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); } @override - NSURLProtectionSpace init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLProtectionSpace._(_ret, _lib, retain: true, release: true); + NSMutableURLRequest init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); } - static NSURLProtectionSpace new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLProtectionSpace1, _lib._sel_new1); - return NSURLProtectionSpace._(_ret, _lib, retain: false, release: true); + static NSMutableURLRequest new1() { + final _ret = _objc_msgSend_40(_class_NSMutableURLRequest, _sel_new); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); } - static NSURLProtectionSpace allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLProtectionSpace1, _lib._sel_allocWithZone_1, zone); - return NSURLProtectionSpace._(_ret, _lib, retain: false, release: true); + static NSMutableURLRequest allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSMutableURLRequest, _sel_allocWithZone_, zone); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); } - static NSURLProtectionSpace alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLProtectionSpace1, _lib._sel_alloc1); - return NSURLProtectionSpace._(_ret, _lib, retain: false, release: true); + static NSMutableURLRequest alloc() { + final _ret = _objc_msgSend_40(_class_NSMutableURLRequest, _sel_alloc); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLProtectionSpace1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSMutableURLRequest, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLProtectionSpace1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSMutableURLRequest, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLProtectionSpace1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSMutableURLRequest, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLProtectionSpace1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSMutableURLRequest, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLProtectionSpace1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSMutableURLRequest, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLProtectionSpace1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSMutableURLRequest, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLProtectionSpace1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSMutableURLRequest, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSMutableURLRequest, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSMutableURLRequest, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSMutableURLRequest = objc.getClass("NSMutableURLRequest"); +late final _sel_setURL_ = objc.registerName("setURL:"); +final _objc_msgSend_566 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCachePolicy_ = objc.registerName("setCachePolicy:"); +final _objc_msgSend_567 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setTimeoutInterval_ = objc.registerName("setTimeoutInterval:"); +late final _sel_setMainDocumentURL_ = objc.registerName("setMainDocumentURL:"); +late final _sel_setNetworkServiceType_ = + objc.registerName("setNetworkServiceType:"); +final _objc_msgSend_568 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setAllowsCellularAccess_ = + objc.registerName("setAllowsCellularAccess:"); +late final _sel_setAllowsExpensiveNetworkAccess_ = + objc.registerName("setAllowsExpensiveNetworkAccess:"); +late final _sel_setAllowsConstrainedNetworkAccess_ = + objc.registerName("setAllowsConstrainedNetworkAccess:"); +late final _sel_setAssumesHTTP3Capable_ = + objc.registerName("setAssumesHTTP3Capable:"); +late final _sel_setAttribution_ = objc.registerName("setAttribution:"); +final _objc_msgSend_569 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setRequiresDNSSECValidation_ = + objc.registerName("setRequiresDNSSECValidation:"); +late final _sel_setHTTPMethod_ = objc.registerName("setHTTPMethod:"); +late final _sel_setAllHTTPHeaderFields_ = + objc.registerName("setAllHTTPHeaderFields:"); +late final _sel_setValue_forHTTPHeaderField_ = + objc.registerName("setValue:forHTTPHeaderField:"); +final _objc_msgSend_570 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_addValue_forHTTPHeaderField_ = + objc.registerName("addValue:forHTTPHeaderField:"); +late final _sel_setHTTPBody_ = objc.registerName("setHTTPBody:"); +final _objc_msgSend_571 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setHTTPBodyStream_ = objc.registerName("setHTTPBodyStream:"); +final _objc_msgSend_572 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setHTTPShouldHandleCookies_ = + objc.registerName("setHTTPShouldHandleCookies:"); +late final _sel_setHTTPShouldUsePipelining_ = + objc.registerName("setHTTPShouldUsePipelining:"); +late final _sel_setProperty_forKey_inRequest_ = + objc.registerName("setProperty:forKey:inRequest:"); +final _objc_msgSend_573 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removePropertyForKey_inRequest_ = + objc.registerName("removePropertyForKey:inRequest:"); +final _objc_msgSend_574 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_registerClass_ = objc.registerName("registerClass:"); +late final _sel_unregisterClass_ = objc.registerName("unregisterClass:"); +late final _sel_canInitWithTask_ = objc.registerName("canInitWithTask:"); +final _objc_msgSend_575 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithTask_cachedResponse_client_ = + objc.registerName("initWithTask:cachedResponse:client:"); +final _objc_msgSend_576 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_task = objc.registerName("task"); +final _objc_msgSend_577 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + +class NSXMLParser extends objc.NSObject { + NSXMLParser._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSXMLParser] that points to the same underlying object as [other]. + NSXMLParser.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSXMLParser] that wraps the given raw object pointer. + NSXMLParser.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSXMLParser]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSXMLParser); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSURLProtectionSpace1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + NSXMLParser? initWithContentsOfURL_(objc.NSURL url) { + final _ret = + _objc_msgSend_3(this.pointer, _sel_initWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSXMLParser.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLProtectionSpace1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + NSXMLParser initWithData_(objc.NSData data) { + final _ret = + _objc_msgSend_340(this.pointer, _sel_initWithData_, data.pointer); + return NSXMLParser.castFromPointer(_ret, retain: true, release: true); } -} -class NSURLCredentialStorage extends NSObject { - NSURLCredentialStorage._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + NSXMLParser initWithStream_(NSInputStream stream) { + final _ret = + _objc_msgSend_578(this.pointer, _sel_initWithStream_, stream.pointer); + return NSXMLParser.castFromPointer(_ret, retain: true, release: true); + } - /// 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); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSURLCredentialStorage] that wraps the given raw object pointer. - static NSURLCredentialStorage castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLCredentialStorage._(other, lib, - retain: retain, release: release); + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } - /// 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); + bool get shouldProcessNamespaces { + return _objc_msgSend_7(this.pointer, _sel_shouldProcessNamespaces); } - static NSURLCredentialStorage getSharedCredentialStorage(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_1003(_lib._class_NSURLCredentialStorage1, - _lib._sel_sharedCredentialStorage1); - return NSURLCredentialStorage._(_ret, _lib, retain: true, release: true); + set shouldProcessNamespaces(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setShouldProcessNamespaces_, value); } - NSDictionary? credentialsForProtectionSpace_(NSURLProtectionSpace space) { - final _ret = _lib._objc_msgSend_1004( - _id, _lib._sel_credentialsForProtectionSpace_1, space._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + bool get shouldReportNamespacePrefixes { + return _objc_msgSend_7(this.pointer, _sel_shouldReportNamespacePrefixes); } - NSDictionary get allCredentials { - final _ret = _lib._objc_msgSend_181(_id, _lib._sel_allCredentials1); - return NSDictionary._(_ret, _lib, retain: true, release: true); + set shouldReportNamespacePrefixes(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setShouldReportNamespacePrefixes_, value); } - void setCredential_forProtectionSpace_( - NSURLCredential credential, NSURLProtectionSpace space) { - _lib._objc_msgSend_1005(_id, _lib._sel_setCredential_forProtectionSpace_1, - credential._id, space._id); + int get externalEntityResolvingPolicy { + return _objc_msgSend_579(this.pointer, _sel_externalEntityResolvingPolicy); } - void removeCredential_forProtectionSpace_( - NSURLCredential credential, NSURLProtectionSpace space) { - _lib._objc_msgSend_1005( - _id, - _lib._sel_removeCredential_forProtectionSpace_1, - credential._id, - space._id); + set externalEntityResolvingPolicy(int value) { + return _objc_msgSend_580( + this.pointer, _sel_setExternalEntityResolvingPolicy_, value); } - void removeCredential_forProtectionSpace_options_(NSURLCredential credential, - NSURLProtectionSpace space, NSDictionary? options) { - _lib._objc_msgSend_1006( - _id, - _lib._sel_removeCredential_forProtectionSpace_options_1, - credential._id, - space._id, - options?._id ?? ffi.nullptr); + objc.NSSet? get allowedExternalEntityURLs { + final _ret = + _objc_msgSend_581(this.pointer, _sel_allowedExternalEntityURLs); + return _ret.address == 0 + ? null + : objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSURLCredential? defaultCredentialForProtectionSpace_( - NSURLProtectionSpace space) { - final _ret = _lib._objc_msgSend_1007( - _id, _lib._sel_defaultCredentialForProtectionSpace_1, space._id); + set allowedExternalEntityURLs(objc.NSSet? value) { + return _objc_msgSend_582(this.pointer, _sel_setAllowedExternalEntityURLs_, + value?.pointer ?? ffi.nullptr); + } + + bool parse() { + return _objc_msgSend_7(this.pointer, _sel_parse); + } + + void abortParsing() { + _objc_msgSend_82(this.pointer, _sel_abortParsing); + } + + objc.NSError? get parserError { + final _ret = _objc_msgSend_328(this.pointer, _sel_parserError); return _ret.address == 0 ? null - : NSURLCredential._(_ret, _lib, retain: true, release: true); + : objc.NSError.castFromPointer(_ret, retain: true, release: true); } - void setDefaultCredential_forProtectionSpace_( - NSURLCredential credential, NSURLProtectionSpace space) { - _lib._objc_msgSend_1005( - _id, - _lib._sel_setDefaultCredential_forProtectionSpace_1, - credential._id, - space._id); + bool get shouldResolveExternalEntities { + return _objc_msgSend_7(this.pointer, _sel_shouldResolveExternalEntities); } - void getCredentialsForProtectionSpace_task_completionHandler_( - NSURLProtectionSpace protectionSpace, - NSURLSessionTask task, - ObjCBlock_ffiVoid_NSDictionary completionHandler) { - _lib._objc_msgSend_1008( - _id, - _lib._sel_getCredentialsForProtectionSpace_task_completionHandler_1, - protectionSpace._id, - task._id, - completionHandler._id); + set shouldResolveExternalEntities(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setShouldResolveExternalEntities_, value); } - void setCredential_forProtectionSpace_task_(NSURLCredential credential, - NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { - _lib._objc_msgSend_1009( - _id, - _lib._sel_setCredential_forProtectionSpace_task_1, - credential._id, - protectionSpace._id, - task._id); + objc.NSString? get publicID { + final _ret = _objc_msgSend_13(this.pointer, _sel_publicID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void removeCredential_forProtectionSpace_options_task_( - NSURLCredential credential, - NSURLProtectionSpace protectionSpace, - NSDictionary? options, - NSURLSessionTask task) { - _lib._objc_msgSend_1010( - _id, - _lib._sel_removeCredential_forProtectionSpace_options_task_1, - credential._id, - protectionSpace._id, - options?._id ?? ffi.nullptr, - task._id); + objc.NSString? get systemID { + final _ret = _objc_msgSend_13(this.pointer, _sel_systemID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void getDefaultCredentialForProtectionSpace_task_completionHandler_( - NSURLProtectionSpace space, - NSURLSessionTask task, - ObjCBlock_ffiVoid_NSURLCredential completionHandler) { - _lib._objc_msgSend_1011( - _id, - _lib._sel_getDefaultCredentialForProtectionSpace_task_completionHandler_1, - space._id, - task._id, - completionHandler._id); + int get lineNumber { + return _objc_msgSend_114(this.pointer, _sel_lineNumber); } - void setDefaultCredential_forProtectionSpace_task_(NSURLCredential credential, - NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { - _lib._objc_msgSend_1009( - _id, - _lib._sel_setDefaultCredential_forProtectionSpace_task_1, - credential._id, - protectionSpace._id, - task._id); + int get columnNumber { + return _objc_msgSend_114(this.pointer, _sel_columnNumber); } @override - NSURLCredentialStorage init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLCredentialStorage._(_ret, _lib, retain: true, release: true); + NSXMLParser init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLParser.castFromPointer(_ret, retain: true, release: true); } - static NSURLCredentialStorage new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLCredentialStorage1, _lib._sel_new1); - return NSURLCredentialStorage._(_ret, _lib, retain: false, release: true); + static NSXMLParser new1() { + final _ret = _objc_msgSend_40(_class_NSXMLParser, _sel_new); + return NSXMLParser.castFromPointer(_ret, retain: false, release: true); } - static NSURLCredentialStorage allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLCredentialStorage1, _lib._sel_allocWithZone_1, zone); - return NSURLCredentialStorage._(_ret, _lib, retain: false, release: true); + static NSXMLParser allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSXMLParser, _sel_allocWithZone_, zone); + return NSXMLParser.castFromPointer(_ret, retain: false, release: true); } - static NSURLCredentialStorage alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLCredentialStorage1, _lib._sel_alloc1); - return NSURLCredentialStorage._(_ret, _lib, retain: false, release: true); + static NSXMLParser alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLParser, _sel_alloc); + return NSXMLParser.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLCredentialStorage1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLParser, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLCredentialStorage1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLParser, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLCredentialStorage1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSXMLParser, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLCredentialStorage1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSXMLParser, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLCredentialStorage1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLParser, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLCredentialStorage1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLParser, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLCredentialStorage1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLParser, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSXMLParser, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSXMLParser, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSXMLParser = objc.getClass("NSXMLParser"); +late final _sel_initWithContentsOfURL_ = + objc.registerName("initWithContentsOfURL:"); +late final _sel_initWithStream_ = objc.registerName("initWithStream:"); +final _objc_msgSend_578 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_shouldProcessNamespaces = + objc.registerName("shouldProcessNamespaces"); +late final _sel_setShouldProcessNamespaces_ = + objc.registerName("setShouldProcessNamespaces:"); +late final _sel_shouldReportNamespacePrefixes = + objc.registerName("shouldReportNamespacePrefixes"); +late final _sel_setShouldReportNamespacePrefixes_ = + objc.registerName("setShouldReportNamespacePrefixes:"); - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSURLCredentialStorage1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLCredentialStorage1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +abstract class NSXMLParserExternalEntityResolvingPolicy { + static const int NSXMLParserResolveExternalEntitiesNever = 0; + static const int NSXMLParserResolveExternalEntitiesNoNetwork = 1; + static const int NSXMLParserResolveExternalEntitiesSameOriginOnly = 2; + static const int NSXMLParserResolveExternalEntitiesAlways = 3; } -void _ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSDictionary_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSDictionary_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSDictionary_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSDictionary_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +late final _sel_externalEntityResolvingPolicy = + objc.registerName("externalEntityResolvingPolicy"); +final _objc_msgSend_579 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setExternalEntityResolvingPolicy_ = + objc.registerName("setExternalEntityResolvingPolicy:"); +final _objc_msgSend_580 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_allowedExternalEntityURLs = + objc.registerName("allowedExternalEntityURLs"); +final _objc_msgSend_581 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setAllowedExternalEntityURLs_ = + objc.registerName("setAllowedExternalEntityURLs:"); +final _objc_msgSend_582 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_parse = objc.registerName("parse"); +late final _sel_abortParsing = objc.registerName("abortParsing"); +late final _sel_parserError = objc.registerName("parserError"); +late final _sel_shouldResolveExternalEntities = + objc.registerName("shouldResolveExternalEntities"); +late final _sel_setShouldResolveExternalEntities_ = + objc.registerName("setShouldResolveExternalEntities:"); +late final _sel_publicID = objc.registerName("publicID"); +late final _sel_systemID = objc.registerName("systemID"); +late final _sel_lineNumber = objc.registerName("lineNumber"); +late final _sel_columnNumber = objc.registerName("columnNumber"); + +class NSFileWrapper extends objc.NSObject { + NSFileWrapper._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); -void _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSDictionary_closureRegistry[block.ref.target.address]!( - arg0); + /// Constructs a [NSFileWrapper] that points to the same underlying object as [other]. + NSFileWrapper.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); -class ObjCBlock_ffiVoid_NSDictionary extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSDictionary._(ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + /// Constructs a [NSFileWrapper] that wraps the given raw object pointer. + NSFileWrapper.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSDictionary castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSDictionary._(pointer, lib, - retain: retain, release: release); + /// Returns whether [obj] is an instance of [NSFileWrapper]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSFileWrapper); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSDictionary.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi - .NativeFunction arg0)>> - ptr) - : this._( - lib - ._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + NSFileWrapper? initWithURL_options_error_(objc.NSURL url, int options, + ffi.Pointer> outError) { + final _ret = _objc_msgSend_583(this.pointer, + _sel_initWithURL_options_error_, url.pointer, options, outError); + return _ret.address == 0 + ? null + : NSFileWrapper.castFromPointer(_ret, retain: true, release: true); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSDictionary.fromFunction( - SwiftLibrary lib, void Function(NSDictionary?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSDictionary._(arg0, lib, - retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + NSFileWrapper initDirectoryWithFileWrappers_( + objc.NSDictionary childrenByPreferredName) { + final _ret = _objc_msgSend_409(this.pointer, + _sel_initDirectoryWithFileWrappers_, childrenByPreferredName.pointer); + return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSDictionary.listener( - SwiftLibrary lib, void Function(NSDictionary?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSDictionary._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; + NSFileWrapper initRegularFileWithContents_(objc.NSData contents) { + final _ret = _objc_msgSend_340( + this.pointer, _sel_initRegularFileWithContents_, contents.pointer); + return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); + } - void call(NSDictionary? arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); -} + NSFileWrapper initSymbolicLinkWithDestinationURL_(objc.NSURL url) { + final _ret = _objc_msgSend_320( + this.pointer, _sel_initSymbolicLinkWithDestinationURL_, url.pointer); + return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); + } -void _ObjCBlock_ffiVoid_NSURLCredential_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSURLCredential_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSURLCredential_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + NSFileWrapper? initWithSerializedRepresentation_( + objc.NSData serializeRepresentation) { + final _ret = _objc_msgSend_341( + this.pointer, + _sel_initWithSerializedRepresentation_, + serializeRepresentation.pointer); + return _ret.address == 0 + ? null + : NSFileWrapper.castFromPointer(_ret, retain: true, release: true); + } -void _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry[ - block.ref.target.address]!(arg0); + NSFileWrapper? initWithCoder_(objc.NSCoder inCoder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, inCoder.pointer); + return _ret.address == 0 + ? null + : NSFileWrapper.castFromPointer(_ret, retain: true, release: true); + } -class ObjCBlock_ffiVoid_NSURLCredential extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSURLCredential._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + bool get directory { + return _objc_msgSend_7(this.pointer, _sel_isDirectory); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSURLCredential castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSURLCredential._(pointer, lib, - retain: retain, release: release); + bool get regularFile { + return _objc_msgSend_7(this.pointer, _sel_isRegularFile); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURLCredential.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi - .NativeFunction arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLCredential_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + bool get symbolicLink { + return _objc_msgSend_7(this.pointer, _sel_isSymbolicLink); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURLCredential.fromFunction( - SwiftLibrary lib, void Function(NSURLCredential?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSURLCredential._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + objc.NSString? get preferredFilename { + final _ret = _objc_msgSend_13(this.pointer, _sel_preferredFilename); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSURLCredential.listener( - SwiftLibrary lib, void Function(NSURLCredential?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( - (ffi.Pointer arg0) => fn( - arg0.address == 0 ? null : NSURLCredential._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; + set preferredFilename(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setPreferredFilename_, + value?.pointer ?? ffi.nullptr); + } + + objc.NSString? get filename { + final _ret = _objc_msgSend_13(this.pointer, _sel_filename); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } - void call(NSURLCredential? arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); -} + set filename(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setFilename_, value?.pointer ?? ffi.nullptr); + } -class NSURLProtocol extends NSObject { - NSURLProtocol._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + objc.NSDictionary get fileAttributes { + final _ret = _objc_msgSend_112(this.pointer, _sel_fileAttributes); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a [NSURLProtocol] that points to the same underlying object as [other]. - static NSURLProtocol castFrom(T other) { - return NSURLProtocol._(other._id, other._lib, retain: true, release: true); + set fileAttributes(objc.NSDictionary value) { + return _objc_msgSend_113( + this.pointer, _sel_setFileAttributes_, value.pointer); } - /// Returns a [NSURLProtocol] that wraps the given raw object pointer. - static NSURLProtocol castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLProtocol._(other, lib, retain: retain, release: release); + bool matchesContentsOfURL_(objc.NSURL url) { + return _objc_msgSend_305( + this.pointer, _sel_matchesContentsOfURL_, url.pointer); } - /// Returns whether [obj] is an instance of [NSURLProtocol]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLProtocol1); + bool readFromURL_options_error_(objc.NSURL url, int options, + ffi.Pointer> outError) { + return _objc_msgSend_584(this.pointer, _sel_readFromURL_options_error_, + url.pointer, options, outError); } - NSURLProtocol initWithRequest_cachedResponse_client_(NSURLRequest request, - NSCachedURLResponse? cachedResponse, NSObject? client) { - final _ret = _lib._objc_msgSend_1012( - _id, - _lib._sel_initWithRequest_cachedResponse_client_1, - request._id, - cachedResponse?._id ?? ffi.nullptr, - client?._id ?? ffi.nullptr); - return NSURLProtocol._(_ret, _lib, retain: true, release: true); - } - - NSObject? get client { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_client1); + bool writeToURL_options_originalContentsURL_error_( + objc.NSURL url, + int options, + objc.NSURL? originalContentsURL, + ffi.Pointer> outError) { + return _objc_msgSend_585( + this.pointer, + _sel_writeToURL_options_originalContentsURL_error_, + url.pointer, + options, + originalContentsURL?.pointer ?? ffi.nullptr, + outError); + } + + objc.NSData? get serializedRepresentation { + final _ret = _objc_msgSend_325(this.pointer, _sel_serializedRepresentation); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - NSURLRequest get request { - final _ret = _lib._objc_msgSend_988(_id, _lib._sel_request1); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + objc.NSString addFileWrapper_(NSFileWrapper child) { + final _ret = + _objc_msgSend_586(this.pointer, _sel_addFileWrapper_, child.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSCachedURLResponse? get cachedResponse { - final _ret = _lib._objc_msgSend_1013(_id, _lib._sel_cachedResponse1); - return _ret.address == 0 - ? null - : NSCachedURLResponse._(_ret, _lib, retain: true, release: true); + objc.NSString addRegularFileWithContents_preferredFilename_( + objc.NSData data, objc.NSString fileName) { + final _ret = _objc_msgSend_587( + this.pointer, + _sel_addRegularFileWithContents_preferredFilename_, + data.pointer, + fileName.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool canInitWithRequest_(SwiftLibrary _lib, NSURLRequest request) { - return _lib._objc_msgSend_990(_lib._class_NSURLProtocol1, - _lib._sel_canInitWithRequest_1, request._id); + void removeFileWrapper_(NSFileWrapper child) { + _objc_msgSend_588(this.pointer, _sel_removeFileWrapper_, child.pointer); } - static NSURLRequest canonicalRequestForRequest_( - SwiftLibrary _lib, NSURLRequest request) { - final _ret = _lib._objc_msgSend_1014(_lib._class_NSURLProtocol1, - _lib._sel_canonicalRequestForRequest_1, request._id); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + objc.NSDictionary? get fileWrappers { + final _ret = _objc_msgSend_65(this.pointer, _sel_fileWrappers); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static bool requestIsCacheEquivalent_toRequest_( - SwiftLibrary _lib, NSURLRequest a, NSURLRequest b) { - return _lib._objc_msgSend_1015(_lib._class_NSURLProtocol1, - _lib._sel_requestIsCacheEquivalent_toRequest_1, a._id, b._id); + objc.NSString? keyForFileWrapper_(NSFileWrapper child) { + final _ret = + _objc_msgSend_589(this.pointer, _sel_keyForFileWrapper_, child.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void startLoading() { - _lib._objc_msgSend_1(_id, _lib._sel_startLoading1); + objc.NSData? get regularFileContents { + final _ret = _objc_msgSend_325(this.pointer, _sel_regularFileContents); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - void stopLoading() { - _lib._objc_msgSend_1(_id, _lib._sel_stopLoading1); + objc.NSURL? get symbolicLinkDestinationURL { + final _ret = + _objc_msgSend_10(this.pointer, _sel_symbolicLinkDestinationURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - static NSObject? propertyForKey_inRequest_( - SwiftLibrary _lib, NSString key, NSURLRequest request) { - final _ret = _lib._objc_msgSend_1016(_lib._class_NSURLProtocol1, - _lib._sel_propertyForKey_inRequest_1, key._id, request._id); + objc.NSObject? initWithPath_(objc.NSString path) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_initWithPath_, path.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void setProperty_forKey_inRequest_(SwiftLibrary _lib, NSObject value, - NSString key, NSMutableURLRequest request) { - _lib._objc_msgSend_1023( - _lib._class_NSURLProtocol1, - _lib._sel_setProperty_forKey_inRequest_1, - value._id, - key._id, - request._id); + objc.NSObject initSymbolicLinkWithDestination_(objc.NSString path) { + final _ret = _objc_msgSend_35( + this.pointer, _sel_initSymbolicLinkWithDestination_, path.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void removePropertyForKey_inRequest_( - SwiftLibrary _lib, NSString key, NSMutableURLRequest request) { - _lib._objc_msgSend_1024(_lib._class_NSURLProtocol1, - _lib._sel_removePropertyForKey_inRequest_1, key._id, request._id); + bool needsToBeUpdatedFromPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_needsToBeUpdatedFromPath_, path.pointer); } - static bool registerClass_(SwiftLibrary _lib, NSObject protocolClass) { - return _lib._objc_msgSend_0(_lib._class_NSURLProtocol1, - _lib._sel_registerClass_1, protocolClass._id); + bool updateFromPath_(objc.NSString path) { + return _objc_msgSend_51(this.pointer, _sel_updateFromPath_, path.pointer); } - static void unregisterClass_(SwiftLibrary _lib, NSObject protocolClass) { - _lib._objc_msgSend_15(_lib._class_NSURLProtocol1, - _lib._sel_unregisterClass_1, protocolClass._id); + bool writeToFile_atomically_updateFilenames_( + objc.NSString path, bool atomicFlag, bool updateFilenamesFlag) { + return _objc_msgSend_590( + this.pointer, + _sel_writeToFile_atomically_updateFilenames_, + path.pointer, + atomicFlag, + updateFilenamesFlag); } - static bool canInitWithTask_(SwiftLibrary _lib, NSURLSessionTask task) { - return _lib._objc_msgSend_1025( - _lib._class_NSURLProtocol1, _lib._sel_canInitWithTask_1, task._id); + objc.NSString addFileWithPath_(objc.NSString path) { + final _ret = + _objc_msgSend_297(this.pointer, _sel_addFileWithPath_, path.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSURLProtocol initWithTask_cachedResponse_client_(NSURLSessionTask task, - NSCachedURLResponse? cachedResponse, NSObject? client) { - final _ret = _lib._objc_msgSend_1026( - _id, - _lib._sel_initWithTask_cachedResponse_client_1, - task._id, - cachedResponse?._id ?? ffi.nullptr, - client?._id ?? ffi.nullptr); - return NSURLProtocol._(_ret, _lib, retain: true, release: true); + objc.NSString addSymbolicLinkWithDestination_preferredFilename_( + objc.NSString path, objc.NSString filename) { + final _ret = _objc_msgSend_591( + this.pointer, + _sel_addSymbolicLinkWithDestination_preferredFilename_, + path.pointer, + filename.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSURLSessionTask? get task { - final _ret = _lib._objc_msgSend_1027(_id, _lib._sel_task1); - return _ret.address == 0 - ? null - : NSURLSessionTask._(_ret, _lib, retain: true, release: true); + objc.NSString symbolicLinkDestination() { + final _ret = _objc_msgSend_12(this.pointer, _sel_symbolicLinkDestination); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } @override - NSURLProtocol init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLProtocol._(_ret, _lib, retain: true, release: true); + NSFileWrapper init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); } - static NSURLProtocol new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLProtocol1, _lib._sel_new1); - return NSURLProtocol._(_ret, _lib, retain: false, release: true); + static NSFileWrapper new1() { + final _ret = _objc_msgSend_40(_class_NSFileWrapper, _sel_new); + return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } - static NSURLProtocol allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLProtocol1, _lib._sel_allocWithZone_1, zone); - return NSURLProtocol._(_ret, _lib, retain: false, release: true); + static NSFileWrapper allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSFileWrapper, _sel_allocWithZone_, zone); + return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } - static NSURLProtocol alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLProtocol1, _lib._sel_alloc1); - return NSURLProtocol._(_ret, _lib, retain: false, release: true); + static NSFileWrapper alloc() { + final _ret = _objc_msgSend_40(_class_NSFileWrapper, _sel_alloc); + return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLProtocol1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSFileWrapper, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLProtocol1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSFileWrapper, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLProtocol1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSFileWrapper, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLProtocol1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSFileWrapper, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLProtocol1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSFileWrapper, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLProtocol1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSFileWrapper, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLProtocol1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSFileWrapper, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSURLProtocol1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSFileWrapper, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLProtocol1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSFileWrapper, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -class NSMutableURLRequest extends NSURLRequest { - NSMutableURLRequest._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +late final _class_NSFileWrapper = objc.getClass("NSFileWrapper"); - /// 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); - } +abstract class NSFileWrapperReadingOptions { + static const int NSFileWrapperReadingImmediate = 1; + static const int NSFileWrapperReadingWithoutMapping = 2; +} - /// Returns a [NSMutableURLRequest] that wraps the given raw object pointer. - static NSMutableURLRequest castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableURLRequest._(other, lib, retain: retain, release: release); - } +late final _sel_initWithURL_options_error_ = + objc.registerName("initWithURL:options:error:"); +final _objc_msgSend_583 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_initDirectoryWithFileWrappers_ = + objc.registerName("initDirectoryWithFileWrappers:"); +late final _sel_initRegularFileWithContents_ = + objc.registerName("initRegularFileWithContents:"); +late final _sel_initSymbolicLinkWithDestinationURL_ = + objc.registerName("initSymbolicLinkWithDestinationURL:"); +late final _sel_initWithSerializedRepresentation_ = + objc.registerName("initWithSerializedRepresentation:"); +late final _sel_isDirectory = objc.registerName("isDirectory"); +late final _sel_isRegularFile = objc.registerName("isRegularFile"); +late final _sel_isSymbolicLink = objc.registerName("isSymbolicLink"); +late final _sel_preferredFilename = objc.registerName("preferredFilename"); +late final _sel_setPreferredFilename_ = + objc.registerName("setPreferredFilename:"); +late final _sel_filename = objc.registerName("filename"); +late final _sel_setFilename_ = objc.registerName("setFilename:"); +late final _sel_fileAttributes = objc.registerName("fileAttributes"); +late final _sel_setFileAttributes_ = objc.registerName("setFileAttributes:"); +late final _sel_matchesContentsOfURL_ = + objc.registerName("matchesContentsOfURL:"); +late final _sel_readFromURL_options_error_ = + objc.registerName("readFromURL:options:error:"); +final _objc_msgSend_584 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - /// Returns whether [obj] is an instance of [NSMutableURLRequest]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableURLRequest1); - } +abstract class NSFileWrapperWritingOptions { + static const int NSFileWrapperWritingAtomic = 1; + static const int NSFileWrapperWritingWithNameUpdating = 2; +} - @override - NSURL? get URL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } +late final _sel_writeToURL_options_originalContentsURL_error_ = + objc.registerName("writeToURL:options:originalContentsURL:error:"); +final _objc_msgSend_585 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_serializedRepresentation = + objc.registerName("serializedRepresentation"); +late final _sel_addFileWrapper_ = objc.registerName("addFileWrapper:"); +final _objc_msgSend_586 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_addRegularFileWithContents_preferredFilename_ = + objc.registerName("addRegularFileWithContents:preferredFilename:"); +final _objc_msgSend_587 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeFileWrapper_ = objc.registerName("removeFileWrapper:"); +final _objc_msgSend_588 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_fileWrappers = objc.registerName("fileWrappers"); +late final _sel_keyForFileWrapper_ = objc.registerName("keyForFileWrapper:"); +final _objc_msgSend_589 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_regularFileContents = objc.registerName("regularFileContents"); +late final _sel_symbolicLinkDestinationURL = + objc.registerName("symbolicLinkDestinationURL"); +late final _sel_initSymbolicLinkWithDestination_ = + objc.registerName("initSymbolicLinkWithDestination:"); +late final _sel_needsToBeUpdatedFromPath_ = + objc.registerName("needsToBeUpdatedFromPath:"); +late final _sel_updateFromPath_ = objc.registerName("updateFromPath:"); +late final _sel_writeToFile_atomically_updateFilenames_ = + objc.registerName("writeToFile:atomically:updateFilenames:"); +final _objc_msgSend_590 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Bool)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + bool)>(); +late final _sel_addFileWithPath_ = objc.registerName("addFileWithPath:"); +late final _sel_addSymbolicLinkWithDestination_preferredFilename_ = + objc.registerName("addSymbolicLinkWithDestination:preferredFilename:"); +final _objc_msgSend_591 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_symbolicLinkDestination = + objc.registerName("symbolicLinkDestination"); + +class NSURLSession extends objc.NSObject { + NSURLSession._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - set URL(NSURL? value) { - return _lib._objc_msgSend_671( - _id, _lib._sel_setURL_1, value?._id ?? ffi.nullptr); - } + /// Constructs a [NSURLSession] that points to the same underlying object as [other]. + NSURLSession.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - @override - int get cachePolicy { - return _lib._objc_msgSend_859(_id, _lib._sel_cachePolicy1); - } + /// Constructs a [NSURLSession] that wraps the given raw object pointer. + NSURLSession.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - set cachePolicy(int value) { - return _lib._objc_msgSend_1017(_id, _lib._sel_setCachePolicy_1, value); + /// Returns whether [obj] is an instance of [NSURLSession]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSession); } - @override - double get timeoutInterval { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret(_id, _lib._sel_timeoutInterval1) - : _lib._objc_msgSend_165(_id, _lib._sel_timeoutInterval1); + static NSURLSession getSharedSession() { + final _ret = _objc_msgSend_592(_class_NSURLSession, _sel_sharedSession); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); } - set timeoutInterval(double value) { - return _lib._objc_msgSend_542(_id, _lib._sel_setTimeoutInterval_1, value); + static NSURLSession sessionWithConfiguration_( + NSURLSessionConfiguration configuration) { + final _ret = _objc_msgSend_608(_class_NSURLSession, + _sel_sessionWithConfiguration_, configuration.pointer); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); } - @override - NSURL? get mainDocumentURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_mainDocumentURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( + NSURLSessionConfiguration configuration, + objc.NSObject? delegate, + NSOperationQueue? queue) { + final _ret = _objc_msgSend_609( + _class_NSURLSession, + _sel_sessionWithConfiguration_delegate_delegateQueue_, + configuration.pointer, + delegate?.pointer ?? ffi.nullptr, + queue?.pointer ?? ffi.nullptr); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); } - set mainDocumentURL(NSURL? value) { - return _lib._objc_msgSend_671( - _id, _lib._sel_setMainDocumentURL_1, value?._id ?? ffi.nullptr); + NSOperationQueue get delegateQueue { + final _ret = _objc_msgSend_460(this.pointer, _sel_delegateQueue); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } - @override - int get networkServiceType { - return _lib._objc_msgSend_860(_id, _lib._sel_networkServiceType1); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set networkServiceType(int value) { - return _lib._objc_msgSend_1018( - _id, _lib._sel_setNetworkServiceType_1, value); + NSURLSessionConfiguration get configuration { + final _ret = _objc_msgSend_593(this.pointer, _sel_configuration); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } - @override - bool get allowsCellularAccess { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsCellularAccess1); + objc.NSString? get sessionDescription { + final _ret = _objc_msgSend_13(this.pointer, _sel_sessionDescription); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set allowsCellularAccess(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setAllowsCellularAccess_1, value); + set sessionDescription(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setSessionDescription_, + value?.pointer ?? ffi.nullptr); } - @override - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsExpensiveNetworkAccess1); + void finishTasksAndInvalidate() { + _objc_msgSend_82(this.pointer, _sel_finishTasksAndInvalidate); } - set allowsExpensiveNetworkAccess(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); + void invalidateAndCancel() { + _objc_msgSend_82(this.pointer, _sel_invalidateAndCancel); } - @override - bool get allowsConstrainedNetworkAccess { - return _lib._objc_msgSend_12( - _id, _lib._sel_allowsConstrainedNetworkAccess1); + void resetWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { + _objc_msgSend_249(this.pointer, _sel_resetWithCompletionHandler_, + completionHandler.pointer); } - set allowsConstrainedNetworkAccess(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); + void flushWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { + _objc_msgSend_249(this.pointer, _sel_flushWithCompletionHandler_, + completionHandler.pointer); } - @override - bool get assumesHTTP3Capable { - return _lib._objc_msgSend_12(_id, _lib._sel_assumesHTTP3Capable1); + void getTasksWithCompletionHandler_( + ObjCBlock_ffiVoid_NSArray_NSArray_NSArray completionHandler) { + _objc_msgSend_610(this.pointer, _sel_getTasksWithCompletionHandler_, + completionHandler.pointer); } - set assumesHTTP3Capable(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setAssumesHTTP3Capable_1, value); + void getAllTasksWithCompletionHandler_( + ObjCBlock_ffiVoid_NSArray1 completionHandler) { + _objc_msgSend_611(this.pointer, _sel_getAllTasksWithCompletionHandler_, + completionHandler.pointer); } - @override - int get attribution { - return _lib._objc_msgSend_861(_id, _lib._sel_attribution1); + NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_612( + this.pointer, _sel_dataTaskWithRequest_, request.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } - set attribution(int value) { - return _lib._objc_msgSend_1019(_id, _lib._sel_setAttribution_1, value); + NSURLSessionDataTask dataTaskWithURL_(objc.NSURL url) { + final _ret = + _objc_msgSend_613(this.pointer, _sel_dataTaskWithURL_, url.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } - @override - bool get requiresDNSSECValidation { - return _lib._objc_msgSend_12(_id, _lib._sel_requiresDNSSECValidation1); + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( + NSURLRequest request, objc.NSURL fileURL) { + final _ret = _objc_msgSend_615(this.pointer, + _sel_uploadTaskWithRequest_fromFile_, request.pointer, fileURL.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - set requiresDNSSECValidation(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setRequiresDNSSECValidation_1, value); + NSURLSessionUploadTask uploadTaskWithRequest_fromData_( + NSURLRequest request, objc.NSData bodyData) { + final _ret = _objc_msgSend_616( + this.pointer, + _sel_uploadTaskWithRequest_fromData_, + request.pointer, + bodyData.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - NSString get HTTPMethod { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_HTTPMethod1); - return NSString._(_ret, _lib, retain: true, release: true); + NSURLSessionUploadTask uploadTaskWithResumeData_(objc.NSData resumeData) { + final _ret = _objc_msgSend_617( + this.pointer, _sel_uploadTaskWithResumeData_, resumeData.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - set HTTPMethod(NSString value) { - return _lib._objc_msgSend_646(_id, _lib._sel_setHTTPMethod_1, value._id); + NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_618( + this.pointer, _sel_uploadTaskWithStreamedRequest_, request.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - @override - NSDictionary? get allHTTPHeaderFields { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_allHTTPHeaderFields1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_619( + this.pointer, _sel_downloadTaskWithRequest_, request.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - set allHTTPHeaderFields(NSDictionary? value) { - return _lib._objc_msgSend_634( - _id, _lib._sel_setAllHTTPHeaderFields_1, value?._id ?? ffi.nullptr); + NSURLSessionDownloadTask downloadTaskWithURL_(objc.NSURL url) { + final _ret = + _objc_msgSend_620(this.pointer, _sel_downloadTaskWithURL_, url.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - void setValue_forHTTPHeaderField_(NSString? value, NSString field) { - _lib._objc_msgSend_1020(_id, _lib._sel_setValue_forHTTPHeaderField_1, - value?._id ?? ffi.nullptr, field._id); + NSURLSessionDownloadTask downloadTaskWithResumeData_(objc.NSData resumeData) { + final _ret = _objc_msgSend_621( + this.pointer, _sel_downloadTaskWithResumeData_, resumeData.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - void addValue_forHTTPHeaderField_(NSString value, NSString field) { - _lib._objc_msgSend_551( - _id, _lib._sel_addValue_forHTTPHeaderField_1, value._id, field._id); + NSURLSessionStreamTask streamTaskWithHostName_port_( + objc.NSString hostname, int port) { + final _ret = _objc_msgSend_624(this.pointer, + _sel_streamTaskWithHostName_port_, hostname.pointer, port); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); } - @override - NSData? get HTTPBody { - final _ret = _lib._objc_msgSend_286(_id, _lib._sel_HTTPBody1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + NSURLSessionStreamTask streamTaskWithNetService_(NSNetService service) { + final _ret = _objc_msgSend_633( + this.pointer, _sel_streamTaskWithNetService_, service.pointer); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); } - set HTTPBody(NSData? value) { - return _lib._objc_msgSend_1021( - _id, _lib._sel_setHTTPBody_1, value?._id ?? ffi.nullptr); + NSURLSessionWebSocketTask webSocketTaskWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_640( + this.pointer, _sel_webSocketTaskWithURL_, url.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } - @override - NSInputStream? get HTTPBodyStream { - final _ret = _lib._objc_msgSend_875(_id, _lib._sel_HTTPBodyStream1); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); + NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( + objc.NSURL url, objc.NSArray protocols) { + final _ret = _objc_msgSend_641(this.pointer, + _sel_webSocketTaskWithURL_protocols_, url.pointer, protocols.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } - set HTTPBodyStream(NSInputStream? value) { - return _lib._objc_msgSend_1022( - _id, _lib._sel_setHTTPBodyStream_1, value?._id ?? ffi.nullptr); + NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_642( + this.pointer, _sel_webSocketTaskWithRequest_, request.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } @override - bool get HTTPShouldHandleCookies { - return _lib._objc_msgSend_12(_id, _lib._sel_HTTPShouldHandleCookies1); + NSURLSession init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); } - set HTTPShouldHandleCookies(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setHTTPShouldHandleCookies_1, value); + static NSURLSession new1() { + final _ret = _objc_msgSend_40(_class_NSURLSession, _sel_new); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); } - @override - bool get HTTPShouldUsePipelining { - return _lib._objc_msgSend_12(_id, _lib._sel_HTTPShouldUsePipelining1); + NSURLSessionDataTask dataTaskWithRequest_completionHandler_( + NSURLRequest request, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_643( + this.pointer, + _sel_dataTaskWithRequest_completionHandler_, + request.pointer, + completionHandler.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } - set HTTPShouldUsePipelining(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setHTTPShouldUsePipelining_1, value); + NSURLSessionDataTask dataTaskWithURL_completionHandler_(objc.NSURL url, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_644( + this.pointer, + _sel_dataTaskWithURL_completionHandler_, + url.pointer, + completionHandler.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } - static NSMutableURLRequest requestWithURL_(SwiftLibrary _lib, NSURL URL) { - final _ret = _lib._objc_msgSend_262( - _lib._class_NSMutableURLRequest1, _lib._sel_requestWithURL_1, URL._id); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( + NSURLRequest request, + objc.NSURL fileURL, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_645( + this.pointer, + _sel_uploadTaskWithRequest_fromFile_completionHandler_, + request.pointer, + fileURL.pointer, + completionHandler.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - static bool getSupportsSecureCoding(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableURLRequest1, _lib._sel_supportsSecureCoding1); + NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( + NSURLRequest request, + objc.NSData? bodyData, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_646( + this.pointer, + _sel_uploadTaskWithRequest_fromData_completionHandler_, + request.pointer, + bodyData?.pointer ?? ffi.nullptr, + completionHandler.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( - SwiftLibrary _lib, NSURL URL, int cachePolicy, double timeoutInterval) { - final _ret = _lib._objc_msgSend_858( - _lib._class_NSMutableURLRequest1, - _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, - URL._id, - cachePolicy, - timeoutInterval); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + NSURLSessionUploadTask uploadTaskWithResumeData_completionHandler_( + objc.NSData resumeData, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_647( + this.pointer, + _sel_uploadTaskWithResumeData_completionHandler_, + resumeData.pointer, + completionHandler.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - @override - NSMutableURLRequest initWithURL_(NSURL URL) { - final _ret = _lib._objc_msgSend_262(_id, _lib._sel_initWithURL_1, URL._id); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( + NSURLRequest request, + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_648( + this.pointer, + _sel_downloadTaskWithRequest_completionHandler_, + request.pointer, + completionHandler.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - @override - NSMutableURLRequest initWithURL_cachePolicy_timeoutInterval_( - NSURL URL, int cachePolicy, double timeoutInterval) { - final _ret = _lib._objc_msgSend_858( - _id, - _lib._sel_initWithURL_cachePolicy_timeoutInterval_1, - URL._id, - cachePolicy, - timeoutInterval); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_( + objc.NSURL url, + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_649( + this.pointer, + _sel_downloadTaskWithURL_completionHandler_, + url.pointer, + completionHandler.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - @override - NSMutableURLRequest init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( + objc.NSData resumeData, + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_650( + this.pointer, + _sel_downloadTaskWithResumeData_completionHandler_, + resumeData.pointer, + completionHandler.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - static NSMutableURLRequest new1(SwiftLibrary _lib) { + static NSURLSession allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableURLRequest1, _lib._sel_new1); - return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); - } - - static NSMutableURLRequest allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMutableURLRequest1, _lib._sel_allocWithZone_1, zone); - return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); + _objc_msgSend_47(_class_NSURLSession, _sel_allocWithZone_, zone); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); } - static NSMutableURLRequest alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableURLRequest1, _lib._sel_alloc1); - return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); + static NSURLSession alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSession, _sel_alloc); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSMutableURLRequest1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSession, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSMutableURLRequest1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSession, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSMutableURLRequest1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLSession, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableURLRequest1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLSession, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSMutableURLRequest1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSession, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSMutableURLRequest1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSession, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSMutableURLRequest1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSession, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSMutableURLRequest1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSession, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableURLRequest1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLSession, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -class NSXMLParser extends NSObject { - NSXMLParser._(ffi.Pointer id, SwiftLibrary lib, +late final _class_NSURLSession = objc.getClass("NSURLSession"); +late final _sel_sharedSession = objc.registerName("sharedSession"); +final _objc_msgSend_592 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + +class NSURLSessionConfiguration extends objc.NSObject { + NSURLSessionConfiguration._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLSessionConfiguration] that points to the same underlying object as [other]. + NSURLSessionConfiguration.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSURLSessionConfiguration] that wraps the given raw object pointer. + NSURLSessionConfiguration.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : this._(other, retain: retain, release: release); - /// Returns a [NSXMLParser] that points to the same underlying object as [other]. - static NSXMLParser castFrom(T other) { - return NSXMLParser._(other._id, other._lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSURLSessionConfiguration]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionConfiguration); } - /// Returns a [NSXMLParser] that wraps the given raw object pointer. - static NSXMLParser castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLParser._(other, lib, retain: retain, release: release); + static NSURLSessionConfiguration getDefaultSessionConfiguration() { + final _ret = _objc_msgSend_593( + _class_NSURLSessionConfiguration, _sel_defaultSessionConfiguration); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSXMLParser]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSXMLParser1); + static NSURLSessionConfiguration getEphemeralSessionConfiguration() { + final _ret = _objc_msgSend_593( + _class_NSURLSessionConfiguration, _sel_ephemeralSessionConfiguration); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } - NSXMLParser? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_277(_id, _lib._sel_initWithContentsOfURL_1, url._id); + static NSURLSessionConfiguration + backgroundSessionConfigurationWithIdentifier_(objc.NSString identifier) { + final _ret = _objc_msgSend_594(_class_NSURLSessionConfiguration, + _sel_backgroundSessionConfigurationWithIdentifier_, identifier.pointer); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); + } + + objc.NSString? get identifier { + final _ret = _objc_msgSend_13(this.pointer, _sel_identifier); return _ret.address == 0 ? null - : NSXMLParser._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSXMLParser initWithData_(NSData data) { - final _ret = - _lib._objc_msgSend_279(_id, _lib._sel_initWithData_1, data._id); - return NSXMLParser._(_ret, _lib, retain: true, release: true); + int get requestCachePolicy { + return _objc_msgSend_322(this.pointer, _sel_requestCachePolicy); } - NSXMLParser initWithStream_(NSInputStream stream) { - final _ret = - _lib._objc_msgSend_1028(_id, _lib._sel_initWithStream_1, stream._id); - return NSXMLParser._(_ret, _lib, retain: true, release: true); + set requestCachePolicy(int value) { + return _objc_msgSend_567(this.pointer, _sel_setRequestCachePolicy_, value); } - NSObject? get delegate { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + double get timeoutIntervalForRequest { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_timeoutIntervalForRequest) + : _objc_msgSend_115(this.pointer, _sel_timeoutIntervalForRequest); } - set delegate(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); + set timeoutIntervalForRequest(double value) { + return _objc_msgSend_212( + this.pointer, _sel_setTimeoutIntervalForRequest_, value); } - bool get shouldProcessNamespaces { - return _lib._objc_msgSend_12(_id, _lib._sel_shouldProcessNamespaces1); + double get timeoutIntervalForResource { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_timeoutIntervalForResource) + : _objc_msgSend_115(this.pointer, _sel_timeoutIntervalForResource); } - set shouldProcessNamespaces(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setShouldProcessNamespaces_1, value); + set timeoutIntervalForResource(double value) { + return _objc_msgSend_212( + this.pointer, _sel_setTimeoutIntervalForResource_, value); } - bool get shouldReportNamespacePrefixes { - return _lib._objc_msgSend_12(_id, _lib._sel_shouldReportNamespacePrefixes1); + int get networkServiceType { + return _objc_msgSend_323(this.pointer, _sel_networkServiceType); } - set shouldReportNamespacePrefixes(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setShouldReportNamespacePrefixes_1, value); + set networkServiceType(int value) { + return _objc_msgSend_568(this.pointer, _sel_setNetworkServiceType_, value); } - int get externalEntityResolvingPolicy { - return _lib._objc_msgSend_1029( - _id, _lib._sel_externalEntityResolvingPolicy1); + bool get allowsCellularAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsCellularAccess); } - set externalEntityResolvingPolicy(int value) { - return _lib._objc_msgSend_1030( - _id, _lib._sel_setExternalEntityResolvingPolicy_1, value); + set allowsCellularAccess(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setAllowsCellularAccess_, value); } - NSSet? get allowedExternalEntityURLs { - final _ret = - _lib._objc_msgSend_319(_id, _lib._sel_allowedExternalEntityURLs1); - return _ret.address == 0 - ? null - : NSSet._(_ret, _lib, retain: true, release: true); + bool get allowsExpensiveNetworkAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsExpensiveNetworkAccess); } - set allowedExternalEntityURLs(NSSet? value) { - return _lib._objc_msgSend_1031(_id, - _lib._sel_setAllowedExternalEntityURLs_1, value?._id ?? ffi.nullptr); + set allowsExpensiveNetworkAccess(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); } - bool parse() { - return _lib._objc_msgSend_12(_id, _lib._sel_parse1); + bool get allowsConstrainedNetworkAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsConstrainedNetworkAccess); } - void abortParsing() { - _lib._objc_msgSend_1(_id, _lib._sel_abortParsing1); + set allowsConstrainedNetworkAccess(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); + } + + bool get requiresDNSSECValidation { + return _objc_msgSend_7(this.pointer, _sel_requiresDNSSECValidation); + } + + set requiresDNSSECValidation(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setRequiresDNSSECValidation_, value); } - NSError? get parserError { - final _ret = _lib._objc_msgSend_322(_id, _lib._sel_parserError1); - return _ret.address == 0 - ? null - : NSError._(_ret, _lib, retain: true, release: true); + bool get waitsForConnectivity { + return _objc_msgSend_7(this.pointer, _sel_waitsForConnectivity); } - bool get shouldResolveExternalEntities { - return _lib._objc_msgSend_12(_id, _lib._sel_shouldResolveExternalEntities1); + set waitsForConnectivity(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setWaitsForConnectivity_, value); } - set shouldResolveExternalEntities(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setShouldResolveExternalEntities_1, value); + bool get discretionary { + return _objc_msgSend_7(this.pointer, _sel_isDiscretionary); } - NSString? get publicID { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_publicID1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + set discretionary(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setDiscretionary_, value); } - NSString? get systemID { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_systemID1); + objc.NSString? get sharedContainerIdentifier { + final _ret = _objc_msgSend_13(this.pointer, _sel_sharedContainerIdentifier); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int get lineNumber { - return _lib._objc_msgSend_83(_id, _lib._sel_lineNumber1); + set sharedContainerIdentifier(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setSharedContainerIdentifier_, + value?.pointer ?? ffi.nullptr); } - int get columnNumber { - return _lib._objc_msgSend_83(_id, _lib._sel_columnNumber1); + bool get sessionSendsLaunchEvents { + return _objc_msgSend_7(this.pointer, _sel_sessionSendsLaunchEvents); } - @override - NSXMLParser init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSXMLParser._(_ret, _lib, retain: true, release: true); + set sessionSendsLaunchEvents(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setSessionSendsLaunchEvents_, value); } - static NSXMLParser new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSXMLParser1, _lib._sel_new1); - return NSXMLParser._(_ret, _lib, retain: false, release: true); + objc.NSDictionary? get connectionProxyDictionary { + final _ret = _objc_msgSend_65(this.pointer, _sel_connectionProxyDictionary); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSXMLParser allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSXMLParser1, _lib._sel_allocWithZone_1, zone); - return NSXMLParser._(_ret, _lib, retain: false, release: true); + set connectionProxyDictionary(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setConnectionProxyDictionary_, + value?.pointer ?? ffi.nullptr); } - static NSXMLParser alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLParser1, _lib._sel_alloc1); - return NSXMLParser._(_ret, _lib, retain: false, release: true); + int get TLSMinimumSupportedProtocol { + return _objc_msgSend_595(this.pointer, _sel_TLSMinimumSupportedProtocol); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSXMLParser1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + set TLSMinimumSupportedProtocol(int value) { + return _objc_msgSend_596( + this.pointer, _sel_setTLSMinimumSupportedProtocol_, value); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSXMLParser1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + int get TLSMaximumSupportedProtocol { + return _objc_msgSend_595(this.pointer, _sel_TLSMaximumSupportedProtocol); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLParser1, _lib._sel_accessInstanceVariablesDirectly1); + set TLSMaximumSupportedProtocol(int value) { + return _objc_msgSend_596( + this.pointer, _sel_setTLSMaximumSupportedProtocol_, value); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLParser1, _lib._sel_useStoredAccessor1); + int get TLSMinimumSupportedProtocolVersion { + return _objc_msgSend_597( + this.pointer, _sel_TLSMinimumSupportedProtocolVersion); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSXMLParser1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + set TLSMinimumSupportedProtocolVersion(int value) { + return _objc_msgSend_598( + this.pointer, _sel_setTLSMinimumSupportedProtocolVersion_, value); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSXMLParser1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + int get TLSMaximumSupportedProtocolVersion { + return _objc_msgSend_597( + this.pointer, _sel_TLSMaximumSupportedProtocolVersion); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSXMLParser1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + set TLSMaximumSupportedProtocolVersion(int value) { + return _objc_msgSend_598( + this.pointer, _sel_setTLSMaximumSupportedProtocolVersion_, value); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSXMLParser1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + bool get HTTPShouldUsePipelining { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldUsePipelining); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSXMLParser1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + set HTTPShouldUsePipelining(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setHTTPShouldUsePipelining_, value); } -} - -abstract class NSXMLParserExternalEntityResolvingPolicy { - static const int NSXMLParserResolveExternalEntitiesNever = 0; - static const int NSXMLParserResolveExternalEntitiesNoNetwork = 1; - static const int NSXMLParserResolveExternalEntitiesSameOriginOnly = 2; - static const int NSXMLParserResolveExternalEntitiesAlways = 3; -} -class NSFileWrapper extends NSObject { - NSFileWrapper._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + bool get HTTPShouldSetCookies { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldSetCookies); + } - /// Returns a [NSFileWrapper] that points to the same underlying object as [other]. - static NSFileWrapper castFrom(T other) { - return NSFileWrapper._(other._id, other._lib, retain: true, release: true); + set HTTPShouldSetCookies(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setHTTPShouldSetCookies_, value); } - /// Returns a [NSFileWrapper] that wraps the given raw object pointer. - static NSFileWrapper castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSFileWrapper._(other, lib, retain: retain, release: release); + int get HTTPCookieAcceptPolicy { + return _objc_msgSend_318(this.pointer, _sel_HTTPCookieAcceptPolicy); } - /// Returns whether [obj] is an instance of [NSFileWrapper]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSFileWrapper1); + set HTTPCookieAcceptPolicy(int value) { + return _objc_msgSend_319( + this.pointer, _sel_setHTTPCookieAcceptPolicy_, value); } - NSFileWrapper? initWithURL_options_error_( - NSURL url, int options, ffi.Pointer> outError) { - final _ret = _lib._objc_msgSend_1032( - _id, _lib._sel_initWithURL_options_error_1, url._id, options, outError); + objc.NSDictionary? get HTTPAdditionalHeaders { + final _ret = _objc_msgSend_65(this.pointer, _sel_HTTPAdditionalHeaders); return _ret.address == 0 ? null - : NSFileWrapper._(_ret, _lib, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSFileWrapper initDirectoryWithFileWrappers_( - NSDictionary childrenByPreferredName) { - final _ret = _lib._objc_msgSend_159(_id, - _lib._sel_initDirectoryWithFileWrappers_1, childrenByPreferredName._id); - return NSFileWrapper._(_ret, _lib, retain: true, release: true); + set HTTPAdditionalHeaders(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setHTTPAdditionalHeaders_, + value?.pointer ?? ffi.nullptr); } - NSFileWrapper initRegularFileWithContents_(NSData contents) { - final _ret = _lib._objc_msgSend_279( - _id, _lib._sel_initRegularFileWithContents_1, contents._id); - return NSFileWrapper._(_ret, _lib, retain: true, release: true); + int get HTTPMaximumConnectionsPerHost { + return _objc_msgSend_114(this.pointer, _sel_HTTPMaximumConnectionsPerHost); } - NSFileWrapper initSymbolicLinkWithDestinationURL_(NSURL url) { - final _ret = _lib._objc_msgSend_262( - _id, _lib._sel_initSymbolicLinkWithDestinationURL_1, url._id); - return NSFileWrapper._(_ret, _lib, retain: true, release: true); + set HTTPMaximumConnectionsPerHost(int value) { + return _objc_msgSend_134( + this.pointer, _sel_setHTTPMaximumConnectionsPerHost_, value); } - NSFileWrapper? initWithSerializedRepresentation_( - NSData serializeRepresentation) { - final _ret = _lib._objc_msgSend_874( - _id, - _lib._sel_initWithSerializedRepresentation_1, - serializeRepresentation._id); + NSHTTPCookieStorage? get HTTPCookieStorage { + final _ret = _objc_msgSend_599(this.pointer, _sel_HTTPCookieStorage); return _ret.address == 0 ? null - : NSFileWrapper._(_ret, _lib, retain: true, release: true); + : NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } - NSFileWrapper? initWithCoder_(NSCoder inCoder) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithCoder_1, inCoder._id); + set HTTPCookieStorage(NSHTTPCookieStorage? value) { + return _objc_msgSend_600(this.pointer, _sel_setHTTPCookieStorage_, + value?.pointer ?? ffi.nullptr); + } + + NSURLCredentialStorage? get URLCredentialStorage { + final _ret = _objc_msgSend_601(this.pointer, _sel_URLCredentialStorage); return _ret.address == 0 ? null - : NSFileWrapper._(_ret, _lib, retain: true, release: true); + : NSURLCredentialStorage.castFromPointer(_ret, + retain: true, release: true); } - bool get directory { - return _lib._objc_msgSend_12(_id, _lib._sel_isDirectory1); + set URLCredentialStorage(NSURLCredentialStorage? value) { + return _objc_msgSend_602(this.pointer, _sel_setURLCredentialStorage_, + value?.pointer ?? ffi.nullptr); } - bool get regularFile { - return _lib._objc_msgSend_12(_id, _lib._sel_isRegularFile1); + NSURLCache? get URLCache { + final _ret = _objc_msgSend_603(this.pointer, _sel_URLCache); + return _ret.address == 0 + ? null + : NSURLCache.castFromPointer(_ret, retain: true, release: true); } - bool get symbolicLink { - return _lib._objc_msgSend_12(_id, _lib._sel_isSymbolicLink1); + set URLCache(NSURLCache? value) { + return _objc_msgSend_604( + this.pointer, _sel_setURLCache_, value?.pointer ?? ffi.nullptr); } - NSString? get preferredFilename { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_preferredFilename1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + bool get shouldUseExtendedBackgroundIdleMode { + return _objc_msgSend_7( + this.pointer, _sel_shouldUseExtendedBackgroundIdleMode); } - set preferredFilename(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setPreferredFilename_1, value?._id ?? ffi.nullptr); + set shouldUseExtendedBackgroundIdleMode(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setShouldUseExtendedBackgroundIdleMode_, value); } - NSString? get filename { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_filename1); + objc.NSArray? get protocolClasses { + final _ret = _objc_msgSend_69(this.pointer, _sel_protocolClasses); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set filename(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setFilename_1, value?._id ?? ffi.nullptr); + set protocolClasses(objc.NSArray? value) { + return _objc_msgSend_605( + this.pointer, _sel_setProtocolClasses_, value?.pointer ?? ffi.nullptr); } - NSDictionary get fileAttributes { - final _ret = _lib._objc_msgSend_181(_id, _lib._sel_fileAttributes1); - return NSDictionary._(_ret, _lib, retain: true, release: true); + int get multipathServiceType { + return _objc_msgSend_606(this.pointer, _sel_multipathServiceType); } - set fileAttributes(NSDictionary value) { - return _lib._objc_msgSend_182( - _id, _lib._sel_setFileAttributes_1, value._id); + set multipathServiceType(int value) { + return _objc_msgSend_607( + this.pointer, _sel_setMultipathServiceType_, value); } - bool matchesContentsOfURL_(NSURL url) { - return _lib._objc_msgSend_265( - _id, _lib._sel_matchesContentsOfURL_1, url._id); + @override + NSURLSessionConfiguration init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } - bool readFromURL_options_error_( - NSURL url, int options, ffi.Pointer> outError) { - return _lib._objc_msgSend_1033( - _id, _lib._sel_readFromURL_options_error_1, url._id, options, outError); + static NSURLSessionConfiguration new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionConfiguration, _sel_new); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: false, release: true); } - bool writeToURL_options_originalContentsURL_error_( - NSURL url, - int options, - NSURL? originalContentsURL, - ffi.Pointer> outError) { - return _lib._objc_msgSend_1034( - _id, - _lib._sel_writeToURL_options_originalContentsURL_error_1, - url._id, - options, - originalContentsURL?._id ?? ffi.nullptr, - outError); + static NSURLSessionConfiguration backgroundSessionConfiguration_( + objc.NSString identifier) { + final _ret = _objc_msgSend_594(_class_NSURLSessionConfiguration, + _sel_backgroundSessionConfiguration_, identifier.pointer); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } - NSData? get serializedRepresentation { - final _ret = - _lib._objc_msgSend_286(_id, _lib._sel_serializedRepresentation1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + static NSURLSessionConfiguration allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionConfiguration, _sel_allocWithZone_, zone); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: false, release: true); } - NSString addFileWrapper_(NSFileWrapper child) { - final _ret = - _lib._objc_msgSend_1035(_id, _lib._sel_addFileWrapper_1, child._id); - return NSString._(_ret, _lib, retain: true, release: true); + static NSURLSessionConfiguration alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionConfiguration, _sel_alloc); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: false, release: true); } - NSString addRegularFileWithContents_preferredFilename_( - NSData data, NSString fileName) { - final _ret = _lib._objc_msgSend_1036( - _id, - _lib._sel_addRegularFileWithContents_preferredFilename_1, - data._id, - fileName._id); - return NSString._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionConfiguration, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - void removeFileWrapper_(NSFileWrapper child) { - _lib._objc_msgSend_1037(_id, _lib._sel_removeFileWrapper_1, child._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionConfiguration, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSDictionary? get fileWrappers { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_fileWrappers1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLSessionConfiguration, _sel_accessInstanceVariablesDirectly); } - NSString? keyForFileWrapper_(NSFileWrapper child) { - final _ret = - _lib._objc_msgSend_1038(_id, _lib._sel_keyForFileWrapper_1, child._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSURLSessionConfiguration, _sel_useStoredAccessor); } - NSData? get regularFileContents { - final _ret = _lib._objc_msgSend_286(_id, _lib._sel_regularFileContents1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionConfiguration, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSURL? get symbolicLinkDestinationURL { - final _ret = - _lib._objc_msgSend_45(_id, _lib._sel_symbolicLinkDestinationURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionConfiguration, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSObject? initWithPath_(NSString path) { - final _ret = _lib._objc_msgSend_38(_id, _lib._sel_initWithPath_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionConfiguration, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionConfiguration, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionConfiguration, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSURLSessionConfiguration = + objc.getClass("NSURLSessionConfiguration"); +late final _sel_defaultSessionConfiguration = + objc.registerName("defaultSessionConfiguration"); +final _objc_msgSend_593 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_ephemeralSessionConfiguration = + objc.registerName("ephemeralSessionConfiguration"); +late final _sel_backgroundSessionConfigurationWithIdentifier_ = + objc.registerName("backgroundSessionConfigurationWithIdentifier:"); +final _objc_msgSend_594 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_identifier = objc.registerName("identifier"); +late final _sel_requestCachePolicy = objc.registerName("requestCachePolicy"); +late final _sel_setRequestCachePolicy_ = + objc.registerName("setRequestCachePolicy:"); +late final _sel_timeoutIntervalForRequest = + objc.registerName("timeoutIntervalForRequest"); +late final _sel_setTimeoutIntervalForRequest_ = + objc.registerName("setTimeoutIntervalForRequest:"); +late final _sel_timeoutIntervalForResource = + objc.registerName("timeoutIntervalForResource"); +late final _sel_setTimeoutIntervalForResource_ = + objc.registerName("setTimeoutIntervalForResource:"); +late final _sel_waitsForConnectivity = + objc.registerName("waitsForConnectivity"); +late final _sel_setWaitsForConnectivity_ = + objc.registerName("setWaitsForConnectivity:"); +late final _sel_isDiscretionary = objc.registerName("isDiscretionary"); +late final _sel_setDiscretionary_ = objc.registerName("setDiscretionary:"); +late final _sel_sharedContainerIdentifier = + objc.registerName("sharedContainerIdentifier"); +late final _sel_setSharedContainerIdentifier_ = + objc.registerName("setSharedContainerIdentifier:"); +late final _sel_sessionSendsLaunchEvents = + objc.registerName("sessionSendsLaunchEvents"); +late final _sel_setSessionSendsLaunchEvents_ = + objc.registerName("setSessionSendsLaunchEvents:"); +late final _sel_connectionProxyDictionary = + objc.registerName("connectionProxyDictionary"); +late final _sel_setConnectionProxyDictionary_ = + objc.registerName("setConnectionProxyDictionary:"); + +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; +} + +late final _sel_TLSMinimumSupportedProtocol = + objc.registerName("TLSMinimumSupportedProtocol"); +final _objc_msgSend_595 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setTLSMinimumSupportedProtocol_ = + objc.registerName("setTLSMinimumSupportedProtocol:"); +final _objc_msgSend_596 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_TLSMaximumSupportedProtocol = + objc.registerName("TLSMaximumSupportedProtocol"); +late final _sel_setTLSMaximumSupportedProtocol_ = + objc.registerName("setTLSMaximumSupportedProtocol:"); + +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; +} + +late final _sel_TLSMinimumSupportedProtocolVersion = + objc.registerName("TLSMinimumSupportedProtocolVersion"); +final _objc_msgSend_597 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setTLSMinimumSupportedProtocolVersion_ = + objc.registerName("setTLSMinimumSupportedProtocolVersion:"); +final _objc_msgSend_598 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_TLSMaximumSupportedProtocolVersion = + objc.registerName("TLSMaximumSupportedProtocolVersion"); +late final _sel_setTLSMaximumSupportedProtocolVersion_ = + objc.registerName("setTLSMaximumSupportedProtocolVersion:"); +late final _sel_HTTPShouldSetCookies = + objc.registerName("HTTPShouldSetCookies"); +late final _sel_setHTTPShouldSetCookies_ = + objc.registerName("setHTTPShouldSetCookies:"); +late final _sel_HTTPCookieAcceptPolicy = + objc.registerName("HTTPCookieAcceptPolicy"); +late final _sel_setHTTPCookieAcceptPolicy_ = + objc.registerName("setHTTPCookieAcceptPolicy:"); +late final _sel_HTTPAdditionalHeaders = + objc.registerName("HTTPAdditionalHeaders"); +late final _sel_setHTTPAdditionalHeaders_ = + objc.registerName("setHTTPAdditionalHeaders:"); +late final _sel_HTTPMaximumConnectionsPerHost = + objc.registerName("HTTPMaximumConnectionsPerHost"); +late final _sel_setHTTPMaximumConnectionsPerHost_ = + objc.registerName("setHTTPMaximumConnectionsPerHost:"); +late final _sel_HTTPCookieStorage = objc.registerName("HTTPCookieStorage"); +final _objc_msgSend_599 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setHTTPCookieStorage_ = + objc.registerName("setHTTPCookieStorage:"); +final _objc_msgSend_600 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_URLCredentialStorage = + objc.registerName("URLCredentialStorage"); +final _objc_msgSend_601 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setURLCredentialStorage_ = + objc.registerName("setURLCredentialStorage:"); +final _objc_msgSend_602 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_URLCache = objc.registerName("URLCache"); +final _objc_msgSend_603 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setURLCache_ = objc.registerName("setURLCache:"); +final _objc_msgSend_604 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_shouldUseExtendedBackgroundIdleMode = + objc.registerName("shouldUseExtendedBackgroundIdleMode"); +late final _sel_setShouldUseExtendedBackgroundIdleMode_ = + objc.registerName("setShouldUseExtendedBackgroundIdleMode:"); +late final _sel_protocolClasses = objc.registerName("protocolClasses"); +late final _sel_setProtocolClasses_ = objc.registerName("setProtocolClasses:"); +final _objc_msgSend_605 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSURLSessionMultipathServiceType { + static const int NSURLSessionMultipathServiceTypeNone = 0; + static const int NSURLSessionMultipathServiceTypeHandover = 1; + static const int NSURLSessionMultipathServiceTypeInteractive = 2; + static const int NSURLSessionMultipathServiceTypeAggregate = 3; +} + +late final _sel_multipathServiceType = + objc.registerName("multipathServiceType"); +final _objc_msgSend_606 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setMultipathServiceType_ = + objc.registerName("setMultipathServiceType:"); +final _objc_msgSend_607 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_backgroundSessionConfiguration_ = + objc.registerName("backgroundSessionConfiguration:"); +late final _sel_sessionWithConfiguration_ = + objc.registerName("sessionWithConfiguration:"); +final _objc_msgSend_608 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_sessionWithConfiguration_delegate_delegateQueue_ = + objc.registerName("sessionWithConfiguration:delegate:delegateQueue:"); +final _objc_msgSend_609 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_delegateQueue = objc.registerName("delegateQueue"); +late final _sel_configuration = objc.registerName("configuration"); +late final _sel_sessionDescription = objc.registerName("sessionDescription"); +late final _sel_setSessionDescription_ = + objc.registerName("setSessionDescription:"); +late final _sel_finishTasksAndInvalidate = + objc.registerName("finishTasksAndInvalidate"); +late final _sel_invalidateAndCancel = objc.registerName("invalidateAndCancel"); +late final _sel_resetWithCompletionHandler_ = + objc.registerName("resetWithCompletionHandler:"); +late final _sel_flushWithCompletionHandler_ = + objc.registerName("flushWithCompletionHandler:"); +void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSArray_NSArray_NSArray._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSArray_NSArray_NSArray castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSArray_NSArray_NSArray._(pointer, + retain: retain, release: release); } - NSObject initSymbolicLinkWithDestination_(NSString path) { - final _ret = _lib._objc_msgSend_31( - _id, _lib._sel_initSymbolicLinkWithDestination_1, path._id); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.fromFunction( + void Function(objc.NSArray, objc.NSArray, objc.NSArray) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + objc.NSArray.castFromPointer(arg0, retain: true, release: true), + objc.NSArray.castFromPointer(arg1, retain: true, release: true), + objc.NSArray.castFromPointer(arg2, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.listener( + void Function(objc.NSArray, objc.NSArray, objc.NSArray) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + objc.NSArray.castFromPointer(arg0, retain: true, release: true), + objc.NSArray.castFromPointer(arg1, retain: true, release: true), + objc.NSArray.castFromPointer(arg2, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(objc.NSArray arg0, objc.NSArray arg1, objc.NSArray arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1.pointer, arg2.pointer); +} + +late final _sel_getTasksWithCompletionHandler_ = + objc.registerName("getTasksWithCompletionHandler:"); +final _objc_msgSend_610 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSArray1_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSArray1_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSArray1_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSArray1_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSArray1_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSArray1_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSArray1_closureRegistry[block.ref.target.address]!( + arg0); + +class ObjCBlock_ffiVoid_NSArray1 extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSArray1._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSArray1 castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSArray1._(pointer, + retain: retain, release: release); } - bool needsToBeUpdatedFromPath_(NSString path) { - return _lib._objc_msgSend_64( - _id, _lib._sel_needsToBeUpdatedFromPath_1, path._id); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSArray1.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSArray1.fromFunction(void Function(objc.NSArray) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSArray1_registerClosure( + (ffi.Pointer arg0) => fn( + objc.NSArray.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSArray1.listener(void Function(objc.NSArray) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSArray1_registerClosure( + (ffi.Pointer arg0) => fn( + objc.NSArray.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(objc.NSArray arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(pointer, arg0.pointer); +} + +late final _sel_getAllTasksWithCompletionHandler_ = + objc.registerName("getAllTasksWithCompletionHandler:"); +final _objc_msgSend_611 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dataTaskWithRequest_ = + objc.registerName("dataTaskWithRequest:"); +final _objc_msgSend_612 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dataTaskWithURL_ = objc.registerName("dataTaskWithURL:"); +final _objc_msgSend_613 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - bool updateFromPath_(NSString path) { - return _lib._objc_msgSend_64(_id, _lib._sel_updateFromPath_1, path._id); - } +class NSURLSessionUploadTask extends NSURLSessionDataTask { + NSURLSessionUploadTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - bool writeToFile_atomically_updateFilenames_( - NSString path, bool atomicFlag, bool updateFilenamesFlag) { - return _lib._objc_msgSend_1039( - _id, - _lib._sel_writeToFile_atomically_updateFilenames_1, - path._id, - atomicFlag, - updateFilenamesFlag); - } + /// Constructs a [NSURLSessionUploadTask] that points to the same underlying object as [other]. + NSURLSessionUploadTask.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSString addFileWithPath_(NSString path) { - final _ret = - _lib._objc_msgSend_69(_id, _lib._sel_addFileWithPath_1, path._id); - return NSString._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSURLSessionUploadTask] that wraps the given raw object pointer. + NSURLSessionUploadTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - NSString addSymbolicLinkWithDestination_preferredFilename_( - NSString path, NSString filename) { - final _ret = _lib._objc_msgSend_364( - _id, - _lib._sel_addSymbolicLinkWithDestination_preferredFilename_1, - path._id, - filename._id); - return NSString._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSURLSessionUploadTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionUploadTask); } - NSString symbolicLinkDestination() { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_symbolicLinkDestination1); - return NSString._(_ret, _lib, retain: true, release: true); + @override + NSURLSessionUploadTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - @override - NSFileWrapper init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSFileWrapper._(_ret, _lib, retain: true, release: true); + static NSURLSessionUploadTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionUploadTask, _sel_new); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: false, release: true); } - static NSFileWrapper new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFileWrapper1, _lib._sel_new1); - return NSFileWrapper._(_ret, _lib, retain: false, release: true); + void cancelByProducingResumeData_( + ObjCBlock_ffiVoid_NSData completionHandler) { + _objc_msgSend_614(this.pointer, _sel_cancelByProducingResumeData_, + completionHandler.pointer); } - static NSFileWrapper allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSFileWrapper1, _lib._sel_allocWithZone_1, zone); - return NSFileWrapper._(_ret, _lib, retain: false, release: true); + static NSURLSessionUploadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionUploadTask, _sel_allocWithZone_, zone); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: false, release: true); } - static NSFileWrapper alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFileWrapper1, _lib._sel_alloc1); - return NSFileWrapper._(_ret, _lib, retain: false, release: true); + static NSURLSessionUploadTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionUploadTask, _sel_alloc); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSFileWrapper1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionUploadTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSFileWrapper1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionUploadTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSFileWrapper1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLSessionUploadTask, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSFileWrapper1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSURLSessionUploadTask, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSFileWrapper1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionUploadTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSFileWrapper1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionUploadTask, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSFileWrapper1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionUploadTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSFileWrapper1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionUploadTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSFileWrapper1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionUploadTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -abstract class NSFileWrapperReadingOptions { - static const int NSFileWrapperReadingImmediate = 1; - static const int NSFileWrapperReadingWithoutMapping = 2; +late final _class_NSURLSessionUploadTask = + objc.getClass("NSURLSessionUploadTask"); +void _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSData_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSData_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSData_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSData_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSData_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -abstract class NSFileWrapperWritingOptions { - static const int NSFileWrapperWritingAtomic = 1; - static const int NSFileWrapperWritingWithNameUpdating = 2; -} +void _ObjCBlock_ffiVoid_NSData_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSData_closureRegistry[block.ref.target.address]!(arg0); -class NSURLSession extends NSObject { - NSURLSession._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +class ObjCBlock_ffiVoid_NSData extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSData._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); - /// Returns a [NSURLSession] that points to the same underlying object as [other]. - static NSURLSession castFrom(T other) { - return NSURLSession._(other._id, other._lib, retain: true, release: true); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSData castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSData._(pointer, + retain: retain, release: release); } - /// Returns a [NSURLSession] that wraps the given raw object pointer. - static NSURLSession castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSession._(other, lib, retain: retain, release: release); + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData.fromFunction(void Function(objc.NSData?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSData_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSData.listener(void Function(objc.NSData?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSData_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(objc.NSData? arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr); +} + +late final _sel_cancelByProducingResumeData_ = + objc.registerName("cancelByProducingResumeData:"); +final _objc_msgSend_614 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_uploadTaskWithRequest_fromFile_ = + objc.registerName("uploadTaskWithRequest:fromFile:"); +final _objc_msgSend_615 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_uploadTaskWithRequest_fromData_ = + objc.registerName("uploadTaskWithRequest:fromData:"); +final _objc_msgSend_616 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_uploadTaskWithResumeData_ = + objc.registerName("uploadTaskWithResumeData:"); +final _objc_msgSend_617 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_uploadTaskWithStreamedRequest_ = + objc.registerName("uploadTaskWithStreamedRequest:"); +final _objc_msgSend_618 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class NSURLSessionDownloadTask extends NSURLSessionTask { + NSURLSessionDownloadTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLSessionDownloadTask] that points to the same underlying object as [other]. + NSURLSessionDownloadTask.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSURLSessionDownloadTask] that wraps the given raw object pointer. + NSURLSessionDownloadTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLSessionDownloadTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionDownloadTask); } - /// 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); + void cancelByProducingResumeData_( + ObjCBlock_ffiVoid_NSData completionHandler) { + _objc_msgSend_614(this.pointer, _sel_cancelByProducingResumeData_, + completionHandler.pointer); } - static NSURLSession getSharedSession(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_1040( - _lib._class_NSURLSession1, _lib._sel_sharedSession1); - return NSURLSession._(_ret, _lib, retain: true, release: true); + @override + NSURLSessionDownloadTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - static NSURLSession sessionWithConfiguration_( - SwiftLibrary _lib, NSURLSessionConfiguration configuration) { - final _ret = _lib._objc_msgSend_1056(_lib._class_NSURLSession1, - _lib._sel_sessionWithConfiguration_1, configuration._id); - return NSURLSession._(_ret, _lib, retain: true, release: true); + static NSURLSessionDownloadTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionDownloadTask, _sel_new); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: false, release: true); } - static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( - SwiftLibrary _lib, - NSURLSessionConfiguration configuration, - NSObject? delegate, - NSOperationQueue? queue) { - final _ret = _lib._objc_msgSend_1057( - _lib._class_NSURLSession1, - _lib._sel_sessionWithConfiguration_delegate_delegateQueue_1, - configuration._id, - delegate?._id ?? ffi.nullptr, - queue?._id ?? ffi.nullptr); - return NSURLSession._(_ret, _lib, retain: true, release: true); + static NSURLSessionDownloadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionDownloadTask, _sel_allocWithZone_, zone); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: false, release: true); } - NSOperationQueue get delegateQueue { - final _ret = _lib._objc_msgSend_917(_id, _lib._sel_delegateQueue1); - return NSOperationQueue._(_ret, _lib, retain: true, release: true); + static NSURLSessionDownloadTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionDownloadTask, _sel_alloc); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: false, release: true); } - NSObject? get delegate { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionDownloadTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSURLSessionConfiguration get configuration { - final _ret = _lib._objc_msgSend_1041(_id, _lib._sel_configuration1); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionDownloadTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSString? get sessionDescription { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_sessionDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLSessionDownloadTask, _sel_accessInstanceVariablesDirectly); } - set sessionDescription(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setSessionDescription_1, value?._id ?? ffi.nullptr); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSURLSessionDownloadTask, _sel_useStoredAccessor); } - void finishTasksAndInvalidate() { - _lib._objc_msgSend_1(_id, _lib._sel_finishTasksAndInvalidate1); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionDownloadTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - void invalidateAndCancel() { - _lib._objc_msgSend_1(_id, _lib._sel_invalidateAndCancel1); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionDownloadTask, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - void resetWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { - _lib._objc_msgSend_532( - _id, _lib._sel_resetWithCompletionHandler_1, completionHandler._id); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionDownloadTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionDownloadTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionDownloadTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSURLSessionDownloadTask = + objc.getClass("NSURLSessionDownloadTask"); +late final _sel_downloadTaskWithRequest_ = + objc.registerName("downloadTaskWithRequest:"); +final _objc_msgSend_619 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_downloadTaskWithURL_ = + objc.registerName("downloadTaskWithURL:"); +final _objc_msgSend_620 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_downloadTaskWithResumeData_ = + objc.registerName("downloadTaskWithResumeData:"); +final _objc_msgSend_621 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class NSURLSessionStreamTask extends NSURLSessionTask { + NSURLSessionStreamTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLSessionStreamTask] that points to the same underlying object as [other]. + NSURLSessionStreamTask.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSURLSessionStreamTask] that wraps the given raw object pointer. + NSURLSessionStreamTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLSessionStreamTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionStreamTask); } - void flushWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { - _lib._objc_msgSend_532( - _id, _lib._sel_flushWithCompletionHandler_1, completionHandler._id); + void readDataOfMinLength_maxLength_timeout_completionHandler_( + int minBytes, + int maxBytes, + double timeout, + ObjCBlock_ffiVoid_NSData_bool_NSError completionHandler) { + _objc_msgSend_622( + this.pointer, + _sel_readDataOfMinLength_maxLength_timeout_completionHandler_, + minBytes, + maxBytes, + timeout, + completionHandler.pointer); } - void getTasksWithCompletionHandler_( - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray completionHandler) { - _lib._objc_msgSend_1058( - _id, _lib._sel_getTasksWithCompletionHandler_1, completionHandler._id); + void writeData_timeout_completionHandler_(objc.NSData data, double timeout, + ObjCBlock_ffiVoid_NSError completionHandler) { + _objc_msgSend_623(this.pointer, _sel_writeData_timeout_completionHandler_, + data.pointer, timeout, completionHandler.pointer); } - void getAllTasksWithCompletionHandler_( - ObjCBlock_ffiVoid_NSArray1 completionHandler) { - _lib._objc_msgSend_1059(_id, _lib._sel_getAllTasksWithCompletionHandler_1, - completionHandler._id); + void captureStreams() { + _objc_msgSend_82(this.pointer, _sel_captureStreams); } - NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest request) { - final _ret = _lib._objc_msgSend_1060( - _id, _lib._sel_dataTaskWithRequest_1, request._id); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + void closeWrite() { + _objc_msgSend_82(this.pointer, _sel_closeWrite); } - NSURLSessionDataTask dataTaskWithURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_1061(_id, _lib._sel_dataTaskWithURL_1, url._id); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + void closeRead() { + _objc_msgSend_82(this.pointer, _sel_closeRead); } - NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( - NSURLRequest request, NSURL fileURL) { - final _ret = _lib._objc_msgSend_1063(_id, - _lib._sel_uploadTaskWithRequest_fromFile_1, request._id, fileURL._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + void startSecureConnection() { + _objc_msgSend_82(this.pointer, _sel_startSecureConnection); } - NSURLSessionUploadTask uploadTaskWithRequest_fromData_( - NSURLRequest request, NSData bodyData) { - final _ret = _lib._objc_msgSend_1064(_id, - _lib._sel_uploadTaskWithRequest_fromData_1, request._id, bodyData._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + void stopSecureConnection() { + _objc_msgSend_82(this.pointer, _sel_stopSecureConnection); } - NSURLSessionUploadTask uploadTaskWithResumeData_(NSData resumeData) { - final _ret = _lib._objc_msgSend_1065( - _id, _lib._sel_uploadTaskWithResumeData_1, resumeData._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + @override + NSURLSessionStreamTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); } - NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest request) { - final _ret = _lib._objc_msgSend_1066( - _id, _lib._sel_uploadTaskWithStreamedRequest_1, request._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + static NSURLSessionStreamTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionStreamTask, _sel_new); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); } - NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest request) { - final _ret = _lib._objc_msgSend_1067( - _id, _lib._sel_downloadTaskWithRequest_1, request._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + static NSURLSessionStreamTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionStreamTask, _sel_allocWithZone_, zone); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); } - NSURLSessionDownloadTask downloadTaskWithURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_1068(_id, _lib._sel_downloadTaskWithURL_1, url._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + static NSURLSessionStreamTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionStreamTask, _sel_alloc); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); } - NSURLSessionDownloadTask downloadTaskWithResumeData_(NSData resumeData) { - final _ret = _lib._objc_msgSend_1069( - _id, _lib._sel_downloadTaskWithResumeData_1, resumeData._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionStreamTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSURLSessionStreamTask streamTaskWithHostName_port_( - NSString hostname, int port) { - final _ret = _lib._objc_msgSend_1072( - _id, _lib._sel_streamTaskWithHostName_port_1, hostname._id, port); - return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionStreamTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSURLSessionStreamTask streamTaskWithNetService_(NSNetService service) { - final _ret = _lib._objc_msgSend_1080( - _id, _lib._sel_streamTaskWithNetService_1, service._id); - return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLSessionStreamTask, _sel_accessInstanceVariablesDirectly); } - NSURLSessionWebSocketTask webSocketTaskWithURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_1087(_id, _lib._sel_webSocketTaskWithURL_1, url._id); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSURLSessionStreamTask, _sel_useStoredAccessor); } - NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( - NSURL url, NSArray protocols) { - final _ret = _lib._objc_msgSend_1088(_id, - _lib._sel_webSocketTaskWithURL_protocols_1, url._id, protocols._id); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionStreamTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest request) { - final _ret = _lib._objc_msgSend_1089( - _id, _lib._sel_webSocketTaskWithRequest_1, request._id); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionStreamTask, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - @override - NSURLSession init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSession._(_ret, _lib, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionStreamTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSURLSession new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_new1); - return NSURLSession._(_ret, _lib, retain: false, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionStreamTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSURLSessionDataTask dataTaskWithRequest_completionHandler_( - NSURLRequest request, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_1090( - _id, - _lib._sel_dataTaskWithRequest_completionHandler_1, - request._id, - completionHandler._id); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionStreamTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - NSURLSessionDataTask dataTaskWithURL_completionHandler_(NSURL url, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_1091( - _id, - _lib._sel_dataTaskWithURL_completionHandler_1, - url._id, - completionHandler._id); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); +late final _class_NSURLSessionStreamTask = + objc.getClass("NSURLSessionStreamTask"); +void _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Bool arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, bool, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry = , bool, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( + void Function( + ffi.Pointer, bool, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_NSData_bool_NSError extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSData_bool_NSError._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSData_bool_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSData_bool_NSError._(pointer, + retain: retain, release: release); } - NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( - NSURLRequest request, - NSURL fileURL, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_1092( - _id, - _lib._sel_uploadTaskWithRequest_fromFile_completionHandler_1, - request._id, - fileURL._id, - completionHandler._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData_bool_NSError.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Bool arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData_bool_NSError.fromFunction( + void Function(objc.NSData, bool, objc.NSError?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( + (ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) => + fn(objc.NSData.castFromPointer(arg0, retain: true, release: true), arg1, arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSData_bool_NSError.listener( + void Function(objc.NSData, bool, objc.NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Bool, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( + (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn( + objc.NSData.castFromPointer(arg0, + retain: true, release: true), + arg1, + arg2.address == 0 + ? null + : objc.NSError.castFromPointer(arg2, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(objc.NSData arg0, bool arg1, objc.NSError? arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1, arg2?.pointer ?? ffi.nullptr); +} + +late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_ = objc + .registerName("readDataOfMinLength:maxLength:timeout:completionHandler:"); +final _objc_msgSend_622 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Double, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + double, + ffi.Pointer)>(); +late final _sel_writeData_timeout_completionHandler_ = + objc.registerName("writeData:timeout:completionHandler:"); +final _objc_msgSend_623 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer)>(); +late final _sel_captureStreams = objc.registerName("captureStreams"); +late final _sel_closeWrite = objc.registerName("closeWrite"); +late final _sel_closeRead = objc.registerName("closeRead"); +late final _sel_startSecureConnection = + objc.registerName("startSecureConnection"); +late final _sel_stopSecureConnection = + objc.registerName("stopSecureConnection"); +late final _sel_streamTaskWithHostName_port_ = + objc.registerName("streamTaskWithHostName:port:"); +final _objc_msgSend_624 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); + +class NSNetService extends objc.NSObject { + NSNetService._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSNetService] that points to the same underlying object as [other]. + NSNetService.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSNetService] that wraps the given raw object pointer. + NSNetService.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSNetService]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSNetService); } - NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( - NSURLRequest request, - NSData? bodyData, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_1093( - _id, - _lib._sel_uploadTaskWithRequest_fromData_completionHandler_1, - request._id, - bodyData?._id ?? ffi.nullptr, - completionHandler._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + NSNetService initWithDomain_type_name_port_( + objc.NSString domain, objc.NSString type, objc.NSString name, int port) { + final _ret = _objc_msgSend_625( + this.pointer, + _sel_initWithDomain_type_name_port_, + domain.pointer, + type.pointer, + name.pointer, + port); + return NSNetService.castFromPointer(_ret, retain: true, release: true); } - NSURLSessionUploadTask uploadTaskWithResumeData_completionHandler_( - NSData resumeData, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_1094( - _id, - _lib._sel_uploadTaskWithResumeData_completionHandler_1, - resumeData._id, - completionHandler._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + NSNetService initWithDomain_type_name_( + objc.NSString domain, objc.NSString type, objc.NSString name) { + final _ret = _objc_msgSend_626(this.pointer, _sel_initWithDomain_type_name_, + domain.pointer, type.pointer, name.pointer); + return NSNetService.castFromPointer(_ret, retain: true, release: true); } - NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( - NSURLRequest request, - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_1095( - _id, - _lib._sel_downloadTaskWithRequest_completionHandler_1, - request._id, - completionHandler._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_scheduleInRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); } - NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_(NSURL url, - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_1096( - _id, - _lib._sel_downloadTaskWithURL_completionHandler_1, - url._id, - completionHandler._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_removeFromRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); } - NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( - NSData resumeData, - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_1097( - _id, - _lib._sel_downloadTaskWithResumeData_completionHandler_1, - resumeData._id, - completionHandler._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSURLSession allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLSession1, _lib._sel_allocWithZone_1, zone); - return NSURLSession._(_ret, _lib, retain: false, release: true); + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } - static NSURLSession alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_alloc1); - return NSURLSession._(_ret, _lib, retain: false, release: true); + bool get includesPeerToPeer { + return _objc_msgSend_7(this.pointer, _sel_includesPeerToPeer); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLSession1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + set includesPeerToPeer(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setIncludesPeerToPeer_, value); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLSession1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + objc.NSString get name { + final _ret = _objc_msgSend_12(this.pointer, _sel_name); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLSession1, _lib._sel_accessInstanceVariablesDirectly1); + objc.NSString get type { + final _ret = _objc_msgSend_12(this.pointer, _sel_type); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLSession1, _lib._sel_useStoredAccessor1); + objc.NSString get domain { + final _ret = _objc_msgSend_12(this.pointer, _sel_domain); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLSession1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + objc.NSString? get hostName { + final _ret = _objc_msgSend_13(this.pointer, _sel_hostName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLSession1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + objc.NSArray? get addresses { + final _ret = _objc_msgSend_69(this.pointer, _sel_addresses); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLSession1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + int get port { + return _objc_msgSend_114(this.pointer, _sel_port); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSURLSession1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + void publish() { + _objc_msgSend_82(this.pointer, _sel_publish); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSession1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + void publishWithOptions_(int options) { + _objc_msgSend_627(this.pointer, _sel_publishWithOptions_, options); } -} -class NSURLSessionConfiguration extends NSObject { - NSURLSessionConfiguration._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + void resolve() { + _objc_msgSend_82(this.pointer, _sel_resolve); + } - /// 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); + void stop() { + _objc_msgSend_82(this.pointer, _sel_stop); } - /// Returns a [NSURLSessionConfiguration] that wraps the given raw object pointer. - static NSURLSessionConfiguration castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionConfiguration._(other, lib, - retain: retain, release: release); + static objc.NSDictionary dictionaryFromTXTRecordData_(objc.NSData txtData) { + final _ret = _objc_msgSend_628(_class_NSNetService, + _sel_dictionaryFromTXTRecordData_, txtData.pointer); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSURLSessionConfiguration]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionConfiguration1); + static objc.NSData dataFromTXTRecordDictionary_( + objc.NSDictionary txtDictionary) { + final _ret = _objc_msgSend_629(_class_NSNetService, + _sel_dataFromTXTRecordDictionary_, txtDictionary.pointer); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionConfiguration getDefaultSessionConfiguration( - SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_1041(_lib._class_NSURLSessionConfiguration1, - _lib._sel_defaultSessionConfiguration1); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + void resolveWithTimeout_(double timeout) { + _objc_msgSend_630(this.pointer, _sel_resolveWithTimeout_, timeout); } - static NSURLSessionConfiguration getEphemeralSessionConfiguration( - SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_1041(_lib._class_NSURLSessionConfiguration1, - _lib._sel_ephemeralSessionConfiguration1); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + bool getInputStream_outputStream_( + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _objc_msgSend_631(this.pointer, _sel_getInputStream_outputStream_, + inputStream, outputStream); } - static NSURLSessionConfiguration - backgroundSessionConfigurationWithIdentifier_( - SwiftLibrary _lib, NSString identifier) { - final _ret = _lib._objc_msgSend_1042( - _lib._class_NSURLSessionConfiguration1, - _lib._sel_backgroundSessionConfigurationWithIdentifier_1, - identifier._id); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + bool setTXTRecordData_(objc.NSData? recordData) { + return _objc_msgSend_632(this.pointer, _sel_setTXTRecordData_, + recordData?.pointer ?? ffi.nullptr); } - NSString? get identifier { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_identifier1); + objc.NSData? TXTRecordData() { + final _ret = _objc_msgSend_325(this.pointer, _sel_TXTRecordData); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - int get requestCachePolicy { - return _lib._objc_msgSend_859(_id, _lib._sel_requestCachePolicy1); + void startMonitoring() { + _objc_msgSend_82(this.pointer, _sel_startMonitoring); } - set requestCachePolicy(int value) { - return _lib._objc_msgSend_1017( - _id, _lib._sel_setRequestCachePolicy_1, value); + void stopMonitoring() { + _objc_msgSend_82(this.pointer, _sel_stopMonitoring); } - double get timeoutIntervalForRequest { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret( - _id, _lib._sel_timeoutIntervalForRequest1) - : _lib._objc_msgSend_165(_id, _lib._sel_timeoutIntervalForRequest1); + @override + NSNetService init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSNetService.castFromPointer(_ret, retain: true, release: true); } - set timeoutIntervalForRequest(double value) { - return _lib._objc_msgSend_542( - _id, _lib._sel_setTimeoutIntervalForRequest_1, value); + static NSNetService new1() { + final _ret = _objc_msgSend_40(_class_NSNetService, _sel_new); + return NSNetService.castFromPointer(_ret, retain: false, release: true); } - double get timeoutIntervalForResource { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_165_fpret( - _id, _lib._sel_timeoutIntervalForResource1) - : _lib._objc_msgSend_165(_id, _lib._sel_timeoutIntervalForResource1); + static NSNetService allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSNetService, _sel_allocWithZone_, zone); + return NSNetService.castFromPointer(_ret, retain: false, release: true); } - set timeoutIntervalForResource(double value) { - return _lib._objc_msgSend_542( - _id, _lib._sel_setTimeoutIntervalForResource_1, value); + static NSNetService alloc() { + final _ret = _objc_msgSend_40(_class_NSNetService, _sel_alloc); + return NSNetService.castFromPointer(_ret, retain: false, release: true); } - int get networkServiceType { - return _lib._objc_msgSend_860(_id, _lib._sel_networkServiceType1); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSNetService, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - set networkServiceType(int value) { - return _lib._objc_msgSend_1018( - _id, _lib._sel_setNetworkServiceType_1, value); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSNetService, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - bool get allowsCellularAccess { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsCellularAccess1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSNetService, _sel_accessInstanceVariablesDirectly); } - set allowsCellularAccess(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setAllowsCellularAccess_1, value); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSNetService, _sel_useStoredAccessor); } - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_12(_id, _lib._sel_allowsExpensiveNetworkAccess1); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSNetService, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - set allowsExpensiveNetworkAccess(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSNetService, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - bool get allowsConstrainedNetworkAccess { - return _lib._objc_msgSend_12( - _id, _lib._sel_allowsConstrainedNetworkAccess1); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSNetService, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSNetService, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSNetService, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSNetService = objc.getClass("NSNetService"); +late final _sel_initWithDomain_type_name_port_ = + objc.registerName("initWithDomain:type:name:port:"); +final _objc_msgSend_625 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_initWithDomain_type_name_ = + objc.registerName("initWithDomain:type:name:"); +final _objc_msgSend_626 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_includesPeerToPeer = objc.registerName("includesPeerToPeer"); +late final _sel_setIncludesPeerToPeer_ = + objc.registerName("setIncludesPeerToPeer:"); +late final _sel_type = objc.registerName("type"); +late final _sel_publish = objc.registerName("publish"); - set allowsConstrainedNetworkAccess(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); - } +abstract class NSNetServiceOptions { + static const int NSNetServiceNoAutoRename = 1; + static const int NSNetServiceListenForConnections = 2; +} - bool get requiresDNSSECValidation { - return _lib._objc_msgSend_12(_id, _lib._sel_requiresDNSSECValidation1); - } +late final _sel_publishWithOptions_ = objc.registerName("publishWithOptions:"); +final _objc_msgSend_627 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_resolve = objc.registerName("resolve"); +late final _sel_stop = objc.registerName("stop"); +late final _sel_dictionaryFromTXTRecordData_ = + objc.registerName("dictionaryFromTXTRecordData:"); +final _objc_msgSend_628 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dataFromTXTRecordDictionary_ = + objc.registerName("dataFromTXTRecordDictionary:"); +final _objc_msgSend_629 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_resolveWithTimeout_ = objc.registerName("resolveWithTimeout:"); +final _objc_msgSend_630 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, double)>(); +late final _sel_getInputStream_outputStream_ = + objc.registerName("getInputStream:outputStream:"); +final _objc_msgSend_631 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); +late final _sel_setTXTRecordData_ = objc.registerName("setTXTRecordData:"); +final _objc_msgSend_632 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_TXTRecordData = objc.registerName("TXTRecordData"); +late final _sel_startMonitoring = objc.registerName("startMonitoring"); +late final _sel_stopMonitoring = objc.registerName("stopMonitoring"); +late final _sel_streamTaskWithNetService_ = + objc.registerName("streamTaskWithNetService:"); +final _objc_msgSend_633 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - set requiresDNSSECValidation(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setRequiresDNSSECValidation_1, value); - } +class NSURLSessionWebSocketTask extends NSURLSessionTask { + NSURLSessionWebSocketTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - bool get waitsForConnectivity { - return _lib._objc_msgSend_12(_id, _lib._sel_waitsForConnectivity1); - } + /// Constructs a [NSURLSessionWebSocketTask] that points to the same underlying object as [other]. + NSURLSessionWebSocketTask.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - set waitsForConnectivity(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setWaitsForConnectivity_1, value); - } + /// Constructs a [NSURLSessionWebSocketTask] that wraps the given raw object pointer. + NSURLSessionWebSocketTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - bool get discretionary { - return _lib._objc_msgSend_12(_id, _lib._sel_isDiscretionary1); + /// Returns whether [obj] is an instance of [NSURLSessionWebSocketTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionWebSocketTask); } - set discretionary(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setDiscretionary_1, value); + void sendMessage_completionHandler_(NSURLSessionWebSocketMessage message, + ObjCBlock_ffiVoid_NSError completionHandler) { + _objc_msgSend_635(this.pointer, _sel_sendMessage_completionHandler_, + message.pointer, completionHandler.pointer); } - NSString? get sharedContainerIdentifier { - final _ret = - _lib._objc_msgSend_44(_id, _lib._sel_sharedContainerIdentifier1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + void receiveMessageWithCompletionHandler_( + ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError + completionHandler) { + _objc_msgSend_636(this.pointer, _sel_receiveMessageWithCompletionHandler_, + completionHandler.pointer); } - set sharedContainerIdentifier(NSString? value) { - return _lib._objc_msgSend_545(_id, _lib._sel_setSharedContainerIdentifier_1, - value?._id ?? ffi.nullptr); + void sendPingWithPongReceiveHandler_( + ObjCBlock_ffiVoid_NSError pongReceiveHandler) { + _objc_msgSend_637(this.pointer, _sel_sendPingWithPongReceiveHandler_, + pongReceiveHandler.pointer); } - bool get sessionSendsLaunchEvents { - return _lib._objc_msgSend_12(_id, _lib._sel_sessionSendsLaunchEvents1); + void cancelWithCloseCode_reason_(int closeCode, objc.NSData? reason) { + _objc_msgSend_638(this.pointer, _sel_cancelWithCloseCode_reason_, closeCode, + reason?.pointer ?? ffi.nullptr); } - set sessionSendsLaunchEvents(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setSessionSendsLaunchEvents_1, value); + int get maximumMessageSize { + return _objc_msgSend_114(this.pointer, _sel_maximumMessageSize); } - NSDictionary? get connectionProxyDictionary { - final _ret = - _lib._objc_msgSend_390(_id, _lib._sel_connectionProxyDictionary1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + set maximumMessageSize(int value) { + return _objc_msgSend_134(this.pointer, _sel_setMaximumMessageSize_, value); } - set connectionProxyDictionary(NSDictionary? value) { - return _lib._objc_msgSend_634(_id, _lib._sel_setConnectionProxyDictionary_1, - value?._id ?? ffi.nullptr); + int get closeCode { + return _objc_msgSend_639(this.pointer, _sel_closeCode); } - int get TLSMinimumSupportedProtocol { - return _lib._objc_msgSend_1043(_id, _lib._sel_TLSMinimumSupportedProtocol1); + objc.NSData? get closeReason { + final _ret = _objc_msgSend_325(this.pointer, _sel_closeReason); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - set TLSMinimumSupportedProtocol(int value) { - return _lib._objc_msgSend_1044( - _id, _lib._sel_setTLSMinimumSupportedProtocol_1, value); + @override + NSURLSessionWebSocketTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } - int get TLSMaximumSupportedProtocol { - return _lib._objc_msgSend_1043(_id, _lib._sel_TLSMaximumSupportedProtocol1); + static NSURLSessionWebSocketTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionWebSocketTask, _sel_new); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); } - set TLSMaximumSupportedProtocol(int value) { - return _lib._objc_msgSend_1044( - _id, _lib._sel_setTLSMaximumSupportedProtocol_1, value); + static NSURLSessionWebSocketTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionWebSocketTask, _sel_allocWithZone_, zone); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); } - int get TLSMinimumSupportedProtocolVersion { - return _lib._objc_msgSend_1045( - _id, _lib._sel_TLSMinimumSupportedProtocolVersion1); + static NSURLSessionWebSocketTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionWebSocketTask, _sel_alloc); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); } - set TLSMinimumSupportedProtocolVersion(int value) { - return _lib._objc_msgSend_1046( - _id, _lib._sel_setTLSMinimumSupportedProtocolVersion_1, value); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionWebSocketTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - int get TLSMaximumSupportedProtocolVersion { - return _lib._objc_msgSend_1045( - _id, _lib._sel_TLSMaximumSupportedProtocolVersion1); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionWebSocketTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - set TLSMaximumSupportedProtocolVersion(int value) { - return _lib._objc_msgSend_1046( - _id, _lib._sel_setTLSMaximumSupportedProtocolVersion_1, value); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLSessionWebSocketTask, _sel_accessInstanceVariablesDirectly); } - bool get HTTPShouldUsePipelining { - return _lib._objc_msgSend_12(_id, _lib._sel_HTTPShouldUsePipelining1); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSURLSessionWebSocketTask, _sel_useStoredAccessor); } - set HTTPShouldUsePipelining(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setHTTPShouldUsePipelining_1, value); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionWebSocketTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - bool get HTTPShouldSetCookies { - return _lib._objc_msgSend_12(_id, _lib._sel_HTTPShouldSetCookies1); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionWebSocketTask, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - set HTTPShouldSetCookies(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setHTTPShouldSetCookies_1, value); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionWebSocketTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - int get HTTPCookieAcceptPolicy { - return _lib._objc_msgSend_856(_id, _lib._sel_HTTPCookieAcceptPolicy1); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionWebSocketTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set HTTPCookieAcceptPolicy(int value) { - return _lib._objc_msgSend_857( - _id, _lib._sel_setHTTPCookieAcceptPolicy_1, value); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionWebSocketTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - NSDictionary? get HTTPAdditionalHeaders { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_HTTPAdditionalHeaders1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } +late final _class_NSURLSessionWebSocketTask = + objc.getClass("NSURLSessionWebSocketTask"); - set HTTPAdditionalHeaders(NSDictionary? value) { - return _lib._objc_msgSend_634( - _id, _lib._sel_setHTTPAdditionalHeaders_1, value?._id ?? ffi.nullptr); - } +class NSURLSessionWebSocketMessage extends objc.NSObject { + NSURLSessionWebSocketMessage._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - int get HTTPMaximumConnectionsPerHost { - return _lib._objc_msgSend_83(_id, _lib._sel_HTTPMaximumConnectionsPerHost1); - } + /// Constructs a [NSURLSessionWebSocketMessage] that points to the same underlying object as [other]. + NSURLSessionWebSocketMessage.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - set HTTPMaximumConnectionsPerHost(int value) { - return _lib._objc_msgSend_635( - _id, _lib._sel_setHTTPMaximumConnectionsPerHost_1, value); - } + /// Constructs a [NSURLSessionWebSocketMessage] that wraps the given raw object pointer. + NSURLSessionWebSocketMessage.castFromPointer( + ffi.Pointer other, + {bool retain = false, + bool release = false}) + : this._(other, retain: retain, release: release); - NSHTTPCookieStorage? get HTTPCookieStorage { - final _ret = _lib._objc_msgSend_1047(_id, _lib._sel_HTTPCookieStorage1); - return _ret.address == 0 - ? null - : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSURLSessionWebSocketMessage]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionWebSocketMessage); } - set HTTPCookieStorage(NSHTTPCookieStorage? value) { - return _lib._objc_msgSend_1048( - _id, _lib._sel_setHTTPCookieStorage_1, value?._id ?? ffi.nullptr); + NSURLSessionWebSocketMessage initWithData_(objc.NSData data) { + final _ret = + _objc_msgSend_340(this.pointer, _sel_initWithData_, data.pointer); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: true, release: true); } - NSURLCredentialStorage? get URLCredentialStorage { - final _ret = _lib._objc_msgSend_1049(_id, _lib._sel_URLCredentialStorage1); - return _ret.address == 0 - ? null - : NSURLCredentialStorage._(_ret, _lib, retain: true, release: true); + NSURLSessionWebSocketMessage initWithString_(objc.NSString string) { + final _ret = + _objc_msgSend_35(this.pointer, _sel_initWithString_, string.pointer); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: true, release: true); } - set URLCredentialStorage(NSURLCredentialStorage? value) { - return _lib._objc_msgSend_1050( - _id, _lib._sel_setURLCredentialStorage_1, value?._id ?? ffi.nullptr); + int get type { + return _objc_msgSend_634(this.pointer, _sel_type); } - NSURLCache? get URLCache { - final _ret = _lib._objc_msgSend_1051(_id, _lib._sel_URLCache1); + objc.NSData? get data { + final _ret = _objc_msgSend_325(this.pointer, _sel_data); return _ret.address == 0 ? null - : NSURLCache._(_ret, _lib, retain: true, release: true); - } - - set URLCache(NSURLCache? value) { - return _lib._objc_msgSend_1052( - _id, _lib._sel_setURLCache_1, value?._id ?? ffi.nullptr); - } - - bool get shouldUseExtendedBackgroundIdleMode { - return _lib._objc_msgSend_12( - _id, _lib._sel_shouldUseExtendedBackgroundIdleMode1); - } - - set shouldUseExtendedBackgroundIdleMode(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setShouldUseExtendedBackgroundIdleMode_1, value); + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - NSArray? get protocolClasses { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_protocolClasses1); + objc.NSString? get string { + final _ret = _objc_msgSend_13(this.pointer, _sel_string); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - set protocolClasses(NSArray? value) { - return _lib._objc_msgSend_1053( - _id, _lib._sel_setProtocolClasses_1, value?._id ?? ffi.nullptr); - } - - int get multipathServiceType { - return _lib._objc_msgSend_1054(_id, _lib._sel_multipathServiceType1); - } - - set multipathServiceType(int value) { - return _lib._objc_msgSend_1055( - _id, _lib._sel_setMultipathServiceType_1, value); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } @override - NSURLSessionConfiguration init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + NSURLSessionWebSocketMessage init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: true, release: true); } - static NSURLSessionConfiguration new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionConfiguration1, _lib._sel_new1); - return NSURLSessionConfiguration._(_ret, _lib, + static NSURLSessionWebSocketMessage new1() { + final _ret = + _objc_msgSend_40(_class_NSURLSessionWebSocketMessage, _sel_new); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, retain: false, release: true); } - static NSURLSessionConfiguration backgroundSessionConfiguration_( - SwiftLibrary _lib, NSString identifier) { - final _ret = _lib._objc_msgSend_1042(_lib._class_NSURLSessionConfiguration1, - _lib._sel_backgroundSessionConfiguration_1, identifier._id); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } - - static NSURLSessionConfiguration allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3(_lib._class_NSURLSessionConfiguration1, - _lib._sel_allocWithZone_1, zone); - return NSURLSessionConfiguration._(_ret, _lib, + static NSURLSessionWebSocketMessage allocWithZone_( + ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionWebSocketMessage, _sel_allocWithZone_, zone); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, retain: false, release: true); } - static NSURLSessionConfiguration alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionConfiguration1, _lib._sel_alloc1); - return NSURLSessionConfiguration._(_ret, _lib, + static NSURLSessionWebSocketMessage alloc() { + final _ret = + _objc_msgSend_40(_class_NSURLSessionWebSocketMessage, _sel_alloc); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLSessionConfiguration1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionWebSocketMessage, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLSessionConfiguration1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionWebSocketMessage, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLSessionConfiguration1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7(_class_NSURLSessionWebSocketMessage, + _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLSessionConfiguration1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSURLSessionWebSocketMessage, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLSessionConfiguration1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionWebSocketMessage, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLSessionConfiguration1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionWebSocketMessage, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLSessionConfiguration1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionWebSocketMessage, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSURLSessionConfiguration1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6(_class_NSURLSessionWebSocketMessage, + _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLSessionConfiguration1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionWebSocketMessage, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -abstract class SSLProtocol { - static const int kSSLProtocolUnknown = 0; - static const int kTLSProtocol1 = 4; - static const int kTLSProtocol11 = 7; - static const int kTLSProtocol12 = 8; - static const int kDTLSProtocol1 = 9; - static const int kTLSProtocol13 = 10; - static const int kDTLSProtocol12 = 11; - static const int kTLSProtocolMaxSupported = 999; - static const int kSSLProtocol2 = 1; - static const int kSSLProtocol3 = 2; - static const int kSSLProtocol3Only = 3; - static const int kTLSProtocol1Only = 5; - static const int kSSLProtocolAll = 6; +late final _class_NSURLSessionWebSocketMessage = + objc.getClass("NSURLSessionWebSocketMessage"); + +abstract class NSURLSessionWebSocketMessageType { + static const int NSURLSessionWebSocketMessageTypeData = 0; + static const int NSURLSessionWebSocketMessageTypeString = 1; +} + +final _objc_msgSend_634 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_sendMessage_completionHandler_ = + objc.registerName("sendMessage:completionHandler:"); +final _objc_msgSend_635 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( + void Function( + ffi.Pointer, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry[id] = + fn; + return ffi.Pointer.fromAddress(id); } -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; -} +void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.fromFunction( + void Function(NSURLSessionWebSocketMessage?, objc.NSError?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSURLSessionWebSocketMessage.castFromPointer(arg0, + retain: true, release: true), + arg1.address == 0 ? null : objc.NSError.castFromPointer(arg1, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.listener( + void Function(NSURLSessionWebSocketMessage?, objc.NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSURLSessionWebSocketMessage.castFromPointer(arg0, + retain: true, release: true), + arg1.address == 0 + ? null + : objc.NSError.castFromPointer(arg1, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSURLSessionWebSocketMessage? arg0, objc.NSError? arg1) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr, arg1?.pointer ?? ffi.nullptr); +} + +late final _sel_receiveMessageWithCompletionHandler_ = + objc.registerName("receiveMessageWithCompletionHandler:"); +final _objc_msgSend_636 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_sendPingWithPongReceiveHandler_ = + objc.registerName("sendPingWithPongReceiveHandler:"); +final _objc_msgSend_637 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); -abstract class NSURLSessionMultipathServiceType { - static const int NSURLSessionMultipathServiceTypeNone = 0; - static const int NSURLSessionMultipathServiceTypeHandover = 1; - static const int NSURLSessionMultipathServiceTypeInteractive = 2; - static const int NSURLSessionMultipathServiceTypeAggregate = 3; +abstract class NSURLSessionWebSocketCloseCode { + static const int NSURLSessionWebSocketCloseCodeInvalid = 0; + static const int NSURLSessionWebSocketCloseCodeNormalClosure = 1000; + static const int NSURLSessionWebSocketCloseCodeGoingAway = 1001; + static const int NSURLSessionWebSocketCloseCodeProtocolError = 1002; + static const int NSURLSessionWebSocketCloseCodeUnsupportedData = 1003; + static const int NSURLSessionWebSocketCloseCodeNoStatusReceived = 1005; + static const int NSURLSessionWebSocketCloseCodeAbnormalClosure = 1006; + static const int NSURLSessionWebSocketCloseCodeInvalidFramePayloadData = 1007; + static const int NSURLSessionWebSocketCloseCodePolicyViolation = 1008; + static const int NSURLSessionWebSocketCloseCodeMessageTooBig = 1009; + static const int NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing = + 1010; + static const int NSURLSessionWebSocketCloseCodeInternalServerError = 1011; + static const int NSURLSessionWebSocketCloseCodeTLSHandshakeFailure = 1015; } -void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => +late final _sel_cancelWithCloseCode_reason_ = + objc.registerName("cancelWithCloseCode:reason:"); +final _objc_msgSend_638 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_maximumMessageSize = objc.registerName("maximumMessageSize"); +late final _sel_setMaximumMessageSize_ = + objc.registerName("setMaximumMessageSize:"); +late final _sel_closeCode = objc.registerName("closeCode"); +final _objc_msgSend_639 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_closeReason = objc.registerName("closeReason"); +late final _sel_webSocketTaskWithURL_ = + objc.registerName("webSocketTaskWithURL:"); +final _objc_msgSend_640 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_webSocketTaskWithURL_protocols_ = + objc.registerName("webSocketTaskWithURL:protocols:"); +final _objc_msgSend_641 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_webSocketTaskWithRequest_ = + objc.registerName("webSocketTaskWithRequest:"); +final _objc_msgSend_642 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() .asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistryIndex = 0; + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistryIndex = 0; ffi.Pointer - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer) + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry[id] = fn; + final id = + ++_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry[ +void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry[ block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); +class ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSArray_NSArray_NSArray castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSArray_NSArray_NSArray._(pointer, lib, + static ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError._(pointer, retain: retain, release: release); } @@ -69980,27 +30789,24 @@ class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.fromFunctionPointer( - SwiftLibrary lib, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline) + .cast(), + ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. @@ -70008,23 +30814,21 @@ class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.fromFunction(SwiftLibrary lib, void Function(NSArray, NSArray, NSArray) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.fromFunction( + void Function(objc.NSData?, NSURLResponse?, objc.NSError?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) .cast(), - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - NSArray._(arg0, lib, retain: true, release: true), - NSArray._(arg1, lib, retain: true, release: true), - NSArray._(arg2, lib, retain: true, release: true)))), - lib); + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 ? null : objc.NSData.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -70036,80 +30840,190 @@ class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.listener(SwiftLibrary lib, void Function(NSArray, NSArray, NSArray) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.listener( + void Function(objc.NSData?, NSURLResponse?, objc.NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - NSArray._(arg0, lib, retain: true, release: true), - NSArray._(arg1, lib, retain: true, release: true), - NSArray._(arg2, lib, retain: true, release: true)))), - lib); + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))))); static ffi.NativeCallable< ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSArray arg0, NSArray arg1, NSArray arg2) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1._id, arg2._id); -} + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; -void _ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + void call(objc.NSData? arg0, NSURLResponse? arg1, objc.NSError? arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, + arg0?.pointer ?? ffi.nullptr, + arg1?.pointer ?? ffi.nullptr, + arg2?.pointer ?? ffi.nullptr); +} + +late final _sel_dataTaskWithRequest_completionHandler_ = + objc.registerName("dataTaskWithRequest:completionHandler:"); +final _objc_msgSend_643 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_dataTaskWithURL_completionHandler_ = + objc.registerName("dataTaskWithURL:completionHandler:"); +final _objc_msgSend_644 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_uploadTaskWithRequest_fromFile_completionHandler_ = + objc.registerName("uploadTaskWithRequest:fromFile:completionHandler:"); +final _objc_msgSend_645 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_uploadTaskWithRequest_fromData_completionHandler_ = + objc.registerName("uploadTaskWithRequest:fromData:completionHandler:"); +final _objc_msgSend_646 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_uploadTaskWithResumeData_completionHandler_ = + objc.registerName("uploadTaskWithResumeData:completionHandler:"); +final _objc_msgSend_647 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => block.ref.target .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSArray1_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSArray1_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSArray1_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSArray1_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSArray1_closureRegistry[id] = fn; + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSArray1_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSArray1_closureRegistry[block.ref.target.address]!( - arg0); +void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock_ffiVoid_NSArray1 extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSArray1._(ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); +class ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSArray1 castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSArray1._(pointer, lib, + static ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError._(pointer, retain: retain, release: release); } @@ -70118,22 +31032,24 @@ class ObjCBlock_ffiVoid_NSArray1 extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSArray1.fromFunctionPointer( - SwiftLibrary lib, + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> ptr) - : this._( - lib - ._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline) + .cast(), + ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. @@ -70141,19 +31057,21 @@ class ObjCBlock_ffiVoid_NSArray1 extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSArray1.fromFunction( - SwiftLibrary lib, void Function(NSArray) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.fromFunction( + void Function(objc.NSURL?, NSURLResponse?, objc.NSError?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) .cast(), - _ObjCBlock_ffiVoid_NSArray1_registerClosure( - (ffi.Pointer arg0) => - fn(NSArray._(arg0, lib, retain: true, release: true)))), - lib); + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 ? null : objc.NSURL.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -70165,591 +31083,568 @@ class ObjCBlock_ffiVoid_NSArray1 extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSArray1.listener( - SwiftLibrary lib, void Function(NSArray) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.listener( + void Function(objc.NSURL?, NSURLResponse?, objc.NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSArray1_registerClosure( - (ffi.Pointer arg0) => - fn(NSArray._(arg0, lib, retain: true, release: true)))), - lib); + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure((ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : objc.NSURL.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))))); static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; - void call(NSArray arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0._id); -} + void call(objc.NSURL? arg0, NSURLResponse? arg1, objc.NSError? arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, + arg0?.pointer ?? ffi.nullptr, + arg1?.pointer ?? ffi.nullptr, + arg2?.pointer ?? ffi.nullptr); +} + +late final _sel_downloadTaskWithRequest_completionHandler_ = + objc.registerName("downloadTaskWithRequest:completionHandler:"); +final _objc_msgSend_648 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_downloadTaskWithURL_completionHandler_ = + objc.registerName("downloadTaskWithURL:completionHandler:"); +final _objc_msgSend_649 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_downloadTaskWithResumeData_completionHandler_ = + objc.registerName("downloadTaskWithResumeData:completionHandler:"); +final _objc_msgSend_650 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); -class NSURLSessionUploadTask extends NSURLSessionDataTask { - NSURLSessionUploadTask._(ffi.Pointer id, SwiftLibrary lib, +class NSProtocolChecker extends NSProxy { + NSProtocolChecker._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [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); - } + /// Constructs a [NSProtocolChecker] that points to the same underlying object as [other]. + NSProtocolChecker.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSURLSessionUploadTask] that wraps the given raw object pointer. - static NSURLSessionUploadTask castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionUploadTask._(other, lib, - retain: retain, release: release); - } + /// Constructs a [NSProtocolChecker] that wraps the given raw object pointer. + NSProtocolChecker.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSURLSessionUploadTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionUploadTask1); + /// Returns whether [obj] is an instance of [NSProtocolChecker]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSProtocolChecker); } - @override - NSURLSessionUploadTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + objc.Protocol get protocol { + final _ret = _objc_msgSend_651(this.pointer, _sel_protocol); + return objc.Protocol.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionUploadTask new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionUploadTask1, _lib._sel_new1); - return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); + objc.NSObject? get target { + final _ret = _objc_msgSend_457(this.pointer, _sel_target); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void cancelByProducingResumeData_( - ObjCBlock_ffiVoid_NSData completionHandler) { - _lib._objc_msgSend_1062( - _id, _lib._sel_cancelByProducingResumeData_1, completionHandler._id); + static NSProtocolChecker protocolCheckerWithTarget_protocol_( + objc.NSObject anObject, objc.Protocol aProtocol) { + final _ret = _objc_msgSend_652( + _class_NSProtocolChecker, + _sel_protocolCheckerWithTarget_protocol_, + anObject.pointer, + aProtocol.pointer); + return NSProtocolChecker.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionUploadTask allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLSessionUploadTask1, _lib._sel_allocWithZone_1, zone); - return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); - } + NSProtocolChecker initWithTarget_protocol_( + objc.NSObject anObject, objc.Protocol aProtocol) { + final _ret = _objc_msgSend_652(this.pointer, _sel_initWithTarget_protocol_, + anObject.pointer, aProtocol.pointer); + return NSProtocolChecker.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject alloc() { + final _ret = _objc_msgSend_40(_class_NSProtocolChecker, _sel_alloc); + return objc.NSObject.castFromPointer(_ret, retain: false, release: true); + } + + static bool respondsToSelector_(ffi.Pointer aSelector) { + return _objc_msgSend_228( + _class_NSProtocolChecker, _sel_respondsToSelector_, aSelector); + } +} + +late final _class_NSProtocolChecker = objc.getClass("NSProtocolChecker"); +final _objc_msgSend_651 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_target = objc.registerName("target"); +late final _sel_protocolCheckerWithTarget_protocol_ = + objc.registerName("protocolCheckerWithTarget:protocol:"); +final _objc_msgSend_652 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithTarget_protocol_ = + objc.registerName("initWithTarget:protocol:"); + +class NSTask extends objc.NSObject { + NSTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - static NSURLSessionUploadTask alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionUploadTask1, _lib._sel_alloc1); - return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); - } + /// Constructs a [NSTask] that points to the same underlying object as [other]. + NSTask.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLSessionUploadTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); - } + /// Constructs a [NSTask] that wraps the given raw object pointer. + NSTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLSessionUploadTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + /// Returns whether [obj] is an instance of [NSTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSTask); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLSessionUploadTask1, - _lib._sel_accessInstanceVariablesDirectly1); + @override + NSTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSTask.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLSessionUploadTask1, _lib._sel_useStoredAccessor1); + objc.NSURL? get executableURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_executableURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLSessionUploadTask1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + set executableURL(objc.NSURL? value) { + return _objc_msgSend_566( + this.pointer, _sel_setExecutableURL_, value?.pointer ?? ffi.nullptr); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLSessionUploadTask1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + objc.NSArray? get arguments { + final _ret = _objc_msgSend_69(this.pointer, _sel_arguments); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLSessionUploadTask1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + set arguments(objc.NSArray? value) { + return _objc_msgSend_605( + this.pointer, _sel_setArguments_, value?.pointer ?? ffi.nullptr); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSURLSessionUploadTask1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + objc.NSDictionary? get environment { + final _ret = _objc_msgSend_65(this.pointer, _sel_environment); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLSessionUploadTask1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + set environment(objc.NSDictionary? value) { + return _objc_msgSend_173( + this.pointer, _sel_setEnvironment_, value?.pointer ?? ffi.nullptr); } -} - -void _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSData_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSData_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSData_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSData_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSData_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSData_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSData_closureRegistry[block.ref.target.address]!(arg0); - -class ObjCBlock_ffiVoid_NSData extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSData._(ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSData castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSData._(pointer, lib, - retain: retain, release: release); + objc.NSURL? get currentDirectoryURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_currentDirectoryURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSData.fromFunctionPointer( - SwiftLibrary 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>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSData.fromFunction( - SwiftLibrary lib, void Function(NSData?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSData_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSData._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSData.listener(SwiftLibrary lib, void Function(NSData?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSData_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSData._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(NSData? arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); -} + set currentDirectoryURL(objc.NSURL? value) { + return _objc_msgSend_566(this.pointer, _sel_setCurrentDirectoryURL_, + value?.pointer ?? ffi.nullptr); + } -class NSURLSessionDownloadTask extends NSURLSessionTask { - NSURLSessionDownloadTask._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + objc.NSData? get launchRequirementData { + final _ret = _objc_msgSend_325(this.pointer, _sel_launchRequirementData); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); + } - /// 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); + set launchRequirementData(objc.NSData? value) { + return _objc_msgSend_571(this.pointer, _sel_setLaunchRequirementData_, + value?.pointer ?? ffi.nullptr); } - /// Returns a [NSURLSessionDownloadTask] that wraps the given raw object pointer. - static NSURLSessionDownloadTask castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionDownloadTask._(other, lib, - retain: retain, release: release); + objc.NSObject? get standardInput { + final _ret = _objc_msgSend_66(this.pointer, _sel_standardInput); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - /// 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); + set standardInput(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setStandardInput_, value?.pointer ?? ffi.nullptr); } - void cancelByProducingResumeData_( - ObjCBlock_ffiVoid_NSData completionHandler) { - _lib._objc_msgSend_1062( - _id, _lib._sel_cancelByProducingResumeData_1, completionHandler._id); + objc.NSObject? get standardOutput { + final _ret = _objc_msgSend_66(this.pointer, _sel_standardOutput); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - @override - NSURLSessionDownloadTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + set standardOutput(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setStandardOutput_, value?.pointer ?? ffi.nullptr); } - static NSURLSessionDownloadTask new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionDownloadTask1, _lib._sel_new1); - return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); + objc.NSObject? get standardError { + final _ret = _objc_msgSend_66(this.pointer, _sel_standardError); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionDownloadTask allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLSessionDownloadTask1, _lib._sel_allocWithZone_1, zone); - return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); + set standardError(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setStandardError_, value?.pointer ?? ffi.nullptr); } - static NSURLSessionDownloadTask alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionDownloadTask1, _lib._sel_alloc1); - return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); + bool launchAndReturnError_(ffi.Pointer> error) { + return _objc_msgSend_8(this.pointer, _sel_launchAndReturnError_, error); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLSessionDownloadTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + void interrupt() { + _objc_msgSend_82(this.pointer, _sel_interrupt); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLSessionDownloadTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + void terminate() { + _objc_msgSend_82(this.pointer, _sel_terminate); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLSessionDownloadTask1, - _lib._sel_accessInstanceVariablesDirectly1); + bool suspend() { + return _objc_msgSend_7(this.pointer, _sel_suspend); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLSessionDownloadTask1, _lib._sel_useStoredAccessor1); + bool resume() { + return _objc_msgSend_7(this.pointer, _sel_resume); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLSessionDownloadTask1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + int get processIdentifier { + return _objc_msgSend_264(this.pointer, _sel_processIdentifier); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLSessionDownloadTask1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + bool get running { + return _objc_msgSend_7(this.pointer, _sel_isRunning); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLSessionDownloadTask1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + int get terminationStatus { + return _objc_msgSend_264(this.pointer, _sel_terminationStatus); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSURLSessionDownloadTask1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + int get terminationReason { + return _objc_msgSend_653(this.pointer, _sel_terminationReason); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLSessionDownloadTask1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + ObjCBlock_ffiVoid_NSTask? get terminationHandler { + final _ret = _objc_msgSend_654(this.pointer, _sel_terminationHandler); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid_NSTask.castFromPointer(_ret, + retain: true, release: true); } -} - -class NSURLSessionStreamTask extends NSURLSessionTask { - NSURLSessionStreamTask._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSURLSessionStreamTask] that points to the same underlying object as [other]. - static NSURLSessionStreamTask castFrom(T other) { - return NSURLSessionStreamTask._(other._id, other._lib, - retain: true, release: true); + set terminationHandler(ObjCBlock_ffiVoid_NSTask? value) { + return _objc_msgSend_655(this.pointer, _sel_setTerminationHandler_, + value?.pointer ?? ffi.nullptr); } - /// Returns a [NSURLSessionStreamTask] that wraps the given raw object pointer. - static NSURLSessionStreamTask castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionStreamTask._(other, lib, - retain: retain, release: release); + int get qualityOfService { + return _objc_msgSend_454(this.pointer, _sel_qualityOfService); } - /// 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); + set qualityOfService(int value) { + return _objc_msgSend_455(this.pointer, _sel_setQualityOfService_, value); } - void readDataOfMinLength_maxLength_timeout_completionHandler_( - int minBytes, - int maxBytes, - double timeout, - ObjCBlock_ffiVoid_NSData_bool_NSError completionHandler) { - _lib._objc_msgSend_1070( - _id, - _lib._sel_readDataOfMinLength_maxLength_timeout_completionHandler_1, - minBytes, - maxBytes, - timeout, - completionHandler._id); + static NSTask? + launchedTaskWithExecutableURL_arguments_error_terminationHandler_( + objc.NSURL url, + objc.NSArray arguments, + ffi.Pointer> error, + ObjCBlock_ffiVoid_NSTask? terminationHandler) { + final _ret = _objc_msgSend_656( + _class_NSTask, + _sel_launchedTaskWithExecutableURL_arguments_error_terminationHandler_, + url.pointer, + arguments.pointer, + error, + terminationHandler?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSTask.castFromPointer(_ret, retain: true, release: true); } - void writeData_timeout_completionHandler_(NSData data, double timeout, - ObjCBlock_ffiVoid_NSError completionHandler) { - _lib._objc_msgSend_1071( - _id, - _lib._sel_writeData_timeout_completionHandler_1, - data._id, - timeout, - completionHandler._id); + void waitUntilExit() { + _objc_msgSend_82(this.pointer, _sel_waitUntilExit); } - void captureStreams() { - _lib._objc_msgSend_1(_id, _lib._sel_captureStreams1); + objc.NSString? get launchPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_launchPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void closeWrite() { - _lib._objc_msgSend_1(_id, _lib._sel_closeWrite1); + set launchPath(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setLaunchPath_, value?.pointer ?? ffi.nullptr); } - void closeRead() { - _lib._objc_msgSend_1(_id, _lib._sel_closeRead1); + objc.NSString get currentDirectoryPath { + final _ret = _objc_msgSend_12(this.pointer, _sel_currentDirectoryPath); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void startSecureConnection() { - _lib._objc_msgSend_1(_id, _lib._sel_startSecureConnection1); + set currentDirectoryPath(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setCurrentDirectoryPath_, value.pointer); } - void stopSecureConnection() { - _lib._objc_msgSend_1(_id, _lib._sel_stopSecureConnection1); + void launch() { + _objc_msgSend_82(this.pointer, _sel_launch); } - @override - NSURLSessionStreamTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); + static NSTask launchedTaskWithLaunchPath_arguments_( + objc.NSString path, objc.NSArray arguments) { + final _ret = _objc_msgSend_657( + _class_NSTask, + _sel_launchedTaskWithLaunchPath_arguments_, + path.pointer, + arguments.pointer); + return NSTask.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionStreamTask new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionStreamTask1, _lib._sel_new1); - return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); + static NSTask new1() { + final _ret = _objc_msgSend_40(_class_NSTask, _sel_new); + return NSTask.castFromPointer(_ret, retain: false, release: true); } - static NSURLSessionStreamTask allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLSessionStreamTask1, _lib._sel_allocWithZone_1, zone); - return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); + static NSTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSTask, _sel_allocWithZone_, zone); + return NSTask.castFromPointer(_ret, retain: false, release: true); } - static NSURLSessionStreamTask alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionStreamTask1, _lib._sel_alloc1); - return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); + static NSTask alloc() { + final _ret = _objc_msgSend_40(_class_NSTask, _sel_alloc); + return NSTask.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLSessionStreamTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLSessionStreamTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLSessionStreamTask1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7(_class_NSTask, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLSessionStreamTask1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSTask, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLSessionStreamTask1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLSessionStreamTask1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51( + _class_NSTask, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLSessionStreamTask1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40(_class_NSTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSTask = objc.getClass("NSTask"); +late final _sel_setExecutableURL_ = objc.registerName("setExecutableURL:"); +late final _sel_setArguments_ = objc.registerName("setArguments:"); +late final _sel_setEnvironment_ = objc.registerName("setEnvironment:"); +late final _sel_currentDirectoryURL = objc.registerName("currentDirectoryURL"); +late final _sel_setCurrentDirectoryURL_ = + objc.registerName("setCurrentDirectoryURL:"); +late final _sel_launchRequirementData = + objc.registerName("launchRequirementData"); +late final _sel_setLaunchRequirementData_ = + objc.registerName("setLaunchRequirementData:"); +late final _sel_standardInput = objc.registerName("standardInput"); +late final _sel_setStandardInput_ = objc.registerName("setStandardInput:"); +late final _sel_standardOutput = objc.registerName("standardOutput"); +late final _sel_setStandardOutput_ = objc.registerName("setStandardOutput:"); +late final _sel_standardError = objc.registerName("standardError"); +late final _sel_setStandardError_ = objc.registerName("setStandardError:"); +late final _sel_launchAndReturnError_ = + objc.registerName("launchAndReturnError:"); +late final _sel_interrupt = objc.registerName("interrupt"); +late final _sel_terminate = objc.registerName("terminate"); +late final _sel_isRunning = objc.registerName("isRunning"); +late final _sel_terminationStatus = objc.registerName("terminationStatus"); - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSURLSessionStreamTask1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLSessionStreamTask1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +abstract class NSTaskTerminationReason { + static const int NSTaskTerminationReasonExit = 1; + static const int NSTaskTerminationReasonUncaughtSignal = 2; } -void _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => +late final _sel_terminationReason = objc.registerName("terminationReason"); +final _objc_msgSend_653 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSTask_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, bool, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry = , bool, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( - void Function(ffi.Pointer, bool, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry[id] = fn; + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSTask_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSTask_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSTask_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSTask_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSTask_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); +void _ObjCBlock_ffiVoid_NSTask_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSTask_closureRegistry[block.ref.target.address]!(arg0); -class ObjCBlock_ffiVoid_NSData_bool_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSData_bool_NSError._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, +class ObjCBlock_ffiVoid_NSTask extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSTask._(ffi.Pointer pointer, {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSData_bool_NSError castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSData_bool_NSError._(pointer, lib, + static ObjCBlock_ffiVoid_NSTask castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSTask._(pointer, retain: retain, release: release); } @@ -70758,25 +31653,18 @@ class ObjCBlock_ffiVoid_NSData_bool_NSError extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSData_bool_NSError.fromFunctionPointer( - SwiftLibrary lib, + ObjCBlock_ffiVoid_NSTask.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>> + ffi.Void Function(ffi.Pointer arg0)>> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTask_fnPtrTrampoline) + .cast(), + ptr.cast())); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. @@ -70784,23 +31672,17 @@ class ObjCBlock_ffiVoid_NSData_bool_NSError extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSData_bool_NSError.fromFunction(SwiftLibrary lib, void Function(NSData, bool, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( - (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn( - NSData._(arg0, lib, retain: true, release: true), - arg1, - arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), - lib); + ObjCBlock_ffiVoid_NSTask.fromFunction(void Function(NSTask) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTask_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSTask_registerClosure( + (ffi.Pointer arg0) => fn( + NSTask.castFromPointer(arg0, + retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -70812,3785 +31694,5303 @@ class ObjCBlock_ffiVoid_NSData_bool_NSError extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSData_bool_NSError.listener( - SwiftLibrary lib, void Function(NSData, bool, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn(NSData._(arg0, lib, retain: true, release: true), arg1, arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), - lib); + ObjCBlock_ffiVoid_NSTask.listener(void Function(NSTask) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSTask_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSTask_registerClosure( + (ffi.Pointer arg0) => fn( + NSTask.castFromPointer(arg0, + retain: true, release: true))))); static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Bool, ffi.Pointer)>? _dartFuncListenerTrampoline; + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; - void call(NSData arg0, bool arg1, NSError? arg2) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - bool, ffi.Pointer)>()( - _id, arg0._id, arg1, arg2?._id ?? ffi.nullptr); -} + void call(NSTask arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(pointer, arg0.pointer); +} + +late final _sel_terminationHandler = objc.registerName("terminationHandler"); +final _objc_msgSend_654 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setTerminationHandler_ = + objc.registerName("setTerminationHandler:"); +final _objc_msgSend_655 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_launchedTaskWithExecutableURL_arguments_error_terminationHandler_ = + objc.registerName( + "launchedTaskWithExecutableURL:arguments:error:terminationHandler:"); +final _objc_msgSend_656 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>(); +late final _sel_waitUntilExit = objc.registerName("waitUntilExit"); +late final _sel_launchPath = objc.registerName("launchPath"); +late final _sel_setLaunchPath_ = objc.registerName("setLaunchPath:"); +late final _sel_setCurrentDirectoryPath_ = + objc.registerName("setCurrentDirectoryPath:"); +late final _sel_launch = objc.registerName("launch"); +late final _sel_launchedTaskWithLaunchPath_arguments_ = + objc.registerName("launchedTaskWithLaunchPath:arguments:"); +final _objc_msgSend_657 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); -class NSNetService extends NSObject { - NSNetService._(ffi.Pointer id, SwiftLibrary lib, +class NSXMLElement extends NSXMLNode { + NSXMLElement._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSNetService] that points to the same underlying object as [other]. - static NSNetService castFrom(T other) { - return NSNetService._(other._id, other._lib, retain: true, release: true); - } + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSNetService] that wraps the given raw object pointer. - static NSNetService castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNetService._(other, lib, retain: retain, release: release); - } + /// Constructs a [NSXMLElement] that points to the same underlying object as [other]. + NSXMLElement.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// 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); - } + /// Constructs a [NSXMLElement] that wraps the given raw object pointer. + NSXMLElement.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - NSNetService initWithDomain_type_name_port_( - NSString domain, NSString type, NSString name, int port) { - final _ret = _lib._objc_msgSend_1073( - _id, - _lib._sel_initWithDomain_type_name_port_1, - domain._id, - type._id, - name._id, - port); - return NSNetService._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSXMLElement]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSXMLElement); } - NSNetService initWithDomain_type_name_( - NSString domain, NSString type, NSString name) { - final _ret = _lib._objc_msgSend_1074(_id, - _lib._sel_initWithDomain_type_name_1, domain._id, type._id, name._id); - return NSNetService._(_ret, _lib, retain: true, release: true); + NSXMLElement initWithName_(objc.NSString name) { + final _ret = + _objc_msgSend_35(this.pointer, _sel_initWithName_, name.pointer); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); } - void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _lib._objc_msgSend_569( - _id, _lib._sel_scheduleInRunLoop_forMode_1, aRunLoop._id, mode._id); + NSXMLElement initWithName_URI_(objc.NSString name, objc.NSString? URI) { + final _ret = _objc_msgSend_694(this.pointer, _sel_initWithName_URI_, + name.pointer, URI?.pointer ?? ffi.nullptr); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); } - void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _lib._objc_msgSend_569( - _id, _lib._sel_removeFromRunLoop_forMode_1, aRunLoop._id, mode._id); + NSXMLElement initWithName_stringValue_( + objc.NSString name, objc.NSString? string) { + final _ret = _objc_msgSend_694(this.pointer, _sel_initWithName_stringValue_, + name.pointer, string?.pointer ?? ffi.nullptr); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); } - NSObject? get delegate { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_delegate1); + NSXMLElement? initWithXMLString_error_( + objc.NSString string, ffi.Pointer> error) { + final _ret = _objc_msgSend_695( + this.pointer, _sel_initWithXMLString_error_, string.pointer, error); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - set delegate(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); + : NSXMLElement.castFromPointer(_ret, retain: true, release: true); } - bool get includesPeerToPeer { - return _lib._objc_msgSend_12(_id, _lib._sel_includesPeerToPeer1); - } - - set includesPeerToPeer(bool value) { - return _lib._objc_msgSend_527( - _id, _lib._sel_setIncludesPeerToPeer_1, value); + @override + NSXMLElement initWithKind_options_(int kind, int options) { + final _ret = _objc_msgSend_659( + this.pointer, _sel_initWithKind_options_, kind, options); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); } - NSString get name { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_name1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSArray elementsForName_(objc.NSString name) { + final _ret = + _objc_msgSend_445(this.pointer, _sel_elementsForName_, name.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString get type { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_type1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSArray elementsForLocalName_URI_( + objc.NSString localName, objc.NSString? URI) { + final _ret = _objc_msgSend_696(this.pointer, _sel_elementsForLocalName_URI_, + localName.pointer, URI?.pointer ?? ffi.nullptr); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString get domain { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_domain1); - return NSString._(_ret, _lib, retain: true, release: true); + void addAttribute_(NSXMLNode attribute) { + _objc_msgSend_673(this.pointer, _sel_addAttribute_, attribute.pointer); } - NSString? get hostName { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_hostName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + void removeAttributeForName_(objc.NSString name) { + _objc_msgSend_98(this.pointer, _sel_removeAttributeForName_, name.pointer); } - NSArray? get addresses { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_addresses1); + objc.NSArray? get attributes { + final _ret = _objc_msgSend_69(this.pointer, _sel_attributes); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - int get port { - return _lib._objc_msgSend_83(_id, _lib._sel_port1); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void publish() { - _lib._objc_msgSend_1(_id, _lib._sel_publish1); + set attributes(objc.NSArray? value) { + return _objc_msgSend_605( + this.pointer, _sel_setAttributes_, value?.pointer ?? ffi.nullptr); } - void publishWithOptions_(int options) { - _lib._objc_msgSend_1075(_id, _lib._sel_publishWithOptions_1, options); + void setAttributesWithDictionary_(objc.NSDictionary attributes) { + _objc_msgSend_697( + this.pointer, _sel_setAttributesWithDictionary_, attributes.pointer); } - void resolve() { - _lib._objc_msgSend_1(_id, _lib._sel_resolve1); + NSXMLNode? attributeForName_(objc.NSString name) { + final _ret = + _objc_msgSend_677(this.pointer, _sel_attributeForName_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - void stop() { - _lib._objc_msgSend_1(_id, _lib._sel_stop1); + NSXMLNode? attributeForLocalName_URI_( + objc.NSString localName, objc.NSString? URI) { + final _ret = _objc_msgSend_698( + this.pointer, + _sel_attributeForLocalName_URI_, + localName.pointer, + URI?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static NSDictionary dictionaryFromTXTRecordData_( - SwiftLibrary _lib, NSData txtData) { - final _ret = _lib._objc_msgSend_1076(_lib._class_NSNetService1, - _lib._sel_dictionaryFromTXTRecordData_1, txtData._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); + void addNamespace_(NSXMLNode aNamespace) { + _objc_msgSend_673(this.pointer, _sel_addNamespace_, aNamespace.pointer); } - static NSData dataFromTXTRecordDictionary_( - SwiftLibrary _lib, NSDictionary txtDictionary) { - final _ret = _lib._objc_msgSend_1077(_lib._class_NSNetService1, - _lib._sel_dataFromTXTRecordDictionary_1, txtDictionary._id); - return NSData._(_ret, _lib, retain: true, release: true); + void removeNamespaceForPrefix_(objc.NSString name) { + _objc_msgSend_98( + this.pointer, _sel_removeNamespaceForPrefix_, name.pointer); } - void resolveWithTimeout_(double timeout) { - _lib._objc_msgSend_541(_id, _lib._sel_resolveWithTimeout_1, timeout); + objc.NSArray? get namespaces { + final _ret = _objc_msgSend_69(this.pointer, _sel_namespaces); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool getInputStream_outputStream_( - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - return _lib._objc_msgSend_1078(_id, _lib._sel_getInputStream_outputStream_1, - inputStream, outputStream); + set namespaces(objc.NSArray? value) { + return _objc_msgSend_605( + this.pointer, _sel_setNamespaces_, value?.pointer ?? ffi.nullptr); } - bool setTXTRecordData_(NSData? recordData) { - return _lib._objc_msgSend_1079( - _id, _lib._sel_setTXTRecordData_1, recordData?._id ?? ffi.nullptr); + NSXMLNode? namespaceForPrefix_(objc.NSString name) { + final _ret = + _objc_msgSend_677(this.pointer, _sel_namespaceForPrefix_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - NSData? TXTRecordData() { - final _ret = _lib._objc_msgSend_286(_id, _lib._sel_TXTRecordData1); + NSXMLNode? resolveNamespaceForName_(objc.NSString name) { + final _ret = _objc_msgSend_677( + this.pointer, _sel_resolveNamespaceForName_, name.pointer); return _ret.address == 0 ? null - : NSData._(_ret, _lib, retain: true, release: true); + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - void startMonitoring() { - _lib._objc_msgSend_1(_id, _lib._sel_startMonitoring1); + objc.NSString? resolvePrefixForNamespaceURI_(objc.NSString namespaceURI) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_resolvePrefixForNamespaceURI_, namespaceURI.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void stopMonitoring() { - _lib._objc_msgSend_1(_id, _lib._sel_stopMonitoring1); + void insertChild_atIndex_(NSXMLNode child, int index) { + _objc_msgSend_671( + this.pointer, _sel_insertChild_atIndex_, child.pointer, index); } - @override - NSNetService init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSNetService._(_ret, _lib, retain: true, release: true); + void insertChildren_atIndex_(objc.NSArray children, int index) { + _objc_msgSend_672( + this.pointer, _sel_insertChildren_atIndex_, children.pointer, index); } - static NSNetService new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSNetService1, _lib._sel_new1); - return NSNetService._(_ret, _lib, retain: false, release: true); + void removeChildAtIndex_(int index) { + _objc_msgSend_414(this.pointer, _sel_removeChildAtIndex_, index); } - static NSNetService allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSNetService1, _lib._sel_allocWithZone_1, zone); - return NSNetService._(_ret, _lib, retain: false, release: true); + void setChildren_(objc.NSArray? children) { + _objc_msgSend_260( + this.pointer, _sel_setChildren_, children?.pointer ?? ffi.nullptr); } - static NSNetService alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSNetService1, _lib._sel_alloc1); - return NSNetService._(_ret, _lib, retain: false, release: true); + void addChild_(NSXMLNode child) { + _objc_msgSend_673(this.pointer, _sel_addChild_, child.pointer); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSNetService1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { + _objc_msgSend_674( + this.pointer, _sel_replaceChildAtIndex_withNode_, index, node.pointer); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSNetService1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + void normalizeAdjacentTextNodesPreservingCDATA_(bool preserve) { + _objc_msgSend_336(this.pointer, + _sel_normalizeAdjacentTextNodesPreservingCDATA_, preserve); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSNetService1, _lib._sel_accessInstanceVariablesDirectly1); + void setAttributesAsDictionary_(objc.NSDictionary attributes) { + _objc_msgSend_697( + this.pointer, _sel_setAttributesAsDictionary_, attributes.pointer); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSNetService1, _lib._sel_useStoredAccessor1); + @override + NSXMLElement init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSNetService1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + @override + NSXMLElement initWithKind_(int kind) { + final _ret = _objc_msgSend_658(this.pointer, _sel_initWithKind_, kind); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSNetService1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static objc.NSObject document() { + final _ret = _objc_msgSend_40(_class_NSXMLElement, _sel_document); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSNetService1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static objc.NSObject documentWithRootElement_(NSXMLElement element) { + final _ret = _objc_msgSend_660( + _class_NSXMLElement, _sel_documentWithRootElement_, element.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSNetService1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSObject elementWithName_(objc.NSString name) { + final _ret = _objc_msgSend_35( + _class_NSXMLElement, _sel_elementWithName_, name.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSNetService1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_661(_class_NSXMLElement, + _sel_elementWithName_URI_, name.pointer, URI.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } -} - -abstract class NSNetServiceOptions { - static const int NSNetServiceNoAutoRename = 1; - static const int NSNetServiceListenForConnections = 2; -} - -class NSURLSessionWebSocketTask extends NSURLSessionTask { - NSURLSessionWebSocketTask._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSURLSessionWebSocketTask] that points to the same underlying object as [other]. - static NSURLSessionWebSocketTask castFrom(T other) { - return NSURLSessionWebSocketTask._(other._id, other._lib, - retain: true, release: true); + static objc.NSObject elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_661(_class_NSXMLElement, + _sel_elementWithName_stringValue_, name.pointer, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSURLSessionWebSocketTask] that wraps the given raw object pointer. - static NSURLSessionWebSocketTask castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionWebSocketTask._(other, lib, - retain: retain, release: release); + static objc.NSObject elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_662( + _class_NSXMLElement, + _sel_elementWithName_children_attributes_, + name.pointer, + children?.pointer ?? ffi.nullptr, + attributes?.pointer ?? ffi.nullptr); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - /// 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); + static objc.NSObject attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLElement, + _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void sendMessage_completionHandler_(NSURLSessionWebSocketMessage message, - ObjCBlock_ffiVoid_NSError completionHandler) { - _lib._objc_msgSend_1082(_id, _lib._sel_sendMessage_completionHandler_1, - message._id, completionHandler._id); + static objc.NSObject attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_626( + _class_NSXMLElement, + _sel_attributeWithName_URI_stringValue_, + name.pointer, + URI.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void receiveMessageWithCompletionHandler_( - ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError - completionHandler) { - _lib._objc_msgSend_1083(_id, - _lib._sel_receiveMessageWithCompletionHandler_1, completionHandler._id); + static objc.NSObject namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLElement, + _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void sendPingWithPongReceiveHandler_( - ObjCBlock_ffiVoid_NSError pongReceiveHandler) { - _lib._objc_msgSend_1084(_id, _lib._sel_sendPingWithPongReceiveHandler_1, - pongReceiveHandler._id); + static objc.NSObject processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661( + _class_NSXMLElement, + _sel_processingInstructionWithName_stringValue_, + name.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void cancelWithCloseCode_reason_(int closeCode, NSData? reason) { - _lib._objc_msgSend_1085(_id, _lib._sel_cancelWithCloseCode_reason_1, - closeCode, reason?._id ?? ffi.nullptr); + static objc.NSObject commentWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLElement, _sel_commentWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get maximumMessageSize { - return _lib._objc_msgSend_83(_id, _lib._sel_maximumMessageSize1); + static objc.NSObject textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLElement, _sel_textWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set maximumMessageSize(int value) { - return _lib._objc_msgSend_635( - _id, _lib._sel_setMaximumMessageSize_1, value); + static objc.NSObject? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_2( + _class_NSXMLElement, _sel_DTDNodeWithXMLString_, string.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get closeCode { - return _lib._objc_msgSend_1086(_id, _lib._sel_closeCode1); + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_297( + _class_NSXMLElement, _sel_localNameForName_, name.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSData? get closeReason { - final _ret = _lib._objc_msgSend_286(_id, _lib._sel_closeReason1); + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = _objc_msgSend_14( + _class_NSXMLElement, _sel_prefixForName_, name.pointer); return _ret.address == 0 ? null - : NSData._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSURLSessionWebSocketTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_677( + _class_NSXMLElement, _sel_predefinedNamespaceForPrefix_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionWebSocketTask new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketTask1, _lib._sel_new1); - return NSURLSessionWebSocketTask._(_ret, _lib, - retain: false, release: true); + static NSXMLElement new1() { + final _ret = _objc_msgSend_40(_class_NSXMLElement, _sel_new); + return NSXMLElement.castFromPointer(_ret, retain: false, release: true); } - static NSURLSessionWebSocketTask allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3(_lib._class_NSURLSessionWebSocketTask1, - _lib._sel_allocWithZone_1, zone); - return NSURLSessionWebSocketTask._(_ret, _lib, - retain: false, release: true); + static NSXMLElement allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSXMLElement, _sel_allocWithZone_, zone); + return NSXMLElement.castFromPointer(_ret, retain: false, release: true); } - static NSURLSessionWebSocketTask alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketTask1, _lib._sel_alloc1); - return NSURLSessionWebSocketTask._(_ret, _lib, - retain: false, release: true); + static NSXMLElement alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLElement, _sel_alloc); + return NSXMLElement.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLSessionWebSocketTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLElement, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLSessionWebSocketTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLElement, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLSessionWebSocketTask1, - _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSXMLElement, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSURLSessionWebSocketTask1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSXMLElement, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSURLSessionWebSocketTask1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLElement, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLSessionWebSocketTask1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLElement, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLSessionWebSocketTask1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLElement, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85(_lib._class_NSURLSessionWebSocketTask1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSXMLElement, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLSessionWebSocketTask1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSXMLElement, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -class NSURLSessionWebSocketMessage extends NSObject { - NSURLSessionWebSocketMessage._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLSessionWebSocketMessage] that points to the same underlying object as [other]. - static NSURLSessionWebSocketMessage castFrom( - T other) { - return NSURLSessionWebSocketMessage._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSURLSessionWebSocketMessage] that wraps the given raw object pointer. - static NSURLSessionWebSocketMessage castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionWebSocketMessage._(other, lib, - retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSURLSessionWebSocketMessage]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionWebSocketMessage1); - } - - NSURLSessionWebSocketMessage initWithData_(NSData data) { - final _ret = - _lib._objc_msgSend_279(_id, _lib._sel_initWithData_1, data._id); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: true, release: true); - } +late final _class_NSXMLElement = objc.getClass("NSXMLElement"); - NSURLSessionWebSocketMessage initWithString_(NSString string) { - final _ret = - _lib._objc_msgSend_31(_id, _lib._sel_initWithString_1, string._id); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: true, release: true); - } +class NSXMLNode extends objc.NSObject { + NSXMLNode._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - int get type { - return _lib._objc_msgSend_1081(_id, _lib._sel_type1); - } + /// Constructs a [NSXMLNode] that points to the same underlying object as [other]. + NSXMLNode.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSData? get data { - final _ret = _lib._objc_msgSend_286(_id, _lib._sel_data1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSXMLNode] that wraps the given raw object pointer. + NSXMLNode.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - NSString? get string { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_string1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSXMLNode]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSXMLNode); } @override - NSURLSessionWebSocketMessage init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: true, release: true); - } - - static NSURLSessionWebSocketMessage new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_new1); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: false, release: true); - } - - static NSURLSessionWebSocketMessage allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3(_lib._class_NSURLSessionWebSocketMessage1, - _lib._sel_allocWithZone_1, zone); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: false, release: true); - } - - static NSURLSessionWebSocketMessage alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_alloc1); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSURLSessionWebSocketMessage1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + NSXMLNode init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSURLSessionWebSocketMessage1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + NSXMLNode initWithKind_(int kind) { + final _ret = _objc_msgSend_658(this.pointer, _sel_initWithKind_, kind); + return NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLSessionWebSocketMessage1, - _lib._sel_accessInstanceVariablesDirectly1); + NSXMLNode initWithKind_options_(int kind, int options) { + final _ret = _objc_msgSend_659( + this.pointer, _sel_initWithKind_options_, kind, options); + return NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12(_lib._class_NSURLSessionWebSocketMessage1, - _lib._sel_useStoredAccessor1); + static objc.NSObject document() { + final _ret = _objc_msgSend_40(_class_NSXMLNode, _sel_document); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63( - _lib._class_NSURLSessionWebSocketMessage1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, - key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSObject documentWithRootElement_(NSXMLElement element) { + final _ret = _objc_msgSend_660( + _class_NSXMLNode, _sel_documentWithRootElement_, element.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSURLSessionWebSocketMessage1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static objc.NSObject elementWithName_(objc.NSString name) { + final _ret = + _objc_msgSend_35(_class_NSXMLNode, _sel_elementWithName_, name.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSURLSessionWebSocketMessage1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static objc.NSObject elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_661( + _class_NSXMLNode, _sel_elementWithName_URI_, name.pointer, URI.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSURLSessionWebSocketMessage1, - _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSObject elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_661(_class_NSXMLNode, + _sel_elementWithName_stringValue_, name.pointer, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLSessionWebSocketMessage1, - _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_662( + _class_NSXMLNode, + _sel_elementWithName_children_attributes_, + name.pointer, + children?.pointer ?? ffi.nullptr, + attributes?.pointer ?? ffi.nullptr); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } -} - -abstract class NSURLSessionWebSocketMessageType { - static const int NSURLSessionWebSocketMessageTypeData = 0; - static const int NSURLSessionWebSocketMessageTypeString = 1; -} -void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = - ++_ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry[id] = - fn; - return ffi.Pointer.fromAddress(id); -} + static objc.NSObject attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLNode, + _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } -void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1); + static objc.NSObject attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_626( + _class_NSXMLNode, + _sel_attributeWithName_URI_stringValue_, + name.pointer, + URI.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } -class ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError - extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + static objc.NSObject namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLNode, + _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError._( - pointer, lib, - retain: retain, release: release); + static objc.NSObject processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661( + _class_NSXMLNode, + _sel_processingInstructionWithName_stringValue_, + name.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static objc.NSObject commentWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLNode, _sel_commentWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.fromFunction( - SwiftLibrary lib, - void Function(NSURLSessionWebSocketMessage?, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSURLSessionWebSocketMessage._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + static objc.NSObject textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLNode, _sel_textWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.listener( - SwiftLibrary lib, - void Function(NSURLSessionWebSocketMessage?, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSURLSessionWebSocketMessage._(arg0, lib, - retain: true, release: true), - arg1.address == 0 - ? null - : NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + static objc.NSObject? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_2( + _class_NSXMLNode, _sel_DTDNodeWithXMLString_, string.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } - void call(NSURLSessionWebSocketMessage? arg0, NSError? arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); -} + int get kind { + return _objc_msgSend_663(this.pointer, _sel_kind); + } -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; -} + objc.NSString? get name { + final _ret = _objc_msgSend_13(this.pointer, _sel_name); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + set name(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); + } -void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); + objc.NSObject? get objectValue { + final _ret = _objc_msgSend_66(this.pointer, _sel_objectValue); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } -class ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + set objectValue(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setObjectValue_, value?.pointer ?? ffi.nullptr); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError._(pointer, lib, - retain: retain, release: release); + objc.NSString? get stringValue { + final _ret = _objc_msgSend_13(this.pointer, _sel_stringValue); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + set stringValue(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setStringValue_, value?.pointer ?? ffi.nullptr); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.fromFunction( - SwiftLibrary lib, void Function(NSData?, NSURLResponse?, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : NSData._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSURLResponse._(arg1, lib, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + void setStringValue_resolvingEntities_(objc.NSString string, bool resolve) { + _objc_msgSend_664(this.pointer, _sel_setStringValue_resolvingEntities_, + string.pointer, resolve); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.listener( - SwiftLibrary lib, void Function(NSData?, NSURLResponse?, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure((ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : NSData._(arg0, lib, retain: true, release: true), - arg1.address == 0 - ? null - : NSURLResponse._(arg1, lib, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + int get index { + return _objc_msgSend_29(this.pointer, _sel_index); + } - void call(NSData? arg0, NSURLResponse? arg1, NSError? arg2) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>()( - _id, - arg0?._id ?? ffi.nullptr, - arg1?._id ?? ffi.nullptr, - arg2?._id ?? ffi.nullptr); -} + int get level { + return _objc_msgSend_29(this.pointer, _sel_level); + } -void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + NSXMLDocument? get rootDocument { + final _ret = _objc_msgSend_688(this.pointer, _sel_rootDocument); + return _ret.address == 0 + ? null + : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + } -void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); + NSXMLNode? get parent { + final _ret = _objc_msgSend_689(this.pointer, _sel_parent); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + } -class ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError._( - ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + int get childCount { + return _objc_msgSend_29(this.pointer, _sel_childCount); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError._(pointer, lib, - retain: retain, release: release); + objc.NSArray? get children { + final _ret = _objc_msgSend_69(this.pointer, _sel_children); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.fromFunctionPointer( - SwiftLibrary lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + NSXMLNode? childAtIndex_(int index) { + final _ret = _objc_msgSend_690(this.pointer, _sel_childAtIndex_, index); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.fromFunction( - SwiftLibrary lib, void Function(NSURL?, NSURLResponse?, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - arg0.address == 0 - ? null - : NSURL._(arg0, lib, retain: true, release: true), - arg1.address == 0 - ? null - : NSURLResponse._(arg1, lib, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + NSXMLNode? get previousSibling { + final _ret = _objc_msgSend_689(this.pointer, _sel_previousSibling); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.listener( - SwiftLibrary lib, void Function(NSURL?, NSURLResponse?, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : NSURL._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSURLResponse._(arg1, lib, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + NSXMLNode? get nextSibling { + final _ret = _objc_msgSend_689(this.pointer, _sel_nextSibling); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + } - void call(NSURL? arg0, NSURLResponse? arg1, NSError? arg2) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>()( - _id, - arg0?._id ?? ffi.nullptr, - arg1?._id ?? ffi.nullptr, - arg2?._id ?? ffi.nullptr); -} + NSXMLNode? get previousNode { + final _ret = _objc_msgSend_689(this.pointer, _sel_previousNode); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + } -class NSProtocolChecker extends NSProxy { - NSProtocolChecker._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + NSXMLNode? get nextNode { + final _ret = _objc_msgSend_689(this.pointer, _sel_nextNode); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a [NSProtocolChecker] that points to the same underlying object as [other]. - static NSProtocolChecker castFrom(T other) { - return NSProtocolChecker._(other._id, other._lib, - retain: true, release: true); + void detach() { + _objc_msgSend_82(this.pointer, _sel_detach); } - /// Returns a [NSProtocolChecker] that wraps the given raw object pointer. - static NSProtocolChecker castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSProtocolChecker._(other, lib, retain: retain, release: release); + objc.NSString? get XPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_XPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSProtocolChecker]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSProtocolChecker1); + objc.NSString? get localName { + final _ret = _objc_msgSend_13(this.pointer, _sel_localName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - Protocol get protocol { - final _ret = _lib._objc_msgSend_1098(_id, _lib._sel_protocol1); - return Protocol._(_ret, _lib, retain: true, release: true); + objc.NSString? get prefix { + final _ret = _objc_msgSend_13(this.pointer, _sel_prefix); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSObject? get target { - final _ret = _lib._objc_msgSend_1099(_id, _lib._sel_target1); + objc.NSString? get URI { + final _ret = _objc_msgSend_13(this.pointer, _sel_URI); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSProtocolChecker protocolCheckerWithTarget_protocol_( - SwiftLibrary _lib, NSObject anObject, Protocol aProtocol) { - final _ret = _lib._objc_msgSend_1100( - _lib._class_NSProtocolChecker1, - _lib._sel_protocolCheckerWithTarget_protocol_1, - anObject._id, - aProtocol._id); - return NSProtocolChecker._(_ret, _lib, retain: true, release: true); + set URI(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setURI_, value?.pointer ?? ffi.nullptr); } - NSProtocolChecker initWithTarget_protocol_( - NSObject anObject, Protocol aProtocol) { - final _ret = _lib._objc_msgSend_1100( - _id, _lib._sel_initWithTarget_protocol_1, anObject._id, aProtocol._id); - return NSProtocolChecker._(_ret, _lib, retain: true, release: true); + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_297( + _class_NSXMLNode, _sel_localNameForName_, name.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject alloc(SwiftLibrary _lib) { + static objc.NSString? prefixForName_(objc.NSString name) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSProtocolChecker1, _lib._sel_alloc1); - return NSObject._(_ret, _lib, retain: false, release: true); + _objc_msgSend_14(_class_NSXMLNode, _sel_prefixForName_, name.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool respondsToSelector_( - SwiftLibrary _lib, ffi.Pointer aSelector) { - return _lib._objc_msgSend_4(_lib._class_NSProtocolChecker1, - _lib._sel_respondsToSelector_1, aSelector); + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_677( + _class_NSXMLNode, _sel_predefinedNamespaceForPrefix_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } -} - -class NSTask extends NSObject { - NSTask._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSTask] that points to the same underlying object as [other]. - static NSTask castFrom(T other) { - return NSTask._(other._id, other._lib, retain: true, release: true); + objc.NSString get description { + final _ret = _objc_msgSend_12(this.pointer, _sel_description); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSTask] that wraps the given raw object pointer. - static NSTask castFromPointer(SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSTask._(other, lib, retain: retain, release: release); + objc.NSString get XMLString { + final _ret = _objc_msgSend_12(this.pointer, _sel_XMLString); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSTask1); + objc.NSString XMLStringWithOptions_(int options) { + final _ret = + _objc_msgSend_691(this.pointer, _sel_XMLStringWithOptions_, options); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSTask._(_ret, _lib, retain: true, release: true); + objc.NSString canonicalXMLStringPreservingComments_(bool comments) { + final _ret = _objc_msgSend_692( + this.pointer, _sel_canonicalXMLStringPreservingComments_, comments); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSURL? get executableURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_executableURL1); + objc.NSArray? nodesForXPath_error_( + objc.NSString xpath, ffi.Pointer> error) { + final _ret = _objc_msgSend_281( + this.pointer, _sel_nodesForXPath_error_, xpath.pointer, error); return _ret.address == 0 ? null - : NSURL._(_ret, _lib, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set executableURL(NSURL? value) { - return _lib._objc_msgSend_671( - _id, _lib._sel_setExecutableURL_1, value?._id ?? ffi.nullptr); + objc.NSArray? objectsForXQuery_constants_error_( + objc.NSString xquery, + objc.NSDictionary? constants, + ffi.Pointer> error) { + final _ret = _objc_msgSend_693( + this.pointer, + _sel_objectsForXQuery_constants_error_, + xquery.pointer, + constants?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSArray? get arguments { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_arguments1); + objc.NSArray? objectsForXQuery_error_( + objc.NSString xquery, ffi.Pointer> error) { + final _ret = _objc_msgSend_281( + this.pointer, _sel_objectsForXQuery_error_, xquery.pointer, error); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set arguments(NSArray? value) { - return _lib._objc_msgSend_1053( - _id, _lib._sel_setArguments_1, value?._id ?? ffi.nullptr); + static NSXMLNode new1() { + final _ret = _objc_msgSend_40(_class_NSXMLNode, _sel_new); + return NSXMLNode.castFromPointer(_ret, retain: false, release: true); } - NSDictionary? get environment { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_environment1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + static NSXMLNode allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSXMLNode, _sel_allocWithZone_, zone); + return NSXMLNode.castFromPointer(_ret, retain: false, release: true); } - set environment(NSDictionary? value) { - return _lib._objc_msgSend_634( - _id, _lib._sel_setEnvironment_1, value?._id ?? ffi.nullptr); + static NSXMLNode alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLNode, _sel_alloc); + return NSXMLNode.castFromPointer(_ret, retain: false, release: true); } - NSURL? get currentDirectoryURL { - final _ret = _lib._objc_msgSend_45(_id, _lib._sel_currentDirectoryURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLNode, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - set currentDirectoryURL(NSURL? value) { - return _lib._objc_msgSend_671( - _id, _lib._sel_setCurrentDirectoryURL_1, value?._id ?? ffi.nullptr); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLNode, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSData? get launchRequirementData { - final _ret = _lib._objc_msgSend_286(_id, _lib._sel_launchRequirementData1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSXMLNode, _sel_accessInstanceVariablesDirectly); } - set launchRequirementData(NSData? value) { - return _lib._objc_msgSend_1021( - _id, _lib._sel_setLaunchRequirementData_1, value?._id ?? ffi.nullptr); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSXMLNode, _sel_useStoredAccessor); } - NSObject? get standardInput { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_standardInput1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLNode, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - set standardInput(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setStandardInput_1, value?._id ?? ffi.nullptr); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLNode, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSObject? get standardOutput { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_standardOutput1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLNode, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - set standardOutput(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setStandardOutput_1, value?._id ?? ffi.nullptr); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSXMLNode, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSObject? get standardError { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_standardError1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSXMLNode, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - set standardError(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setStandardError_1, value?._id ?? ffi.nullptr); - } +late final _class_NSXMLNode = objc.getClass("NSXMLNode"); + +abstract class NSXMLNodeKind { + static const int NSXMLInvalidKind = 0; + static const int NSXMLDocumentKind = 1; + static const int NSXMLElementKind = 2; + static const int NSXMLAttributeKind = 3; + static const int NSXMLNamespaceKind = 4; + static const int NSXMLProcessingInstructionKind = 5; + static const int NSXMLCommentKind = 6; + static const int NSXMLTextKind = 7; + static const int NSXMLDTDKind = 8; + static const int NSXMLEntityDeclarationKind = 9; + static const int NSXMLAttributeDeclarationKind = 10; + static const int NSXMLElementDeclarationKind = 11; + static const int NSXMLNotationDeclarationKind = 12; +} + +late final _sel_initWithKind_ = objc.registerName("initWithKind:"); +final _objc_msgSend_658 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); + +abstract class NSXMLNodeOptions { + static const int NSXMLNodeOptionsNone = 0; + static const int NSXMLNodeIsCDATA = 1; + static const int NSXMLNodeExpandEmptyElement = 2; + static const int NSXMLNodeCompactEmptyElement = 4; + static const int NSXMLNodeUseSingleQuotes = 8; + static const int NSXMLNodeUseDoubleQuotes = 16; + static const int NSXMLNodeNeverEscapeContents = 32; + static const int NSXMLDocumentTidyHTML = 512; + static const int NSXMLDocumentTidyXML = 1024; + static const int NSXMLDocumentValidate = 8192; + static const int NSXMLNodeLoadExternalEntitiesAlways = 16384; + static const int NSXMLNodeLoadExternalEntitiesSameOriginOnly = 32768; + static const int NSXMLNodeLoadExternalEntitiesNever = 524288; + static const int NSXMLDocumentXInclude = 65536; + static const int NSXMLNodePrettyPrint = 131072; + static const int NSXMLDocumentIncludeContentTypeDeclaration = 262144; + static const int NSXMLNodePreserveNamespaceOrder = 1048576; + static const int NSXMLNodePreserveAttributeOrder = 2097152; + static const int NSXMLNodePreserveEntities = 4194304; + static const int NSXMLNodePreservePrefixes = 8388608; + static const int NSXMLNodePreserveCDATA = 16777216; + static const int NSXMLNodePreserveWhitespace = 33554432; + static const int NSXMLNodePreserveDTD = 67108864; + static const int NSXMLNodePreserveCharacterReferences = 134217728; + static const int NSXMLNodePromoteSignificantWhitespace = 268435456; + static const int NSXMLNodePreserveEmptyElements = 6; + static const int NSXMLNodePreserveQuotes = 24; + static const int NSXMLNodePreserveAll = 4293918750; +} + +late final _sel_initWithKind_options_ = + objc.registerName("initWithKind:options:"); +final _objc_msgSend_659 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Int32, ffi.Int32)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int, int)>(); +late final _sel_document = objc.registerName("document"); +late final _sel_documentWithRootElement_ = + objc.registerName("documentWithRootElement:"); +final _objc_msgSend_660 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_elementWithName_ = objc.registerName("elementWithName:"); +late final _sel_elementWithName_URI_ = + objc.registerName("elementWithName:URI:"); +final _objc_msgSend_661 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_elementWithName_stringValue_ = + objc.registerName("elementWithName:stringValue:"); +late final _sel_elementWithName_children_attributes_ = + objc.registerName("elementWithName:children:attributes:"); +final _objc_msgSend_662 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_attributeWithName_stringValue_ = + objc.registerName("attributeWithName:stringValue:"); +late final _sel_attributeWithName_URI_stringValue_ = + objc.registerName("attributeWithName:URI:stringValue:"); +late final _sel_namespaceWithName_stringValue_ = + objc.registerName("namespaceWithName:stringValue:"); +late final _sel_processingInstructionWithName_stringValue_ = + objc.registerName("processingInstructionWithName:stringValue:"); +late final _sel_commentWithStringValue_ = + objc.registerName("commentWithStringValue:"); +late final _sel_textWithStringValue_ = + objc.registerName("textWithStringValue:"); +late final _sel_DTDNodeWithXMLString_ = + objc.registerName("DTDNodeWithXMLString:"); +late final _sel_kind = objc.registerName("kind"); +final _objc_msgSend_663 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_objectValue = objc.registerName("objectValue"); +late final _sel_setObjectValue_ = objc.registerName("setObjectValue:"); +late final _sel_stringValue = objc.registerName("stringValue"); +late final _sel_setStringValue_ = objc.registerName("setStringValue:"); +late final _sel_setStringValue_resolvingEntities_ = + objc.registerName("setStringValue:resolvingEntities:"); +final _objc_msgSend_664 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_index = objc.registerName("index"); +late final _sel_level = objc.registerName("level"); + +class NSXMLDocument extends NSXMLNode { + NSXMLDocument._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSXMLDocument] that points to the same underlying object as [other]. + NSXMLDocument.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSXMLDocument] that wraps the given raw object pointer. + NSXMLDocument.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - bool launchAndReturnError_(ffi.Pointer> error) { - return _lib._objc_msgSend_255(_id, _lib._sel_launchAndReturnError_1, error); + /// Returns whether [obj] is an instance of [NSXMLDocument]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSXMLDocument); } - void interrupt() { - _lib._objc_msgSend_1(_id, _lib._sel_interrupt1); + @override + NSXMLDocument init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLDocument.castFromPointer(_ret, retain: true, release: true); } - void terminate() { - _lib._objc_msgSend_1(_id, _lib._sel_terminate1); + NSXMLDocument? initWithXMLString_options_error_(objc.NSString string, + int mask, ffi.Pointer> error) { + final _ret = _objc_msgSend_665(this.pointer, + _sel_initWithXMLString_options_error_, string.pointer, mask, error); + return _ret.address == 0 + ? null + : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); } - bool suspend() { - return _lib._objc_msgSend_12(_id, _lib._sel_suspend1); + NSXMLDocument? initWithContentsOfURL_options_error_(objc.NSURL url, int mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_666(this.pointer, + _sel_initWithContentsOfURL_options_error_, url.pointer, mask, error); + return _ret.address == 0 + ? null + : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); } - bool resume() { - return _lib._objc_msgSend_12(_id, _lib._sel_resume1); + NSXMLDocument? initWithData_options_error_(objc.NSData data, int mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_667(this.pointer, + _sel_initWithData_options_error_, data.pointer, mask, error); + return _ret.address == 0 + ? null + : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); } - int get processIdentifier { - return _lib._objc_msgSend_237(_id, _lib._sel_processIdentifier1); + NSXMLDocument initWithRootElement_(NSXMLElement? element) { + final _ret = _objc_msgSend_668(this.pointer, _sel_initWithRootElement_, + element?.pointer ?? ffi.nullptr); + return NSXMLDocument.castFromPointer(_ret, retain: true, release: true); } - bool get running { - return _lib._objc_msgSend_12(_id, _lib._sel_isRunning1); + static objc.NSObject replacementClassForClass_(objc.NSObject cls) { + final _ret = _objc_msgSend_387( + _class_NSXMLDocument, _sel_replacementClassForClass_, cls.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get terminationStatus { - return _lib._objc_msgSend_237(_id, _lib._sel_terminationStatus1); + objc.NSString? get characterEncoding { + final _ret = _objc_msgSend_13(this.pointer, _sel_characterEncoding); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int get terminationReason { - return _lib._objc_msgSend_1101(_id, _lib._sel_terminationReason1); + set characterEncoding(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setCharacterEncoding_, + value?.pointer ?? ffi.nullptr); } - ObjCBlock_ffiVoid_NSTask? get terminationHandler { - final _ret = _lib._objc_msgSend_1102(_id, _lib._sel_terminationHandler1); + objc.NSString? get version { + final _ret = _objc_msgSend_13(this.pointer, _sel_version); return _ret.address == 0 ? null - : ObjCBlock_ffiVoid_NSTask._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set terminationHandler(ObjCBlock_ffiVoid_NSTask? value) { - return _lib._objc_msgSend_1103( - _id, _lib._sel_setTerminationHandler_1, value?._id ?? ffi.nullptr); + set version(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setVersion_, value?.pointer ?? ffi.nullptr); } - int get qualityOfService { - return _lib._objc_msgSend_543(_id, _lib._sel_qualityOfService1); + bool get standalone { + return _objc_msgSend_7(this.pointer, _sel_isStandalone); } - set qualityOfService(int value) { - return _lib._objc_msgSend_544(_id, _lib._sel_setQualityOfService_1, value); + set standalone(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setStandalone_, value); } - static NSTask? - launchedTaskWithExecutableURL_arguments_error_terminationHandler_( - SwiftLibrary _lib, - NSURL url, - NSArray arguments, - ffi.Pointer> error, - ObjCBlock_ffiVoid_NSTask? terminationHandler) { - final _ret = _lib._objc_msgSend_1104( - _lib._class_NSTask1, - _lib._sel_launchedTaskWithExecutableURL_arguments_error_terminationHandler_1, - url._id, - arguments._id, - error, - terminationHandler?._id ?? ffi.nullptr); + int get documentContentKind { + return _objc_msgSend_669(this.pointer, _sel_documentContentKind); + } + + set documentContentKind(int value) { + return _objc_msgSend_670(this.pointer, _sel_setDocumentContentKind_, value); + } + + objc.NSString? get MIMEType { + final _ret = _objc_msgSend_13(this.pointer, _sel_MIMEType); return _ret.address == 0 ? null - : NSTask._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void waitUntilExit() { - _lib._objc_msgSend_1(_id, _lib._sel_waitUntilExit1); + set MIMEType(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setMIMEType_, value?.pointer ?? ffi.nullptr); } - NSString? get launchPath { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_launchPath1); + NSXMLDTD? get DTD { + final _ret = _objc_msgSend_680(this.pointer, _sel_DTD); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSXMLDTD.castFromPointer(_ret, retain: true, release: true); } - set launchPath(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setLaunchPath_1, value?._id ?? ffi.nullptr); + set DTD(NSXMLDTD? value) { + return _objc_msgSend_681( + this.pointer, _sel_setDTD_, value?.pointer ?? ffi.nullptr); } - NSString get currentDirectoryPath { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_currentDirectoryPath1); - return NSString._(_ret, _lib, retain: true, release: true); + void setRootElement_(NSXMLElement root) { + _objc_msgSend_682(this.pointer, _sel_setRootElement_, root.pointer); } - set currentDirectoryPath(NSString value) { - return _lib._objc_msgSend_646( - _id, _lib._sel_setCurrentDirectoryPath_1, value._id); + NSXMLElement? rootElement() { + final _ret = _objc_msgSend_683(this.pointer, _sel_rootElement); + return _ret.address == 0 + ? null + : NSXMLElement.castFromPointer(_ret, retain: true, release: true); } - void launch() { - _lib._objc_msgSend_1(_id, _lib._sel_launch1); + void insertChild_atIndex_(NSXMLNode child, int index) { + _objc_msgSend_671( + this.pointer, _sel_insertChild_atIndex_, child.pointer, index); } - static NSTask launchedTaskWithLaunchPath_arguments_( - SwiftLibrary _lib, NSString path, NSArray arguments) { - final _ret = _lib._objc_msgSend_1105( - _lib._class_NSTask1, - _lib._sel_launchedTaskWithLaunchPath_arguments_1, - path._id, - arguments._id); - return NSTask._(_ret, _lib, retain: true, release: true); + void insertChildren_atIndex_(objc.NSArray children, int index) { + _objc_msgSend_672( + this.pointer, _sel_insertChildren_atIndex_, children.pointer, index); } - static NSTask new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSTask1, _lib._sel_new1); - return NSTask._(_ret, _lib, retain: false, release: true); + void removeChildAtIndex_(int index) { + _objc_msgSend_414(this.pointer, _sel_removeChildAtIndex_, index); } - static NSTask allocWithZone_(SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSTask1, _lib._sel_allocWithZone_1, zone); - return NSTask._(_ret, _lib, retain: false, release: true); + void setChildren_(objc.NSArray? children) { + _objc_msgSend_260( + this.pointer, _sel_setChildren_, children?.pointer ?? ffi.nullptr); } - static NSTask alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSTask1, _lib._sel_alloc1); - return NSTask._(_ret, _lib, retain: false, release: true); + void addChild_(NSXMLNode child) { + _objc_msgSend_673(this.pointer, _sel_addChild_, child.pointer); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { + _objc_msgSend_674( + this.pointer, _sel_replaceChildAtIndex_withNode_, index, node.pointer); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSTask1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + objc.NSData get XMLData { + final _ret = _objc_msgSend_104(this.pointer, _sel_XMLData); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSTask1, _lib._sel_accessInstanceVariablesDirectly1); + objc.NSData XMLDataWithOptions_(int options) { + final _ret = + _objc_msgSend_684(this.pointer, _sel_XMLDataWithOptions_, options); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSTask1, _lib._sel_useStoredAccessor1); + objc.NSObject? objectByApplyingXSLT_arguments_error_( + objc.NSData xslt, + objc.NSDictionary? arguments, + ffi.Pointer> error) { + final _ret = _objc_msgSend_685( + this.pointer, + _sel_objectByApplyingXSLT_arguments_error_, + xslt.pointer, + arguments?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSTask1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + objc.NSObject? objectByApplyingXSLTString_arguments_error_( + objc.NSString xslt, + objc.NSDictionary? arguments, + ffi.Pointer> error) { + final _ret = _objc_msgSend_686( + this.pointer, + _sel_objectByApplyingXSLTString_arguments_error_, + xslt.pointer, + arguments?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSTask1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + objc.NSObject? objectByApplyingXSLTAtURL_arguments_error_( + objc.NSURL xsltURL, + objc.NSDictionary? argument, + ffi.Pointer> error) { + final _ret = _objc_msgSend_687( + this.pointer, + _sel_objectByApplyingXSLTAtURL_arguments_error_, + xsltURL.pointer, + argument?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSTask1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + bool validateAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_8(this.pointer, _sel_validateAndReturnError_, error); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSTask1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + @override + NSXMLDocument initWithKind_(int kind) { + final _ret = _objc_msgSend_658(this.pointer, _sel_initWithKind_, kind); + return NSXMLDocument.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSTask1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + @override + NSXMLDocument initWithKind_options_(int kind, int options) { + final _ret = _objc_msgSend_659( + this.pointer, _sel_initWithKind_options_, kind, options); + return NSXMLDocument.castFromPointer(_ret, retain: true, release: true); } -} -abstract class NSTaskTerminationReason { - static const int NSTaskTerminationReasonExit = 1; - static const int NSTaskTerminationReasonUncaughtSignal = 2; -} - -void _ObjCBlock_ffiVoid_NSTask_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSTask_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSTask_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSTask_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSTask_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSTask_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + static objc.NSObject document() { + final _ret = _objc_msgSend_40(_class_NSXMLDocument, _sel_document); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } -void _ObjCBlock_ffiVoid_NSTask_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSTask_closureRegistry[block.ref.target.address]!(arg0); + static objc.NSObject documentWithRootElement_(NSXMLElement element) { + final _ret = _objc_msgSend_660( + _class_NSXMLDocument, _sel_documentWithRootElement_, element.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } -class ObjCBlock_ffiVoid_NSTask extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSTask._(ffi.Pointer<_ObjCBlock> id, SwiftLibrary lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + static objc.NSObject elementWithName_(objc.NSString name) { + final _ret = _objc_msgSend_35( + _class_NSXMLDocument, _sel_elementWithName_, name.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSTask castFromPointer( - SwiftLibrary lib, ffi.Pointer<_ObjCBlock> pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSTask._(pointer, lib, - retain: retain, release: release); + static objc.NSObject elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_661(_class_NSXMLDocument, + _sel_elementWithName_URI_, name.pointer, URI.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSTask.fromFunctionPointer( - SwiftLibrary 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>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTask_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static objc.NSObject elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_661(_class_NSXMLDocument, + _sel_elementWithName_stringValue_, name.pointer, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSTask.fromFunction( - SwiftLibrary lib, void Function(NSTask) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTask_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSTask_registerClosure( - (ffi.Pointer arg0) => - fn(NSTask._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + static objc.NSObject elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_662( + _class_NSXMLDocument, + _sel_elementWithName_children_attributes_, + name.pointer, + children?.pointer ?? ffi.nullptr, + attributes?.pointer ?? ffi.nullptr); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSTask.listener(SwiftLibrary lib, void Function(NSTask) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSTask_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSTask_registerClosure( - (ffi.Pointer arg0) => - fn(NSTask._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; + static objc.NSObject attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDocument, + _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } - void call(NSTask arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0._id); -} + static objc.NSObject attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_626( + _class_NSXMLDocument, + _sel_attributeWithName_URI_stringValue_, + name.pointer, + URI.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } -class NSXMLElement extends NSXMLNode { - NSXMLElement._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + static objc.NSObject namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDocument, + _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a [NSXMLElement] that points to the same underlying object as [other]. - static NSXMLElement castFrom(T other) { - return NSXMLElement._(other._id, other._lib, retain: true, release: true); + static objc.NSObject processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661( + _class_NSXMLDocument, + _sel_processingInstructionWithName_stringValue_, + name.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSXMLElement] that wraps the given raw object pointer. - static NSXMLElement castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLElement._(other, lib, retain: retain, release: release); + static objc.NSObject commentWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35(_class_NSXMLDocument, + _sel_commentWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSXMLElement]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSXMLElement1); + static objc.NSObject textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLDocument, _sel_textWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSXMLElement initWithName_(NSString name) { - final _ret = _lib._objc_msgSend_31(_id, _lib._sel_initWithName_1, name._id); - return NSXMLElement._(_ret, _lib, retain: true, release: true); + static objc.NSObject? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_2( + _class_NSXMLDocument, _sel_DTDNodeWithXMLString_, string.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSXMLElement initWithName_URI_(NSString name, NSString? URI) { - final _ret = _lib._objc_msgSend_1142( - _id, _lib._sel_initWithName_URI_1, name._id, URI?._id ?? ffi.nullptr); - return NSXMLElement._(_ret, _lib, retain: true, release: true); + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_297( + _class_NSXMLDocument, _sel_localNameForName_, name.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSXMLElement initWithName_stringValue_(NSString name, NSString? string) { - final _ret = _lib._objc_msgSend_1142( - _id, - _lib._sel_initWithName_stringValue_1, - name._id, - string?._id ?? ffi.nullptr); - return NSXMLElement._(_ret, _lib, retain: true, release: true); + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = _objc_msgSend_14( + _class_NSXMLDocument, _sel_prefixForName_, name.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSXMLElement? initWithXMLString_error_( - NSString string, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_303( - _id, _lib._sel_initWithXMLString_error_1, string._id, error); + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_677( + _class_NSXMLDocument, _sel_predefinedNamespaceForPrefix_, name.pointer); return _ret.address == 0 ? null - : NSXMLElement._(_ret, _lib, retain: true, release: true); + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - @override - NSXMLElement initWithKind_options_(int kind, int options) { - final _ret = _lib._objc_msgSend_1107( - _id, _lib._sel_initWithKind_options_1, kind, options); - return NSXMLElement._(_ret, _lib, retain: true, release: true); + static NSXMLDocument new1() { + final _ret = _objc_msgSend_40(_class_NSXMLDocument, _sel_new); + return NSXMLDocument.castFromPointer(_ret, retain: false, release: true); } - NSArray elementsForName_(NSString name) { + static NSXMLDocument allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _lib._objc_msgSend_358(_id, _lib._sel_elementsForName_1, name._id); - return NSArray._(_ret, _lib, retain: true, release: true); + _objc_msgSend_47(_class_NSXMLDocument, _sel_allocWithZone_, zone); + return NSXMLDocument.castFromPointer(_ret, retain: false, release: true); } - NSArray elementsForLocalName_URI_(NSString localName, NSString? URI) { - final _ret = _lib._objc_msgSend_1143( - _id, - _lib._sel_elementsForLocalName_URI_1, - localName._id, - URI?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSXMLDocument alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLDocument, _sel_alloc); + return NSXMLDocument.castFromPointer(_ret, retain: false, release: true); } - void addAttribute_(NSXMLNode attribute) { - _lib._objc_msgSend_1121(_id, _lib._sel_addAttribute_1, attribute._id); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLDocument, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - void removeAttributeForName_(NSString name) { - _lib._objc_msgSend_247(_id, _lib._sel_removeAttributeForName_1, name._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLDocument, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSArray? get attributes { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_attributes1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSXMLDocument, _sel_accessInstanceVariablesDirectly); } - set attributes(NSArray? value) { - return _lib._objc_msgSend_1053( - _id, _lib._sel_setAttributes_1, value?._id ?? ffi.nullptr); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSXMLDocument, _sel_useStoredAccessor); } - void setAttributesWithDictionary_(NSDictionary attributes) { - _lib._objc_msgSend_509( - _id, _lib._sel_setAttributesWithDictionary_1, attributes._id); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLDocument, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSXMLNode? attributeForName_(NSString name) { - final _ret = - _lib._objc_msgSend_1125(_id, _lib._sel_attributeForName_1, name._id); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLDocument, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSXMLNode? attributeForLocalName_URI_(NSString localName, NSString? URI) { - final _ret = _lib._objc_msgSend_1144( - _id, - _lib._sel_attributeForLocalName_URI_1, - localName._id, - URI?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLDocument, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSXMLDocument, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSXMLDocument, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSXMLDocument = objc.getClass("NSXMLDocument"); +late final _sel_initWithXMLString_options_error_ = + objc.registerName("initWithXMLString:options:error:"); +final _objc_msgSend_665 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_initWithContentsOfURL_options_error_ = + objc.registerName("initWithContentsOfURL:options:error:"); +final _objc_msgSend_666 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_initWithData_options_error_ = + objc.registerName("initWithData:options:error:"); +final _objc_msgSend_667 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_initWithRootElement_ = + objc.registerName("initWithRootElement:"); +final _objc_msgSend_668 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_replacementClassForClass_ = + objc.registerName("replacementClassForClass:"); +late final _sel_characterEncoding = objc.registerName("characterEncoding"); +late final _sel_setCharacterEncoding_ = + objc.registerName("setCharacterEncoding:"); +late final _sel_setVersion_ = objc.registerName("setVersion:"); +late final _sel_isStandalone = objc.registerName("isStandalone"); +late final _sel_setStandalone_ = objc.registerName("setStandalone:"); + +abstract class NSXMLDocumentContentKind { + static const int NSXMLDocumentXMLKind = 0; + static const int NSXMLDocumentXHTMLKind = 1; + static const int NSXMLDocumentHTMLKind = 2; + static const int NSXMLDocumentTextKind = 3; +} + +late final _sel_documentContentKind = objc.registerName("documentContentKind"); +final _objc_msgSend_669 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDocumentContentKind_ = + objc.registerName("setDocumentContentKind:"); +final _objc_msgSend_670 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setMIMEType_ = objc.registerName("setMIMEType:"); + +class NSXMLDTD extends NSXMLNode { + NSXMLDTD._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSXMLDTD] that points to the same underlying object as [other]. + NSXMLDTD.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSXMLDTD] that wraps the given raw object pointer. + NSXMLDTD.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSXMLDTD]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSXMLDTD); } - void addNamespace_(NSXMLNode aNamespace) { - _lib._objc_msgSend_1121(_id, _lib._sel_addNamespace_1, aNamespace._id); + @override + NSXMLDTD init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLDTD.castFromPointer(_ret, retain: true, release: true); } - void removeNamespaceForPrefix_(NSString name) { - _lib._objc_msgSend_247(_id, _lib._sel_removeNamespaceForPrefix_1, name._id); + @override + NSXMLDTD initWithKind_options_(int kind, int options) { + final _ret = _objc_msgSend_659( + this.pointer, _sel_initWithKind_options_, kind, options); + return NSXMLDTD.castFromPointer(_ret, retain: true, release: true); } - NSArray? get namespaces { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_namespaces1); + NSXMLDTD? initWithContentsOfURL_options_error_(objc.NSURL url, int mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_666(this.pointer, + _sel_initWithContentsOfURL_options_error_, url.pointer, mask, error); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - set namespaces(NSArray? value) { - return _lib._objc_msgSend_1053( - _id, _lib._sel_setNamespaces_1, value?._id ?? ffi.nullptr); + : NSXMLDTD.castFromPointer(_ret, retain: true, release: true); } - NSXMLNode? namespaceForPrefix_(NSString name) { - final _ret = - _lib._objc_msgSend_1125(_id, _lib._sel_namespaceForPrefix_1, name._id); + NSXMLDTD? initWithData_options_error_(objc.NSData data, int mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_667(this.pointer, + _sel_initWithData_options_error_, data.pointer, mask, error); return _ret.address == 0 ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + : NSXMLDTD.castFromPointer(_ret, retain: true, release: true); } - NSXMLNode? resolveNamespaceForName_(NSString name) { - final _ret = _lib._objc_msgSend_1125( - _id, _lib._sel_resolveNamespaceForName_1, name._id); + objc.NSString? get publicID { + final _ret = _objc_msgSend_13(this.pointer, _sel_publicID); return _ret.address == 0 ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set publicID(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setPublicID_, value?.pointer ?? ffi.nullptr); } - NSString? resolvePrefixForNamespaceURI_(NSString namespaceURI) { - final _ret = _lib._objc_msgSend_186( - _id, _lib._sel_resolvePrefixForNamespaceURI_1, namespaceURI._id); + objc.NSString? get systemID { + final _ret = _objc_msgSend_13(this.pointer, _sel_systemID); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set systemID(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setSystemID_, value?.pointer ?? ffi.nullptr); } void insertChild_atIndex_(NSXMLNode child, int index) { - _lib._objc_msgSend_1119( - _id, _lib._sel_insertChild_atIndex_1, child._id, index); + _objc_msgSend_671( + this.pointer, _sel_insertChild_atIndex_, child.pointer, index); } - void insertChildren_atIndex_(NSArray children, int index) { - _lib._objc_msgSend_1120( - _id, _lib._sel_insertChildren_atIndex_1, children._id, index); + void insertChildren_atIndex_(objc.NSArray children, int index) { + _objc_msgSend_672( + this.pointer, _sel_insertChildren_atIndex_, children.pointer, index); } void removeChildAtIndex_(int index) { - _lib._objc_msgSend_470(_id, _lib._sel_removeChildAtIndex_1, index); + _objc_msgSend_414(this.pointer, _sel_removeChildAtIndex_, index); } - void setChildren_(NSArray? children) { - _lib._objc_msgSend_843( - _id, _lib._sel_setChildren_1, children?._id ?? ffi.nullptr); + void setChildren_(objc.NSArray? children) { + _objc_msgSend_260( + this.pointer, _sel_setChildren_, children?.pointer ?? ffi.nullptr); } void addChild_(NSXMLNode child) { - _lib._objc_msgSend_1121(_id, _lib._sel_addChild_1, child._id); + _objc_msgSend_673(this.pointer, _sel_addChild_, child.pointer); } void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { - _lib._objc_msgSend_1122( - _id, _lib._sel_replaceChildAtIndex_withNode_1, index, node._id); + _objc_msgSend_674( + this.pointer, _sel_replaceChildAtIndex_withNode_, index, node.pointer); } - void normalizeAdjacentTextNodesPreservingCDATA_(bool preserve) { - _lib._objc_msgSend_870( - _id, _lib._sel_normalizeAdjacentTextNodesPreservingCDATA_1, preserve); + NSXMLDTDNode? entityDeclarationForName_(objc.NSString name) { + final _ret = _objc_msgSend_678( + this.pointer, _sel_entityDeclarationForName_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - void setAttributesAsDictionary_(NSDictionary attributes) { - _lib._objc_msgSend_509( - _id, _lib._sel_setAttributesAsDictionary_1, attributes._id); + NSXMLDTDNode? notationDeclarationForName_(objc.NSString name) { + final _ret = _objc_msgSend_678( + this.pointer, _sel_notationDeclarationForName_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - @override - NSXMLElement init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSXMLElement._(_ret, _lib, retain: true, release: true); + NSXMLDTDNode? elementDeclarationForName_(objc.NSString name) { + final _ret = _objc_msgSend_678( + this.pointer, _sel_elementDeclarationForName_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); + } + + NSXMLDTDNode? attributeDeclarationForName_elementName_( + objc.NSString name, objc.NSString elementName) { + final _ret = _objc_msgSend_679( + this.pointer, + _sel_attributeDeclarationForName_elementName_, + name.pointer, + elementName.pointer); + return _ret.address == 0 + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); + } + + static NSXMLDTDNode? predefinedEntityDeclarationForName_(objc.NSString name) { + final _ret = _objc_msgSend_678(_class_NSXMLDTD, + _sel_predefinedEntityDeclarationForName_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } @override - NSXMLElement initWithKind_(int kind) { - final _ret = _lib._objc_msgSend_1106(_id, _lib._sel_initWithKind_1, kind); - return NSXMLElement._(_ret, _lib, retain: true, release: true); + NSXMLDTD initWithKind_(int kind) { + final _ret = _objc_msgSend_658(this.pointer, _sel_initWithKind_, kind); + return NSXMLDTD.castFromPointer(_ret, retain: true, release: true); } - static NSObject document(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLElement1, _lib._sel_document1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject document() { + final _ret = _objc_msgSend_40(_class_NSXMLDTD, _sel_document); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject documentWithRootElement_( - SwiftLibrary _lib, NSXMLElement element) { - final _ret = _lib._objc_msgSend_1108(_lib._class_NSXMLElement1, - _lib._sel_documentWithRootElement_1, element._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject documentWithRootElement_(NSXMLElement element) { + final _ret = _objc_msgSend_660( + _class_NSXMLDTD, _sel_documentWithRootElement_, element.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_(SwiftLibrary _lib, NSString name) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSXMLElement1, _lib._sel_elementWithName_1, name._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject elementWithName_(objc.NSString name) { + final _ret = + _objc_msgSend_35(_class_NSXMLDTD, _sel_elementWithName_, name.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_URI_( - SwiftLibrary _lib, NSString name, NSString URI) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLElement1, - _lib._sel_elementWithName_URI_1, name._id, URI._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_661( + _class_NSXMLDTD, _sel_elementWithName_URI_, name.pointer, URI.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_stringValue_( - SwiftLibrary _lib, NSString name, NSString string) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLElement1, - _lib._sel_elementWithName_stringValue_1, name._id, string._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_661(_class_NSXMLDTD, + _sel_elementWithName_stringValue_, name.pointer, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_children_attributes_(SwiftLibrary _lib, - NSString name, NSArray? children, NSArray? attributes) { - final _ret = _lib._objc_msgSend_1110( - _lib._class_NSXMLElement1, - _lib._sel_elementWithName_children_attributes_1, - name._id, - children?._id ?? ffi.nullptr, - attributes?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_662( + _class_NSXMLDTD, + _sel_elementWithName_children_attributes_, + name.pointer, + children?.pointer ?? ffi.nullptr, + attributes?.pointer ?? ffi.nullptr); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject attributeWithName_stringValue_( - SwiftLibrary _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLElement1, - _lib._sel_attributeWithName_stringValue_1, name._id, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDTD, + _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject attributeWithName_URI_stringValue_( - SwiftLibrary _lib, NSString name, NSString URI, NSString stringValue) { - final _ret = _lib._objc_msgSend_1074( - _lib._class_NSXMLElement1, - _lib._sel_attributeWithName_URI_stringValue_1, - name._id, - URI._id, - stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_626( + _class_NSXMLDTD, + _sel_attributeWithName_URI_stringValue_, + name.pointer, + URI.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject namespaceWithName_stringValue_( - SwiftLibrary _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLElement1, - _lib._sel_namespaceWithName_stringValue_1, name._id, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDTD, + _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject processingInstructionWithName_stringValue_( - SwiftLibrary _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109( - _lib._class_NSXMLElement1, - _lib._sel_processingInstructionWithName_stringValue_1, - name._id, - stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661( + _class_NSXMLDTD, + _sel_processingInstructionWithName_stringValue_, + name.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject commentWithStringValue_( - SwiftLibrary _lib, NSString stringValue) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLElement1, - _lib._sel_commentWithStringValue_1, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject commentWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLDTD, _sel_commentWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject textWithStringValue_( - SwiftLibrary _lib, NSString stringValue) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLElement1, - _lib._sel_textWithStringValue_1, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLDTD, _sel_textWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject? DTDNodeWithXMLString_(SwiftLibrary _lib, NSString string) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSXMLElement1, - _lib._sel_DTDNodeWithXMLString_1, string._id); + static objc.NSObject? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_2( + _class_NSXMLDTD, _sel_DTDNodeWithXMLString_, string.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSString localNameForName_(SwiftLibrary _lib, NSString name) { - final _ret = _lib._objc_msgSend_69( - _lib._class_NSXMLElement1, _lib._sel_localNameForName_1, name._id); - return NSString._(_ret, _lib, retain: true, release: true); + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_297( + _class_NSXMLDTD, _sel_localNameForName_, name.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSString? prefixForName_(SwiftLibrary _lib, NSString name) { - final _ret = _lib._objc_msgSend_186( - _lib._class_NSXMLElement1, _lib._sel_prefixForName_1, name._id); + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = + _objc_msgSend_14(_class_NSXMLDTD, _sel_prefixForName_, name.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSXMLNode? predefinedNamespaceForPrefix_( - SwiftLibrary _lib, NSString name) { - final _ret = _lib._objc_msgSend_1125(_lib._class_NSXMLElement1, - _lib._sel_predefinedNamespaceForPrefix_1, name._id); + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_677( + _class_NSXMLDTD, _sel_predefinedNamespaceForPrefix_, name.pointer); return _ret.address == 0 ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static NSXMLElement new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLElement1, _lib._sel_new1); - return NSXMLElement._(_ret, _lib, retain: false, release: true); + static NSXMLDTD new1() { + final _ret = _objc_msgSend_40(_class_NSXMLDTD, _sel_new); + return NSXMLDTD.castFromPointer(_ret, retain: false, release: true); } - static NSXMLElement allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSXMLElement1, _lib._sel_allocWithZone_1, zone); - return NSXMLElement._(_ret, _lib, retain: false, release: true); + static NSXMLDTD allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSXMLDTD, _sel_allocWithZone_, zone); + return NSXMLDTD.castFromPointer(_ret, retain: false, release: true); } - static NSXMLElement alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLElement1, _lib._sel_alloc1); - return NSXMLElement._(_ret, _lib, retain: false, release: true); + static NSXMLDTD alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLDTD, _sel_alloc); + return NSXMLDTD.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSXMLElement1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLDTD, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSXMLElement1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLDTD, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLElement1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSXMLDTD, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLElement1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSXMLDTD, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSXMLElement1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLDTD, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSXMLElement1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLDTD, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSXMLElement1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLDTD, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSXMLDTD, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSXMLDTD, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSXMLDTD = objc.getClass("NSXMLDTD"); +late final _sel_setPublicID_ = objc.registerName("setPublicID:"); +late final _sel_setSystemID_ = objc.registerName("setSystemID:"); +late final _sel_insertChild_atIndex_ = + objc.registerName("insertChild:atIndex:"); +final _objc_msgSend_671 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_insertChildren_atIndex_ = + objc.registerName("insertChildren:atIndex:"); +final _objc_msgSend_672 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_removeChildAtIndex_ = objc.registerName("removeChildAtIndex:"); +late final _sel_setChildren_ = objc.registerName("setChildren:"); +late final _sel_addChild_ = objc.registerName("addChild:"); +final _objc_msgSend_673 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_replaceChildAtIndex_withNode_ = + objc.registerName("replaceChildAtIndex:withNode:"); +final _objc_msgSend_674 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + +class NSXMLDTDNode extends NSXMLNode { + NSXMLDTDNode._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSXMLDTDNode] that points to the same underlying object as [other]. + NSXMLDTDNode.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSXMLDTDNode] that wraps the given raw object pointer. + NSXMLDTDNode.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSXMLDTDNode]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSXMLDTDNode); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSXMLElement1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + NSXMLDTDNode? initWithXMLString_(objc.NSString string) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_initWithXMLString_, string.pointer); + return _ret.address == 0 + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSXMLElement1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + @override + NSXMLDTDNode initWithKind_options_(int kind, int options) { + final _ret = _objc_msgSend_659( + this.pointer, _sel_initWithKind_options_, kind, options); + return NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } -} -class NSXMLNode extends NSObject { - NSXMLNode._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + @override + NSXMLDTDNode init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a [NSXMLNode] that points to the same underlying object as [other]. - static NSXMLNode castFrom(T other) { - return NSXMLNode._(other._id, other._lib, retain: true, release: true); + int get DTDKind { + return _objc_msgSend_675(this.pointer, _sel_DTDKind); } - /// Returns a [NSXMLNode] that wraps the given raw object pointer. - static NSXMLNode castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLNode._(other, lib, retain: retain, release: release); + set DTDKind(int value) { + return _objc_msgSend_676(this.pointer, _sel_setDTDKind_, value); } - /// Returns whether [obj] is an instance of [NSXMLNode]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSXMLNode1); + bool get external1 { + return _objc_msgSend_7(this.pointer, _sel_isExternal); } - @override - NSXMLNode init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSXMLNode._(_ret, _lib, retain: true, release: true); + objc.NSString? get publicID { + final _ret = _objc_msgSend_13(this.pointer, _sel_publicID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSXMLNode initWithKind_(int kind) { - final _ret = _lib._objc_msgSend_1106(_id, _lib._sel_initWithKind_1, kind); - return NSXMLNode._(_ret, _lib, retain: true, release: true); + set publicID(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setPublicID_, value?.pointer ?? ffi.nullptr); } - NSXMLNode initWithKind_options_(int kind, int options) { - final _ret = _lib._objc_msgSend_1107( - _id, _lib._sel_initWithKind_options_1, kind, options); - return NSXMLNode._(_ret, _lib, retain: true, release: true); + objc.NSString? get systemID { + final _ret = _objc_msgSend_13(this.pointer, _sel_systemID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject document(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLNode1, _lib._sel_document1); - return NSObject._(_ret, _lib, retain: true, release: true); + set systemID(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setSystemID_, value?.pointer ?? ffi.nullptr); } - static NSObject documentWithRootElement_( - SwiftLibrary _lib, NSXMLElement element) { - final _ret = _lib._objc_msgSend_1108(_lib._class_NSXMLNode1, - _lib._sel_documentWithRootElement_1, element._id); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSString? get notationName { + final _ret = _objc_msgSend_13(this.pointer, _sel_notationName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_(SwiftLibrary _lib, NSString name) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSXMLNode1, _lib._sel_elementWithName_1, name._id); - return NSObject._(_ret, _lib, retain: true, release: true); + set notationName(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setNotationName_, value?.pointer ?? ffi.nullptr); } - static NSObject elementWithName_URI_( - SwiftLibrary _lib, NSString name, NSString URI) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLNode1, - _lib._sel_elementWithName_URI_1, name._id, URI._id); - return NSObject._(_ret, _lib, retain: true, release: true); + @override + NSXMLDTDNode initWithKind_(int kind) { + final _ret = _objc_msgSend_658(this.pointer, _sel_initWithKind_, kind); + return NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_stringValue_( - SwiftLibrary _lib, NSString name, NSString string) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLNode1, - _lib._sel_elementWithName_stringValue_1, name._id, string._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject document() { + final _ret = _objc_msgSend_40(_class_NSXMLDTDNode, _sel_document); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_children_attributes_(SwiftLibrary _lib, - NSString name, NSArray? children, NSArray? attributes) { - final _ret = _lib._objc_msgSend_1110( - _lib._class_NSXMLNode1, - _lib._sel_elementWithName_children_attributes_1, - name._id, - children?._id ?? ffi.nullptr, - attributes?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject documentWithRootElement_(NSXMLElement element) { + final _ret = _objc_msgSend_660( + _class_NSXMLDTDNode, _sel_documentWithRootElement_, element.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject attributeWithName_stringValue_( - SwiftLibrary _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLNode1, - _lib._sel_attributeWithName_stringValue_1, name._id, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject elementWithName_(objc.NSString name) { + final _ret = _objc_msgSend_35( + _class_NSXMLDTDNode, _sel_elementWithName_, name.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject attributeWithName_URI_stringValue_( - SwiftLibrary _lib, NSString name, NSString URI, NSString stringValue) { - final _ret = _lib._objc_msgSend_1074( - _lib._class_NSXMLNode1, - _lib._sel_attributeWithName_URI_stringValue_1, - name._id, - URI._id, - stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_661(_class_NSXMLDTDNode, + _sel_elementWithName_URI_, name.pointer, URI.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject namespaceWithName_stringValue_( - SwiftLibrary _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLNode1, - _lib._sel_namespaceWithName_stringValue_1, name._id, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_661(_class_NSXMLDTDNode, + _sel_elementWithName_stringValue_, name.pointer, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject processingInstructionWithName_stringValue_( - SwiftLibrary _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109( - _lib._class_NSXMLNode1, - _lib._sel_processingInstructionWithName_stringValue_1, - name._id, - stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_662( + _class_NSXMLDTDNode, + _sel_elementWithName_children_attributes_, + name.pointer, + children?.pointer ?? ffi.nullptr, + attributes?.pointer ?? ffi.nullptr); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject commentWithStringValue_( - SwiftLibrary _lib, NSString stringValue) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLNode1, - _lib._sel_commentWithStringValue_1, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDTDNode, + _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject textWithStringValue_( - SwiftLibrary _lib, NSString stringValue) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLNode1, - _lib._sel_textWithStringValue_1, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_626( + _class_NSXMLDTDNode, + _sel_attributeWithName_URI_stringValue_, + name.pointer, + URI.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject? DTDNodeWithXMLString_(SwiftLibrary _lib, NSString string) { - final _ret = _lib._objc_msgSend_38( - _lib._class_NSXMLNode1, _lib._sel_DTDNodeWithXMLString_1, string._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDTDNode, + _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get kind { - return _lib._objc_msgSend_1111(_id, _lib._sel_kind1); + static objc.NSObject processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661( + _class_NSXMLDTDNode, + _sel_processingInstructionWithName_stringValue_, + name.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSString? get name { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_name1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static objc.NSObject commentWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLDTDNode, _sel_commentWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set name(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + static objc.NSObject textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLDTDNode, _sel_textWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSObject? get objectValue { - final _ret = _lib._objc_msgSend_17(_id, _lib._sel_objectValue1); + static objc.NSObject? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_2( + _class_NSXMLDTDNode, _sel_DTDNodeWithXMLString_, string.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set objectValue(NSObject? value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setObjectValue_1, value?._id ?? ffi.nullptr); + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_297( + _class_NSXMLDTDNode, _sel_localNameForName_, name.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get stringValue { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_stringValue1); + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = _objc_msgSend_14( + _class_NSXMLDTDNode, _sel_prefixForName_, name.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set stringValue(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setStringValue_1, value?._id ?? ffi.nullptr); + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_677( + _class_NSXMLDTDNode, _sel_predefinedNamespaceForPrefix_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - void setStringValue_resolvingEntities_(NSString string, bool resolve) { - _lib._objc_msgSend_1112( - _id, _lib._sel_setStringValue_resolvingEntities_1, string._id, resolve); + static NSXMLDTDNode new1() { + final _ret = _objc_msgSend_40(_class_NSXMLDTDNode, _sel_new); + return NSXMLDTDNode.castFromPointer(_ret, retain: false, release: true); } - int get index { - return _lib._objc_msgSend_10(_id, _lib._sel_index1); + static NSXMLDTDNode allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSXMLDTDNode, _sel_allocWithZone_, zone); + return NSXMLDTDNode.castFromPointer(_ret, retain: false, release: true); } - int get level { - return _lib._objc_msgSend_10(_id, _lib._sel_level1); + static NSXMLDTDNode alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLDTDNode, _sel_alloc); + return NSXMLDTDNode.castFromPointer(_ret, retain: false, release: true); } - NSXMLDocument? get rootDocument { - final _ret = _lib._objc_msgSend_1136(_id, _lib._sel_rootDocument1); - return _ret.address == 0 - ? null - : NSXMLDocument._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLDTDNode, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSXMLNode? get parent { - final _ret = _lib._objc_msgSend_1137(_id, _lib._sel_parent1); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLDTDNode, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - int get childCount { - return _lib._objc_msgSend_10(_id, _lib._sel_childCount1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSXMLDTDNode, _sel_accessInstanceVariablesDirectly); } - NSArray? get children { - final _ret = _lib._objc_msgSend_84(_id, _lib._sel_children1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSXMLDTDNode, _sel_useStoredAccessor); } - NSXMLNode? childAtIndex_(int index) { - final _ret = _lib._objc_msgSend_1138(_id, _lib._sel_childAtIndex_1, index); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLDTDNode, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLDTDNode, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLDTDNode, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSXMLDTDNode, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSXMLDTDNode, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSXMLDTDNode = objc.getClass("NSXMLDTDNode"); +late final _sel_initWithXMLString_ = objc.registerName("initWithXMLString:"); + +abstract class NSXMLDTDNodeKind { + static const int NSXMLEntityGeneralKind = 1; + static const int NSXMLEntityParsedKind = 2; + static const int NSXMLEntityUnparsedKind = 3; + static const int NSXMLEntityParameterKind = 4; + static const int NSXMLEntityPredefined = 5; + static const int NSXMLAttributeCDATAKind = 6; + static const int NSXMLAttributeIDKind = 7; + static const int NSXMLAttributeIDRefKind = 8; + static const int NSXMLAttributeIDRefsKind = 9; + static const int NSXMLAttributeEntityKind = 10; + static const int NSXMLAttributeEntitiesKind = 11; + static const int NSXMLAttributeNMTokenKind = 12; + static const int NSXMLAttributeNMTokensKind = 13; + static const int NSXMLAttributeEnumerationKind = 14; + static const int NSXMLAttributeNotationKind = 15; + static const int NSXMLElementDeclarationUndefinedKind = 16; + static const int NSXMLElementDeclarationEmptyKind = 17; + static const int NSXMLElementDeclarationAnyKind = 18; + static const int NSXMLElementDeclarationMixedKind = 19; + static const int NSXMLElementDeclarationElementKind = 20; +} + +late final _sel_DTDKind = objc.registerName("DTDKind"); +final _objc_msgSend_675 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDTDKind_ = objc.registerName("setDTDKind:"); +final _objc_msgSend_676 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_isExternal = objc.registerName("isExternal"); +late final _sel_notationName = objc.registerName("notationName"); +late final _sel_setNotationName_ = objc.registerName("setNotationName:"); +late final _sel_localNameForName_ = objc.registerName("localNameForName:"); +late final _sel_prefixForName_ = objc.registerName("prefixForName:"); +late final _sel_predefinedNamespaceForPrefix_ = + objc.registerName("predefinedNamespaceForPrefix:"); +final _objc_msgSend_677 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_entityDeclarationForName_ = + objc.registerName("entityDeclarationForName:"); +final _objc_msgSend_678 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_notationDeclarationForName_ = + objc.registerName("notationDeclarationForName:"); +late final _sel_elementDeclarationForName_ = + objc.registerName("elementDeclarationForName:"); +late final _sel_attributeDeclarationForName_elementName_ = + objc.registerName("attributeDeclarationForName:elementName:"); +final _objc_msgSend_679 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_predefinedEntityDeclarationForName_ = + objc.registerName("predefinedEntityDeclarationForName:"); +late final _sel_DTD = objc.registerName("DTD"); +final _objc_msgSend_680 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDTD_ = objc.registerName("setDTD:"); +final _objc_msgSend_681 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setRootElement_ = objc.registerName("setRootElement:"); +final _objc_msgSend_682 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_rootElement = objc.registerName("rootElement"); +final _objc_msgSend_683 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_XMLData = objc.registerName("XMLData"); +late final _sel_XMLDataWithOptions_ = objc.registerName("XMLDataWithOptions:"); +final _objc_msgSend_684 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_objectByApplyingXSLT_arguments_error_ = + objc.registerName("objectByApplyingXSLT:arguments:error:"); +final _objc_msgSend_685 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_objectByApplyingXSLTString_arguments_error_ = + objc.registerName("objectByApplyingXSLTString:arguments:error:"); +final _objc_msgSend_686 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_objectByApplyingXSLTAtURL_arguments_error_ = + objc.registerName("objectByApplyingXSLTAtURL:arguments:error:"); +final _objc_msgSend_687 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_validateAndReturnError_ = + objc.registerName("validateAndReturnError:"); +late final _sel_rootDocument = objc.registerName("rootDocument"); +final _objc_msgSend_688 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_parent = objc.registerName("parent"); +final _objc_msgSend_689 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_childCount = objc.registerName("childCount"); +late final _sel_children = objc.registerName("children"); +late final _sel_childAtIndex_ = objc.registerName("childAtIndex:"); +final _objc_msgSend_690 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_previousSibling = objc.registerName("previousSibling"); +late final _sel_nextSibling = objc.registerName("nextSibling"); +late final _sel_previousNode = objc.registerName("previousNode"); +late final _sel_nextNode = objc.registerName("nextNode"); +late final _sel_detach = objc.registerName("detach"); +late final _sel_XPath = objc.registerName("XPath"); +late final _sel_localName = objc.registerName("localName"); +late final _sel_prefix = objc.registerName("prefix"); +late final _sel_URI = objc.registerName("URI"); +late final _sel_setURI_ = objc.registerName("setURI:"); +late final _sel_XMLString = objc.registerName("XMLString"); +late final _sel_XMLStringWithOptions_ = + objc.registerName("XMLStringWithOptions:"); +final _objc_msgSend_691 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_canonicalXMLStringPreservingComments_ = + objc.registerName("canonicalXMLStringPreservingComments:"); +final _objc_msgSend_692 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, bool)>(); +late final _sel_nodesForXPath_error_ = + objc.registerName("nodesForXPath:error:"); +late final _sel_objectsForXQuery_constants_error_ = + objc.registerName("objectsForXQuery:constants:error:"); +final _objc_msgSend_693 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_objectsForXQuery_error_ = + objc.registerName("objectsForXQuery:error:"); +late final _sel_initWithName_URI_ = objc.registerName("initWithName:URI:"); +final _objc_msgSend_694 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithName_stringValue_ = + objc.registerName("initWithName:stringValue:"); +late final _sel_initWithXMLString_error_ = + objc.registerName("initWithXMLString:error:"); +final _objc_msgSend_695 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_elementsForName_ = objc.registerName("elementsForName:"); +late final _sel_elementsForLocalName_URI_ = + objc.registerName("elementsForLocalName:URI:"); +final _objc_msgSend_696 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_addAttribute_ = objc.registerName("addAttribute:"); +late final _sel_removeAttributeForName_ = + objc.registerName("removeAttributeForName:"); +late final _sel_attributes = objc.registerName("attributes"); +late final _sel_setAttributes_ = objc.registerName("setAttributes:"); +late final _sel_setAttributesWithDictionary_ = + objc.registerName("setAttributesWithDictionary:"); +final _objc_msgSend_697 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_attributeForName_ = objc.registerName("attributeForName:"); +late final _sel_attributeForLocalName_URI_ = + objc.registerName("attributeForLocalName:URI:"); +final _objc_msgSend_698 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_addNamespace_ = objc.registerName("addNamespace:"); +late final _sel_removeNamespaceForPrefix_ = + objc.registerName("removeNamespaceForPrefix:"); +late final _sel_namespaces = objc.registerName("namespaces"); +late final _sel_setNamespaces_ = objc.registerName("setNamespaces:"); +late final _sel_namespaceForPrefix_ = objc.registerName("namespaceForPrefix:"); +late final _sel_resolveNamespaceForName_ = + objc.registerName("resolveNamespaceForName:"); +late final _sel_resolvePrefixForNamespaceURI_ = + objc.registerName("resolvePrefixForNamespaceURI:"); +late final _sel_normalizeAdjacentTextNodesPreservingCDATA_ = + objc.registerName("normalizeAdjacentTextNodesPreservingCDATA:"); +late final _sel_setAttributesAsDictionary_ = + objc.registerName("setAttributesAsDictionary:"); + +class NSScriptClassDescription extends NSClassDescription { + NSScriptClassDescription._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSScriptClassDescription] that points to the same underlying object as [other]. + NSScriptClassDescription.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSScriptClassDescription] that wraps the given raw object pointer. + NSScriptClassDescription.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSScriptClassDescription]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSScriptClassDescription); + } + + static NSScriptClassDescription? classDescriptionForClass_( + objc.NSObject aClass) { + final _ret = _objc_msgSend_701(_class_NSScriptClassDescription, + _sel_classDescriptionForClass_, aClass.pointer); return _ret.address == 0 ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - NSXMLNode? get previousSibling { - final _ret = _lib._objc_msgSend_1137(_id, _lib._sel_previousSibling1); + NSScriptClassDescription? initWithSuiteName_className_dictionary_( + objc.NSString suiteName, + objc.NSString className, + objc.NSDictionary? classDeclaration) { + final _ret = _objc_msgSend_702( + this.pointer, + _sel_initWithSuiteName_className_dictionary_, + suiteName.pointer, + className.pointer, + classDeclaration?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); + } + + objc.NSString? get suiteName { + final _ret = _objc_msgSend_13(this.pointer, _sel_suiteName); return _ret.address == 0 ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSXMLNode? get nextSibling { - final _ret = _lib._objc_msgSend_1137(_id, _lib._sel_nextSibling1); + objc.NSString? get className { + final _ret = _objc_msgSend_13(this.pointer, _sel_className); return _ret.address == 0 ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSXMLNode? get previousNode { - final _ret = _lib._objc_msgSend_1137(_id, _lib._sel_previousNode1); + objc.NSString? get implementationClassName { + final _ret = _objc_msgSend_13(this.pointer, _sel_implementationClassName); return _ret.address == 0 ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSXMLNode? get nextNode { - final _ret = _lib._objc_msgSend_1137(_id, _lib._sel_nextNode1); + NSScriptClassDescription? get superclassDescription { + final _ret = _objc_msgSend_703(this.pointer, _sel_superclassDescription); return _ret.address == 0 ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - void detach() { - _lib._objc_msgSend_1(_id, _lib._sel_detach1); + int get appleEventCode { + return _objc_msgSend_704(this.pointer, _sel_appleEventCode); + } + + bool matchesAppleEventCode_(int appleEventCode) { + return _objc_msgSend_705( + this.pointer, _sel_matchesAppleEventCode_, appleEventCode); + } + + bool supportsCommand_(NSScriptCommandDescription commandDescription) { + return _objc_msgSend_747( + this.pointer, _sel_supportsCommand_, commandDescription.pointer); } - NSString? get XPath { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_XPath1); + ffi.Pointer selectorForCommand_( + NSScriptCommandDescription commandDescription) { + return _objc_msgSend_748( + this.pointer, _sel_selectorForCommand_, commandDescription.pointer); + } + + objc.NSString? typeForKey_(objc.NSString key) { + final _ret = _objc_msgSend_14(this.pointer, _sel_typeForKey_, key.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get localName { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_localName1); + NSScriptClassDescription? classDescriptionForKey_(objc.NSString key) { + final _ret = _objc_msgSend_749( + this.pointer, _sel_classDescriptionForKey_, key.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - NSString? get prefix { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_prefix1); + int appleEventCodeForKey_(objc.NSString key) { + return _objc_msgSend_706( + this.pointer, _sel_appleEventCodeForKey_, key.pointer); + } + + objc.NSString? keyWithAppleEventCode_(int appleEventCode) { + final _ret = _objc_msgSend_750( + this.pointer, _sel_keyWithAppleEventCode_, appleEventCode); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get URI { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_URI1); + objc.NSString? get defaultSubcontainerAttributeKey { + final _ret = + _objc_msgSend_13(this.pointer, _sel_defaultSubcontainerAttributeKey); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set URI(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setURI_1, value?._id ?? ffi.nullptr); + bool isLocationRequiredToCreateForKey_(objc.NSString toManyRelationshipKey) { + return _objc_msgSend_51(this.pointer, + _sel_isLocationRequiredToCreateForKey_, toManyRelationshipKey.pointer); } - static NSString localNameForName_(SwiftLibrary _lib, NSString name) { - final _ret = _lib._objc_msgSend_69( - _lib._class_NSXMLNode1, _lib._sel_localNameForName_1, name._id); - return NSString._(_ret, _lib, retain: true, release: true); + bool hasPropertyForKey_(objc.NSString key) { + return _objc_msgSend_51(this.pointer, _sel_hasPropertyForKey_, key.pointer); } - static NSString? prefixForName_(SwiftLibrary _lib, NSString name) { - final _ret = _lib._objc_msgSend_186( - _lib._class_NSXMLNode1, _lib._sel_prefixForName_1, name._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + bool hasOrderedToManyRelationshipForKey_(objc.NSString key) { + return _objc_msgSend_51( + this.pointer, _sel_hasOrderedToManyRelationshipForKey_, key.pointer); + } + + bool hasReadablePropertyForKey_(objc.NSString key) { + return _objc_msgSend_51( + this.pointer, _sel_hasReadablePropertyForKey_, key.pointer); + } + + bool hasWritablePropertyForKey_(objc.NSString key) { + return _objc_msgSend_51( + this.pointer, _sel_hasWritablePropertyForKey_, key.pointer); + } + + bool isReadOnlyKey_(objc.NSString key) { + return _objc_msgSend_51(this.pointer, _sel_isReadOnlyKey_, key.pointer); + } + + static void registerClassDescription_forClass_( + NSClassDescription description, objc.NSObject aClass) { + _objc_msgSend_699( + _class_NSScriptClassDescription, + _sel_registerClassDescription_forClass_, + description.pointer, + aClass.pointer); + } + + static void invalidateClassDescriptionCache() { + _objc_msgSend_82( + _class_NSScriptClassDescription, _sel_invalidateClassDescriptionCache); + } + + @override + NSScriptClassDescription init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); + } + + static NSScriptClassDescription new1() { + final _ret = _objc_msgSend_40(_class_NSScriptClassDescription, _sel_new); + return NSScriptClassDescription.castFromPointer(_ret, + retain: false, release: true); + } + + static NSScriptClassDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSScriptClassDescription, _sel_allocWithZone_, zone); + return NSScriptClassDescription.castFromPointer(_ret, + retain: false, release: true); + } + + static NSScriptClassDescription alloc() { + final _ret = _objc_msgSend_40(_class_NSScriptClassDescription, _sel_alloc); + return NSScriptClassDescription.castFromPointer(_ret, + retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSScriptClassDescription, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSScriptClassDescription, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSScriptClassDescription, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSScriptClassDescription, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSScriptClassDescription, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSScriptClassDescription, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSScriptClassDescription, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSScriptClassDescription, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSScriptClassDescription, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSScriptClassDescription = + objc.getClass("NSScriptClassDescription"); + +class NSClassDescription extends objc.NSObject { + NSClassDescription._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSClassDescription] that points to the same underlying object as [other]. + NSClassDescription.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSClassDescription] that wraps the given raw object pointer. + NSClassDescription.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSClassDescription]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSClassDescription); } - static NSXMLNode? predefinedNamespaceForPrefix_( - SwiftLibrary _lib, NSString name) { - final _ret = _lib._objc_msgSend_1125(_lib._class_NSXMLNode1, - _lib._sel_predefinedNamespaceForPrefix_1, name._id); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + static void registerClassDescription_forClass_( + NSClassDescription description, objc.NSObject aClass) { + _objc_msgSend_699( + _class_NSClassDescription, + _sel_registerClassDescription_forClass_, + description.pointer, + aClass.pointer); } - NSString get description { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); + static void invalidateClassDescriptionCache() { + _objc_msgSend_82( + _class_NSClassDescription, _sel_invalidateClassDescriptionCache); } - NSString get XMLString { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_XMLString1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSClassDescription? classDescriptionForClass_(objc.NSObject aClass) { + final _ret = _objc_msgSend_700(_class_NSClassDescription, + _sel_classDescriptionForClass_, aClass.pointer); + return _ret.address == 0 + ? null + : NSClassDescription.castFromPointer(_ret, retain: true, release: true); } - NSString XMLStringWithOptions_(int options) { - final _ret = - _lib._objc_msgSend_1139(_id, _lib._sel_XMLStringWithOptions_1, options); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSArray get attributeKeys { + final _ret = _objc_msgSend_6(this.pointer, _sel_attributeKeys); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString canonicalXMLStringPreservingComments_(bool comments) { - final _ret = _lib._objc_msgSend_1140( - _id, _lib._sel_canonicalXMLStringPreservingComments_1, comments); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSArray get toOneRelationshipKeys { + final _ret = _objc_msgSend_6(this.pointer, _sel_toOneRelationshipKeys); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSArray? nodesForXPath_error_( - NSString xpath, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_443( - _id, _lib._sel_nodesForXPath_error_1, xpath._id, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + objc.NSArray get toManyRelationshipKeys { + final _ret = _objc_msgSend_6(this.pointer, _sel_toManyRelationshipKeys); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSArray? objectsForXQuery_constants_error_(NSString xquery, - NSDictionary? constants, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_1141( - _id, - _lib._sel_objectsForXQuery_constants_error_1, - xquery._id, - constants?._id ?? ffi.nullptr, - error); + objc.NSString? inverseForRelationshipKey_(objc.NSString relationshipKey) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_inverseForRelationshipKey_, relationshipKey.pointer); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSArray? objectsForXQuery_error_( - NSString xquery, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_443( - _id, _lib._sel_objectsForXQuery_error_1, xquery._id, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + @override + NSClassDescription init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSClassDescription.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLNode new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSXMLNode1, _lib._sel_new1); - return NSXMLNode._(_ret, _lib, retain: false, release: true); + static NSClassDescription new1() { + final _ret = _objc_msgSend_40(_class_NSClassDescription, _sel_new); + return NSClassDescription.castFromPointer(_ret, + retain: false, release: true); } - static NSXMLNode allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSXMLNode1, _lib._sel_allocWithZone_1, zone); - return NSXMLNode._(_ret, _lib, retain: false, release: true); + static NSClassDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSClassDescription, _sel_allocWithZone_, zone); + return NSClassDescription.castFromPointer(_ret, + retain: false, release: true); } - static NSXMLNode alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSXMLNode1, _lib._sel_alloc1); - return NSXMLNode._(_ret, _lib, retain: false, release: true); + static NSClassDescription alloc() { + final _ret = _objc_msgSend_40(_class_NSClassDescription, _sel_alloc); + return NSClassDescription.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSXMLNode1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSClassDescription, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSXMLNode1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSClassDescription, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLNode1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSClassDescription, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLNode1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSClassDescription, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSXMLNode1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSClassDescription, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSXMLNode1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSClassDescription, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSXMLNode1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } - - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSXMLNode1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSXMLNode1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } -} - -abstract class NSXMLNodeKind { - static const int NSXMLInvalidKind = 0; - static const int NSXMLDocumentKind = 1; - static const int NSXMLElementKind = 2; - static const int NSXMLAttributeKind = 3; - static const int NSXMLNamespaceKind = 4; - static const int NSXMLProcessingInstructionKind = 5; - static const int NSXMLCommentKind = 6; - static const int NSXMLTextKind = 7; - static const int NSXMLDTDKind = 8; - static const int NSXMLEntityDeclarationKind = 9; - static const int NSXMLAttributeDeclarationKind = 10; - static const int NSXMLElementDeclarationKind = 11; - static const int NSXMLNotationDeclarationKind = 12; -} - -abstract class NSXMLNodeOptions { - static const int NSXMLNodeOptionsNone = 0; - static const int NSXMLNodeIsCDATA = 1; - static const int NSXMLNodeExpandEmptyElement = 2; - static const int NSXMLNodeCompactEmptyElement = 4; - static const int NSXMLNodeUseSingleQuotes = 8; - static const int NSXMLNodeUseDoubleQuotes = 16; - static const int NSXMLNodeNeverEscapeContents = 32; - static const int NSXMLDocumentTidyHTML = 512; - static const int NSXMLDocumentTidyXML = 1024; - static const int NSXMLDocumentValidate = 8192; - static const int NSXMLNodeLoadExternalEntitiesAlways = 16384; - static const int NSXMLNodeLoadExternalEntitiesSameOriginOnly = 32768; - static const int NSXMLNodeLoadExternalEntitiesNever = 524288; - static const int NSXMLDocumentXInclude = 65536; - static const int NSXMLNodePrettyPrint = 131072; - static const int NSXMLDocumentIncludeContentTypeDeclaration = 262144; - static const int NSXMLNodePreserveNamespaceOrder = 1048576; - static const int NSXMLNodePreserveAttributeOrder = 2097152; - static const int NSXMLNodePreserveEntities = 4194304; - static const int NSXMLNodePreservePrefixes = 8388608; - static const int NSXMLNodePreserveCDATA = 16777216; - static const int NSXMLNodePreserveWhitespace = 33554432; - static const int NSXMLNodePreserveDTD = 67108864; - static const int NSXMLNodePreserveCharacterReferences = 134217728; - static const int NSXMLNodePromoteSignificantWhitespace = 268435456; - static const int NSXMLNodePreserveEmptyElements = 6; - static const int NSXMLNodePreserveQuotes = 24; - static const int NSXMLNodePreserveAll = 4293918750; -} - -class NSXMLDocument extends NSXMLNode { - NSXMLDocument._(ffi.Pointer id, SwiftLibrary lib, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSClassDescription, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSClassDescription, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSClassDescription, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSClassDescription = objc.getClass("NSClassDescription"); +late final _sel_registerClassDescription_forClass_ = + objc.registerName("registerClassDescription:forClass:"); +final _objc_msgSend_699 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_invalidateClassDescriptionCache = + objc.registerName("invalidateClassDescriptionCache"); +late final _sel_classDescriptionForClass_ = + objc.registerName("classDescriptionForClass:"); +final _objc_msgSend_700 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_attributeKeys = objc.registerName("attributeKeys"); +late final _sel_toOneRelationshipKeys = + objc.registerName("toOneRelationshipKeys"); +late final _sel_toManyRelationshipKeys = + objc.registerName("toManyRelationshipKeys"); +late final _sel_inverseForRelationshipKey_ = + objc.registerName("inverseForRelationshipKey:"); +final _objc_msgSend_701 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithSuiteName_className_dictionary_ = + objc.registerName("initWithSuiteName:className:dictionary:"); +final _objc_msgSend_702 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_suiteName = objc.registerName("suiteName"); +late final _sel_className = objc.registerName("className"); +late final _sel_implementationClassName = + objc.registerName("implementationClassName"); +late final _sel_superclassDescription = + objc.registerName("superclassDescription"); +final _objc_msgSend_703 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_appleEventCode = objc.registerName("appleEventCode"); +final _objc_msgSend_704 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedInt Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_matchesAppleEventCode_ = + objc.registerName("matchesAppleEventCode:"); +final _objc_msgSend_705 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, int)>(); + +class NSScriptCommandDescription extends objc.NSObject { + NSScriptCommandDescription._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSXMLDocument] that points to the same underlying object as [other]. - static NSXMLDocument castFrom(T other) { - return NSXMLDocument._(other._id, other._lib, retain: true, release: true); - } + /// Constructs a [NSScriptCommandDescription] that points to the same underlying object as [other]. + NSScriptCommandDescription.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSXMLDocument] that wraps the given raw object pointer. - static NSXMLDocument castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLDocument._(other, lib, retain: retain, release: release); - } + /// Constructs a [NSScriptCommandDescription] that wraps the given raw object pointer. + NSScriptCommandDescription.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSXMLDocument]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSXMLDocument1); + /// Returns whether [obj] is an instance of [NSScriptCommandDescription]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSScriptCommandDescription); } @override - NSXMLDocument init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSXMLDocument._(_ret, _lib, retain: true, release: true); + objc.NSObject init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSXMLDocument? initWithXMLString_options_error_( - NSString string, int mask, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_1113(_id, - _lib._sel_initWithXMLString_options_error_1, string._id, mask, error); - return _ret.address == 0 - ? null - : NSXMLDocument._(_ret, _lib, retain: true, release: true); + NSScriptCommandDescription? initWithSuiteName_commandName_dictionary_( + objc.NSString suiteName, + objc.NSString commandName, + objc.NSDictionary? commandDeclaration) { + final _ret = _objc_msgSend_702( + this.pointer, + _sel_initWithSuiteName_commandName_dictionary_, + suiteName.pointer, + commandName.pointer, + commandDeclaration?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSScriptCommandDescription.castFromPointer(_ret, + retain: true, release: true); } - NSXMLDocument? initWithContentsOfURL_options_error_( - NSURL url, int mask, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_1114(_id, - _lib._sel_initWithContentsOfURL_options_error_1, url._id, mask, error); + NSScriptCommandDescription? initWithCoder_(objc.NSCoder inCoder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, inCoder.pointer); return _ret.address == 0 ? null - : NSXMLDocument._(_ret, _lib, retain: true, release: true); + : NSScriptCommandDescription.castFromPointer(_ret, + retain: true, release: true); } - NSXMLDocument? initWithData_options_error_( - NSData data, int mask, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_1115( - _id, _lib._sel_initWithData_options_error_1, data._id, mask, error); - return _ret.address == 0 - ? null - : NSXMLDocument._(_ret, _lib, retain: true, release: true); + objc.NSString get suiteName { + final _ret = _objc_msgSend_12(this.pointer, _sel_suiteName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSXMLDocument initWithRootElement_(NSXMLElement? element) { - final _ret = _lib._objc_msgSend_1116( - _id, _lib._sel_initWithRootElement_1, element?._id ?? ffi.nullptr); - return NSXMLDocument._(_ret, _lib, retain: true, release: true); + objc.NSString get commandName { + final _ret = _objc_msgSend_12(this.pointer, _sel_commandName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject replacementClassForClass_(SwiftLibrary _lib, NSObject cls) { - final _ret = _lib._objc_msgSend_124(_lib._class_NSXMLDocument1, - _lib._sel_replacementClassForClass_1, cls._id); - return NSObject._(_ret, _lib, retain: true, release: true); + int get appleEventClassCode { + return _objc_msgSend_704(this.pointer, _sel_appleEventClassCode); } - NSString? get characterEncoding { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_characterEncoding1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + int get appleEventCode { + return _objc_msgSend_704(this.pointer, _sel_appleEventCode); } - set characterEncoding(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setCharacterEncoding_1, value?._id ?? ffi.nullptr); + objc.NSString get commandClassName { + final _ret = _objc_msgSend_12(this.pointer, _sel_commandClassName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get version { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_version1); + objc.NSString? get returnType { + final _ret = _objc_msgSend_13(this.pointer, _sel_returnType); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set version(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setVersion_1, value?._id ?? ffi.nullptr); + int get appleEventCodeForReturnType { + return _objc_msgSend_704(this.pointer, _sel_appleEventCodeForReturnType); } - bool get standalone { - return _lib._objc_msgSend_12(_id, _lib._sel_isStandalone1); + objc.NSArray get argumentNames { + final _ret = _objc_msgSend_6(this.pointer, _sel_argumentNames); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set standalone(bool value) { - return _lib._objc_msgSend_527(_id, _lib._sel_setStandalone_1, value); + objc.NSString? typeForArgumentWithName_(objc.NSString argumentName) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_typeForArgumentWithName_, argumentName.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int get documentContentKind { - return _lib._objc_msgSend_1117(_id, _lib._sel_documentContentKind1); + int appleEventCodeForArgumentWithName_(objc.NSString argumentName) { + return _objc_msgSend_706(this.pointer, + _sel_appleEventCodeForArgumentWithName_, argumentName.pointer); } - set documentContentKind(int value) { - return _lib._objc_msgSend_1118( - _id, _lib._sel_setDocumentContentKind_1, value); + bool isOptionalArgumentWithName_(objc.NSString argumentName) { + return _objc_msgSend_51( + this.pointer, _sel_isOptionalArgumentWithName_, argumentName.pointer); } - NSString? get MIMEType { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_MIMEType1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + NSScriptCommand createCommandInstance() { + final _ret = _objc_msgSend_745(this.pointer, _sel_createCommandInstance); + return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - set MIMEType(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setMIMEType_1, value?._id ?? ffi.nullptr); + NSScriptCommand createCommandInstanceWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_746( + this.pointer, _sel_createCommandInstanceWithZone_, zone); + return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - NSXMLDTD? get DTD { - final _ret = _lib._objc_msgSend_1128(_id, _lib._sel_DTD1); - return _ret.address == 0 - ? null - : NSXMLDTD._(_ret, _lib, retain: true, release: true); + static NSScriptCommandDescription new1() { + final _ret = _objc_msgSend_40(_class_NSScriptCommandDescription, _sel_new); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: false, release: true); } - set DTD(NSXMLDTD? value) { - return _lib._objc_msgSend_1129( - _id, _lib._sel_setDTD_1, value?._id ?? ffi.nullptr); + static NSScriptCommandDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSScriptCommandDescription, _sel_allocWithZone_, zone); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: false, release: true); } - void setRootElement_(NSXMLElement root) { - _lib._objc_msgSend_1130(_id, _lib._sel_setRootElement_1, root._id); + static NSScriptCommandDescription alloc() { + final _ret = + _objc_msgSend_40(_class_NSScriptCommandDescription, _sel_alloc); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: false, release: true); } - NSXMLElement? rootElement() { - final _ret = _lib._objc_msgSend_1131(_id, _lib._sel_rootElement1); - return _ret.address == 0 - ? null - : NSXMLElement._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSScriptCommandDescription, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - void insertChild_atIndex_(NSXMLNode child, int index) { - _lib._objc_msgSend_1119( - _id, _lib._sel_insertChild_atIndex_1, child._id, index); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSScriptCommandDescription, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - void insertChildren_atIndex_(NSArray children, int index) { - _lib._objc_msgSend_1120( - _id, _lib._sel_insertChildren_atIndex_1, children._id, index); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7(_class_NSScriptCommandDescription, + _sel_accessInstanceVariablesDirectly); } - void removeChildAtIndex_(int index) { - _lib._objc_msgSend_470(_id, _lib._sel_removeChildAtIndex_1, index); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSScriptCommandDescription, _sel_useStoredAccessor); } - void setChildren_(NSArray? children) { - _lib._objc_msgSend_843( - _id, _lib._sel_setChildren_1, children?._id ?? ffi.nullptr); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSScriptCommandDescription, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - void addChild_(NSXMLNode child) { - _lib._objc_msgSend_1121(_id, _lib._sel_addChild_1, child._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSScriptCommandDescription, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { - _lib._objc_msgSend_1122( - _id, _lib._sel_replaceChildAtIndex_withNode_1, index, node._id); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSScriptCommandDescription, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSScriptCommandDescription, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSScriptCommandDescription, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSScriptCommandDescription = + objc.getClass("NSScriptCommandDescription"); +late final _sel_initWithSuiteName_commandName_dictionary_ = + objc.registerName("initWithSuiteName:commandName:dictionary:"); +late final _sel_commandName = objc.registerName("commandName"); +late final _sel_appleEventClassCode = objc.registerName("appleEventClassCode"); +late final _sel_commandClassName = objc.registerName("commandClassName"); +late final _sel_returnType = objc.registerName("returnType"); +late final _sel_appleEventCodeForReturnType = + objc.registerName("appleEventCodeForReturnType"); +late final _sel_argumentNames = objc.registerName("argumentNames"); +late final _sel_typeForArgumentWithName_ = + objc.registerName("typeForArgumentWithName:"); +late final _sel_appleEventCodeForArgumentWithName_ = + objc.registerName("appleEventCodeForArgumentWithName:"); +final _objc_msgSend_706 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedInt Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isOptionalArgumentWithName_ = + objc.registerName("isOptionalArgumentWithName:"); + +class NSScriptCommand extends objc.NSObject { + NSScriptCommand._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSScriptCommand] that points to the same underlying object as [other]. + NSScriptCommand.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSScriptCommand] that wraps the given raw object pointer. + NSScriptCommand.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - NSData get XMLData { - final _ret = _lib._objc_msgSend_43(_id, _lib._sel_XMLData1); - return NSData._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSScriptCommand]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSScriptCommand); } - NSData XMLDataWithOptions_(int options) { - final _ret = - _lib._objc_msgSend_1132(_id, _lib._sel_XMLDataWithOptions_1, options); - return NSData._(_ret, _lib, retain: true, release: true); + NSScriptCommand initWithCommandDescription_( + NSScriptCommandDescription commandDef) { + final _ret = _objc_msgSend_707( + this.pointer, _sel_initWithCommandDescription_, commandDef.pointer); + return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - NSObject? objectByApplyingXSLT_arguments_error_(NSData xslt, - NSDictionary? arguments, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_1133( - _id, - _lib._sel_objectByApplyingXSLT_arguments_error_1, - xslt._id, - arguments?._id ?? ffi.nullptr, - error); + NSScriptCommand? initWithCoder_(objc.NSCoder inCoder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, inCoder.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - NSObject? objectByApplyingXSLTString_arguments_error_(NSString xslt, - NSDictionary? arguments, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_1134( - _id, - _lib._sel_objectByApplyingXSLTString_arguments_error_1, - xslt._id, - arguments?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + NSScriptCommandDescription get commandDescription { + final _ret = _objc_msgSend_708(this.pointer, _sel_commandDescription); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: true, release: true); } - NSObject? objectByApplyingXSLTAtURL_arguments_error_(NSURL xsltURL, - NSDictionary? argument, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_1135( - _id, - _lib._sel_objectByApplyingXSLTAtURL_arguments_error_1, - xsltURL._id, - argument?._id ?? ffi.nullptr, - error); + objc.NSObject? get directParameter { + final _ret = _objc_msgSend_66(this.pointer, _sel_directParameter); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - bool validateAndReturnError_(ffi.Pointer> error) { - return _lib._objc_msgSend_255( - _id, _lib._sel_validateAndReturnError_1, error); + set directParameter(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDirectParameter_, value?.pointer ?? ffi.nullptr); } - @override - NSXMLDocument initWithKind_(int kind) { - final _ret = _lib._objc_msgSend_1106(_id, _lib._sel_initWithKind_1, kind); - return NSXMLDocument._(_ret, _lib, retain: true, release: true); + NSScriptObjectSpecifier? get receiversSpecifier { + final _ret = _objc_msgSend_737(this.pointer, _sel_receiversSpecifier); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - @override - NSXMLDocument initWithKind_options_(int kind, int options) { - final _ret = _lib._objc_msgSend_1107( - _id, _lib._sel_initWithKind_options_1, kind, options); - return NSXMLDocument._(_ret, _lib, retain: true, release: true); + set receiversSpecifier(NSScriptObjectSpecifier? value) { + return _objc_msgSend_738(this.pointer, _sel_setReceiversSpecifier_, + value?.pointer ?? ffi.nullptr); } - static NSObject document(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLDocument1, _lib._sel_document1); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSObject? get evaluatedReceivers { + final _ret = _objc_msgSend_66(this.pointer, _sel_evaluatedReceivers); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSDictionary? get arguments { + final _ret = _objc_msgSend_65(this.pointer, _sel_arguments); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSObject documentWithRootElement_( - SwiftLibrary _lib, NSXMLElement element) { - final _ret = _lib._objc_msgSend_1108(_lib._class_NSXMLDocument1, - _lib._sel_documentWithRootElement_1, element._id); - return NSObject._(_ret, _lib, retain: true, release: true); + set arguments(objc.NSDictionary? value) { + return _objc_msgSend_173( + this.pointer, _sel_setArguments_, value?.pointer ?? ffi.nullptr); } - static NSObject elementWithName_(SwiftLibrary _lib, NSString name) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSXMLDocument1, _lib._sel_elementWithName_1, name._id); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSDictionary? get evaluatedArguments { + final _ret = _objc_msgSend_65(this.pointer, _sel_evaluatedArguments); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_URI_( - SwiftLibrary _lib, NSString name, NSString URI) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDocument1, - _lib._sel_elementWithName_URI_1, name._id, URI._id); - return NSObject._(_ret, _lib, retain: true, release: true); + bool get wellFormed { + return _objc_msgSend_7(this.pointer, _sel_isWellFormed); } - static NSObject elementWithName_stringValue_( - SwiftLibrary _lib, NSString name, NSString string) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDocument1, - _lib._sel_elementWithName_stringValue_1, name._id, string._id); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSObject? performDefaultImplementation() { + final _ret = + _objc_msgSend_66(this.pointer, _sel_performDefaultImplementation); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_children_attributes_(SwiftLibrary _lib, - NSString name, NSArray? children, NSArray? attributes) { - final _ret = _lib._objc_msgSend_1110( - _lib._class_NSXMLDocument1, - _lib._sel_elementWithName_children_attributes_1, - name._id, - children?._id ?? ffi.nullptr, - attributes?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + objc.NSObject? executeCommand() { + final _ret = _objc_msgSend_66(this.pointer, _sel_executeCommand); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject attributeWithName_stringValue_( - SwiftLibrary _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDocument1, - _lib._sel_attributeWithName_stringValue_1, name._id, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + int get scriptErrorNumber { + return _objc_msgSend_114(this.pointer, _sel_scriptErrorNumber); } - static NSObject attributeWithName_URI_stringValue_( - SwiftLibrary _lib, NSString name, NSString URI, NSString stringValue) { - final _ret = _lib._objc_msgSend_1074( - _lib._class_NSXMLDocument1, - _lib._sel_attributeWithName_URI_stringValue_1, - name._id, - URI._id, - stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + set scriptErrorNumber(int value) { + return _objc_msgSend_134(this.pointer, _sel_setScriptErrorNumber_, value); } - static NSObject namespaceWithName_stringValue_( - SwiftLibrary _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDocument1, - _lib._sel_namespaceWithName_stringValue_1, name._id, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + NSAppleEventDescriptor? get scriptErrorOffendingObjectDescriptor { + final _ret = _objc_msgSend_742( + this.pointer, _sel_scriptErrorOffendingObjectDescriptor); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject processingInstructionWithName_stringValue_( - SwiftLibrary _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109( - _lib._class_NSXMLDocument1, - _lib._sel_processingInstructionWithName_stringValue_1, - name._id, - stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + set scriptErrorOffendingObjectDescriptor(NSAppleEventDescriptor? value) { + return _objc_msgSend_743( + this.pointer, + _sel_setScriptErrorOffendingObjectDescriptor_, + value?.pointer ?? ffi.nullptr); } - static NSObject commentWithStringValue_( - SwiftLibrary _lib, NSString stringValue) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLDocument1, - _lib._sel_commentWithStringValue_1, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + NSAppleEventDescriptor? get scriptErrorExpectedTypeDescriptor { + final _ret = + _objc_msgSend_742(this.pointer, _sel_scriptErrorExpectedTypeDescriptor); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject textWithStringValue_( - SwiftLibrary _lib, NSString stringValue) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLDocument1, - _lib._sel_textWithStringValue_1, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + set scriptErrorExpectedTypeDescriptor(NSAppleEventDescriptor? value) { + return _objc_msgSend_743( + this.pointer, + _sel_setScriptErrorExpectedTypeDescriptor_, + value?.pointer ?? ffi.nullptr); } - static NSObject? DTDNodeWithXMLString_(SwiftLibrary _lib, NSString string) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSXMLDocument1, - _lib._sel_DTDNodeWithXMLString_1, string._id); + objc.NSString? get scriptErrorString { + final _ret = _objc_msgSend_13(this.pointer, _sel_scriptErrorString); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSString localNameForName_(SwiftLibrary _lib, NSString name) { - final _ret = _lib._objc_msgSend_69( - _lib._class_NSXMLDocument1, _lib._sel_localNameForName_1, name._id); - return NSString._(_ret, _lib, retain: true, release: true); + set scriptErrorString(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setScriptErrorString_, + value?.pointer ?? ffi.nullptr); } - static NSString? prefixForName_(SwiftLibrary _lib, NSString name) { - final _ret = _lib._objc_msgSend_186( - _lib._class_NSXMLDocument1, _lib._sel_prefixForName_1, name._id); + static NSScriptCommand? currentCommand() { + final _ret = _objc_msgSend_744(_class_NSScriptCommand, _sel_currentCommand); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - static NSXMLNode? predefinedNamespaceForPrefix_( - SwiftLibrary _lib, NSString name) { - final _ret = _lib._objc_msgSend_1125(_lib._class_NSXMLDocument1, - _lib._sel_predefinedNamespaceForPrefix_1, name._id); + NSAppleEventDescriptor? get appleEvent { + final _ret = _objc_msgSend_742(this.pointer, _sel_appleEvent); return _ret.address == 0 ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDocument new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLDocument1, _lib._sel_new1); - return NSXMLDocument._(_ret, _lib, retain: false, release: true); + void suspendExecution() { + _objc_msgSend_82(this.pointer, _sel_suspendExecution); } - static NSXMLDocument allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSXMLDocument1, _lib._sel_allocWithZone_1, zone); - return NSXMLDocument._(_ret, _lib, retain: false, release: true); + void resumeExecutionWithResult_(objc.NSObject? result) { + _objc_msgSend_215(this.pointer, _sel_resumeExecutionWithResult_, + result?.pointer ?? ffi.nullptr); } - static NSXMLDocument alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLDocument1, _lib._sel_alloc1); - return NSXMLDocument._(_ret, _lib, retain: false, release: true); + @override + NSScriptCommand init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSXMLDocument1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static NSScriptCommand new1() { + final _ret = _objc_msgSend_40(_class_NSScriptCommand, _sel_new); + return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSXMLDocument1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static NSScriptCommand allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSScriptCommand, _sel_allocWithZone_, zone); + return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLDocument1, _lib._sel_accessInstanceVariablesDirectly1); + static NSScriptCommand alloc() { + final _ret = _objc_msgSend_40(_class_NSScriptCommand, _sel_alloc); + return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLDocument1, _lib._sel_useStoredAccessor1); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSScriptCommand, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSXMLDocument1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSScriptCommand, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSXMLDocument1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSScriptCommand, _sel_accessInstanceVariablesDirectly); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSXMLDocument1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSScriptCommand, _sel_useStoredAccessor); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSXMLDocument1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSScriptCommand, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSXMLDocument1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSScriptCommand, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } -} -abstract class NSXMLDocumentContentKind { - static const int NSXMLDocumentXMLKind = 0; - static const int NSXMLDocumentXHTMLKind = 1; - static const int NSXMLDocumentHTMLKind = 2; - static const int NSXMLDocumentTextKind = 3; -} - -class NSXMLDTD extends NSXMLNode { - NSXMLDTD._(ffi.Pointer id, SwiftLibrary lib, + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSScriptCommand, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSScriptCommand, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSScriptCommand, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSScriptCommand = objc.getClass("NSScriptCommand"); +late final _sel_initWithCommandDescription_ = + objc.registerName("initWithCommandDescription:"); +final _objc_msgSend_707 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_commandDescription = objc.registerName("commandDescription"); +final _objc_msgSend_708 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_directParameter = objc.registerName("directParameter"); +late final _sel_setDirectParameter_ = objc.registerName("setDirectParameter:"); + +class NSScriptObjectSpecifier extends objc.NSObject { + NSScriptObjectSpecifier._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSXMLDTD] that points to the same underlying object as [other]. - static NSXMLDTD castFrom(T other) { - return NSXMLDTD._(other._id, other._lib, retain: true, release: true); - } + /// Constructs a [NSScriptObjectSpecifier] that points to the same underlying object as [other]. + NSScriptObjectSpecifier.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSXMLDTD] that wraps the given raw object pointer. - static NSXMLDTD castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLDTD._(other, lib, retain: retain, release: release); + /// Constructs a [NSScriptObjectSpecifier] that wraps the given raw object pointer. + NSScriptObjectSpecifier.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSScriptObjectSpecifier]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSScriptObjectSpecifier); } - /// Returns whether [obj] is an instance of [NSXMLDTD]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSXMLDTD1); + static NSScriptObjectSpecifier? objectSpecifierWithDescriptor_( + NSAppleEventDescriptor descriptor) { + final _ret = _objc_msgSend_734(_class_NSScriptObjectSpecifier, + _sel_objectSpecifierWithDescriptor_, descriptor.pointer); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - @override - NSXMLDTD init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSXMLDTD._(_ret, _lib, retain: true, release: true); + NSScriptObjectSpecifier initWithContainerSpecifier_key_( + NSScriptObjectSpecifier container, objc.NSString property) { + final _ret = _objc_msgSend_735( + this.pointer, + _sel_initWithContainerSpecifier_key_, + container.pointer, + property.pointer); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - @override - NSXMLDTD initWithKind_options_(int kind, int options) { - final _ret = _lib._objc_msgSend_1107( - _id, _lib._sel_initWithKind_options_1, kind, options); - return NSXMLDTD._(_ret, _lib, retain: true, release: true); + NSScriptObjectSpecifier + initWithContainerClassDescription_containerSpecifier_key_( + NSScriptClassDescription classDesc, + NSScriptObjectSpecifier? container, + objc.NSString property) { + final _ret = _objc_msgSend_736( + this.pointer, + _sel_initWithContainerClassDescription_containerSpecifier_key_, + classDesc.pointer, + container?.pointer ?? ffi.nullptr, + property.pointer); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - NSXMLDTD? initWithContentsOfURL_options_error_( - NSURL url, int mask, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_1114(_id, - _lib._sel_initWithContentsOfURL_options_error_1, url._id, mask, error); + NSScriptObjectSpecifier? initWithCoder_(objc.NSCoder inCoder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, inCoder.pointer); return _ret.address == 0 ? null - : NSXMLDTD._(_ret, _lib, retain: true, release: true); + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - NSXMLDTD? initWithData_options_error_( - NSData data, int mask, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_1115( - _id, _lib._sel_initWithData_options_error_1, data._id, mask, error); + NSScriptObjectSpecifier? get childSpecifier { + final _ret = _objc_msgSend_737(this.pointer, _sel_childSpecifier); return _ret.address == 0 ? null - : NSXMLDTD._(_ret, _lib, retain: true, release: true); + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); + } + + set childSpecifier(NSScriptObjectSpecifier? value) { + return _objc_msgSend_738( + this.pointer, _sel_setChildSpecifier_, value?.pointer ?? ffi.nullptr); } - NSString? get publicID { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_publicID1); + NSScriptObjectSpecifier? get containerSpecifier { + final _ret = _objc_msgSend_737(this.pointer, _sel_containerSpecifier); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - set publicID(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setPublicID_1, value?._id ?? ffi.nullptr); + set containerSpecifier(NSScriptObjectSpecifier? value) { + return _objc_msgSend_738(this.pointer, _sel_setContainerSpecifier_, + value?.pointer ?? ffi.nullptr); } - NSString? get systemID { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_systemID1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + bool get containerIsObjectBeingTested { + return _objc_msgSend_7(this.pointer, _sel_containerIsObjectBeingTested); } - set systemID(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setSystemID_1, value?._id ?? ffi.nullptr); + set containerIsObjectBeingTested(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setContainerIsObjectBeingTested_, value); } - void insertChild_atIndex_(NSXMLNode child, int index) { - _lib._objc_msgSend_1119( - _id, _lib._sel_insertChild_atIndex_1, child._id, index); + bool get containerIsRangeContainerObject { + return _objc_msgSend_7(this.pointer, _sel_containerIsRangeContainerObject); } - void insertChildren_atIndex_(NSArray children, int index) { - _lib._objc_msgSend_1120( - _id, _lib._sel_insertChildren_atIndex_1, children._id, index); + set containerIsRangeContainerObject(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setContainerIsRangeContainerObject_, value); } - void removeChildAtIndex_(int index) { - _lib._objc_msgSend_470(_id, _lib._sel_removeChildAtIndex_1, index); + objc.NSString get key { + final _ret = _objc_msgSend_12(this.pointer, _sel_key); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void setChildren_(NSArray? children) { - _lib._objc_msgSend_843( - _id, _lib._sel_setChildren_1, children?._id ?? ffi.nullptr); + set key(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setKey_, value.pointer); } - void addChild_(NSXMLNode child) { - _lib._objc_msgSend_1121(_id, _lib._sel_addChild_1, child._id); + NSScriptClassDescription? get containerClassDescription { + final _ret = + _objc_msgSend_703(this.pointer, _sel_containerClassDescription); + return _ret.address == 0 + ? null + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { - _lib._objc_msgSend_1122( - _id, _lib._sel_replaceChildAtIndex_withNode_1, index, node._id); + set containerClassDescription(NSScriptClassDescription? value) { + return _objc_msgSend_739(this.pointer, _sel_setContainerClassDescription_, + value?.pointer ?? ffi.nullptr); + } + + NSScriptClassDescription? get keyClassDescription { + final _ret = _objc_msgSend_703(this.pointer, _sel_keyClassDescription); + return _ret.address == 0 + ? null + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); + } + + ffi.Pointer indicesOfObjectsByEvaluatingWithContainer_count_( + objc.NSObject container, ffi.Pointer count) { + return _objc_msgSend_740( + this.pointer, + _sel_indicesOfObjectsByEvaluatingWithContainer_count_, + container.pointer, + count); } - NSXMLDTDNode? entityDeclarationForName_(NSString name) { - final _ret = _lib._objc_msgSend_1126( - _id, _lib._sel_entityDeclarationForName_1, name._id); + objc.NSObject? objectsByEvaluatingWithContainers_(objc.NSObject containers) { + final _ret = _objc_msgSend_741(this.pointer, + _sel_objectsByEvaluatingWithContainers_, containers.pointer); return _ret.address == 0 ? null - : NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSXMLDTDNode? notationDeclarationForName_(NSString name) { - final _ret = _lib._objc_msgSend_1126( - _id, _lib._sel_notationDeclarationForName_1, name._id); + objc.NSObject? get objectsByEvaluatingSpecifier { + final _ret = + _objc_msgSend_66(this.pointer, _sel_objectsByEvaluatingSpecifier); return _ret.address == 0 ? null - : NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSXMLDTDNode? elementDeclarationForName_(NSString name) { - final _ret = _lib._objc_msgSend_1126( - _id, _lib._sel_elementDeclarationForName_1, name._id); - return _ret.address == 0 - ? null - : NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + int get evaluationErrorNumber { + return _objc_msgSend_114(this.pointer, _sel_evaluationErrorNumber); } - NSXMLDTDNode? attributeDeclarationForName_elementName_( - NSString name, NSString elementName) { - final _ret = _lib._objc_msgSend_1127( - _id, - _lib._sel_attributeDeclarationForName_elementName_1, - name._id, - elementName._id); + set evaluationErrorNumber(int value) { + return _objc_msgSend_134( + this.pointer, _sel_setEvaluationErrorNumber_, value); + } + + NSScriptObjectSpecifier? get evaluationErrorSpecifier { + final _ret = _objc_msgSend_737(this.pointer, _sel_evaluationErrorSpecifier); return _ret.address == 0 ? null - : NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDTDNode? predefinedEntityDeclarationForName_( - SwiftLibrary _lib, NSString name) { - final _ret = _lib._objc_msgSend_1126(_lib._class_NSXMLDTD1, - _lib._sel_predefinedEntityDeclarationForName_1, name._id); + NSAppleEventDescriptor? get descriptor { + final _ret = _objc_msgSend_742(this.pointer, _sel_descriptor); return _ret.address == 0 ? null - : NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } @override - NSXMLDTD initWithKind_(int kind) { - final _ret = _lib._objc_msgSend_1106(_id, _lib._sel_initWithKind_1, kind); - return NSXMLDTD._(_ret, _lib, retain: true, release: true); + NSScriptObjectSpecifier init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - static NSObject document(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLDTD1, _lib._sel_document1); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSScriptObjectSpecifier new1() { + final _ret = _objc_msgSend_40(_class_NSScriptObjectSpecifier, _sel_new); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } - static NSObject documentWithRootElement_( - SwiftLibrary _lib, NSXMLElement element) { - final _ret = _lib._objc_msgSend_1108(_lib._class_NSXMLDTD1, - _lib._sel_documentWithRootElement_1, element._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSScriptObjectSpecifier allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSScriptObjectSpecifier, _sel_allocWithZone_, zone); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } - static NSObject elementWithName_(SwiftLibrary _lib, NSString name) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSXMLDTD1, _lib._sel_elementWithName_1, name._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSScriptObjectSpecifier alloc() { + final _ret = _objc_msgSend_40(_class_NSScriptObjectSpecifier, _sel_alloc); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } - static NSObject elementWithName_URI_( - SwiftLibrary _lib, NSString name, NSString URI) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDTD1, - _lib._sel_elementWithName_URI_1, name._id, URI._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSScriptObjectSpecifier, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - static NSObject elementWithName_stringValue_( - SwiftLibrary _lib, NSString name, NSString string) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDTD1, - _lib._sel_elementWithName_stringValue_1, name._id, string._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSScriptObjectSpecifier, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static NSObject elementWithName_children_attributes_(SwiftLibrary _lib, - NSString name, NSArray? children, NSArray? attributes) { - final _ret = _lib._objc_msgSend_1110( - _lib._class_NSXMLDTD1, - _lib._sel_elementWithName_children_attributes_1, - name._id, - children?._id ?? ffi.nullptr, - attributes?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSScriptObjectSpecifier, _sel_accessInstanceVariablesDirectly); } - static NSObject attributeWithName_stringValue_( - SwiftLibrary _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDTD1, - _lib._sel_attributeWithName_stringValue_1, name._id, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSScriptObjectSpecifier, _sel_useStoredAccessor); } - static NSObject attributeWithName_URI_stringValue_( - SwiftLibrary _lib, NSString name, NSString URI, NSString stringValue) { - final _ret = _lib._objc_msgSend_1074( - _lib._class_NSXMLDTD1, - _lib._sel_attributeWithName_URI_stringValue_1, - name._id, - URI._id, - stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSScriptObjectSpecifier, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static NSObject namespaceWithName_stringValue_( - SwiftLibrary _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDTD1, - _lib._sel_namespaceWithName_stringValue_1, name._id, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSScriptObjectSpecifier, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static NSObject processingInstructionWithName_stringValue_( - SwiftLibrary _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109( - _lib._class_NSXMLDTD1, - _lib._sel_processingInstructionWithName_stringValue_1, - name._id, - stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSScriptObjectSpecifier, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSObject commentWithStringValue_( - SwiftLibrary _lib, NSString stringValue) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLDTD1, - _lib._sel_commentWithStringValue_1, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSScriptObjectSpecifier, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject textWithStringValue_( - SwiftLibrary _lib, NSString stringValue) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLDTD1, - _lib._sel_textWithStringValue_1, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSScriptObjectSpecifier, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - static NSObject? DTDNodeWithXMLString_(SwiftLibrary _lib, NSString string) { - final _ret = _lib._objc_msgSend_38( - _lib._class_NSXMLDTD1, _lib._sel_DTDNodeWithXMLString_1, string._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); +late final _class_NSScriptObjectSpecifier = + objc.getClass("NSScriptObjectSpecifier"); + +class NSAppleEventDescriptor extends objc.NSObject { + NSAppleEventDescriptor._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSAppleEventDescriptor] that points to the same underlying object as [other]. + NSAppleEventDescriptor.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSAppleEventDescriptor] that wraps the given raw object pointer. + NSAppleEventDescriptor.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSAppleEventDescriptor]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSAppleEventDescriptor); } - static NSString localNameForName_(SwiftLibrary _lib, NSString name) { - final _ret = _lib._objc_msgSend_69( - _lib._class_NSXMLDTD1, _lib._sel_localNameForName_1, name._id); - return NSString._(_ret, _lib, retain: true, release: true); + static NSAppleEventDescriptor nullDescriptor() { + final _ret = + _objc_msgSend_709(_class_NSAppleEventDescriptor, _sel_nullDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSString? prefixForName_(SwiftLibrary _lib, NSString name) { - final _ret = _lib._objc_msgSend_186( - _lib._class_NSXMLDTD1, _lib._sel_prefixForName_1, name._id); + static NSAppleEventDescriptor? descriptorWithDescriptorType_bytes_length_( + int descriptorType, ffi.Pointer bytes, int byteCount) { + final _ret = _objc_msgSend_710( + _class_NSAppleEventDescriptor, + _sel_descriptorWithDescriptorType_bytes_length_, + descriptorType, + bytes, + byteCount); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLNode? predefinedNamespaceForPrefix_( - SwiftLibrary _lib, NSString name) { - final _ret = _lib._objc_msgSend_1125(_lib._class_NSXMLDTD1, - _lib._sel_predefinedNamespaceForPrefix_1, name._id); + static NSAppleEventDescriptor? descriptorWithDescriptorType_data_( + int descriptorType, objc.NSData? data) { + final _ret = _objc_msgSend_711( + _class_NSAppleEventDescriptor, + _sel_descriptorWithDescriptorType_data_, + descriptorType, + data?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDTD new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSXMLDTD1, _lib._sel_new1); - return NSXMLDTD._(_ret, _lib, retain: false, release: true); + static NSAppleEventDescriptor descriptorWithBoolean_(int boolean) { + final _ret = _objc_msgSend_712( + _class_NSAppleEventDescriptor, _sel_descriptorWithBoolean_, boolean); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDTD allocWithZone_(SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSXMLDTD1, _lib._sel_allocWithZone_1, zone); - return NSXMLDTD._(_ret, _lib, retain: false, release: true); + static NSAppleEventDescriptor descriptorWithEnumCode_(int enumerator) { + final _ret = _objc_msgSend_713(_class_NSAppleEventDescriptor, + _sel_descriptorWithEnumCode_, enumerator); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDTD alloc(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSXMLDTD1, _lib._sel_alloc1); - return NSXMLDTD._(_ret, _lib, retain: false, release: true); + static NSAppleEventDescriptor descriptorWithInt32_(int signedInt) { + final _ret = _objc_msgSend_714( + _class_NSAppleEventDescriptor, _sel_descriptorWithInt32_, signedInt); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSXMLDTD1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, - aSelector, - anArgument?._id ?? ffi.nullptr); + static NSAppleEventDescriptor descriptorWithDouble_(double doubleValue) { + final _ret = _objc_msgSend_715( + _class_NSAppleEventDescriptor, _sel_descriptorWithDouble_, doubleValue); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSXMLDTD1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static NSAppleEventDescriptor descriptorWithTypeCode_(int typeCode) { + final _ret = _objc_msgSend_713( + _class_NSAppleEventDescriptor, _sel_descriptorWithTypeCode_, typeCode); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLDTD1, _lib._sel_accessInstanceVariablesDirectly1); + static NSAppleEventDescriptor descriptorWithString_(objc.NSString string) { + final _ret = _objc_msgSend_716(_class_NSAppleEventDescriptor, + _sel_descriptorWithString_, string.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLDTD1, _lib._sel_useStoredAccessor1); + static NSAppleEventDescriptor descriptorWithDate_(objc.NSDate date) { + final _ret = _objc_msgSend_717( + _class_NSAppleEventDescriptor, _sel_descriptorWithDate_, date.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSXMLDTD1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static NSAppleEventDescriptor descriptorWithFileURL_(objc.NSURL fileURL) { + final _ret = _objc_msgSend_718(_class_NSAppleEventDescriptor, + _sel_descriptorWithFileURL_, fileURL.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSXMLDTD1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static NSAppleEventDescriptor + appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_( + int eventClass, + int eventID, + NSAppleEventDescriptor? targetDescriptor, + int returnID, + int transactionID) { + final _ret = _objc_msgSend_719( + _class_NSAppleEventDescriptor, + _sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_, + eventClass, + eventID, + targetDescriptor?.pointer ?? ffi.nullptr, + returnID, + transactionID); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSXMLDTD1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + static NSAppleEventDescriptor listDescriptor() { + final _ret = + _objc_msgSend_709(_class_NSAppleEventDescriptor, _sel_listDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSXMLDTD1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSAppleEventDescriptor recordDescriptor() { + final _ret = + _objc_msgSend_709(_class_NSAppleEventDescriptor, _sel_recordDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSXMLDTD1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSAppleEventDescriptor currentProcessDescriptor() { + final _ret = _objc_msgSend_709( + _class_NSAppleEventDescriptor, _sel_currentProcessDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } -} - -class NSXMLDTDNode extends NSXMLNode { - NSXMLDTDNode._(ffi.Pointer id, SwiftLibrary lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSXMLDTDNode] that points to the same underlying object as [other]. - static NSXMLDTDNode castFrom(T other) { - return NSXMLDTDNode._(other._id, other._lib, retain: true, release: true); + static NSAppleEventDescriptor descriptorWithProcessIdentifier_( + int processIdentifier) { + final _ret = _objc_msgSend_714(_class_NSAppleEventDescriptor, + _sel_descriptorWithProcessIdentifier_, processIdentifier); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// Returns a [NSXMLDTDNode] that wraps the given raw object pointer. - static NSXMLDTDNode castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLDTDNode._(other, lib, retain: retain, release: release); + static NSAppleEventDescriptor descriptorWithBundleIdentifier_( + objc.NSString bundleIdentifier) { + final _ret = _objc_msgSend_716(_class_NSAppleEventDescriptor, + _sel_descriptorWithBundleIdentifier_, bundleIdentifier.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSXMLDTDNode]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSXMLDTDNode1); + static NSAppleEventDescriptor descriptorWithApplicationURL_( + objc.NSURL applicationURL) { + final _ret = _objc_msgSend_718(_class_NSAppleEventDescriptor, + _sel_descriptorWithApplicationURL_, applicationURL.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - NSXMLDTDNode? initWithXMLString_(NSString string) { + NSAppleEventDescriptor initWithAEDescNoCopy_(ffi.Pointer aeDesc) { final _ret = - _lib._objc_msgSend_38(_id, _lib._sel_initWithXMLString_1, string._id); + _objc_msgSend_720(this.pointer, _sel_initWithAEDescNoCopy_, aeDesc); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); + } + + NSAppleEventDescriptor? initWithDescriptorType_bytes_length_( + int descriptorType, ffi.Pointer bytes, int byteCount) { + final _ret = _objc_msgSend_721( + this.pointer, + _sel_initWithDescriptorType_bytes_length_, + descriptorType, + bytes, + byteCount); return _ret.address == 0 ? null - : NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - @override - NSXMLDTDNode initWithKind_options_(int kind, int options) { - final _ret = _lib._objc_msgSend_1107( - _id, _lib._sel_initWithKind_options_1, kind, options); - return NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + NSAppleEventDescriptor? initWithDescriptorType_data_( + int descriptorType, objc.NSData? data) { + final _ret = _objc_msgSend_722( + this.pointer, + _sel_initWithDescriptorType_data_, + descriptorType, + data?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - @override - NSXMLDTDNode init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + NSAppleEventDescriptor + initWithEventClass_eventID_targetDescriptor_returnID_transactionID_( + int eventClass, + int eventID, + NSAppleEventDescriptor? targetDescriptor, + int returnID, + int transactionID) { + final _ret = _objc_msgSend_723( + this.pointer, + _sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_, + eventClass, + eventID, + targetDescriptor?.pointer ?? ffi.nullptr, + returnID, + transactionID); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - int get DTDKind { - return _lib._objc_msgSend_1123(_id, _lib._sel_DTDKind1); + NSAppleEventDescriptor initListDescriptor() { + final _ret = _objc_msgSend_40(this.pointer, _sel_initListDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - set DTDKind(int value) { - return _lib._objc_msgSend_1124(_id, _lib._sel_setDTDKind_1, value); + NSAppleEventDescriptor initRecordDescriptor() { + final _ret = _objc_msgSend_40(this.pointer, _sel_initRecordDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - bool get external1 { - return _lib._objc_msgSend_12(_id, _lib._sel_isExternal1); + ffi.Pointer get aeDesc { + return _objc_msgSend_724(this.pointer, _sel_aeDesc); } - NSString? get publicID { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_publicID1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + int get descriptorType { + return _objc_msgSend_704(this.pointer, _sel_descriptorType); } - set publicID(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setPublicID_1, value?._id ?? ffi.nullptr); + objc.NSData get data { + final _ret = _objc_msgSend_104(this.pointer, _sel_data); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - NSString? get systemID { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_systemID1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + int get booleanValue { + return _objc_msgSend_725(this.pointer, _sel_booleanValue); + } + + int get enumCodeValue { + return _objc_msgSend_704(this.pointer, _sel_enumCodeValue); + } + + int get int32Value { + return _objc_msgSend_264(this.pointer, _sel_int32Value); } - set systemID(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setSystemID_1, value?._id ?? ffi.nullptr); + double get doubleValue { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_doubleValue) + : _objc_msgSend_115(this.pointer, _sel_doubleValue); + } + + int get typeCodeValue { + return _objc_msgSend_704(this.pointer, _sel_typeCodeValue); } - NSString? get notationName { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_notationName1); + objc.NSString? get stringValue { + final _ret = _objc_msgSend_13(this.pointer, _sel_stringValue); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set notationName(NSString? value) { - return _lib._objc_msgSend_545( - _id, _lib._sel_setNotationName_1, value?._id ?? ffi.nullptr); + objc.NSDate? get dateValue { + final _ret = _objc_msgSend_116(this.pointer, _sel_dateValue); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - @override - NSXMLDTDNode initWithKind_(int kind) { - final _ret = _lib._objc_msgSend_1106(_id, _lib._sel_initWithKind_1, kind); - return NSXMLDTDNode._(_ret, _lib, retain: true, release: true); + objc.NSURL? get fileURLValue { + final _ret = _objc_msgSend_10(this.pointer, _sel_fileURLValue); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - static NSObject document(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLDTDNode1, _lib._sel_document1); - return NSObject._(_ret, _lib, retain: true, release: true); + int get eventClass { + return _objc_msgSend_704(this.pointer, _sel_eventClass); } - static NSObject documentWithRootElement_( - SwiftLibrary _lib, NSXMLElement element) { - final _ret = _lib._objc_msgSend_1108(_lib._class_NSXMLDTDNode1, - _lib._sel_documentWithRootElement_1, element._id); - return NSObject._(_ret, _lib, retain: true, release: true); + int get eventID { + return _objc_msgSend_704(this.pointer, _sel_eventID); + } + + int get returnID { + return _objc_msgSend_726(this.pointer, _sel_returnID); } - static NSObject elementWithName_(SwiftLibrary _lib, NSString name) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSXMLDTDNode1, _lib._sel_elementWithName_1, name._id); - return NSObject._(_ret, _lib, retain: true, release: true); + int get transactionID { + return _objc_msgSend_264(this.pointer, _sel_transactionID); } - static NSObject elementWithName_URI_( - SwiftLibrary _lib, NSString name, NSString URI) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDTDNode1, - _lib._sel_elementWithName_URI_1, name._id, URI._id); - return NSObject._(_ret, _lib, retain: true, release: true); + void setParamDescriptor_forKeyword_( + NSAppleEventDescriptor descriptor, int keyword) { + _objc_msgSend_727(this.pointer, _sel_setParamDescriptor_forKeyword_, + descriptor.pointer, keyword); } - static NSObject elementWithName_stringValue_( - SwiftLibrary _lib, NSString name, NSString string) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDTDNode1, - _lib._sel_elementWithName_stringValue_1, name._id, string._id); - return NSObject._(_ret, _lib, retain: true, release: true); + NSAppleEventDescriptor? paramDescriptorForKeyword_(int keyword) { + final _ret = _objc_msgSend_728( + this.pointer, _sel_paramDescriptorForKeyword_, keyword); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject elementWithName_children_attributes_(SwiftLibrary _lib, - NSString name, NSArray? children, NSArray? attributes) { - final _ret = _lib._objc_msgSend_1110( - _lib._class_NSXMLDTDNode1, - _lib._sel_elementWithName_children_attributes_1, - name._id, - children?._id ?? ffi.nullptr, - attributes?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + void removeParamDescriptorWithKeyword_(int keyword) { + _objc_msgSend_729( + this.pointer, _sel_removeParamDescriptorWithKeyword_, keyword); } - static NSObject attributeWithName_stringValue_( - SwiftLibrary _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDTDNode1, - _lib._sel_attributeWithName_stringValue_1, name._id, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + void setAttributeDescriptor_forKeyword_( + NSAppleEventDescriptor descriptor, int keyword) { + _objc_msgSend_727(this.pointer, _sel_setAttributeDescriptor_forKeyword_, + descriptor.pointer, keyword); } - static NSObject attributeWithName_URI_stringValue_( - SwiftLibrary _lib, NSString name, NSString URI, NSString stringValue) { - final _ret = _lib._objc_msgSend_1074( - _lib._class_NSXMLDTDNode1, - _lib._sel_attributeWithName_URI_stringValue_1, - name._id, - URI._id, - stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + NSAppleEventDescriptor? attributeDescriptorForKeyword_(int keyword) { + final _ret = _objc_msgSend_728( + this.pointer, _sel_attributeDescriptorForKeyword_, keyword); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject namespaceWithName_stringValue_( - SwiftLibrary _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109(_lib._class_NSXMLDTDNode1, - _lib._sel_namespaceWithName_stringValue_1, name._id, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + NSAppleEventDescriptor? sendEventWithOptions_timeout_error_( + int sendOptions, + double timeoutInSeconds, + ffi.Pointer> error) { + final _ret = _objc_msgSend_730( + this.pointer, + _sel_sendEventWithOptions_timeout_error_, + sendOptions, + timeoutInSeconds, + error); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject processingInstructionWithName_stringValue_( - SwiftLibrary _lib, NSString name, NSString stringValue) { - final _ret = _lib._objc_msgSend_1109( - _lib._class_NSXMLDTDNode1, - _lib._sel_processingInstructionWithName_stringValue_1, - name._id, - stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + bool get isRecordDescriptor { + return _objc_msgSend_7(this.pointer, _sel_isRecordDescriptor); } - static NSObject commentWithStringValue_( - SwiftLibrary _lib, NSString stringValue) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLDTDNode1, - _lib._sel_commentWithStringValue_1, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + int get numberOfItems { + return _objc_msgSend_114(this.pointer, _sel_numberOfItems); } - static NSObject textWithStringValue_( - SwiftLibrary _lib, NSString stringValue) { - final _ret = _lib._objc_msgSend_31(_lib._class_NSXMLDTDNode1, - _lib._sel_textWithStringValue_1, stringValue._id); - return NSObject._(_ret, _lib, retain: true, release: true); + void insertDescriptor_atIndex_(NSAppleEventDescriptor descriptor, int index) { + _objc_msgSend_731(this.pointer, _sel_insertDescriptor_atIndex_, + descriptor.pointer, index); } - static NSObject? DTDNodeWithXMLString_(SwiftLibrary _lib, NSString string) { - final _ret = _lib._objc_msgSend_38(_lib._class_NSXMLDTDNode1, - _lib._sel_DTDNodeWithXMLString_1, string._id); + NSAppleEventDescriptor? descriptorAtIndex_(int index) { + final _ret = + _objc_msgSend_732(this.pointer, _sel_descriptorAtIndex_, index); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); + } + + void removeDescriptorAtIndex_(int index) { + _objc_msgSend_135(this.pointer, _sel_removeDescriptorAtIndex_, index); } - static NSString localNameForName_(SwiftLibrary _lib, NSString name) { - final _ret = _lib._objc_msgSend_69( - _lib._class_NSXMLDTDNode1, _lib._sel_localNameForName_1, name._id); - return NSString._(_ret, _lib, retain: true, release: true); + void setDescriptor_forKeyword_( + NSAppleEventDescriptor descriptor, int keyword) { + _objc_msgSend_727(this.pointer, _sel_setDescriptor_forKeyword_, + descriptor.pointer, keyword); } - static NSString? prefixForName_(SwiftLibrary _lib, NSString name) { - final _ret = _lib._objc_msgSend_186( - _lib._class_NSXMLDTDNode1, _lib._sel_prefixForName_1, name._id); + NSAppleEventDescriptor? descriptorForKeyword_(int keyword) { + final _ret = + _objc_msgSend_728(this.pointer, _sel_descriptorForKeyword_, keyword); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); + } + + void removeDescriptorWithKeyword_(int keyword) { + _objc_msgSend_729(this.pointer, _sel_removeDescriptorWithKeyword_, keyword); + } + + int keywordForDescriptorAtIndex_(int index) { + return _objc_msgSend_733( + this.pointer, _sel_keywordForDescriptorAtIndex_, index); } - static NSXMLNode? predefinedNamespaceForPrefix_( - SwiftLibrary _lib, NSString name) { - final _ret = _lib._objc_msgSend_1125(_lib._class_NSXMLDTDNode1, - _lib._sel_predefinedNamespaceForPrefix_1, name._id); + NSAppleEventDescriptor? coerceToDescriptorType_(int descriptorType) { + final _ret = _objc_msgSend_728( + this.pointer, _sel_coerceToDescriptorType_, descriptorType); return _ret.address == 0 ? null - : NSXMLNode._(_ret, _lib, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDTDNode new1(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLDTDNode1, _lib._sel_new1); - return NSXMLDTDNode._(_ret, _lib, retain: false, release: true); + @override + NSAppleEventDescriptor init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDTDNode allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSXMLDTDNode1, _lib._sel_allocWithZone_1, zone); - return NSXMLDTDNode._(_ret, _lib, retain: false, release: true); + static NSAppleEventDescriptor new1() { + final _ret = _objc_msgSend_40(_class_NSAppleEventDescriptor, _sel_new); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } - static NSXMLDTDNode alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSXMLDTDNode1, _lib._sel_alloc1); - return NSXMLDTDNode._(_ret, _lib, retain: false, release: true); + static NSAppleEventDescriptor allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSAppleEventDescriptor, _sel_allocWithZone_, zone); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); + } + + static NSAppleEventDescriptor alloc() { + final _ret = _objc_msgSend_40(_class_NSAppleEventDescriptor, _sel_alloc); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_NSXMLDTDNode1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSAppleEventDescriptor, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_NSXMLDTDNode1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSAppleEventDescriptor, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLDTDNode1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSAppleEventDescriptor, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSXMLDTDNode1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSAppleEventDescriptor, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_NSXMLDTDNode1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSAppleEventDescriptor, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_NSXMLDTDNode1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSAppleEventDescriptor, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_NSXMLDTDNode1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); - } + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSAppleEventDescriptor, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSAppleEventDescriptor, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSAppleEventDescriptor, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSAppleEventDescriptor = + objc.getClass("NSAppleEventDescriptor"); +late final _sel_nullDescriptor = objc.registerName("nullDescriptor"); +final _objc_msgSend_709 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_descriptorWithDescriptorType_bytes_length_ = + objc.registerName("descriptorWithDescriptorType:bytes:length:"); +final _objc_msgSend_710 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer, int)>(); +late final _sel_descriptorWithDescriptorType_data_ = + objc.registerName("descriptorWithDescriptorType:data:"); +final _objc_msgSend_711 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_descriptorWithBoolean_ = + objc.registerName("descriptorWithBoolean:"); +final _objc_msgSend_712 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedChar)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_descriptorWithEnumCode_ = + objc.registerName("descriptorWithEnumCode:"); +final _objc_msgSend_713 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_descriptorWithInt32_ = + objc.registerName("descriptorWithInt32:"); +final _objc_msgSend_714 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_descriptorWithDouble_ = + objc.registerName("descriptorWithDouble:"); +final _objc_msgSend_715 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, double)>(); +late final _sel_descriptorWithTypeCode_ = + objc.registerName("descriptorWithTypeCode:"); +late final _sel_descriptorWithString_ = + objc.registerName("descriptorWithString:"); +final _objc_msgSend_716 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_descriptorWithDate_ = objc.registerName("descriptorWithDate:"); +final _objc_msgSend_717 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_descriptorWithFileURL_ = + objc.registerName("descriptorWithFileURL:"); +final _objc_msgSend_718 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_ = + objc.registerName( + "appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID:"); +final _objc_msgSend_719 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer, + ffi.Short, + ffi.Int)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer, + int, + int)>(); +late final _sel_listDescriptor = objc.registerName("listDescriptor"); +late final _sel_recordDescriptor = objc.registerName("recordDescriptor"); +late final _sel_currentProcessDescriptor = + objc.registerName("currentProcessDescriptor"); +late final _sel_descriptorWithProcessIdentifier_ = + objc.registerName("descriptorWithProcessIdentifier:"); +late final _sel_descriptorWithBundleIdentifier_ = + objc.registerName("descriptorWithBundleIdentifier:"); +late final _sel_descriptorWithApplicationURL_ = + objc.registerName("descriptorWithApplicationURL:"); - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSXMLDTDNode1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); - } +@ffi.Packed(2) +final class AEDesc extends ffi.Struct { + @ffi.UnsignedInt() + external int descriptorType; - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSXMLDTDNode1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer> dataHandle; } -abstract class NSXMLDTDNodeKind { - static const int NSXMLEntityGeneralKind = 1; - static const int NSXMLEntityParsedKind = 2; - static const int NSXMLEntityUnparsedKind = 3; - static const int NSXMLEntityParameterKind = 4; - static const int NSXMLEntityPredefined = 5; - static const int NSXMLAttributeCDATAKind = 6; - static const int NSXMLAttributeIDKind = 7; - static const int NSXMLAttributeIDRefKind = 8; - static const int NSXMLAttributeIDRefsKind = 9; - static const int NSXMLAttributeEntityKind = 10; - static const int NSXMLAttributeEntitiesKind = 11; - static const int NSXMLAttributeNMTokenKind = 12; - static const int NSXMLAttributeNMTokensKind = 13; - static const int NSXMLAttributeEnumerationKind = 14; - static const int NSXMLAttributeNotationKind = 15; - static const int NSXMLElementDeclarationUndefinedKind = 16; - static const int NSXMLElementDeclarationEmptyKind = 17; - static const int NSXMLElementDeclarationAnyKind = 18; - static const int NSXMLElementDeclarationMixedKind = 19; - static const int NSXMLElementDeclarationElementKind = 20; +final class OpaqueAEDataStorageType extends ffi.Opaque {} + +late final _sel_initWithAEDescNoCopy_ = + objc.registerName("initWithAEDescNoCopy:"); +final _objc_msgSend_720 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithDescriptorType_bytes_length_ = + objc.registerName("initWithDescriptorType:bytes:length:"); +final _objc_msgSend_721 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer, int)>(); +late final _sel_initWithDescriptorType_data_ = + objc.registerName("initWithDescriptorType:data:"); +final _objc_msgSend_722 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_ = + objc.registerName( + "initWithEventClass:eventID:targetDescriptor:returnID:transactionID:"); +final _objc_msgSend_723 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer, + ffi.Short, + ffi.Int)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer, + int, + int)>(); +late final _sel_initListDescriptor = objc.registerName("initListDescriptor"); +late final _sel_initRecordDescriptor = + objc.registerName("initRecordDescriptor"); +late final _sel_aeDesc = objc.registerName("aeDesc"); +final _objc_msgSend_724 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_descriptorType = objc.registerName("descriptorType"); +late final _sel_booleanValue = objc.registerName("booleanValue"); +final _objc_msgSend_725 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedChar Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_enumCodeValue = objc.registerName("enumCodeValue"); +late final _sel_int32Value = objc.registerName("int32Value"); +late final _sel_doubleValue = objc.registerName("doubleValue"); +late final _sel_typeCodeValue = objc.registerName("typeCodeValue"); +late final _sel_dateValue = objc.registerName("dateValue"); +late final _sel_fileURLValue = objc.registerName("fileURLValue"); +late final _sel_eventClass = objc.registerName("eventClass"); +late final _sel_eventID = objc.registerName("eventID"); +late final _sel_returnID = objc.registerName("returnID"); +final _objc_msgSend_726 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Short Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_transactionID = objc.registerName("transactionID"); +late final _sel_setParamDescriptor_forKeyword_ = + objc.registerName("setParamDescriptor:forKeyword:"); +final _objc_msgSend_727 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_paramDescriptorForKeyword_ = + objc.registerName("paramDescriptorForKeyword:"); +final _objc_msgSend_728 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_removeParamDescriptorWithKeyword_ = + objc.registerName("removeParamDescriptorWithKeyword:"); +final _objc_msgSend_729 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setAttributeDescriptor_forKeyword_ = + objc.registerName("setAttributeDescriptor:forKeyword:"); +late final _sel_attributeDescriptorForKeyword_ = + objc.registerName("attributeDescriptorForKeyword:"); + +abstract class NSAppleEventSendOptions { + static const int NSAppleEventSendNoReply = 1; + static const int NSAppleEventSendQueueReply = 2; + static const int NSAppleEventSendWaitForReply = 3; + static const int NSAppleEventSendNeverInteract = 16; + static const int NSAppleEventSendCanInteract = 32; + static const int NSAppleEventSendAlwaysInteract = 48; + static const int NSAppleEventSendCanSwitchLayer = 64; + static const int NSAppleEventSendDontRecord = 4096; + static const int NSAppleEventSendDontExecute = 8192; + static const int NSAppleEventSendDontAnnotate = 65536; + static const int NSAppleEventSendDefaultOptions = 35; } -class SwiftClass extends NSObject { - SwiftClass._(ffi.Pointer id, SwiftLibrary lib, +late final _sel_sendEventWithOptions_timeout_error_ = + objc.registerName("sendEventWithOptions:timeout:error:"); +final _objc_msgSend_730 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Double, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + double, + ffi.Pointer>)>(); +late final _sel_isRecordDescriptor = objc.registerName("isRecordDescriptor"); +late final _sel_numberOfItems = objc.registerName("numberOfItems"); +late final _sel_insertDescriptor_atIndex_ = + objc.registerName("insertDescriptor:atIndex:"); +final _objc_msgSend_731 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_descriptorAtIndex_ = objc.registerName("descriptorAtIndex:"); +final _objc_msgSend_732 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_removeDescriptorAtIndex_ = + objc.registerName("removeDescriptorAtIndex:"); +late final _sel_setDescriptor_forKeyword_ = + objc.registerName("setDescriptor:forKeyword:"); +late final _sel_descriptorForKeyword_ = + objc.registerName("descriptorForKeyword:"); +late final _sel_removeDescriptorWithKeyword_ = + objc.registerName("removeDescriptorWithKeyword:"); +late final _sel_keywordForDescriptorAtIndex_ = + objc.registerName("keywordForDescriptorAtIndex:"); +final _objc_msgSend_733 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedInt Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_coerceToDescriptorType_ = + objc.registerName("coerceToDescriptorType:"); +late final _sel_objectSpecifierWithDescriptor_ = + objc.registerName("objectSpecifierWithDescriptor:"); +final _objc_msgSend_734 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithContainerSpecifier_key_ = + objc.registerName("initWithContainerSpecifier:key:"); +final _objc_msgSend_735 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithContainerClassDescription_containerSpecifier_key_ = objc + .registerName("initWithContainerClassDescription:containerSpecifier:key:"); +final _objc_msgSend_736 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_childSpecifier = objc.registerName("childSpecifier"); +final _objc_msgSend_737 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setChildSpecifier_ = objc.registerName("setChildSpecifier:"); +final _objc_msgSend_738 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_containerSpecifier = objc.registerName("containerSpecifier"); +late final _sel_setContainerSpecifier_ = + objc.registerName("setContainerSpecifier:"); +late final _sel_containerIsObjectBeingTested = + objc.registerName("containerIsObjectBeingTested"); +late final _sel_setContainerIsObjectBeingTested_ = + objc.registerName("setContainerIsObjectBeingTested:"); +late final _sel_containerIsRangeContainerObject = + objc.registerName("containerIsRangeContainerObject"); +late final _sel_setContainerIsRangeContainerObject_ = + objc.registerName("setContainerIsRangeContainerObject:"); +late final _sel_key = objc.registerName("key"); +late final _sel_setKey_ = objc.registerName("setKey:"); +late final _sel_containerClassDescription = + objc.registerName("containerClassDescription"); +late final _sel_setContainerClassDescription_ = + objc.registerName("setContainerClassDescription:"); +final _objc_msgSend_739 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_keyClassDescription = objc.registerName("keyClassDescription"); +late final _sel_indicesOfObjectsByEvaluatingWithContainer_count_ = + objc.registerName("indicesOfObjectsByEvaluatingWithContainer:count:"); +final _objc_msgSend_740 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_objectsByEvaluatingWithContainers_ = + objc.registerName("objectsByEvaluatingWithContainers:"); +final _objc_msgSend_741 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_objectsByEvaluatingSpecifier = + objc.registerName("objectsByEvaluatingSpecifier"); +late final _sel_evaluationErrorNumber = + objc.registerName("evaluationErrorNumber"); +late final _sel_setEvaluationErrorNumber_ = + objc.registerName("setEvaluationErrorNumber:"); +late final _sel_evaluationErrorSpecifier = + objc.registerName("evaluationErrorSpecifier"); +late final _sel_descriptor = objc.registerName("descriptor"); +final _objc_msgSend_742 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_receiversSpecifier = objc.registerName("receiversSpecifier"); +late final _sel_setReceiversSpecifier_ = + objc.registerName("setReceiversSpecifier:"); +late final _sel_evaluatedReceivers = objc.registerName("evaluatedReceivers"); +late final _sel_evaluatedArguments = objc.registerName("evaluatedArguments"); +late final _sel_isWellFormed = objc.registerName("isWellFormed"); +late final _sel_performDefaultImplementation = + objc.registerName("performDefaultImplementation"); +late final _sel_executeCommand = objc.registerName("executeCommand"); +late final _sel_scriptErrorNumber = objc.registerName("scriptErrorNumber"); +late final _sel_setScriptErrorNumber_ = + objc.registerName("setScriptErrorNumber:"); +late final _sel_scriptErrorOffendingObjectDescriptor = + objc.registerName("scriptErrorOffendingObjectDescriptor"); +late final _sel_setScriptErrorOffendingObjectDescriptor_ = + objc.registerName("setScriptErrorOffendingObjectDescriptor:"); +final _objc_msgSend_743 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scriptErrorExpectedTypeDescriptor = + objc.registerName("scriptErrorExpectedTypeDescriptor"); +late final _sel_setScriptErrorExpectedTypeDescriptor_ = + objc.registerName("setScriptErrorExpectedTypeDescriptor:"); +late final _sel_scriptErrorString = objc.registerName("scriptErrorString"); +late final _sel_setScriptErrorString_ = + objc.registerName("setScriptErrorString:"); +late final _sel_currentCommand = objc.registerName("currentCommand"); +final _objc_msgSend_744 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_appleEvent = objc.registerName("appleEvent"); +late final _sel_suspendExecution = objc.registerName("suspendExecution"); +late final _sel_resumeExecutionWithResult_ = + objc.registerName("resumeExecutionWithResult:"); +late final _sel_createCommandInstance = + objc.registerName("createCommandInstance"); +final _objc_msgSend_745 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_createCommandInstanceWithZone_ = + objc.registerName("createCommandInstanceWithZone:"); +final _objc_msgSend_746 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_NSZone>)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_NSZone>)>(); +late final _sel_supportsCommand_ = objc.registerName("supportsCommand:"); +final _objc_msgSend_747 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_selectorForCommand_ = objc.registerName("selectorForCommand:"); +final _objc_msgSend_748 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_typeForKey_ = objc.registerName("typeForKey:"); +late final _sel_classDescriptionForKey_ = + objc.registerName("classDescriptionForKey:"); +final _objc_msgSend_749 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_appleEventCodeForKey_ = + objc.registerName("appleEventCodeForKey:"); +late final _sel_keyWithAppleEventCode_ = + objc.registerName("keyWithAppleEventCode:"); +final _objc_msgSend_750 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_defaultSubcontainerAttributeKey = + objc.registerName("defaultSubcontainerAttributeKey"); +late final _sel_isLocationRequiredToCreateForKey_ = + objc.registerName("isLocationRequiredToCreateForKey:"); +late final _sel_hasPropertyForKey_ = objc.registerName("hasPropertyForKey:"); +late final _sel_hasOrderedToManyRelationshipForKey_ = + objc.registerName("hasOrderedToManyRelationshipForKey:"); +late final _sel_hasReadablePropertyForKey_ = + objc.registerName("hasReadablePropertyForKey:"); +late final _sel_hasWritablePropertyForKey_ = + objc.registerName("hasWritablePropertyForKey:"); +late final _sel_isReadOnlyKey_ = objc.registerName("isReadOnlyKey:"); + +class SwiftClass extends objc.NSObject { + SwiftClass._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [SwiftClass] that points to the same underlying object as [other]. - static SwiftClass castFrom(T other) { - return SwiftClass._(other._id, other._lib, retain: true, release: true); - } + /// Constructs a [SwiftClass] that points to the same underlying object as [other]. + SwiftClass.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [SwiftClass] that wraps the given raw object pointer. - static SwiftClass castFromPointer( - SwiftLibrary lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return SwiftClass._(other, lib, retain: retain, release: release); - } + /// Constructs a [SwiftClass] that wraps the given raw object pointer. + SwiftClass.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [SwiftClass]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_SwiftClass1); + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_SwiftClass); } - NSString sayHello() { - final _ret = _lib._objc_msgSend_21(_id, _lib._sel_sayHello1); - return NSString._(_ret, _lib, retain: true, release: true); + objc.NSString sayHello() { + final _ret = _objc_msgSend_12(this.pointer, _sel_sayHello); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } int get someField { - return _lib._objc_msgSend_83(_id, _lib._sel_someField1); + return _objc_msgSend_114(this.pointer, _sel_someField); } set someField(int value) { - return _lib._objc_msgSend_635(_id, _lib._sel_setSomeField_1, value); + return _objc_msgSend_134(this.pointer, _sel_setSomeField_, value); } @override SwiftClass init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return SwiftClass._(_ret, _lib, retain: true, release: true); + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return SwiftClass.castFromPointer(_ret, retain: true, release: true); } - static SwiftClass new1(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_SwiftClass1, _lib._sel_new1); - return SwiftClass._(_ret, _lib, retain: false, release: true); + static SwiftClass new1() { + final _ret = _objc_msgSend_40(_class_SwiftClass, _sel_new); + return SwiftClass.castFromPointer(_ret, retain: false, release: true); } - static SwiftClass allocWithZone_( - SwiftLibrary _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_SwiftClass1, _lib._sel_allocWithZone_1, zone); - return SwiftClass._(_ret, _lib, retain: false, release: true); + static SwiftClass allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_SwiftClass, _sel_allocWithZone_, zone); + return SwiftClass.castFromPointer(_ret, retain: false, release: true); } - static SwiftClass alloc(SwiftLibrary _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_SwiftClass1, _lib._sel_alloc1); - return SwiftClass._(_ret, _lib, retain: false, release: true); + static SwiftClass alloc() { + final _ret = _objc_msgSend_40(_class_SwiftClass, _sel_alloc); + return SwiftClass.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - SwiftLibrary _lib, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _lib._objc_msgSend_14( - _lib._class_SwiftClass1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_selector_object_1, - aTarget._id, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_SwiftClass, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, aSelector, - anArgument?._id ?? ffi.nullptr); + anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_( - SwiftLibrary _lib, NSObject aTarget) { - _lib._objc_msgSend_15(_lib._class_SwiftClass1, - _lib._sel_cancelPreviousPerformRequestsWithTarget_1, aTarget._id); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_SwiftClass, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_SwiftClass1, _lib._sel_accessInstanceVariablesDirectly1); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_SwiftClass, _sel_accessInstanceVariablesDirectly); } - static bool useStoredAccessor(SwiftLibrary _lib) { - return _lib._objc_msgSend_12( - _lib._class_SwiftClass1, _lib._sel_useStoredAccessor1); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_SwiftClass, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_( - SwiftLibrary _lib, NSString key) { - final _ret = _lib._objc_msgSend_63(_lib._class_SwiftClass1, - _lib._sel_keyPathsForValuesAffectingValueForKey_1, key._id); - return NSSet._(_ret, _lib, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_SwiftClass, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_( - SwiftLibrary _lib, NSString key) { - return _lib._objc_msgSend_64(_lib._class_SwiftClass1, - _lib._sel_automaticallyNotifiesObserversForKey_1, key._id); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_SwiftClass, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - SwiftLibrary _lib, NSArray keys, NSString dependentKey) { - _lib._objc_msgSend_88( - _lib._class_SwiftClass1, - _lib._sel_setKeys_triggerChangeNotificationsForDependentKey_1, - keys._id, - dependentKey._id); + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_SwiftClass, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_85( - _lib._class_SwiftClass1, _lib._sel_classFallbacksForKeyedArchiver1); - return NSArray._(_ret, _lib, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_SwiftClass, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver(SwiftLibrary _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_SwiftClass1, _lib._sel_classForKeyedUnarchiver1); - return NSObject._(_ret, _lib, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_SwiftClass, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } + +late final _class_SwiftClass = objc.getClass("swift_module.SwiftClass"); +late final _sel_sayHello = objc.registerName("sayHello"); +late final _sel_someField = objc.registerName("someField"); +late final _sel_setSomeField_ = objc.registerName("setSomeField:"); diff --git a/pkgs/ffigen/ffigen.schema.json b/pkgs/ffigen/ffigen.schema.json index 2116c4f016..a6777c2951 100644 --- a/pkgs/ffigen/ffigen.schema.json +++ b/pkgs/ffigen/ffigen.schema.json @@ -367,6 +367,9 @@ "exclude-all-by-default": { "type": "boolean" }, + "generate-for-package-objective-c": { + "type": "boolean" + }, "sort": { "type": "boolean" }, diff --git a/pkgs/ffigen/lib/src/code_generator/enum_class.dart b/pkgs/ffigen/lib/src/code_generator/enum_class.dart index 92ffbfa9b2..3fbfcf7da8 100644 --- a/pkgs/ffigen/lib/src/code_generator/enum_class.dart +++ b/pkgs/ffigen/lib/src/code_generator/enum_class.dart @@ -87,7 +87,7 @@ class EnumClass extends BindingType { bool get sameDartAndCType => nativeType.sameDartAndCType; @override - String? getDefaultValue(Writer w, String nativeLib) => '0'; + String? getDefaultValue(Writer w) => '0'; } /// Represents a single value in an enum. diff --git a/pkgs/ffigen/lib/src/code_generator/func.dart b/pkgs/ffigen/lib/src/code_generator/func.dart index 1c518f9f68..05d67d40c2 100644 --- a/pkgs/ffigen/lib/src/code_generator/func.dart +++ b/pkgs/ffigen/lib/src/code_generator/func.dart @@ -133,7 +133,6 @@ class Func extends LookUpBinding { funcImplCall = functionType.returnType.convertFfiDartTypeToDartType( w, '$funcVarName($argString)', - ffiNativeConfig.enabled ? 'lib' : 'this', objCRetain: !objCReturnsRetained, ); } else { @@ -158,11 +157,8 @@ external $ffiReturnType $nativeFuncName($ffiArgDeclString); '''); if (needsWrapper) { - final libArg = functionType.returnType.sameDartAndFfiDartType - ? '' - : '${w.className} lib, '; s.write(''' -$dartReturnType $enclosingFuncName($libArg$dartArgDeclString) => $funcImplCall; +$dartReturnType $enclosingFuncName($dartArgDeclString) => $funcImplCall; '''); } diff --git a/pkgs/ffigen/lib/src/code_generator/imports.dart b/pkgs/ffigen/lib/src/code_generator/imports.dart index f620909b61..d0b5352acd 100644 --- a/pkgs/ffigen/lib/src/code_generator/imports.dart +++ b/pkgs/ffigen/lib/src/code_generator/imports.dart @@ -2,17 +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 'struct.dart'; import 'type.dart'; import 'writer.dart'; /// A library import which will be written as an import in the generated file. class LibraryImport { final String name; - final String importPath; + final String _importPath; + final String? _importPathWhenImportedByPackageObjC; + String prefix; - LibraryImport(this.name, this.importPath) : prefix = name; + LibraryImport(this.name, this._importPath, + {String? importPathWhenImportedByPackageObjC}) + : _importPathWhenImportedByPackageObjC = + importPathWhenImportedByPackageObjC, + prefix = name; @override bool operator ==(other) { @@ -21,6 +26,13 @@ class LibraryImport { @override int get hashCode => name.hashCode; + + // The import path, which may be different if this library is being imported + // into package:objective_c's generated code. + String importPath(bool generateForPackageObjectiveC) { + if (!generateForPackageObjectiveC) return _importPath; + return _importPathWhenImportedByPackageObjC ?? _importPath; + } } /// An imported type which will be used in the generated code. @@ -49,7 +61,7 @@ class ImportedType extends Type { String toString() => '${libraryImport.name}.$cType'; @override - String? getDefaultValue(Writer w, String nativeLib) => defaultValue; + String? getDefaultValue(Writer w) => defaultValue; } /// An unchecked type similar to [ImportedType] which exists in the generated @@ -76,6 +88,9 @@ class SelfImportedType extends Type { final ffiImport = LibraryImport('ffi', 'dart:ffi'); final ffiPkgImport = LibraryImport('pkg_ffi', 'package:ffi/ffi.dart'); +final objcPkgImport = LibraryImport( + 'objc', 'package:objective_c/objective_c.dart', + importPathWhenImportedByPackageObjC: '../objective_c.dart'); final self = LibraryImport('self', ''); final voidType = ImportedType(ffiImport, 'Void', 'void'); @@ -99,5 +114,6 @@ final doubleType = ImportedType(ffiImport, 'Double', 'double', '0.0'); final sizeType = ImportedType(ffiImport, 'Size', 'int', '0'); final wCharType = ImportedType(ffiImport, 'WChar', 'int', '0'); -final objCObjectType = Struct(name: 'ObjCObject'); -final objCSelType = Struct(name: 'ObjCSel'); +final objCObjectType = ImportedType(objcPkgImport, 'ObjCObject', 'ObjCObject'); +final objCSelType = ImportedType(objcPkgImport, 'ObjCSelector', 'ObjCSelector'); +final objCBlockType = ImportedType(objcPkgImport, 'ObjCBlock', 'ObjCBlock'); diff --git a/pkgs/ffigen/lib/src/code_generator/library.dart b/pkgs/ffigen/lib/src/code_generator/library.dart index 60ad7c3ffb..cbb6d19c9d 100644 --- a/pkgs/ffigen/lib/src/code_generator/library.dart +++ b/pkgs/ffigen/lib/src/code_generator/library.dart @@ -4,12 +4,10 @@ import 'dart:io'; -import 'package:cli_util/cli_util.dart'; import 'package:collection/collection.dart'; import 'package:ffigen/src/code_generator.dart'; import 'package:ffigen/src/config_provider/config_types.dart'; import 'package:logging/logging.dart'; -import 'package:path/path.dart' as p; import 'package:yaml_edit/yaml_edit.dart'; import 'utils.dart'; @@ -31,6 +29,7 @@ class Library { required List bindings, String? header, bool sort = false, + bool generateForPackageObjectiveC = false, StructPackingOverride? packingOverride, Set? libraryImports, }) { @@ -84,6 +83,7 @@ class Library { classDocComment: description, header: header, additionalImports: libraryImports, + generateForPackageObjectiveC: generateForPackageObjectiveC, ); } @@ -149,9 +149,8 @@ class Library { /// Formats a file using the Dart formatter. void _dartFormat(String path) { - final sdkPath = getSdkPath(); - final result = Process.runSync( - p.join(sdkPath, 'bin', 'dart'), ['format', path], + final result = Process.runSync(findDart(), ['format', path], + workingDirectory: Directory.current.absolute.path, runInShell: Platform.isWindows); if (result.stderr.toString().isNotEmpty) { _logger.severe(result.stderr); diff --git a/pkgs/ffigen/lib/src/code_generator/native_type.dart b/pkgs/ffigen/lib/src/code_generator/native_type.dart index 93ed356114..77afa78636 100644 --- a/pkgs/ffigen/lib/src/code_generator/native_type.dart +++ b/pkgs/ffigen/lib/src/code_generator/native_type.dart @@ -66,7 +66,7 @@ class NativeType extends Type { String cacheKey() => _cType; @override - String? getDefaultValue(Writer w, String nativeLib) => _defaultValue; + String? getDefaultValue(Writer w) => _defaultValue; } class BooleanType extends NativeType { diff --git a/pkgs/ffigen/lib/src/code_generator/objc_block.dart b/pkgs/ffigen/lib/src/code_generator/objc_block.dart index 6101f79dac..9422e87c82 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_block.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_block.dart @@ -10,19 +10,16 @@ import 'writer.dart'; class ObjCBlock extends BindingType { final Type returnType; final List argTypes; - final ObjCBuiltInFunctions builtInFunctions; ObjCBlock({ required String usr, required Type returnType, required List argTypes, - required ObjCBuiltInFunctions builtInFunctions, }) : this._( usr: usr, name: _getBlockName(returnType, argTypes), returnType: returnType, argTypes: argTypes, - builtInFunctions: builtInFunctions, ); ObjCBlock._({ @@ -30,7 +27,6 @@ class ObjCBlock extends BindingType { required super.name, required this.returnType, required this.argTypes, - required this.builtInFunctions, }) : super(originalName: name); // Generates a human readable name for the block based on the args and return @@ -47,8 +43,6 @@ class ObjCBlock extends BindingType { BindingString toBindingString(Writer w) { final s = StringBuffer(); - builtInFunctions.ensureBlockUtilsExist(w, s); - final params = []; for (int i = 0; i < argTypes.length; ++i) { params.add(Parameter(name: 'arg$i', type: argTypes[i])); @@ -56,7 +50,7 @@ class ObjCBlock extends BindingType { final isVoid = returnType == voidType; final voidPtr = PointerType(voidType).getCType(w); - final blockPtr = PointerType(builtInFunctions.blockStruct); + final blockPtr = PointerType(objCBlockType); final funcType = FunctionType(returnType: returnType, parameters: params); final natFnType = NativeFunc(funcType); final natFnPtr = PointerType(natFnType).getCType(w); @@ -64,12 +58,9 @@ class ObjCBlock extends BindingType { w.topLevelUniqueNamer.makeUnique('_${name}_fnPtrTrampoline'); final closureTrampoline = w.topLevelUniqueNamer.makeUnique('_${name}_closureTrampoline'); - final registerClosure = - w.topLevelUniqueNamer.makeUnique('_${name}_registerClosure'); - final closureRegistry = - w.topLevelUniqueNamer.makeUnique('_${name}_closureRegistry'); - final closureRegistryIndex = - w.topLevelUniqueNamer.makeUnique('_${name}_closureRegistryIndex'); + final newPointerBlock = ObjCBuiltInFunctions.newPointerBlock.gen(w); + final newClosureBlock = ObjCBuiltInFunctions.newClosureBlock.gen(w); + final getBlockClosure = ObjCBuiltInFunctions.getBlockClosure.gen(w); final trampFuncType = FunctionType( returnType: returnType, parameters: [Parameter(type: blockPtr, name: 'block'), ...params]); @@ -98,28 +89,17 @@ $returnFfiDartType $funcPtrTrampoline($blockCType block, $paramsFfiDartType) => .asFunction<$funcFfiDartType>()($paramsNameOnly); '''); - // Write the closure registry function. - s.write(''' -final $closureRegistry = {}; -int $closureRegistryIndex = 0; -$voidPtr $registerClosure($funcFfiDartType fn) { - final id = ++$closureRegistryIndex; - $closureRegistry[id] = fn; - return $voidPtr.fromAddress(id); -} -'''); - // Write the closure based trampoline function. s.write(''' $returnFfiDartType $closureTrampoline($blockCType block, $paramsFfiDartType) => - $closureRegistry[block.ref.target.address]!($paramsNameOnly); + ($getBlockClosure(block) as $funcFfiDartType)($paramsNameOnly); '''); // Snippet that converts a Dart typed closure to FfiDart type. This snippet // is used below. Note that the closure being converted is called `fn`. final convertedFnArgs = params - .map((p) => p.type - .convertFfiDartTypeToDartType(w, p.name, 'lib', objCRetain: true)) + .map((p) => + p.type.convertFfiDartTypeToDartType(w, p.name, objCRetain: true)) .join(', '); final convFnInvocation = returnType.convertDartTypeToFfiDartType( w, 'fn($convertedFnArgs)', @@ -127,18 +107,18 @@ $returnFfiDartType $closureTrampoline($blockCType block, $paramsFfiDartType) => final convFn = '($paramsFfiDartType) => $convFnInvocation'; // Write the wrapper class. - final defaultValue = returnType.getDefaultValue(w, '_lib'); + final defaultValue = returnType.getDefaultValue(w); final exceptionalReturn = defaultValue == null ? '' : ', $defaultValue'; s.write(''' -class $name extends _ObjCBlockBase { - $name._($blockCType id, ${w.className} lib, +class $name extends ${ObjCBuiltInFunctions.blockBase.gen(w)} { + $name._($blockCType pointer, {bool retain = false, bool release = true}) : - super._(id, lib, retain: retain, release: release); + super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static $name castFromPointer(${w.className} lib, $blockCType pointer, + static $name castFromPointer($blockCType pointer, {bool retain = false, bool release = false}) { - return $name._(pointer, lib, retain: retain, release: release); + return $name._(pointer, retain: retain, release: release); } /// Creates a block from a C function pointer. @@ -146,11 +126,11 @@ class $name extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - $name.fromFunctionPointer(${w.className} lib, $natFnPtr ptr) : - this._(lib.${builtInFunctions.newBlock.name}( + $name.fromFunctionPointer($natFnPtr ptr) : + this._($newPointerBlock( _cFuncTrampoline ??= ${w.ffiLibraryPrefix}.Pointer.fromFunction< $trampFuncCType>($funcPtrTrampoline - $exceptionalReturn).cast(), ptr.cast()), lib); + $exceptionalReturn).cast(), ptr.cast())); static $voidPtr? _cFuncTrampoline; /// Creates a block from a Dart function. @@ -158,11 +138,11 @@ class $name extends _ObjCBlockBase { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - $name.fromFunction(${w.className} lib, $funcDartType fn) : - this._(lib.${builtInFunctions.newBlock.name}( + $name.fromFunction($funcDartType fn) : + this._($newClosureBlock( _dartFuncTrampoline ??= ${w.ffiLibraryPrefix}.Pointer.fromFunction< - $trampFuncCType>($closureTrampoline - $exceptionalReturn).cast(), $registerClosure($convFn)), lib); + $trampFuncCType>($closureTrampoline $exceptionalReturn).cast(), + $convFn)); static $voidPtr? _dartFuncTrampoline; '''); @@ -179,12 +159,11 @@ class $name extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - $name.listener(${w.className} lib, $funcDartType fn) : - this._(lib.${builtInFunctions.newBlock.name}( + $name.listener($funcDartType fn) : + this._($newClosureBlock( (_dartFuncListenerTrampoline ??= $nativeCallableType.listener( $closureTrampoline $exceptionalReturn)..keepIsolateAlive = - false).nativeFunction.cast(), - $registerClosure($convFn)), lib); + false).nativeFunction.cast(), $convFn)); static $nativeCallableType? _dartFuncListenerTrampoline; '''); @@ -197,10 +176,9 @@ class $name extends _ObjCBlockBase { p.type.convertDartTypeToFfiDartType(w, p.name, objCRetain: false)) .join(', '); final callMethodInvocation = ''' -_id.ref.invoke.cast<$natTrampFnType>().asFunction<$trampFuncFfiDartType>()( - _id, $callMethodArgs)'''; - s.write(returnType.convertFfiDartTypeToDartType( - w, callMethodInvocation, '_lib', +pointer.ref.invoke.cast<$natTrampFnType>().asFunction<$trampFuncFfiDartType>()( + pointer, $callMethodArgs)'''; + s.write(returnType.convertFfiDartTypeToDartType(w, callMethodInvocation, objCRetain: false)); s.write(';\n'); @@ -218,12 +196,10 @@ _id.ref.invoke.cast<$natTrampFnType>().asFunction<$trampFuncFfiDartType>()( for (final t in argTypes) { t.addDependencies(dependencies); } - builtInFunctions.addBlockDependencies(dependencies); } @override - String getCType(Writer w) => - PointerType(builtInFunctions.blockStruct).getCType(w); + String getCType(Writer w) => PointerType(objCBlockType).getCType(w); @override String getDartType(Writer w) => name; @@ -248,12 +224,11 @@ _id.ref.invoke.cast<$natTrampFnType>().asFunction<$trampFuncFfiDartType>()( @override String convertFfiDartTypeToDartType( Writer w, - String value, - String library, { + String value, { required bool objCRetain, String? objCEnclosingClass, }) => - ObjCInterface.generateConstructor(name, value, library, objCRetain); + ObjCInterface.generateConstructor(name, value, objCRetain); @override String toString() => '($returnType (^)(${argTypes.join(', ')}))'; diff --git a/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart b/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart index e3b75dd946..5bdac34d31 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart @@ -9,90 +9,56 @@ import 'writer.dart'; /// Built in functions used by the Objective C bindings. class ObjCBuiltInFunctions { - late final _registerNameFunc = Func( - name: '_sel_registerName', - originalName: 'sel_registerName', - returnType: PointerType(objCSelType), - parameters: [Parameter(name: 'str', type: PointerType(charType))], - isInternal: true, - ); - late final registerName = ObjCInternalFunction( - '_registerName', _registerNameFunc, (Writer w, String name) { - final selType = _registerNameFunc.functionType.returnType.getCType(w); - return ''' -$selType $name(String name) { - final cstr = name.toNativeUtf8(); - final sel = ${_registerNameFunc.name}(cstr.cast()); - ${w.ffiPkgLibraryPrefix}.calloc.free(cstr); - return sel; -} -'''; - }); - - late final _getClassFunc = Func( - name: '_objc_getClass', - originalName: 'objc_getClass', - returnType: PointerType(objCObjectType), - parameters: [Parameter(name: 'str', type: PointerType(charType))], - isInternal: true, - ); - late final getClass = - ObjCInternalFunction('_getClass', _getClassFunc, (Writer w, String name) { - final objType = _getClassFunc.functionType.returnType.getCType(w); - return ''' -$objType $name(String name) { - final cstr = name.toNativeUtf8(); - final clazz = ${_getClassFunc.name}(cstr.cast()); - ${w.ffiPkgLibraryPrefix}.calloc.free(cstr); - if (clazz == ${w.ffiLibraryPrefix}.nullptr) { - throw Exception('Failed to load Objective-C class: \$name'); - } - return clazz; -} -'''; - }); - - late final _retainFunc = Func( - name: '_objc_retain', - originalName: 'objc_retain', - returnType: PointerType(objCObjectType), - parameters: [Parameter(name: 'value', type: PointerType(objCObjectType))], - isInternal: true, - ); - late final _releaseFunc = Func( - name: '_objc_release', - originalName: 'objc_release', - returnType: voidType, - parameters: [Parameter(name: 'value', type: PointerType(objCObjectType))], - isInternal: true, - ); - late final _releaseFinalizer = ObjCInternalGlobal( - '_objc_releaseFinalizer', - (Writer w) => '${w.ffiLibraryPrefix}.NativeFinalizer(' - '${_releaseFunc.funcPointerName}.cast())', - _releaseFunc, - ); - - late final _blockCopyFunc = Func( - name: '_Block_copy', - originalName: '_Block_copy', - returnType: PointerType(voidType), - parameters: [Parameter(name: 'value', type: PointerType(voidType))], - isInternal: true, - ); - late final _blockReleaseFunc = Func( - name: '_Block_release', - originalName: '_Block_release', - returnType: voidType, - parameters: [Parameter(name: 'value', type: PointerType(voidType))], - isInternal: true, - ); - late final _blockReleaseFinalizer = ObjCInternalGlobal( - '_objc_releaseFinalizer', - (Writer w) => '${w.ffiLibraryPrefix}.NativeFinalizer(' - '${_blockReleaseFunc.funcPointerName}.cast())', - _blockReleaseFunc, - ); + ObjCBuiltInFunctions(this.generateForPackageObjectiveC); + + final bool generateForPackageObjectiveC; + + static const registerName = ObjCImport('registerName'); + static const getClass = ObjCImport('getClass'); + static const msgSendPointer = ObjCImport('msgSendPointer'); + static const msgSendFpretPointer = ObjCImport('msgSendFpretPointer'); + static const msgSendStretPointer = ObjCImport('msgSendStretPointer'); + static const useMsgSendVariants = ObjCImport('useMsgSendVariants'); + static const newPointerBlock = ObjCImport('newPointerBlock'); + static const newClosureBlock = ObjCImport('newClosureBlock'); + static const getBlockClosure = ObjCImport('getBlockClosure'); + static const objectBase = ObjCImport('ObjCObjectBase'); + static const blockBase = ObjCImport('ObjCBlockBase'); + + // Keep in sync with pkgs/objective_c/ffigen_objc.yaml. + static const builtInInterfaces = { + 'NSArray', + 'NSCharacterSet', + 'NSCoder', + 'NSData', + 'NSDate', + 'NSDictionary', + 'NSEnumerator', + 'NSError', + 'NSIndexSet', + 'NSInvocation', + 'NSItemProvider', + 'NSLocale', + 'NSMethodSignature', + 'NSMutableArray', + 'NSMutableData', + 'NSMutableDictionary', + 'NSMutableSet', + 'NSMutableString', + 'NSNotification', + 'NSNumber', + 'NSObject', + 'NSProgress', + 'NSSet', + 'NSString', + 'NSURL', + 'NSURLHandle', + 'NSValue', + 'Protocol', + }; + + bool isBuiltInInterface(String name) => + !generateForPackageObjectiveC && builtInInterfaces.contains(name); // We need to load a separate instance of objc_msgSend for each signature. If // the return type is a struct, we need to use objc_msgSend_stret instead, and @@ -108,196 +74,18 @@ $objType $name(String name) { '_objc_msgSend_${_msgSendFuncs.length}', returnType, params, - _msgSendUseVariants); + useMsgSendVariants); } - late final _msgSendUseVariants = ObjCInternalGlobal( - '_objc_msgSend_useVariants', - (Writer w) => ''' -${w.ffiLibraryPrefix}.Abi.current() == ${w.ffiLibraryPrefix}.Abi.iosX64 || -${w.ffiLibraryPrefix}.Abi.current() == ${w.ffiLibraryPrefix}.Abi.macosX64 -'''); - final _selObjects = {}; ObjCInternalGlobal getSelObject(String methodName) { return _selObjects[methodName] ??= ObjCInternalGlobal( '_sel_${methodName.replaceAll(":", "_")}', - (Writer w) => '${registerName.name}("$methodName")', - registerName, + (Writer w) => '${registerName.gen(w)}("$methodName")', ); } - // See https://clang.llvm.org/docs/Block-ABI-Apple.html - late final blockStruct = Struct( - name: '_ObjCBlock', - isInternal: true, - members: [ - Member(name: 'isa', type: PointerType(voidType)), - Member(name: 'flags', type: intType), - Member(name: 'reserved', type: intType), - Member(name: 'invoke', type: PointerType(voidType)), - Member(name: 'descriptor', type: PointerType(blockDescStruct)), - Member(name: 'target', type: PointerType(voidType)), - ], - ); - late final blockDescStruct = Struct( - name: '_ObjCBlockDesc', - isInternal: true, - members: [ - Member(name: 'reserved', type: unsignedLongType), - Member(name: 'size', type: unsignedLongType), - Member(name: 'copy_helper', type: PointerType(voidType)), - Member(name: 'dispose_helper', type: PointerType(voidType)), - Member(name: 'signature', type: PointerType(charType)), - ], - ); - late final newBlockDesc = - ObjCInternalFunction('_newBlockDesc', null, (Writer w, String name) { - final blockType = blockStruct.getCType(w); - final descType = blockDescStruct.getCType(w); - final descPtr = PointerType(blockDescStruct).getCType(w); - return ''' -$descPtr $name() { - final d = ${w.ffiPkgLibraryPrefix}.calloc.allocate<$descType>( - ${w.ffiLibraryPrefix}.sizeOf<$descType>()); - d.ref.reserved = 0; - d.ref.size = ${w.ffiLibraryPrefix}.sizeOf<$blockType>(); - d.ref.copy_helper = ${w.ffiLibraryPrefix}.nullptr; - d.ref.dispose_helper = ${w.ffiLibraryPrefix}.nullptr; - d.ref.signature = ${w.ffiLibraryPrefix}.nullptr; - return d; -} -'''; - }); - late final blockDescSingleton = ObjCInternalGlobal( - '_objc_block_desc', - (Writer w) => '${newBlockDesc.name}()', - blockDescStruct, - ); - late final concreteGlobalBlock = ObjCInternalGlobal( - '_objc_concrete_global_block', - (Writer w) => '${w.lookupFuncIdentifier}<${voidType.getCType(w)}>(' - "'_NSConcreteGlobalBlock')", - ); - late final newBlock = ObjCInternalFunction('_newBlock', _blockCopyFunc, - (Writer w, String name) { - final blockType = blockStruct.getCType(w); - final blockPtr = PointerType(blockStruct).getCType(w); - final voidPtr = PointerType(voidType).getCType(w); - return ''' -$blockPtr $name($voidPtr invoke, $voidPtr target) { - final b = ${w.ffiPkgLibraryPrefix}.calloc.allocate<$blockType>( - ${w.ffiLibraryPrefix}.sizeOf<$blockType>()); - b.ref.isa = ${concreteGlobalBlock.name}; - b.ref.flags = 0; - b.ref.reserved = 0; - b.ref.invoke = invoke; - b.ref.target = target; - b.ref.descriptor = ${blockDescSingleton.name}; - final copy = ${_blockCopyFunc.name}(b.cast()).cast<$blockType>(); - ${w.ffiPkgLibraryPrefix}.calloc.free(b); - return copy; -} -'''; - }); - - void _writeFinalizableClass( - Writer w, - StringBuffer s, - String name, - String kind, - String idType, - String retain, - String release, - String finalizer) { - s.write(''' -class $name implements ${w.ffiLibraryPrefix}.Finalizable { - final $idType _id; - final ${w.className} _lib; - bool _pendingRelease; - - $name._(this._id, this._lib, - {bool retain = false, bool release = false}) : _pendingRelease = release { - if (retain) { - _lib.$retain(_id.cast()); - } - if (release) { - _lib.$finalizer.attach(this, _id.cast(), detach: this); - } - } - - /// Releases the reference to the underlying ObjC $kind held by this wrapper. - /// Throws a StateError if this wrapper doesn't currently hold a reference. - void release() { - if (_pendingRelease) { - _pendingRelease = false; - _lib.$release(_id.cast()); - _lib.$finalizer.detach(this); - } else { - throw StateError( - 'Released an ObjC $kind that was unowned or already released.'); - } - } - - @override - bool operator ==(Object other) { - return other is $name && _id == other._id; - } - - @override - int get hashCode => _id.hashCode; - - /// Return a pointer to this object. - $idType get pointer => _id; - - /// Retain a reference to this object and then return the pointer. This - /// reference must be released when you are done with it. If you wrap this - /// reference in another object, make sure to release it but not retain it: - /// `castFromPointer(lib, pointer, retain: false, release: true)` - $idType retainAndReturnPointer() { - _lib.$retain(_id.cast()); - return _id; - } -} -'''); - } - - bool utilsExist = false; - void ensureUtilsExist(Writer w, StringBuffer s) { - if (utilsExist) return; - utilsExist = true; - _writeFinalizableClass( - w, - s, - '_ObjCWrapper', - 'object', - PointerType(objCObjectType).getCType(w), - _retainFunc.name, - _releaseFunc.name, - _releaseFinalizer.name); - } - - bool blockUtilsExist = false; - void ensureBlockUtilsExist(Writer w, StringBuffer s) { - if (blockUtilsExist) return; - blockUtilsExist = true; - _writeFinalizableClass( - w, - s, - '_ObjCBlockBase', - 'block', - PointerType(blockStruct).getCType(w), - _blockCopyFunc.name, - _blockReleaseFunc.name, - _blockReleaseFinalizer.name); - } - void addDependencies(Set dependencies) { - registerName.addDependencies(dependencies); - getClass.addDependencies(dependencies); - _retainFunc.addDependencies(dependencies); - _releaseFunc.addDependencies(dependencies); - _releaseFinalizer.addDependencies(dependencies); for (final msgSendFunc in _msgSendFuncs.values) { msgSendFunc.addDependencies(dependencies); } @@ -305,100 +93,29 @@ class $name implements ${w.ffiLibraryPrefix}.Finalizable { sel.addDependencies(dependencies); } } - - void addBlockDependencies(Set dependencies) { - newBlockDesc.addDependencies(dependencies); - blockDescSingleton.addDependencies(dependencies); - blockStruct.addDependencies(dependencies); - concreteGlobalBlock.addDependencies(dependencies); - newBlock.addDependencies(dependencies); - _blockCopyFunc.addDependencies(dependencies); - _blockReleaseFunc.addDependencies(dependencies); - _blockReleaseFinalizer.addDependencies(dependencies); - } - - final _interfaceRegistry = {}; - void registerInterface(ObjCInterface interface) { - _interfaceRegistry[interface.originalName] = interface; - } - - ObjCInterface get nsData { - return _interfaceRegistry["NSData"] ?? - (ObjCInterface( - originalName: "NSData", - builtInFunctions: this, - )); - } - - void generateNSStringUtils(Writer w, StringBuffer s) { - // Generate a constructor that wraps stringWithCharacters, and a toString - // method that wraps dataUsingEncoding. - s.write(''' - factory NSString(${w.className} _lib, String str) { - final cstr = str.toNativeUtf16(); - final nsstr = stringWithCharacters_length_(_lib, cstr.cast(), str.length); - ${w.ffiPkgLibraryPrefix}.calloc.free(cstr); - return nsstr; - } - - @override - String toString() { - final data = dataUsingEncoding_( - 0x94000100 /* NSUTF16LittleEndianStringEncoding */); - return data!.bytes.cast<${w.ffiPkgLibraryPrefix}.Utf16>().toDartString( - length: length); - } -'''); - } - - void generateStringUtils(Writer w, StringBuffer s) { - // Generate an extension on String to convert to NSString - s.write(''' -extension StringToNSString on String { - NSString toNSString(${w.className} lib) => NSString(lib, this); -} -'''); - } } -/// Functions only used internally by ObjC bindings, which may or may not wrap a -/// native function, such as getClass. -class ObjCInternalFunction extends LookUpBinding { - final Func? _wrappedFunction; - final String Function(Writer, String) _toBindingString; +/// A function, global variable, or helper type defined in package:objective_c. +class ObjCImport { + final String name; - ObjCInternalFunction( - String name, this._wrappedFunction, this._toBindingString) - : super(originalName: name, name: name, isInternal: true); + const ObjCImport(this.name); - @override - BindingString toBindingString(Writer w) { - name = w.wrapperLevelUniqueNamer.makeUnique(name); - return BindingString( - type: BindingStringType.func, string: _toBindingString(w, name)); - } - - @override - void addDependencies(Set dependencies) { - if (dependencies.contains(this)) return; - dependencies.add(this); - _wrappedFunction?.addDependencies(dependencies); - } + String gen(Writer w) => '${w.objcPkgPrefix}.$name'; } /// Globals only used internally by ObjC bindings, such as classes and SELs. -class ObjCInternalGlobal extends LookUpBinding { +class ObjCInternalGlobal extends NoLookUpBinding { final String Function(Writer) makeValue; - Binding? binding; - ObjCInternalGlobal(String name, this.makeValue, [this.binding]) + ObjCInternalGlobal(String name, this.makeValue) : super(originalName: name, name: name, isInternal: true); @override BindingString toBindingString(Writer w) { final s = StringBuffer(); name = w.wrapperLevelUniqueNamer.makeUnique(name); - s.write('late final $name = ${makeValue(w)};'); + s.write('late final $name = ${makeValue(w)};\n'); return BindingString(type: BindingStringType.global, string: s.toString()); } @@ -406,17 +123,16 @@ class ObjCInternalGlobal extends LookUpBinding { void addDependencies(Set dependencies) { if (dependencies.contains(this)) return; dependencies.add(this); - binding?.addDependencies(dependencies); } } enum ObjCMsgSendVariant { - normal('objc_msgSend'), - stret('objc_msgSend_stret'), - fpret('objc_msgSend_fpret'); + normal(ObjCBuiltInFunctions.msgSendPointer), + stret(ObjCBuiltInFunctions.msgSendStretPointer), + fpret(ObjCBuiltInFunctions.msgSendFpretPointer); - final String name; - const ObjCMsgSendVariant(this.name); + final ObjCImport pointer; + const ObjCMsgSendVariant(this.pointer); static ObjCMsgSendVariant fromReturnType(Type returnType) { if (returnType is Compound && returnType.isStruct) { @@ -428,6 +144,39 @@ enum ObjCMsgSendVariant { } } +class ObjCMsgSendVariantFunc extends NoLookUpBinding { + ObjCMsgSendVariant variant; + FunctionType type; + + ObjCMsgSendVariantFunc( + {required super.name, + required this.variant, + required Type returnType, + required List parameters}) + : type = FunctionType(returnType: returnType, parameters: parameters), + super(isInternal: true); + + @override + BindingString toBindingString(Writer w) { + final cType = NativeFunc(type).getCType(w); + final dartType = type.getFfiDartType(w, writeArgumentNames: false); + final pointer = variant.pointer.gen(w); + + final bindingString = ''' +final $name = $pointer.cast<$cType>().asFunction<$dartType>(); +'''; + + return BindingString(type: BindingStringType.func, string: bindingString); + } + + @override + void addDependencies(Set dependencies) { + if (dependencies.contains(this)) return; + dependencies.add(this); + type.addDependencies(dependencies); + } +} + /// A wrapper around the objc_msgSend function, or the stret or fpret variants. /// /// The [variant] is based purely on the return type of the method. @@ -443,42 +192,39 @@ enum ObjCMsgSendVariant { /// arg. class ObjCMsgSendFunc { final ObjCMsgSendVariant variant; - final ObjCInternalGlobal useVariants; + final ObjCImport useVariants; // [normalFunc] is always a reference to the normal objc_msgSend function. If // the [variant] is fpret or stret, then [variantFunc] is a reference to the // corresponding variant of the objc_msgSend function, otherwise it's null. - late final Func normalFunc; - late final Func? variantFunc; + late final ObjCMsgSendVariantFunc normalFunc; + late final ObjCMsgSendVariantFunc? variantFunc; ObjCMsgSendFunc(String name, Type returnType, List params, this.useVariants) : variant = ObjCMsgSendVariant.fromReturnType(returnType) { - normalFunc = Func( + normalFunc = ObjCMsgSendVariantFunc( name: name, - originalName: ObjCMsgSendVariant.normal.name, + variant: ObjCMsgSendVariant.normal, returnType: returnType, parameters: _params(params), - isInternal: true, ); switch (variant) { case ObjCMsgSendVariant.normal: variantFunc = null; case ObjCMsgSendVariant.fpret: - variantFunc = Func( - name: '${name}_fpret', - originalName: variant.name, + variantFunc = ObjCMsgSendVariantFunc( + name: '${name}Fpret', + variant: variant, returnType: returnType, parameters: _params(params), - isInternal: true, ); case ObjCMsgSendVariant.stret: - variantFunc = Func( - name: '${name}_stret', - originalName: variant.name, + variantFunc = ObjCMsgSendVariantFunc( + name: '${name}Stret', + variant: variant, returnType: voidType, parameters: _params(params, structRetPtr: PointerType(returnType)), - isInternal: true, ); } } @@ -486,49 +232,45 @@ class ObjCMsgSendFunc { static List _params(List params, {Type? structRetPtr}) { return [ - if (structRetPtr != null) Parameter(name: 'stret', type: structRetPtr), - Parameter(name: 'obj', type: PointerType(objCObjectType)), - Parameter(name: 'sel', type: PointerType(objCSelType)), - for (final p in params) Parameter(name: p.name, type: p.type), + if (structRetPtr != null) Parameter(type: structRetPtr), + Parameter(type: PointerType(objCObjectType)), + Parameter(type: PointerType(objCSelType)), + for (final p in params) Parameter(type: p.type), ]; } bool get isStret => variant == ObjCMsgSendVariant.stret; void addDependencies(Set dependencies) { - if (variant != ObjCMsgSendVariant.normal) { - useVariants.addDependencies(dependencies); - } normalFunc.addDependencies(dependencies); variantFunc?.addDependencies(dependencies); } - String invoke(String lib, String target, String sel, Iterable params, + String invoke(Writer w, String target, String sel, Iterable params, {String? structRetPtr}) { - final normalCall = _invoke(normalFunc.name, lib, target, sel, params); + final normalCall = _invoke(normalFunc.name, target, sel, params); switch (variant) { case ObjCMsgSendVariant.normal: return normalCall; case ObjCMsgSendVariant.fpret: - final fpretCall = _invoke(variantFunc!.name, lib, target, sel, params); - return '$lib.${useVariants.name} ? $fpretCall : $normalCall'; + final fpretCall = _invoke(variantFunc!.name, target, sel, params); + return '${useVariants.gen(w)} ? $fpretCall : $normalCall'; case ObjCMsgSendVariant.stret: - final stretCall = _invoke(variantFunc!.name, lib, target, sel, params, + final stretCall = _invoke(variantFunc!.name, target, sel, params, structRetPtr: structRetPtr); - return '$lib.${useVariants.name} ? $stretCall : ' + return '${useVariants.gen(w)} ? $stretCall : ' '$structRetPtr.ref = $normalCall'; } } static String _invoke( String name, - String lib, String target, String sel, Iterable params, { String? structRetPtr, }) { - return '''$lib.$name(${[ + return '''$name(${[ if (structRetPtr != null) structRetPtr, target, sel, diff --git a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart index eafe6c8929..cbc7c193df 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart @@ -55,24 +55,20 @@ class ObjCInterface extends BindingType { super.dartDoc, required this.builtInFunctions, }) : lookupName = lookupName ?? originalName, - super( - name: name ?? originalName, - ) { - builtInFunctions.registerInterface(this); - } + super(name: name ?? originalName); - bool get isNSString => originalName == "NSString"; - bool get isNSData => originalName == "NSData"; + bool get _isBuiltIn => builtInFunctions.isBuiltInInterface(name); @override BindingString toBindingString(Writer w) { + if (_isBuiltIn) { + return BindingString(type: BindingStringType.objcInterface, string: ''); + } + String paramsToString(List params, {required bool isStatic}) { final List stringParams = []; - if (isStatic) { - stringParams.add('${w.className} _lib'); - } stringParams.addAll( params.map((p) => '${_getConvertedType(p.type, w, name)} ${p.name}')); return '(${stringParams.join(", ")})'; @@ -83,46 +79,42 @@ class ObjCInterface extends BindingType { s.write(makeDartDoc(dartDoc!)); } - final uniqueNamer = UniqueNamer({name, '_id', '_lib'}); - final natLib = w.className; + final uniqueNamer = UniqueNamer({name, 'pointer'}); + + final rawObjType = PointerType(objCObjectType).getCType(w); + final wrapObjType = ObjCBuiltInFunctions.objectBase.gen(w); - builtInFunctions.ensureUtilsExist(w, s); - final objType = PointerType(objCObjectType).getCType(w); + final superTypeIsInPkgObjc = superType == null; // Class declaration. s.write(''' -class $name extends ${superType?.name ?? '_ObjCWrapper'} { - $name._($objType id, $natLib lib, +class $name extends ${superType?.getDartType(w) ?? wrapObjType} { + $name._($rawObjType pointer, {bool retain = false, bool release = false}) : - super._(id, lib, retain: retain, release: release); + ${superTypeIsInPkgObjc ? 'super' : 'super.castFromPointer'} + (pointer, retain: retain, release: release); - /// Returns a [$name] that points to the same underlying object as [other]. - static $name castFrom(T other) { - return $name._(other._id, other._lib, retain: true, release: true); - } + /// Constructs a [$name] that points to the same underlying object as [other]. + $name.castFrom($wrapObjType other) : + this._(other.pointer, retain: true, release: true); - /// Returns a [$name] that wraps the given raw object pointer. - static $name castFromPointer($natLib lib, $objType other, - {bool retain = false, bool release = false}) { - return $name._(other, lib, retain: retain, release: release); - } + /// Constructs a [$name] that wraps the given raw object pointer. + $name.castFromPointer($rawObjType other, + {bool retain = false, bool release = false}) : + this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [$name]. - static bool isInstance(_ObjCWrapper obj) { + static bool isInstance($wrapObjType obj) { return ${_isKindOfClassMsgSend.invoke( - 'obj._lib', - 'obj._id', - 'obj._lib.${_isKindOfClass.name}', - ['obj._lib.${_classObject.name}'], + w, + 'obj.pointer', + _isKindOfClass.name, + [_classObject.name], )}; } '''); - if (isNSString) { - builtInFunctions.generateNSStringUtils(w, s); - } - // Methods. for (final m in methods.values) { final methodName = m._getDartMethodName(uniqueNamer); @@ -148,16 +140,16 @@ class $name extends ${superType?.name ?? '_ObjCWrapper'} { switch (m.kind) { case ObjCMethodKind.method: - // static returnType methodName(NativeLibrary _lib, ...) + // static returnType methodName(...) s.write(' $methodName'); break; case ObjCMethodKind.propertyGetter: - // static returnType getMethodName(NativeLibrary _lib) + // static returnType getMethodName() s.write(' get'); s.write(methodName[0].toUpperCase() + methodName.substring(1)); break; case ObjCMethodKind.propertySetter: - // static void setMethodName(NativeLibrary _lib, ...) + // static void setMethodName(...) s.write(' set'); s.write(methodName[0].toUpperCase() + methodName.substring(1)); break; @@ -177,7 +169,7 @@ class $name extends ${superType?.name ?? '_ObjCWrapper'} { case ObjCMethodKind.propertyGetter: s.write(_getConvertedType(returnType, w, name)); if (isStret) { - // void getMethodName(Pointer stret, NativeLibrary _lib) + // void getMethodName(Pointer stret) s.write(' get'); s.write(methodName[0].toUpperCase() + methodName.substring(1)); s.write(paramsToString(params, isStatic: false)); @@ -204,9 +196,9 @@ class $name extends ${superType?.name ?? '_ObjCWrapper'} { s.write(' ${convertReturn ? 'final _ret = ' : 'return '}'); } s.write(m.msgSend!.invoke( - '_lib', - isStatic ? '_lib.${_classObject.name}' : '_id', - '_lib.${m.selObject!.name}', + w, + isStatic ? _classObject.name : 'this.pointer', + m.selObject!.name, m.params.map((p) => p.type .convertDartTypeToFfiDartType(w, p.name, objCRetain: false)), structRetPtr: 'stret')); @@ -215,7 +207,6 @@ class $name extends ${superType?.name ?? '_ObjCWrapper'} { final result = returnType.convertFfiDartTypeToDartType( w, '_ret', - '_lib', objCRetain: !m.isOwnedReturn, objCEnclosingClass: name, ); @@ -227,37 +218,22 @@ class $name extends ${superType?.name ?? '_ObjCWrapper'} { s.write('}\n\n'); - if (isNSString) { - builtInFunctions.generateStringUtils(w, s); - } - return BindingString( type: BindingStringType.objcInterface, string: s.toString()); } @override void addDependencies(Set dependencies) { - if (dependencies.contains(this)) return; + if (dependencies.contains(this) || _isBuiltIn) return; dependencies.add(this); - builtInFunctions.addDependencies(dependencies); - _classObject = ObjCInternalGlobal( - '_class_$originalName', - (Writer w) => '${builtInFunctions.getClass.name}("$lookupName")', - builtInFunctions.getClass) + _classObject = ObjCInternalGlobal('_class_$originalName', + (Writer w) => '${ObjCBuiltInFunctions.getClass.gen(w)}("$lookupName")') ..addDependencies(dependencies); _isKindOfClass = builtInFunctions.getSelObject('isKindOfClass:'); _isKindOfClassMsgSend = builtInFunctions.getMsgSendFunc( BooleanType(), [ObjCMethodParam(PointerType(objCObjectType), 'clazz')]); - if (isNSString) { - _addNSStringMethods(); - } - - if (isNSData) { - _addNSDataMethods(); - } - if (superType != null) { superType!.addDependencies(dependencies); _copyMethodsFromSuperType(); @@ -267,6 +243,8 @@ class $name extends ${superType?.name ?? '_ObjCWrapper'} { for (final m in methods.values) { m.addDependencies(dependencies, builtInFunctions); } + + builtInFunctions.addDependencies(dependencies); } void _copyMethodsFromSuperType() { @@ -349,50 +327,12 @@ class $name extends ${superType?.name ?? '_ObjCWrapper'} { methods[method.originalName] = method; } - void _addNSStringMethods() { - addMethod(ObjCMethod( - originalName: 'stringWithCharacters:length:', - kind: ObjCMethodKind.method, - isClass: true, - returnType: this, - params_: [ - ObjCMethodParam(PointerType(wCharType), 'characters'), - ObjCMethodParam(unsignedIntType, 'length'), - ], - )); - addMethod(ObjCMethod( - originalName: 'dataUsingEncoding:', - kind: ObjCMethodKind.method, - isClass: false, - returnType: builtInFunctions.nsData, - params_: [ - ObjCMethodParam(unsignedIntType, 'encoding'), - ], - )); - addMethod(ObjCMethod( - originalName: 'length', - kind: ObjCMethodKind.propertyGetter, - isClass: false, - returnType: unsignedIntType, - params_: [], - )); - } - - void _addNSDataMethods() { - addMethod(ObjCMethod( - originalName: 'bytes', - kind: ObjCMethodKind.propertyGetter, - isClass: false, - returnType: PointerType(voidType), - params_: [], - )); - } - @override String getCType(Writer w) => PointerType(objCObjectType).getCType(w); @override - String getDartType(Writer w) => name; + String getDartType(Writer w) => + _isBuiltIn ? '${w.objcPkgPrefix}.$name' : name; @override bool get sameFfiDartAndCType => true; @@ -412,26 +352,24 @@ class $name extends ${superType?.name ?? '_ObjCWrapper'} { ObjCInterface.generateGetId(value, objCRetain); static String generateGetId(String value, bool objCRetain) => - objCRetain ? '$value.retainAndReturnPointer()' : '$value._id'; + objCRetain ? '$value.retainAndReturnPointer()' : '$value.pointer'; @override String convertFfiDartTypeToDartType( Writer w, - String value, - String library, { + String value, { required bool objCRetain, String? objCEnclosingClass, }) => - ObjCInterface.generateConstructor(name, value, library, objCRetain); + ObjCInterface.generateConstructor(getDartType(w), value, objCRetain); static String generateConstructor( String className, String value, - String library, bool objCRetain, ) { final ownershipFlags = 'retain: $objCRetain, release: true'; - return '$className._($value, $library, $ownershipFlags)'; + return '$className.castFromPointer($value, $ownershipFlags)'; } // Utils for converting between the internal types passed to native code, and diff --git a/pkgs/ffigen/lib/src/code_generator/objc_nullable.dart b/pkgs/ffigen/lib/src/code_generator/objc_nullable.dart index f3c0b877ab..5889e06b6a 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_nullable.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_nullable.dart @@ -64,8 +64,7 @@ class ObjCNullable extends Type { @override String convertFfiDartTypeToDartType( Writer w, - String value, - String library, { + String value, { required bool objCRetain, String? objCEnclosingClass, }) { @@ -73,7 +72,6 @@ class ObjCNullable extends Type { final convertedValue = child.convertFfiDartTypeToDartType( w, value, - library, objCRetain: objCRetain, objCEnclosingClass: objCEnclosingClass, ); diff --git a/pkgs/ffigen/lib/src/code_generator/pointer.dart b/pkgs/ffigen/lib/src/code_generator/pointer.dart index b3f6cfb621..963b7549e0 100644 --- a/pkgs/ffigen/lib/src/code_generator/pointer.dart +++ b/pkgs/ffigen/lib/src/code_generator/pointer.dart @@ -94,7 +94,9 @@ class ObjCObjectPointer extends PointerType { ObjCObjectPointer._() : super._(objCObjectType); @override - String getDartType(Writer w) => 'NSObject'; + String getDartType(Writer w) => w.generateForPackageObjectiveC + ? 'NSObject' + : '${w.objcPkgPrefix}.NSObject'; @override bool get sameDartAndCType => false; @@ -113,10 +115,9 @@ class ObjCObjectPointer extends PointerType { @override String convertFfiDartTypeToDartType( Writer w, - String value, - String library, { + String value, { required bool objCRetain, String? objCEnclosingClass, }) => - ObjCInterface.generateConstructor('NSObject', value, library, objCRetain); + ObjCInterface.generateConstructor(getDartType(w), value, objCRetain); } diff --git a/pkgs/ffigen/lib/src/code_generator/type.dart b/pkgs/ffigen/lib/src/code_generator/type.dart index c1d1e227fa..111d7eef8c 100644 --- a/pkgs/ffigen/lib/src/code_generator/type.dart +++ b/pkgs/ffigen/lib/src/code_generator/type.dart @@ -72,16 +72,14 @@ abstract class Type { /// Returns generated Dart code that converts the given value from its /// FfiDartType to its DartType. /// - /// [value] is the value to be converted, and [library] is an instance of the - /// native library object. If [objCRetain] is true, the ObjC wrapper object + /// [value] is the value to be converted. If [objCRetain] is true, the ObjC wrapper object /// will retain (ref count increment) the wrapped object pointer. If this /// conversion is occuring in the context of an ObjC class, then /// [objCEnclosingClass] should be the name of the Dart wrapper class (this is /// used by instancetype). String convertFfiDartTypeToDartType( Writer w, - String value, - String library, { + String value, { required bool objCRetain, String? objCEnclosingClass, }) => @@ -103,7 +101,7 @@ abstract class Type { /// Returns a string of code that creates a default value for this type. For /// example, for int types this returns the string '0'. A null return means /// that default values aren't supported for this type, eg void. - String? getDefaultValue(Writer w, String nativeLib) => null; + String? getDefaultValue(Writer w) => null; } /// Base class for all Type bindings. @@ -155,8 +153,7 @@ abstract class BindingType extends NoLookUpBinding implements Type { @override String convertFfiDartTypeToDartType( Writer w, - String value, - String library, { + String value, { required bool objCRetain, String? objCEnclosingClass, }) => @@ -169,7 +166,7 @@ abstract class BindingType extends NoLookUpBinding implements Type { String cacheKey() => hashCode.toRadixString(36); @override - String? getDefaultValue(Writer w, String nativeLib) => null; + String? getDefaultValue(Writer w) => null; } /// Represents an unimplemented type. Used as a marker, so that declarations diff --git a/pkgs/ffigen/lib/src/code_generator/typealias.dart b/pkgs/ffigen/lib/src/code_generator/typealias.dart index e31d14882e..d2b43b1fe6 100644 --- a/pkgs/ffigen/lib/src/code_generator/typealias.dart +++ b/pkgs/ffigen/lib/src/code_generator/typealias.dart @@ -172,15 +172,13 @@ class Typealias extends BindingType { @override String convertFfiDartTypeToDartType( Writer w, - String value, - String library, { + String value, { required bool objCRetain, String? objCEnclosingClass, }) => type.convertFfiDartTypeToDartType( w, value, - library, objCRetain: objCRetain, objCEnclosingClass: objCEnclosingClass, ); @@ -189,8 +187,7 @@ class Typealias extends BindingType { String cacheKey() => type.cacheKey(); @override - String? getDefaultValue(Writer w, String nativeLib) => - type.getDefaultValue(w, nativeLib); + String? getDefaultValue(Writer w) => type.getDefaultValue(w); } /// Objective C's instancetype. @@ -220,13 +217,11 @@ class ObjCInstanceType extends Typealias { @override String convertFfiDartTypeToDartType( Writer w, - String value, - String library, { + String value, { required bool objCRetain, String? objCEnclosingClass, }) => // objCEnclosingClass must be present, because instancetype can only // occur inside a class. - ObjCInterface.generateConstructor( - objCEnclosingClass!, value, library, objCRetain); + ObjCInterface.generateConstructor(objCEnclosingClass!, value, objCRetain); } diff --git a/pkgs/ffigen/lib/src/code_generator/utils.dart b/pkgs/ffigen/lib/src/code_generator/utils.dart index 4bad8e3dd3..f1dfd4da10 100644 --- a/pkgs/ffigen/lib/src/code_generator/utils.dart +++ b/pkgs/ffigen/lib/src/code_generator/utils.dart @@ -2,6 +2,10 @@ // for 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:path/path.dart' as p; + import 'dart_keywords.dart'; import 'pointer.dart'; import 'type.dart'; @@ -112,3 +116,21 @@ String makeArrayAnnotation(Writer w, ConstantArray arrayType) { return '@${w.ffiLibraryPrefix}.Array.multi([${dimensions.join(', ')}])'; } + +/// The path to the Dart executable. +/// +/// This is usually just Platform.resolvedExecutable. But when running flutter +/// tests, the resolvedExecutable will be flutter_tester, and Dart will be in a +/// directory a few levels up from it. +String findDart() { + String path = Platform.resolvedExecutable; + if (p.basenameWithoutExtension(path) == 'dart') return path; + final dartExe = 'dart${p.extension(path)}'; + while (path.isNotEmpty) { + path = p.dirname(path); + final dartPath = p.join(path, dartExe); + if (File(dartPath).existsSync()) return dartPath; + } + throw Exception( + "Couldn't find Dart executable near ${Platform.resolvedExecutable}"); +} diff --git a/pkgs/ffigen/lib/src/code_generator/writer.dart b/pkgs/ffigen/lib/src/code_generator/writer.dart index 8193de1c0b..5094b5b918 100644 --- a/pkgs/ffigen/lib/src/code_generator/writer.dart +++ b/pkgs/ffigen/lib/src/code_generator/writer.dart @@ -34,6 +34,8 @@ class Writer { final String? classDocComment; + final bool generateForPackageObjectiveC; + String? _ffiLibraryPrefix; String get ffiLibraryPrefix { if (_ffiLibraryPrefix != null) { @@ -60,6 +62,19 @@ class Writer { return _ffiPkgLibraryPrefix = import.prefix; } + String? _objcPkgPrefix; + String get objcPkgPrefix { + if (_objcPkgPrefix != null) { + return _objcPkgPrefix!; + } + + final import = _usedImports.firstWhere( + (element) => element.name == objcPkgImport.name, + orElse: () => objcPkgImport); + _usedImports.add(import); + return _objcPkgPrefix = import.prefix; + } + late String selfImportPrefix = () { final import = _usedImports .firstWhere((element) => element.name == self.name, orElse: () => self); @@ -106,6 +121,7 @@ class Writer { Set? additionalImports, this.classDocComment, this.header, + required this.generateForPackageObjectiveC, }) { final globalLevelNameSet = noLookUpBindings.map((e) => e.name).toSet(); final wrapperLevelNameSet = lookUpBindings.map((e) => e.name).toSet(); @@ -293,9 +309,8 @@ class Writer { // Write neccesary imports. for (final lib in _usedImports) { - result - ..write("import '${lib.importPath}' as ${lib.prefix};") - ..write('\n'); + final path = lib.importPath(generateForPackageObjectiveC); + result.write("import '$path' as ${lib.prefix};\n"); } result.write(s); diff --git a/pkgs/ffigen/lib/src/config_provider/config.dart b/pkgs/ffigen/lib/src/config_provider/config.dart index 69740f4b79..1e6e36684c 100644 --- a/pkgs/ffigen/lib/src/config_provider/config.dart +++ b/pkgs/ffigen/lib/src/config_provider/config.dart @@ -98,6 +98,14 @@ class Config { bool get excludeAllByDefault => _excludeAllByDefault; late bool _excludeAllByDefault; + /// Undocumented option that changes code generation for package:objective_c. + /// The main difference is whether NSObject etc are imported from + /// package:objective_c (the default) or code genned like any other class. + /// This is necessary because package:objective_c can't import NSObject from + /// itself. + bool get generateForPackageObjectiveC => _generateForPackageObjectiveC; + late bool _generateForPackageObjectiveC; + /// If generated bindings should be sorted alphabetically. bool get sort => _sort; late bool _sort; @@ -602,6 +610,13 @@ class Config { defaultValue: (node) => false, resultOrDefault: (node) => _excludeAllByDefault = node.value as bool, ), + HeterogeneousMapEntry( + key: strings.generateForPackageObjectiveC, + valueConfigSpec: BoolConfigSpec(), + defaultValue: (node) => false, + resultOrDefault: (node) => + _generateForPackageObjectiveC = node.value as bool, + ), HeterogeneousMapEntry( key: strings.sort, valueConfigSpec: BoolConfigSpec(), diff --git a/pkgs/ffigen/lib/src/config_provider/spec_utils.dart b/pkgs/ffigen/lib/src/config_provider/spec_utils.dart index 31326ace90..41860e89ca 100644 --- a/pkgs/ffigen/lib/src/config_provider/spec_utils.dart +++ b/pkgs/ffigen/lib/src/config_provider/spec_utils.dart @@ -92,15 +92,15 @@ Map symbolFileImportExtractor( final uniqueNamer = UniqueNamer(libraryImports.keys .followedBy([strings.defaultSymbolFileImportPrefix]).toSet()); for (final file in (symbolFile[strings.files] as YamlMap).keys) { - final existingImports = - libraryImports.values.where((element) => element.importPath == file); + final existingImports = libraryImports.values + .where((element) => element.importPath(false) == file); if (existingImports.isEmpty) { final name = uniqueNamer.makeUnique(strings.defaultSymbolFileImportPrefix); libraryImports[name] = LibraryImport(name, file as String); } final libraryImport = libraryImports.values.firstWhere( - (element) => element.importPath == file, + (element) => element.importPath(false) == file, ); loadImportedTypes( symbolFile[strings.files][file] as YamlMap, resultMap, libraryImport); diff --git a/pkgs/ffigen/lib/src/executables/ffigen.dart b/pkgs/ffigen/lib/src/executables/ffigen.dart index 1c60085928..dde4723811 100644 --- a/pkgs/ffigen/lib/src/executables/ffigen.dart +++ b/pkgs/ffigen/lib/src/executables/ffigen.dart @@ -17,6 +17,7 @@ final _ansi = Ansi(Ansi.terminalSupportsAnsi); const compilerOpts = 'compiler-opts'; const ignoreSourceErrors = 'ignore-source-errors'; +const format = 'format'; const conf = 'config'; const help = 'help'; const verbose = 'verbose'; @@ -36,7 +37,7 @@ String errorPen(String str) { return '${_ansi.red}$str${_ansi.none}'; } -void main(List args) async { +Future main(List args) async { // Parses the cmd args. This will print usage and exit if --help was passed. final argResult = getArgResults(args); @@ -57,7 +58,7 @@ void main(List args) async { // Generate file for the parsed bindings. final gen = File(config.output); - library.generateFile(gen); + library.generateFile(gen, format: argResult[format] as bool); _logger .info(successPen('Finished, Bindings generated in ${gen.absolute.path}')); @@ -168,6 +169,12 @@ ArgResults getArgResults(List args) { help: 'Ignore any compiler warnings/errors in source header files', negatable: false, ); + parser.addFlag( + format, + help: 'Format the generated code.', + defaultsTo: true, + negatable: true, + ); ArgResults results; try { diff --git a/pkgs/ffigen/lib/src/header_parser/data.dart b/pkgs/ffigen/lib/src/header_parser/data.dart index bab37af435..15cceb5d44 100644 --- a/pkgs/ffigen/lib/src/header_parser/data.dart +++ b/pkgs/ffigen/lib/src/header_parser/data.dart @@ -57,6 +57,7 @@ void initializeGlobals({required Config config}) { _unnamedEnumConstants = []; _cursorIndex = CursorIndex(); _bindingsIndex = BindingsIndex(); - _objCBuiltInFunctions = ObjCBuiltInFunctions(); + _objCBuiltInFunctions = + ObjCBuiltInFunctions(config.generateForPackageObjectiveC); hasSourceErrors = false; } diff --git a/pkgs/ffigen/lib/src/header_parser/parser.dart b/pkgs/ffigen/lib/src/header_parser/parser.dart index fce0b4926b..8f14fab8ad 100644 --- a/pkgs/ffigen/lib/src/header_parser/parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/parser.dart @@ -26,11 +26,12 @@ Library parse(Config c) { final library = Library( bindings: bindings, - name: config.wrapperName, - description: config.wrapperDocComment, - header: config.preamble, - sort: config.sort, - packingOverride: config.structPackingOverride, + name: c.wrapperName, + description: c.wrapperDocComment, + header: c.preamble, + sort: c.sort, + generateForPackageObjectiveC: c.generateForPackageObjectiveC, + packingOverride: c.structPackingOverride, libraryImports: c.libraryImports.values.toSet(), ); diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/objc_block_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/objc_block_parser.dart index 313de4e1e9..90ebb05c40 100644 --- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/objc_block_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/objc_block_parser.dart @@ -34,6 +34,5 @@ ObjCBlock parseObjCBlock(clang_types.CXType cxtype) { usr: usr.toString(), returnType: returnType, argTypes: argTypes, - builtInFunctions: objCBuiltInFunctions, ); } diff --git a/pkgs/ffigen/lib/src/strings.dart b/pkgs/ffigen/lib/src/strings.dart index b14a517915..cc1397a7f4 100644 --- a/pkgs/ffigen/lib/src/strings.dart +++ b/pkgs/ffigen/lib/src/strings.dart @@ -74,6 +74,7 @@ const typedefs = 'typedefs'; const objcInterfaces = 'objc-interfaces'; const excludeAllByDefault = 'exclude-all-by-default'; +const generateForPackageObjectiveC = 'generate-for-package-objective-c'; // Sub-fields of Declarations. const include = 'include'; diff --git a/pkgs/ffigen/pubspec.yaml b/pkgs/ffigen/pubspec.yaml index 006cc8c9fa..42ec013214 100644 --- a/pkgs/ffigen/pubspec.yaml +++ b/pkgs/ffigen/pubspec.yaml @@ -17,21 +17,29 @@ environment: sdk: '>=3.3.0-252.0.dev <4.0.0' dependencies: - ffi: ^2.0.1 - yaml: ^3.0.0 - path: ^1.8.0 - quiver: ^3.0.0 args: ^2.0.0 - logging: ^1.0.0 cli_util: ^0.4.0 - glob: ^2.0.0 + collection: ^1.18.0 + ffi: ^2.0.1 file: ^7.0.0 + glob: ^2.0.0 + logging: ^1.0.0 package_config: ^2.1.0 + path: ^1.8.0 + quiver: ^3.0.0 + yaml: ^3.0.0 yaml_edit: ^2.0.3 - collection: ^1.18.0 dev_dependencies: - lints: ^2.0.1 - test: ^1.16.2 json_schema: ^5.1.1 + lints: ^2.0.1 meta: ^1.11.0 + objective_c: ^0.0.1 + test: ^1.16.2 + +dependency_overrides: + # package:objective_c has a flutter dependency, so `dart test` must be run + # using the dart from the flutter SDK. + # See https://github.com/dart-lang/native/issues/1068 + objective_c: + path: ../objective_c/ diff --git a/pkgs/ffigen/test/example_tests/objective_c_example_test.dart b/pkgs/ffigen/test/example_tests/objective_c_example_test.dart index eba22e6135..2c0444998b 100644 --- a/pkgs/ffigen/test/example_tests/objective_c_example_test.dart +++ b/pkgs/ffigen/test/example_tests/objective_c_example_test.dart @@ -25,18 +25,12 @@ void main() { // Verify that the output contains all the methods and classes that the // example app uses. - expect(output, contains('class AVFAudio{')); - expect(output, contains('class NSString extends NSObject {')); - expect(output, contains('class NSURL extends NSObject {')); + expect(output, contains('class AVAudioPlayer extends objc.NSObject {')); expect( output, contains( - 'static NSURL fileURLWithPath_(AVFAudio _lib, NSString path) {')); - expect(output, contains('class AVAudioPlayer extends NSObject {')); - expect( - output, - contains('AVAudioPlayer? initWithContentsOfURL_error_(' - 'NSURL url, ffi.Pointer> outError) {')); + 'AVAudioPlayer? initWithContentsOfURL_error_(objc.NSURL url, ' + 'ffi.Pointer> outError) {')); expect(output, contains('double get duration {')); expect(output, contains('bool play() {')); }); diff --git a/pkgs/ffigen/test/example_tests/swift_example_test.dart b/pkgs/ffigen/test/example_tests/swift_example_test.dart index a4ac61e5e6..ff5811164f 100644 --- a/pkgs/ffigen/test/example_tests/swift_example_test.dart +++ b/pkgs/ffigen/test/example_tests/swift_example_test.dart @@ -51,10 +51,8 @@ void main() { // Verify that the output contains all the methods and classes that the // example app uses. - expect(output, contains('class SwiftLibrary{')); - expect(output, contains('class NSString extends NSObject {')); - expect(output, contains('class SwiftClass extends NSObject {')); - expect(output, contains('static SwiftClass new1(SwiftLibrary _lib) {')); + expect(output, contains('class SwiftClass extends objc.NSObject {')); + expect(output, contains('static SwiftClass new1() {')); expect(output, contains('NSString sayHello() {')); expect(output, contains('int get someField {')); expect(output, contains('set someField(int value) {')); @@ -63,7 +61,7 @@ void main() { expect( output, contains(RegExp(r'late final _class_SwiftClass.* = ' - r'_getClass.*\("swift_module\.SwiftClass"\)'))); + r'objc.getClass.*\("swift_module\.SwiftClass"\)'))); }); }); } diff --git a/pkgs/ffigen/test/native_objc_test/automated_ref_count_config.yaml b/pkgs/ffigen/test/native_objc_test/automated_ref_count_config.yaml index 600d33dd32..7ecf98715e 100644 --- a/pkgs/ffigen/test/native_objc_test/automated_ref_count_config.yaml +++ b/pkgs/ffigen/test/native_objc_test/automated_ref_count_config.yaml @@ -15,4 +15,4 @@ headers: entry-points: - 'automated_ref_count_test.m' preamble: | - // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field + // ignore_for_file: camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field diff --git a/pkgs/ffigen/test/native_objc_test/automated_ref_count_test.dart b/pkgs/ffigen/test/native_objc_test/automated_ref_count_test.dart index 170fea2b07..2e0f7891cb 100644 --- a/pkgs/ffigen/test/native_objc_test/automated_ref_count_test.dart +++ b/pkgs/ffigen/test/native_objc_test/automated_ref_count_test.dart @@ -2,50 +2,43 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +// ignore_for_file: unused_local_variable + // Objective C support is only available on mac. @TestOn('mac-os') import 'dart:ffi'; import 'dart:io'; -import 'package:test/test.dart'; import 'package:ffi/ffi.dart'; +import 'package:objective_c/objective_c.dart'; +import 'package:test/test.dart'; import '../test_utils.dart'; import 'automated_ref_count_bindings.dart'; import 'util.dart'; void main() { late AutomatedRefCountTestObjCLibrary lib; - late void Function(Pointer, Pointer) executeInternalCommand; group('Automatic reference counting', () { setUpAll(() { logWarnings(); + // TODO(https://github.com/dart-lang/native/issues/1068): Remove this. + DynamicLibrary.open('../objective_c/test/objective_c.dylib'); final dylib = File('test/native_objc_test/automated_ref_count_test.dylib'); verifySetupFile(dylib); lib = AutomatedRefCountTestObjCLibrary( DynamicLibrary.open(dylib.absolute.path)); - executeInternalCommand = DynamicLibrary.process().lookupFunction< - Void Function(Pointer, Pointer), - void Function( - Pointer, Pointer)>('Dart_ExecuteInternalCommand'); - generateBindingsForCoverage('automated_ref_count'); }); - doGC() { - final gcNow = "gc-now".toNativeUtf8(); - executeInternalCommand(gcNow.cast(), nullptr); - calloc.free(gcNow); - } - newMethodsInner(Pointer counter) { - final obj1 = ArcTestObject.new1(lib); + final obj1 = ArcTestObject.new1(); obj1.setCounter_(counter); expect(counter.value, 1); - final obj2 = ArcTestObject.newWithCounter_(lib, counter); + final obj2 = ArcTestObject.newWithCounter_(counter); expect(counter.value, 2); } @@ -61,12 +54,12 @@ void main() { }); allocMethodsInner(Pointer counter) { - final obj1 = ArcTestObject.alloc(lib).initWithCounter_(counter); + final obj1 = ArcTestObject.alloc().initWithCounter_(counter); expect(counter.value, 1); - final obj2 = ArcTestObject.castFrom(ArcTestObject.alloc(lib).init()); + final obj2 = ArcTestObject.castFrom(ArcTestObject.alloc().init()); obj2.setCounter_(counter); expect(counter.value, 2); - final obj3 = ArcTestObject.allocTheThing(lib).initWithCounter_(counter); + final obj3 = ArcTestObject.allocTheThing().initWithCounter_(counter); expect(counter.value, 3); } @@ -80,7 +73,7 @@ void main() { }); copyMethodsInner(Pointer counter) { - final obj1 = ArcTestObject.newWithCounter_(lib, counter); + final obj1 = ArcTestObject.newWithCounter_(counter); expect(counter.value, 1); final obj2 = obj1.copyMe(); expect(counter.value, 2); @@ -102,7 +95,7 @@ void main() { }); autoreleaseMethodsInner(Pointer counter) { - final obj = ArcTestObject.makeAndAutorelease_(lib, counter); + final obj = ArcTestObject.makeAndAutorelease_(counter); expect(counter.value, 1); } @@ -119,7 +112,7 @@ void main() { expect(counter.value, 0); final pool2 = lib.createAutoreleasePool(); - final obj = ArcTestObject.makeAndAutorelease_(lib, counter); + final obj = ArcTestObject.makeAndAutorelease_(counter); expect(counter.value, 1); doGC(); expect(counter.value, 1); @@ -133,7 +126,7 @@ void main() { }); assignPropertiesInnerInner(Pointer counter, ArcTestObject outerObj) { - final assignObj = ArcTestObject.newWithCounter_(lib, counter); + final assignObj = ArcTestObject.newWithCounter_(counter); expect(counter.value, 2); outerObj.assignedProperty = assignObj; expect(counter.value, 2); @@ -145,7 +138,7 @@ void main() { } assignPropertiesInner(Pointer counter) { - final outerObj = ArcTestObject.newWithCounter_(lib, counter); + final outerObj = ArcTestObject.newWithCounter_(counter); expect(counter.value, 1); assignPropertiesInnerInner(counter, outerObj); doGC(); @@ -163,7 +156,7 @@ void main() { }); retainPropertiesInnerInner(Pointer counter, ArcTestObject outerObj) { - final retainObj = ArcTestObject.newWithCounter_(lib, counter); + final retainObj = ArcTestObject.newWithCounter_(counter); expect(counter.value, 2); outerObj.retainedProperty = retainObj; expect(counter.value, 2); @@ -171,7 +164,7 @@ void main() { } retainPropertiesInner(Pointer counter) { - final outerObj = ArcTestObject.newWithCounter_(lib, counter); + final outerObj = ArcTestObject.newWithCounter_(counter); expect(counter.value, 1); retainPropertiesInnerInner(counter, outerObj); doGC(); @@ -194,10 +187,10 @@ void main() { }); copyPropertiesInner(Pointer counter) { - final outerObj = ArcTestObject.newWithCounter_(lib, counter); + final outerObj = ArcTestObject.newWithCounter_(counter); expect(counter.value, 1); - final copyObj = ArcTestObject.newWithCounter_(lib, counter); + final copyObj = ArcTestObject.newWithCounter_(counter); expect(counter.value, 2); outerObj.copiedProperty = copyObj; // Copy properties make a copy of the object, so now we have 3 objects. @@ -226,13 +219,14 @@ void main() { castFromPointerInnerReleaseAndRetain(int address) { final fromCast = RefCounted.castFromPointer( - lib, Pointer.fromAddress(address), - release: true, retain: true); + Pointer.fromAddress(address), + release: true, + retain: true); expect(fromCast.refCount, 2); } test('castFromPointer - release and retain', () { - final obj1 = RefCounted.new1(lib); + final obj1 = RefCounted.new1(); expect(obj1.refCount, 1); castFromPointerInnerReleaseAndRetain(obj1.meAsInt()); @@ -242,13 +236,14 @@ void main() { castFromPointerInnerNoReleaseAndRetain(int address) { final fromCast = RefCounted.castFromPointer( - lib, Pointer.fromAddress(address), - release: false, retain: false); + Pointer.fromAddress(address), + release: false, + retain: false); expect(fromCast.refCount, 1); } test('castFromPointer - no release and retain', () { - final obj1 = RefCounted.new1(lib); + final obj1 = RefCounted.new1(); expect(obj1.refCount, 1); castFromPointerInnerNoReleaseAndRetain(obj1.meAsInt()); @@ -258,11 +253,11 @@ void main() { test('Manual release', () { final counter = calloc(); - final obj1 = ArcTestObject.newWithCounter_(lib, counter); + final obj1 = ArcTestObject.newWithCounter_(counter); expect(counter.value, 1); - final obj2 = ArcTestObject.newWithCounter_(lib, counter); + final obj2 = ArcTestObject.newWithCounter_(counter); expect(counter.value, 2); - final obj3 = ArcTestObject.newWithCounter_(lib, counter); + final obj3 = ArcTestObject.newWithCounter_(counter); expect(counter.value, 3); obj1.release(); @@ -277,13 +272,13 @@ void main() { }); Pointer manualRetainInner(Pointer counter) { - final obj = ArcTestObject.newWithCounter_(lib, counter); + final obj = ArcTestObject.newWithCounter_(counter); expect(counter.value, 1); return obj.retainAndReturnPointer(); } manualRetainInner2(Pointer counter, Pointer rawPointer) { - final obj = ArcTestObject.castFromPointer(lib, rawPointer, + final obj = ArcTestObject.castFromPointer(rawPointer, retain: false, release: true); expect(counter.value, 1); } @@ -302,7 +297,7 @@ void main() { }); ArcTestObject unownedReferenceInner2(Pointer counter) { - final obj1 = ArcTestObject.new1(lib); + final obj1 = ArcTestObject.new1(); obj1.setCounter_(counter); expect(counter.value, 1); final obj1b = obj1.unownedReference(); @@ -311,7 +306,7 @@ void main() { // Make a second object so that the counter check in unownedReferenceInner // sees some sort of change. Otherwise this test could pass just by the GC // not working correctly. - final obj2 = ArcTestObject.new1(lib); + final obj2 = ArcTestObject.new1(); obj2.setCounter_(counter); expect(counter.value, 2); diff --git a/pkgs/ffigen/test/native_objc_test/bad_method_config.yaml b/pkgs/ffigen/test/native_objc_test/bad_method_config.yaml index 5ad9c1b9b1..1534fbb929 100644 --- a/pkgs/ffigen/test/native_objc_test/bad_method_config.yaml +++ b/pkgs/ffigen/test/native_objc_test/bad_method_config.yaml @@ -18,4 +18,4 @@ headers: entry-points: - 'bad_method_test.m' preamble: | - // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field + // ignore_for_file: camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field diff --git a/pkgs/ffigen/test/native_objc_test/bad_method_test.dart b/pkgs/ffigen/test/native_objc_test/bad_method_test.dart index 3b87c5bd38..67d6398ac5 100644 --- a/pkgs/ffigen/test/native_objc_test/bad_method_test.dart +++ b/pkgs/ffigen/test/native_objc_test/bad_method_test.dart @@ -14,25 +14,26 @@ import 'bad_method_test_bindings.dart'; import 'util.dart'; void main() { - late NativeObjCLibrary lib; group('bad_method_test', () { setUpAll(() { logWarnings(); + // TODO(https://github.com/dart-lang/native/issues/1068): Remove this. + DynamicLibrary.open('../objective_c/test/objective_c.dylib'); final dylib = File('test/native_objc_test/bad_method_test.dylib'); verifySetupFile(dylib); - lib = NativeObjCLibrary(DynamicLibrary.open(dylib.absolute.path)); + DynamicLibrary.open(dylib.absolute.path); generateBindingsForCoverage('bad_method'); }); test("Test incomplete struct methods that weren't skipped", () { - final obj = BadMethodTestObject.new1(lib); + final obj = BadMethodTestObject.new1(); final structPtr = obj.incompletePointerReturn(); expect(structPtr.address, 1234); expect(obj.incompletePointerParam_(structPtr), 1234); }); test("Test bit field methods that weren't skipped", () { - final obj = BadMethodTestObject.new1(lib); + final obj = BadMethodTestObject.new1(); final bitFieldPtr = obj.bitFieldPointerReturn(); expect(bitFieldPtr.address, 5678); expect(obj.bitFieldPointerParam_(bitFieldPtr), 5678); diff --git a/pkgs/ffigen/test/native_objc_test/block_config.yaml b/pkgs/ffigen/test/native_objc_test/block_config.yaml index 9f12686e3d..18289df955 100644 --- a/pkgs/ffigen/test/native_objc_test/block_config.yaml +++ b/pkgs/ffigen/test/native_objc_test/block_config.yaml @@ -13,4 +13,4 @@ headers: entry-points: - 'block_test.m' preamble: | - // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field + // ignore_for_file: camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field diff --git a/pkgs/ffigen/test/native_objc_test/block_test.dart b/pkgs/ffigen/test/native_objc_test/block_test.dart index 713e76650f..8e2174cbaa 100644 --- a/pkgs/ffigen/test/native_objc_test/block_test.dart +++ b/pkgs/ffigen/test/native_objc_test/block_test.dart @@ -2,6 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +// ignore_for_file: unused_local_variable + // Objective C support is only available on mac. @TestOn('mac-os') @@ -9,8 +11,11 @@ import 'dart:async'; import 'dart:ffi'; import 'dart:io'; -import 'package:test/test.dart'; import 'package:ffi/ffi.dart'; +import 'package:objective_c/src/internal.dart' as internal_for_testing + show blockHasRegisteredClosure; +import 'package:test/test.dart'; + import '../test_utils.dart'; import 'block_bindings.dart'; import 'util.dart'; @@ -27,44 +32,34 @@ typedef BlockBlock = ObjCBlock_Int32Int32_Int32Int32; void main() { late BlockTestObjCLibrary lib; - late void Function(Pointer, Pointer) executeInternalCommand; group('Blocks', () { setUpAll(() { logWarnings(); + // TODO(https://github.com/dart-lang/native/issues/1068): Remove this. + DynamicLibrary.open('../objective_c/test/objective_c.dylib'); final dylib = File('test/native_objc_test/block_test.dylib'); verifySetupFile(dylib); lib = BlockTestObjCLibrary(DynamicLibrary.open(dylib.absolute.path)); - executeInternalCommand = DynamicLibrary.process().lookupFunction< - Void Function(Pointer, Pointer), - void Function( - Pointer, Pointer)>('Dart_ExecuteInternalCommand'); - generateBindingsForCoverage('block'); }); - doGC() { - final gcNow = "gc-now".toNativeUtf8(); - executeInternalCommand(gcNow.cast(), nullptr); - calloc.free(gcNow); - } - test('BlockTester is working', () { // This doesn't test any Block functionality, just that the BlockTester // itself is working correctly. - final blockTester = BlockTester.makeFromMultiplier_(lib, 10); + final blockTester = BlockTester.makeFromMultiplier_(10); expect(blockTester.call_(123), 1230); final intBlock = blockTester.getBlock(); - final blockTester2 = BlockTester.makeFromBlock_(lib, intBlock); + final blockTester2 = BlockTester.makeFromBlock_(intBlock); blockTester2.pokeBlock(); expect(blockTester2.call_(456), 4560); }); test('Block from function pointer', () { final block = - IntBlock.fromFunctionPointer(lib, Pointer.fromFunction(_add100, 999)); - final blockTester = BlockTester.makeFromBlock_(lib, block); + IntBlock.fromFunctionPointer(Pointer.fromFunction(_add100, 999)); + final blockTester = BlockTester.makeFromBlock_(block); blockTester.pokeBlock(); expect(blockTester.call_(123), 223); expect(block(123), 223); @@ -75,36 +70,36 @@ void main() { } test('Block from function', () { - final block = IntBlock.fromFunction(lib, makeAdder(4000)); - final blockTester = BlockTester.makeFromBlock_(lib, block); + final block = IntBlock.fromFunction(makeAdder(4000)); + final blockTester = BlockTester.makeFromBlock_(block); blockTester.pokeBlock(); expect(blockTester.call_(123), 4123); expect(block(123), 4123); }); test('Listener block same thread', () async { - final hasRun = Completer(); + final hasRun = Completer(); int value = 0; - final block = VoidBlock.listener(lib, () { + final block = VoidBlock.listener(() { value = 123; hasRun.complete(); }); - BlockTester.callOnSameThread_(lib, block); + BlockTester.callOnSameThread_(block); await hasRun.future; expect(value, 123); }); test('Listener block new thread', () async { - final hasRun = Completer(); + final hasRun = Completer(); int value = 0; - final block = VoidBlock.listener(lib, () { + final block = VoidBlock.listener(() { value = 123; hasRun.complete(); }); - final thread = BlockTester.callOnNewThread_(lib, block); + final thread = BlockTester.callOnNewThread_(block); thread.start(); await hasRun.future; @@ -112,19 +107,19 @@ void main() { }); test('Float block', () { - final block = FloatBlock.fromFunction(lib, (double x) { + final block = FloatBlock.fromFunction((double x) { return x + 4.56; }); expect(block(1.23), closeTo(5.79, 1e-6)); - expect(BlockTester.callFloatBlock_(lib, block), closeTo(5.79, 1e-6)); + expect(BlockTester.callFloatBlock_(block), closeTo(5.79, 1e-6)); }); test('Double block', () { - final block = DoubleBlock.fromFunction(lib, (double x) { + final block = DoubleBlock.fromFunction((double x) { return x + 4.56; }); expect(block(1.23), closeTo(5.79, 1e-6)); - expect(BlockTester.callDoubleBlock_(lib, block), closeTo(5.79, 1e-6)); + expect(BlockTester.callDoubleBlock_(block), closeTo(5.79, 1e-6)); }); test('Struct block', () { @@ -138,7 +133,7 @@ void main() { final tempPtr = arena(); final temp = tempPtr.ref; - final block = Vec4Block.fromFunction(lib, (Vec4 v) { + final block = Vec4Block.fromFunction((Vec4 v) { // Twiddle the Vec4 components. temp.x = v.y; temp.y = v.z; @@ -155,7 +150,7 @@ void main() { final result2Ptr = arena(); final result2 = result2Ptr.ref; - BlockTester.callVec4Block_(lib, result2Ptr, block); + BlockTester.callVec4Block_(result2Ptr, block); expect(result2.x, 3.4); expect(result2.y, 5.6); expect(result2.z, 7.8); @@ -165,18 +160,18 @@ void main() { test('Object block', () { bool isCalled = false; - final block = ObjectBlock.fromFunction(lib, (DummyObject x) { + final block = ObjectBlock.fromFunction((DummyObject x) { isCalled = true; return x; }); - final obj = DummyObject.new1(lib); + final obj = DummyObject.new1(); final result1 = block(obj); expect(result1, obj); expect(isCalled, isTrue); isCalled = false; - final result2 = BlockTester.callObjectBlock_(lib, block); + final result2 = BlockTester.callObjectBlock_(block); expect(result2, isNot(obj)); expect(result2.pointer, isNot(nullptr)); expect(isCalled, isTrue); @@ -184,12 +179,12 @@ void main() { test('Nullable object block', () { bool isCalled = false; - final block = NullableObjectBlock.fromFunction(lib, (DummyObject? x) { + final block = NullableObjectBlock.fromFunction((DummyObject? x) { isCalled = true; return x; }); - final obj = DummyObject.new1(lib); + final obj = DummyObject.new1(); final result1 = block(obj); expect(result1, obj); expect(isCalled, isTrue); @@ -200,44 +195,46 @@ void main() { expect(isCalled, isTrue); isCalled = false; - final result3 = BlockTester.callNullableObjectBlock_(lib, block); + final result3 = BlockTester.callNullableObjectBlock_(block); expect(result3, isNull); expect(isCalled, isTrue); }); test('Block block', () { - final blockBlock = BlockBlock.fromFunction(lib, (IntBlock intBlock) { - return IntBlock.fromFunction(lib, (int x) { + final blockBlock = BlockBlock.fromFunction((IntBlock intBlock) { + return IntBlock.fromFunction((int x) { return 3 * intBlock(x); }); }); - final intBlock = IntBlock.fromFunction(lib, (int x) { + final intBlock = IntBlock.fromFunction((int x) { return 5 * x; }); final result1 = blockBlock(intBlock); expect(result1(1), 15); - final result2 = BlockTester.newBlock_withMult_(lib, blockBlock, 2); + final result2 = BlockTester.newBlock_withMult_(blockBlock, 2); expect(result2(1), 6); }); test('Native block block', () { - final blockBlock = BlockTester.newBlockBlock_(lib, 7); + final blockBlock = BlockTester.newBlockBlock_(7); - final intBlock = IntBlock.fromFunction(lib, (int x) { + final intBlock = IntBlock.fromFunction((int x) { return 5 * x; }); final result1 = blockBlock(intBlock); expect(result1(1), 35); - final result2 = BlockTester.newBlock_withMult_(lib, blockBlock, 2); + final result2 = BlockTester.newBlock_withMult_(blockBlock, 2); expect(result2(1), 14); }); Pointer funcPointerBlockRefCountTest() { final block = - IntBlock.fromFunctionPointer(lib, Pointer.fromFunction(_add100, 999)); + IntBlock.fromFunctionPointer(Pointer.fromFunction(_add100, 999)); + expect( + internal_for_testing.blockHasRegisteredClosure(block.pointer), false); expect(lib.getBlockRetainCount(block.pointer.cast()), 1); return block.pointer.cast(); } @@ -249,19 +246,26 @@ void main() { }); Pointer funcBlockRefCountTest() { - final block = IntBlock.fromFunction(lib, makeAdder(4000)); + final block = IntBlock.fromFunction(makeAdder(4000)); + expect( + internal_for_testing.blockHasRegisteredClosure(block.pointer), true); expect(lib.getBlockRetainCount(block.pointer.cast()), 1); return block.pointer.cast(); } - test('Function block ref counting', () { + test('Function block ref counting', () async { final rawBlock = funcBlockRefCountTest(); doGC(); + await Future.delayed(Duration.zero); // Let dispose message arrive. expect(lib.getBlockRetainCount(rawBlock), 0); + expect(internal_for_testing.blockHasRegisteredClosure(rawBlock.cast()), + false); }); Pointer blockManualRetainRefCountTest() { - final block = IntBlock.fromFunction(lib, makeAdder(4000)); + final block = IntBlock.fromFunction(makeAdder(4000)); + expect( + internal_for_testing.blockHasRegisteredClosure(block.pointer), true); expect(lib.getBlockRetainCount(block.pointer.cast()), 1); final rawBlock = block.retainAndReturnPointer().cast(); expect(lib.getBlockRetainCount(rawBlock.cast()), 2); @@ -269,27 +273,30 @@ void main() { } int blockManualRetainRefCountTest2(Pointer rawBlock) { - final block = IntBlock.castFromPointer(lib, rawBlock.cast(), + final block = IntBlock.castFromPointer(rawBlock.cast(), retain: false, release: true); return lib.getBlockRetainCount(block.pointer.cast()); } - test('Block ref counting with manual retain and release', () { + test('Block ref counting with manual retain and release', () async { final rawBlock = blockManualRetainRefCountTest(); doGC(); expect(lib.getBlockRetainCount(rawBlock), 1); expect(blockManualRetainRefCountTest2(rawBlock), 1); doGC(); + await Future.delayed(Duration.zero); // Let dispose message arrive. expect(lib.getBlockRetainCount(rawBlock), 0); + expect(internal_for_testing.blockHasRegisteredClosure(rawBlock.cast()), + false); }); (Pointer, Pointer, Pointer) blockBlockDartCallRefCountTest() { - final inputBlock = IntBlock.fromFunction(lib, (int x) { + final inputBlock = IntBlock.fromFunction((int x) { return 5 * x; }); - final blockBlock = BlockBlock.fromFunction(lib, (IntBlock intBlock) { - return IntBlock.fromFunction(lib, (int x) { + final blockBlock = BlockBlock.fromFunction((IntBlock intBlock) { + return IntBlock.fromFunction((int x) { return 3 * intBlock(x); }); }); @@ -326,13 +333,13 @@ void main() { (Pointer, Pointer, Pointer) blockBlockObjCCallRefCountTest() { late Pointer inputBlock; - final blockBlock = BlockBlock.fromFunction(lib, (IntBlock intBlock) { + final blockBlock = BlockBlock.fromFunction((IntBlock intBlock) { inputBlock = intBlock.pointer.cast(); - return IntBlock.fromFunction(lib, (int x) { + return IntBlock.fromFunction((int x) { return 3 * intBlock(x); }); }); - final outputBlock = BlockTester.newBlock_withMult_(lib, blockBlock, 2); + final outputBlock = BlockTester.newBlock_withMult_(blockBlock, 2); expect(outputBlock(1), 6); doGC(); @@ -361,10 +368,10 @@ void main() { (Pointer, Pointer, Pointer) nativeBlockBlockDartCallRefCountTest() { - final inputBlock = IntBlock.fromFunction(lib, (int x) { + final inputBlock = IntBlock.fromFunction((int x) { return 5 * x; }); - final blockBlock = BlockTester.newBlockBlock_(lib, 7); + final blockBlock = BlockTester.newBlockBlock_(7); final outputBlock = blockBlock(inputBlock); expect(outputBlock(1), 35); doGC(); @@ -392,8 +399,8 @@ void main() { }); (Pointer, Pointer) nativeBlockBlockObjCCallRefCountTest() { - final blockBlock = BlockTester.newBlockBlock_(lib, 7); - final outputBlock = BlockTester.newBlock_withMult_(lib, blockBlock, 2); + final blockBlock = BlockTester.newBlockBlock_(7); + final outputBlock = BlockTester.newBlock_withMult_(blockBlock, 2); expect(outputBlock(1), 14); doGC(); @@ -415,11 +422,11 @@ void main() { inputCounter.value = 0; outputCounter.value = 0; - final block = ObjectBlock.fromFunction(lib, (DummyObject x) { - return DummyObject.newWithCounter_(lib, outputCounter); + final block = ObjectBlock.fromFunction((DummyObject x) { + return DummyObject.newWithCounter_(outputCounter); }); - final inputObj = DummyObject.newWithCounter_(lib, inputCounter); + final inputObj = DummyObject.newWithCounter_(inputCounter); final outputObj = block(inputObj); expect(inputCounter.value, 1); expect(outputCounter.value, 1); @@ -443,12 +450,12 @@ void main() { inputCounter.value = 0; outputCounter.value = 0; - final block = ObjectBlock.fromFunction(lib, (DummyObject x) { + final block = ObjectBlock.fromFunction((DummyObject x) { x.setCounter_(inputCounter); - return DummyObject.newWithCounter_(lib, outputCounter); + return DummyObject.newWithCounter_(outputCounter); }); - final outputObj = BlockTester.callObjectBlock_(lib, block); + final outputObj = BlockTester.callObjectBlock_(block); expect(inputCounter.value, 1); expect(outputCounter.value, 1); @@ -472,7 +479,7 @@ void main() { }); test('Block fields have sensible values', () { - final block = IntBlock.fromFunction(lib, makeAdder(4000)); + final block = IntBlock.fromFunction(makeAdder(4000)); final blockPtr = block.pointer; expect(blockPtr.ref.isa, isNot(0)); expect(blockPtr.ref.flags, isNot(0)); // Set by Block_copy. @@ -483,7 +490,7 @@ void main() { expect(descPtr.ref.reserved, 0); expect(descPtr.ref.size, isNot(0)); expect(descPtr.ref.copy_helper, nullptr); - expect(descPtr.ref.dispose_helper, nullptr); + expect(descPtr.ref.dispose_helper, isNot(nullptr)); expect(descPtr.ref.signature, nullptr); }); }); diff --git a/pkgs/ffigen/test/native_objc_test/cast_config.yaml b/pkgs/ffigen/test/native_objc_test/cast_config.yaml index af3394113d..ff5b3faac0 100644 --- a/pkgs/ffigen/test/native_objc_test/cast_config.yaml +++ b/pkgs/ffigen/test/native_objc_test/cast_config.yaml @@ -10,4 +10,4 @@ headers: entry-points: - 'cast_test.m' preamble: | - // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field + // ignore_for_file: camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field diff --git a/pkgs/ffigen/test/native_objc_test/cast_test.dart b/pkgs/ffigen/test/native_objc_test/cast_test.dart index c63d940375..aa765d67b0 100644 --- a/pkgs/ffigen/test/native_objc_test/cast_test.dart +++ b/pkgs/ffigen/test/native_objc_test/cast_test.dart @@ -9,6 +9,7 @@ import 'dart:ffi'; import 'dart:io'; +import 'package:objective_c/objective_c.dart'; import 'package:test/test.dart'; import '../test_utils.dart'; import 'cast_bindings.dart'; @@ -16,15 +17,16 @@ import 'util.dart'; void main() { Castaway? testInstance; - late CastTestObjCLibrary lib; group('cast', () { setUpAll(() { logWarnings(); + // TODO(https://github.com/dart-lang/native/issues/1068): Remove this. + DynamicLibrary.open('../objective_c/test/objective_c.dylib'); final dylib = File('test/native_objc_test/cast_test.dylib'); verifySetupFile(dylib); - lib = CastTestObjCLibrary(DynamicLibrary.open(dylib.absolute.path)); - testInstance = Castaway.new1(lib); + DynamicLibrary.open(dylib.absolute.path); + testInstance = Castaway.new1(); generateBindingsForCoverage('cast'); }); @@ -35,8 +37,8 @@ void main() { test('castFromPointer', () { final meAsInt = testInstance!.meAsInt(); - final fromCast = Castaway.castFromPointer( - lib, Pointer.fromAddress(meAsInt)); + final fromCast = + Castaway.castFromPointer(Pointer.fromAddress(meAsInt)); expect(fromCast, testInstance!); }); @@ -47,16 +49,16 @@ void main() { test('equality equals', () { final meAsInt = testInstance!.meAsInt(); - final fromCast = Castaway.castFromPointer( - lib, Pointer.fromAddress(meAsInt)); + final fromCast = + Castaway.castFromPointer(Pointer.fromAddress(meAsInt)); expect(fromCast, testInstance!); }); test('equality not equals', () { final meAsInt = testInstance!.meAsInt(); - final fromCast = Castaway.castFromPointer( - lib, Pointer.fromAddress(meAsInt)); - expect(fromCast, isNot(equals(NSObject.new1(lib)))); + final fromCast = + Castaway.castFromPointer(Pointer.fromAddress(meAsInt)); + expect(fromCast, isNot(equals(NSObject.new1()))); }); }); } diff --git a/pkgs/ffigen/test/native_objc_test/category_config.yaml b/pkgs/ffigen/test/native_objc_test/category_config.yaml index 5c74e1a541..5c267388ea 100644 --- a/pkgs/ffigen/test/native_objc_test/category_config.yaml +++ b/pkgs/ffigen/test/native_objc_test/category_config.yaml @@ -12,4 +12,4 @@ headers: # Include it twice, as a regression test for #353 - 'category_test.m' preamble: | - // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field + // ignore_for_file: camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field diff --git a/pkgs/ffigen/test/native_objc_test/category_test.dart b/pkgs/ffigen/test/native_objc_test/category_test.dart index a424c46e4b..c2a8ce8dfd 100644 --- a/pkgs/ffigen/test/native_objc_test/category_test.dart +++ b/pkgs/ffigen/test/native_objc_test/category_test.dart @@ -15,15 +15,16 @@ import 'util.dart'; void main() { late Thing testInstance; - late CategoryTestObjCLibrary lib; group('categories', () { setUpAll(() { logWarnings(); + // TODO(https://github.com/dart-lang/native/issues/1068): Remove this. + DynamicLibrary.open('../objective_c/test/objective_c.dylib'); final dylib = File('test/native_objc_test/category_test.dylib'); verifySetupFile(dylib); - lib = CategoryTestObjCLibrary(DynamicLibrary.open(dylib.absolute.path)); - testInstance = Thing.new1(lib); + DynamicLibrary.open(dylib.absolute.path); + testInstance = Thing.new1(); generateBindingsForCoverage('category'); }); diff --git a/pkgs/ffigen/test/native_objc_test/failed_to_load_config.yaml b/pkgs/ffigen/test/native_objc_test/failed_to_load_config.yaml index c96702d809..cdd7a2d993 100644 --- a/pkgs/ffigen/test/native_objc_test/failed_to_load_config.yaml +++ b/pkgs/ffigen/test/native_objc_test/failed_to_load_config.yaml @@ -10,4 +10,4 @@ headers: entry-points: - 'failed_to_load_test.m' preamble: | - // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field + // ignore_for_file: camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field diff --git a/pkgs/ffigen/test/native_objc_test/failed_to_load_test.dart b/pkgs/ffigen/test/native_objc_test/failed_to_load_test.dart index 8d1bb70917..d0ca5711ff 100644 --- a/pkgs/ffigen/test/native_objc_test/failed_to_load_test.dart +++ b/pkgs/ffigen/test/native_objc_test/failed_to_load_test.dart @@ -5,9 +5,6 @@ // Objective C support is only available on mac. @TestOn('mac-os') -import 'dart:ffi'; -import 'dart:io'; - import 'package:test/test.dart'; import '../test_utils.dart'; import 'failed_to_load_bindings.dart'; @@ -21,14 +18,11 @@ void main() { }); test('Failed to load Objective-C class', () { - // Load from the host executable, which is missing all the classes for - // this test, but has the core ObjC functions, such as objc_getClass. The - // library should load ok, because the classes are lazy loaded. - final lib = FailedToLoadTestObjCLibrary(DynamicLibrary.executable()); - - // But when we try to instantiate one of the classes, we get an error. + // We haven't DynamicLibrary.open'd the dylib containing this class. The + // core functions like objc_getClass are defined in the Dart executable, + // so we can use objc_getClass, but it can't locate this class. expect( - () => ClassThatWillFailToLoad.new1(lib), + () => ClassThatWillFailToLoad.new1(), throwsA(predicate( (e) => e.toString().contains('ClassThatWillFailToLoad')))); }); diff --git a/pkgs/ffigen/test/native_objc_test/forward_decl_config.yaml b/pkgs/ffigen/test/native_objc_test/forward_decl_config.yaml index 7a5c815fc2..0c7b33fbbf 100644 --- a/pkgs/ffigen/test/native_objc_test/forward_decl_config.yaml +++ b/pkgs/ffigen/test/native_objc_test/forward_decl_config.yaml @@ -11,4 +11,4 @@ headers: - 'forward_decl_test.h' - 'forward_decl_test.m' preamble: | - // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field + // ignore_for_file: camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field diff --git a/pkgs/ffigen/test/native_objc_test/forward_decl_test.dart b/pkgs/ffigen/test/native_objc_test/forward_decl_test.dart index 4a06516589..9f5b91561d 100644 --- a/pkgs/ffigen/test/native_objc_test/forward_decl_test.dart +++ b/pkgs/ffigen/test/native_objc_test/forward_decl_test.dart @@ -14,20 +14,19 @@ import 'forward_decl_bindings.dart'; import 'util.dart'; void main() { - late ForwardDeclTestObjCLibrary lib; - group('forward decl', () { setUpAll(() { logWarnings(); + // TODO(https://github.com/dart-lang/native/issues/1068): Remove this. + DynamicLibrary.open('../objective_c/test/objective_c.dylib'); final dylib = File('test/native_objc_test/forward_decl_test.dylib'); verifySetupFile(dylib); - lib = - ForwardDeclTestObjCLibrary(DynamicLibrary.open(dylib.absolute.path)); + DynamicLibrary.open(dylib.absolute.path); generateBindingsForCoverage('forward_decl'); }); test('Forward declared class', () { - expect(ForwardDeclaredClass.get123(lib), 123); + expect(ForwardDeclaredClass.get123(), 123); }); }); } diff --git a/pkgs/ffigen/test/native_objc_test/inherited_instancetype_config.yaml b/pkgs/ffigen/test/native_objc_test/inherited_instancetype_config.yaml index 926197921e..0a26d8bced 100644 --- a/pkgs/ffigen/test/native_objc_test/inherited_instancetype_config.yaml +++ b/pkgs/ffigen/test/native_objc_test/inherited_instancetype_config.yaml @@ -10,4 +10,4 @@ headers: entry-points: - 'inherited_instancetype_test.m' preamble: | - // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field + // ignore_for_file: camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field diff --git a/pkgs/ffigen/test/native_objc_test/inherited_instancetype_test.dart b/pkgs/ffigen/test/native_objc_test/inherited_instancetype_test.dart index 93f93556d6..95cacf0f54 100644 --- a/pkgs/ffigen/test/native_objc_test/inherited_instancetype_test.dart +++ b/pkgs/ffigen/test/native_objc_test/inherited_instancetype_test.dart @@ -16,21 +16,20 @@ import 'inherited_instancetype_bindings.dart'; import 'util.dart'; void main() { - late InheritedInstancetypeTestObjCLibrary lib; - group('inheritedInstancetype', () { setUpAll(() { logWarnings(); + // TODO(https://github.com/dart-lang/native/issues/1068): Remove this. + DynamicLibrary.open('../objective_c/test/objective_c.dylib'); final dylib = File('test/native_objc_test/inherited_instancetype_test.dylib'); verifySetupFile(dylib); - lib = InheritedInstancetypeTestObjCLibrary( - DynamicLibrary.open(dylib.absolute.path)); + DynamicLibrary.open(dylib.absolute.path); generateBindingsForCoverage('inherited_instancetype'); }); test('Ordinary init method', () { - final ChildClass child = ChildClass.alloc(lib).init(); + final ChildClass child = ChildClass.alloc().init(); expect(child.field, 123); final ChildClass sameChild = child.getSelf(); sameChild.field = 456; @@ -38,7 +37,7 @@ void main() { }); test('Custom create method', () { - final ChildClass child = ChildClass.create(lib); + final ChildClass child = ChildClass.create(); expect(child.field, 123); final ChildClass sameChild = child.getSelf(); sameChild.field = 456; @@ -46,7 +45,7 @@ void main() { }); test('Polymorphism', () { - final ChildClass child = ChildClass.alloc(lib).init(); + final ChildClass child = ChildClass.alloc().init(); final BaseClass base = child; // Calling base.getSelf() should still go through ChildClass.getSelf, so diff --git a/pkgs/ffigen/test/native_objc_test/is_instance_config.yaml b/pkgs/ffigen/test/native_objc_test/is_instance_config.yaml index 2673c0bab4..bae5136ef0 100644 --- a/pkgs/ffigen/test/native_objc_test/is_instance_config.yaml +++ b/pkgs/ffigen/test/native_objc_test/is_instance_config.yaml @@ -11,4 +11,4 @@ headers: entry-points: - 'is_instance_test.m' preamble: | - // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field + // ignore_for_file: camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field diff --git a/pkgs/ffigen/test/native_objc_test/is_instance_test.dart b/pkgs/ffigen/test/native_objc_test/is_instance_test.dart index bbbfee9238..183134002e 100644 --- a/pkgs/ffigen/test/native_objc_test/is_instance_test.dart +++ b/pkgs/ffigen/test/native_objc_test/is_instance_test.dart @@ -9,26 +9,28 @@ import 'dart:ffi'; import 'dart:io'; +import 'package:objective_c/objective_c.dart'; import 'package:test/test.dart'; + import '../test_utils.dart'; import 'is_instance_bindings.dart'; import 'util.dart'; void main() { - late IsInstanceTestObjCLibrary lib; - group('isInstance', () { setUpAll(() { logWarnings(); + // TODO(https://github.com/dart-lang/native/issues/1068): Remove this. + DynamicLibrary.open('../objective_c/test/objective_c.dylib'); final dylib = File('test/native_objc_test/is_instance_test.dylib'); verifySetupFile(dylib); - lib = IsInstanceTestObjCLibrary(DynamicLibrary.open(dylib.absolute.path)); + DynamicLibrary.open(dylib.absolute.path); generateBindingsForCoverage('is_instance'); }); test('Unrelated classes', () { - final base = NSObject.castFrom(BaseClass.new1(lib)); - final unrelated = NSObject.castFrom(UnrelatedClass.new1(lib)); + final base = NSObject.castFrom(BaseClass.new1()); + final unrelated = NSObject.castFrom(UnrelatedClass.new1()); expect(BaseClass.isInstance(base), isTrue); expect(BaseClass.isInstance(unrelated), isFalse); expect(UnrelatedClass.isInstance(base), isFalse); @@ -36,8 +38,8 @@ void main() { }); test('Base class vs child class', () { - final base = NSObject.castFrom(BaseClass.new1(lib)); - final child = NSObject.castFrom(ChildClass.new1(lib)); + final base = NSObject.castFrom(BaseClass.new1()); + final child = NSObject.castFrom(ChildClass.new1()); expect(BaseClass.isInstance(base), isTrue); expect(BaseClass.isInstance(child), isTrue); expect(ChildClass.isInstance(base), isFalse); diff --git a/pkgs/ffigen/test/native_objc_test/method_config.yaml b/pkgs/ffigen/test/native_objc_test/method_config.yaml index 969ab7cf3e..4d09ef519c 100644 --- a/pkgs/ffigen/test/native_objc_test/method_config.yaml +++ b/pkgs/ffigen/test/native_objc_test/method_config.yaml @@ -10,4 +10,4 @@ headers: entry-points: - 'method_test.m' preamble: | - // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field + // ignore_for_file: camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field diff --git a/pkgs/ffigen/test/native_objc_test/method_test.dart b/pkgs/ffigen/test/native_objc_test/method_test.dart index 21ba7e061f..c6cb15988c 100644 --- a/pkgs/ffigen/test/native_objc_test/method_test.dart +++ b/pkgs/ffigen/test/native_objc_test/method_test.dart @@ -16,15 +16,16 @@ import 'util.dart'; void main() { late MethodInterface testInstance; - late MethodTestObjCLibrary lib; group('method calls', () { setUpAll(() { logWarnings(); + // TODO(https://github.com/dart-lang/native/issues/1068): Remove this. + DynamicLibrary.open('../objective_c/test/objective_c.dylib'); final dylib = File('test/native_objc_test/method_test.dylib'); verifySetupFile(dylib); - lib = MethodTestObjCLibrary(DynamicLibrary.open(dylib.absolute.path)); - testInstance = MethodInterface.new1(lib); + DynamicLibrary.open(dylib.absolute.path); + testInstance = MethodInterface.new1(); generateBindingsForCoverage('method'); }); @@ -48,19 +49,19 @@ void main() { group('Class methods', () { test('No arguments', () { - expect(MethodInterface.sub(lib), -5); + expect(MethodInterface.sub(), -5); }); test('One argument', () { - expect(MethodInterface.sub_(lib, 7), -7); + expect(MethodInterface.sub_(7), -7); }); test('Two arguments', () { - expect(MethodInterface.sub_Y_(lib, 7, 3), -10); + expect(MethodInterface.sub_Y_(7, 3), -10); }); test('Three arguments', () { - expect(MethodInterface.sub_Y_Z_(lib, 10, 7, 3), -20); + expect(MethodInterface.sub_Y_Z_(10, 7, 3), -20); }); }); diff --git a/pkgs/ffigen/test/native_objc_test/native_objc_config.yaml b/pkgs/ffigen/test/native_objc_test/native_objc_config.yaml index 58bcf5016c..0da292f6f3 100644 --- a/pkgs/ffigen/test/native_objc_test/native_objc_config.yaml +++ b/pkgs/ffigen/test/native_objc_test/native_objc_config.yaml @@ -18,4 +18,4 @@ headers: entry-points: - 'native_objc_test.m' preamble: | - // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field + // ignore_for_file: camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field diff --git a/pkgs/ffigen/test/native_objc_test/native_objc_test.dart b/pkgs/ffigen/test/native_objc_test/native_objc_test.dart index 28c006a367..711a59749e 100644 --- a/pkgs/ffigen/test/native_objc_test/native_objc_test.dart +++ b/pkgs/ffigen/test/native_objc_test/native_objc_test.dart @@ -8,25 +8,27 @@ import 'dart:ffi'; import 'dart:io'; +import 'package:objective_c/objective_c.dart'; import 'package:test/test.dart'; import '../test_utils.dart'; import 'native_objc_test_bindings.dart'; import 'util.dart'; void main() { - late NativeObjCLibrary lib; group('native_objc_test', () { setUpAll(() { logWarnings(); + // TODO(https://github.com/dart-lang/native/issues/1068): Remove this. + DynamicLibrary.open('../objective_c/test/objective_c.dylib'); final dylib = File('test/native_objc_test/native_objc_test.dylib'); verifySetupFile(dylib); - lib = NativeObjCLibrary(DynamicLibrary.open(dylib.absolute.path)); + DynamicLibrary.open(dylib.absolute.path); generateBindingsForCoverage('native_objc'); }); test('Basic types', () { - final foo = Foo.new1(lib); - final obj = NSObject.new1(lib); + final foo = Foo.new1(); + final obj = NSObject.new1(); foo.intVal = 123; expect(foo.intVal, 123); @@ -37,7 +39,7 @@ void main() { foo.idVal = obj; expect(foo.idVal, obj); - foo.selVal = Pointer.fromAddress(456); + foo.selVal = Pointer.fromAddress(456); expect(foo.selVal.address, 456); foo.classVal = obj; @@ -45,8 +47,8 @@ void main() { }); test('Interface basics, with Foo', () { - final foo1 = Foo.makeFoo_(lib, 3.14159); - final foo2 = Foo.makeFoo_(lib, 2.71828); + final foo1 = Foo.makeFoo_(3.14159); + final foo2 = Foo.makeFoo_(2.71828); expect(foo1.intVal, 3); expect(foo2.intVal, 2); diff --git a/pkgs/ffigen/test/native_objc_test/nullable_config.yaml b/pkgs/ffigen/test/native_objc_test/nullable_config.yaml index eba9e77060..6818337d4c 100644 --- a/pkgs/ffigen/test/native_objc_test/nullable_config.yaml +++ b/pkgs/ffigen/test/native_objc_test/nullable_config.yaml @@ -10,4 +10,4 @@ headers: entry-points: - 'nullable_test.m' preamble: | - // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field + // ignore_for_file: camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field diff --git a/pkgs/ffigen/test/native_objc_test/nullable_inheritance_config.yaml b/pkgs/ffigen/test/native_objc_test/nullable_inheritance_config.yaml index 930a53129b..f5d95d1994 100644 --- a/pkgs/ffigen/test/native_objc_test/nullable_inheritance_config.yaml +++ b/pkgs/ffigen/test/native_objc_test/nullable_inheritance_config.yaml @@ -11,4 +11,4 @@ headers: entry-points: - 'nullable_inheritance_test.m' preamble: | - // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field + // ignore_for_file: camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field diff --git a/pkgs/ffigen/test/native_objc_test/nullable_inheritance_test.dart b/pkgs/ffigen/test/native_objc_test/nullable_inheritance_test.dart index fd3052ce79..6c5df3f110 100644 --- a/pkgs/ffigen/test/native_objc_test/nullable_inheritance_test.dart +++ b/pkgs/ffigen/test/native_objc_test/nullable_inheritance_test.dart @@ -8,27 +8,29 @@ import 'dart:ffi'; import 'dart:io'; +import 'package:objective_c/objective_c.dart'; import 'package:test/test.dart'; + import '../test_utils.dart'; import 'nullable_inheritance_bindings.dart'; import 'util.dart'; void main() { - late NullableInheritanceTestObjCLibrary lib; late NullableBase nullableBase; late NullableChild nullableChild; late NSObject obj; group('Nullable inheritance', () { setUpAll(() { logWarnings(); + // TODO(https://github.com/dart-lang/native/issues/1068): Remove this. + DynamicLibrary.open('../objective_c/test/objective_c.dylib'); final dylib = File('test/native_objc_test/nullable_inheritance_test.dylib'); verifySetupFile(dylib); - lib = NullableInheritanceTestObjCLibrary( - DynamicLibrary.open(dylib.absolute.path)); - nullableBase = NullableBase.new1(lib); - nullableChild = NullableChild.new1(lib); - obj = NSObject.new1(lib); + DynamicLibrary.open(dylib.absolute.path); + nullableBase = NullableBase.new1(); + nullableChild = NullableChild.new1(); + obj = NSObject.new1(); generateBindingsForCoverage('nullable'); }); diff --git a/pkgs/ffigen/test/native_objc_test/nullable_test.dart b/pkgs/ffigen/test/native_objc_test/nullable_test.dart index b264531dd8..6b184095da 100644 --- a/pkgs/ffigen/test/native_objc_test/nullable_test.dart +++ b/pkgs/ffigen/test/native_objc_test/nullable_test.dart @@ -8,23 +8,26 @@ import 'dart:ffi'; import 'dart:io'; +import 'package:objective_c/objective_c.dart'; import 'package:test/test.dart'; + import '../test_utils.dart'; import 'nullable_bindings.dart'; import 'util.dart'; void main() { - late NullableTestObjCLibrary lib; late NullableInterface nullableInterface; late NSObject obj; group('Nullability', () { setUpAll(() { logWarnings(); + // TODO(https://github.com/dart-lang/native/issues/1068): Remove this. + DynamicLibrary.open('../objective_c/test/objective_c.dylib'); final dylib = File('test/native_objc_test/nullable_test.dylib'); verifySetupFile(dylib); - lib = NullableTestObjCLibrary(DynamicLibrary.open(dylib.absolute.path)); - nullableInterface = NullableInterface.new1(lib); - obj = NSObject.new1(lib); + DynamicLibrary.open(dylib.absolute.path); + nullableInterface = NullableInterface.new1(); + obj = NSObject.new1(); generateBindingsForCoverage('nullable'); }); @@ -41,34 +44,31 @@ void main() { group('Nullable return', () { test('Not null', () { - expect(NullableInterface.returnNil_(lib, false), isA()); + expect(NullableInterface.returnNil_(false), isA()); }); test('Null', () { - expect(NullableInterface.returnNil_(lib, true), null); + expect(NullableInterface.returnNil_(true), null); }); }); group('Nullable arguments', () { test('Not null', () { - expect( - NullableInterface.isNullWithNullableNSObjectArg_(lib, obj), false); + expect(NullableInterface.isNullWithNullableNSObjectArg_(obj), false); }); test('Null', () { - expect( - NullableInterface.isNullWithNullableNSObjectArg_(lib, null), true); + expect(NullableInterface.isNullWithNullableNSObjectArg_(null), true); }); }); group('Not-nullable arguments', () { test('Not null', () { - expect(NullableInterface.isNullWithNotNullableNSObjectPtrArg_(lib, obj), - false); + expect( + NullableInterface.isNullWithNotNullableNSObjectPtrArg_(obj), false); }); test('Explicit non null', () { expect( - NullableInterface.isNullWithExplicitNonNullableNSObjectPtrArg_( - lib, obj), + NullableInterface.isNullWithExplicitNonNullableNSObjectPtrArg_(obj), false); }); }); diff --git a/pkgs/ffigen/test/native_objc_test/property_config.yaml b/pkgs/ffigen/test/native_objc_test/property_config.yaml index 220a83a30a..b3b7b0adee 100644 --- a/pkgs/ffigen/test/native_objc_test/property_config.yaml +++ b/pkgs/ffigen/test/native_objc_test/property_config.yaml @@ -10,4 +10,4 @@ headers: entry-points: - 'property_test.m' preamble: | - // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field + // ignore_for_file: camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field diff --git a/pkgs/ffigen/test/native_objc_test/property_test.dart b/pkgs/ffigen/test/native_objc_test/property_test.dart index 9bd4f3c682..fe0b0addd1 100644 --- a/pkgs/ffigen/test/native_objc_test/property_test.dart +++ b/pkgs/ffigen/test/native_objc_test/property_test.dart @@ -16,15 +16,16 @@ import 'util.dart'; void main() { late PropertyInterface testInstance; - late PropertyTestObjCLibrary lib; group('properties', () { setUpAll(() { logWarnings(); + // TODO(https://github.com/dart-lang/native/issues/1068): Remove this. + DynamicLibrary.open('../objective_c/test/objective_c.dylib'); final dylib = File('test/native_objc_test/property_test.dylib'); verifySetupFile(dylib); - lib = PropertyTestObjCLibrary(DynamicLibrary.open(dylib.absolute.path)); - testInstance = PropertyInterface.new1(lib); + DynamicLibrary.open(dylib.absolute.path); + testInstance = PropertyInterface.new1(); generateBindingsForCoverage('property'); }); @@ -41,12 +42,12 @@ void main() { group('class properties', () { test('read-only property', () { - expect(PropertyInterface.getClassReadOnlyProperty(lib), 42); + expect(PropertyInterface.getClassReadOnlyProperty(), 42); }); test('read-write property', () { - PropertyInterface.setClassReadWriteProperty(lib, 101); - expect(PropertyInterface.getClassReadWriteProperty(lib), 101); + PropertyInterface.setClassReadWriteProperty(101); + expect(PropertyInterface.getClassReadWriteProperty(), 101); }); }); diff --git a/pkgs/ffigen/test/native_objc_test/rename_config.yaml b/pkgs/ffigen/test/native_objc_test/rename_config.yaml index 8dbae035ed..4f80f56dc0 100644 --- a/pkgs/ffigen/test/native_objc_test/rename_config.yaml +++ b/pkgs/ffigen/test/native_objc_test/rename_config.yaml @@ -20,4 +20,4 @@ headers: entry-points: - 'rename_test.m' preamble: | - // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field + // ignore_for_file: camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field diff --git a/pkgs/ffigen/test/native_objc_test/rename_test.dart b/pkgs/ffigen/test/native_objc_test/rename_test.dart index aa8a23f78d..451f934dcb 100644 --- a/pkgs/ffigen/test/native_objc_test/rename_test.dart +++ b/pkgs/ffigen/test/native_objc_test/rename_test.dart @@ -14,18 +14,19 @@ import 'rename_test_bindings.dart'; import 'util.dart'; void main() { - late RenameLibrary lib; group('rename_test', () { setUpAll(() { logWarnings(); + // TODO(https://github.com/dart-lang/native/issues/1068): Remove this. + DynamicLibrary.open('../objective_c/test/objective_c.dylib'); final dylib = File('test/native_objc_test/rename_test.dylib'); verifySetupFile(dylib); - lib = RenameLibrary(DynamicLibrary.open(dylib.absolute.path)); + DynamicLibrary.open(dylib.absolute.path); generateBindingsForCoverage('rename'); }); test('Renamed class', () { - final renamed = Renamed.new1(lib); + final renamed = Renamed.new1(); renamed.property = 123; expect(renamed.property, 123); }); diff --git a/pkgs/ffigen/test/native_objc_test/setup.dart b/pkgs/ffigen/test/native_objc_test/setup.dart index 8e74d878dd..faa2d43292 100644 --- a/pkgs/ffigen/test/native_objc_test/setup.dart +++ b/pkgs/ffigen/test/native_objc_test/setup.dart @@ -48,21 +48,24 @@ Future _buildSwift( print('Generated files: $outputHeader and $outputLib'); } -Future _generateBindings(String config) async { - final args = [ - 'run', - 'ffigen', - '--config', - 'test/native_objc_test/$config', - ]; +Future _runDart(List args) async { final process = await Process.start(Platform.executable, args, workingDirectory: '../..'); unawaited(stdout.addStream(process.stdout)); unawaited(stderr.addStream(process.stderr)); final result = await process.exitCode; if (result != 0) { - throw ProcessException('dart', args, 'Generating bindings', result); + throw ProcessException('dart', args, 'Running Dart command', result); } +} + +Future _generateBindings(String config) async { + await _runDart([ + 'run', + 'ffigen', + '--config', + 'test/native_objc_test/$config', + ]); print('Generated bindings for: $config'); } @@ -129,5 +132,6 @@ Future main(List arguments) async { return await clean(_getTestNames()); } + await _runDart(['../objective_c/test/setup.dart']); return await build(arguments.isNotEmpty ? arguments : _getTestNames()); } diff --git a/pkgs/ffigen/test/native_objc_test/static_func_config.yaml b/pkgs/ffigen/test/native_objc_test/static_func_config.yaml index bbafeaa78b..8ec7b4213c 100644 --- a/pkgs/ffigen/test/native_objc_test/static_func_config.yaml +++ b/pkgs/ffigen/test/native_objc_test/static_func_config.yaml @@ -15,4 +15,4 @@ headers: entry-points: - 'static_func_test.m' preamble: | - // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field + // ignore_for_file: camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field diff --git a/pkgs/ffigen/test/native_objc_test/static_func_native_config.yaml b/pkgs/ffigen/test/native_objc_test/static_func_native_config.yaml index 2a591c9f70..9b5406af23 100644 --- a/pkgs/ffigen/test/native_objc_test/static_func_native_config.yaml +++ b/pkgs/ffigen/test/native_objc_test/static_func_native_config.yaml @@ -16,4 +16,4 @@ headers: entry-points: - 'static_func_test.m' preamble: | - // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field + // ignore_for_file: camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field diff --git a/pkgs/ffigen/test/native_objc_test/static_func_native_test.dart b/pkgs/ffigen/test/native_objc_test/static_func_native_test.dart index 93cbcad749..a8f6777792 100644 --- a/pkgs/ffigen/test/native_objc_test/static_func_native_test.dart +++ b/pkgs/ffigen/test/native_objc_test/static_func_native_test.dart @@ -2,6 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +// ignore_for_file: unused_local_variable + // Objective C support is only available on mac. @TestOn('mac-os') @@ -11,8 +13,9 @@ import 'dart:ffi'; import 'dart:io'; -import 'package:test/test.dart'; import 'package:ffi/ffi.dart'; +import 'package:test/test.dart'; + import '../test_utils.dart'; import 'static_func_native_bindings.dart'; import 'util.dart'; @@ -20,38 +23,26 @@ import 'util.dart'; typedef IntBlock = ObjCBlock_Int32_Int32; void main() { - late StaticFuncTestObjCLibrary lib; - late void Function(Pointer, Pointer) executeInternalCommand; - group('static functions', () { setUpAll(() { logWarnings(); + // TODO(https://github.com/dart-lang/native/issues/1068): Remove this. + DynamicLibrary.open('../objective_c/test/objective_c.dylib'); final dylib = File('test/native_objc_test/static_func_test.dylib'); verifySetupFile(dylib); - lib = StaticFuncTestObjCLibrary(DynamicLibrary.open(dylib.absolute.path)); - - executeInternalCommand = DynamicLibrary.process().lookupFunction< - Void Function(Pointer, Pointer), - void Function( - Pointer, Pointer)>('Dart_ExecuteInternalCommand'); + DynamicLibrary.open(dylib.absolute.path); generateBindingsForCoverage('static_func'); }); - doGC() { - final gcNow = "gc-now".toNativeUtf8(); - executeInternalCommand(gcNow.cast(), nullptr); - calloc.free(gcNow); - } - Pointer staticFuncOfObjectRefCountTest(Allocator alloc) { final counter = alloc(); counter.value = 0; - final obj = StaticFuncTestObj.newWithCounter_(lib, counter); + final obj = StaticFuncTestObj.newWithCounter_(counter); expect(counter.value, 1); - final outputObj = staticFuncOfObject(lib, obj); + final outputObj = staticFuncOfObject(obj); expect(obj, outputObj); expect(counter.value, 1); @@ -70,10 +61,10 @@ void main() { final counter = alloc(); counter.value = 0; - final obj = StaticFuncTestObj.newWithCounter_(lib, counter); + final obj = StaticFuncTestObj.newWithCounter_(counter); expect(counter.value, 1); - final outputObj = staticFuncOfNullableObject(lib, obj); + final outputObj = staticFuncOfNullableObject(obj); expect(obj, outputObj); expect(counter.value, 1); @@ -87,15 +78,15 @@ void main() { doGC(); expect(counter.value, 0); - expect(staticFuncOfNullableObject(lib, null), isNull); + expect(staticFuncOfNullableObject(null), isNull); }); }); Pointer staticFuncOfBlockRefCountTest() { - final block = IntBlock.fromFunction(lib, (int x) => 2 * x); + final block = IntBlock.fromFunction((int x) => 2 * x); expect(getBlockRetainCount(block.pointer.cast()), 1); - final outputBlock = staticFuncOfBlock(lib, block); + final outputBlock = staticFuncOfBlock(block); expect(block, outputBlock); expect(getBlockRetainCount(block.pointer.cast()), 2); @@ -112,7 +103,7 @@ void main() { final counter = alloc(); counter.value = 0; - final outputObj = staticFuncReturnsRetained(lib, counter); + final outputObj = staticFuncReturnsRetained(counter); expect(counter.value, 1); return counter; @@ -133,10 +124,10 @@ void main() { final counter = alloc(); counter.value = 0; - final obj = StaticFuncTestObj.newWithCounter_(lib, counter); + final obj = StaticFuncTestObj.newWithCounter_(counter); expect(counter.value, 1); - final outputObj = staticFuncReturnsRetainedArg(lib, obj); + final outputObj = staticFuncReturnsRetainedArg(obj); expect(obj, outputObj); expect(counter.value, 1); diff --git a/pkgs/ffigen/test/native_objc_test/static_func_test.dart b/pkgs/ffigen/test/native_objc_test/static_func_test.dart index f3d9c01be8..0b6fc21ffe 100644 --- a/pkgs/ffigen/test/native_objc_test/static_func_test.dart +++ b/pkgs/ffigen/test/native_objc_test/static_func_test.dart @@ -2,6 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +// ignore_for_file: unused_local_variable + // Objective C support is only available on mac. @TestOn('mac-os') @@ -11,8 +13,9 @@ import 'dart:ffi'; import 'dart:io'; -import 'package:test/test.dart'; import 'package:ffi/ffi.dart'; +import 'package:test/test.dart'; + import '../test_utils.dart'; import 'static_func_bindings.dart'; import 'util.dart'; @@ -21,34 +24,24 @@ typedef IntBlock = ObjCBlock_Int32_Int32; void main() { late StaticFuncTestObjCLibrary lib; - late void Function(Pointer, Pointer) executeInternalCommand; group('static functions', () { setUpAll(() { logWarnings(); + // TODO(https://github.com/dart-lang/native/issues/1068): Remove this. + DynamicLibrary.open('../objective_c/test/objective_c.dylib'); final dylib = File('test/native_objc_test/static_func_test.dylib'); verifySetupFile(dylib); lib = StaticFuncTestObjCLibrary(DynamicLibrary.open(dylib.absolute.path)); - executeInternalCommand = DynamicLibrary.process().lookupFunction< - Void Function(Pointer, Pointer), - void Function( - Pointer, Pointer)>('Dart_ExecuteInternalCommand'); - generateBindingsForCoverage('static_func'); }); - doGC() { - final gcNow = "gc-now".toNativeUtf8(); - executeInternalCommand(gcNow.cast(), nullptr); - calloc.free(gcNow); - } - Pointer staticFuncOfObjectRefCountTest(Allocator alloc) { final counter = alloc(); counter.value = 0; - final obj = StaticFuncTestObj.newWithCounter_(lib, counter); + final obj = StaticFuncTestObj.newWithCounter_(counter); expect(counter.value, 1); final outputObj = lib.staticFuncOfObject(obj); @@ -70,7 +63,7 @@ void main() { final counter = alloc(); counter.value = 0; - final obj = StaticFuncTestObj.newWithCounter_(lib, counter); + final obj = StaticFuncTestObj.newWithCounter_(counter); expect(counter.value, 1); final outputObj = lib.staticFuncOfNullableObject(obj); @@ -92,7 +85,7 @@ void main() { }); Pointer staticFuncOfBlockRefCountTest() { - final block = IntBlock.fromFunction(lib, (int x) => 2 * x); + final block = IntBlock.fromFunction((int x) => 2 * x); expect(lib.getBlockRetainCount(block.pointer.cast()), 1); final outputBlock = lib.staticFuncOfBlock(block); @@ -133,7 +126,7 @@ void main() { final counter = alloc(); counter.value = 0; - final obj = StaticFuncTestObj.newWithCounter_(lib, counter); + final obj = StaticFuncTestObj.newWithCounter_(counter); expect(counter.value, 1); final outputObj = lib.staticFuncReturnsRetainedArg(obj); diff --git a/pkgs/ffigen/test/native_objc_test/string_config.yaml b/pkgs/ffigen/test/native_objc_test/string_config.yaml index 016b2bd933..35b96a9553 100644 --- a/pkgs/ffigen/test/native_objc_test/string_config.yaml +++ b/pkgs/ffigen/test/native_objc_test/string_config.yaml @@ -10,4 +10,4 @@ headers: entry-points: - 'string_test.m' preamble: | - // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field + // ignore_for_file: camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field diff --git a/pkgs/ffigen/test/native_objc_test/string_test.dart b/pkgs/ffigen/test/native_objc_test/string_test.dart index 068e5ed52e..c5beccd696 100644 --- a/pkgs/ffigen/test/native_objc_test/string_test.dart +++ b/pkgs/ffigen/test/native_objc_test/string_test.dart @@ -8,31 +8,33 @@ import 'dart:ffi'; import 'dart:io'; +import 'package:objective_c/objective_c.dart'; import 'package:test/test.dart'; + import '../test_utils.dart'; import 'string_bindings.dart'; import 'util.dart'; void main() { - late StringTestObjCLibrary lib; - group('string', () { setUpAll(() { logWarnings(); + // TODO(https://github.com/dart-lang/native/issues/1068): Remove this. + DynamicLibrary.open('../objective_c/test/objective_c.dylib'); final dylib = File('test/native_objc_test/string_test.dylib'); verifySetupFile(dylib); - lib = StringTestObjCLibrary(DynamicLibrary.open(dylib.absolute.path)); + DynamicLibrary.open(dylib.absolute.path); generateBindingsForCoverage('string'); }); for (final s in ['Hello', '🇵🇬', 'Embedded\u0000Null']) { test('NSString to/from Dart string [$s]', () { - final ns1 = NSString(lib, s); + final ns1 = NSString(s); expect(ns1.length, s.length); expect(ns1.toString().length, s.length); expect(ns1.toString(), s); - final ns2 = s.toNSString(lib); + final ns2 = s.toNSString(); expect(ns2.length, s.length); expect(ns2.toString().length, s.length); expect(ns2.toString(), s); @@ -40,10 +42,10 @@ void main() { } test('strings usable', () { - final str1 = 'Hello'.toNSString(lib); - final str2 = 'World!'.toNSString(lib); + final str1 = 'Hello'.toNSString(); + final str2 = 'World!'.toNSString(); - final str3 = StringUtil.strConcat_with_(lib, str1, str2); + final str3 = StringUtil.strConcat_with_(str1, str2); expect(str3.length, 11); expect(str3.toString(), "HelloWorld!"); }); diff --git a/pkgs/ffigen/test/native_objc_test/swift_class_config.yaml b/pkgs/ffigen/test/native_objc_test/swift_class_config.yaml index 20bd2881d5..01f96dd13b 100644 --- a/pkgs/ffigen/test/native_objc_test/swift_class_config.yaml +++ b/pkgs/ffigen/test/native_objc_test/swift_class_config.yaml @@ -12,4 +12,4 @@ headers: entry-points: - 'swift_class_test-Swift.h' preamble: | - // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field + // ignore_for_file: camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field diff --git a/pkgs/ffigen/test/native_objc_test/swift_class_test.dart b/pkgs/ffigen/test/native_objc_test/swift_class_test.dart index 09a2714dd3..e91ca95c8e 100644 --- a/pkgs/ffigen/test/native_objc_test/swift_class_test.dart +++ b/pkgs/ffigen/test/native_objc_test/swift_class_test.dart @@ -14,18 +14,19 @@ import 'swift_class_bindings.dart'; import 'util.dart'; void main() { - late SwiftClassTestLibrary lib; group('swift_class_test', () { setUpAll(() { logWarnings(); + // TODO(https://github.com/dart-lang/native/issues/1068): Remove this. + DynamicLibrary.open('../objective_c/test/objective_c.dylib'); final dylib = File('test/native_objc_test/swift_class_test.dylib'); verifySetupFile(dylib); - lib = SwiftClassTestLibrary(DynamicLibrary.open(dylib.absolute.path)); + DynamicLibrary.open(dylib.absolute.path); generateBindingsForCoverage('swift_class'); }); test('Renamed class', () { - final swiftObject = MySwiftClass.new1(lib); + final swiftObject = MySwiftClass.new1(); expect(swiftObject.getValue(), 123); swiftObject.setValueWithX_(456); expect(swiftObject.getValue(), 456); diff --git a/pkgs/ffigen/test/native_objc_test/typedef_config.yaml b/pkgs/ffigen/test/native_objc_test/typedef_config.yaml index f375bfc7d1..a2c273508c 100644 --- a/pkgs/ffigen/test/native_objc_test/typedef_config.yaml +++ b/pkgs/ffigen/test/native_objc_test/typedef_config.yaml @@ -14,4 +14,4 @@ headers: entry-points: - 'typedef_test.m' preamble: | - // ignore_for_file: camel_case_types, non_constant_identifier_names, unused_element, unused_field + // ignore_for_file: camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field diff --git a/pkgs/ffigen/test/native_objc_test/typedef_test.dart b/pkgs/ffigen/test/native_objc_test/typedef_test.dart index 7a47fdb835..af12934c3f 100644 --- a/pkgs/ffigen/test/native_objc_test/typedef_test.dart +++ b/pkgs/ffigen/test/native_objc_test/typedef_test.dart @@ -14,21 +14,21 @@ import 'typedef_bindings.dart'; import 'util.dart'; void main() { - late TypedefTestObjCLibrary lib; - group('typedef', () { setUpAll(() { logWarnings(); + // TODO(https://github.com/dart-lang/native/issues/1068): Remove this. + DynamicLibrary.open('../objective_c/test/objective_c.dylib'); final dylib = File('test/native_objc_test/typedef_test.dylib'); verifySetupFile(dylib); - lib = TypedefTestObjCLibrary(DynamicLibrary.open(dylib.absolute.path)); + DynamicLibrary.open(dylib.absolute.path); generateBindingsForCoverage('typedef'); }); test('Regression test for #386', () { // https://github.com/dart-lang/ffigen/issues/386 // Make sure that the typedef DartSomeClassPtr is for SomeClass. - final DartSomeClassPtr instance = SomeClass.new1(lib); + final DartSomeClassPtr instance = SomeClass.new1(); expect(instance.pointer, isNot(nullptr)); }); }); diff --git a/pkgs/ffigen/test/native_objc_test/util.dart b/pkgs/ffigen/test/native_objc_test/util.dart index 7ef14bf625..ead45b8447 100644 --- a/pkgs/ffigen/test/native_objc_test/util.dart +++ b/pkgs/ffigen/test/native_objc_test/util.dart @@ -2,11 +2,12 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +import 'dart:ffi'; import 'dart:io'; +import 'package:ffi/ffi.dart'; import 'package:ffigen/ffigen.dart'; import 'package:path/path.dart' as path; -import 'package:test/test.dart'; import '../test_utils.dart'; @@ -26,3 +27,13 @@ void generateBindingsForCoverage(String testName) { assert(file.existsSync()); file.delete(); } + +@Native, Pointer)>( + symbol: 'Dart_ExecuteInternalCommand') +external void _executeInternalCommand(Pointer cmd, Pointer arg); + +void doGC() { + final gcNow = "gc-now".toNativeUtf8(); + _executeInternalCommand(gcNow.cast(), nullptr); + calloc.free(gcNow); +} diff --git a/pkgs/ffigen/test/regen.dart b/pkgs/ffigen/test/regen.dart index ec52964493..cec13ec7f4 100644 --- a/pkgs/ffigen/test/regen.dart +++ b/pkgs/ffigen/test/regen.dart @@ -60,4 +60,8 @@ Future main(List args) async { 'example/simple/config.yaml', 'example/simple/generated_bindings.dart'); _regenConfig('example/c_json/config.yaml', 'example/c_json/cjson_generated_bindings.dart'); + _regenConfig( + 'example/swift/config.yaml', 'example/swift/swift_api_bindings.dart'); + _regenConfig('example/objective_c/config.yaml', + 'example/objective_c/avf_audio_bindings.dart'); } diff --git a/pkgs/ffigen/tool/coverage.sh b/pkgs/ffigen/tool/coverage.sh index 02c8e2f47c..b5c35e4aa4 100755 --- a/pkgs/ffigen/tool/coverage.sh +++ b/pkgs/ffigen/tool/coverage.sh @@ -11,5 +11,5 @@ set -e dart pub global activate coverage # Generate coverage report. dart run --pause-isolates-on-exit --disable-service-auth-codes --enable-vm-service=3000 test & -dart pub global run coverage:collect_coverage --wait-paused --uri=http://127.0.0.1:3000/ -o coverage.json --resume-isolates --scope-output=ffigen -dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --lcov -i coverage.json -o lcov.info +dart pub global run coverage:collect_coverage --wait-paused --uri=http://127.0.0.1:3000/ -o coverage.json --resume-isolates --scope-output=ffigen --scope-output=objective_c +dart pub global run coverage:format_coverage --check-ignore --packages=.dart_tool/package_config.json --lcov -i coverage.json -o lcov.info diff --git a/pkgs/jni/CHANGELOG.md b/pkgs/jni/CHANGELOG.md index 757642d74f..5bc57ff815 100644 --- a/pkgs/jni/CHANGELOG.md +++ b/pkgs/jni/CHANGELOG.md @@ -1,3 +1,13 @@ +## 0.9.0 + +- **Breaking Change** + ([#1004](https://github.com/dart-lang/native/issues/1004)): Changed the return + type `operator []` of `JArray` to `int` instead of `String`. Similarly, + change the argument type of `operator []=` to accept `int`. +- Added `getRange` method to `JArray` of primitive types that returns a + `TypedData` list depending on the kind of the array. +- Improved the performance of `JArray`'s `setRange` and `operator []=`. + ## 0.8.0 - **Breaking Change** ([#981](https://github.com/dart-lang/native/issues/981)): diff --git a/pkgs/jni/example/pubspec.lock b/pkgs/jni/example/pubspec.lock index 4b65490ecf..de0c5c219b 100644 --- a/pkgs/jni/example/pubspec.lock +++ b/pkgs/jni/example/pubspec.lock @@ -200,7 +200,7 @@ packages: path: ".." relative: true source: path - version: "0.8.0-wip" + version: "0.8.0" js: dependency: transitive description: diff --git a/pkgs/jni/ffigen.yaml b/pkgs/jni/ffigen.yaml index 0914b40fc4..ae52dbcb0b 100644 --- a/pkgs/jni/ffigen.yaml +++ b/pkgs/jni/ffigen.yaml @@ -12,12 +12,10 @@ output: 'lib/src/third_party/jni_bindings_generated.dart' headers: entry-points: - 'src/dartjni.h' # Exports majority of JNI functions - - 'src/internal.h' - 'src/third_party/global_jni_env.h' # Exports GlobalJniEnv type - 'src/jni_constants.h' include-directives: - 'src/dartjni.h' - - 'src/internal.h' - 'src/third_party/global_jni_env.h' - 'third_party/jni.h' # jni.h from Android NDK - 'src/jni_constants.h' @@ -34,6 +32,10 @@ functions: - 'GetJniContextPtr' - 'setJniGetters' - 'jni_log' + # Exclude functions with VarArgs, jnigen will generate them based on the + # exact arguments needed. + - 'globalEnv_NewObject' + - 'globalEnv_Call(Static|Nonvirtual|)[A-Z][a-z]+Method' # Inline functions # keep-sorted start - 'acquire_lock' diff --git a/pkgs/jni/lib/src/jarray.dart b/pkgs/jni/lib/src/jarray.dart index 3404ceb495..7d159a3c9a 100644 --- a/pkgs/jni/lib/src/jarray.dart +++ b/pkgs/jni/lib/src/jarray.dart @@ -5,6 +5,7 @@ // ignore_for_file: unnecessary_cast, overridden_fields import 'dart:ffi'; +import 'dart:typed_data'; import 'package:collection/collection.dart'; import 'package:ffi/ffi.dart'; @@ -131,16 +132,26 @@ class JArray extends JObject { extension NativeArray on JArray { void _allocate( - int size, + int byteCount, void Function(Pointer ptr) use, ) { using((arena) { - final ptr = arena.allocate(size); + final ptr = arena.allocate(byteCount); use(ptr); }, malloc); } } +extension on Allocator { + Pointer? get _nativeFree { + return switch (this) { + malloc => malloc.nativeFree, + calloc => calloc.nativeFree, + _ => null, + }; + } +} + extension BoolArray on JArray { bool operator [](int index) { return _elementAt(index, JniCallType.booleanType).boolean; @@ -148,22 +159,28 @@ extension BoolArray on JArray { void operator []=(int index, bool value) { RangeError.checkValidIndex(index, this); - _allocate(sizeOf(), (ptr) { - ptr.value = value ? 1 : 0; - Jni.env.SetBooleanArrayRegion(reference.pointer, index, 1, ptr); - }); + Jni.accessors + .setBooleanArrayElement(reference.pointer, index, value ? 1 : 0); + } + + Uint8List getRange(int start, int end, {Allocator allocator = malloc}) { + RangeError.checkValidRange(start, end, length); + final rangeLength = end - start; + final buffer = allocator(rangeLength); + Jni.env + .GetBooleanArrayRegion(reference.pointer, start, rangeLength, buffer); + return buffer.asTypedList(rangeLength, finalizer: allocator._nativeFree); } void setRange(int start, int end, Iterable iterable, [int skipCount = 0]) { RangeError.checkValidRange(start, end, length); - final size = end - start; - final it = iterable.skip(skipCount).take(size); - _allocate(sizeOf() * size, (ptr) { - it.forEachIndexed((index, element) { - ptr[index] = element ? 1 : 0; - }); - Jni.env.SetBooleanArrayRegion(reference.pointer, start, size, ptr); + final rangeLength = end - start; + _allocate(sizeOf() * rangeLength, (ptr) { + ptr + .asTypedList(rangeLength) + .setRange(0, rangeLength, iterable.map((e) => e ? 1 : 0), skipCount); + Jni.env.SetBooleanArrayRegion(reference.pointer, start, rangeLength, ptr); }); } } @@ -175,51 +192,61 @@ extension ByteArray on JArray { void operator []=(int index, int value) { RangeError.checkValidIndex(index, this); - _allocate(sizeOf(), (ptr) { - ptr.value = value; - Jni.env.SetByteArrayRegion(reference.pointer, index, 1, ptr); - }); + Jni.accessors.setByteArrayElement(reference.pointer, index, value).check(); + } + + Int8List getRange(int start, int end, {Allocator allocator = malloc}) { + RangeError.checkValidRange(start, end, length); + final rangeLength = end - start; + final buffer = allocator(rangeLength); + Jni.env.GetByteArrayRegion(reference.pointer, start, rangeLength, buffer); + return buffer.asTypedList(rangeLength, finalizer: allocator._nativeFree); } void setRange(int start, int end, Iterable iterable, [int skipCount = 0]) { RangeError.checkValidRange(start, end, length); - final size = end - start; - final it = iterable.skip(skipCount).take(size); - _allocate(sizeOf() * size, (ptr) { - it.forEachIndexed((index, element) { - ptr[index] = element; - }); - Jni.env.SetByteArrayRegion(reference.pointer, start, size, ptr); + final rangeLength = end - start; + _allocate(sizeOf() * rangeLength, (ptr) { + ptr + .asTypedList(rangeLength) + .setRange(0, rangeLength, iterable, skipCount); + Jni.env.SetByteArrayRegion(reference.pointer, start, rangeLength, ptr); }); } } +/// `JArray` is a 16-bit integer array. +/// +/// Due to variable length encoding, the number of code units is not equal to +/// the number of characters. extension CharArray on JArray { - String operator [](int index) { - return String.fromCharCode( - _elementAt(index, JniCallType.charType).char, - ); + int operator [](int index) { + return _elementAt(index, JniCallType.charType).char; } - void operator []=(int index, String value) { + void operator []=(int index, int value) { RangeError.checkValidIndex(index, this); - _allocate(sizeOf(), (ptr) { - ptr.value = value.codeUnits.first; - Jni.env.SetCharArrayRegion(reference.pointer, index, 1, ptr); - }); + Jni.accessors.setCharArrayElement(reference.pointer, index, value).check(); } - void setRange(int start, int end, Iterable iterable, + Uint16List getRange(int start, int end, {Allocator allocator = malloc}) { + RangeError.checkValidRange(start, end, length); + final rangeLength = end - start; + final buffer = allocator(rangeLength); + Jni.env.GetCharArrayRegion(reference.pointer, start, rangeLength, buffer); + return buffer.asTypedList(rangeLength, finalizer: allocator._nativeFree); + } + + void setRange(int start, int end, Iterable iterable, [int skipCount = 0]) { RangeError.checkValidRange(start, end, length); - final size = end - start; - final it = iterable.skip(skipCount).take(size); - _allocate(sizeOf() * size, (ptr) { - it.forEachIndexed((index, element) { - ptr[index] = element.codeUnits.first; - }); - Jni.env.SetCharArrayRegion(reference.pointer, start, size, ptr); + final rangeLength = end - start; + _allocate(sizeOf() * rangeLength, (ptr) { + ptr + .asTypedList(rangeLength) + .setRange(0, rangeLength, iterable, skipCount); + Jni.env.SetCharArrayRegion(reference.pointer, start, rangeLength, ptr); }); } } @@ -231,22 +258,26 @@ extension ShortArray on JArray { void operator []=(int index, int value) { RangeError.checkValidIndex(index, this); - _allocate(sizeOf(), (ptr) { - ptr.value = value; - Jni.env.SetShortArrayRegion(reference.pointer, index, 1, ptr); - }); + Jni.accessors.setShortArrayElement(reference.pointer, index, value).check(); + } + + Int16List getRange(int start, int end, {Allocator allocator = malloc}) { + RangeError.checkValidRange(start, end, length); + final rangeLength = end - start; + final buffer = allocator(rangeLength); + Jni.env.GetShortArrayRegion(reference.pointer, start, rangeLength, buffer); + return buffer.asTypedList(rangeLength, finalizer: allocator._nativeFree); } void setRange(int start, int end, Iterable iterable, [int skipCount = 0]) { RangeError.checkValidRange(start, end, length); - final size = end - start; - final it = iterable.skip(skipCount).take(size); - _allocate(sizeOf() * size, (ptr) { - it.forEachIndexed((index, element) { - ptr[index] = element; - }); - Jni.env.SetShortArrayRegion(reference.pointer, start, size, ptr); + final rangeLength = end - start; + _allocate(sizeOf() * rangeLength, (ptr) { + ptr + .asTypedList(rangeLength) + .setRange(0, rangeLength, iterable, skipCount); + Jni.env.SetShortArrayRegion(reference.pointer, start, rangeLength, ptr); }); } } @@ -258,22 +289,26 @@ extension IntArray on JArray { void operator []=(int index, int value) { RangeError.checkValidIndex(index, this); - _allocate(sizeOf(), (ptr) { - ptr.value = value; - Jni.env.SetIntArrayRegion(reference.pointer, index, 1, ptr); - }); + Jni.accessors.setIntArrayElement(reference.pointer, index, value).check(); + } + + Int32List getRange(int start, int end, {Allocator allocator = malloc}) { + RangeError.checkValidRange(start, end, length); + final rangeLength = end - start; + final buffer = allocator(rangeLength); + Jni.env.GetIntArrayRegion(reference.pointer, start, rangeLength, buffer); + return buffer.asTypedList(rangeLength, finalizer: allocator._nativeFree); } void setRange(int start, int end, Iterable iterable, [int skipCount = 0]) { RangeError.checkValidRange(start, end, length); - final size = end - start; - final it = iterable.skip(skipCount).take(size); - _allocate(sizeOf() * size, (ptr) { - it.forEachIndexed((index, element) { - ptr[index] = element; - }); - Jni.env.SetIntArrayRegion(reference.pointer, start, size, ptr); + final rangeLength = end - start; + _allocate(sizeOf() * rangeLength, (ptr) { + ptr + .asTypedList(rangeLength) + .setRange(0, rangeLength, iterable, skipCount); + Jni.env.SetIntArrayRegion(reference.pointer, start, rangeLength, ptr); }); } } @@ -285,22 +320,26 @@ extension LongArray on JArray { void operator []=(int index, int value) { RangeError.checkValidIndex(index, this); - _allocate(sizeOf(), (ptr) { - ptr.value = value; - Jni.env.SetLongArrayRegion(reference.pointer, index, 1, ptr); - }); + Jni.accessors.setLongArrayElement(reference.pointer, index, value).check(); + } + + Int64List getRange(int start, int end, {Allocator allocator = malloc}) { + RangeError.checkValidRange(start, end, length); + final rangeLength = end - start; + final buffer = allocator(rangeLength); + Jni.env.GetLongArrayRegion(reference.pointer, start, rangeLength, buffer); + return buffer.asTypedList(rangeLength, finalizer: allocator._nativeFree); } void setRange(int start, int end, Iterable iterable, [int skipCount = 0]) { RangeError.checkValidRange(start, end, length); - final size = end - start; - final it = iterable.skip(skipCount).take(size); - _allocate(sizeOf() * size, (ptr) { - it.forEachIndexed((index, element) { - ptr[index] = element; - }); - Jni.env.SetLongArrayRegion(reference.pointer, start, size, ptr); + final rangeLength = end - start; + _allocate(sizeOf() * rangeLength, (ptr) { + ptr + .asTypedList(rangeLength) + .setRange(0, rangeLength, iterable, skipCount); + Jni.env.SetLongArrayRegion(reference.pointer, start, rangeLength, ptr); }); } } @@ -312,22 +351,26 @@ extension FloatArray on JArray { void operator []=(int index, double value) { RangeError.checkValidIndex(index, this); - _allocate(sizeOf(), (ptr) { - ptr.value = value; - Jni.env.SetFloatArrayRegion(reference.pointer, index, 1, ptr); - }); + Jni.accessors.setFloatArrayElement(reference.pointer, index, value).check(); + } + + Float32List getRange(int start, int end, {Allocator allocator = malloc}) { + RangeError.checkValidRange(start, end, length); + final rangeLength = end - start; + final buffer = allocator(rangeLength); + Jni.env.GetFloatArrayRegion(reference.pointer, start, rangeLength, buffer); + return buffer.asTypedList(rangeLength, finalizer: allocator._nativeFree); } void setRange(int start, int end, Iterable iterable, [int skipCount = 0]) { RangeError.checkValidRange(start, end, length); - final size = end - start; - final it = iterable.skip(skipCount).take(size); - _allocate(sizeOf() * size, (ptr) { - it.forEachIndexed((index, element) { - ptr[index] = element; - }); - Jni.env.SetFloatArrayRegion(reference.pointer, start, size, ptr); + final rangeLength = end - start; + _allocate(sizeOf() * rangeLength, (ptr) { + ptr + .asTypedList(rangeLength) + .setRange(0, rangeLength, iterable, skipCount); + Jni.env.SetFloatArrayRegion(reference.pointer, start, rangeLength, ptr); }); } } @@ -339,22 +382,28 @@ extension DoubleArray on JArray { void operator []=(int index, double value) { RangeError.checkValidIndex(index, this); - _allocate(sizeOf(), (ptr) { - ptr.value = value; - Jni.env.SetDoubleArrayRegion(reference.pointer, index, 1, ptr); - }); + Jni.accessors + .setDoubleArrayElement(reference.pointer, index, value) + .check(); + } + + Float64List getRange(int start, int end, {Allocator allocator = malloc}) { + RangeError.checkValidRange(start, end, length); + final rangeLength = end - start; + final buffer = allocator(rangeLength); + Jni.env.GetDoubleArrayRegion(reference.pointer, start, rangeLength, buffer); + return buffer.asTypedList(rangeLength, finalizer: allocator._nativeFree); } void setRange(int start, int end, Iterable iterable, [int skipCount = 0]) { RangeError.checkValidRange(start, end, length); - final size = end - start; - final it = iterable.skip(skipCount).take(size); - _allocate(sizeOf() * size, (ptr) { - it.forEachIndexed((index, element) { - ptr[index] = element; - }); - Jni.env.SetDoubleArrayRegion(reference.pointer, start, size, ptr); + final rangeLength = end - start; + _allocate(sizeOf() * rangeLength, (ptr) { + ptr + .asTypedList(rangeLength) + .setRange(0, rangeLength, iterable, skipCount); + Jni.env.SetDoubleArrayRegion(reference.pointer, start, rangeLength, ptr); }); } } @@ -373,8 +422,8 @@ extension ObjectArray on JArray { void setRange(int start, int end, Iterable iterable, [int skipCount = 0]) { RangeError.checkValidRange(start, end, length); - final size = end - start; - final it = iterable.skip(skipCount).take(size); + final rangeLength = end - start; + final it = iterable.skip(skipCount).take(rangeLength); it.forEachIndexed((index, element) { this[index] = element; }); diff --git a/pkgs/jni/lib/src/jni.dart b/pkgs/jni/lib/src/jni.dart index 4322fbd579..e0a1fe700e 100644 --- a/pkgs/jni/lib/src/jni.dart +++ b/pkgs/jni/lib/src/jni.dart @@ -300,6 +300,9 @@ extension ProtectedJniExtensions on Jni { Jni._ensureInitialized(); Jni._bindings.deleteFinalizableHandle(finalizableHandle, object); } + + static Pointer Function(String) get lookup => + Jni._dylib.lookup; } extension AdditionalEnvMethods on GlobalJniEnv { diff --git a/pkgs/jni/lib/src/third_party/global_env_extensions.dart b/pkgs/jni/lib/src/third_party/global_env_extensions.dart index 3e90beda0c..a878f5a2b7 100644 --- a/pkgs/jni/lib/src/third_party/global_env_extensions.dart +++ b/pkgs/jni/lib/src/third_party/global_env_extensions.dart @@ -3,6 +3,9 @@ // This is generated from JNI header in Android NDK. License for the same is // provided below. +// Generation logic resides in `tool/wrapper_generators`. +// To regenerate, run `dart run tool/generate_ffi_bindings.dart`. + /* * Copyright (C) 2006 The Android Open Source Project * @@ -1488,6 +1491,49 @@ class JniAccessors { JniResult getArrayElement(JArrayPtr array, int index, int type) => _getArrayElement(array, index, type); + late final _setBooleanArrayElement = ptr.ref.setBooleanArrayElement + .asFunction< + JThrowablePtr Function(JArrayPtr array, int index, int value)>(); + JThrowablePtr setBooleanArrayElement(JArrayPtr array, int index, int value) => + _setBooleanArrayElement(array, index, value); + + late final _setByteArrayElement = ptr.ref.setByteArrayElement.asFunction< + JThrowablePtr Function(JArrayPtr array, int index, int value)>(); + JThrowablePtr setByteArrayElement(JArrayPtr array, int index, int value) => + _setByteArrayElement(array, index, value); + + late final _setShortArrayElement = ptr.ref.setShortArrayElement.asFunction< + JThrowablePtr Function(JArrayPtr array, int index, int value)>(); + JThrowablePtr setShortArrayElement(JArrayPtr array, int index, int value) => + _setShortArrayElement(array, index, value); + + late final _setCharArrayElement = ptr.ref.setCharArrayElement.asFunction< + JThrowablePtr Function(JArrayPtr array, int index, int value)>(); + JThrowablePtr setCharArrayElement(JArrayPtr array, int index, int value) => + _setCharArrayElement(array, index, value); + + late final _setIntArrayElement = ptr.ref.setIntArrayElement.asFunction< + JThrowablePtr Function(JArrayPtr array, int index, int value)>(); + JThrowablePtr setIntArrayElement(JArrayPtr array, int index, int value) => + _setIntArrayElement(array, index, value); + + late final _setLongArrayElement = ptr.ref.setLongArrayElement.asFunction< + JThrowablePtr Function(JArrayPtr array, int index, int value)>(); + JThrowablePtr setLongArrayElement(JArrayPtr array, int index, int value) => + _setLongArrayElement(array, index, value); + + late final _setFloatArrayElement = ptr.ref.setFloatArrayElement.asFunction< + JThrowablePtr Function(JArrayPtr array, int index, double value)>(); + JThrowablePtr setFloatArrayElement( + JArrayPtr array, int index, double value) => + _setFloatArrayElement(array, index, value); + + late final _setDoubleArrayElement = ptr.ref.setDoubleArrayElement.asFunction< + JThrowablePtr Function(JArrayPtr array, int index, double value)>(); + JThrowablePtr setDoubleArrayElement( + JArrayPtr array, int index, double value) => + _setDoubleArrayElement(array, index, value); + late final _callMethod = ptr.ref.callMethod.asFunction< JniResult Function(JObjectPtr obj, JMethodIDPtr methodID, int callType, ffi.Pointer args)>(); diff --git a/pkgs/jni/lib/src/third_party/jni_bindings_generated.dart b/pkgs/jni/lib/src/third_party/jni_bindings_generated.dart index a575c812f6..2c81d990ce 100644 --- a/pkgs/jni/lib/src/third_party/jni_bindings_generated.dart +++ b/pkgs/jni/lib/src/third_party/jni_bindings_generated.dart @@ -442,6 +442,54 @@ final class JniAccessorsStruct extends ffi.Struct { JniResult Function(JArrayPtr array, ffi.Int index, ffi.Int type)>> getArrayElement; + external ffi.Pointer< + ffi.NativeFunction< + JThrowablePtr Function( + JArrayPtr array, ffi.Int index, JBooleanMarker value)>> + setBooleanArrayElement; + + external ffi.Pointer< + ffi.NativeFunction< + JThrowablePtr Function( + JArrayPtr array, ffi.Int index, JByteMarker value)>> + setByteArrayElement; + + external ffi.Pointer< + ffi.NativeFunction< + JThrowablePtr Function( + JArrayPtr array, ffi.Int index, JShortMarker value)>> + setShortArrayElement; + + external ffi.Pointer< + ffi.NativeFunction< + JThrowablePtr Function( + JArrayPtr array, ffi.Int index, JCharMarker value)>> + setCharArrayElement; + + external ffi.Pointer< + ffi.NativeFunction< + JThrowablePtr Function( + JArrayPtr array, ffi.Int index, JIntMarker value)>> + setIntArrayElement; + + external ffi.Pointer< + ffi.NativeFunction< + JThrowablePtr Function( + JArrayPtr array, ffi.Int index, JLongMarker value)>> + setLongArrayElement; + + external ffi.Pointer< + ffi.NativeFunction< + JThrowablePtr Function( + JArrayPtr array, ffi.Int index, JFloatMarker value)>> + setFloatArrayElement; + + external ffi.Pointer< + ffi.NativeFunction< + JThrowablePtr Function( + JArrayPtr array, ffi.Int index, JDoubleMarker value)>> + setDoubleArrayElement; + external ffi.Pointer< ffi.NativeFunction< JniResult Function(JObjectPtr obj, JMethodIDPtr methodID, diff --git a/pkgs/jni/pubspec.yaml b/pkgs/jni/pubspec.yaml index 4347e06bb7..b735e85ab3 100644 --- a/pkgs/jni/pubspec.yaml +++ b/pkgs/jni/pubspec.yaml @@ -4,7 +4,7 @@ name: jni description: A library to access JNI from Dart and Flutter that acts as a support library for package:jnigen. -version: 0.8.0 +version: 0.9.0 repository: https://github.com/dart-lang/native/tree/main/pkgs/jni topics: diff --git a/pkgs/jni/src/CMakeLists.txt b/pkgs/jni/src/CMakeLists.txt index 685d52b71e..2cdb3f724d 100644 --- a/pkgs/jni/src/CMakeLists.txt +++ b/pkgs/jni/src/CMakeLists.txt @@ -9,7 +9,6 @@ project(jni_library VERSION 0.0.1 LANGUAGES C) add_library(jni SHARED "dartjni.c" - "internal.c" "third_party/global_jni_env.c" "include/dart_api_dl.c" ) diff --git a/pkgs/jni/src/dartjni.c b/pkgs/jni/src/dartjni.c index 0c2bff26e3..2553b2e004 100644 --- a/pkgs/jni/src/dartjni.c +++ b/pkgs/jni/src/dartjni.c @@ -517,6 +517,62 @@ JniResult getArrayElement(jarray array, int index, int type) { return jniResult; } +jthrowable setBooleanArrayElement(jarray array, int index, jboolean value) { + attach_thread(); + (*jniEnv)->SetBooleanArrayRegion(jniEnv, array, index, 1, &value); + jthrowable exception = check_exception(); + return exception; +} + +jthrowable setByteArrayElement(jarray array, int index, jbyte value) { + attach_thread(); + (*jniEnv)->SetByteArrayRegion(jniEnv, array, index, 1, &value); + jthrowable exception = check_exception(); + return exception; +} + +jthrowable setShortArrayElement(jarray array, int index, jshort value) { + attach_thread(); + (*jniEnv)->SetShortArrayRegion(jniEnv, array, index, 1, &value); + jthrowable exception = check_exception(); + return exception; +} + +jthrowable setCharArrayElement(jarray array, int index, jchar value) { + attach_thread(); + (*jniEnv)->SetCharArrayRegion(jniEnv, array, index, 1, &value); + jthrowable exception = check_exception(); + return exception; +} + +jthrowable setIntArrayElement(jarray array, int index, jint value) { + attach_thread(); + (*jniEnv)->SetIntArrayRegion(jniEnv, array, index, 1, &value); + jthrowable exception = check_exception(); + return exception; +} + +jthrowable setLongArrayElement(jarray array, int index, jlong value) { + attach_thread(); + (*jniEnv)->SetLongArrayRegion(jniEnv, array, index, 1, &value); + jthrowable exception = check_exception(); + return exception; +} + +jthrowable setFloatArrayElement(jarray array, int index, jfloat value) { + attach_thread(); + (*jniEnv)->SetFloatArrayRegion(jniEnv, array, index, 1, &value); + jthrowable exception = check_exception(); + return exception; +} + +jthrowable setDoubleArrayElement(jarray array, int index, jdouble value) { + attach_thread(); + (*jniEnv)->SetDoubleArrayRegion(jniEnv, array, index, 1, &value); + jthrowable exception = check_exception(); + return exception; +} + JniExceptionDetails getExceptionDetails(jthrowable exception) { JniExceptionDetails details; details.message = (*jniEnv)->CallObjectMethod( @@ -552,6 +608,14 @@ JniAccessorsStruct accessors = { .newPrimitiveArray = newPrimitiveArray, .newObjectArray = newObjectArray, .getArrayElement = getArrayElement, + .setBooleanArrayElement = setBooleanArrayElement, + .setByteArrayElement = setByteArrayElement, + .setShortArrayElement = setShortArrayElement, + .setCharArrayElement = setCharArrayElement, + .setIntArrayElement = setIntArrayElement, + .setLongArrayElement = setLongArrayElement, + .setFloatArrayElement = setFloatArrayElement, + .setDoubleArrayElement = setDoubleArrayElement, .callMethod = callMethod, .callStaticMethod = callStaticMethod, .getField = getField, @@ -575,3 +639,245 @@ FFI_PLUGIN_EXPORT JNIEnv* GetJniEnv() { attach_thread(); return jniEnv; } + +FFI_PLUGIN_EXPORT intptr_t InitDartApiDL(void* data) { + return Dart_InitializeApiDL(data); +} + +// com.github.dart_lang.jni.DartException +jclass _c_DartException = NULL; + +jmethodID _m_DartException__ctor = NULL; +FFI_PLUGIN_EXPORT JniResult DartException__ctor(jstring message) { + attach_thread(); + load_class_global_ref(&_c_DartException, + "com/github/dart_lang/jni/PortProxy$DartException"); + if (_c_DartException == NULL) + return (JniResult){.value = {.j = 0}, .exception = check_exception()}; + load_method(_c_DartException, &_m_DartException__ctor, "", + "(Ljava/lang/String;)V"); + if (_m_DartException__ctor == NULL) + return (JniResult){.value = {.j = 0}, .exception = check_exception()}; + jobject _result = (*jniEnv)->NewObject(jniEnv, _c_DartException, + _m_DartException__ctor, message); + jthrowable exception = check_exception(); + if (exception == NULL) { + _result = to_global_ref(_result); + } + return (JniResult){.value = {.l = _result}, .exception = check_exception()}; +} + +JNIEXPORT void JNICALL +Java_com_github_dart_1lang_jni_PortContinuation__1resumeWith(JNIEnv* env, + jclass clazz, + jlong port, + jobject result) { + attach_thread(); + Dart_CObject c_post; + c_post.type = Dart_CObject_kInt64; + c_post.value.as_int64 = (jlong)((*env)->NewGlobalRef(env, result)); + Dart_PostCObject_DL(port, &c_post); +} + +// com.github.dart_lang.jni.PortContinuation +jclass _c_PortContinuation = NULL; + +jmethodID _m_PortContinuation__ctor = NULL; +FFI_PLUGIN_EXPORT +JniResult PortContinuation__ctor(int64_t j) { + attach_thread(); + load_class_global_ref(&_c_PortContinuation, + "com/github/dart_lang/jni/PortContinuation"); + if (_c_PortContinuation == NULL) + return (JniResult){.value = {.j = 0}, .exception = check_exception()}; + load_method(_c_PortContinuation, &_m_PortContinuation__ctor, "", + "(J)V"); + if (_m_PortContinuation__ctor == NULL) + return (JniResult){.value = {.j = 0}, .exception = check_exception()}; + jobject _result = (*jniEnv)->NewObject(jniEnv, _c_PortContinuation, + _m_PortContinuation__ctor, j); + jthrowable exception = check_exception(); + if (exception == NULL) { + _result = to_global_ref(_result); + } + return (JniResult){.value = {.l = _result}, .exception = check_exception()}; +} + +// com.github.dart_lang.jni.PortProxy +jclass _c_PortProxy = NULL; + +jmethodID _m_PortProxy__newInstance = NULL; +FFI_PLUGIN_EXPORT +JniResult PortProxy__newInstance(jobject binaryName, + int64_t port, + int64_t functionPtr) { + attach_thread(); + load_class_global_ref(&_c_PortProxy, "com/github/dart_lang/jni/PortProxy"); + if (_c_PortProxy == NULL) + return (JniResult){.value = {.j = 0}, .exception = check_exception()}; + load_static_method(_c_PortProxy, &_m_PortProxy__newInstance, "newInstance", + "(Ljava/lang/String;JJJ)Ljava/lang/Object;"); + if (_m_PortProxy__newInstance == NULL) + return (JniResult){.value = {.j = 0}, .exception = check_exception()}; + jobject _result = (*jniEnv)->CallStaticObjectMethod( + jniEnv, _c_PortProxy, _m_PortProxy__newInstance, binaryName, port, + (jlong)Dart_CurrentIsolate_DL(), functionPtr); + return to_global_ref_result(_result); +} + +FFI_PLUGIN_EXPORT +void resultFor(CallbackResult* result, jobject object) { + acquire_lock(&result->lock); + result->ready = 1; + result->object = object; + signal_cond(&result->cond); + release_lock(&result->lock); +} + +void doNotFinalize(void* isolate_callback_data, void* peer) {} + +void finalizeLocal(void* isolate_callback_data, void* peer) { + attach_thread(); + (*jniEnv)->DeleteLocalRef(jniEnv, peer); +} + +void finalizeGlobal(void* isolate_callback_data, void* peer) { + attach_thread(); + (*jniEnv)->DeleteGlobalRef(jniEnv, peer); +} + +void finalizeWeakGlobal(void* isolate_callback_data, void* peer) { + attach_thread(); + (*jniEnv)->DeleteWeakGlobalRef(jniEnv, peer); +} + +void freeBoolean(void* isolate_callback_data, void* peer) { + // To match the platform implementation of Dart's calloc. + free_mem(peer); +} + +FFI_PLUGIN_EXPORT +Dart_FinalizableHandle newJObjectFinalizableHandle(Dart_Handle object, + jobject reference, + jobjectRefType refType) { + switch (refType) { + case JNIInvalidRefType: + return Dart_NewFinalizableHandle_DL(object, reference, 0, doNotFinalize); + case JNILocalRefType: + return Dart_NewFinalizableHandle_DL(object, reference, 0, finalizeLocal); + case JNIGlobalRefType: + return Dart_NewFinalizableHandle_DL(object, reference, 0, finalizeGlobal); + case JNIWeakGlobalRefType: + return Dart_NewFinalizableHandle_DL(object, reference, 0, + finalizeWeakGlobal); + } +} + +FFI_PLUGIN_EXPORT +Dart_FinalizableHandle newBooleanFinalizableHandle(Dart_Handle object, + bool* reference) { + return Dart_NewFinalizableHandle_DL(object, reference, 1, freeBoolean); +} + +FFI_PLUGIN_EXPORT +void deleteFinalizableHandle(Dart_FinalizableHandle finalizableHandle, + Dart_Handle object) { + return Dart_DeleteFinalizableHandle_DL(finalizableHandle, object); +} + +jclass _c_Object = NULL; +jclass _c_Long = NULL; + +jmethodID _m_Long_init = NULL; + +JNIEXPORT jobjectArray JNICALL +Java_com_github_dart_1lang_jni_PortProxy__1invoke(JNIEnv* env, + jclass clazz, + jlong port, + jlong isolateId, + jlong functionPtr, + jobject proxy, + jstring methodDescriptor, + jobjectArray args) { + CallbackResult* result = (CallbackResult*)malloc(sizeof(CallbackResult)); + if (isolateId != (jlong)Dart_CurrentIsolate_DL()) { + init_lock(&result->lock); + init_cond(&result->cond); + acquire_lock(&result->lock); + result->ready = 0; + result->object = NULL; + + Dart_CObject c_result; + c_result.type = Dart_CObject_kInt64; + c_result.value.as_int64 = (jlong)result; + + Dart_CObject c_method; + c_method.type = Dart_CObject_kInt64; + c_method.value.as_int64 = + (jlong)((*env)->NewGlobalRef(env, methodDescriptor)); + + Dart_CObject c_args; + c_args.type = Dart_CObject_kInt64; + c_args.value.as_int64 = (jlong)((*env)->NewGlobalRef(env, args)); + + Dart_CObject* c_post_arr[] = {&c_result, &c_method, &c_args}; + Dart_CObject c_post; + c_post.type = Dart_CObject_kArray; + c_post.value.as_array.values = c_post_arr; + c_post.value.as_array.length = sizeof(c_post_arr) / sizeof(c_post_arr[0]); + + Dart_PostCObject_DL(port, &c_post); + + while (!result->ready) { + wait_for(&result->cond, &result->lock); + } + + release_lock(&result->lock); + destroy_lock(&result->lock); + destroy_cond(&result->cond); + } else { + result->object = ((jobject(*)(uint64_t, jobject, jobject))functionPtr)( + port, (*env)->NewGlobalRef(env, methodDescriptor), + (*env)->NewGlobalRef(env, args)); + } + // Returning an array of length 2. + // [0]: The result pointer, used for cleaning up the global reference, and + // freeing the memory since we passed the ownership to Java. + // [1]: The returned object. + attach_thread(); + load_class_global_ref(&_c_Object, "java/lang/Object"); + load_class_global_ref(&_c_Long, "java/lang/Long"); + load_method(_c_Long, &_m_Long_init, "", "(J)V"); + jobject first = (*env)->NewObject(env, _c_Long, _m_Long_init, (jlong)result); + jobject second = result->object; + jobjectArray arr = (*env)->NewObjectArray(env, 2, _c_Object, NULL); + (*env)->SetObjectArrayElement(env, arr, 0, first); + (*env)->SetObjectArrayElement(env, arr, 1, second); + return arr; +} + +JNIEXPORT void JNICALL +Java_com_github_dart_1lang_jni_PortProxy__1cleanUp(JNIEnv* env, + jclass clazz, + jlong resultPtr) { + CallbackResult* result = (CallbackResult*)resultPtr; + (*env)->DeleteGlobalRef(env, result->object); + free(result); +} + +JNIEXPORT void JNICALL +Java_com_github_dart_1lang_jni_PortCleaner_clean(JNIEnv* env, + jclass clazz, + jlong port) { + Dart_CObject close_signal; + close_signal.type = Dart_CObject_kNull; + Dart_PostCObject_DL(port, &close_signal); +} + +JNIEXPORT jobject JNICALL +Java_com_github_dart_1lang_jni_JniUtils_fromReferenceAddress(JNIEnv* env, + jclass clazz, + jlong id) { + attach_thread(); + return (jobject)(id); +} diff --git a/pkgs/jni/src/dartjni.h b/pkgs/jni/src/dartjni.h index f834d1577b..506b4e9503 100644 --- a/pkgs/jni/src/dartjni.h +++ b/pkgs/jni/src/dartjni.h @@ -4,6 +4,8 @@ #pragma once +#include "include/dart_api_dl.h" + // Note: include appropriate system jni.h as found by CMake, not third_party/jni.h. #include #include @@ -228,6 +230,14 @@ typedef struct JniAccessorsStruct { jclass elementClass, jobject initialElement); JniResult (*getArrayElement)(jarray array, int index, int type); + jthrowable (*setBooleanArrayElement)(jarray array, int index, jboolean value); + jthrowable (*setByteArrayElement)(jarray array, int index, jbyte value); + jthrowable (*setShortArrayElement)(jarray array, int index, jshort value); + jthrowable (*setCharArrayElement)(jarray array, int index, jchar value); + jthrowable (*setIntArrayElement)(jarray array, int index, jint value); + jthrowable (*setLongArrayElement)(jarray array, int index, jlong value); + jthrowable (*setFloatArrayElement)(jarray array, int index, jfloat value); + jthrowable (*setDoubleArrayElement)(jarray array, int index, jdouble value); JniResult (*callMethod)(jobject obj, jmethodID methodID, int callType, @@ -343,29 +353,6 @@ static inline jobject to_global_ref(jobject ref) { return g; } -// These functions are useful for C+Dart bindings, and not required for pure dart bindings. - -FFI_PLUGIN_EXPORT JniContext* GetJniContextPtr(); - -/// For use by jni_gen's generated code -/// don't use these. - -// these 2 fn ptr vars will be defined by generated code library -extern JniContext* (*context_getter)(void); -extern JNIEnv* (*env_getter)(void); - -// this function will be exported by generated code library -// it will set above 2 variables. -FFI_PLUGIN_EXPORT void setJniGetters(struct JniContext* (*cg)(void), - JNIEnv* (*eg)(void)); - -static inline void load_env() { - if (jniEnv == NULL) { - jni = context_getter(); - jniEnv = env_getter(); - } -} - static inline jthrowable check_exception() { jthrowable exception = (*jniEnv)->ExceptionOccurred(jniEnv); if (exception != NULL) (*jniEnv)->ExceptionClear(jniEnv); @@ -381,3 +368,31 @@ static inline JniResult to_global_ref_result(jobject ref) { } return result; } + +FFI_PLUGIN_EXPORT intptr_t InitDartApiDL(void* data); + +FFI_PLUGIN_EXPORT +JniResult DartException__ctor(jstring message); + +FFI_PLUGIN_EXPORT +JniResult PortContinuation__ctor(int64_t j); + +FFI_PLUGIN_EXPORT +JniResult PortProxy__newInstance(jobject binaryName, + int64_t port, + int64_t functionPtr); + +FFI_PLUGIN_EXPORT void resultFor(CallbackResult* result, jobject object); + +FFI_PLUGIN_EXPORT +Dart_FinalizableHandle newJObjectFinalizableHandle(Dart_Handle object, + jobject reference, + jobjectRefType refType); + +FFI_PLUGIN_EXPORT +Dart_FinalizableHandle newBooleanFinalizableHandle(Dart_Handle object, + bool* reference); + +FFI_PLUGIN_EXPORT +void deleteFinalizableHandle(Dart_FinalizableHandle finalizableHandle, + Dart_Handle object); diff --git a/pkgs/jni/src/internal.c b/pkgs/jni/src/internal.c deleted file mode 100644 index fad71c46ca..0000000000 --- a/pkgs/jni/src/internal.c +++ /dev/null @@ -1,248 +0,0 @@ - -// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -#include "internal.h" - -FFI_PLUGIN_EXPORT intptr_t InitDartApiDL(void* data) { - return Dart_InitializeApiDL(data); -} - -// com.github.dart_lang.jni.DartException -jclass _c_DartException = NULL; - -jmethodID _m_DartException__ctor = NULL; -FFI_PLUGIN_EXPORT JniResult DartException__ctor(jstring message) { - attach_thread(); - load_class_global_ref(&_c_DartException, - "com/github/dart_lang/jni/PortProxy$DartException"); - if (_c_DartException == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_DartException, &_m_DartException__ctor, "", - "(Ljava/lang/String;)V"); - if (_m_DartException__ctor == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_DartException, - _m_DartException__ctor, message); - jthrowable exception = check_exception(); - if (exception == NULL) { - _result = to_global_ref(_result); - } - return (JniResult){.value = {.l = _result}, .exception = check_exception()}; -} - -JNIEXPORT void JNICALL -Java_com_github_dart_1lang_jni_PortContinuation__1resumeWith(JNIEnv* env, - jclass clazz, - jlong port, - jobject result) { - attach_thread(); - Dart_CObject c_post; - c_post.type = Dart_CObject_kInt64; - c_post.value.as_int64 = (jlong)((*env)->NewGlobalRef(env, result)); - Dart_PostCObject_DL(port, &c_post); -} - -// com.github.dart_lang.jni.PortContinuation -jclass _c_PortContinuation = NULL; - -jmethodID _m_PortContinuation__ctor = NULL; -FFI_PLUGIN_EXPORT -JniResult PortContinuation__ctor(int64_t j) { - attach_thread(); - load_class_global_ref(&_c_PortContinuation, - "com/github/dart_lang/jni/PortContinuation"); - if (_c_PortContinuation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PortContinuation, &_m_PortContinuation__ctor, "", - "(J)V"); - if (_m_PortContinuation__ctor == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_PortContinuation, - _m_PortContinuation__ctor, j); - jthrowable exception = check_exception(); - if (exception == NULL) { - _result = to_global_ref(_result); - } - return (JniResult){.value = {.l = _result}, .exception = check_exception()}; -} - -// com.github.dart_lang.jni.PortProxy -jclass _c_PortProxy = NULL; - -jmethodID _m_PortProxy__newInstance = NULL; -FFI_PLUGIN_EXPORT -JniResult PortProxy__newInstance(jobject binaryName, - int64_t port, - int64_t functionPtr) { - attach_thread(); - load_class_global_ref(&_c_PortProxy, "com/github/dart_lang/jni/PortProxy"); - if (_c_PortProxy == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_PortProxy, &_m_PortProxy__newInstance, "newInstance", - "(Ljava/lang/String;JJJ)Ljava/lang/Object;"); - if (_m_PortProxy__newInstance == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_PortProxy, _m_PortProxy__newInstance, binaryName, port, - (jlong)Dart_CurrentIsolate_DL(), functionPtr); - return to_global_ref_result(_result); -} - -FFI_PLUGIN_EXPORT -void resultFor(CallbackResult* result, jobject object) { - acquire_lock(&result->lock); - result->ready = 1; - result->object = object; - signal_cond(&result->cond); - release_lock(&result->lock); -} - -void doNotFinalize(void* isolate_callback_data, void* peer) {} - -void finalizeLocal(void* isolate_callback_data, void* peer) { - attach_thread(); - (*jniEnv)->DeleteLocalRef(jniEnv, peer); -} - -void finalizeGlobal(void* isolate_callback_data, void* peer) { - attach_thread(); - (*jniEnv)->DeleteGlobalRef(jniEnv, peer); -} - -void finalizeWeakGlobal(void* isolate_callback_data, void* peer) { - attach_thread(); - (*jniEnv)->DeleteWeakGlobalRef(jniEnv, peer); -} - -void freeBoolean(void* isolate_callback_data, void* peer) { - // To match the platform implementation of Dart's calloc. - free_mem(peer); -} - -FFI_PLUGIN_EXPORT -Dart_FinalizableHandle newJObjectFinalizableHandle(Dart_Handle object, - jobject reference, - jobjectRefType refType) { - switch (refType) { - case JNIInvalidRefType: - return Dart_NewFinalizableHandle_DL(object, reference, 0, doNotFinalize); - case JNILocalRefType: - return Dart_NewFinalizableHandle_DL(object, reference, 0, finalizeLocal); - case JNIGlobalRefType: - return Dart_NewFinalizableHandle_DL(object, reference, 0, finalizeGlobal); - case JNIWeakGlobalRefType: - return Dart_NewFinalizableHandle_DL(object, reference, 0, - finalizeWeakGlobal); - } -} - -FFI_PLUGIN_EXPORT -Dart_FinalizableHandle newBooleanFinalizableHandle(Dart_Handle object, - bool* reference) { - return Dart_NewFinalizableHandle_DL(object, reference, 1, freeBoolean); -} - -FFI_PLUGIN_EXPORT -void deleteFinalizableHandle(Dart_FinalizableHandle finalizableHandle, - Dart_Handle object) { - return Dart_DeleteFinalizableHandle_DL(finalizableHandle, object); -} - -jclass _c_Object = NULL; -jclass _c_Long = NULL; - -jmethodID _m_Long_init = NULL; - -JNIEXPORT jobjectArray JNICALL -Java_com_github_dart_1lang_jni_PortProxy__1invoke(JNIEnv* env, - jclass clazz, - jlong port, - jlong isolateId, - jlong functionPtr, - jobject proxy, - jstring methodDescriptor, - jobjectArray args) { - CallbackResult* result = (CallbackResult*)malloc(sizeof(CallbackResult)); - if (isolateId != (jlong)Dart_CurrentIsolate_DL()) { - init_lock(&result->lock); - init_cond(&result->cond); - acquire_lock(&result->lock); - result->ready = 0; - result->object = NULL; - - Dart_CObject c_result; - c_result.type = Dart_CObject_kInt64; - c_result.value.as_int64 = (jlong)result; - - Dart_CObject c_method; - c_method.type = Dart_CObject_kInt64; - c_method.value.as_int64 = - (jlong)((*env)->NewGlobalRef(env, methodDescriptor)); - - Dart_CObject c_args; - c_args.type = Dart_CObject_kInt64; - c_args.value.as_int64 = (jlong)((*env)->NewGlobalRef(env, args)); - - Dart_CObject* c_post_arr[] = {&c_result, &c_method, &c_args}; - Dart_CObject c_post; - c_post.type = Dart_CObject_kArray; - c_post.value.as_array.values = c_post_arr; - c_post.value.as_array.length = sizeof(c_post_arr) / sizeof(c_post_arr[0]); - - Dart_PostCObject_DL(port, &c_post); - - while (!result->ready) { - wait_for(&result->cond, &result->lock); - } - - release_lock(&result->lock); - destroy_lock(&result->lock); - destroy_cond(&result->cond); - } else { - result->object = ((jobject(*)(uint64_t, jobject, jobject))functionPtr)( - port, (*env)->NewGlobalRef(env, methodDescriptor), - (*env)->NewGlobalRef(env, args)); - } - // Returning an array of length 2. - // [0]: The result pointer, used for cleaning up the global reference, and - // freeing the memory since we passed the ownership to Java. - // [1]: The returned object. - attach_thread(); - load_class_global_ref(&_c_Object, "java/lang/Object"); - load_class_global_ref(&_c_Long, "java/lang/Long"); - load_method(_c_Long, &_m_Long_init, "", "(J)V"); - jobject first = (*env)->NewObject(env, _c_Long, _m_Long_init, (jlong)result); - jobject second = result->object; - jobjectArray arr = (*env)->NewObjectArray(env, 2, _c_Object, NULL); - (*env)->SetObjectArrayElement(env, arr, 0, first); - (*env)->SetObjectArrayElement(env, arr, 1, second); - return arr; -} - -JNIEXPORT void JNICALL -Java_com_github_dart_1lang_jni_PortProxy__1cleanUp(JNIEnv* env, - jclass clazz, - jlong resultPtr) { - CallbackResult* result = (CallbackResult*)resultPtr; - (*env)->DeleteGlobalRef(env, result->object); - free(result); -} - -JNIEXPORT void JNICALL -Java_com_github_dart_1lang_jni_PortCleaner_clean(JNIEnv* env, - jclass clazz, - jlong port) { - Dart_CObject close_signal; - close_signal.type = Dart_CObject_kNull; - Dart_PostCObject_DL(port, &close_signal); -} - -JNIEXPORT jobject JNICALL -Java_com_github_dart_1lang_jni_JniUtils_fromReferenceAddress(JNIEnv* env, - jclass clazz, - jlong id) { - attach_thread(); - return (jobject)(id); -} diff --git a/pkgs/jni/src/internal.h b/pkgs/jni/src/internal.h deleted file mode 100644 index 8aea7426ef..0000000000 --- a/pkgs/jni/src/internal.h +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// TODO(#660): Temporarily separated from dartjni.h to prevent unnecessary -// copies for based bindings. Will be merged with dartjni.h once the C-based -// bindings are removed. - -#pragma once - -#include "dartjni.h" -#include "include/dart_api_dl.h" - -FFI_PLUGIN_EXPORT intptr_t InitDartApiDL(void* data); - -FFI_PLUGIN_EXPORT -JniResult DartException__ctor(jstring message); - -FFI_PLUGIN_EXPORT -JniResult PortContinuation__ctor(int64_t j); - -FFI_PLUGIN_EXPORT -JniResult PortProxy__newInstance(jobject binaryName, - int64_t port, - int64_t functionPtr); - -FFI_PLUGIN_EXPORT void resultFor(CallbackResult* result, jobject object); - -FFI_PLUGIN_EXPORT -Dart_FinalizableHandle newJObjectFinalizableHandle(Dart_Handle object, - jobject reference, - jobjectRefType refType); - -FFI_PLUGIN_EXPORT -Dart_FinalizableHandle newBooleanFinalizableHandle(Dart_Handle object, - bool* reference); - -FFI_PLUGIN_EXPORT -void deleteFinalizableHandle(Dart_FinalizableHandle finalizableHandle, - Dart_Handle object); diff --git a/pkgs/jni/src/third_party/global_jni_env.c b/pkgs/jni/src/third_party/global_jni_env.c index 7ddc16414d..70fc7697b6 100644 --- a/pkgs/jni/src/third_party/global_jni_env.c +++ b/pkgs/jni/src/third_party/global_jni_env.c @@ -3,6 +3,9 @@ // This is generated from JNI header in Android NDK. License for the same is // provided below. +// Generation logic resides in `tool/wrapper_generators`. +// To regenerate, run `dart run tool/generate_ffi_bindings.dart`. + /* * Copyright (C) 2006 The Android Open Source Project * @@ -272,9 +275,14 @@ JniResult globalEnv_AllocObject(jclass clazz) { return (JniResult){.value = {.l = _result}, .exception = NULL}; } -JniResult globalEnv_NewObject(jclass clazz, jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult globalEnv_NewObject(jclass clazz, + jmethodID methodID, + ...) { attach_thread(); - jobject _result = (*jniEnv)->NewObject(jniEnv, clazz, methodID); + va_list args; + va_start(args, methodID); + jobject _result = (*jniEnv)->NewObjectV(jniEnv, clazz, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -325,9 +333,14 @@ JniPointerResult globalEnv_GetMethodID(jclass clazz, char* name, char* sig) { return (JniPointerResult){.value = _result, .exception = NULL}; } -JniResult globalEnv_CallObjectMethod(jobject obj, jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult globalEnv_CallObjectMethod(jobject obj, + jmethodID methodID, + ...) { attach_thread(); - jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, obj, methodID); + va_list args; + va_start(args, methodID); + jobject _result = (*jniEnv)->CallObjectMethodV(jniEnv, obj, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -349,9 +362,14 @@ JniResult globalEnv_CallObjectMethodA(jobject obj, return (JniResult){.value = {.l = _result}, .exception = NULL}; } -JniResult globalEnv_CallBooleanMethod(jobject obj, jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult globalEnv_CallBooleanMethod(jobject obj, + jmethodID methodID, + ...) { attach_thread(); - jboolean _result = (*jniEnv)->CallBooleanMethod(jniEnv, obj, methodID); + va_list args; + va_start(args, methodID); + jboolean _result = (*jniEnv)->CallBooleanMethodV(jniEnv, obj, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -371,9 +389,14 @@ JniResult globalEnv_CallBooleanMethodA(jobject obj, return (JniResult){.value = {.z = _result}, .exception = NULL}; } -JniResult globalEnv_CallByteMethod(jobject obj, jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult globalEnv_CallByteMethod(jobject obj, + jmethodID methodID, + ...) { attach_thread(); - jbyte _result = (*jniEnv)->CallByteMethod(jniEnv, obj, methodID); + va_list args; + va_start(args, methodID); + jbyte _result = (*jniEnv)->CallByteMethodV(jniEnv, obj, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -393,9 +416,14 @@ JniResult globalEnv_CallByteMethodA(jobject obj, return (JniResult){.value = {.b = _result}, .exception = NULL}; } -JniResult globalEnv_CallCharMethod(jobject obj, jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult globalEnv_CallCharMethod(jobject obj, + jmethodID methodID, + ...) { attach_thread(); - jchar _result = (*jniEnv)->CallCharMethod(jniEnv, obj, methodID); + va_list args; + va_start(args, methodID); + jchar _result = (*jniEnv)->CallCharMethodV(jniEnv, obj, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -415,9 +443,14 @@ JniResult globalEnv_CallCharMethodA(jobject obj, return (JniResult){.value = {.c = _result}, .exception = NULL}; } -JniResult globalEnv_CallShortMethod(jobject obj, jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult globalEnv_CallShortMethod(jobject obj, + jmethodID methodID, + ...) { attach_thread(); - jshort _result = (*jniEnv)->CallShortMethod(jniEnv, obj, methodID); + va_list args; + va_start(args, methodID); + jshort _result = (*jniEnv)->CallShortMethodV(jniEnv, obj, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -437,9 +470,14 @@ JniResult globalEnv_CallShortMethodA(jobject obj, return (JniResult){.value = {.s = _result}, .exception = NULL}; } -JniResult globalEnv_CallIntMethod(jobject obj, jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult globalEnv_CallIntMethod(jobject obj, + jmethodID methodID, + ...) { attach_thread(); - jint _result = (*jniEnv)->CallIntMethod(jniEnv, obj, methodID); + va_list args; + va_start(args, methodID); + jint _result = (*jniEnv)->CallIntMethodV(jniEnv, obj, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -459,9 +497,14 @@ JniResult globalEnv_CallIntMethodA(jobject obj, return (JniResult){.value = {.i = _result}, .exception = NULL}; } -JniResult globalEnv_CallLongMethod(jobject obj, jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult globalEnv_CallLongMethod(jobject obj, + jmethodID methodID, + ...) { attach_thread(); - jlong _result = (*jniEnv)->CallLongMethod(jniEnv, obj, methodID); + va_list args; + va_start(args, methodID); + jlong _result = (*jniEnv)->CallLongMethodV(jniEnv, obj, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -481,9 +524,14 @@ JniResult globalEnv_CallLongMethodA(jobject obj, return (JniResult){.value = {.j = _result}, .exception = NULL}; } -JniResult globalEnv_CallFloatMethod(jobject obj, jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult globalEnv_CallFloatMethod(jobject obj, + jmethodID methodID, + ...) { attach_thread(); - jfloat _result = (*jniEnv)->CallFloatMethod(jniEnv, obj, methodID); + va_list args; + va_start(args, methodID); + jfloat _result = (*jniEnv)->CallFloatMethodV(jniEnv, obj, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -503,9 +551,14 @@ JniResult globalEnv_CallFloatMethodA(jobject obj, return (JniResult){.value = {.f = _result}, .exception = NULL}; } -JniResult globalEnv_CallDoubleMethod(jobject obj, jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult globalEnv_CallDoubleMethod(jobject obj, + jmethodID methodID, + ...) { attach_thread(); - jdouble _result = (*jniEnv)->CallDoubleMethod(jniEnv, obj, methodID); + va_list args; + va_start(args, methodID); + jdouble _result = (*jniEnv)->CallDoubleMethodV(jniEnv, obj, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -525,9 +578,14 @@ JniResult globalEnv_CallDoubleMethodA(jobject obj, return (JniResult){.value = {.d = _result}, .exception = NULL}; } -jthrowable globalEnv_CallVoidMethod(jobject obj, jmethodID methodID) { +FFI_PLUGIN_EXPORT jthrowable globalEnv_CallVoidMethod(jobject obj, + jmethodID methodID, + ...) { attach_thread(); - (*jniEnv)->CallVoidMethod(jniEnv, obj, methodID); + va_list args; + va_start(args, methodID); + (*jniEnv)->CallVoidMethodV(jniEnv, obj, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return _exception; @@ -547,12 +605,17 @@ jthrowable globalEnv_CallVoidMethodA(jobject obj, return NULL; } -JniResult globalEnv_CallNonvirtualObjectMethod(jobject obj, - jclass clazz, - jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult +globalEnv_CallNonvirtualObjectMethod(jobject obj, + jclass clazz, + jmethodID methodID, + ...) { attach_thread(); - jobject _result = - (*jniEnv)->CallNonvirtualObjectMethod(jniEnv, obj, clazz, methodID); + va_list args; + va_start(args, methodID); + jobject _result = (*jniEnv)->CallNonvirtualObjectMethodV(jniEnv, obj, clazz, + methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -576,12 +639,17 @@ JniResult globalEnv_CallNonvirtualObjectMethodA(jobject obj, return (JniResult){.value = {.l = _result}, .exception = NULL}; } -JniResult globalEnv_CallNonvirtualBooleanMethod(jobject obj, - jclass clazz, - jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult +globalEnv_CallNonvirtualBooleanMethod(jobject obj, + jclass clazz, + jmethodID methodID, + ...) { attach_thread(); - jboolean _result = - (*jniEnv)->CallNonvirtualBooleanMethod(jniEnv, obj, clazz, methodID); + va_list args; + va_start(args, methodID); + jboolean _result = (*jniEnv)->CallNonvirtualBooleanMethodV(jniEnv, obj, clazz, + methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -603,12 +671,17 @@ JniResult globalEnv_CallNonvirtualBooleanMethodA(jobject obj, return (JniResult){.value = {.z = _result}, .exception = NULL}; } -JniResult globalEnv_CallNonvirtualByteMethod(jobject obj, - jclass clazz, - jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult +globalEnv_CallNonvirtualByteMethod(jobject obj, + jclass clazz, + jmethodID methodID, + ...) { attach_thread(); + va_list args; + va_start(args, methodID); jbyte _result = - (*jniEnv)->CallNonvirtualByteMethod(jniEnv, obj, clazz, methodID); + (*jniEnv)->CallNonvirtualByteMethodV(jniEnv, obj, clazz, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -630,12 +703,17 @@ JniResult globalEnv_CallNonvirtualByteMethodA(jobject obj, return (JniResult){.value = {.b = _result}, .exception = NULL}; } -JniResult globalEnv_CallNonvirtualCharMethod(jobject obj, - jclass clazz, - jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult +globalEnv_CallNonvirtualCharMethod(jobject obj, + jclass clazz, + jmethodID methodID, + ...) { attach_thread(); + va_list args; + va_start(args, methodID); jchar _result = - (*jniEnv)->CallNonvirtualCharMethod(jniEnv, obj, clazz, methodID); + (*jniEnv)->CallNonvirtualCharMethodV(jniEnv, obj, clazz, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -657,12 +735,17 @@ JniResult globalEnv_CallNonvirtualCharMethodA(jobject obj, return (JniResult){.value = {.c = _result}, .exception = NULL}; } -JniResult globalEnv_CallNonvirtualShortMethod(jobject obj, - jclass clazz, - jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult +globalEnv_CallNonvirtualShortMethod(jobject obj, + jclass clazz, + jmethodID methodID, + ...) { attach_thread(); + va_list args; + va_start(args, methodID); jshort _result = - (*jniEnv)->CallNonvirtualShortMethod(jniEnv, obj, clazz, methodID); + (*jniEnv)->CallNonvirtualShortMethodV(jniEnv, obj, clazz, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -684,12 +767,17 @@ JniResult globalEnv_CallNonvirtualShortMethodA(jobject obj, return (JniResult){.value = {.s = _result}, .exception = NULL}; } -JniResult globalEnv_CallNonvirtualIntMethod(jobject obj, - jclass clazz, - jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult +globalEnv_CallNonvirtualIntMethod(jobject obj, + jclass clazz, + jmethodID methodID, + ...) { attach_thread(); + va_list args; + va_start(args, methodID); jint _result = - (*jniEnv)->CallNonvirtualIntMethod(jniEnv, obj, clazz, methodID); + (*jniEnv)->CallNonvirtualIntMethodV(jniEnv, obj, clazz, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -711,12 +799,17 @@ JniResult globalEnv_CallNonvirtualIntMethodA(jobject obj, return (JniResult){.value = {.i = _result}, .exception = NULL}; } -JniResult globalEnv_CallNonvirtualLongMethod(jobject obj, - jclass clazz, - jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult +globalEnv_CallNonvirtualLongMethod(jobject obj, + jclass clazz, + jmethodID methodID, + ...) { attach_thread(); + va_list args; + va_start(args, methodID); jlong _result = - (*jniEnv)->CallNonvirtualLongMethod(jniEnv, obj, clazz, methodID); + (*jniEnv)->CallNonvirtualLongMethodV(jniEnv, obj, clazz, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -738,12 +831,17 @@ JniResult globalEnv_CallNonvirtualLongMethodA(jobject obj, return (JniResult){.value = {.j = _result}, .exception = NULL}; } -JniResult globalEnv_CallNonvirtualFloatMethod(jobject obj, - jclass clazz, - jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult +globalEnv_CallNonvirtualFloatMethod(jobject obj, + jclass clazz, + jmethodID methodID, + ...) { attach_thread(); + va_list args; + va_start(args, methodID); jfloat _result = - (*jniEnv)->CallNonvirtualFloatMethod(jniEnv, obj, clazz, methodID); + (*jniEnv)->CallNonvirtualFloatMethodV(jniEnv, obj, clazz, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -765,12 +863,17 @@ JniResult globalEnv_CallNonvirtualFloatMethodA(jobject obj, return (JniResult){.value = {.f = _result}, .exception = NULL}; } -JniResult globalEnv_CallNonvirtualDoubleMethod(jobject obj, - jclass clazz, - jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult +globalEnv_CallNonvirtualDoubleMethod(jobject obj, + jclass clazz, + jmethodID methodID, + ...) { attach_thread(); - jdouble _result = - (*jniEnv)->CallNonvirtualDoubleMethod(jniEnv, obj, clazz, methodID); + va_list args; + va_start(args, methodID); + jdouble _result = (*jniEnv)->CallNonvirtualDoubleMethodV(jniEnv, obj, clazz, + methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -792,11 +895,16 @@ JniResult globalEnv_CallNonvirtualDoubleMethodA(jobject obj, return (JniResult){.value = {.d = _result}, .exception = NULL}; } -jthrowable globalEnv_CallNonvirtualVoidMethod(jobject obj, - jclass clazz, - jmethodID methodID) { +FFI_PLUGIN_EXPORT jthrowable +globalEnv_CallNonvirtualVoidMethod(jobject obj, + jclass clazz, + jmethodID methodID, + ...) { attach_thread(); - (*jniEnv)->CallNonvirtualVoidMethod(jniEnv, obj, clazz, methodID); + va_list args; + va_start(args, methodID); + (*jniEnv)->CallNonvirtualVoidMethodV(jniEnv, obj, clazz, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return _exception; @@ -1026,9 +1134,15 @@ JniPointerResult globalEnv_GetStaticMethodID(jclass clazz, return (JniPointerResult){.value = _result, .exception = NULL}; } -JniResult globalEnv_CallStaticObjectMethod(jclass clazz, jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult globalEnv_CallStaticObjectMethod(jclass clazz, + jmethodID methodID, + ...) { attach_thread(); - jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, clazz, methodID); + va_list args; + va_start(args, methodID); + jobject _result = + (*jniEnv)->CallStaticObjectMethodV(jniEnv, clazz, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -1051,10 +1165,14 @@ JniResult globalEnv_CallStaticObjectMethodA(jclass clazz, return (JniResult){.value = {.l = _result}, .exception = NULL}; } -JniResult globalEnv_CallStaticBooleanMethod(jclass clazz, jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult +globalEnv_CallStaticBooleanMethod(jclass clazz, jmethodID methodID, ...) { attach_thread(); + va_list args; + va_start(args, methodID); jboolean _result = - (*jniEnv)->CallStaticBooleanMethod(jniEnv, clazz, methodID); + (*jniEnv)->CallStaticBooleanMethodV(jniEnv, clazz, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -1075,9 +1193,15 @@ JniResult globalEnv_CallStaticBooleanMethodA(jclass clazz, return (JniResult){.value = {.z = _result}, .exception = NULL}; } -JniResult globalEnv_CallStaticByteMethod(jclass clazz, jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult globalEnv_CallStaticByteMethod(jclass clazz, + jmethodID methodID, + ...) { attach_thread(); - jbyte _result = (*jniEnv)->CallStaticByteMethod(jniEnv, clazz, methodID); + va_list args; + va_start(args, methodID); + jbyte _result = + (*jniEnv)->CallStaticByteMethodV(jniEnv, clazz, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -1098,9 +1222,15 @@ JniResult globalEnv_CallStaticByteMethodA(jclass clazz, return (JniResult){.value = {.b = _result}, .exception = NULL}; } -JniResult globalEnv_CallStaticCharMethod(jclass clazz, jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult globalEnv_CallStaticCharMethod(jclass clazz, + jmethodID methodID, + ...) { attach_thread(); - jchar _result = (*jniEnv)->CallStaticCharMethod(jniEnv, clazz, methodID); + va_list args; + va_start(args, methodID); + jchar _result = + (*jniEnv)->CallStaticCharMethodV(jniEnv, clazz, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -1121,9 +1251,15 @@ JniResult globalEnv_CallStaticCharMethodA(jclass clazz, return (JniResult){.value = {.c = _result}, .exception = NULL}; } -JniResult globalEnv_CallStaticShortMethod(jclass clazz, jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult globalEnv_CallStaticShortMethod(jclass clazz, + jmethodID methodID, + ...) { attach_thread(); - jshort _result = (*jniEnv)->CallStaticShortMethod(jniEnv, clazz, methodID); + va_list args; + va_start(args, methodID); + jshort _result = + (*jniEnv)->CallStaticShortMethodV(jniEnv, clazz, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -1144,9 +1280,14 @@ JniResult globalEnv_CallStaticShortMethodA(jclass clazz, return (JniResult){.value = {.s = _result}, .exception = NULL}; } -JniResult globalEnv_CallStaticIntMethod(jclass clazz, jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult globalEnv_CallStaticIntMethod(jclass clazz, + jmethodID methodID, + ...) { attach_thread(); - jint _result = (*jniEnv)->CallStaticIntMethod(jniEnv, clazz, methodID); + va_list args; + va_start(args, methodID); + jint _result = (*jniEnv)->CallStaticIntMethodV(jniEnv, clazz, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -1166,9 +1307,15 @@ JniResult globalEnv_CallStaticIntMethodA(jclass clazz, return (JniResult){.value = {.i = _result}, .exception = NULL}; } -JniResult globalEnv_CallStaticLongMethod(jclass clazz, jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult globalEnv_CallStaticLongMethod(jclass clazz, + jmethodID methodID, + ...) { attach_thread(); - jlong _result = (*jniEnv)->CallStaticLongMethod(jniEnv, clazz, methodID); + va_list args; + va_start(args, methodID); + jlong _result = + (*jniEnv)->CallStaticLongMethodV(jniEnv, clazz, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -1189,9 +1336,15 @@ JniResult globalEnv_CallStaticLongMethodA(jclass clazz, return (JniResult){.value = {.j = _result}, .exception = NULL}; } -JniResult globalEnv_CallStaticFloatMethod(jclass clazz, jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult globalEnv_CallStaticFloatMethod(jclass clazz, + jmethodID methodID, + ...) { attach_thread(); - jfloat _result = (*jniEnv)->CallStaticFloatMethod(jniEnv, clazz, methodID); + va_list args; + va_start(args, methodID); + jfloat _result = + (*jniEnv)->CallStaticFloatMethodV(jniEnv, clazz, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -1212,9 +1365,15 @@ JniResult globalEnv_CallStaticFloatMethodA(jclass clazz, return (JniResult){.value = {.f = _result}, .exception = NULL}; } -JniResult globalEnv_CallStaticDoubleMethod(jclass clazz, jmethodID methodID) { +FFI_PLUGIN_EXPORT JniResult globalEnv_CallStaticDoubleMethod(jclass clazz, + jmethodID methodID, + ...) { attach_thread(); - jdouble _result = (*jniEnv)->CallStaticDoubleMethod(jniEnv, clazz, methodID); + va_list args; + va_start(args, methodID); + jdouble _result = + (*jniEnv)->CallStaticDoubleMethodV(jniEnv, clazz, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return (JniResult){.value = {.j = 0}, .exception = _exception}; @@ -1235,9 +1394,14 @@ JniResult globalEnv_CallStaticDoubleMethodA(jclass clazz, return (JniResult){.value = {.d = _result}, .exception = NULL}; } -jthrowable globalEnv_CallStaticVoidMethod(jclass clazz, jmethodID methodID) { +FFI_PLUGIN_EXPORT jthrowable globalEnv_CallStaticVoidMethod(jclass clazz, + jmethodID methodID, + ...) { attach_thread(); - (*jniEnv)->CallStaticVoidMethod(jniEnv, clazz, methodID); + va_list args; + va_start(args, methodID); + (*jniEnv)->CallStaticVoidMethodV(jniEnv, clazz, methodID, args); + va_end(args); jthrowable _exception = check_exception(); if (_exception != NULL) { return _exception; diff --git a/pkgs/jni/src/third_party/global_jni_env.h b/pkgs/jni/src/third_party/global_jni_env.h index 562b1bf648..041718c696 100644 --- a/pkgs/jni/src/third_party/global_jni_env.h +++ b/pkgs/jni/src/third_party/global_jni_env.h @@ -3,6 +3,9 @@ // This is generated from JNI header in Android NDK. License for the same is // provided below. +// Generation logic resides in `tool/wrapper_generators`. +// To regenerate, run `dart run tool/generate_ffi_bindings.dart`. + /* * Copyright (C) 2006 The Android Open Source Project * @@ -65,47 +68,48 @@ typedef struct GlobalJniEnvStruct { JniResult (*NewLocalRef)(jobject obj); JniResult (*EnsureLocalCapacity)(jint capacity); JniResult (*AllocObject)(jclass clazz); - JniResult (*NewObject)(jclass clazz, jmethodID methodID); + JniResult (*NewObject)(jclass clazz, jmethodID methodID, ...); JniResult (*NewObjectV)(jclass, jmethodID, void*); JniResult (*NewObjectA)(jclass clazz, jmethodID methodID, jvalue* args); JniClassLookupResult (*GetObjectClass)(jobject obj); JniResult (*IsInstanceOf)(jobject obj, jclass clazz); JniPointerResult (*GetMethodID)(jclass clazz, char* name, char* sig); - JniResult (*CallObjectMethod)(jobject obj, jmethodID methodID); + JniResult (*CallObjectMethod)(jobject obj, jmethodID methodID, ...); JniResult (*CallObjectMethodV)(jobject, jmethodID, void*); JniResult (*CallObjectMethodA)(jobject obj, jmethodID methodID, jvalue* args); - JniResult (*CallBooleanMethod)(jobject obj, jmethodID methodID); + JniResult (*CallBooleanMethod)(jobject obj, jmethodID methodID, ...); JniResult (*CallBooleanMethodV)(jobject, jmethodID, void*); JniResult (*CallBooleanMethodA)(jobject obj, jmethodID methodId, jvalue* args); - JniResult (*CallByteMethod)(jobject obj, jmethodID methodID); + JniResult (*CallByteMethod)(jobject obj, jmethodID methodID, ...); JniResult (*CallByteMethodV)(jobject, jmethodID, void*); JniResult (*CallByteMethodA)(jobject obj, jmethodID methodID, jvalue* args); - JniResult (*CallCharMethod)(jobject obj, jmethodID methodID); + JniResult (*CallCharMethod)(jobject obj, jmethodID methodID, ...); JniResult (*CallCharMethodV)(jobject, jmethodID, void*); JniResult (*CallCharMethodA)(jobject obj, jmethodID methodID, jvalue* args); - JniResult (*CallShortMethod)(jobject obj, jmethodID methodID); + JniResult (*CallShortMethod)(jobject obj, jmethodID methodID, ...); JniResult (*CallShortMethodV)(jobject, jmethodID, void*); JniResult (*CallShortMethodA)(jobject obj, jmethodID methodID, jvalue* args); - JniResult (*CallIntMethod)(jobject obj, jmethodID methodID); + JniResult (*CallIntMethod)(jobject obj, jmethodID methodID, ...); JniResult (*CallIntMethodV)(jobject, jmethodID, void*); JniResult (*CallIntMethodA)(jobject obj, jmethodID methodID, jvalue* args); - JniResult (*CallLongMethod)(jobject obj, jmethodID methodID); + JniResult (*CallLongMethod)(jobject obj, jmethodID methodID, ...); JniResult (*CallLongMethodV)(jobject, jmethodID, void*); JniResult (*CallLongMethodA)(jobject obj, jmethodID methodID, jvalue* args); - JniResult (*CallFloatMethod)(jobject obj, jmethodID methodID); + JniResult (*CallFloatMethod)(jobject obj, jmethodID methodID, ...); JniResult (*CallFloatMethodV)(jobject, jmethodID, void*); JniResult (*CallFloatMethodA)(jobject obj, jmethodID methodID, jvalue* args); - JniResult (*CallDoubleMethod)(jobject obj, jmethodID methodID); + JniResult (*CallDoubleMethod)(jobject obj, jmethodID methodID, ...); JniResult (*CallDoubleMethodV)(jobject, jmethodID, void*); JniResult (*CallDoubleMethodA)(jobject obj, jmethodID methodID, jvalue* args); - jthrowable (*CallVoidMethod)(jobject obj, jmethodID methodID); + jthrowable (*CallVoidMethod)(jobject obj, jmethodID methodID, ...); jthrowable (*CallVoidMethodV)(jobject, jmethodID, void*); jthrowable (*CallVoidMethodA)(jobject obj, jmethodID methodID, jvalue* args); JniResult (*CallNonvirtualObjectMethod)(jobject obj, jclass clazz, - jmethodID methodID); + jmethodID methodID, + ...); JniResult (*CallNonvirtualObjectMethodV)(jobject, jclass, jmethodID, void*); JniResult (*CallNonvirtualObjectMethodA)(jobject obj, jclass clazz, @@ -113,7 +117,8 @@ typedef struct GlobalJniEnvStruct { jvalue* args); JniResult (*CallNonvirtualBooleanMethod)(jobject obj, jclass clazz, - jmethodID methodID); + jmethodID methodID, + ...); JniResult (*CallNonvirtualBooleanMethodV)(jobject, jclass, jmethodID, void*); JniResult (*CallNonvirtualBooleanMethodA)(jobject obj, jclass clazz, @@ -121,7 +126,8 @@ typedef struct GlobalJniEnvStruct { jvalue* args); JniResult (*CallNonvirtualByteMethod)(jobject obj, jclass clazz, - jmethodID methodID); + jmethodID methodID, + ...); JniResult (*CallNonvirtualByteMethodV)(jobject, jclass, jmethodID, void*); JniResult (*CallNonvirtualByteMethodA)(jobject obj, jclass clazz, @@ -129,7 +135,8 @@ typedef struct GlobalJniEnvStruct { jvalue* args); JniResult (*CallNonvirtualCharMethod)(jobject obj, jclass clazz, - jmethodID methodID); + jmethodID methodID, + ...); JniResult (*CallNonvirtualCharMethodV)(jobject, jclass, jmethodID, void*); JniResult (*CallNonvirtualCharMethodA)(jobject obj, jclass clazz, @@ -137,7 +144,8 @@ typedef struct GlobalJniEnvStruct { jvalue* args); JniResult (*CallNonvirtualShortMethod)(jobject obj, jclass clazz, - jmethodID methodID); + jmethodID methodID, + ...); JniResult (*CallNonvirtualShortMethodV)(jobject, jclass, jmethodID, void*); JniResult (*CallNonvirtualShortMethodA)(jobject obj, jclass clazz, @@ -145,7 +153,8 @@ typedef struct GlobalJniEnvStruct { jvalue* args); JniResult (*CallNonvirtualIntMethod)(jobject obj, jclass clazz, - jmethodID methodID); + jmethodID methodID, + ...); JniResult (*CallNonvirtualIntMethodV)(jobject, jclass, jmethodID, void*); JniResult (*CallNonvirtualIntMethodA)(jobject obj, jclass clazz, @@ -153,7 +162,8 @@ typedef struct GlobalJniEnvStruct { jvalue* args); JniResult (*CallNonvirtualLongMethod)(jobject obj, jclass clazz, - jmethodID methodID); + jmethodID methodID, + ...); JniResult (*CallNonvirtualLongMethodV)(jobject, jclass, jmethodID, void*); JniResult (*CallNonvirtualLongMethodA)(jobject obj, jclass clazz, @@ -161,7 +171,8 @@ typedef struct GlobalJniEnvStruct { jvalue* args); JniResult (*CallNonvirtualFloatMethod)(jobject obj, jclass clazz, - jmethodID methodID); + jmethodID methodID, + ...); JniResult (*CallNonvirtualFloatMethodV)(jobject, jclass, jmethodID, void*); JniResult (*CallNonvirtualFloatMethodA)(jobject obj, jclass clazz, @@ -169,7 +180,8 @@ typedef struct GlobalJniEnvStruct { jvalue* args); JniResult (*CallNonvirtualDoubleMethod)(jobject obj, jclass clazz, - jmethodID methodID); + jmethodID methodID, + ...); JniResult (*CallNonvirtualDoubleMethodV)(jobject, jclass, jmethodID, void*); JniResult (*CallNonvirtualDoubleMethodA)(jobject obj, jclass clazz, @@ -177,7 +189,8 @@ typedef struct GlobalJniEnvStruct { jvalue* args); jthrowable (*CallNonvirtualVoidMethod)(jobject obj, jclass clazz, - jmethodID methodID); + jmethodID methodID, + ...); jthrowable (*CallNonvirtualVoidMethodV)(jobject, jclass, jmethodID, void*); jthrowable (*CallNonvirtualVoidMethodA)(jobject obj, jclass clazz, @@ -203,52 +216,52 @@ typedef struct GlobalJniEnvStruct { jthrowable (*SetFloatField)(jobject obj, jfieldID fieldID, jfloat val); jthrowable (*SetDoubleField)(jobject obj, jfieldID fieldID, jdouble val); JniPointerResult (*GetStaticMethodID)(jclass clazz, char* name, char* sig); - JniResult (*CallStaticObjectMethod)(jclass clazz, jmethodID methodID); + JniResult (*CallStaticObjectMethod)(jclass clazz, jmethodID methodID, ...); JniResult (*CallStaticObjectMethodV)(jclass, jmethodID, void*); JniResult (*CallStaticObjectMethodA)(jclass clazz, jmethodID methodID, jvalue* args); - JniResult (*CallStaticBooleanMethod)(jclass clazz, jmethodID methodID); + JniResult (*CallStaticBooleanMethod)(jclass clazz, jmethodID methodID, ...); JniResult (*CallStaticBooleanMethodV)(jclass, jmethodID, void*); JniResult (*CallStaticBooleanMethodA)(jclass clazz, jmethodID methodID, jvalue* args); - JniResult (*CallStaticByteMethod)(jclass clazz, jmethodID methodID); + JniResult (*CallStaticByteMethod)(jclass clazz, jmethodID methodID, ...); JniResult (*CallStaticByteMethodV)(jclass, jmethodID, void*); JniResult (*CallStaticByteMethodA)(jclass clazz, jmethodID methodID, jvalue* args); - JniResult (*CallStaticCharMethod)(jclass clazz, jmethodID methodID); + JniResult (*CallStaticCharMethod)(jclass clazz, jmethodID methodID, ...); JniResult (*CallStaticCharMethodV)(jclass, jmethodID, void*); JniResult (*CallStaticCharMethodA)(jclass clazz, jmethodID methodID, jvalue* args); - JniResult (*CallStaticShortMethod)(jclass clazz, jmethodID methodID); + JniResult (*CallStaticShortMethod)(jclass clazz, jmethodID methodID, ...); JniResult (*CallStaticShortMethodV)(jclass, jmethodID, void*); JniResult (*CallStaticShortMethodA)(jclass clazz, jmethodID methodID, jvalue* args); - JniResult (*CallStaticIntMethod)(jclass clazz, jmethodID methodID); + JniResult (*CallStaticIntMethod)(jclass clazz, jmethodID methodID, ...); JniResult (*CallStaticIntMethodV)(jclass, jmethodID, void*); JniResult (*CallStaticIntMethodA)(jclass clazz, jmethodID methodID, jvalue* args); - JniResult (*CallStaticLongMethod)(jclass clazz, jmethodID methodID); + JniResult (*CallStaticLongMethod)(jclass clazz, jmethodID methodID, ...); JniResult (*CallStaticLongMethodV)(jclass, jmethodID, void*); JniResult (*CallStaticLongMethodA)(jclass clazz, jmethodID methodID, jvalue* args); - JniResult (*CallStaticFloatMethod)(jclass clazz, jmethodID methodID); + JniResult (*CallStaticFloatMethod)(jclass clazz, jmethodID methodID, ...); JniResult (*CallStaticFloatMethodV)(jclass, jmethodID, void*); JniResult (*CallStaticFloatMethodA)(jclass clazz, jmethodID methodID, jvalue* args); - JniResult (*CallStaticDoubleMethod)(jclass clazz, jmethodID methodID); + JniResult (*CallStaticDoubleMethod)(jclass clazz, jmethodID methodID, ...); JniResult (*CallStaticDoubleMethodV)(jclass, jmethodID, void*); JniResult (*CallStaticDoubleMethodA)(jclass clazz, jmethodID methodID, jvalue* args); - jthrowable (*CallStaticVoidMethod)(jclass clazz, jmethodID methodID); + jthrowable (*CallStaticVoidMethod)(jclass clazz, jmethodID methodID, ...); jthrowable (*CallStaticVoidMethodV)(jclass, jmethodID, void*); jthrowable (*CallStaticVoidMethodA)(jclass clazz, jmethodID methodID, @@ -432,3 +445,115 @@ typedef struct GlobalJniEnvStruct { JniResult (*GetObjectRefType)(jobject obj); } GlobalJniEnvStruct; FFI_PLUGIN_EXPORT GlobalJniEnvStruct* GetGlobalEnv(); +FFI_PLUGIN_EXPORT JniResult globalEnv_NewObject(jclass clazz, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult globalEnv_CallObjectMethod(jobject obj, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult globalEnv_CallBooleanMethod(jobject obj, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult globalEnv_CallByteMethod(jobject obj, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult globalEnv_CallCharMethod(jobject obj, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult globalEnv_CallShortMethod(jobject obj, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult globalEnv_CallIntMethod(jobject obj, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult globalEnv_CallLongMethod(jobject obj, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult globalEnv_CallFloatMethod(jobject obj, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult globalEnv_CallDoubleMethod(jobject obj, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT jthrowable globalEnv_CallVoidMethod(jobject obj, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult +globalEnv_CallNonvirtualObjectMethod(jobject obj, + jclass clazz, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult +globalEnv_CallNonvirtualBooleanMethod(jobject obj, + jclass clazz, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult +globalEnv_CallNonvirtualByteMethod(jobject obj, + jclass clazz, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult +globalEnv_CallNonvirtualCharMethod(jobject obj, + jclass clazz, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult +globalEnv_CallNonvirtualShortMethod(jobject obj, + jclass clazz, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult +globalEnv_CallNonvirtualIntMethod(jobject obj, + jclass clazz, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult +globalEnv_CallNonvirtualLongMethod(jobject obj, + jclass clazz, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult +globalEnv_CallNonvirtualFloatMethod(jobject obj, + jclass clazz, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult +globalEnv_CallNonvirtualDoubleMethod(jobject obj, + jclass clazz, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT jthrowable +globalEnv_CallNonvirtualVoidMethod(jobject obj, + jclass clazz, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult globalEnv_CallStaticObjectMethod(jclass clazz, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult +globalEnv_CallStaticBooleanMethod(jclass clazz, jmethodID methodID, ...); +FFI_PLUGIN_EXPORT JniResult globalEnv_CallStaticByteMethod(jclass clazz, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult globalEnv_CallStaticCharMethod(jclass clazz, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult globalEnv_CallStaticShortMethod(jclass clazz, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult globalEnv_CallStaticIntMethod(jclass clazz, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult globalEnv_CallStaticLongMethod(jclass clazz, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult globalEnv_CallStaticFloatMethod(jclass clazz, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT JniResult globalEnv_CallStaticDoubleMethod(jclass clazz, + jmethodID methodID, + ...); +FFI_PLUGIN_EXPORT jthrowable globalEnv_CallStaticVoidMethod(jclass clazz, + jmethodID methodID, + ...); diff --git a/pkgs/jni/test/jarray_test.dart b/pkgs/jni/test/jarray_test.dart index fd4d119068..233ff5d9d0 100644 --- a/pkgs/jni/test/jarray_test.dart +++ b/pkgs/jni/test/jarray_test.dart @@ -2,6 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +import 'dart:ffi'; import 'dart:io'; import 'package:jni/jni.dart'; @@ -29,6 +30,17 @@ void run({required TestRunnerCallback testRunner}) { expect(array[0], true); expect(array[1], false); expect(array[2], false); + final firstTwo = array.getRange(0, 2); + expect(firstTwo.length, 2); + expect(firstTwo.elementSizeInBytes, sizeOf()); + expect(firstTwo[0], 1); + expect(firstTwo[1], 0); + expect(() { + array.getRange(0, 4); + }, throwsRangeError); + expect(() { + array.setRange(0, 4, []); + }, throwsRangeError); array.setRange(0, 3, [false, true, true, true], 1); expect(array[0], true); expect(array[1], true); @@ -48,24 +60,35 @@ void run({required TestRunnerCallback testRunner}) { using((arena) { final array = JArray(jchar.type, 3)..releasedBy(arena); expect(array.length, 3); - array[0] = 'ح'; - array[1] = '2'; - array[2] = '3'; - expect(array[0], 'ح'); - expect(array[1], '2'); - expect(array[2], '3'); - array.setRange(0, 3, ['4', '5', '6', '7'], 1); - expect(array[0], '5'); - expect(array[1], '6'); - expect(array[2], '7'); + array[0] = 1; + array[1] = 2; + array[2] = 3 + 256 * 256 * 5; // Truncates the input. + expect(array[0], 1); + expect(array[1], 2); + expect(array[2], 3); + final firstTwo = array.getRange(0, 2); + expect(firstTwo.length, 2); + expect(firstTwo.elementSizeInBytes, sizeOf()); + expect(firstTwo[0], 1); + expect(firstTwo[1], 2); + expect(() { + array.getRange(0, 4); + }, throwsRangeError); + expect(() { + array.setRange(0, 4, []); + }, throwsRangeError); + array.setRange(0, 3, [4, 5, 6, 7], 1); + expect(array[0], 5); + expect(array[1], 6); + expect(array[2], 7); expect(() { final _ = array[-1]; }, throwsRangeError); expect(() { - array[-1] = '4'; + array[-1] = 4; }, throwsRangeError); expect(() { - array[3] = '4'; + array[3] = 4; }, throwsRangeError); }); }); @@ -75,10 +98,21 @@ void run({required TestRunnerCallback testRunner}) { expect(array.length, 3); array[0] = 1; array[1] = 2; - array[2] = 3 + 256 * 5; // truncates the input; + array[2] = 3 + 256 * 5; // Truncates the input.; expect(array[0], 1); expect(array[1], 2); expect(array[2], 3); + final firstTwo = array.getRange(0, 2); + expect(firstTwo.length, 2); + expect(firstTwo.elementSizeInBytes, sizeOf()); + expect(firstTwo[0], 1); + expect(firstTwo[1], 2); + expect(() { + array.getRange(0, 4); + }, throwsRangeError); + expect(() { + array.setRange(0, 4, []); + }, throwsRangeError); array.setRange(0, 3, [4, 5, 6, 7], 1); expect(array[0], 5); expect(array[1], 6); @@ -100,10 +134,21 @@ void run({required TestRunnerCallback testRunner}) { expect(array.length, 3); array[0] = 1; array[1] = 2; - array[2] = 3 + 256 * 256 * 5; // truncates the input + array[2] = 3 + 256 * 256 * 5; // Truncates the input. expect(array[0], 1); expect(array[1], 2); expect(array[2], 3); + final firstTwo = array.getRange(0, 2); + expect(firstTwo.length, 2); + expect(firstTwo.elementSizeInBytes, sizeOf()); + expect(firstTwo[0], 1); + expect(firstTwo[1], 2); + expect(() { + array.getRange(0, 4); + }, throwsRangeError); + expect(() { + array.setRange(0, 4, []); + }, throwsRangeError); array.setRange(0, 3, [4, 5, 6, 7], 1); expect(array[0], 5); expect(array[1], 6); @@ -125,10 +170,21 @@ void run({required TestRunnerCallback testRunner}) { expect(array.length, 3); array[0] = 1; array[1] = 2; - array[2] = 3 + 256 * 256 * 256 * 256 * 5; // truncates the input + array[2] = 3 + 256 * 256 * 256 * 256 * 5; // Truncates the input. expect(array[0], 1); expect(array[1], 2); expect(array[2], 3); + final firstTwo = array.getRange(0, 2); + expect(firstTwo.length, 2); + expect(firstTwo.elementSizeInBytes, sizeOf()); + expect(firstTwo[0], 1); + expect(firstTwo[1], 2); + expect(() { + array.getRange(0, 4); + }, throwsRangeError); + expect(() { + array.setRange(0, 4, []); + }, throwsRangeError); array.setRange(0, 3, [4, 5, 6, 7], 1); expect(array[0], 5); expect(array[1], 6); @@ -154,6 +210,17 @@ void run({required TestRunnerCallback testRunner}) { expect(array[0], 1); expect(array[1], 2); expect(array[2], 3 + 256 * 256 * 256 * 256 * 5); + final firstTwo = array.getRange(0, 2); + expect(firstTwo.length, 2); + expect(firstTwo.elementSizeInBytes, sizeOf()); + expect(firstTwo[0], 1); + expect(firstTwo[1], 2); + expect(() { + array.getRange(0, 4); + }, throwsRangeError); + expect(() { + array.setRange(0, 4, []); + }, throwsRangeError); array.setRange(0, 3, [4, 5, 6, 7], 1); expect(array[0], 5); expect(array[1], 6); @@ -180,6 +247,17 @@ void run({required TestRunnerCallback testRunner}) { expect(array[0], closeTo(0.5, epsilon)); expect(array[1], closeTo(2, epsilon)); expect(array[2], closeTo(3, epsilon)); + final firstTwo = array.getRange(0, 2); + expect(firstTwo.length, 2); + expect(firstTwo.elementSizeInBytes, sizeOf()); + expect(firstTwo[0], closeTo(0.5, epsilon)); + expect(firstTwo[1], closeTo(2, epsilon)); + expect(() { + array.getRange(0, 4); + }, throwsRangeError); + expect(() { + array.setRange(0, 4, []); + }, throwsRangeError); array.setRange(0, 3, [4, 5, 6, 7], 1); expect(array[0], closeTo(5, epsilon)); expect(array[1], closeTo(6, epsilon)); @@ -205,6 +283,17 @@ void run({required TestRunnerCallback testRunner}) { expect(array[0], closeTo(0.5, epsilon)); expect(array[1], closeTo(2, epsilon)); expect(array[2], closeTo(3, epsilon)); + final firstTwo = array.getRange(0, 2); + expect(firstTwo.length, 2); + expect(firstTwo.elementSizeInBytes, sizeOf()); + expect(firstTwo[0], closeTo(0.5, epsilon)); + expect(firstTwo[1], closeTo(2, epsilon)); + expect(() { + array.getRange(0, 4); + }, throwsRangeError); + expect(() { + array.setRange(0, 4, []); + }, throwsRangeError); array.setRange(0, 3, [4, 5, 6, 7], 1); expect(array[0], closeTo(5, epsilon)); expect(array[1], closeTo(6, epsilon)); diff --git a/pkgs/jni/tool/wrapper_generators/ffigen_util.dart b/pkgs/jni/tool/wrapper_generators/ffigen_util.dart index 2b234f6a9d..480757c794 100644 --- a/pkgs/jni/tool/wrapper_generators/ffigen_util.dart +++ b/pkgs/jni/tool/wrapper_generators/ffigen_util.dart @@ -24,6 +24,9 @@ const preamble = ''' // This is generated from JNI header in Android NDK. License for the same is // provided below. +// Generation logic resides in `tool/wrapper_generators`. +// To regenerate, run `dart run tool/generate_ffi_bindings.dart`. + /* * Copyright (C) 2006 The Android Open Source Project * diff --git a/pkgs/jni/tool/wrapper_generators/generate_c_extensions.dart b/pkgs/jni/tool/wrapper_generators/generate_c_extensions.dart index f1e15b21ee..96abd233fb 100644 --- a/pkgs/jni/tool/wrapper_generators/generate_c_extensions.dart +++ b/pkgs/jni/tool/wrapper_generators/generate_c_extensions.dart @@ -56,6 +56,11 @@ const wrapperGetterDecl = ''' FFI_PLUGIN_EXPORT $wrapperName* GetGlobalEnv(); '''; +bool hasVarArgs(String name) { + return name == 'NewObject' || + RegExp(r'^Call(Static|Nonvirtual|)[A-Z][a-z]+Method$').hasMatch(name); +} + /// Get C name of a type from its ffigen representation. String getCType(Type type) { if (type is PointerType) { @@ -81,19 +86,24 @@ FunctionType getGlobalJniEnvFunctionType(FunctionType ft) { } // Returns declaration of function field in GlobalJniEnv struct -String getFunctionFieldDecl( - Member field, -) { +String getFunctionFieldDecl(Member field, {required bool isField}) { final fieldType = field.type; if (fieldType is PointerType && fieldType.child is NativeFunc) { final nativeFunc = fieldType.child as NativeFunc; final functionType = getGlobalJniEnvFunctionType(nativeFunc.type); final resultWrapper = getResultWrapper(getCType(functionType.returnType)); final name = field.name; + final withVarArgs = hasVarArgs(name); final params = functionType.parameters - .map((param) => '${getCType(param.type)} ${param.name}') - .join(', '); - return ('${resultWrapper.returnType} (*$name)($params);'); + .map((param) => '${getCType(param.type)} ${param.name}') + .join(', ') + + (withVarArgs ? ', ...' : ''); + final willExport = withVarArgs ? 'FFI_PLUGIN_EXPORT ' : ''; + if (isField) { + return '${resultWrapper.returnType} (*$name)($params);'; + } + return '$willExport${resultWrapper.returnType} ' + '${getWrapperFuncName(field)}($params);'; } else { return 'void* ${field.name};'; } @@ -222,16 +232,20 @@ String? getWrapperFunc(Member field) { final outerFunctionType = getGlobalJniEnvFunctionType(functionType); final wrapperName = getWrapperFuncName(field); final returnType = getCType(outerFunctionType.returnType); - final params = outerFunctionType.parameters - .map((param) => '${getCType(param.type)} ${param.name}') - .join(', '); + final withVarArgs = hasVarArgs(field.name); + final params = [ + ...outerFunctionType.parameters + .map((param) => '${getCType(param.type)} ${param.name}'), + if (withVarArgs) '...', + ].join(', '); var returnCapture = returnType == 'void' ? '' : '$returnType $resultVar ='; if (constBufferReturningFunctions.contains(field.name)) { returnCapture = 'const $returnCapture'; } final callParams = [ 'jniEnv', - ...(outerFunctionType.parameters.map((param) => param.name).toList()) + ...(outerFunctionType.parameters.map((param) => param.name).toList()), + if (withVarArgs) 'args', ].join(', '); final resultWrapper = getResultWrapper(returnType); @@ -239,15 +253,29 @@ String? getWrapperFunc(Member field) { if (isJRefType(returnType) && !refFunctions.contains(field.name)) { convertRef = ' $resultVar = to_global_ref($resultVar);\n'; } + final callee = field.name + (withVarArgs ? 'V' : ''); + final varArgsInit = withVarArgs + ? ''' + va_list args; + va_start(args, methodID); +''' + : ''; + final varArgsEnd = withVarArgs ? 'va_end(args);\n' : ''; final exceptionCheck = _noCheckException.contains(field.name) ? '' - : ' jthrowable $errorVar = check_exception();\n' - ' if ($errorVar != NULL) {\n' - ' return ${resultWrapper.onError};\n' - ' }\n'; - return '${resultWrapper.returnType} $wrapperName($params) {\n' + : ''' + jthrowable $errorVar = check_exception(); + if ($errorVar != NULL) { + return ${resultWrapper.onError}; + } +'''; + final willExport = withVarArgs ? 'FFI_PLUGIN_EXPORT ' : ''; + return '$willExport' + '${resultWrapper.returnType} $wrapperName($params) {\n' ' attach_thread();\n' - ' $returnCapture (*jniEnv)->${field.name}($callParams);\n' + '$varArgsInit' + ' $returnCapture (*jniEnv)->$callee($callParams);\n' + '$varArgsEnd' '$exceptionCheck' '$convertRef' ' return ${resultWrapper.onResult};\n' @@ -259,11 +287,20 @@ String? getWrapperFunc(Member field) { void writeGlobalJniEnvWrapper(Library library) { final jniEnvType = findCompound(library, envType); - final fieldDecls = jniEnvType.members.map(getFunctionFieldDecl).join('\n'); + final fieldDecls = jniEnvType.members + .map((member) => getFunctionFieldDecl(member, isField: true)) + .join('\n'); + final varArgsFunctions = jniEnvType.members + .where((member) => hasVarArgs(member.name)) + .map((member) => getFunctionFieldDecl(member, isField: false)) + .join('\n'); final structDecl = 'typedef struct $wrapperName {\n$fieldDecls\n} $wrapperName;\n'; - File.fromUri(Paths.globalJniEnvH).writeAsStringSync( - '$preamble$wrapperDeclIncludes$structDecl$wrapperGetterDecl'); + File.fromUri(Paths.globalJniEnvH).writeAsStringSync('$preamble' + '$wrapperDeclIncludes' + '$structDecl' + '$wrapperGetterDecl' + '$varArgsFunctions\n'); final functionWrappers = StringBuffer(); final structInst = StringBuffer('$wrapperName globalJniEnv = {\n'); diff --git a/pkgs/jnigen/CHANGELOG.md b/pkgs/jnigen/CHANGELOG.md index 29f3fac283..70cb66f3d5 100644 --- a/pkgs/jnigen/CHANGELOG.md +++ b/pkgs/jnigen/CHANGELOG.md @@ -1,7 +1,10 @@ -## 0.8.1-wip +## 0.9.0 -- Expand constraint on `package:cli_config` to allow `^0.2.0`. -- Ignore `use_super_parameters` lint in generated files. +- **Breaking Change** ([#660](https://github.com/dart-lang/native/issues/660)): + Removed C-based bindings. Now all bindings are Dart-only. +- Expanded constraint on `package:cli_config` to allow `^0.2.0`. +- Ignored `use_super_parameters` lint in generated files. +- Fixed a bug in summarizer and improved the display of errors. ## 0.8.0 diff --git a/pkgs/jnigen/README.md b/pkgs/jnigen/README.md index ca921f191c..b303604e37 100644 --- a/pkgs/jnigen/README.md +++ b/pkgs/jnigen/README.md @@ -6,7 +6,7 @@ ## Introduction Experimental bindings generator for Java bindings through dart:ffi and JNI. -`jnigen` scans compiled JAR files or Java source code to generate a description of the API, then uses it to generate Dart annd C bindings. The Dart bindings call the C bindings, which in-turn call the Java functions through JNI. Shared functionality and base classes are provided through the support library, `package:jni`. +`jnigen` scans compiled JAR files or Java source code to generate a description of the API, then uses it to generate Dart bindings. The Dart bindings call the C bindings, which in-turn call the Java functions through JNI. Shared functionality and base classes are provided through the support library, `package:jni`. The configuration for binding generation is usually provided through YAML. @@ -14,16 +14,12 @@ Three configuration details are needed to generate the bindings. Everything else * _Inputs_: input can be Java source files (`source_path`), or compiled classes / JARs (`class_path`). Some maven / gradle based tooling is also provided to simplify obtaining dependencies. -* _Outputs_: Output can be generated in package-structured (one file per class) or single file bindings. Target path to write C and Dart bindings needs to be specified. +* _Outputs_: Output can be generated in package-structured (one file per class) or single file bindings. Target path to write Dart bindings needs to be specified. * _Classes_: Specify which classes or packages you need bindings for. Specifying a package includes all classes inside it recursively. Check out the [examples](jnigen/example/) to see some sample configurations. -C code is always generated into a directory with it's own build configuration. It's built as a separate dynamic library. - -Lastly, [dart_only bindings](#pure-dart-bindings) mode is also available as a proof-of-concept. It does not need intermediate C bindings, only a dependency on the support library `package:jni`. - ## Example It's possible to generate bindings for JAR libraries, or Java source files. @@ -53,53 +49,50 @@ This produces the following boilerplate: ```dart /// Some boilerplate is omitted for clarity. -final ffi.Pointer Function(String sym) jniLookup = - ProtectedJniExtensions.initGeneratedLibrary("android_utils"); - -/// from: com.example.in_app_java.AndroidUtils class AndroidUtils extends jni.JObject { - AndroidUtils.fromReference(JReference reference) : super.fromReference(reference); + @override + late final jni.JObjType $type = type; + + AndroidUtils.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = + jni.JClass.forName(r"com/example/in_app_java/AndroidUtils"); - static final _showToast = jniLookup< + /// The type which includes information such as the signature of this class. + static const type = $AndroidUtilsType(); + + static final _id_showToast = _class.staticMethodId( + r"showToast", + r"(Landroid/app/Activity;Ljava/lang/CharSequence;I)V", + ); + + static final _showToast = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>("AndroidUtils__showToast") + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64 + )>)>>("globalEnv_CallStaticVoidMethod") .asFunction< - jni.JniResult Function( + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int)>(); /// from: static public void showToast(android.app.Activity mainActivity, java.lang.CharSequence text, int duration) static void showToast( - jni.JObject mainActivity, jni.JObject text, int duration) => - _showToast(mainActivity.reference, text.reference, duration).check(); -} -``` - -#### C Bindings: - -```c -// Some boilerplate is omitted for clarity. - -// com.example.in_app_java.AndroidUtils -jclass _c_AndroidUtils = NULL; - -jmethodID _m_AndroidUtils__showToast = NULL; -FFI_PLUGIN_EXPORT -JniResult AndroidUtils__showToast(jobject mainActivity, - jobject text, - int32_t duration) { - load_env(); - load_class_gr(&_c_AndroidUtils, "com/example/in_app_java/AndroidUtils"); - if (_c_AndroidUtils == NULL) - return (JniResult){.result = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_AndroidUtils, &_m_AndroidUtils__showToast, "showToast", - "(Landroid/app/Activity;Ljava/lang/CharSequence;I)V"); - if (_m_AndroidUtils__showToast == NULL) - return (JniResult){.result = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallStaticVoidMethod(jniEnv, _c_AndroidUtils, - _m_AndroidUtils__showToast, mainActivity, - text, duration); - return (JniResult){.result = {.j = 0}, .exception = check_exception()}; + jni.JObject mainActivity, + jni.JObject text, + int duration, + ) { + _showToast(_class.reference.pointer, _id_showToast as jni.JMethodIDPtr, + mainActivity.reference.pointer, text.reference.pointer, duration) + .check(); + } } ``` @@ -110,9 +103,6 @@ android_sdk_config: add_gradle_deps: true output: - c: - library_name: android_utils - path: src/android_utils/ dart: path: lib/android_utils.dart structure: single_file @@ -145,8 +135,6 @@ More advanced features such as callbacks are not supported yet. Support for thes On Flutter targets, native libraries are built automatically and bundled. On standalone platforms, no such infrastructure exists yet. As a stopgap solution, running `dart run jni:setup` in a target directory builds all JNI native dependencies of the package into `build/jni_libs`. -By default `jni:setup` goes through pubspec configuration and builds all JNI dependencies of the project. It can be overridden to build a custom directory using `-s` switch, which can be useful when output configuration for C bindings does not follow standard FFI plugin layout. - The build directory has to be passed to `Jni.spawn` call. It's assumed that all dependencies are built into the same target directory, so that once JNI is initialized, generated bindings can load their respective C libraries automatically. ## Requirements @@ -171,10 +159,8 @@ $env:Path += ";${env:JAVA_HOME}\bin\server". If JAVA_HOME not set, find the `java.exe` executable and set the environment variable in Control Panel. If java is installed through a package manager, there may be a more automatic way to do this. (Eg: `scoop reset`). -### C/C++ tooling -CMake and a standard C toolchain are required to build `package:jni` and C bindings generated by `jnigen`. - -It's recommended to have `clang-format` installed for formatting the generated C bindings. On Windows, it's part of LLVM installation. On most Linux distributions it is available as a separate package. On MacOS, it can be installed using Homebrew. +### C tooling +CMake and a standard C toolchain are required to build `package:jni`. ## FAQs @@ -225,11 +211,6 @@ A `*` denotes required configuration. | `classes` * | List of qualified class / package names | List of qualified class / package names. `source_path` will be scanned assuming the sources follow standard java-ish hierarchy. That is a.b.c either maps to a directory `a/b/c` or a class file `a/b/c.java`. | | `enable_experiment` | List of experiment names:
  • `interface_implementation`
| List of enabled experiments. These features are still in development and their API might break. | | `output:` | (Subsection) | This subsection will contain configuration related to output files. | -| `output:` >> `bindings_type` | `c_based` (default) or `dart_only` | Binding generation strategy. [Trade-offs](#pure-dart-bindings) are explained at the end of this document. | -| `output:` >> `c:` | (Subsection) | This subsection specified C output configuration. Required if `bindings_type` is `c_based`. | -| `output:` >> `c:` >> path * | Directory path | Directory to write C bindings. Usually `src/` in case of an FFI plugin template. | -| `output:` >> `c:` >> subdir | Directory path | If specified, C bindings will be written to `subdir` resolved relative to `path`. This is useful when bindings are supposed to be under source's license, and written to a subdirectory such as `third_party`. | -| `output:` >> `c:` >> `library_name` *| Identifier (snake_case) | Name for generated C library. | `output:` >> `dart:` | (Subsection) | This subsection specifies Dart output configuration. | | `output:` >> `dart:` >> `structure` | `package_structure` / `single_file` | Whether to map resulting dart bindings to file-per-class source layout, or write all bindings to single file. | `output:` >> `dart:` >> `path` * | Directory path or File path | Path to write Dart bindings. Should end in `.dart` for `single_file` configurations, and end in `/` for `package_structure` (default) configuration. | @@ -255,19 +236,6 @@ It's possible to use the programmatic API instead of YAML. * import `package:jnigen/jnigen.dart` * construct a `Config` object and pass it to `generateJniBindings` function. The parameters are similar to the ones described above. -## Pure dart Bindings -It's possible to generate bindings that do not rely on an intermediate layer of C code. Bindings will still depend on `package:jni` and its support library written in C. But this approach avoids large C bindings. - -To enable pure dart bindings, specify -``` -output: - bindings_type: dart_only -``` - -Any C output configuration will be ignored. - -However, pure dart bindings will require additional allocations and check runtimeType of the arguments. This will be the case until Variadic arguments land in Dart FFI. - ## Android core libraries These days, Android projects depend heavily on AndroidX and other libraries downloaded via gradle. We have a tracking issue to improve detection of android SDK and dependencies. (#31). Currently we can fetch the JAR dependencies of an android project, by running a gradle stub, if `android_sdk_config` >> `add_gradle_deps` is specified. diff --git a/pkgs/jnigen/android_test_runner/android/app/build.gradle b/pkgs/jnigen/android_test_runner/android/app/build.gradle index e8e50be1bc..18596cf0a2 100644 --- a/pkgs/jnigen/android_test_runner/android/app/build.gradle +++ b/pkgs/jnigen/android_test_runner/android/app/build.gradle @@ -59,11 +59,6 @@ android { signingConfig signingConfigs.debug } } - externalNativeBuild { - cmake { - path 'CMakeLists.txt' - } - } } flutter { diff --git a/pkgs/jnigen/android_test_runner/integration_test/.gitignore b/pkgs/jnigen/android_test_runner/integration_test/.gitignore deleted file mode 100644 index af7c365a2e..0000000000 --- a/pkgs/jnigen/android_test_runner/integration_test/.gitignore +++ /dev/null @@ -1 +0,0 @@ -runtime_test.dart \ No newline at end of file diff --git a/pkgs/jnigen/android_test_runner/integration_test/runtime_test.dart b/pkgs/jnigen/android_test_runner/integration_test/runtime_test.dart new file mode 100644 index 0000000000..a974b5bf01 --- /dev/null +++ b/pkgs/jnigen/android_test_runner/integration_test/runtime_test.dart @@ -0,0 +1,25 @@ +// Generated file. Do not edit or check-in to version control. + +// 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_test/flutter_test.dart"; + +import "../../test/jackson_core_test/runtime_test_registrant.dart" + as jackson_core_test; +import "../../test/simple_package_test/runtime_test_registrant.dart" + as simple_package_test; +import "../../test/kotlin_test/runtime_test_registrant.dart" as kotlin_test; + +typedef TestCaseCallback = void Function(); + +void test(String description, TestCaseCallback testCase) { + testWidgets(description, (widgetTester) async => testCase()); +} + +void main() { + jackson_core_test.registerTests("jackson_core_test", test); + simple_package_test.registerTests("simple_package_test", test); + kotlin_test.registerTests("kotlin_test", test); +} diff --git a/pkgs/jnigen/cmake/CMakeLists.txt.tmpl b/pkgs/jnigen/cmake/CMakeLists.txt.tmpl deleted file mode 100644 index d0b8a7378a..0000000000 --- a/pkgs/jnigen/cmake/CMakeLists.txt.tmpl +++ /dev/null @@ -1,32 +0,0 @@ -# jni_native_build (Build with jni:setup. Do not delete this line.) - -# The Flutter tooling requires that developers have CMake 3.10 or later -# installed. You should not increase this version, as doing so will cause -# the plugin to fail to compile for some customers of the plugin. -cmake_minimum_required(VERSION 3.10) - -project({{LIBRARY_NAME}} VERSION 0.0.1 LANGUAGES C) - -add_library({{LIBRARY_NAME}} SHARED - "{{SUBDIR}}/{{LIBRARY_NAME}}.c" -) - -set_target_properties({{LIBRARY_NAME}} PROPERTIES - OUTPUT_NAME "{{LIBRARY_NAME}}" -) - -target_compile_definitions({{LIBRARY_NAME}} PUBLIC DART_SHARED_LIB) - -if(WIN32) - set_target_properties(${TARGET_NAME} PROPERTIES - LINK_FLAGS "/DELAYLOAD:jvm.dll") -endif() - -if (ANDROID) - target_link_libraries({{LIBRARY_NAME}} log) -else() - find_package(Java REQUIRED) - find_package(JNI REQUIRED) - include_directories(${JNI_INCLUDE_DIRS}) - target_link_libraries({{LIBRARY_NAME}} ${JNI_LIBRARIES}) -endif() diff --git a/pkgs/jnigen/cmake/README.md b/pkgs/jnigen/cmake/README.md deleted file mode 100644 index 65f9951ba5..0000000000 --- a/pkgs/jnigen/cmake/README.md +++ /dev/null @@ -1,3 +0,0 @@ -This directory contains a CMakeLists.txt.tmpl file which will be used to generate build configuration for generated C code. - -`{{LIBRARY_NAME}}` in this template will be replaced by `library_name` configuration parameter. \ No newline at end of file diff --git a/pkgs/jnigen/example/in_app_java/README.md b/pkgs/jnigen/example/in_app_java/README.md index 13813a8219..5c4da0a3d6 100644 --- a/pkgs/jnigen/example/in_app_java/README.md +++ b/pkgs/jnigen/example/in_app_java/README.md @@ -1,24 +1,28 @@ # In-App Java Example -This example shows how to write custom java code in `android/app/src` and call it using `jnigen` generated bindings. +This example shows how to write custom java code in `android/app/src` and call +it using `jnigen` generated bindings. #### How to run this example: -* Run `flutter run` to run the app. -* To regenerate bindings after changing Java code, run `flutter pub run jnigen --config jnigen.yaml`. This requires at least one APK build to have been run before, so that it's possible for `jnigen` to obtain classpaths of Android Gradle libraries. Therefore, once run `flutter build apk` before generating bindings for the first time, or after a `flutter clean`. +- Run `flutter run` to run the app. -#### General steps -These are general steps to integrate Java code into a flutter project using `jnigen`. - -* Write Java code in suitable package folder, under `android/` subproject of the flutter app. - -* Create A jnigen config like `jnigen.yaml` in this example. +- To regenerate bindings after changing Java code, run + `flutter pub run jnigen --config jnigen.yaml`. This requires at least one APK + build to have been run before, so that it's possible for `jnigen` to obtain + classpaths of Android Gradle libraries. Therefore, once run + `flutter build apk` before generating bindings for the first time, or after a + `flutter clean`. -* Generate bindings using jnigen config. - -* Add an `externalNativeBuild` to gradle script (see `android/app/build.gradle` in this example). - -* Add proguard rules to exclude your custom classes from tree shaking, since they are always accessed reflectively in JNI. +#### General steps -* Build and run the app. +These are general steps to integrate Java code into a flutter project using +`jnigen`. +- Write Java code in suitable package folder, under `android/` subproject of the + flutter app. +- Create A jnigen config like `jnigen.yaml` in this example. +- Generate bindings using jnigen config. +- Add proguard rules to exclude your custom classes from tree shaking, since + they are always accessed reflectively in JNI. +- Build and run the app. diff --git a/pkgs/jnigen/example/in_app_java/android/app/build.gradle b/pkgs/jnigen/example/in_app_java/android/app/build.gradle index 21410cd009..96798166c9 100644 --- a/pkgs/jnigen/example/in_app_java/android/app/build.gradle +++ b/pkgs/jnigen/example/in_app_java/android/app/build.gradle @@ -57,12 +57,6 @@ android { signingConfig signingConfigs.debug } } - - externalNativeBuild { - cmake { - path "../../src/android_utils/CMakeLists.txt" - } - } } flutter { diff --git a/pkgs/jnigen/example/in_app_java/jnigen.yaml b/pkgs/jnigen/example/in_app_java/jnigen.yaml index e588f4a4c0..14a4d70519 100644 --- a/pkgs/jnigen/example/in_app_java/jnigen.yaml +++ b/pkgs/jnigen/example/in_app_java/jnigen.yaml @@ -3,9 +3,6 @@ android_sdk_config: add_gradle_sources: true output: - c: - library_name: android_utils - path: src/android_utils/ dart: path: lib/android_utils.dart structure: single_file diff --git a/pkgs/jnigen/example/in_app_java/lib/android_utils.dart b/pkgs/jnigen/example/in_app_java/lib/android_utils.dart index 95fc5057b7..48599b23db 100644 --- a/pkgs/jnigen/example/in_app_java/lib/android_utils.dart +++ b/pkgs/jnigen/example/in_app_java/lib/android_utils.dart @@ -23,11 +23,6 @@ import "dart:ffi" as ffi; import "package:jni/internal_helpers_for_jnigen.dart"; import "package:jni/jni.dart" as jni; -// Auto-generated initialization code. - -final ffi.Pointer Function(String sym) jniLookup = - ProtectedJniExtensions.initGeneratedLibrary("android_utils"); - /// from: androidx.emoji2.text.EmojiCompat$CodepointSequenceMatchResult class EmojiCompat_CodepointSequenceMatchResult extends jni.JObject { @override @@ -38,6 +33,9 @@ class EmojiCompat_CodepointSequenceMatchResult extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); + static final _class = jni.JClass.forName( + r"androidx/emoji2/text/EmojiCompat$CodepointSequenceMatchResult"); + /// The type which includes information such as the signature of this class. static const type = $EmojiCompat_CodepointSequenceMatchResultType(); } @@ -85,13 +83,25 @@ class EmojiCompat_Config extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); + static final _class = + jni.JClass.forName(r"androidx/emoji2/text/EmojiCompat$Config"); + /// The type which includes information such as the signature of this class. static const type = $EmojiCompat_ConfigType(); - static final _new0 = jniLookup< - ffi - .NativeFunction)>>( - "EmojiCompat_Config__new0") - .asFunction)>(); + static final _id_new0 = _class.constructorId( + r"(Landroidx/emoji2/text/EmojiCompat$MetadataRepoLoader;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: protected void (androidx.emoji2.text.EmojiCompat.MetadataRepoLoader metadataLoader) /// The returned object must be released after use, by calling the [release] method. @@ -101,18 +111,26 @@ class EmojiCompat_Config extends jni.JObject { factory EmojiCompat_Config( EmojiCompat_MetadataRepoLoader metadataLoader, ) { - return EmojiCompat_Config.fromReference( - _new0(metadataLoader.reference.pointer).reference); + return EmojiCompat_Config.fromReference(_new0(_class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, metadataLoader.reference.pointer) + .reference); } - static final _registerInitCallback = jniLookup< + static final _id_registerInitCallback = _class.instanceMethodId( + r"registerInitCallback", + r"(Landroidx/emoji2/text/EmojiCompat$InitCallback;)Landroidx/emoji2/text/EmojiCompat$Config;", + ); + + static final _registerInitCallback = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "EmojiCompat_Config__registerInitCallback") + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public androidx.emoji2.text.EmojiCompat.Config registerInitCallback(androidx.emoji2.text.EmojiCompat.InitCallback initCallback) /// The returned object must be released after use, by calling the [release] method. @@ -124,18 +142,27 @@ class EmojiCompat_Config extends jni.JObject { EmojiCompat_InitCallback initCallback, ) { return _registerInitCallback( - reference.pointer, initCallback.reference.pointer) + reference.pointer, + _id_registerInitCallback as jni.JMethodIDPtr, + initCallback.reference.pointer) .object(const $EmojiCompat_ConfigType()); } - static final _unregisterInitCallback = jniLookup< + static final _id_unregisterInitCallback = _class.instanceMethodId( + r"unregisterInitCallback", + r"(Landroidx/emoji2/text/EmojiCompat$InitCallback;)Landroidx/emoji2/text/EmojiCompat$Config;", + ); + + static final _unregisterInitCallback = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "EmojiCompat_Config__unregisterInitCallback") + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public androidx.emoji2.text.EmojiCompat.Config unregisterInitCallback(androidx.emoji2.text.EmojiCompat.InitCallback initCallback) /// The returned object must be released after use, by calling the [release] method. @@ -147,15 +174,24 @@ class EmojiCompat_Config extends jni.JObject { EmojiCompat_InitCallback initCallback, ) { return _unregisterInitCallback( - reference.pointer, initCallback.reference.pointer) + reference.pointer, + _id_unregisterInitCallback as jni.JMethodIDPtr, + initCallback.reference.pointer) .object(const $EmojiCompat_ConfigType()); } - static final _setReplaceAll = jniLookup< + static final _id_setReplaceAll = _class.instanceMethodId( + r"setReplaceAll", + r"(Z)Landroidx/emoji2/text/EmojiCompat$Config;", + ); + + static final _setReplaceAll = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Uint8)>>("EmojiCompat_Config__setReplaceAll") - .asFunction, int)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); /// from: public androidx.emoji2.text.EmojiCompat.Config setReplaceAll(boolean replaceAll) /// The returned object must be released after use, by calling the [release] method. @@ -168,15 +204,23 @@ class EmojiCompat_Config extends jni.JObject { EmojiCompat_Config setReplaceAll( bool replaceAll, ) { - return _setReplaceAll(reference.pointer, replaceAll ? 1 : 0) + return _setReplaceAll(reference.pointer, + _id_setReplaceAll as jni.JMethodIDPtr, replaceAll ? 1 : 0) .object(const $EmojiCompat_ConfigType()); } - static final _setUseEmojiAsDefaultStyle = jniLookup< + static final _id_setUseEmojiAsDefaultStyle = _class.instanceMethodId( + r"setUseEmojiAsDefaultStyle", + r"(Z)Landroidx/emoji2/text/EmojiCompat$Config;", + ); + + static final _setUseEmojiAsDefaultStyle = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Uint8)>>("EmojiCompat_Config__setUseEmojiAsDefaultStyle") - .asFunction, int)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); /// from: public androidx.emoji2.text.EmojiCompat.Config setUseEmojiAsDefaultStyle(boolean useEmojiAsDefaultStyle) /// The returned object must be released after use, by calling the [release] method. @@ -197,18 +241,27 @@ class EmojiCompat_Config extends jni.JObject { bool useEmojiAsDefaultStyle, ) { return _setUseEmojiAsDefaultStyle( - reference.pointer, useEmojiAsDefaultStyle ? 1 : 0) + reference.pointer, + _id_setUseEmojiAsDefaultStyle as jni.JMethodIDPtr, + useEmojiAsDefaultStyle ? 1 : 0) .object(const $EmojiCompat_ConfigType()); } - static final _setUseEmojiAsDefaultStyle1 = jniLookup< + static final _id_setUseEmojiAsDefaultStyle1 = _class.instanceMethodId( + r"setUseEmojiAsDefaultStyle", + r"(ZLjava/util/List;)Landroidx/emoji2/text/EmojiCompat$Config;", + ); + + static final _setUseEmojiAsDefaultStyle1 = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, ffi.Uint8, - ffi.Pointer)>>( - "EmojiCompat_Config__setUseEmojiAsDefaultStyle1") + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + "globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, int, ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + ffi.Pointer)>(); /// from: public androidx.emoji2.text.EmojiCompat.Config setUseEmojiAsDefaultStyle(boolean useEmojiAsDefaultStyle, java.util.List emojiAsDefaultStyleExceptions) /// The returned object must be released after use, by calling the [release] method. @@ -231,16 +284,24 @@ class EmojiCompat_Config extends jni.JObject { ) { return _setUseEmojiAsDefaultStyle1( reference.pointer, + _id_setUseEmojiAsDefaultStyle1 as jni.JMethodIDPtr, useEmojiAsDefaultStyle ? 1 : 0, emojiAsDefaultStyleExceptions.reference.pointer) .object(const $EmojiCompat_ConfigType()); } - static final _setEmojiSpanIndicatorEnabled = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, ffi.Uint8)>>( - "EmojiCompat_Config__setEmojiSpanIndicatorEnabled") - .asFunction, int)>(); + static final _id_setEmojiSpanIndicatorEnabled = _class.instanceMethodId( + r"setEmojiSpanIndicatorEnabled", + r"(Z)Landroidx/emoji2/text/EmojiCompat$Config;", + ); + + static final _setEmojiSpanIndicatorEnabled = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); /// from: public androidx.emoji2.text.EmojiCompat.Config setEmojiSpanIndicatorEnabled(boolean emojiSpanIndicatorEnabled) /// The returned object must be released after use, by calling the [release] method. @@ -254,15 +315,24 @@ class EmojiCompat_Config extends jni.JObject { bool emojiSpanIndicatorEnabled, ) { return _setEmojiSpanIndicatorEnabled( - reference.pointer, emojiSpanIndicatorEnabled ? 1 : 0) + reference.pointer, + _id_setEmojiSpanIndicatorEnabled as jni.JMethodIDPtr, + emojiSpanIndicatorEnabled ? 1 : 0) .object(const $EmojiCompat_ConfigType()); } - static final _setEmojiSpanIndicatorColor = jniLookup< + static final _id_setEmojiSpanIndicatorColor = _class.instanceMethodId( + r"setEmojiSpanIndicatorColor", + r"(I)Landroidx/emoji2/text/EmojiCompat$Config;", + ); + + static final _setEmojiSpanIndicatorColor = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Int32)>>("EmojiCompat_Config__setEmojiSpanIndicatorColor") - .asFunction, int)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); /// from: public androidx.emoji2.text.EmojiCompat.Config setEmojiSpanIndicatorColor(int color) /// The returned object must be released after use, by calling the [release] method. @@ -273,15 +343,23 @@ class EmojiCompat_Config extends jni.JObject { EmojiCompat_Config setEmojiSpanIndicatorColor( int color, ) { - return _setEmojiSpanIndicatorColor(reference.pointer, color) + return _setEmojiSpanIndicatorColor(reference.pointer, + _id_setEmojiSpanIndicatorColor as jni.JMethodIDPtr, color) .object(const $EmojiCompat_ConfigType()); } - static final _setMetadataLoadStrategy = jniLookup< + static final _id_setMetadataLoadStrategy = _class.instanceMethodId( + r"setMetadataLoadStrategy", + r"(I)Landroidx/emoji2/text/EmojiCompat$Config;", + ); + + static final _setMetadataLoadStrategy = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Int32)>>("EmojiCompat_Config__setMetadataLoadStrategy") - .asFunction, int)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); /// from: public androidx.emoji2.text.EmojiCompat.Config setMetadataLoadStrategy(int strategy) /// The returned object must be released after use, by calling the [release] method. @@ -321,17 +399,26 @@ class EmojiCompat_Config extends jni.JObject { EmojiCompat_Config setMetadataLoadStrategy( int strategy, ) { - return _setMetadataLoadStrategy(reference.pointer, strategy) + return _setMetadataLoadStrategy(reference.pointer, + _id_setMetadataLoadStrategy as jni.JMethodIDPtr, strategy) .object(const $EmojiCompat_ConfigType()); } - static final _setSpanFactory = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("EmojiCompat_Config__setSpanFactory") + static final _id_setSpanFactory = _class.instanceMethodId( + r"setSpanFactory", + r"(Landroidx/emoji2/text/EmojiCompat$SpanFactory;)Landroidx/emoji2/text/EmojiCompat$Config;", + ); + + static final _setSpanFactory = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public androidx.emoji2.text.EmojiCompat.Config setSpanFactory(androidx.emoji2.text.EmojiCompat.SpanFactory factory) /// The returned object must be released after use, by calling the [release] method. @@ -342,18 +429,26 @@ class EmojiCompat_Config extends jni.JObject { EmojiCompat_Config setSpanFactory( EmojiCompat_SpanFactory factory0, ) { - return _setSpanFactory(reference.pointer, factory0.reference.pointer) + return _setSpanFactory(reference.pointer, + _id_setSpanFactory as jni.JMethodIDPtr, factory0.reference.pointer) .object(const $EmojiCompat_ConfigType()); } - static final _setGlyphChecker = jniLookup< + static final _id_setGlyphChecker = _class.instanceMethodId( + r"setGlyphChecker", + r"(Landroidx/emoji2/text/EmojiCompat$GlyphChecker;)Landroidx/emoji2/text/EmojiCompat$Config;", + ); + + static final _setGlyphChecker = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "EmojiCompat_Config__setGlyphChecker") + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public androidx.emoji2.text.EmojiCompat.Config setGlyphChecker(androidx.emoji2.text.EmojiCompat.GlyphChecker glyphChecker) /// The returned object must be released after use, by calling the [release] method. @@ -364,22 +459,37 @@ class EmojiCompat_Config extends jni.JObject { EmojiCompat_Config setGlyphChecker( EmojiCompat_GlyphChecker glyphChecker, ) { - return _setGlyphChecker(reference.pointer, glyphChecker.reference.pointer) + return _setGlyphChecker( + reference.pointer, + _id_setGlyphChecker as jni.JMethodIDPtr, + glyphChecker.reference.pointer) .object(const $EmojiCompat_ConfigType()); } - static final _getMetadataRepoLoader = jniLookup< - ffi - .NativeFunction)>>( - "EmojiCompat_Config__getMetadataRepoLoader") - .asFunction)>(); + static final _id_getMetadataRepoLoader = _class.instanceMethodId( + r"getMetadataRepoLoader", + r"()Landroidx/emoji2/text/EmojiCompat$MetadataRepoLoader;", + ); + + static final _getMetadataRepoLoader = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: protected final androidx.emoji2.text.EmojiCompat.MetadataRepoLoader getMetadataRepoLoader() /// The returned object must be released after use, by calling the [release] method. /// /// Returns the MetadataRepoLoader. EmojiCompat_MetadataRepoLoader getMetadataRepoLoader() { - return _getMetadataRepoLoader(reference.pointer) + return _getMetadataRepoLoader( + reference.pointer, _id_getMetadataRepoLoader as jni.JMethodIDPtr) .object(const $EmojiCompat_MetadataRepoLoaderType()); } } @@ -421,26 +531,50 @@ class EmojiCompat_DefaultSpanFactory extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); + static final _class = jni.JClass.forName( + r"androidx/emoji2/text/EmojiCompat$DefaultSpanFactory"); + /// The type which includes information such as the signature of this class. static const type = $EmojiCompat_DefaultSpanFactoryType(); - static final _new0 = jniLookup>( - "EmojiCompat_DefaultSpanFactory__new0") - .asFunction(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory EmojiCompat_DefaultSpanFactory() { - return EmojiCompat_DefaultSpanFactory.fromReference(_new0().reference); + return EmojiCompat_DefaultSpanFactory.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } - static final _createSpan = jniLookup< + static final _id_createSpan = _class.instanceMethodId( + r"createSpan", + r"(Landroidx/emoji2/text/TypefaceEmojiRasterizer;)Landroidx/emoji2/text/EmojiSpan;", + ); + + static final _createSpan = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "EmojiCompat_DefaultSpanFactory__createSpan") + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public androidx.emoji2.text.EmojiSpan createSpan(androidx.emoji2.text.TypefaceEmojiRasterizer rasterizer) /// The returned object must be released after use, by calling the [release] method. @@ -452,7 +586,8 @@ class EmojiCompat_DefaultSpanFactory extends jni.JObject { jni.JObject createSpan( jni.JObject rasterizer, ) { - return _createSpan(reference.pointer, rasterizer.reference.pointer) + return _createSpan(reference.pointer, _id_createSpan as jni.JMethodIDPtr, + rasterizer.reference.pointer) .object(const jni.JObjectType()); } } @@ -496,19 +631,31 @@ class EmojiCompat_GlyphChecker extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); + static final _class = + jni.JClass.forName(r"androidx/emoji2/text/EmojiCompat$GlyphChecker"); + /// The type which includes information such as the signature of this class. static const type = $EmojiCompat_GlyphCheckerType(); - static final _hasGlyph = jniLookup< + static final _id_hasGlyph = _class.instanceMethodId( + r"hasGlyph", + r"(Ljava/lang/CharSequence;III)Z", + ); + + static final _hasGlyph = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Int32)>>("EmojiCompat_GlyphChecker__hasGlyph") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallBooleanMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer, int, int, int)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, int, int)>(); /// from: public abstract boolean hasGlyph(java.lang.CharSequence charSequence, int start, int end, int sdkAdded) /// @@ -553,8 +700,8 @@ class EmojiCompat_GlyphChecker extends jni.JObject { int end, int sdkAdded, ) { - return _hasGlyph(reference.pointer, charSequence.reference.pointer, start, - end, sdkAdded) + return _hasGlyph(reference.pointer, _id_hasGlyph as jni.JMethodIDPtr, + charSequence.reference.pointer, start, end, sdkAdded) .boolean; } } @@ -597,39 +744,76 @@ class EmojiCompat_InitCallback extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); + static final _class = + jni.JClass.forName(r"androidx/emoji2/text/EmojiCompat$InitCallback"); + /// The type which includes information such as the signature of this class. static const type = $EmojiCompat_InitCallbackType(); - static final _new0 = jniLookup>( - "EmojiCompat_InitCallback__new0") - .asFunction(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory EmojiCompat_InitCallback() { - return EmojiCompat_InitCallback.fromReference(_new0().reference); + return EmojiCompat_InitCallback.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } - static final _onInitialized = jniLookup< - ffi - .NativeFunction)>>( - "EmojiCompat_InitCallback__onInitialized") - .asFunction)>(); + static final _id_onInitialized = _class.instanceMethodId( + r"onInitialized", + r"()V", + ); + + static final _onInitialized = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public void onInitialized() /// /// Called when EmojiCompat is initialized and the emoji data is loaded. When used on devices /// running API 18 or below, this function is always called. void onInitialized() { - _onInitialized(reference.pointer).check(); + _onInitialized(reference.pointer, _id_onInitialized as jni.JMethodIDPtr) + .check(); } - static final _onFailed = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("EmojiCompat_InitCallback__onFailed") + static final _id_onFailed = _class.instanceMethodId( + r"onFailed", + r"(Ljava/lang/Throwable;)V", + ); + + static final _onFailed = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void onFailed(java.lang.Throwable throwable) /// @@ -638,7 +822,9 @@ class EmojiCompat_InitCallback extends jni.JObject { void onFailed( jni.JObject throwable, ) { - _onFailed(reference.pointer, throwable.reference.pointer).check(); + _onFailed(reference.pointer, _id_onFailed as jni.JMethodIDPtr, + throwable.reference.pointer) + .check(); } } @@ -678,6 +864,9 @@ class EmojiCompat_LoadStrategy extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); + static final _class = + jni.JClass.forName(r"androidx/emoji2/text/EmojiCompat$LoadStrategy"); + /// The type which includes information such as the signature of this class. static const type = $EmojiCompat_LoadStrategyType(); } @@ -720,16 +909,26 @@ class EmojiCompat_MetadataRepoLoader extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); + static final _class = jni.JClass.forName( + r"androidx/emoji2/text/EmojiCompat$MetadataRepoLoader"); + /// The type which includes information such as the signature of this class. static const type = $EmojiCompat_MetadataRepoLoaderType(); - static final _load = jniLookup< + static final _id_load = _class.instanceMethodId( + r"load", + r"(Landroidx/emoji2/text/EmojiCompat$MetadataRepoLoaderCallback;)V", + ); + + static final _load = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "EmojiCompat_MetadataRepoLoader__load") + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public abstract void load(androidx.emoji2.text.EmojiCompat.MetadataRepoLoaderCallback loaderCallback) /// @@ -740,7 +939,9 @@ class EmojiCompat_MetadataRepoLoader extends jni.JObject { void load( EmojiCompat_MetadataRepoLoaderCallback loaderCallback, ) { - _load(reference.pointer, loaderCallback.reference.pointer).check(); + _load(reference.pointer, _id_load as jni.JMethodIDPtr, + loaderCallback.reference.pointer) + .check(); } } @@ -784,27 +985,50 @@ class EmojiCompat_MetadataRepoLoaderCallback extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); + static final _class = jni.JClass.forName( + r"androidx/emoji2/text/EmojiCompat$MetadataRepoLoaderCallback"); + /// The type which includes information such as the signature of this class. static const type = $EmojiCompat_MetadataRepoLoaderCallbackType(); - static final _new0 = jniLookup>( - "EmojiCompat_MetadataRepoLoaderCallback__new0") - .asFunction(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory EmojiCompat_MetadataRepoLoaderCallback() { return EmojiCompat_MetadataRepoLoaderCallback.fromReference( - _new0().reference); + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } - static final _onLoaded = jniLookup< + static final _id_onLoaded = _class.instanceMethodId( + r"onLoaded", + r"(Landroidx/emoji2/text/MetadataRepo;)V", + ); + + static final _onLoaded = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "EmojiCompat_MetadataRepoLoaderCallback__onLoaded") + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public abstract void onLoaded(androidx.emoji2.text.MetadataRepo metadataRepo) /// @@ -813,17 +1037,26 @@ class EmojiCompat_MetadataRepoLoaderCallback extends jni.JObject { void onLoaded( jni.JObject metadataRepo, ) { - _onLoaded(reference.pointer, metadataRepo.reference.pointer).check(); + _onLoaded(reference.pointer, _id_onLoaded as jni.JMethodIDPtr, + metadataRepo.reference.pointer) + .check(); } - static final _onFailed = jniLookup< + static final _id_onFailed = _class.instanceMethodId( + r"onFailed", + r"(Ljava/lang/Throwable;)V", + ); + + static final _onFailed = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "EmojiCompat_MetadataRepoLoaderCallback__onFailed") + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public abstract void onFailed(java.lang.Throwable throwable) /// @@ -832,7 +1065,9 @@ class EmojiCompat_MetadataRepoLoaderCallback extends jni.JObject { void onFailed( jni.JObject throwable, ) { - _onFailed(reference.pointer, throwable.reference.pointer).check(); + _onFailed(reference.pointer, _id_onFailed as jni.JMethodIDPtr, + throwable.reference.pointer) + .check(); } } @@ -874,6 +1109,9 @@ class EmojiCompat_ReplaceStrategy extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); + static final _class = + jni.JClass.forName(r"androidx/emoji2/text/EmojiCompat$ReplaceStrategy"); + /// The type which includes information such as the signature of this class. static const type = $EmojiCompat_ReplaceStrategyType(); } @@ -921,16 +1159,26 @@ class EmojiCompat_SpanFactory extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); + static final _class = + jni.JClass.forName(r"androidx/emoji2/text/EmojiCompat$SpanFactory"); + /// The type which includes information such as the signature of this class. static const type = $EmojiCompat_SpanFactoryType(); - static final _createSpan = jniLookup< + static final _id_createSpan = _class.instanceMethodId( + r"createSpan", + r"(Landroidx/emoji2/text/TypefaceEmojiRasterizer;)Landroidx/emoji2/text/EmojiSpan;", + ); + + static final _createSpan = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "EmojiCompat_SpanFactory__createSpan") + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public abstract androidx.emoji2.text.EmojiSpan createSpan(androidx.emoji2.text.TypefaceEmojiRasterizer rasterizer) /// The returned object must be released after use, by calling the [release] method. @@ -942,7 +1190,8 @@ class EmojiCompat_SpanFactory extends jni.JObject { jni.JObject createSpan( jni.JObject rasterizer, ) { - return _createSpan(reference.pointer, rasterizer.reference.pointer) + return _createSpan(reference.pointer, _id_createSpan as jni.JMethodIDPtr, + rasterizer.reference.pointer) .object(const jni.JObjectType()); } } @@ -1031,12 +1280,14 @@ class EmojiCompat extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); + static final _class = jni.JClass.forName(r"androidx/emoji2/text/EmojiCompat"); + /// The type which includes information such as the signature of this class. static const type = $EmojiCompatType(); - static final _get_EDITOR_INFO_METAVERSION_KEY = - jniLookup>( - "get_EmojiCompat__EDITOR_INFO_METAVERSION_KEY") - .asFunction(); + static final _id_EDITOR_INFO_METAVERSION_KEY = _class.staticFieldId( + r"EDITOR_INFO_METAVERSION_KEY", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String EDITOR_INFO_METAVERSION_KEY /// The returned object must be released after use, by calling the [release] method. @@ -1048,12 +1299,12 @@ class EmojiCompat extends jni.JObject { /// see whether the widget has the ability to display a certain emoji using /// \#hasEmojiGlyph(CharSequence, int). static jni.JString get EDITOR_INFO_METAVERSION_KEY => - _get_EDITOR_INFO_METAVERSION_KEY().object(const jni.JStringType()); + _id_EDITOR_INFO_METAVERSION_KEY.get(_class, const jni.JStringType()); - static final _get_EDITOR_INFO_REPLACE_ALL_KEY = - jniLookup>( - "get_EmojiCompat__EDITOR_INFO_REPLACE_ALL_KEY") - .asFunction(); + static final _id_EDITOR_INFO_REPLACE_ALL_KEY = _class.staticFieldId( + r"EDITOR_INFO_REPLACE_ALL_KEY", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String EDITOR_INFO_REPLACE_ALL_KEY /// The returned object must be released after use, by calling the [release] method. @@ -1061,7 +1312,7 @@ class EmojiCompat extends jni.JObject { /// Key in EditorInfo\#extras that represents EmojiCompat.Config\#setReplaceAll(boolean) configuration parameter. The key is added only if /// EmojiCompat is used by the widget. If exists, the value is a boolean. static jni.JString get EDITOR_INFO_REPLACE_ALL_KEY => - _get_EDITOR_INFO_REPLACE_ALL_KEY().object(const jni.JStringType()); + _id_EDITOR_INFO_REPLACE_ALL_KEY.get(_class, const jni.JStringType()); /// from: static public final int LOAD_STATE_DEFAULT /// @@ -1227,11 +1478,21 @@ class EmojiCompat extends jni.JObject { /// androidx.core.graphics.PaintCompat\#hasGlyph(Paint, String) for each emoji /// subsequence. static const EMOJI_FALLBACK = 2; - static final _init = jniLookup< - ffi - .NativeFunction)>>( - "EmojiCompat__init") - .asFunction)>(); + static final _id_init = _class.staticMethodId( + r"init", + r"(Landroid/content/Context;)Landroidx/emoji2/text/EmojiCompat;", + ); + + static final _init = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: static public androidx.emoji2.text.EmojiCompat init(android.content.Context context) /// The returned object must be released after use, by calling the [release] method. @@ -1254,15 +1515,28 @@ class EmojiCompat extends jni.JObject { static EmojiCompat init( jni.JObject context, ) { - return _init(context.reference.pointer).object(const $EmojiCompatType()); + return _init(_class.reference.pointer, _id_init as jni.JMethodIDPtr, + context.reference.pointer) + .object(const $EmojiCompatType()); } - static final _init1 = jniLookup< + static final _id_init1 = _class.staticMethodId( + r"init", + r"(Landroid/content/Context;Landroidx/emoji2/text/DefaultEmojiCompatConfig$DefaultEmojiCompatConfigFactory;)Landroidx/emoji2/text/EmojiCompat;", + ); + + static final _init1 = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("EmojiCompat__init1") + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") .asFunction< - jni.JniResult Function( + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); /// from: static public androidx.emoji2.text.EmojiCompat init(android.content.Context context, androidx.emoji2.text.DefaultEmojiCompatConfig.DefaultEmojiCompatConfigFactory defaultFactory) @@ -1273,15 +1547,26 @@ class EmojiCompat extends jni.JObject { jni.JObject context, DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory defaultFactory, ) { - return _init1(context.reference.pointer, defaultFactory.reference.pointer) + return _init1(_class.reference.pointer, _id_init1 as jni.JMethodIDPtr, + context.reference.pointer, defaultFactory.reference.pointer) .object(const $EmojiCompatType()); } - static final _init2 = jniLookup< - ffi - .NativeFunction)>>( - "EmojiCompat__init2") - .asFunction)>(); + static final _id_init2 = _class.staticMethodId( + r"init", + r"(Landroidx/emoji2/text/EmojiCompat$Config;)Landroidx/emoji2/text/EmojiCompat;", + ); + + static final _init2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: static public androidx.emoji2.text.EmojiCompat init(androidx.emoji2.text.EmojiCompat.Config config) /// The returned object must be released after use, by calling the [release] method. @@ -1295,13 +1580,27 @@ class EmojiCompat extends jni.JObject { static EmojiCompat init2( EmojiCompat_Config config, ) { - return _init2(config.reference.pointer).object(const $EmojiCompatType()); + return _init2(_class.reference.pointer, _id_init2 as jni.JMethodIDPtr, + config.reference.pointer) + .object(const $EmojiCompatType()); } - static final _isConfigured = - jniLookup>( - "EmojiCompat__isConfigured") - .asFunction(); + static final _id_isConfigured = _class.staticMethodId( + r"isConfigured", + r"()Z", + ); + + static final _isConfigured = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: static public boolean isConfigured() /// @@ -1315,14 +1614,26 @@ class EmojiCompat extends jni.JObject { /// font is still loading, or has failed to load. ///@return true if EmojiCompat has been successfully initialized. static bool isConfigured() { - return _isConfigured().boolean; + return _isConfigured( + _class.reference.pointer, _id_isConfigured as jni.JMethodIDPtr) + .boolean; } - static final _reset = jniLookup< - ffi - .NativeFunction)>>( - "EmojiCompat__reset") - .asFunction)>(); + static final _id_reset = _class.staticMethodId( + r"reset", + r"(Landroidx/emoji2/text/EmojiCompat$Config;)Landroidx/emoji2/text/EmojiCompat;", + ); + + static final _reset = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: static public androidx.emoji2.text.EmojiCompat reset(androidx.emoji2.text.EmojiCompat.Config config) /// The returned object must be released after use, by calling the [release] method. @@ -1333,14 +1644,26 @@ class EmojiCompat extends jni.JObject { static EmojiCompat reset( EmojiCompat_Config config, ) { - return _reset(config.reference.pointer).object(const $EmojiCompatType()); + return _reset(_class.reference.pointer, _id_reset as jni.JMethodIDPtr, + config.reference.pointer) + .object(const $EmojiCompatType()); } - static final _reset1 = jniLookup< - ffi - .NativeFunction)>>( - "EmojiCompat__reset1") - .asFunction)>(); + static final _id_reset1 = _class.staticMethodId( + r"reset", + r"(Landroidx/emoji2/text/EmojiCompat;)Landroidx/emoji2/text/EmojiCompat;", + ); + + static final _reset1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: static public androidx.emoji2.text.EmojiCompat reset(androidx.emoji2.text.EmojiCompat emojiCompat) /// The returned object must be released after use, by calling the [release] method. @@ -1350,14 +1673,25 @@ class EmojiCompat extends jni.JObject { static EmojiCompat reset1( EmojiCompat emojiCompat, ) { - return _reset1(emojiCompat.reference.pointer) + return _reset1(_class.reference.pointer, _id_reset1 as jni.JMethodIDPtr, + emojiCompat.reference.pointer) .object(const $EmojiCompatType()); } - static final _skipDefaultConfigurationLookup = - jniLookup>( - "EmojiCompat__skipDefaultConfigurationLookup") - .asFunction(); + static final _id_skipDefaultConfigurationLookup = _class.staticMethodId( + r"skipDefaultConfigurationLookup", + r"(Z)V", + ); + + static final _skipDefaultConfigurationLookup = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallStaticVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); /// from: static public void skipDefaultConfigurationLookup(boolean shouldSkip) /// @@ -1366,12 +1700,29 @@ class EmojiCompat extends jni.JObject { static void skipDefaultConfigurationLookup( bool shouldSkip, ) { - _skipDefaultConfigurationLookup(shouldSkip ? 1 : 0).check(); + _skipDefaultConfigurationLookup( + _class.reference.pointer, + _id_skipDefaultConfigurationLookup as jni.JMethodIDPtr, + shouldSkip ? 1 : 0) + .check(); } - static final _get0 = jniLookup>( - "EmojiCompat__get0") - .asFunction(); + static final _id_get0 = _class.staticMethodId( + r"get", + r"()Landroidx/emoji2/text/EmojiCompat;", + ); + + static final _get0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: static public androidx.emoji2.text.EmojiCompat get() /// The returned object must be released after use, by calling the [release] method. @@ -1381,14 +1732,26 @@ class EmojiCompat extends jni.JObject { ///@return EmojiCompat instance ///@throws IllegalStateException if called before \#init(EmojiCompat.Config) static EmojiCompat get0() { - return _get0().object(const $EmojiCompatType()); + return _get0(_class.reference.pointer, _id_get0 as jni.JMethodIDPtr) + .object(const $EmojiCompatType()); } - static final _load = jniLookup< - ffi - .NativeFunction)>>( - "EmojiCompat__load") - .asFunction)>(); + static final _id_load = _class.instanceMethodId( + r"load", + r"()V", + ); + + static final _load = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public void load() /// @@ -1406,16 +1769,24 @@ class EmojiCompat extends jni.JObject { ///@throws IllegalStateException when Config\#setMetadataLoadStrategy(int) is not set /// to \#LOAD_STRATEGY_MANUAL void load() { - _load(reference.pointer).check(); + _load(reference.pointer, _id_load as jni.JMethodIDPtr).check(); } - static final _registerInitCallback = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("EmojiCompat__registerInitCallback") + static final _id_registerInitCallback = _class.instanceMethodId( + r"registerInitCallback", + r"(Landroidx/emoji2/text/EmojiCompat$InitCallback;)V", + ); + + static final _registerInitCallback = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void registerInitCallback(androidx.emoji2.text.EmojiCompat.InitCallback initCallback) /// @@ -1431,18 +1802,28 @@ class EmojiCompat extends jni.JObject { void registerInitCallback( EmojiCompat_InitCallback initCallback, ) { - _registerInitCallback(reference.pointer, initCallback.reference.pointer) + _registerInitCallback( + reference.pointer, + _id_registerInitCallback as jni.JMethodIDPtr, + initCallback.reference.pointer) .check(); } - static final _unregisterInitCallback = jniLookup< + static final _id_unregisterInitCallback = _class.instanceMethodId( + r"unregisterInitCallback", + r"(Landroidx/emoji2/text/EmojiCompat$InitCallback;)V", + ); + + static final _unregisterInitCallback = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "EmojiCompat__unregisterInitCallback") + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void unregisterInitCallback(androidx.emoji2.text.EmojiCompat.InitCallback initCallback) /// @@ -1451,15 +1832,29 @@ class EmojiCompat extends jni.JObject { void unregisterInitCallback( EmojiCompat_InitCallback initCallback, ) { - _unregisterInitCallback(reference.pointer, initCallback.reference.pointer) + _unregisterInitCallback( + reference.pointer, + _id_unregisterInitCallback as jni.JMethodIDPtr, + initCallback.reference.pointer) .check(); } - static final _getLoadState = jniLookup< - ffi - .NativeFunction)>>( - "EmojiCompat__getLoadState") - .asFunction)>(); + static final _id_getLoadState = _class.instanceMethodId( + r"getLoadState", + r"()I", + ); + + static final _getLoadState = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public int getLoadState() /// @@ -1468,46 +1863,80 @@ class EmojiCompat extends jni.JObject { ///@return one of \#LOAD_STATE_DEFAULT, \#LOAD_STATE_LOADING, /// \#LOAD_STATE_SUCCEEDED, \#LOAD_STATE_FAILED int getLoadState() { - return _getLoadState(reference.pointer).integer; + return _getLoadState( + reference.pointer, _id_getLoadState as jni.JMethodIDPtr) + .integer; } - static final _isEmojiSpanIndicatorEnabled = jniLookup< - ffi - .NativeFunction)>>( - "EmojiCompat__isEmojiSpanIndicatorEnabled") - .asFunction)>(); + static final _id_isEmojiSpanIndicatorEnabled = _class.instanceMethodId( + r"isEmojiSpanIndicatorEnabled", + r"()Z", + ); + + static final _isEmojiSpanIndicatorEnabled = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public boolean isEmojiSpanIndicatorEnabled() /// /// @return whether a background should be drawn for the emoji for debugging ///@hide bool isEmojiSpanIndicatorEnabled() { - return _isEmojiSpanIndicatorEnabled(reference.pointer).boolean; + return _isEmojiSpanIndicatorEnabled(reference.pointer, + _id_isEmojiSpanIndicatorEnabled as jni.JMethodIDPtr) + .boolean; } - static final _getEmojiSpanIndicatorColor = jniLookup< - ffi - .NativeFunction)>>( - "EmojiCompat__getEmojiSpanIndicatorColor") - .asFunction)>(); + static final _id_getEmojiSpanIndicatorColor = _class.instanceMethodId( + r"getEmojiSpanIndicatorColor", + r"()I", + ); - /// from: public int getEmojiSpanIndicatorColor() - /// + static final _getEmojiSpanIndicatorColor = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public int getEmojiSpanIndicatorColor() + /// /// @return color of background drawn if EmojiCompat\#isEmojiSpanIndicatorEnabled is true ///@hide int getEmojiSpanIndicatorColor() { - return _getEmojiSpanIndicatorColor(reference.pointer).integer; + return _getEmojiSpanIndicatorColor(reference.pointer, + _id_getEmojiSpanIndicatorColor as jni.JMethodIDPtr) + .integer; } - static final _getEmojiStart = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>("EmojiCompat__getEmojiStart") + static final _id_getEmojiStart = _class.instanceMethodId( + r"getEmojiStart", + r"(Ljava/lang/CharSequence;I)I", + ); + + static final _getEmojiStart = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, ffi.Int64)>)>>( + "globalEnv_CallIntMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer, int)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); /// from: public int getEmojiStart(java.lang.CharSequence charSequence, int offset) /// @@ -1525,19 +1954,28 @@ class EmojiCompat extends jni.JObject { int offset, ) { return _getEmojiStart( - reference.pointer, charSequence.reference.pointer, offset) + reference.pointer, + _id_getEmojiStart as jni.JMethodIDPtr, + charSequence.reference.pointer, + offset) .integer; } - static final _getEmojiEnd = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>("EmojiCompat__getEmojiEnd") + static final _id_getEmojiEnd = _class.instanceMethodId( + r"getEmojiEnd", + r"(Ljava/lang/CharSequence;I)I", + ); + + static final _getEmojiEnd = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, ffi.Int64)>)>>( + "globalEnv_CallIntMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer, int)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); /// from: public int getEmojiEnd(java.lang.CharSequence charSequence, int offset) /// @@ -1546,17 +1984,29 @@ class EmojiCompat extends jni.JObject { jni.JObject charSequence, int offset, ) { - return _getEmojiEnd( - reference.pointer, charSequence.reference.pointer, offset) + return _getEmojiEnd(reference.pointer, _id_getEmojiEnd as jni.JMethodIDPtr, + charSequence.reference.pointer, offset) .integer; } - static final _handleOnKeyDown = jniLookup< + static final _id_handleOnKeyDown = _class.staticMethodId( + r"handleOnKeyDown", + r"(Landroid/text/Editable;ILandroid/view/KeyEvent;)Z", + ); + + static final _handleOnKeyDown = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, ffi.Int32, - ffi.Pointer)>>("EmojiCompat__handleOnKeyDown") + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Int64, + ffi.Pointer + )>)>>("globalEnv_CallStaticBooleanMethod") .asFunction< - jni.JniResult Function( + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, int, ffi.Pointer)>(); /// from: static public boolean handleOnKeyDown(android.text.Editable editable, int keyCode, android.view.KeyEvent event) @@ -1583,20 +2033,34 @@ class EmojiCompat extends jni.JObject { jni.JObject event, ) { return _handleOnKeyDown( - editable.reference.pointer, keyCode, event.reference.pointer) + _class.reference.pointer, + _id_handleOnKeyDown as jni.JMethodIDPtr, + editable.reference.pointer, + keyCode, + event.reference.pointer) .boolean; } - static final _handleDeleteSurroundingText = jniLookup< + static final _id_handleDeleteSurroundingText = _class.staticMethodId( + r"handleDeleteSurroundingText", + r"(Landroid/view/inputmethod/InputConnection;Landroid/text/Editable;IIZ)Z", + ); + + static final _handleDeleteSurroundingText = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Uint8)>>("EmojiCompat__handleDeleteSurroundingText") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallStaticBooleanMethod") .asFunction< - jni.JniResult Function( + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int, int, int)>(); /// from: static public boolean handleDeleteSurroundingText(android.view.inputmethod.InputConnection inputConnection, android.text.Editable editable, int beforeLength, int afterLength, boolean inCodePoints) @@ -1623,6 +2087,8 @@ class EmojiCompat extends jni.JObject { bool inCodePoints, ) { return _handleDeleteSurroundingText( + _class.reference.pointer, + _id_handleDeleteSurroundingText as jni.JMethodIDPtr, inputConnection.reference.pointer, editable.reference.pointer, beforeLength, @@ -1631,13 +2097,21 @@ class EmojiCompat extends jni.JObject { .boolean; } - static final _hasEmojiGlyph = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("EmojiCompat__hasEmojiGlyph") + static final _id_hasEmojiGlyph = _class.instanceMethodId( + r"hasEmojiGlyph", + r"(Ljava/lang/CharSequence;)Z", + ); + + static final _hasEmojiGlyph = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallBooleanMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public boolean hasEmojiGlyph(java.lang.CharSequence sequence) /// @@ -1650,19 +2124,26 @@ class EmojiCompat extends jni.JObject { bool hasEmojiGlyph( jni.JObject sequence, ) { - return _hasEmojiGlyph(reference.pointer, sequence.reference.pointer) + return _hasEmojiGlyph(reference.pointer, + _id_hasEmojiGlyph as jni.JMethodIDPtr, sequence.reference.pointer) .boolean; } - static final _hasEmojiGlyph1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>("EmojiCompat__hasEmojiGlyph1") + static final _id_hasEmojiGlyph1 = _class.instanceMethodId( + r"hasEmojiGlyph", + r"(Ljava/lang/CharSequence;I)Z", + ); + + static final _hasEmojiGlyph1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, ffi.Int64)>)>>( + "globalEnv_CallBooleanMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer, int)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); /// from: public boolean hasEmojiGlyph(java.lang.CharSequence sequence, int metadataVersion) /// @@ -1679,19 +2160,28 @@ class EmojiCompat extends jni.JObject { int metadataVersion, ) { return _hasEmojiGlyph1( - reference.pointer, sequence.reference.pointer, metadataVersion) + reference.pointer, + _id_hasEmojiGlyph1 as jni.JMethodIDPtr, + sequence.reference.pointer, + metadataVersion) .boolean; } - static final _getEmojiMatch = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>("EmojiCompat__getEmojiMatch") + static final _id_getEmojiMatch = _class.instanceMethodId( + r"getEmojiMatch", + r"(Ljava/lang/CharSequence;I)I", + ); + + static final _getEmojiMatch = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, ffi.Int64)>)>>( + "globalEnv_CallIntMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer, int)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); /// from: public int getEmojiMatch(java.lang.CharSequence sequence, int metadataVersion) /// @@ -1711,17 +2201,28 @@ class EmojiCompat extends jni.JObject { int metadataVersion, ) { return _getEmojiMatch( - reference.pointer, sequence.reference.pointer, metadataVersion) + reference.pointer, + _id_getEmojiMatch as jni.JMethodIDPtr, + sequence.reference.pointer, + metadataVersion) .integer; } - static final _process = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("EmojiCompat__process") + static final _id_process = _class.instanceMethodId( + r"process", + r"(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;", + ); + + static final _process = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public java.lang.CharSequence process(java.lang.CharSequence charSequence) /// The returned object must be released after use, by calling the [release] method. @@ -1735,20 +2236,30 @@ class EmojiCompat extends jni.JObject { jni.JObject process( jni.JObject charSequence, ) { - return _process(reference.pointer, charSequence.reference.pointer) + return _process(reference.pointer, _id_process as jni.JMethodIDPtr, + charSequence.reference.pointer) .object(const jni.JObjectType()); } - static final _process1 = jniLookup< + static final _id_process1 = _class.instanceMethodId( + r"process", + r"(Ljava/lang/CharSequence;II)Ljava/lang/CharSequence;", + ); + + static final _process1 = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32)>>("EmojiCompat__process1") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer, int, int)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, int)>(); /// from: public java.lang.CharSequence process(java.lang.CharSequence charSequence, int start, int end) /// The returned object must be released after use, by calling the [release] method. @@ -1781,22 +2292,31 @@ class EmojiCompat extends jni.JObject { int start, int end, ) { - return _process1( - reference.pointer, charSequence.reference.pointer, start, end) + return _process1(reference.pointer, _id_process1 as jni.JMethodIDPtr, + charSequence.reference.pointer, start, end) .object(const jni.JObjectType()); } - static final _process2 = jniLookup< + static final _id_process2 = _class.instanceMethodId( + r"process", + r"(Ljava/lang/CharSequence;III)Ljava/lang/CharSequence;", + ); + + static final _process2 = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Int32)>>("EmojiCompat__process2") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer, int, int, int)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, int, int)>(); /// from: public java.lang.CharSequence process(java.lang.CharSequence charSequence, int start, int end, int maxEmojiCount) /// The returned object must be released after use, by calling the [release] method. @@ -1833,23 +2353,32 @@ class EmojiCompat extends jni.JObject { int end, int maxEmojiCount, ) { - return _process2(reference.pointer, charSequence.reference.pointer, start, - end, maxEmojiCount) + return _process2(reference.pointer, _id_process2 as jni.JMethodIDPtr, + charSequence.reference.pointer, start, end, maxEmojiCount) .object(const jni.JObjectType()); } - static final _process3 = jniLookup< + static final _id_process3 = _class.instanceMethodId( + r"process", + r"(Ljava/lang/CharSequence;IIII)Ljava/lang/CharSequence;", + ); + + static final _process3 = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Int32, - ffi.Int32)>>("EmojiCompat__process3") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - int, int, int, int)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, int, int, int)>(); /// from: public java.lang.CharSequence process(java.lang.CharSequence charSequence, int start, int end, int maxEmojiCount, int replaceStrategy) /// The returned object must be released after use, by calling the [release] method. @@ -1891,16 +2420,33 @@ class EmojiCompat extends jni.JObject { int maxEmojiCount, int replaceStrategy, ) { - return _process3(reference.pointer, charSequence.reference.pointer, start, - end, maxEmojiCount, replaceStrategy) + return _process3( + reference.pointer, + _id_process3 as jni.JMethodIDPtr, + charSequence.reference.pointer, + start, + end, + maxEmojiCount, + replaceStrategy) .object(const jni.JObjectType()); } - static final _getAssetSignature = jniLookup< - ffi - .NativeFunction)>>( - "EmojiCompat__getAssetSignature") - .asFunction)>(); + static final _id_getAssetSignature = _class.instanceMethodId( + r"getAssetSignature", + r"()Ljava/lang/String;", + ); + + static final _getAssetSignature = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.lang.String getAssetSignature() /// The returned object must be released after use, by calling the [release] method. @@ -1910,17 +2456,26 @@ class EmojiCompat extends jni.JObject { /// then previous executions. When used on devices running API 18 or below, returns empty string. ///@throws IllegalStateException if not initialized yet jni.JString getAssetSignature() { - return _getAssetSignature(reference.pointer) + return _getAssetSignature( + reference.pointer, _id_getAssetSignature as jni.JMethodIDPtr) .object(const jni.JStringType()); } - static final _updateEditorInfo = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("EmojiCompat__updateEditorInfo") + static final _id_updateEditorInfo = _class.instanceMethodId( + r"updateEditorInfo", + r"(Landroid/view/inputmethod/EditorInfo;)V", + ); + + static final _updateEditorInfo = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void updateEditorInfo(android.view.inputmethod.EditorInfo outAttrs) /// @@ -1942,7 +2497,11 @@ class EmojiCompat extends jni.JObject { void updateEditorInfo( jni.JObject outAttrs, ) { - _updateEditorInfo(reference.pointer, outAttrs.reference.pointer).check(); + _updateEditorInfo( + reference.pointer, + _id_updateEditorInfo as jni.JMethodIDPtr, + outAttrs.reference.pointer) + .check(); } } @@ -1987,14 +2546,26 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory jni.JReference reference, ) : super.fromReference(reference); + static final _class = jni.JClass.forName( + r"androidx/emoji2/text/DefaultEmojiCompatConfig$DefaultEmojiCompatConfigFactory"); + /// The type which includes information such as the signature of this class. static const type = $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactoryType(); - static final _new0 = jniLookup< - ffi - .NativeFunction)>>( - "DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory__new0") - .asFunction)>(); + static final _id_new0 = _class.constructorId( + r"(Landroidx/emoji2/text/DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void (androidx.emoji2.text.DefaultEmojiCompatConfig.DefaultEmojiCompatConfigHelper helper) /// The returned object must be released after use, by calling the [release] method. @@ -2004,17 +2575,26 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper helper, ) { return DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory - .fromReference(_new0(helper.reference.pointer).reference); + .fromReference(_new0(_class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, helper.reference.pointer) + .reference); } - static final _create = jniLookup< + static final _id_create = _class.instanceMethodId( + r"create", + r"(Landroid/content/Context;)Landroidx/emoji2/text/EmojiCompat$Config;", + ); + + static final _create = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory__create") + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public androidx.emoji2.text.EmojiCompat.Config create(android.content.Context context) /// The returned object must be released after use, by calling the [release] method. @@ -2024,7 +2604,8 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory EmojiCompat_Config create( jni.JObject context, ) { - return _create(reference.pointer, context.reference.pointer) + return _create(reference.pointer, _id_create as jni.JMethodIDPtr, + context.reference.pointer) .object(const $EmojiCompat_ConfigType()); } } @@ -2077,28 +2658,55 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper jni.JReference reference, ) : super.fromReference(reference); + static final _class = jni.JClass.forName( + r"androidx/emoji2/text/DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper"); + /// The type which includes information such as the signature of this class. static const type = $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelperType(); - static final _new0 = jniLookup>( - "DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__new0") - .asFunction(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper() { return DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper - .fromReference(_new0().reference); + .fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } - static final _getSigningSignatures = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>( - "DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__getSigningSignatures") + static final _id_getSigningSignatures = _class.instanceMethodId( + r"getSigningSignatures", + r"(Landroid/content/pm/PackageManager;Ljava/lang/String;)[Landroid/content/pm/Signature;", + ); + + static final _getSigningSignatures = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); /// from: public android.content.pm.Signature[] getSigningSignatures(android.content.pm.PackageManager packageManager, java.lang.String providerPackage) /// The returned object must be released after use, by calling the [release] method. @@ -2108,22 +2716,33 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper jni.JObject packageManager, jni.JString providerPackage, ) { - return _getSigningSignatures(reference.pointer, - packageManager.reference.pointer, providerPackage.reference.pointer) + return _getSigningSignatures( + reference.pointer, + _id_getSigningSignatures as jni.JMethodIDPtr, + packageManager.reference.pointer, + providerPackage.reference.pointer) .object(const jni.JArrayType(jni.JObjectType())); } - static final _queryIntentContentProviders = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>( - "DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__queryIntentContentProviders") + static final _id_queryIntentContentProviders = _class.instanceMethodId( + r"queryIntentContentProviders", + r"(Landroid/content/pm/PackageManager;Landroid/content/Intent;I)Ljava/util/List;", + ); + + static final _queryIntentContentProviders = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64 + )>)>>("globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer, int)>(); /// from: public java.util.List queryIntentContentProviders(android.content.pm.PackageManager packageManager, android.content.Intent intent, int flags) /// The returned object must be released after use, by calling the [release] method. @@ -2134,19 +2753,30 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper jni.JObject intent, int flags, ) { - return _queryIntentContentProviders(reference.pointer, - packageManager.reference.pointer, intent.reference.pointer, flags) + return _queryIntentContentProviders( + reference.pointer, + _id_queryIntentContentProviders as jni.JMethodIDPtr, + packageManager.reference.pointer, + intent.reference.pointer, + flags) .object(const jni.JListType(jni.JObjectType())); } - static final _getProviderInfo = jniLookup< + static final _id_getProviderInfo = _class.instanceMethodId( + r"getProviderInfo", + r"(Landroid/content/pm/ResolveInfo;)Landroid/content/pm/ProviderInfo;", + ); + + static final _getProviderInfo = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__getProviderInfo") + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public android.content.pm.ProviderInfo getProviderInfo(android.content.pm.ResolveInfo resolveInfo) /// The returned object must be released after use, by calling the [release] method. @@ -2157,7 +2787,10 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper jni.JObject getProviderInfo( jni.JObject resolveInfo, ) { - return _getProviderInfo(reference.pointer, resolveInfo.reference.pointer) + return _getProviderInfo( + reference.pointer, + _id_getProviderInfo as jni.JMethodIDPtr, + resolveInfo.reference.pointer) .object(const jni.JObjectType()); } } @@ -2210,31 +2843,56 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19 jni.JReference reference, ) : super.fromReference(reference); + static final _class = jni.JClass.forName( + r"androidx/emoji2/text/DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper_API19"); + /// The type which includes information such as the signature of this class. static const type = $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19Type(); - static final _new0 = jniLookup>( - "DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19__new0") - .asFunction(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19() { return DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19 - .fromReference(_new0().reference); + .fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } - static final _queryIntentContentProviders = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>( - "DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19__queryIntentContentProviders") + static final _id_queryIntentContentProviders = _class.instanceMethodId( + r"queryIntentContentProviders", + r"(Landroid/content/pm/PackageManager;Landroid/content/Intent;I)Ljava/util/List;", + ); + + static final _queryIntentContentProviders = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64 + )>)>>("globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer, int)>(); /// from: public java.util.List queryIntentContentProviders(android.content.pm.PackageManager packageManager, android.content.Intent intent, int flags) /// The returned object must be released after use, by calling the [release] method. @@ -2243,26 +2901,40 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19 jni.JObject intent, int flags, ) { - return _queryIntentContentProviders(reference.pointer, - packageManager.reference.pointer, intent.reference.pointer, flags) + return _queryIntentContentProviders( + reference.pointer, + _id_queryIntentContentProviders as jni.JMethodIDPtr, + packageManager.reference.pointer, + intent.reference.pointer, + flags) .object(const jni.JListType(jni.JObjectType())); } - static final _getProviderInfo = jniLookup< + static final _id_getProviderInfo = _class.instanceMethodId( + r"getProviderInfo", + r"(Landroid/content/pm/ResolveInfo;)Landroid/content/pm/ProviderInfo;", + ); + + static final _getProviderInfo = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19__getProviderInfo") + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public android.content.pm.ProviderInfo getProviderInfo(android.content.pm.ResolveInfo resolveInfo) /// The returned object must be released after use, by calling the [release] method. jni.JObject getProviderInfo( jni.JObject resolveInfo, ) { - return _getProviderInfo(reference.pointer, resolveInfo.reference.pointer) + return _getProviderInfo( + reference.pointer, + _id_getProviderInfo as jni.JMethodIDPtr, + resolveInfo.reference.pointer) .object(const jni.JObjectType()); } } @@ -2318,28 +2990,55 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28 jni.JReference reference, ) : super.fromReference(reference); + static final _class = jni.JClass.forName( + r"androidx/emoji2/text/DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper_API28"); + /// The type which includes information such as the signature of this class. static const type = $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28Type(); - static final _new0 = jniLookup>( - "DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28__new0") - .asFunction(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28() { return DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28 - .fromReference(_new0().reference); + .fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } - static final _getSigningSignatures1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>( - "DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28__getSigningSignatures1") + static final _id_getSigningSignatures1 = _class.instanceMethodId( + r"getSigningSignatures", + r"(Landroid/content/pm/PackageManager;Ljava/lang/String;)[Landroid/content/pm/Signature;", + ); + + static final _getSigningSignatures1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); /// from: public android.content.pm.Signature[] getSigningSignatures(android.content.pm.PackageManager packageManager, java.lang.String providerPackage) /// The returned object must be released after use, by calling the [release] method. @@ -2347,8 +3046,11 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28 jni.JObject packageManager, jni.JString providerPackage, ) { - return _getSigningSignatures1(reference.pointer, - packageManager.reference.pointer, providerPackage.reference.pointer) + return _getSigningSignatures1( + reference.pointer, + _id_getSigningSignatures1 as jni.JMethodIDPtr, + packageManager.reference.pointer, + providerPackage.reference.pointer) .object(const jni.JArrayType(jni.JObjectType())); } } @@ -2433,13 +3135,26 @@ class DefaultEmojiCompatConfig extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); + static final _class = + jni.JClass.forName(r"androidx/emoji2/text/DefaultEmojiCompatConfig"); + /// The type which includes information such as the signature of this class. static const type = $DefaultEmojiCompatConfigType(); - static final _create = jniLookup< - ffi - .NativeFunction)>>( - "DefaultEmojiCompatConfig__create") - .asFunction)>(); + static final _id_create = _class.staticMethodId( + r"create", + r"(Landroid/content/Context;)Landroidx/emoji2/text/FontRequestEmojiCompatConfig;", + ); + + static final _create = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: static public androidx.emoji2.text.FontRequestEmojiCompatConfig create(android.content.Context context) /// The returned object must be released after use, by calling the [release] method. @@ -2456,7 +3171,9 @@ class DefaultEmojiCompatConfig extends jni.JObject { static jni.JObject create( jni.JObject context, ) { - return _create(context.reference.pointer).object(const jni.JObjectType()); + return _create(_class.reference.pointer, _id_create as jni.JMethodIDPtr, + context.reference.pointer) + .object(const jni.JObjectType()); } } @@ -2496,77 +3213,139 @@ class Build_Partition extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); + static final _class = jni.JClass.forName(r"android/os/Build$Partition"); + /// The type which includes information such as the signature of this class. static const type = $Build_PartitionType(); - static final _get_PARTITION_NAME_SYSTEM = - jniLookup>( - "get_Build_Partition__PARTITION_NAME_SYSTEM") - .asFunction(); + static final _id_PARTITION_NAME_SYSTEM = _class.staticFieldId( + r"PARTITION_NAME_SYSTEM", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String PARTITION_NAME_SYSTEM /// The returned object must be released after use, by calling the [release] method. static jni.JString get PARTITION_NAME_SYSTEM => - _get_PARTITION_NAME_SYSTEM().object(const jni.JStringType()); + _id_PARTITION_NAME_SYSTEM.get(_class, const jni.JStringType()); - static final _getName = jniLookup< - ffi - .NativeFunction)>>( - "Build_Partition__getName") - .asFunction)>(); + static final _id_getName = _class.instanceMethodId( + r"getName", + r"()Ljava/lang/String;", + ); + + static final _getName = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.lang.String getName() /// The returned object must be released after use, by calling the [release] method. jni.JString getName() { - return _getName(reference.pointer).object(const jni.JStringType()); + return _getName(reference.pointer, _id_getName as jni.JMethodIDPtr) + .object(const jni.JStringType()); } - static final _getFingerprint = jniLookup< - ffi - .NativeFunction)>>( - "Build_Partition__getFingerprint") - .asFunction)>(); + static final _id_getFingerprint = _class.instanceMethodId( + r"getFingerprint", + r"()Ljava/lang/String;", + ); + + static final _getFingerprint = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.lang.String getFingerprint() /// The returned object must be released after use, by calling the [release] method. jni.JString getFingerprint() { - return _getFingerprint(reference.pointer).object(const jni.JStringType()); + return _getFingerprint( + reference.pointer, _id_getFingerprint as jni.JMethodIDPtr) + .object(const jni.JStringType()); } - static final _getBuildTimeMillis = jniLookup< - ffi - .NativeFunction)>>( - "Build_Partition__getBuildTimeMillis") - .asFunction)>(); + static final _id_getBuildTimeMillis = _class.instanceMethodId( + r"getBuildTimeMillis", + r"()J", + ); + + static final _getBuildTimeMillis = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public long getBuildTimeMillis() int getBuildTimeMillis() { - return _getBuildTimeMillis(reference.pointer).long; + return _getBuildTimeMillis( + reference.pointer, _id_getBuildTimeMillis as jni.JMethodIDPtr) + .long; } - static final _equals = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("Build_Partition__equals") + static final _id_equals = _class.instanceMethodId( + r"equals", + r"(Ljava/lang/Object;)Z", + ); + + static final _equals = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallBooleanMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public boolean equals(java.lang.Object object) bool equals( jni.JObject object, ) { - return _equals(reference.pointer, object.reference.pointer).boolean; + return _equals(reference.pointer, _id_equals as jni.JMethodIDPtr, + object.reference.pointer) + .boolean; } - static final _hashCode1 = jniLookup< - ffi - .NativeFunction)>>( - "Build_Partition__hashCode1") - .asFunction)>(); + static final _id_hashCode1 = _class.instanceMethodId( + r"hashCode", + r"()I", + ); + + static final _hashCode1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public int hashCode() int hashCode1() { - return _hashCode1(reference.pointer).integer; + return _hashCode1(reference.pointer, _id_hashCode1 as jni.JMethodIDPtr) + .integer; } } @@ -2605,120 +3384,137 @@ class Build_VERSION extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); + static final _class = jni.JClass.forName(r"android/os/Build$VERSION"); + /// The type which includes information such as the signature of this class. static const type = $Build_VERSIONType(); - static final _get_BASE_OS = - jniLookup>( - "get_Build_VERSION__BASE_OS") - .asFunction(); + static final _id_BASE_OS = _class.staticFieldId( + r"BASE_OS", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String BASE_OS /// The returned object must be released after use, by calling the [release] method. static jni.JString get BASE_OS => - _get_BASE_OS().object(const jni.JStringType()); + _id_BASE_OS.get(_class, const jni.JStringType()); - static final _get_CODENAME = - jniLookup>( - "get_Build_VERSION__CODENAME") - .asFunction(); + static final _id_CODENAME = _class.staticFieldId( + r"CODENAME", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String CODENAME /// The returned object must be released after use, by calling the [release] method. static jni.JString get CODENAME => - _get_CODENAME().object(const jni.JStringType()); + _id_CODENAME.get(_class, const jni.JStringType()); - static final _get_INCREMENTAL = - jniLookup>( - "get_Build_VERSION__INCREMENTAL") - .asFunction(); + static final _id_INCREMENTAL = _class.staticFieldId( + r"INCREMENTAL", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String INCREMENTAL /// The returned object must be released after use, by calling the [release] method. static jni.JString get INCREMENTAL => - _get_INCREMENTAL().object(const jni.JStringType()); + _id_INCREMENTAL.get(_class, const jni.JStringType()); - static final _get_MEDIA_PERFORMANCE_CLASS = - jniLookup>( - "get_Build_VERSION__MEDIA_PERFORMANCE_CLASS") - .asFunction(); + static final _id_MEDIA_PERFORMANCE_CLASS = _class.staticFieldId( + r"MEDIA_PERFORMANCE_CLASS", + r"I", + ); /// from: static public final int MEDIA_PERFORMANCE_CLASS static int get MEDIA_PERFORMANCE_CLASS => - _get_MEDIA_PERFORMANCE_CLASS().integer; + _id_MEDIA_PERFORMANCE_CLASS.get(_class, const jni.jintType()); - static final _get_PREVIEW_SDK_INT = - jniLookup>( - "get_Build_VERSION__PREVIEW_SDK_INT") - .asFunction(); + static final _id_PREVIEW_SDK_INT = _class.staticFieldId( + r"PREVIEW_SDK_INT", + r"I", + ); /// from: static public final int PREVIEW_SDK_INT - static int get PREVIEW_SDK_INT => _get_PREVIEW_SDK_INT().integer; + static int get PREVIEW_SDK_INT => + _id_PREVIEW_SDK_INT.get(_class, const jni.jintType()); - static final _get_RELEASE = - jniLookup>( - "get_Build_VERSION__RELEASE") - .asFunction(); + static final _id_RELEASE = _class.staticFieldId( + r"RELEASE", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String RELEASE /// The returned object must be released after use, by calling the [release] method. static jni.JString get RELEASE => - _get_RELEASE().object(const jni.JStringType()); + _id_RELEASE.get(_class, const jni.JStringType()); - static final _get_RELEASE_OR_CODENAME = - jniLookup>( - "get_Build_VERSION__RELEASE_OR_CODENAME") - .asFunction(); + static final _id_RELEASE_OR_CODENAME = _class.staticFieldId( + r"RELEASE_OR_CODENAME", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String RELEASE_OR_CODENAME /// The returned object must be released after use, by calling the [release] method. static jni.JString get RELEASE_OR_CODENAME => - _get_RELEASE_OR_CODENAME().object(const jni.JStringType()); + _id_RELEASE_OR_CODENAME.get(_class, const jni.JStringType()); - static final _get_RELEASE_OR_PREVIEW_DISPLAY = - jniLookup>( - "get_Build_VERSION__RELEASE_OR_PREVIEW_DISPLAY") - .asFunction(); + static final _id_RELEASE_OR_PREVIEW_DISPLAY = _class.staticFieldId( + r"RELEASE_OR_PREVIEW_DISPLAY", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String RELEASE_OR_PREVIEW_DISPLAY /// The returned object must be released after use, by calling the [release] method. static jni.JString get RELEASE_OR_PREVIEW_DISPLAY => - _get_RELEASE_OR_PREVIEW_DISPLAY().object(const jni.JStringType()); + _id_RELEASE_OR_PREVIEW_DISPLAY.get(_class, const jni.JStringType()); - static final _get_SDK = - jniLookup>( - "get_Build_VERSION__SDK") - .asFunction(); + static final _id_SDK = _class.staticFieldId( + r"SDK", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String SDK /// The returned object must be released after use, by calling the [release] method. - static jni.JString get SDK => _get_SDK().object(const jni.JStringType()); + static jni.JString get SDK => _id_SDK.get(_class, const jni.JStringType()); - static final _get_SDK_INT = - jniLookup>( - "get_Build_VERSION__SDK_INT") - .asFunction(); + static final _id_SDK_INT = _class.staticFieldId( + r"SDK_INT", + r"I", + ); /// from: static public final int SDK_INT - static int get SDK_INT => _get_SDK_INT().integer; + static int get SDK_INT => _id_SDK_INT.get(_class, const jni.jintType()); - static final _get_SECURITY_PATCH = - jniLookup>( - "get_Build_VERSION__SECURITY_PATCH") - .asFunction(); + static final _id_SECURITY_PATCH = _class.staticFieldId( + r"SECURITY_PATCH", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String SECURITY_PATCH /// The returned object must be released after use, by calling the [release] method. static jni.JString get SECURITY_PATCH => - _get_SECURITY_PATCH().object(const jni.JStringType()); + _id_SECURITY_PATCH.get(_class, const jni.JStringType()); - static final _new0 = jniLookup>( - "Build_VERSION__new0") - .asFunction(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory Build_VERSION() { - return Build_VERSION.fromReference(_new0().reference); + return Build_VERSION.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } } @@ -2757,6 +3553,8 @@ class Build_VERSION_CODES extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); + static final _class = jni.JClass.forName(r"android/os/Build$VERSION_CODES"); + /// The type which includes information such as the signature of this class. static const type = $Build_VERSION_CODESType(); @@ -2861,14 +3659,28 @@ class Build_VERSION_CODES extends jni.JObject { /// from: static public final int TIRAMISU static const TIRAMISU = 33; - static final _new0 = jniLookup>( - "Build_VERSION_CODES__new0") - .asFunction(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory Build_VERSION_CODES() { - return Build_VERSION_CODES.fromReference(_new0().reference); + return Build_VERSION_CODES.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } } @@ -2907,313 +3719,381 @@ class Build extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); + static final _class = jni.JClass.forName(r"android/os/Build"); + /// The type which includes information such as the signature of this class. static const type = $BuildType(); - static final _get_BOARD = - jniLookup>( - "get_Build__BOARD") - .asFunction(); + static final _id_BOARD = _class.staticFieldId( + r"BOARD", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String BOARD /// The returned object must be released after use, by calling the [release] method. - static jni.JString get BOARD => _get_BOARD().object(const jni.JStringType()); + static jni.JString get BOARD => + _id_BOARD.get(_class, const jni.JStringType()); - static final _get_BOOTLOADER = - jniLookup>( - "get_Build__BOOTLOADER") - .asFunction(); + static final _id_BOOTLOADER = _class.staticFieldId( + r"BOOTLOADER", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String BOOTLOADER /// The returned object must be released after use, by calling the [release] method. static jni.JString get BOOTLOADER => - _get_BOOTLOADER().object(const jni.JStringType()); + _id_BOOTLOADER.get(_class, const jni.JStringType()); - static final _get_BRAND = - jniLookup>( - "get_Build__BRAND") - .asFunction(); + static final _id_BRAND = _class.staticFieldId( + r"BRAND", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String BRAND /// The returned object must be released after use, by calling the [release] method. - static jni.JString get BRAND => _get_BRAND().object(const jni.JStringType()); + static jni.JString get BRAND => + _id_BRAND.get(_class, const jni.JStringType()); - static final _get_CPU_ABI = - jniLookup>( - "get_Build__CPU_ABI") - .asFunction(); + static final _id_CPU_ABI = _class.staticFieldId( + r"CPU_ABI", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String CPU_ABI /// The returned object must be released after use, by calling the [release] method. static jni.JString get CPU_ABI => - _get_CPU_ABI().object(const jni.JStringType()); + _id_CPU_ABI.get(_class, const jni.JStringType()); - static final _get_CPU_ABI2 = - jniLookup>( - "get_Build__CPU_ABI2") - .asFunction(); + static final _id_CPU_ABI2 = _class.staticFieldId( + r"CPU_ABI2", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String CPU_ABI2 /// The returned object must be released after use, by calling the [release] method. static jni.JString get CPU_ABI2 => - _get_CPU_ABI2().object(const jni.JStringType()); + _id_CPU_ABI2.get(_class, const jni.JStringType()); - static final _get_DEVICE = - jniLookup>( - "get_Build__DEVICE") - .asFunction(); + static final _id_DEVICE = _class.staticFieldId( + r"DEVICE", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String DEVICE /// The returned object must be released after use, by calling the [release] method. static jni.JString get DEVICE => - _get_DEVICE().object(const jni.JStringType()); + _id_DEVICE.get(_class, const jni.JStringType()); - static final _get_DISPLAY = - jniLookup>( - "get_Build__DISPLAY") - .asFunction(); + static final _id_DISPLAY = _class.staticFieldId( + r"DISPLAY", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String DISPLAY /// The returned object must be released after use, by calling the [release] method. static jni.JString get DISPLAY => - _get_DISPLAY().object(const jni.JStringType()); + _id_DISPLAY.get(_class, const jni.JStringType()); - static final _get_FINGERPRINT = - jniLookup>( - "get_Build__FINGERPRINT") - .asFunction(); + static final _id_FINGERPRINT = _class.staticFieldId( + r"FINGERPRINT", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String FINGERPRINT /// The returned object must be released after use, by calling the [release] method. static jni.JString get FINGERPRINT => - _get_FINGERPRINT().object(const jni.JStringType()); + _id_FINGERPRINT.get(_class, const jni.JStringType()); - static final _get_HARDWARE = - jniLookup>( - "get_Build__HARDWARE") - .asFunction(); + static final _id_HARDWARE = _class.staticFieldId( + r"HARDWARE", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String HARDWARE /// The returned object must be released after use, by calling the [release] method. static jni.JString get HARDWARE => - _get_HARDWARE().object(const jni.JStringType()); + _id_HARDWARE.get(_class, const jni.JStringType()); - static final _get_HOST = - jniLookup>("get_Build__HOST") - .asFunction(); + static final _id_HOST = _class.staticFieldId( + r"HOST", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String HOST /// The returned object must be released after use, by calling the [release] method. - static jni.JString get HOST => _get_HOST().object(const jni.JStringType()); + static jni.JString get HOST => _id_HOST.get(_class, const jni.JStringType()); - static final _get_ID = - jniLookup>("get_Build__ID") - .asFunction(); + static final _id_ID = _class.staticFieldId( + r"ID", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String ID /// The returned object must be released after use, by calling the [release] method. - static jni.JString get ID => _get_ID().object(const jni.JStringType()); + static jni.JString get ID => _id_ID.get(_class, const jni.JStringType()); - static final _get_MANUFACTURER = - jniLookup>( - "get_Build__MANUFACTURER") - .asFunction(); + static final _id_MANUFACTURER = _class.staticFieldId( + r"MANUFACTURER", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String MANUFACTURER /// The returned object must be released after use, by calling the [release] method. static jni.JString get MANUFACTURER => - _get_MANUFACTURER().object(const jni.JStringType()); + _id_MANUFACTURER.get(_class, const jni.JStringType()); - static final _get_MODEL = - jniLookup>( - "get_Build__MODEL") - .asFunction(); + static final _id_MODEL = _class.staticFieldId( + r"MODEL", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String MODEL /// The returned object must be released after use, by calling the [release] method. - static jni.JString get MODEL => _get_MODEL().object(const jni.JStringType()); + static jni.JString get MODEL => + _id_MODEL.get(_class, const jni.JStringType()); - static final _get_ODM_SKU = - jniLookup>( - "get_Build__ODM_SKU") - .asFunction(); + static final _id_ODM_SKU = _class.staticFieldId( + r"ODM_SKU", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String ODM_SKU /// The returned object must be released after use, by calling the [release] method. static jni.JString get ODM_SKU => - _get_ODM_SKU().object(const jni.JStringType()); + _id_ODM_SKU.get(_class, const jni.JStringType()); - static final _get_PRODUCT = - jniLookup>( - "get_Build__PRODUCT") - .asFunction(); + static final _id_PRODUCT = _class.staticFieldId( + r"PRODUCT", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String PRODUCT /// The returned object must be released after use, by calling the [release] method. static jni.JString get PRODUCT => - _get_PRODUCT().object(const jni.JStringType()); + _id_PRODUCT.get(_class, const jni.JStringType()); - static final _get_RADIO = - jniLookup>( - "get_Build__RADIO") - .asFunction(); + static final _id_RADIO = _class.staticFieldId( + r"RADIO", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String RADIO /// The returned object must be released after use, by calling the [release] method. - static jni.JString get RADIO => _get_RADIO().object(const jni.JStringType()); + static jni.JString get RADIO => + _id_RADIO.get(_class, const jni.JStringType()); - static final _get_SERIAL = - jniLookup>( - "get_Build__SERIAL") - .asFunction(); + static final _id_SERIAL = _class.staticFieldId( + r"SERIAL", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String SERIAL /// The returned object must be released after use, by calling the [release] method. static jni.JString get SERIAL => - _get_SERIAL().object(const jni.JStringType()); + _id_SERIAL.get(_class, const jni.JStringType()); - static final _get_SKU = - jniLookup>("get_Build__SKU") - .asFunction(); + static final _id_SKU = _class.staticFieldId( + r"SKU", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String SKU /// The returned object must be released after use, by calling the [release] method. - static jni.JString get SKU => _get_SKU().object(const jni.JStringType()); + static jni.JString get SKU => _id_SKU.get(_class, const jni.JStringType()); - static final _get_SOC_MANUFACTURER = - jniLookup>( - "get_Build__SOC_MANUFACTURER") - .asFunction(); + static final _id_SOC_MANUFACTURER = _class.staticFieldId( + r"SOC_MANUFACTURER", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String SOC_MANUFACTURER /// The returned object must be released after use, by calling the [release] method. static jni.JString get SOC_MANUFACTURER => - _get_SOC_MANUFACTURER().object(const jni.JStringType()); + _id_SOC_MANUFACTURER.get(_class, const jni.JStringType()); - static final _get_SOC_MODEL = - jniLookup>( - "get_Build__SOC_MODEL") - .asFunction(); + static final _id_SOC_MODEL = _class.staticFieldId( + r"SOC_MODEL", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String SOC_MODEL /// The returned object must be released after use, by calling the [release] method. static jni.JString get SOC_MODEL => - _get_SOC_MODEL().object(const jni.JStringType()); + _id_SOC_MODEL.get(_class, const jni.JStringType()); - static final _get_SUPPORTED_32_BIT_ABIS = - jniLookup>( - "get_Build__SUPPORTED_32_BIT_ABIS") - .asFunction(); + static final _id_SUPPORTED_32_BIT_ABIS = _class.staticFieldId( + r"SUPPORTED_32_BIT_ABIS", + r"[Ljava/lang/String;", + ); /// from: static public final java.lang.String[] SUPPORTED_32_BIT_ABIS /// The returned object must be released after use, by calling the [release] method. static jni.JArray get SUPPORTED_32_BIT_ABIS => - _get_SUPPORTED_32_BIT_ABIS() - .object(const jni.JArrayType(jni.JStringType())); + _id_SUPPORTED_32_BIT_ABIS.get( + _class, const jni.JArrayType(jni.JStringType())); - static final _get_SUPPORTED_64_BIT_ABIS = - jniLookup>( - "get_Build__SUPPORTED_64_BIT_ABIS") - .asFunction(); + static final _id_SUPPORTED_64_BIT_ABIS = _class.staticFieldId( + r"SUPPORTED_64_BIT_ABIS", + r"[Ljava/lang/String;", + ); /// from: static public final java.lang.String[] SUPPORTED_64_BIT_ABIS /// The returned object must be released after use, by calling the [release] method. static jni.JArray get SUPPORTED_64_BIT_ABIS => - _get_SUPPORTED_64_BIT_ABIS() - .object(const jni.JArrayType(jni.JStringType())); + _id_SUPPORTED_64_BIT_ABIS.get( + _class, const jni.JArrayType(jni.JStringType())); - static final _get_SUPPORTED_ABIS = - jniLookup>( - "get_Build__SUPPORTED_ABIS") - .asFunction(); + static final _id_SUPPORTED_ABIS = _class.staticFieldId( + r"SUPPORTED_ABIS", + r"[Ljava/lang/String;", + ); /// from: static public final java.lang.String[] SUPPORTED_ABIS /// The returned object must be released after use, by calling the [release] method. static jni.JArray get SUPPORTED_ABIS => - _get_SUPPORTED_ABIS().object(const jni.JArrayType(jni.JStringType())); + _id_SUPPORTED_ABIS.get(_class, const jni.JArrayType(jni.JStringType())); - static final _get_TAGS = - jniLookup>("get_Build__TAGS") - .asFunction(); + static final _id_TAGS = _class.staticFieldId( + r"TAGS", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String TAGS /// The returned object must be released after use, by calling the [release] method. - static jni.JString get TAGS => _get_TAGS().object(const jni.JStringType()); + static jni.JString get TAGS => _id_TAGS.get(_class, const jni.JStringType()); - static final _get_TIME = - jniLookup>("get_Build__TIME") - .asFunction(); + static final _id_TIME = _class.staticFieldId( + r"TIME", + r"J", + ); /// from: static public final long TIME - static int get TIME => _get_TIME().long; + static int get TIME => _id_TIME.get(_class, const jni.jlongType()); - static final _get_TYPE = - jniLookup>("get_Build__TYPE") - .asFunction(); + static final _id_TYPE = _class.staticFieldId( + r"TYPE", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String TYPE /// The returned object must be released after use, by calling the [release] method. - static jni.JString get TYPE => _get_TYPE().object(const jni.JStringType()); + static jni.JString get TYPE => _id_TYPE.get(_class, const jni.JStringType()); - static final _get_UNKNOWN = - jniLookup>( - "get_Build__UNKNOWN") - .asFunction(); + static final _id_UNKNOWN = _class.staticFieldId( + r"UNKNOWN", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String UNKNOWN /// The returned object must be released after use, by calling the [release] method. static jni.JString get UNKNOWN => - _get_UNKNOWN().object(const jni.JStringType()); + _id_UNKNOWN.get(_class, const jni.JStringType()); - static final _get_USER = - jniLookup>("get_Build__USER") - .asFunction(); + static final _id_USER = _class.staticFieldId( + r"USER", + r"Ljava/lang/String;", + ); /// from: static public final java.lang.String USER /// The returned object must be released after use, by calling the [release] method. - static jni.JString get USER => _get_USER().object(const jni.JStringType()); + static jni.JString get USER => _id_USER.get(_class, const jni.JStringType()); - static final _new0 = - jniLookup>("Build__new0") - .asFunction(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory Build() { - return Build.fromReference(_new0().reference); + return Build.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } - static final _getSerial = - jniLookup>( - "Build__getSerial") - .asFunction(); + static final _id_getSerial = _class.staticMethodId( + r"getSerial", + r"()Ljava/lang/String;", + ); + + static final _getSerial = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: static public java.lang.String getSerial() /// The returned object must be released after use, by calling the [release] method. static jni.JString getSerial() { - return _getSerial().object(const jni.JStringType()); + return _getSerial( + _class.reference.pointer, _id_getSerial as jni.JMethodIDPtr) + .object(const jni.JStringType()); } - static final _getFingerprintedPartitions = - jniLookup>( - "Build__getFingerprintedPartitions") - .asFunction(); + static final _id_getFingerprintedPartitions = _class.staticMethodId( + r"getFingerprintedPartitions", + r"()Ljava/util/List;", + ); + + static final _getFingerprintedPartitions = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: static public java.util.List getFingerprintedPartitions() /// The returned object must be released after use, by calling the [release] method. static jni.JList getFingerprintedPartitions() { - return _getFingerprintedPartitions() + return _getFingerprintedPartitions(_class.reference.pointer, + _id_getFingerprintedPartitions as jni.JMethodIDPtr) .object(const jni.JListType($Build_PartitionType())); } - static final _getRadioVersion = - jniLookup>( - "Build__getRadioVersion") - .asFunction(); + static final _id_getRadioVersion = _class.staticMethodId( + r"getRadioVersion", + r"()Ljava/lang/String;", + ); + + static final _getRadioVersion = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: static public java.lang.String getRadioVersion() /// The returned object must be released after use, by calling the [release] method. static jni.JString getRadioVersion() { - return _getRadioVersion().object(const jni.JStringType()); + return _getRadioVersion( + _class.reference.pointer, _id_getRadioVersion as jni.JMethodIDPtr) + .object(const jni.JStringType()); } } @@ -3257,6 +4137,8 @@ class HashMap<$K extends jni.JObject, $V extends jni.JObject> jni.JReference reference, ) : super.fromReference(reference); + static final _class = jni.JClass.forName(r"java/util/HashMap"); + /// The type which includes information such as the signature of this class. static $HashMapType<$K, $V> type<$K extends jni.JObject, $V extends jni.JObject>( @@ -3269,10 +4151,17 @@ class HashMap<$K extends jni.JObject, $V extends jni.JObject> ); } - static final _new0 = jniLookup< - ffi.NativeFunction>( - "HashMap__new0") - .asFunction(); + static final _id_new0 = _class.constructorId( + r"(IF)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64, ffi.Double)>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int, double)>(); /// from: public void (int i, float f) /// The returned object must be released after use, by calling the [release] method. @@ -3282,13 +4171,24 @@ class HashMap<$K extends jni.JObject, $V extends jni.JObject> required jni.JObjType<$K> K, required jni.JObjType<$V> V, }) { - return HashMap.fromReference(K, V, _new0(i, f).reference); + return HashMap.fromReference( + K, + V, + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr, i, f) + .reference); } - static final _new1 = - jniLookup>( - "HashMap__new1") - .asFunction(); + static final _id_new1 = _class.constructorId( + r"(I)V", + ); + + static final _new1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); /// from: public void (int i) /// The returned object must be released after use, by calling the [release] method. @@ -3297,12 +4197,28 @@ class HashMap<$K extends jni.JObject, $V extends jni.JObject> required jni.JObjType<$K> K, required jni.JObjType<$V> V, }) { - return HashMap.fromReference(K, V, _new1(i).reference); + return HashMap.fromReference( + K, + V, + _new1(_class.reference.pointer, _id_new1 as jni.JMethodIDPtr, i) + .reference); } - static final _new2 = - jniLookup>("HashMap__new2") - .asFunction(); + static final _id_new2 = _class.constructorId( + r"()V", + ); + + static final _new2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public void () /// The returned object must be released after use, by calling the [release] method. @@ -3310,13 +4226,27 @@ class HashMap<$K extends jni.JObject, $V extends jni.JObject> required jni.JObjType<$K> K, required jni.JObjType<$V> V, }) { - return HashMap.fromReference(K, V, _new2().reference); + return HashMap.fromReference( + K, + V, + _new2(_class.reference.pointer, _id_new2 as jni.JMethodIDPtr) + .reference); } - static final _new3 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer)>>("HashMap__new3") - .asFunction)>(); + static final _id_new3 = _class.constructorId( + r"(Ljava/util/Map;)V", + ); + + static final _new3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void (java.util.Map map) /// The returned object must be released after use, by calling the [release] method. @@ -3331,70 +4261,127 @@ class HashMap<$K extends jni.JObject, $V extends jni.JObject> V ??= jni.lowestCommonSuperType([ (map.$type as jni.JMapType).V, ]) as jni.JObjType<$V>; - return HashMap.fromReference(K, V, _new3(map.reference.pointer).reference); + return HashMap.fromReference( + K, + V, + _new3(_class.reference.pointer, _id_new3 as jni.JMethodIDPtr, + map.reference.pointer) + .reference); } - static final _size = jniLookup< + static final _id_size = _class.instanceMethodId( + r"size", + r"()I", + ); + + static final _size = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer)>>("HashMap__size") - .asFunction)>(); + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public int size() int size() { - return _size(reference.pointer).integer; + return _size(reference.pointer, _id_size as jni.JMethodIDPtr).integer; } - static final _isEmpty = jniLookup< - ffi - .NativeFunction)>>( - "HashMap__isEmpty") - .asFunction)>(); + static final _id_isEmpty = _class.instanceMethodId( + r"isEmpty", + r"()Z", + ); + + static final _isEmpty = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public boolean isEmpty() bool isEmpty() { - return _isEmpty(reference.pointer).boolean; + return _isEmpty(reference.pointer, _id_isEmpty as jni.JMethodIDPtr).boolean; } - static final _get0 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("HashMap__get0") + static final _id_get0 = _class.instanceMethodId( + r"get", + r"(Ljava/lang/Object;)Ljava/lang/Object;", + ); + + static final _get0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public V get(java.lang.Object object) /// The returned object must be released after use, by calling the [release] method. $V get0( jni.JObject object, ) { - return _get0(reference.pointer, object.reference.pointer).object(V); + return _get0(reference.pointer, _id_get0 as jni.JMethodIDPtr, + object.reference.pointer) + .object(V); } - static final _containsKey = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("HashMap__containsKey") + static final _id_containsKey = _class.instanceMethodId( + r"containsKey", + r"(Ljava/lang/Object;)Z", + ); + + static final _containsKey = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallBooleanMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public boolean containsKey(java.lang.Object object) bool containsKey( jni.JObject object, ) { - return _containsKey(reference.pointer, object.reference.pointer).boolean; + return _containsKey(reference.pointer, _id_containsKey as jni.JMethodIDPtr, + object.reference.pointer) + .boolean; } - static final _put = jniLookup< + static final _id_put = _class.instanceMethodId( + r"put", + r"(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", + ); + + static final _put = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("HashMap__put") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); /// from: public V put(K object, V object1) /// The returned object must be released after use, by calling the [release] method. @@ -3402,111 +4389,199 @@ class HashMap<$K extends jni.JObject, $V extends jni.JObject> $K object, $V object1, ) { - return _put(reference.pointer, object.reference.pointer, - object1.reference.pointer) + return _put(reference.pointer, _id_put as jni.JMethodIDPtr, + object.reference.pointer, object1.reference.pointer) .object(V); } - static final _putAll = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("HashMap__putAll") + static final _id_putAll = _class.instanceMethodId( + r"putAll", + r"(Ljava/util/Map;)V", + ); + + static final _putAll = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void putAll(java.util.Map map) void putAll( jni.JMap<$K, $V> map, ) { - _putAll(reference.pointer, map.reference.pointer).check(); + _putAll(reference.pointer, _id_putAll as jni.JMethodIDPtr, + map.reference.pointer) + .check(); } - static final _remove = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("HashMap__remove") + static final _id_remove = _class.instanceMethodId( + r"remove", + r"(Ljava/lang/Object;)Ljava/lang/Object;", + ); + + static final _remove = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public V remove(java.lang.Object object) /// The returned object must be released after use, by calling the [release] method. $V remove( jni.JObject object, ) { - return _remove(reference.pointer, object.reference.pointer).object(V); + return _remove(reference.pointer, _id_remove as jni.JMethodIDPtr, + object.reference.pointer) + .object(V); } - static final _clear = jniLookup< + static final _id_clear = _class.instanceMethodId( + r"clear", + r"()V", + ); + + static final _clear = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer)>>("HashMap__clear") - .asFunction)>(); + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public void clear() void clear() { - _clear(reference.pointer).check(); + _clear(reference.pointer, _id_clear as jni.JMethodIDPtr).check(); } - static final _containsValue = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("HashMap__containsValue") + static final _id_containsValue = _class.instanceMethodId( + r"containsValue", + r"(Ljava/lang/Object;)Z", + ); + + static final _containsValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallBooleanMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public boolean containsValue(java.lang.Object object) bool containsValue( jni.JObject object, ) { - return _containsValue(reference.pointer, object.reference.pointer).boolean; + return _containsValue(reference.pointer, + _id_containsValue as jni.JMethodIDPtr, object.reference.pointer) + .boolean; } - static final _keySet = jniLookup< + static final _id_keySet = _class.instanceMethodId( + r"keySet", + r"()Ljava/util/Set;", + ); + + static final _keySet = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer)>>("HashMap__keySet") - .asFunction)>(); + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.util.Set keySet() /// The returned object must be released after use, by calling the [release] method. jni.JSet<$K> keySet() { - return _keySet(reference.pointer).object(jni.JSetType(K)); + return _keySet(reference.pointer, _id_keySet as jni.JMethodIDPtr) + .object(jni.JSetType(K)); } - static final _values = jniLookup< + static final _id_values = _class.instanceMethodId( + r"values", + r"()Ljava/util/Collection;", + ); + + static final _values = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer)>>("HashMap__values") - .asFunction)>(); + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.util.Collection values() /// The returned object must be released after use, by calling the [release] method. jni.JObject values() { - return _values(reference.pointer).object(const jni.JObjectType()); + return _values(reference.pointer, _id_values as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } - static final _entrySet = jniLookup< - ffi - .NativeFunction)>>( - "HashMap__entrySet") - .asFunction)>(); + static final _id_entrySet = _class.instanceMethodId( + r"entrySet", + r"()Ljava/util/Set;", + ); + + static final _entrySet = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.util.Set entrySet() /// The returned object must be released after use, by calling the [release] method. jni.JSet entrySet() { - return _entrySet(reference.pointer) + return _entrySet(reference.pointer, _id_entrySet as jni.JMethodIDPtr) .object(const jni.JSetType(jni.JObjectType())); } - static final _getOrDefault = jniLookup< + static final _id_getOrDefault = _class.instanceMethodId( + r"getOrDefault", + r"(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", + ); + + static final _getOrDefault = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("HashMap__getOrDefault") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); /// from: public V getOrDefault(java.lang.Object object, V object1) /// The returned object must be released after use, by calling the [release] method. @@ -3514,20 +4589,32 @@ class HashMap<$K extends jni.JObject, $V extends jni.JObject> jni.JObject object, $V object1, ) { - return _getOrDefault(reference.pointer, object.reference.pointer, + return _getOrDefault( + reference.pointer, + _id_getOrDefault as jni.JMethodIDPtr, + object.reference.pointer, object1.reference.pointer) .object(V); } - static final _putIfAbsent = jniLookup< + static final _id_putIfAbsent = _class.instanceMethodId( + r"putIfAbsent", + r"(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", + ); + + static final _putIfAbsent = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("HashMap__putIfAbsent") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); /// from: public V putIfAbsent(K object, V object1) /// The returned object must be released after use, by calling the [release] method. @@ -3535,41 +4622,63 @@ class HashMap<$K extends jni.JObject, $V extends jni.JObject> $K object, $V object1, ) { - return _putIfAbsent(reference.pointer, object.reference.pointer, - object1.reference.pointer) + return _putIfAbsent(reference.pointer, _id_putIfAbsent as jni.JMethodIDPtr, + object.reference.pointer, object1.reference.pointer) .object(V); } - static final _remove1 = jniLookup< + static final _id_remove1 = _class.instanceMethodId( + r"remove", + r"(Ljava/lang/Object;Ljava/lang/Object;)Z", + ); + + static final _remove1 = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("HashMap__remove1") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallBooleanMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); /// from: public boolean remove(java.lang.Object object, java.lang.Object object1) bool remove1( jni.JObject object, jni.JObject object1, ) { - return _remove1(reference.pointer, object.reference.pointer, - object1.reference.pointer) + return _remove1(reference.pointer, _id_remove1 as jni.JMethodIDPtr, + object.reference.pointer, object1.reference.pointer) .boolean; } - static final _replace = jniLookup< + static final _id_replace = _class.instanceMethodId( + r"replace", + r"(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z", + ); + + static final _replace = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("HashMap__replace") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallBooleanMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); /// from: public boolean replace(K object, V object1, V object2) bool replace( @@ -3577,20 +4686,33 @@ class HashMap<$K extends jni.JObject, $V extends jni.JObject> $V object1, $V object2, ) { - return _replace(reference.pointer, object.reference.pointer, - object1.reference.pointer, object2.reference.pointer) + return _replace( + reference.pointer, + _id_replace as jni.JMethodIDPtr, + object.reference.pointer, + object1.reference.pointer, + object2.reference.pointer) .boolean; } - static final _replace1 = jniLookup< + static final _id_replace1 = _class.instanceMethodId( + r"replace", + r"(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", + ); + + static final _replace1 = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("HashMap__replace1") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); /// from: public V replace(K object, V object1) /// The returned object must be released after use, by calling the [release] method. @@ -3598,20 +4720,29 @@ class HashMap<$K extends jni.JObject, $V extends jni.JObject> $K object, $V object1, ) { - return _replace1(reference.pointer, object.reference.pointer, - object1.reference.pointer) + return _replace1(reference.pointer, _id_replace1 as jni.JMethodIDPtr, + object.reference.pointer, object1.reference.pointer) .object(V); } - static final _computeIfAbsent = jniLookup< + static final _id_computeIfAbsent = _class.instanceMethodId( + r"computeIfAbsent", + r"(Ljava/lang/Object;Ljava/util/function/Function;)Ljava/lang/Object;", + ); + + static final _computeIfAbsent = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("HashMap__computeIfAbsent") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); /// from: public V computeIfAbsent(K object, java.util.function.Function function) /// The returned object must be released after use, by calling the [release] method. @@ -3619,20 +4750,32 @@ class HashMap<$K extends jni.JObject, $V extends jni.JObject> $K object, jni.JObject function, ) { - return _computeIfAbsent(reference.pointer, object.reference.pointer, + return _computeIfAbsent( + reference.pointer, + _id_computeIfAbsent as jni.JMethodIDPtr, + object.reference.pointer, function.reference.pointer) .object(V); } - static final _computeIfPresent = jniLookup< + static final _id_computeIfPresent = _class.instanceMethodId( + r"computeIfPresent", + r"(Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;", + ); + + static final _computeIfPresent = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("HashMap__computeIfPresent") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); /// from: public V computeIfPresent(K object, java.util.function.BiFunction biFunction) /// The returned object must be released after use, by calling the [release] method. @@ -3640,20 +4783,32 @@ class HashMap<$K extends jni.JObject, $V extends jni.JObject> $K object, jni.JObject biFunction, ) { - return _computeIfPresent(reference.pointer, object.reference.pointer, + return _computeIfPresent( + reference.pointer, + _id_computeIfPresent as jni.JMethodIDPtr, + object.reference.pointer, biFunction.reference.pointer) .object(V); } - static final _compute = jniLookup< + static final _id_compute = _class.instanceMethodId( + r"compute", + r"(Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;", + ); + + static final _compute = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("HashMap__compute") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); /// from: public V compute(K object, java.util.function.BiFunction biFunction) /// The returned object must be released after use, by calling the [release] method. @@ -3661,21 +4816,34 @@ class HashMap<$K extends jni.JObject, $V extends jni.JObject> $K object, jni.JObject biFunction, ) { - return _compute(reference.pointer, object.reference.pointer, - biFunction.reference.pointer) + return _compute(reference.pointer, _id_compute as jni.JMethodIDPtr, + object.reference.pointer, biFunction.reference.pointer) .object(V); } - static final _merge = jniLookup< + static final _id_merge = _class.instanceMethodId( + r"merge", + r"(Ljava/lang/Object;Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;", + ); + + static final _merge = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("HashMap__merge") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); /// from: public V merge(K object, V object1, java.util.function.BiFunction biFunction) /// The returned object must be released after use, by calling the [release] method. @@ -3684,50 +4852,87 @@ class HashMap<$K extends jni.JObject, $V extends jni.JObject> $V object1, jni.JObject biFunction, ) { - return _merge(reference.pointer, object.reference.pointer, - object1.reference.pointer, biFunction.reference.pointer) + return _merge( + reference.pointer, + _id_merge as jni.JMethodIDPtr, + object.reference.pointer, + object1.reference.pointer, + biFunction.reference.pointer) .object(V); } - static final _forEach = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("HashMap__forEach") + static final _id_forEach = _class.instanceMethodId( + r"forEach", + r"(Ljava/util/function/BiConsumer;)V", + ); + + static final _forEach = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void forEach(java.util.function.BiConsumer biConsumer) void forEach( jni.JObject biConsumer, ) { - _forEach(reference.pointer, biConsumer.reference.pointer).check(); + _forEach(reference.pointer, _id_forEach as jni.JMethodIDPtr, + biConsumer.reference.pointer) + .check(); } - static final _replaceAll = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("HashMap__replaceAll") + static final _id_replaceAll = _class.instanceMethodId( + r"replaceAll", + r"(Ljava/util/function/BiFunction;)V", + ); + + static final _replaceAll = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void replaceAll(java.util.function.BiFunction biFunction) void replaceAll( jni.JObject biFunction, ) { - _replaceAll(reference.pointer, biFunction.reference.pointer).check(); + _replaceAll(reference.pointer, _id_replaceAll as jni.JMethodIDPtr, + biFunction.reference.pointer) + .check(); } - static final _clone = jniLookup< + static final _id_clone = _class.instanceMethodId( + r"clone", + r"()Ljava/lang/Object;", + ); + + static final _clone = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer)>>("HashMap__clone") - .asFunction)>(); + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.lang.Object clone() /// The returned object must be released after use, by calling the [release] method. jni.JObject clone() { - return _clone(reference.pointer).object(const jni.JObjectType()); + return _clone(reference.pointer, _id_clone as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } } @@ -3775,14 +4980,29 @@ class AndroidUtils extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); + static final _class = + jni.JClass.forName(r"com/example/in_app_java/AndroidUtils"); + /// The type which includes information such as the signature of this class. static const type = $AndroidUtilsType(); - static final _showToast = jniLookup< + static final _id_showToast = _class.staticMethodId( + r"showToast", + r"(Landroid/app/Activity;Ljava/lang/CharSequence;I)V", + ); + + static final _showToast = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>("AndroidUtils__showToast") + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64 + )>)>>("globalEnv_CallStaticVoidMethod") .asFunction< - jni.JniResult Function( + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int)>(); /// from: static public void showToast(android.app.Activity mainActivity, java.lang.CharSequence text, int duration) @@ -3791,7 +5011,8 @@ class AndroidUtils extends jni.JObject { jni.JObject text, int duration, ) { - _showToast(mainActivity.reference.pointer, text.reference.pointer, duration) + _showToast(_class.reference.pointer, _id_showToast as jni.JMethodIDPtr, + mainActivity.reference.pointer, text.reference.pointer, duration) .check(); } } diff --git a/pkgs/jnigen/example/in_app_java/src/android_utils/.clang-format b/pkgs/jnigen/example/in_app_java/src/android_utils/.clang-format deleted file mode 100644 index a256c2f097..0000000000 --- a/pkgs/jnigen/example/in_app_java/src/android_utils/.clang-format +++ /dev/null @@ -1,15 +0,0 @@ -# From dart SDK: https://github.com/dart-lang/sdk/blob/main/.clang-format - -# Defines the Chromium style for automatic reformatting. -# http://clang.llvm.org/docs/ClangFormatStyleOptions.html -BasedOnStyle: Chromium - -# clang-format doesn't seem to do a good job of this for longer comments. -ReflowComments: 'false' - -# We have lots of these. Though we need to put them all in curly braces, -# clang-format can't do that. -AllowShortIfStatementsOnASingleLine: 'true' - -# Put escaped newlines into the rightmost column. -AlignEscapedNewlinesLeft: false diff --git a/pkgs/jnigen/example/in_app_java/src/android_utils/CMakeLists.txt b/pkgs/jnigen/example/in_app_java/src/android_utils/CMakeLists.txt deleted file mode 100644 index 0c47c280c6..0000000000 --- a/pkgs/jnigen/example/in_app_java/src/android_utils/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -# jni_native_build (Build with jni:setup. Do not delete this line.) - -# The Flutter tooling requires that developers have CMake 3.10 or later -# installed. You should not increase this version, as doing so will cause -# the plugin to fail to compile for some customers of the plugin. -cmake_minimum_required(VERSION 3.10) - -project(android_utils VERSION 0.0.1 LANGUAGES C) - -add_library(android_utils SHARED - "./android_utils.c" -) - -set_target_properties(android_utils PROPERTIES - OUTPUT_NAME "android_utils" -) - -target_compile_definitions(android_utils PUBLIC DART_SHARED_LIB) - -if(WIN32) - set_target_properties(${TARGET_NAME} PROPERTIES - LINK_FLAGS "/DELAYLOAD:jvm.dll") -endif() - -if (ANDROID) - target_link_libraries(android_utils log) -else() - find_package(Java REQUIRED) - find_package(JNI REQUIRED) - include_directories(${JNI_INCLUDE_DIRS}) - target_link_libraries(android_utils ${JNI_LIBRARIES}) -endif() diff --git a/pkgs/jnigen/example/in_app_java/src/android_utils/android_utils.c b/pkgs/jnigen/example/in_app_java/src/android_utils/android_utils.c deleted file mode 100644 index c9534ec4cd..0000000000 --- a/pkgs/jnigen/example/in_app_java/src/android_utils/android_utils.c +++ /dev/null @@ -1,2581 +0,0 @@ -// Autogenerated by jnigen. DO NOT EDIT! - -#include -#include "dartjni.h" -#include "jni.h" - -thread_local JNIEnv* jniEnv; -JniContext* jni; - -JniContext* (*context_getter)(void); -JNIEnv* (*env_getter)(void); - -void setJniGetters(JniContext* (*cg)(void), JNIEnv* (*eg)(void)) { - context_getter = cg; - env_getter = eg; -} - -// androidx.emoji2.text.EmojiCompat$CodepointSequenceMatchResult -jclass _c_EmojiCompat_CodepointSequenceMatchResult = NULL; - -// androidx.emoji2.text.EmojiCompat$Config -jclass _c_EmojiCompat_Config = NULL; - -jmethodID _m_EmojiCompat_Config__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_Config__new0(jobject metadataLoader) { - load_env(); - load_class_global_ref(&_c_EmojiCompat_Config, - "androidx/emoji2/text/EmojiCompat$Config"); - if (_c_EmojiCompat_Config == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat_Config, &_m_EmojiCompat_Config__new0, "", - "(Landroidx/emoji2/text/EmojiCompat$MetadataRepoLoader;)V"); - if (_m_EmojiCompat_Config__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_EmojiCompat_Config, - _m_EmojiCompat_Config__new0, metadataLoader); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat_Config__registerInitCallback = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_Config__registerInitCallback(jobject self_, - jobject initCallback) { - load_env(); - load_class_global_ref(&_c_EmojiCompat_Config, - "androidx/emoji2/text/EmojiCompat$Config"); - if (_c_EmojiCompat_Config == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat_Config, - &_m_EmojiCompat_Config__registerInitCallback, - "registerInitCallback", - "(Landroidx/emoji2/text/EmojiCompat$InitCallback;)Landroidx/" - "emoji2/text/EmojiCompat$Config;"); - if (_m_EmojiCompat_Config__registerInitCallback == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_EmojiCompat_Config__registerInitCallback, initCallback); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat_Config__unregisterInitCallback = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_Config__unregisterInitCallback(jobject self_, - jobject initCallback) { - load_env(); - load_class_global_ref(&_c_EmojiCompat_Config, - "androidx/emoji2/text/EmojiCompat$Config"); - if (_c_EmojiCompat_Config == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat_Config, - &_m_EmojiCompat_Config__unregisterInitCallback, - "unregisterInitCallback", - "(Landroidx/emoji2/text/EmojiCompat$InitCallback;)Landroidx/" - "emoji2/text/EmojiCompat$Config;"); - if (_m_EmojiCompat_Config__unregisterInitCallback == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_EmojiCompat_Config__unregisterInitCallback, - initCallback); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat_Config__setReplaceAll = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_Config__setReplaceAll(jobject self_, uint8_t replaceAll) { - load_env(); - load_class_global_ref(&_c_EmojiCompat_Config, - "androidx/emoji2/text/EmojiCompat$Config"); - if (_c_EmojiCompat_Config == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat_Config, &_m_EmojiCompat_Config__setReplaceAll, - "setReplaceAll", "(Z)Landroidx/emoji2/text/EmojiCompat$Config;"); - if (_m_EmojiCompat_Config__setReplaceAll == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_EmojiCompat_Config__setReplaceAll, replaceAll); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat_Config__setUseEmojiAsDefaultStyle = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_Config__setUseEmojiAsDefaultStyle( - jobject self_, - uint8_t useEmojiAsDefaultStyle) { - load_env(); - load_class_global_ref(&_c_EmojiCompat_Config, - "androidx/emoji2/text/EmojiCompat$Config"); - if (_c_EmojiCompat_Config == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat_Config, - &_m_EmojiCompat_Config__setUseEmojiAsDefaultStyle, - "setUseEmojiAsDefaultStyle", - "(Z)Landroidx/emoji2/text/EmojiCompat$Config;"); - if (_m_EmojiCompat_Config__setUseEmojiAsDefaultStyle == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_EmojiCompat_Config__setUseEmojiAsDefaultStyle, - useEmojiAsDefaultStyle); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat_Config__setUseEmojiAsDefaultStyle1 = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_Config__setUseEmojiAsDefaultStyle1( - jobject self_, - uint8_t useEmojiAsDefaultStyle, - jobject emojiAsDefaultStyleExceptions) { - load_env(); - load_class_global_ref(&_c_EmojiCompat_Config, - "androidx/emoji2/text/EmojiCompat$Config"); - if (_c_EmojiCompat_Config == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat_Config, - &_m_EmojiCompat_Config__setUseEmojiAsDefaultStyle1, - "setUseEmojiAsDefaultStyle", - "(ZLjava/util/List;)Landroidx/emoji2/text/EmojiCompat$Config;"); - if (_m_EmojiCompat_Config__setUseEmojiAsDefaultStyle1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_EmojiCompat_Config__setUseEmojiAsDefaultStyle1, - useEmojiAsDefaultStyle, emojiAsDefaultStyleExceptions); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat_Config__setEmojiSpanIndicatorEnabled = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_Config__setEmojiSpanIndicatorEnabled( - jobject self_, - uint8_t emojiSpanIndicatorEnabled) { - load_env(); - load_class_global_ref(&_c_EmojiCompat_Config, - "androidx/emoji2/text/EmojiCompat$Config"); - if (_c_EmojiCompat_Config == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat_Config, - &_m_EmojiCompat_Config__setEmojiSpanIndicatorEnabled, - "setEmojiSpanIndicatorEnabled", - "(Z)Landroidx/emoji2/text/EmojiCompat$Config;"); - if (_m_EmojiCompat_Config__setEmojiSpanIndicatorEnabled == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_EmojiCompat_Config__setEmojiSpanIndicatorEnabled, - emojiSpanIndicatorEnabled); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat_Config__setEmojiSpanIndicatorColor = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_Config__setEmojiSpanIndicatorColor(jobject self_, - int32_t color) { - load_env(); - load_class_global_ref(&_c_EmojiCompat_Config, - "androidx/emoji2/text/EmojiCompat$Config"); - if (_c_EmojiCompat_Config == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat_Config, - &_m_EmojiCompat_Config__setEmojiSpanIndicatorColor, - "setEmojiSpanIndicatorColor", - "(I)Landroidx/emoji2/text/EmojiCompat$Config;"); - if (_m_EmojiCompat_Config__setEmojiSpanIndicatorColor == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_EmojiCompat_Config__setEmojiSpanIndicatorColor, color); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat_Config__setMetadataLoadStrategy = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_Config__setMetadataLoadStrategy(jobject self_, - int32_t strategy) { - load_env(); - load_class_global_ref(&_c_EmojiCompat_Config, - "androidx/emoji2/text/EmojiCompat$Config"); - if (_c_EmojiCompat_Config == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat_Config, - &_m_EmojiCompat_Config__setMetadataLoadStrategy, - "setMetadataLoadStrategy", - "(I)Landroidx/emoji2/text/EmojiCompat$Config;"); - if (_m_EmojiCompat_Config__setMetadataLoadStrategy == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_EmojiCompat_Config__setMetadataLoadStrategy, strategy); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat_Config__setSpanFactory = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_Config__setSpanFactory(jobject self_, jobject factory) { - load_env(); - load_class_global_ref(&_c_EmojiCompat_Config, - "androidx/emoji2/text/EmojiCompat$Config"); - if (_c_EmojiCompat_Config == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat_Config, &_m_EmojiCompat_Config__setSpanFactory, - "setSpanFactory", - "(Landroidx/emoji2/text/EmojiCompat$SpanFactory;)Landroidx/" - "emoji2/text/EmojiCompat$Config;"); - if (_m_EmojiCompat_Config__setSpanFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_EmojiCompat_Config__setSpanFactory, factory); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat_Config__setGlyphChecker = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_Config__setGlyphChecker(jobject self_, - jobject glyphChecker) { - load_env(); - load_class_global_ref(&_c_EmojiCompat_Config, - "androidx/emoji2/text/EmojiCompat$Config"); - if (_c_EmojiCompat_Config == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat_Config, &_m_EmojiCompat_Config__setGlyphChecker, - "setGlyphChecker", - "(Landroidx/emoji2/text/EmojiCompat$GlyphChecker;)Landroidx/" - "emoji2/text/EmojiCompat$Config;"); - if (_m_EmojiCompat_Config__setGlyphChecker == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_EmojiCompat_Config__setGlyphChecker, glyphChecker); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat_Config__getMetadataRepoLoader = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_Config__getMetadataRepoLoader(jobject self_) { - load_env(); - load_class_global_ref(&_c_EmojiCompat_Config, - "androidx/emoji2/text/EmojiCompat$Config"); - if (_c_EmojiCompat_Config == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat_Config, - &_m_EmojiCompat_Config__getMetadataRepoLoader, - "getMetadataRepoLoader", - "()Landroidx/emoji2/text/EmojiCompat$MetadataRepoLoader;"); - if (_m_EmojiCompat_Config__getMetadataRepoLoader == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_EmojiCompat_Config__getMetadataRepoLoader); - return to_global_ref_result(_result); -} - -// androidx.emoji2.text.EmojiCompat$DefaultSpanFactory -jclass _c_EmojiCompat_DefaultSpanFactory = NULL; - -jmethodID _m_EmojiCompat_DefaultSpanFactory__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_DefaultSpanFactory__new0() { - load_env(); - load_class_global_ref(&_c_EmojiCompat_DefaultSpanFactory, - "androidx/emoji2/text/EmojiCompat$DefaultSpanFactory"); - if (_c_EmojiCompat_DefaultSpanFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat_DefaultSpanFactory, - &_m_EmojiCompat_DefaultSpanFactory__new0, "", "()V"); - if (_m_EmojiCompat_DefaultSpanFactory__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_EmojiCompat_DefaultSpanFactory, - _m_EmojiCompat_DefaultSpanFactory__new0); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat_DefaultSpanFactory__createSpan = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_DefaultSpanFactory__createSpan(jobject self_, - jobject rasterizer) { - load_env(); - load_class_global_ref(&_c_EmojiCompat_DefaultSpanFactory, - "androidx/emoji2/text/EmojiCompat$DefaultSpanFactory"); - if (_c_EmojiCompat_DefaultSpanFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat_DefaultSpanFactory, - &_m_EmojiCompat_DefaultSpanFactory__createSpan, "createSpan", - "(Landroidx/emoji2/text/TypefaceEmojiRasterizer;)Landroidx/" - "emoji2/text/EmojiSpan;"); - if (_m_EmojiCompat_DefaultSpanFactory__createSpan == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_EmojiCompat_DefaultSpanFactory__createSpan, rasterizer); - return to_global_ref_result(_result); -} - -// androidx.emoji2.text.EmojiCompat$GlyphChecker -jclass _c_EmojiCompat_GlyphChecker = NULL; - -jmethodID _m_EmojiCompat_GlyphChecker__hasGlyph = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_GlyphChecker__hasGlyph(jobject self_, - jobject charSequence, - int32_t start, - int32_t end, - int32_t sdkAdded) { - load_env(); - load_class_global_ref(&_c_EmojiCompat_GlyphChecker, - "androidx/emoji2/text/EmojiCompat$GlyphChecker"); - if (_c_EmojiCompat_GlyphChecker == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat_GlyphChecker, - &_m_EmojiCompat_GlyphChecker__hasGlyph, "hasGlyph", - "(Ljava/lang/CharSequence;III)Z"); - if (_m_EmojiCompat_GlyphChecker__hasGlyph == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_EmojiCompat_GlyphChecker__hasGlyph, charSequence, start, - end, sdkAdded); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -// androidx.emoji2.text.EmojiCompat$InitCallback -jclass _c_EmojiCompat_InitCallback = NULL; - -jmethodID _m_EmojiCompat_InitCallback__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_InitCallback__new0() { - load_env(); - load_class_global_ref(&_c_EmojiCompat_InitCallback, - "androidx/emoji2/text/EmojiCompat$InitCallback"); - if (_c_EmojiCompat_InitCallback == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat_InitCallback, &_m_EmojiCompat_InitCallback__new0, - "", "()V"); - if (_m_EmojiCompat_InitCallback__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_EmojiCompat_InitCallback, - _m_EmojiCompat_InitCallback__new0); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat_InitCallback__onInitialized = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_InitCallback__onInitialized(jobject self_) { - load_env(); - load_class_global_ref(&_c_EmojiCompat_InitCallback, - "androidx/emoji2/text/EmojiCompat$InitCallback"); - if (_c_EmojiCompat_InitCallback == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat_InitCallback, - &_m_EmojiCompat_InitCallback__onInitialized, "onInitialized", - "()V"); - if (_m_EmojiCompat_InitCallback__onInitialized == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_EmojiCompat_InitCallback__onInitialized); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_EmojiCompat_InitCallback__onFailed = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_InitCallback__onFailed(jobject self_, jobject throwable) { - load_env(); - load_class_global_ref(&_c_EmojiCompat_InitCallback, - "androidx/emoji2/text/EmojiCompat$InitCallback"); - if (_c_EmojiCompat_InitCallback == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat_InitCallback, - &_m_EmojiCompat_InitCallback__onFailed, "onFailed", - "(Ljava/lang/Throwable;)V"); - if (_m_EmojiCompat_InitCallback__onFailed == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_EmojiCompat_InitCallback__onFailed, throwable); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -// androidx.emoji2.text.EmojiCompat$LoadStrategy -jclass _c_EmojiCompat_LoadStrategy = NULL; - -// androidx.emoji2.text.EmojiCompat$MetadataRepoLoader -jclass _c_EmojiCompat_MetadataRepoLoader = NULL; - -jmethodID _m_EmojiCompat_MetadataRepoLoader__load = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_MetadataRepoLoader__load(jobject self_, - jobject loaderCallback) { - load_env(); - load_class_global_ref(&_c_EmojiCompat_MetadataRepoLoader, - "androidx/emoji2/text/EmojiCompat$MetadataRepoLoader"); - if (_c_EmojiCompat_MetadataRepoLoader == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_EmojiCompat_MetadataRepoLoader, - &_m_EmojiCompat_MetadataRepoLoader__load, "load", - "(Landroidx/emoji2/text/EmojiCompat$MetadataRepoLoaderCallback;)V"); - if (_m_EmojiCompat_MetadataRepoLoader__load == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod( - jniEnv, self_, _m_EmojiCompat_MetadataRepoLoader__load, loaderCallback); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -// androidx.emoji2.text.EmojiCompat$MetadataRepoLoaderCallback -jclass _c_EmojiCompat_MetadataRepoLoaderCallback = NULL; - -jmethodID _m_EmojiCompat_MetadataRepoLoaderCallback__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_MetadataRepoLoaderCallback__new0() { - load_env(); - load_class_global_ref( - &_c_EmojiCompat_MetadataRepoLoaderCallback, - "androidx/emoji2/text/EmojiCompat$MetadataRepoLoaderCallback"); - if (_c_EmojiCompat_MetadataRepoLoaderCallback == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat_MetadataRepoLoaderCallback, - &_m_EmojiCompat_MetadataRepoLoaderCallback__new0, "", - "()V"); - if (_m_EmojiCompat_MetadataRepoLoaderCallback__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_EmojiCompat_MetadataRepoLoaderCallback, - _m_EmojiCompat_MetadataRepoLoaderCallback__new0); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat_MetadataRepoLoaderCallback__onLoaded = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_MetadataRepoLoaderCallback__onLoaded( - jobject self_, - jobject metadataRepo) { - load_env(); - load_class_global_ref( - &_c_EmojiCompat_MetadataRepoLoaderCallback, - "androidx/emoji2/text/EmojiCompat$MetadataRepoLoaderCallback"); - if (_c_EmojiCompat_MetadataRepoLoaderCallback == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat_MetadataRepoLoaderCallback, - &_m_EmojiCompat_MetadataRepoLoaderCallback__onLoaded, "onLoaded", - "(Landroidx/emoji2/text/MetadataRepo;)V"); - if (_m_EmojiCompat_MetadataRepoLoaderCallback__onLoaded == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_EmojiCompat_MetadataRepoLoaderCallback__onLoaded, - metadataRepo); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_EmojiCompat_MetadataRepoLoaderCallback__onFailed = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_MetadataRepoLoaderCallback__onFailed(jobject self_, - jobject throwable) { - load_env(); - load_class_global_ref( - &_c_EmojiCompat_MetadataRepoLoaderCallback, - "androidx/emoji2/text/EmojiCompat$MetadataRepoLoaderCallback"); - if (_c_EmojiCompat_MetadataRepoLoaderCallback == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat_MetadataRepoLoaderCallback, - &_m_EmojiCompat_MetadataRepoLoaderCallback__onFailed, "onFailed", - "(Ljava/lang/Throwable;)V"); - if (_m_EmojiCompat_MetadataRepoLoaderCallback__onFailed == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_EmojiCompat_MetadataRepoLoaderCallback__onFailed, - throwable); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -// androidx.emoji2.text.EmojiCompat$ReplaceStrategy -jclass _c_EmojiCompat_ReplaceStrategy = NULL; - -// androidx.emoji2.text.EmojiCompat$SpanFactory -jclass _c_EmojiCompat_SpanFactory = NULL; - -jmethodID _m_EmojiCompat_SpanFactory__createSpan = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat_SpanFactory__createSpan(jobject self_, - jobject rasterizer) { - load_env(); - load_class_global_ref(&_c_EmojiCompat_SpanFactory, - "androidx/emoji2/text/EmojiCompat$SpanFactory"); - if (_c_EmojiCompat_SpanFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat_SpanFactory, - &_m_EmojiCompat_SpanFactory__createSpan, "createSpan", - "(Landroidx/emoji2/text/TypefaceEmojiRasterizer;)Landroidx/" - "emoji2/text/EmojiSpan;"); - if (_m_EmojiCompat_SpanFactory__createSpan == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_EmojiCompat_SpanFactory__createSpan, rasterizer); - return to_global_ref_result(_result); -} - -// androidx.emoji2.text.EmojiCompat -jclass _c_EmojiCompat = NULL; - -jmethodID _m_EmojiCompat__init = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__init(jobject context) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_EmojiCompat, &_m_EmojiCompat__init, "init", - "(Landroid/content/Context;)Landroidx/emoji2/text/EmojiCompat;"); - if (_m_EmojiCompat__init == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_EmojiCompat, _m_EmojiCompat__init, context); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat__init1 = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__init1(jobject context, jobject defaultFactory) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_EmojiCompat, &_m_EmojiCompat__init1, "init", - "(Landroid/content/Context;Landroidx/emoji2/text/" - "DefaultEmojiCompatConfig$DefaultEmojiCompatConfigFactory;" - ")Landroidx/emoji2/text/EmojiCompat;"); - if (_m_EmojiCompat__init1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_EmojiCompat, _m_EmojiCompat__init1, context, defaultFactory); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat__init2 = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__init2(jobject config) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_EmojiCompat, &_m_EmojiCompat__init2, "init", - "(Landroidx/emoji2/text/EmojiCompat$Config;)Landroidx/" - "emoji2/text/EmojiCompat;"); - if (_m_EmojiCompat__init2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_EmojiCompat, _m_EmojiCompat__init2, config); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat__isConfigured = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__isConfigured() { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_EmojiCompat, &_m_EmojiCompat__isConfigured, - "isConfigured", "()Z"); - if (_m_EmojiCompat__isConfigured == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallStaticBooleanMethod( - jniEnv, _c_EmojiCompat, _m_EmojiCompat__isConfigured); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_EmojiCompat__reset = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__reset(jobject config) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_EmojiCompat, &_m_EmojiCompat__reset, "reset", - "(Landroidx/emoji2/text/EmojiCompat$Config;)Landroidx/" - "emoji2/text/EmojiCompat;"); - if (_m_EmojiCompat__reset == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_EmojiCompat, _m_EmojiCompat__reset, config); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat__reset1 = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__reset1(jobject emojiCompat) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_EmojiCompat, &_m_EmojiCompat__reset1, "reset", - "(Landroidx/emoji2/text/EmojiCompat;)Landroidx/emoji2/text/EmojiCompat;"); - if (_m_EmojiCompat__reset1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_EmojiCompat, _m_EmojiCompat__reset1, emojiCompat); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat__skipDefaultConfigurationLookup = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__skipDefaultConfigurationLookup(uint8_t shouldSkip) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_EmojiCompat, - &_m_EmojiCompat__skipDefaultConfigurationLookup, - "skipDefaultConfigurationLookup", "(Z)V"); - if (_m_EmojiCompat__skipDefaultConfigurationLookup == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallStaticVoidMethod( - jniEnv, _c_EmojiCompat, _m_EmojiCompat__skipDefaultConfigurationLookup, - shouldSkip); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_EmojiCompat__get0 = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__get0() { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_EmojiCompat, &_m_EmojiCompat__get0, "get", - "()Landroidx/emoji2/text/EmojiCompat;"); - if (_m_EmojiCompat__get0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_EmojiCompat, - _m_EmojiCompat__get0); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat__load = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__load(jobject self_) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat, &_m_EmojiCompat__load, "load", "()V"); - if (_m_EmojiCompat__load == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_EmojiCompat__load); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_EmojiCompat__registerInitCallback = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__registerInitCallback(jobject self_, - jobject initCallback) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat, &_m_EmojiCompat__registerInitCallback, - "registerInitCallback", - "(Landroidx/emoji2/text/EmojiCompat$InitCallback;)V"); - if (_m_EmojiCompat__registerInitCallback == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_EmojiCompat__registerInitCallback, - initCallback); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_EmojiCompat__unregisterInitCallback = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__unregisterInitCallback(jobject self_, - jobject initCallback) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat, &_m_EmojiCompat__unregisterInitCallback, - "unregisterInitCallback", - "(Landroidx/emoji2/text/EmojiCompat$InitCallback;)V"); - if (_m_EmojiCompat__unregisterInitCallback == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod( - jniEnv, self_, _m_EmojiCompat__unregisterInitCallback, initCallback); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_EmojiCompat__getLoadState = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__getLoadState(jobject self_) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat, &_m_EmojiCompat__getLoadState, "getLoadState", - "()I"); - if (_m_EmojiCompat__getLoadState == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = - (*jniEnv)->CallIntMethod(jniEnv, self_, _m_EmojiCompat__getLoadState); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_EmojiCompat__isEmojiSpanIndicatorEnabled = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__isEmojiSpanIndicatorEnabled(jobject self_) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat, &_m_EmojiCompat__isEmojiSpanIndicatorEnabled, - "isEmojiSpanIndicatorEnabled", "()Z"); - if (_m_EmojiCompat__isEmojiSpanIndicatorEnabled == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_EmojiCompat__isEmojiSpanIndicatorEnabled); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_EmojiCompat__getEmojiSpanIndicatorColor = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__getEmojiSpanIndicatorColor(jobject self_) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat, &_m_EmojiCompat__getEmojiSpanIndicatorColor, - "getEmojiSpanIndicatorColor", "()I"); - if (_m_EmojiCompat__getEmojiSpanIndicatorColor == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallIntMethod( - jniEnv, self_, _m_EmojiCompat__getEmojiSpanIndicatorColor); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_EmojiCompat__getEmojiStart = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__getEmojiStart(jobject self_, - jobject charSequence, - int32_t offset) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat, &_m_EmojiCompat__getEmojiStart, "getEmojiStart", - "(Ljava/lang/CharSequence;I)I"); - if (_m_EmojiCompat__getEmojiStart == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallIntMethod( - jniEnv, self_, _m_EmojiCompat__getEmojiStart, charSequence, offset); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_EmojiCompat__getEmojiEnd = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__getEmojiEnd(jobject self_, - jobject charSequence, - int32_t offset) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat, &_m_EmojiCompat__getEmojiEnd, "getEmojiEnd", - "(Ljava/lang/CharSequence;I)I"); - if (_m_EmojiCompat__getEmojiEnd == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallIntMethod( - jniEnv, self_, _m_EmojiCompat__getEmojiEnd, charSequence, offset); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_EmojiCompat__handleOnKeyDown = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__handleOnKeyDown(jobject editable, - int32_t keyCode, - jobject event) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_EmojiCompat, &_m_EmojiCompat__handleOnKeyDown, - "handleOnKeyDown", - "(Landroid/text/Editable;ILandroid/view/KeyEvent;)Z"); - if (_m_EmojiCompat__handleOnKeyDown == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallStaticBooleanMethod( - jniEnv, _c_EmojiCompat, _m_EmojiCompat__handleOnKeyDown, editable, - keyCode, event); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_EmojiCompat__handleDeleteSurroundingText = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__handleDeleteSurroundingText(jobject inputConnection, - jobject editable, - int32_t beforeLength, - int32_t afterLength, - uint8_t inCodePoints) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_EmojiCompat, - &_m_EmojiCompat__handleDeleteSurroundingText, - "handleDeleteSurroundingText", - "(Landroid/view/inputmethod/InputConnection;Landroid/text/" - "Editable;IIZ)Z"); - if (_m_EmojiCompat__handleDeleteSurroundingText == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallStaticBooleanMethod( - jniEnv, _c_EmojiCompat, _m_EmojiCompat__handleDeleteSurroundingText, - inputConnection, editable, beforeLength, afterLength, inCodePoints); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_EmojiCompat__hasEmojiGlyph = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__hasEmojiGlyph(jobject self_, jobject sequence) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat, &_m_EmojiCompat__hasEmojiGlyph, "hasEmojiGlyph", - "(Ljava/lang/CharSequence;)Z"); - if (_m_EmojiCompat__hasEmojiGlyph == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_EmojiCompat__hasEmojiGlyph, sequence); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_EmojiCompat__hasEmojiGlyph1 = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__hasEmojiGlyph1(jobject self_, - jobject sequence, - int32_t metadataVersion) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat, &_m_EmojiCompat__hasEmojiGlyph1, "hasEmojiGlyph", - "(Ljava/lang/CharSequence;I)Z"); - if (_m_EmojiCompat__hasEmojiGlyph1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_EmojiCompat__hasEmojiGlyph1, sequence, metadataVersion); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_EmojiCompat__getEmojiMatch = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__getEmojiMatch(jobject self_, - jobject sequence, - int32_t metadataVersion) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat, &_m_EmojiCompat__getEmojiMatch, "getEmojiMatch", - "(Ljava/lang/CharSequence;I)I"); - if (_m_EmojiCompat__getEmojiMatch == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallIntMethod( - jniEnv, self_, _m_EmojiCompat__getEmojiMatch, sequence, metadataVersion); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_EmojiCompat__process = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__process(jobject self_, jobject charSequence) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat, &_m_EmojiCompat__process, "process", - "(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;"); - if (_m_EmojiCompat__process == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_EmojiCompat__process, charSequence); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat__process1 = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__process1(jobject self_, - jobject charSequence, - int32_t start, - int32_t end) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat, &_m_EmojiCompat__process1, "process", - "(Ljava/lang/CharSequence;II)Ljava/lang/CharSequence;"); - if (_m_EmojiCompat__process1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_EmojiCompat__process1, charSequence, start, end); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat__process2 = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__process2(jobject self_, - jobject charSequence, - int32_t start, - int32_t end, - int32_t maxEmojiCount) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat, &_m_EmojiCompat__process2, "process", - "(Ljava/lang/CharSequence;III)Ljava/lang/CharSequence;"); - if (_m_EmojiCompat__process2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_EmojiCompat__process2, - charSequence, start, end, maxEmojiCount); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat__process3 = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__process3(jobject self_, - jobject charSequence, - int32_t start, - int32_t end, - int32_t maxEmojiCount, - int32_t replaceStrategy) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat, &_m_EmojiCompat__process3, "process", - "(Ljava/lang/CharSequence;IIII)Ljava/lang/CharSequence;"); - if (_m_EmojiCompat__process3 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_EmojiCompat__process3, charSequence, start, end, - maxEmojiCount, replaceStrategy); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat__getAssetSignature = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__getAssetSignature(jobject self_) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat, &_m_EmojiCompat__getAssetSignature, - "getAssetSignature", "()Ljava/lang/String;"); - if (_m_EmojiCompat__getAssetSignature == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_EmojiCompat__getAssetSignature); - return to_global_ref_result(_result); -} - -jmethodID _m_EmojiCompat__updateEditorInfo = NULL; -FFI_PLUGIN_EXPORT -JniResult EmojiCompat__updateEditorInfo(jobject self_, jobject outAttrs) { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_EmojiCompat, &_m_EmojiCompat__updateEditorInfo, - "updateEditorInfo", "(Landroid/view/inputmethod/EditorInfo;)V"); - if (_m_EmojiCompat__updateEditorInfo == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_EmojiCompat__updateEditorInfo, - outAttrs); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jfieldID _f_EmojiCompat__EDITOR_INFO_METAVERSION_KEY = NULL; -FFI_PLUGIN_EXPORT -JniResult get_EmojiCompat__EDITOR_INFO_METAVERSION_KEY() { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_EmojiCompat, - &_f_EmojiCompat__EDITOR_INFO_METAVERSION_KEY, - "EDITOR_INFO_METAVERSION_KEY", "Ljava/lang/String;"); - jobject _result = (*jniEnv)->GetStaticObjectField( - jniEnv, _c_EmojiCompat, _f_EmojiCompat__EDITOR_INFO_METAVERSION_KEY); - return to_global_ref_result(_result); -} - -jfieldID _f_EmojiCompat__EDITOR_INFO_REPLACE_ALL_KEY = NULL; -FFI_PLUGIN_EXPORT -JniResult get_EmojiCompat__EDITOR_INFO_REPLACE_ALL_KEY() { - load_env(); - load_class_global_ref(&_c_EmojiCompat, "androidx/emoji2/text/EmojiCompat"); - if (_c_EmojiCompat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_EmojiCompat, - &_f_EmojiCompat__EDITOR_INFO_REPLACE_ALL_KEY, - "EDITOR_INFO_REPLACE_ALL_KEY", "Ljava/lang/String;"); - jobject _result = (*jniEnv)->GetStaticObjectField( - jniEnv, _c_EmojiCompat, _f_EmojiCompat__EDITOR_INFO_REPLACE_ALL_KEY); - return to_global_ref_result(_result); -} - -// androidx.emoji2.text.DefaultEmojiCompatConfig$DefaultEmojiCompatConfigFactory -jclass _c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory = NULL; - -jmethodID _m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory__new0 = - NULL; -FFI_PLUGIN_EXPORT -JniResult DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory__new0( - jobject helper) { - load_env(); - load_class_global_ref( - &_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory, - "androidx/emoji2/text/" - "DefaultEmojiCompatConfig$DefaultEmojiCompatConfigFactory"); - if (_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory, - &_m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory__new0, - "", - "(Landroidx/emoji2/text/" - "DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper;)V"); - if (_m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject( - jniEnv, _c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory, - _m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory__new0, - helper); - return to_global_ref_result(_result); -} - -jmethodID _m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory__create = - NULL; -FFI_PLUGIN_EXPORT -JniResult DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory__create( - jobject self_, - jobject context) { - load_env(); - load_class_global_ref( - &_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory, - "androidx/emoji2/text/" - "DefaultEmojiCompatConfig$DefaultEmojiCompatConfigFactory"); - if (_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory, - &_m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory__create, - "create", - "(Landroid/content/Context;)Landroidx/emoji2/text/EmojiCompat$Config;"); - if (_m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory__create == - NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, - _m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory__create, - context); - return to_global_ref_result(_result); -} - -// androidx.emoji2.text.DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper -jclass _c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper = NULL; - -jmethodID _m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__new0 = - NULL; -FFI_PLUGIN_EXPORT -JniResult DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__new0() { - load_env(); - load_class_global_ref( - &_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper, - "androidx/emoji2/text/" - "DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper"); - if (_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper, - &_m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__new0, - "", "()V"); - if (_m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject( - jniEnv, _c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper, - _m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__new0); - return to_global_ref_result(_result); -} - -jmethodID - _m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__getSigningSignatures = - NULL; -FFI_PLUGIN_EXPORT -JniResult -DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__getSigningSignatures( - jobject self_, - jobject packageManager, - jobject providerPackage) { - load_env(); - load_class_global_ref( - &_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper, - "androidx/emoji2/text/" - "DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper"); - if (_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper, - &_m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__getSigningSignatures, - "getSigningSignatures", - "(Landroid/content/pm/PackageManager;Ljava/lang/String;)[Landroid/" - "content/pm/Signature;"); - if (_m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__getSigningSignatures == - NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, - _m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__getSigningSignatures, - packageManager, providerPackage); - return to_global_ref_result(_result); -} - -jmethodID - _m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__queryIntentContentProviders = - NULL; -FFI_PLUGIN_EXPORT -JniResult -DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__queryIntentContentProviders( - jobject self_, - jobject packageManager, - jobject intent, - int32_t flags) { - load_env(); - load_class_global_ref( - &_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper, - "androidx/emoji2/text/" - "DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper"); - if (_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper, - &_m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__queryIntentContentProviders, - "queryIntentContentProviders", - "(Landroid/content/pm/PackageManager;Landroid/content/Intent;I)Ljava/" - "util/List;"); - if (_m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__queryIntentContentProviders == - NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, - _m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__queryIntentContentProviders, - packageManager, intent, flags); - return to_global_ref_result(_result); -} - -jmethodID - _m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__getProviderInfo = - NULL; -FFI_PLUGIN_EXPORT -JniResult -DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__getProviderInfo( - jobject self_, - jobject resolveInfo) { - load_env(); - load_class_global_ref( - &_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper, - "androidx/emoji2/text/" - "DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper"); - if (_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper, - &_m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__getProviderInfo, - "getProviderInfo", - "(Landroid/content/pm/ResolveInfo;)Landroid/content/pm/ProviderInfo;"); - if (_m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__getProviderInfo == - NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, - _m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper__getProviderInfo, - resolveInfo); - return to_global_ref_result(_result); -} - -// androidx.emoji2.text.DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper_API19 -jclass _c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19 = NULL; - -jmethodID - _m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19__new0 = - NULL; -FFI_PLUGIN_EXPORT -JniResult -DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19__new0() { - load_env(); - load_class_global_ref( - &_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19, - "androidx/emoji2/text/" - "DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper_API19"); - if (_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19, - &_m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19__new0, - "", "()V"); - if (_m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19__new0 == - NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject( - jniEnv, _c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19, - _m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19__new0); - return to_global_ref_result(_result); -} - -jmethodID - _m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19__queryIntentContentProviders = - NULL; -FFI_PLUGIN_EXPORT -JniResult -DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19__queryIntentContentProviders( - jobject self_, - jobject packageManager, - jobject intent, - int32_t flags) { - load_env(); - load_class_global_ref( - &_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19, - "androidx/emoji2/text/" - "DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper_API19"); - if (_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19, - &_m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19__queryIntentContentProviders, - "queryIntentContentProviders", - "(Landroid/content/pm/PackageManager;Landroid/content/Intent;I)Ljava/" - "util/List;"); - if (_m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19__queryIntentContentProviders == - NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, - _m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19__queryIntentContentProviders, - packageManager, intent, flags); - return to_global_ref_result(_result); -} - -jmethodID - _m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19__getProviderInfo = - NULL; -FFI_PLUGIN_EXPORT -JniResult -DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19__getProviderInfo( - jobject self_, - jobject resolveInfo) { - load_env(); - load_class_global_ref( - &_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19, - "androidx/emoji2/text/" - "DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper_API19"); - if (_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19, - &_m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19__getProviderInfo, - "getProviderInfo", - "(Landroid/content/pm/ResolveInfo;)Landroid/content/pm/ProviderInfo;"); - if (_m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19__getProviderInfo == - NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, - _m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19__getProviderInfo, - resolveInfo); - return to_global_ref_result(_result); -} - -// androidx.emoji2.text.DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper_API28 -jclass _c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28 = NULL; - -jmethodID - _m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28__new0 = - NULL; -FFI_PLUGIN_EXPORT -JniResult -DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28__new0() { - load_env(); - load_class_global_ref( - &_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28, - "androidx/emoji2/text/" - "DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper_API28"); - if (_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28, - &_m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28__new0, - "", "()V"); - if (_m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28__new0 == - NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject( - jniEnv, _c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28, - _m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28__new0); - return to_global_ref_result(_result); -} - -jmethodID - _m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28__getSigningSignatures1 = - NULL; -FFI_PLUGIN_EXPORT -JniResult -DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28__getSigningSignatures1( - jobject self_, - jobject packageManager, - jobject providerPackage) { - load_env(); - load_class_global_ref( - &_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28, - "androidx/emoji2/text/" - "DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper_API28"); - if (_c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28, - &_m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28__getSigningSignatures1, - "getSigningSignatures", - "(Landroid/content/pm/PackageManager;Ljava/lang/String;)[Landroid/" - "content/pm/Signature;"); - if (_m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28__getSigningSignatures1 == - NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, - _m_DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28__getSigningSignatures1, - packageManager, providerPackage); - return to_global_ref_result(_result); -} - -// androidx.emoji2.text.DefaultEmojiCompatConfig -jclass _c_DefaultEmojiCompatConfig = NULL; - -jmethodID _m_DefaultEmojiCompatConfig__create = NULL; -FFI_PLUGIN_EXPORT -JniResult DefaultEmojiCompatConfig__create(jobject context) { - load_env(); - load_class_global_ref(&_c_DefaultEmojiCompatConfig, - "androidx/emoji2/text/DefaultEmojiCompatConfig"); - if (_c_DefaultEmojiCompatConfig == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_DefaultEmojiCompatConfig, - &_m_DefaultEmojiCompatConfig__create, "create", - "(Landroid/content/Context;)Landroidx/emoji2/text/" - "FontRequestEmojiCompatConfig;"); - if (_m_DefaultEmojiCompatConfig__create == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_DefaultEmojiCompatConfig, _m_DefaultEmojiCompatConfig__create, - context); - return to_global_ref_result(_result); -} - -// android.os.Build$Partition -jclass _c_Build_Partition = NULL; - -jmethodID _m_Build_Partition__getName = NULL; -FFI_PLUGIN_EXPORT -JniResult Build_Partition__getName(jobject self_) { - load_env(); - load_class_global_ref(&_c_Build_Partition, "android/os/Build$Partition"); - if (_c_Build_Partition == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Build_Partition, &_m_Build_Partition__getName, "getName", - "()Ljava/lang/String;"); - if (_m_Build_Partition__getName == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_Build_Partition__getName); - return to_global_ref_result(_result); -} - -jmethodID _m_Build_Partition__getFingerprint = NULL; -FFI_PLUGIN_EXPORT -JniResult Build_Partition__getFingerprint(jobject self_) { - load_env(); - load_class_global_ref(&_c_Build_Partition, "android/os/Build$Partition"); - if (_c_Build_Partition == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Build_Partition, &_m_Build_Partition__getFingerprint, - "getFingerprint", "()Ljava/lang/String;"); - if (_m_Build_Partition__getFingerprint == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_Build_Partition__getFingerprint); - return to_global_ref_result(_result); -} - -jmethodID _m_Build_Partition__getBuildTimeMillis = NULL; -FFI_PLUGIN_EXPORT -JniResult Build_Partition__getBuildTimeMillis(jobject self_) { - load_env(); - load_class_global_ref(&_c_Build_Partition, "android/os/Build$Partition"); - if (_c_Build_Partition == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Build_Partition, &_m_Build_Partition__getBuildTimeMillis, - "getBuildTimeMillis", "()J"); - if (_m_Build_Partition__getBuildTimeMillis == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int64_t _result = (*jniEnv)->CallLongMethod( - jniEnv, self_, _m_Build_Partition__getBuildTimeMillis); - return (JniResult){.value = {.j = _result}, .exception = check_exception()}; -} - -jmethodID _m_Build_Partition__equals = NULL; -FFI_PLUGIN_EXPORT -JniResult Build_Partition__equals(jobject self_, jobject object) { - load_env(); - load_class_global_ref(&_c_Build_Partition, "android/os/Build$Partition"); - if (_c_Build_Partition == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Build_Partition, &_m_Build_Partition__equals, "equals", - "(Ljava/lang/Object;)Z"); - if (_m_Build_Partition__equals == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_Build_Partition__equals, object); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_Build_Partition__hashCode1 = NULL; -FFI_PLUGIN_EXPORT -JniResult Build_Partition__hashCode1(jobject self_) { - load_env(); - load_class_global_ref(&_c_Build_Partition, "android/os/Build$Partition"); - if (_c_Build_Partition == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Build_Partition, &_m_Build_Partition__hashCode1, "hashCode", - "()I"); - if (_m_Build_Partition__hashCode1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = - (*jniEnv)->CallIntMethod(jniEnv, self_, _m_Build_Partition__hashCode1); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jfieldID _f_Build_Partition__PARTITION_NAME_SYSTEM = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build_Partition__PARTITION_NAME_SYSTEM() { - load_env(); - load_class_global_ref(&_c_Build_Partition, "android/os/Build$Partition"); - if (_c_Build_Partition == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build_Partition, - &_f_Build_Partition__PARTITION_NAME_SYSTEM, - "PARTITION_NAME_SYSTEM", "Ljava/lang/String;"); - jobject _result = (*jniEnv)->GetStaticObjectField( - jniEnv, _c_Build_Partition, _f_Build_Partition__PARTITION_NAME_SYSTEM); - return to_global_ref_result(_result); -} - -// android.os.Build$VERSION -jclass _c_Build_VERSION = NULL; - -jmethodID _m_Build_VERSION__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult Build_VERSION__new0() { - load_env(); - load_class_global_ref(&_c_Build_VERSION, "android/os/Build$VERSION"); - if (_c_Build_VERSION == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Build_VERSION, &_m_Build_VERSION__new0, "", "()V"); - if (_m_Build_VERSION__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_Build_VERSION, _m_Build_VERSION__new0); - return to_global_ref_result(_result); -} - -jfieldID _f_Build_VERSION__BASE_OS = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build_VERSION__BASE_OS() { - load_env(); - load_class_global_ref(&_c_Build_VERSION, "android/os/Build$VERSION"); - if (_c_Build_VERSION == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build_VERSION, &_f_Build_VERSION__BASE_OS, "BASE_OS", - "Ljava/lang/String;"); - jobject _result = (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build_VERSION, - _f_Build_VERSION__BASE_OS); - return to_global_ref_result(_result); -} - -jfieldID _f_Build_VERSION__CODENAME = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build_VERSION__CODENAME() { - load_env(); - load_class_global_ref(&_c_Build_VERSION, "android/os/Build$VERSION"); - if (_c_Build_VERSION == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build_VERSION, &_f_Build_VERSION__CODENAME, "CODENAME", - "Ljava/lang/String;"); - jobject _result = (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build_VERSION, - _f_Build_VERSION__CODENAME); - return to_global_ref_result(_result); -} - -jfieldID _f_Build_VERSION__INCREMENTAL = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build_VERSION__INCREMENTAL() { - load_env(); - load_class_global_ref(&_c_Build_VERSION, "android/os/Build$VERSION"); - if (_c_Build_VERSION == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build_VERSION, &_f_Build_VERSION__INCREMENTAL, - "INCREMENTAL", "Ljava/lang/String;"); - jobject _result = (*jniEnv)->GetStaticObjectField( - jniEnv, _c_Build_VERSION, _f_Build_VERSION__INCREMENTAL); - return to_global_ref_result(_result); -} - -jfieldID _f_Build_VERSION__MEDIA_PERFORMANCE_CLASS = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build_VERSION__MEDIA_PERFORMANCE_CLASS() { - load_env(); - load_class_global_ref(&_c_Build_VERSION, "android/os/Build$VERSION"); - if (_c_Build_VERSION == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build_VERSION, - &_f_Build_VERSION__MEDIA_PERFORMANCE_CLASS, - "MEDIA_PERFORMANCE_CLASS", "I"); - int32_t _result = (*jniEnv)->GetStaticIntField( - jniEnv, _c_Build_VERSION, _f_Build_VERSION__MEDIA_PERFORMANCE_CLASS); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jfieldID _f_Build_VERSION__PREVIEW_SDK_INT = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build_VERSION__PREVIEW_SDK_INT() { - load_env(); - load_class_global_ref(&_c_Build_VERSION, "android/os/Build$VERSION"); - if (_c_Build_VERSION == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build_VERSION, &_f_Build_VERSION__PREVIEW_SDK_INT, - "PREVIEW_SDK_INT", "I"); - int32_t _result = (*jniEnv)->GetStaticIntField( - jniEnv, _c_Build_VERSION, _f_Build_VERSION__PREVIEW_SDK_INT); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jfieldID _f_Build_VERSION__RELEASE = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build_VERSION__RELEASE() { - load_env(); - load_class_global_ref(&_c_Build_VERSION, "android/os/Build$VERSION"); - if (_c_Build_VERSION == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build_VERSION, &_f_Build_VERSION__RELEASE, "RELEASE", - "Ljava/lang/String;"); - jobject _result = (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build_VERSION, - _f_Build_VERSION__RELEASE); - return to_global_ref_result(_result); -} - -jfieldID _f_Build_VERSION__RELEASE_OR_CODENAME = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build_VERSION__RELEASE_OR_CODENAME() { - load_env(); - load_class_global_ref(&_c_Build_VERSION, "android/os/Build$VERSION"); - if (_c_Build_VERSION == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build_VERSION, &_f_Build_VERSION__RELEASE_OR_CODENAME, - "RELEASE_OR_CODENAME", "Ljava/lang/String;"); - jobject _result = (*jniEnv)->GetStaticObjectField( - jniEnv, _c_Build_VERSION, _f_Build_VERSION__RELEASE_OR_CODENAME); - return to_global_ref_result(_result); -} - -jfieldID _f_Build_VERSION__RELEASE_OR_PREVIEW_DISPLAY = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build_VERSION__RELEASE_OR_PREVIEW_DISPLAY() { - load_env(); - load_class_global_ref(&_c_Build_VERSION, "android/os/Build$VERSION"); - if (_c_Build_VERSION == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build_VERSION, - &_f_Build_VERSION__RELEASE_OR_PREVIEW_DISPLAY, - "RELEASE_OR_PREVIEW_DISPLAY", "Ljava/lang/String;"); - jobject _result = (*jniEnv)->GetStaticObjectField( - jniEnv, _c_Build_VERSION, _f_Build_VERSION__RELEASE_OR_PREVIEW_DISPLAY); - return to_global_ref_result(_result); -} - -jfieldID _f_Build_VERSION__SDK = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build_VERSION__SDK() { - load_env(); - load_class_global_ref(&_c_Build_VERSION, "android/os/Build$VERSION"); - if (_c_Build_VERSION == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build_VERSION, &_f_Build_VERSION__SDK, "SDK", - "Ljava/lang/String;"); - jobject _result = (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build_VERSION, - _f_Build_VERSION__SDK); - return to_global_ref_result(_result); -} - -jfieldID _f_Build_VERSION__SDK_INT = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build_VERSION__SDK_INT() { - load_env(); - load_class_global_ref(&_c_Build_VERSION, "android/os/Build$VERSION"); - if (_c_Build_VERSION == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build_VERSION, &_f_Build_VERSION__SDK_INT, "SDK_INT", - "I"); - int32_t _result = (*jniEnv)->GetStaticIntField(jniEnv, _c_Build_VERSION, - _f_Build_VERSION__SDK_INT); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jfieldID _f_Build_VERSION__SECURITY_PATCH = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build_VERSION__SECURITY_PATCH() { - load_env(); - load_class_global_ref(&_c_Build_VERSION, "android/os/Build$VERSION"); - if (_c_Build_VERSION == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build_VERSION, &_f_Build_VERSION__SECURITY_PATCH, - "SECURITY_PATCH", "Ljava/lang/String;"); - jobject _result = (*jniEnv)->GetStaticObjectField( - jniEnv, _c_Build_VERSION, _f_Build_VERSION__SECURITY_PATCH); - return to_global_ref_result(_result); -} - -// android.os.Build$VERSION_CODES -jclass _c_Build_VERSION_CODES = NULL; - -jmethodID _m_Build_VERSION_CODES__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult Build_VERSION_CODES__new0() { - load_env(); - load_class_global_ref(&_c_Build_VERSION_CODES, - "android/os/Build$VERSION_CODES"); - if (_c_Build_VERSION_CODES == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Build_VERSION_CODES, &_m_Build_VERSION_CODES__new0, "", - "()V"); - if (_m_Build_VERSION_CODES__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_Build_VERSION_CODES, - _m_Build_VERSION_CODES__new0); - return to_global_ref_result(_result); -} - -// android.os.Build -jclass _c_Build = NULL; - -jmethodID _m_Build__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult Build__new0() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Build, &_m_Build__new0, "", "()V"); - if (_m_Build__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_Build, _m_Build__new0); - return to_global_ref_result(_result); -} - -jmethodID _m_Build__getSerial = NULL; -FFI_PLUGIN_EXPORT -JniResult Build__getSerial() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_Build, &_m_Build__getSerial, "getSerial", - "()Ljava/lang/String;"); - if (_m_Build__getSerial == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_Build, _m_Build__getSerial); - return to_global_ref_result(_result); -} - -jmethodID _m_Build__getFingerprintedPartitions = NULL; -FFI_PLUGIN_EXPORT -JniResult Build__getFingerprintedPartitions() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_Build, &_m_Build__getFingerprintedPartitions, - "getFingerprintedPartitions", "()Ljava/util/List;"); - if (_m_Build__getFingerprintedPartitions == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_Build, _m_Build__getFingerprintedPartitions); - return to_global_ref_result(_result); -} - -jmethodID _m_Build__getRadioVersion = NULL; -FFI_PLUGIN_EXPORT -JniResult Build__getRadioVersion() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_Build, &_m_Build__getRadioVersion, "getRadioVersion", - "()Ljava/lang/String;"); - if (_m_Build__getRadioVersion == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_Build, _m_Build__getRadioVersion); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__BOARD = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__BOARD() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__BOARD, "BOARD", "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__BOARD); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__BOOTLOADER = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__BOOTLOADER() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__BOOTLOADER, "BOOTLOADER", - "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__BOOTLOADER); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__BRAND = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__BRAND() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__BRAND, "BRAND", "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__BRAND); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__CPU_ABI = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__CPU_ABI() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__CPU_ABI, "CPU_ABI", - "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__CPU_ABI); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__CPU_ABI2 = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__CPU_ABI2() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__CPU_ABI2, "CPU_ABI2", - "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__CPU_ABI2); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__DEVICE = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__DEVICE() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__DEVICE, "DEVICE", - "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__DEVICE); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__DISPLAY = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__DISPLAY() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__DISPLAY, "DISPLAY", - "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__DISPLAY); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__FINGERPRINT = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__FINGERPRINT() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__FINGERPRINT, "FINGERPRINT", - "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__FINGERPRINT); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__HARDWARE = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__HARDWARE() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__HARDWARE, "HARDWARE", - "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__HARDWARE); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__HOST = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__HOST() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__HOST, "HOST", "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__HOST); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__ID = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__ID() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__ID, "ID", "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__ID); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__MANUFACTURER = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__MANUFACTURER() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__MANUFACTURER, "MANUFACTURER", - "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__MANUFACTURER); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__MODEL = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__MODEL() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__MODEL, "MODEL", "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__MODEL); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__ODM_SKU = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__ODM_SKU() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__ODM_SKU, "ODM_SKU", - "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__ODM_SKU); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__PRODUCT = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__PRODUCT() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__PRODUCT, "PRODUCT", - "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__PRODUCT); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__RADIO = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__RADIO() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__RADIO, "RADIO", "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__RADIO); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__SERIAL = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__SERIAL() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__SERIAL, "SERIAL", - "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__SERIAL); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__SKU = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__SKU() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__SKU, "SKU", "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__SKU); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__SOC_MANUFACTURER = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__SOC_MANUFACTURER() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__SOC_MANUFACTURER, "SOC_MANUFACTURER", - "Ljava/lang/String;"); - jobject _result = (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, - _f_Build__SOC_MANUFACTURER); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__SOC_MODEL = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__SOC_MODEL() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__SOC_MODEL, "SOC_MODEL", - "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__SOC_MODEL); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__SUPPORTED_32_BIT_ABIS = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__SUPPORTED_32_BIT_ABIS() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__SUPPORTED_32_BIT_ABIS, - "SUPPORTED_32_BIT_ABIS", "[Ljava/lang/String;"); - jobject _result = (*jniEnv)->GetStaticObjectField( - jniEnv, _c_Build, _f_Build__SUPPORTED_32_BIT_ABIS); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__SUPPORTED_64_BIT_ABIS = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__SUPPORTED_64_BIT_ABIS() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__SUPPORTED_64_BIT_ABIS, - "SUPPORTED_64_BIT_ABIS", "[Ljava/lang/String;"); - jobject _result = (*jniEnv)->GetStaticObjectField( - jniEnv, _c_Build, _f_Build__SUPPORTED_64_BIT_ABIS); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__SUPPORTED_ABIS = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__SUPPORTED_ABIS() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__SUPPORTED_ABIS, "SUPPORTED_ABIS", - "[Ljava/lang/String;"); - jobject _result = (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, - _f_Build__SUPPORTED_ABIS); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__TAGS = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__TAGS() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__TAGS, "TAGS", "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__TAGS); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__TIME = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__TIME() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__TIME, "TIME", "J"); - int64_t _result = - (*jniEnv)->GetStaticLongField(jniEnv, _c_Build, _f_Build__TIME); - return (JniResult){.value = {.j = _result}, .exception = check_exception()}; -} - -jfieldID _f_Build__TYPE = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__TYPE() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__TYPE, "TYPE", "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__TYPE); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__UNKNOWN = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__UNKNOWN() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__UNKNOWN, "UNKNOWN", - "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__UNKNOWN); - return to_global_ref_result(_result); -} - -jfieldID _f_Build__USER = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Build__USER() { - load_env(); - load_class_global_ref(&_c_Build, "android/os/Build"); - if (_c_Build == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Build, &_f_Build__USER, "USER", "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Build, _f_Build__USER); - return to_global_ref_result(_result); -} - -// java.util.HashMap -jclass _c_HashMap = NULL; - -jmethodID _m_HashMap__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__new0(int32_t i, float f) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__new0, "", "(IF)V"); - if (_m_HashMap__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_HashMap, _m_HashMap__new0, i, f); - return to_global_ref_result(_result); -} - -jmethodID _m_HashMap__new1 = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__new1(int32_t i) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__new1, "", "(I)V"); - if (_m_HashMap__new1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_HashMap, _m_HashMap__new1, i); - return to_global_ref_result(_result); -} - -jmethodID _m_HashMap__new2 = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__new2() { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__new2, "", "()V"); - if (_m_HashMap__new2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_HashMap, _m_HashMap__new2); - return to_global_ref_result(_result); -} - -jmethodID _m_HashMap__new3 = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__new3(jobject map) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__new3, "", "(Ljava/util/Map;)V"); - if (_m_HashMap__new3 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_HashMap, _m_HashMap__new3, map); - return to_global_ref_result(_result); -} - -jmethodID _m_HashMap__size = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__size(jobject self_) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__size, "size", "()I"); - if (_m_HashMap__size == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_HashMap__size); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_HashMap__isEmpty = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__isEmpty(jobject self_) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__isEmpty, "isEmpty", "()Z"); - if (_m_HashMap__isEmpty == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = - (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_HashMap__isEmpty); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_HashMap__get0 = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__get0(jobject self_, jobject object) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__get0, "get", - "(Ljava/lang/Object;)Ljava/lang/Object;"); - if (_m_HashMap__get0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_HashMap__get0, object); - return to_global_ref_result(_result); -} - -jmethodID _m_HashMap__containsKey = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__containsKey(jobject self_, jobject object) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__containsKey, "containsKey", - "(Ljava/lang/Object;)Z"); - if (_m_HashMap__containsKey == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_HashMap__containsKey, object); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_HashMap__put = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__put(jobject self_, jobject object, jobject object1) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__put, "put", - "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"); - if (_m_HashMap__put == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_HashMap__put, - object, object1); - return to_global_ref_result(_result); -} - -jmethodID _m_HashMap__putAll = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__putAll(jobject self_, jobject map) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__putAll, "putAll", "(Ljava/util/Map;)V"); - if (_m_HashMap__putAll == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_HashMap__putAll, map); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_HashMap__remove = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__remove(jobject self_, jobject object) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__remove, "remove", - "(Ljava/lang/Object;)Ljava/lang/Object;"); - if (_m_HashMap__remove == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_HashMap__remove, object); - return to_global_ref_result(_result); -} - -jmethodID _m_HashMap__clear = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__clear(jobject self_) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__clear, "clear", "()V"); - if (_m_HashMap__clear == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_HashMap__clear); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_HashMap__containsValue = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__containsValue(jobject self_, jobject object) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__containsValue, "containsValue", - "(Ljava/lang/Object;)Z"); - if (_m_HashMap__containsValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_HashMap__containsValue, object); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_HashMap__keySet = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__keySet(jobject self_) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__keySet, "keySet", "()Ljava/util/Set;"); - if (_m_HashMap__keySet == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_HashMap__keySet); - return to_global_ref_result(_result); -} - -jmethodID _m_HashMap__values = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__values(jobject self_) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__values, "values", - "()Ljava/util/Collection;"); - if (_m_HashMap__values == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_HashMap__values); - return to_global_ref_result(_result); -} - -jmethodID _m_HashMap__entrySet = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__entrySet(jobject self_) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__entrySet, "entrySet", - "()Ljava/util/Set;"); - if (_m_HashMap__entrySet == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_HashMap__entrySet); - return to_global_ref_result(_result); -} - -jmethodID _m_HashMap__getOrDefault = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__getOrDefault(jobject self_, - jobject object, - jobject object1) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__getOrDefault, "getOrDefault", - "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"); - if (_m_HashMap__getOrDefault == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_HashMap__getOrDefault, object, object1); - return to_global_ref_result(_result); -} - -jmethodID _m_HashMap__putIfAbsent = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__putIfAbsent(jobject self_, jobject object, jobject object1) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__putIfAbsent, "putIfAbsent", - "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"); - if (_m_HashMap__putIfAbsent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_HashMap__putIfAbsent, object, object1); - return to_global_ref_result(_result); -} - -jmethodID _m_HashMap__remove1 = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__remove1(jobject self_, jobject object, jobject object1) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__remove1, "remove", - "(Ljava/lang/Object;Ljava/lang/Object;)Z"); - if (_m_HashMap__remove1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_HashMap__remove1, object, object1); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_HashMap__replace = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__replace(jobject self_, - jobject object, - jobject object1, - jobject object2) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__replace, "replace", - "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z"); - if (_m_HashMap__replace == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_HashMap__replace, object, object1, object2); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_HashMap__replace1 = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__replace1(jobject self_, jobject object, jobject object1) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__replace1, "replace", - "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"); - if (_m_HashMap__replace1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_HashMap__replace1, object, object1); - return to_global_ref_result(_result); -} - -jmethodID _m_HashMap__computeIfAbsent = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__computeIfAbsent(jobject self_, - jobject object, - jobject function) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_HashMap, &_m_HashMap__computeIfAbsent, "computeIfAbsent", - "(Ljava/lang/Object;Ljava/util/function/Function;)Ljava/lang/Object;"); - if (_m_HashMap__computeIfAbsent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_HashMap__computeIfAbsent, object, function); - return to_global_ref_result(_result); -} - -jmethodID _m_HashMap__computeIfPresent = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__computeIfPresent(jobject self_, - jobject object, - jobject biFunction) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_HashMap, &_m_HashMap__computeIfPresent, "computeIfPresent", - "(Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;"); - if (_m_HashMap__computeIfPresent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_HashMap__computeIfPresent, object, biFunction); - return to_global_ref_result(_result); -} - -jmethodID _m_HashMap__compute = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__compute(jobject self_, jobject object, jobject biFunction) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_HashMap, &_m_HashMap__compute, "compute", - "(Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;"); - if (_m_HashMap__compute == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_HashMap__compute, object, biFunction); - return to_global_ref_result(_result); -} - -jmethodID _m_HashMap__merge = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__merge(jobject self_, - jobject object, - jobject object1, - jobject biFunction) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__merge, "merge", - "(Ljava/lang/Object;Ljava/lang/Object;Ljava/util/function/" - "BiFunction;)Ljava/lang/Object;"); - if (_m_HashMap__merge == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_HashMap__merge, object, object1, biFunction); - return to_global_ref_result(_result); -} - -jmethodID _m_HashMap__forEach = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__forEach(jobject self_, jobject biConsumer) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__forEach, "forEach", - "(Ljava/util/function/BiConsumer;)V"); - if (_m_HashMap__forEach == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_HashMap__forEach, biConsumer); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_HashMap__replaceAll = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__replaceAll(jobject self_, jobject biFunction) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__replaceAll, "replaceAll", - "(Ljava/util/function/BiFunction;)V"); - if (_m_HashMap__replaceAll == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_HashMap__replaceAll, biFunction); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_HashMap__clone = NULL; -FFI_PLUGIN_EXPORT -JniResult HashMap__clone(jobject self_) { - load_env(); - load_class_global_ref(&_c_HashMap, "java/util/HashMap"); - if (_c_HashMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_HashMap, &_m_HashMap__clone, "clone", "()Ljava/lang/Object;"); - if (_m_HashMap__clone == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_HashMap__clone); - return to_global_ref_result(_result); -} - -// com.example.in_app_java.AndroidUtils -jclass _c_AndroidUtils = NULL; - -jmethodID _m_AndroidUtils__showToast = NULL; -FFI_PLUGIN_EXPORT -JniResult AndroidUtils__showToast(jobject mainActivity, - jobject text, - int32_t duration) { - load_env(); - load_class_global_ref(&_c_AndroidUtils, - "com/example/in_app_java/AndroidUtils"); - if (_c_AndroidUtils == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_AndroidUtils, &_m_AndroidUtils__showToast, "showToast", - "(Landroid/app/Activity;Ljava/lang/CharSequence;I)V"); - if (_m_AndroidUtils__showToast == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallStaticVoidMethod(jniEnv, _c_AndroidUtils, - _m_AndroidUtils__showToast, mainActivity, - text, duration); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} diff --git a/pkgs/jnigen/example/in_app_java/src/android_utils/dartjni.h b/pkgs/jnigen/example/in_app_java/src/android_utils/dartjni.h deleted file mode 100644 index f834d1577b..0000000000 --- a/pkgs/jnigen/example/in_app_java/src/android_utils/dartjni.h +++ /dev/null @@ -1,383 +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. - -#pragma once - -// Note: include appropriate system jni.h as found by CMake, not third_party/jni.h. -#include -#include -#include -#include - -#if _WIN32 -#include -#else -#include -#include -#endif - -#if _WIN32 -#define FFI_PLUGIN_EXPORT __declspec(dllexport) -#else -#define FFI_PLUGIN_EXPORT -#endif - -#if defined _WIN32 -#define thread_local __declspec(thread) -#else -#define thread_local __thread -#endif - -#ifdef __ANDROID__ -#include -#endif - -#ifdef __ANDROID__ -#define __ENVP_CAST (JNIEnv**) -#else -#define __ENVP_CAST (void**) -#endif - -/// Locking functions for windows and pthread. - -#if defined _WIN32 -#include - -typedef CRITICAL_SECTION MutexLock; -typedef CONDITION_VARIABLE ConditionVariable; - -static inline void init_lock(MutexLock* lock) { - InitializeCriticalSection(lock); -} - -static inline void acquire_lock(MutexLock* lock) { - EnterCriticalSection(lock); -} - -static inline void release_lock(MutexLock* lock) { - LeaveCriticalSection(lock); -} - -static inline void destroy_lock(MutexLock* lock) { - DeleteCriticalSection(lock); -} - -static inline void init_cond(ConditionVariable* cond) { - InitializeConditionVariable(cond); -} - -static inline void signal_cond(ConditionVariable* cond) { - WakeConditionVariable(cond); -} - -static inline void wait_for(ConditionVariable* cond, MutexLock* lock) { - SleepConditionVariableCS(cond, lock, INFINITE); -} - -static inline void destroy_cond(ConditionVariable* cond) { - // Not available. -} - -static inline void free_mem(void* mem) { - CoTaskMemFree(mem); -} - -#elif defined __APPLE__ || defined __LINUX__ || defined __ANDROID__ || \ - defined __GNUC__ -#include - -typedef pthread_mutex_t MutexLock; -typedef pthread_cond_t ConditionVariable; - -static inline void init_lock(MutexLock* lock) { - pthread_mutex_init(lock, NULL); -} - -static inline void acquire_lock(MutexLock* lock) { - pthread_mutex_lock(lock); -} - -static inline void release_lock(MutexLock* lock) { - pthread_mutex_unlock(lock); -} - -static inline void destroy_lock(MutexLock* lock) { - pthread_mutex_destroy(lock); -} - -static inline void init_cond(ConditionVariable* cond) { - pthread_cond_init(cond, NULL); -} - -static inline void signal_cond(ConditionVariable* cond) { - pthread_cond_signal(cond); -} - -static inline void wait_for(ConditionVariable* cond, MutexLock* lock) { - pthread_cond_wait(cond, lock); -} - -static inline void destroy_cond(ConditionVariable* cond) { - pthread_cond_destroy(cond); -} - -static inline void free_mem(void* mem) { - free(mem); -} - -#else - -#error "No locking/condition variable support; Possibly unsupported platform" - -#endif - -typedef struct CallbackResult { - MutexLock lock; - ConditionVariable cond; - int ready; - jobject object; -} CallbackResult; - -typedef struct JniLocks { - MutexLock classLoadingLock; -} JniLocks; - -/// Represents the error when dart-jni layer has already spawned singleton VM. -#define DART_JNI_SINGLETON_EXISTS (-99); - -/// Stores the global state of the JNI. -typedef struct JniContext { - JavaVM* jvm; - jobject classLoader; - jmethodID loadClassMethod; - jobject currentActivity; - jobject appContext; - JniLocks locks; -} JniContext; - -// jniEnv for this thread, used by inline functions in this header, -// therefore declared as extern. -extern thread_local JNIEnv* jniEnv; - -extern JniContext* jni; - -/// Types used by JNI API to distinguish between primitive types. -enum JniType { - booleanType = 0, - byteType = 1, - shortType = 2, - charType = 3, - intType = 4, - longType = 5, - floatType = 6, - doubleType = 7, - objectType = 8, - voidType = 9, -}; - -/// Result type for use by JNI. -/// -/// If [exception] is null, it means the result is valid. -/// It's assumed that the caller knows the expected type in [result]. -typedef struct JniResult { - jvalue value; - jthrowable exception; -} JniResult; - -/// Similar to [JniResult] but for class lookups. -typedef struct JniClassLookupResult { - jclass value; - jthrowable exception; -} JniClassLookupResult; - -/// Similar to [JniResult] but for method/field ID lookups. -typedef struct JniPointerResult { - const void* value; - jthrowable exception; -} JniPointerResult; - -/// JniExceptionDetails holds 2 jstring objects, one is the result of -/// calling `toString` on exception object, other is stack trace; -typedef struct JniExceptionDetails { - jstring message; - jstring stacktrace; -} JniExceptionDetails; - -/// This struct contains functions which wrap method call / field access conveniently along with -/// exception checking. -/// -/// Flutter embedding checks for pending JNI exceptions before an FFI transition, which requires us -/// to check for and clear the exception before returning to dart code, which requires these functions -/// to return result types. -typedef struct JniAccessorsStruct { - JniClassLookupResult (*getClass)(char* internalName); - JniPointerResult (*getFieldID)(jclass cls, char* fieldName, char* signature); - JniPointerResult (*getStaticFieldID)(jclass cls, - char* fieldName, - char* signature); - JniPointerResult (*getMethodID)(jclass cls, - char* methodName, - char* signature); - JniPointerResult (*getStaticMethodID)(jclass cls, - char* methodName, - char* signature); - JniResult (*newObject)(jclass cls, jmethodID ctor, jvalue* args); - JniResult (*newPrimitiveArray)(jsize length, int type); - JniResult (*newObjectArray)(jsize length, - jclass elementClass, - jobject initialElement); - JniResult (*getArrayElement)(jarray array, int index, int type); - JniResult (*callMethod)(jobject obj, - jmethodID methodID, - int callType, - jvalue* args); - JniResult (*callStaticMethod)(jclass cls, - jmethodID methodID, - int callType, - jvalue* args); - JniResult (*getField)(jobject obj, jfieldID fieldID, int callType); - JniResult (*getStaticField)(jclass cls, jfieldID fieldID, int callType); - JniExceptionDetails (*getExceptionDetails)(jthrowable exception); -} JniAccessorsStruct; - -FFI_PLUGIN_EXPORT JniAccessorsStruct* GetAccessors(); - -FFI_PLUGIN_EXPORT JavaVM* GetJavaVM(void); - -FFI_PLUGIN_EXPORT JNIEnv* GetJniEnv(void); - -/// Spawn a JVM with given arguments. -/// -/// Returns JNI_OK on success, and one of the documented JNI error codes on -/// failure. It returns DART_JNI_SINGLETON_EXISTS if an attempt to spawn multiple -/// JVMs is made, even if the underlying API potentially supports multiple VMs. -FFI_PLUGIN_EXPORT int SpawnJvm(JavaVMInitArgs* args); - -/// Returns Application classLoader (on Android), -/// which can be used to load application and platform classes. -/// -/// On other platforms, NULL is returned. -FFI_PLUGIN_EXPORT jobject GetClassLoader(void); - -/// Returns application context on Android. -/// -/// On other platforms, NULL is returned. -FFI_PLUGIN_EXPORT jobject GetApplicationContext(void); - -/// Returns current activity of the app on Android. -FFI_PLUGIN_EXPORT jobject GetCurrentActivity(void); - -static inline void attach_thread() { - if (jniEnv == NULL) { - (*jni->jvm)->AttachCurrentThread(jni->jvm, __ENVP_CAST & jniEnv, NULL); - } -} - -/// Load class into [cls] using platform specific mechanism -static inline void load_class_platform(jclass* cls, const char* name) { -#ifdef __ANDROID__ - jstring className = (*jniEnv)->NewStringUTF(jniEnv, name); - *cls = (*jniEnv)->CallObjectMethod(jniEnv, jni->classLoader, - jni->loadClassMethod, className); - (*jniEnv)->DeleteLocalRef(jniEnv, className); -#else - *cls = (*jniEnv)->FindClass(jniEnv, name); -#endif -} - -static inline void load_class_global_ref(jclass* cls, const char* name) { - if (*cls == NULL) { - jclass tmp = NULL; - acquire_lock(&jni->locks.classLoadingLock); - if (*cls == NULL) { - load_class_platform(&tmp, name); - if (!(*jniEnv)->ExceptionCheck(jniEnv)) { - *cls = (*jniEnv)->NewGlobalRef(jniEnv, tmp); - (*jniEnv)->DeleteLocalRef(jniEnv, tmp); - } - } - release_lock(&jni->locks.classLoadingLock); - } -} - -static inline void load_method(jclass cls, - jmethodID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetMethodID(jniEnv, cls, name, sig); - } -} - -static inline void load_static_method(jclass cls, - jmethodID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetStaticMethodID(jniEnv, cls, name, sig); - } -} - -static inline void load_field(jclass cls, - jfieldID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetFieldID(jniEnv, cls, name, sig); - } -} - -static inline void load_static_field(jclass cls, - jfieldID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetStaticFieldID(jniEnv, cls, name, sig); - } -} - -static inline jobject to_global_ref(jobject ref) { - jobject g = (*jniEnv)->NewGlobalRef(jniEnv, ref); - (*jniEnv)->DeleteLocalRef(jniEnv, ref); - return g; -} - -// These functions are useful for C+Dart bindings, and not required for pure dart bindings. - -FFI_PLUGIN_EXPORT JniContext* GetJniContextPtr(); - -/// For use by jni_gen's generated code -/// don't use these. - -// these 2 fn ptr vars will be defined by generated code library -extern JniContext* (*context_getter)(void); -extern JNIEnv* (*env_getter)(void); - -// this function will be exported by generated code library -// it will set above 2 variables. -FFI_PLUGIN_EXPORT void setJniGetters(struct JniContext* (*cg)(void), - JNIEnv* (*eg)(void)); - -static inline void load_env() { - if (jniEnv == NULL) { - jni = context_getter(); - jniEnv = env_getter(); - } -} - -static inline jthrowable check_exception() { - jthrowable exception = (*jniEnv)->ExceptionOccurred(jniEnv); - if (exception != NULL) (*jniEnv)->ExceptionClear(jniEnv); - if (exception == NULL) return NULL; - return to_global_ref(exception); -} - -static inline JniResult to_global_ref_result(jobject ref) { - JniResult result; - result.exception = check_exception(); - if (result.exception == NULL) { - result.value.l = to_global_ref(ref); - } - return result; -} diff --git a/pkgs/jnigen/example/kotlin_plugin/android/build.gradle b/pkgs/jnigen/example/kotlin_plugin/android/build.gradle index 6aa0c62727..04bce9b0c3 100644 --- a/pkgs/jnigen/example/kotlin_plugin/android/build.gradle +++ b/pkgs/jnigen/example/kotlin_plugin/android/build.gradle @@ -26,21 +26,6 @@ android { main.java.srcDirs += 'src/main/kotlin' } - // Invoke the shared CMake build with the Android Gradle Plugin. - externalNativeBuild { - cmake { - path "../src/CMakeLists.txt" - - // The default CMake version for the Android Gradle Plugin is 3.10.2. - // https://developer.android.com/studio/projects/install-ndk#vanilla_cmake - // - // The Flutter tooling requires that developers have CMake 3.10 or later - // installed. You should not increase this version, as doing so will cause - // the plugin to fail to compile for some customers of the plugin. - // version "3.10.2" - } - } - compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 diff --git a/pkgs/jnigen/example/kotlin_plugin/jnigen.yaml b/pkgs/jnigen/example/kotlin_plugin/jnigen.yaml index 60978f56fe..e6f08ecc68 100644 --- a/pkgs/jnigen/example/kotlin_plugin/jnigen.yaml +++ b/pkgs/jnigen/example/kotlin_plugin/jnigen.yaml @@ -5,12 +5,7 @@ android_sdk_config: summarizer: backend: asm -suspend_fun_to_async: true - output: - c: - library_name: kotlin_plugin_bindings - path: src/ dart: path: lib/kotlin_bindings.dart structure: single_file diff --git a/pkgs/jnigen/example/kotlin_plugin/lib/kotlin_bindings.dart b/pkgs/jnigen/example/kotlin_plugin/lib/kotlin_bindings.dart index 8e58392c79..0bf5803c89 100644 --- a/pkgs/jnigen/example/kotlin_plugin/lib/kotlin_bindings.dart +++ b/pkgs/jnigen/example/kotlin_plugin/lib/kotlin_bindings.dart @@ -23,11 +23,6 @@ import "dart:ffi" as ffi; import "package:jni/internal_helpers_for_jnigen.dart"; import "package:jni/jni.dart" as jni; -// Auto-generated initialization code. - -final ffi.Pointer Function(String sym) jniLookup = - ProtectedJniExtensions.initGeneratedLibrary("kotlin_plugin_bindings"); - /// from: Example class Example extends jni.JObject { @override @@ -37,25 +32,49 @@ class Example extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); + static final _class = jni.JClass.forName(r"Example"); + /// The type which includes information such as the signature of this class. static const type = $ExampleType(); - static final _new0 = - jniLookup>("Example__new0") - .asFunction(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory Example() { - return Example.fromReference(_new0().reference); + return Example.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } - static final _thinkBeforeAnswering = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("Example__thinkBeforeAnswering") + static final _id_thinkBeforeAnswering = _class.instanceMethodId( + r"thinkBeforeAnswering", + r"(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", + ); + + static final _thinkBeforeAnswering = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public final java.lang.Object thinkBeforeAnswering(kotlin.coroutines.Continuation continuation) /// The returned object must be released after use, by calling the [release] method. @@ -63,7 +82,8 @@ class Example extends jni.JObject { final $p = ReceivePort(); final $c = jni.JObject.fromReference( ProtectedJniExtensions.newPortContinuation($p)); - _thinkBeforeAnswering(reference.pointer, $c.reference.pointer) + _thinkBeforeAnswering(reference.pointer, + _id_thinkBeforeAnswering as jni.JMethodIDPtr, $c.reference.pointer) .object(const jni.JObjectType()); final $o = jni.JGlobalReference(jni.JObjectPtr.fromAddress(await $p.first)); final $k = const jni.JStringType().jClass.reference.pointer; diff --git a/pkgs/jnigen/example/kotlin_plugin/src/.clang-format b/pkgs/jnigen/example/kotlin_plugin/src/.clang-format deleted file mode 100644 index a256c2f097..0000000000 --- a/pkgs/jnigen/example/kotlin_plugin/src/.clang-format +++ /dev/null @@ -1,15 +0,0 @@ -# From dart SDK: https://github.com/dart-lang/sdk/blob/main/.clang-format - -# Defines the Chromium style for automatic reformatting. -# http://clang.llvm.org/docs/ClangFormatStyleOptions.html -BasedOnStyle: Chromium - -# clang-format doesn't seem to do a good job of this for longer comments. -ReflowComments: 'false' - -# We have lots of these. Though we need to put them all in curly braces, -# clang-format can't do that. -AllowShortIfStatementsOnASingleLine: 'true' - -# Put escaped newlines into the rightmost column. -AlignEscapedNewlinesLeft: false diff --git a/pkgs/jnigen/example/kotlin_plugin/src/CMakeLists.txt b/pkgs/jnigen/example/kotlin_plugin/src/CMakeLists.txt deleted file mode 100644 index 78d9dca2c8..0000000000 --- a/pkgs/jnigen/example/kotlin_plugin/src/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -# jni_native_build (Build with jni:setup. Do not delete this line.) - -# The Flutter tooling requires that developers have CMake 3.10 or later -# installed. You should not increase this version, as doing so will cause -# the plugin to fail to compile for some customers of the plugin. -cmake_minimum_required(VERSION 3.10) - -project(kotlin_plugin_bindings VERSION 0.0.1 LANGUAGES C) - -add_library(kotlin_plugin_bindings SHARED - "./kotlin_plugin_bindings.c" -) - -set_target_properties(kotlin_plugin_bindings PROPERTIES - OUTPUT_NAME "kotlin_plugin_bindings" -) - -target_compile_definitions(kotlin_plugin_bindings PUBLIC DART_SHARED_LIB) - -if(WIN32) - set_target_properties(${TARGET_NAME} PROPERTIES - LINK_FLAGS "/DELAYLOAD:jvm.dll") -endif() - -if (ANDROID) - target_link_libraries(kotlin_plugin_bindings log) -else() - find_package(Java REQUIRED) - find_package(JNI REQUIRED) - include_directories(${JNI_INCLUDE_DIRS}) - target_link_libraries(kotlin_plugin_bindings ${JNI_LIBRARIES}) -endif() diff --git a/pkgs/jnigen/example/kotlin_plugin/src/dartjni.h b/pkgs/jnigen/example/kotlin_plugin/src/dartjni.h deleted file mode 100644 index f834d1577b..0000000000 --- a/pkgs/jnigen/example/kotlin_plugin/src/dartjni.h +++ /dev/null @@ -1,383 +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. - -#pragma once - -// Note: include appropriate system jni.h as found by CMake, not third_party/jni.h. -#include -#include -#include -#include - -#if _WIN32 -#include -#else -#include -#include -#endif - -#if _WIN32 -#define FFI_PLUGIN_EXPORT __declspec(dllexport) -#else -#define FFI_PLUGIN_EXPORT -#endif - -#if defined _WIN32 -#define thread_local __declspec(thread) -#else -#define thread_local __thread -#endif - -#ifdef __ANDROID__ -#include -#endif - -#ifdef __ANDROID__ -#define __ENVP_CAST (JNIEnv**) -#else -#define __ENVP_CAST (void**) -#endif - -/// Locking functions for windows and pthread. - -#if defined _WIN32 -#include - -typedef CRITICAL_SECTION MutexLock; -typedef CONDITION_VARIABLE ConditionVariable; - -static inline void init_lock(MutexLock* lock) { - InitializeCriticalSection(lock); -} - -static inline void acquire_lock(MutexLock* lock) { - EnterCriticalSection(lock); -} - -static inline void release_lock(MutexLock* lock) { - LeaveCriticalSection(lock); -} - -static inline void destroy_lock(MutexLock* lock) { - DeleteCriticalSection(lock); -} - -static inline void init_cond(ConditionVariable* cond) { - InitializeConditionVariable(cond); -} - -static inline void signal_cond(ConditionVariable* cond) { - WakeConditionVariable(cond); -} - -static inline void wait_for(ConditionVariable* cond, MutexLock* lock) { - SleepConditionVariableCS(cond, lock, INFINITE); -} - -static inline void destroy_cond(ConditionVariable* cond) { - // Not available. -} - -static inline void free_mem(void* mem) { - CoTaskMemFree(mem); -} - -#elif defined __APPLE__ || defined __LINUX__ || defined __ANDROID__ || \ - defined __GNUC__ -#include - -typedef pthread_mutex_t MutexLock; -typedef pthread_cond_t ConditionVariable; - -static inline void init_lock(MutexLock* lock) { - pthread_mutex_init(lock, NULL); -} - -static inline void acquire_lock(MutexLock* lock) { - pthread_mutex_lock(lock); -} - -static inline void release_lock(MutexLock* lock) { - pthread_mutex_unlock(lock); -} - -static inline void destroy_lock(MutexLock* lock) { - pthread_mutex_destroy(lock); -} - -static inline void init_cond(ConditionVariable* cond) { - pthread_cond_init(cond, NULL); -} - -static inline void signal_cond(ConditionVariable* cond) { - pthread_cond_signal(cond); -} - -static inline void wait_for(ConditionVariable* cond, MutexLock* lock) { - pthread_cond_wait(cond, lock); -} - -static inline void destroy_cond(ConditionVariable* cond) { - pthread_cond_destroy(cond); -} - -static inline void free_mem(void* mem) { - free(mem); -} - -#else - -#error "No locking/condition variable support; Possibly unsupported platform" - -#endif - -typedef struct CallbackResult { - MutexLock lock; - ConditionVariable cond; - int ready; - jobject object; -} CallbackResult; - -typedef struct JniLocks { - MutexLock classLoadingLock; -} JniLocks; - -/// Represents the error when dart-jni layer has already spawned singleton VM. -#define DART_JNI_SINGLETON_EXISTS (-99); - -/// Stores the global state of the JNI. -typedef struct JniContext { - JavaVM* jvm; - jobject classLoader; - jmethodID loadClassMethod; - jobject currentActivity; - jobject appContext; - JniLocks locks; -} JniContext; - -// jniEnv for this thread, used by inline functions in this header, -// therefore declared as extern. -extern thread_local JNIEnv* jniEnv; - -extern JniContext* jni; - -/// Types used by JNI API to distinguish between primitive types. -enum JniType { - booleanType = 0, - byteType = 1, - shortType = 2, - charType = 3, - intType = 4, - longType = 5, - floatType = 6, - doubleType = 7, - objectType = 8, - voidType = 9, -}; - -/// Result type for use by JNI. -/// -/// If [exception] is null, it means the result is valid. -/// It's assumed that the caller knows the expected type in [result]. -typedef struct JniResult { - jvalue value; - jthrowable exception; -} JniResult; - -/// Similar to [JniResult] but for class lookups. -typedef struct JniClassLookupResult { - jclass value; - jthrowable exception; -} JniClassLookupResult; - -/// Similar to [JniResult] but for method/field ID lookups. -typedef struct JniPointerResult { - const void* value; - jthrowable exception; -} JniPointerResult; - -/// JniExceptionDetails holds 2 jstring objects, one is the result of -/// calling `toString` on exception object, other is stack trace; -typedef struct JniExceptionDetails { - jstring message; - jstring stacktrace; -} JniExceptionDetails; - -/// This struct contains functions which wrap method call / field access conveniently along with -/// exception checking. -/// -/// Flutter embedding checks for pending JNI exceptions before an FFI transition, which requires us -/// to check for and clear the exception before returning to dart code, which requires these functions -/// to return result types. -typedef struct JniAccessorsStruct { - JniClassLookupResult (*getClass)(char* internalName); - JniPointerResult (*getFieldID)(jclass cls, char* fieldName, char* signature); - JniPointerResult (*getStaticFieldID)(jclass cls, - char* fieldName, - char* signature); - JniPointerResult (*getMethodID)(jclass cls, - char* methodName, - char* signature); - JniPointerResult (*getStaticMethodID)(jclass cls, - char* methodName, - char* signature); - JniResult (*newObject)(jclass cls, jmethodID ctor, jvalue* args); - JniResult (*newPrimitiveArray)(jsize length, int type); - JniResult (*newObjectArray)(jsize length, - jclass elementClass, - jobject initialElement); - JniResult (*getArrayElement)(jarray array, int index, int type); - JniResult (*callMethod)(jobject obj, - jmethodID methodID, - int callType, - jvalue* args); - JniResult (*callStaticMethod)(jclass cls, - jmethodID methodID, - int callType, - jvalue* args); - JniResult (*getField)(jobject obj, jfieldID fieldID, int callType); - JniResult (*getStaticField)(jclass cls, jfieldID fieldID, int callType); - JniExceptionDetails (*getExceptionDetails)(jthrowable exception); -} JniAccessorsStruct; - -FFI_PLUGIN_EXPORT JniAccessorsStruct* GetAccessors(); - -FFI_PLUGIN_EXPORT JavaVM* GetJavaVM(void); - -FFI_PLUGIN_EXPORT JNIEnv* GetJniEnv(void); - -/// Spawn a JVM with given arguments. -/// -/// Returns JNI_OK on success, and one of the documented JNI error codes on -/// failure. It returns DART_JNI_SINGLETON_EXISTS if an attempt to spawn multiple -/// JVMs is made, even if the underlying API potentially supports multiple VMs. -FFI_PLUGIN_EXPORT int SpawnJvm(JavaVMInitArgs* args); - -/// Returns Application classLoader (on Android), -/// which can be used to load application and platform classes. -/// -/// On other platforms, NULL is returned. -FFI_PLUGIN_EXPORT jobject GetClassLoader(void); - -/// Returns application context on Android. -/// -/// On other platforms, NULL is returned. -FFI_PLUGIN_EXPORT jobject GetApplicationContext(void); - -/// Returns current activity of the app on Android. -FFI_PLUGIN_EXPORT jobject GetCurrentActivity(void); - -static inline void attach_thread() { - if (jniEnv == NULL) { - (*jni->jvm)->AttachCurrentThread(jni->jvm, __ENVP_CAST & jniEnv, NULL); - } -} - -/// Load class into [cls] using platform specific mechanism -static inline void load_class_platform(jclass* cls, const char* name) { -#ifdef __ANDROID__ - jstring className = (*jniEnv)->NewStringUTF(jniEnv, name); - *cls = (*jniEnv)->CallObjectMethod(jniEnv, jni->classLoader, - jni->loadClassMethod, className); - (*jniEnv)->DeleteLocalRef(jniEnv, className); -#else - *cls = (*jniEnv)->FindClass(jniEnv, name); -#endif -} - -static inline void load_class_global_ref(jclass* cls, const char* name) { - if (*cls == NULL) { - jclass tmp = NULL; - acquire_lock(&jni->locks.classLoadingLock); - if (*cls == NULL) { - load_class_platform(&tmp, name); - if (!(*jniEnv)->ExceptionCheck(jniEnv)) { - *cls = (*jniEnv)->NewGlobalRef(jniEnv, tmp); - (*jniEnv)->DeleteLocalRef(jniEnv, tmp); - } - } - release_lock(&jni->locks.classLoadingLock); - } -} - -static inline void load_method(jclass cls, - jmethodID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetMethodID(jniEnv, cls, name, sig); - } -} - -static inline void load_static_method(jclass cls, - jmethodID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetStaticMethodID(jniEnv, cls, name, sig); - } -} - -static inline void load_field(jclass cls, - jfieldID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetFieldID(jniEnv, cls, name, sig); - } -} - -static inline void load_static_field(jclass cls, - jfieldID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetStaticFieldID(jniEnv, cls, name, sig); - } -} - -static inline jobject to_global_ref(jobject ref) { - jobject g = (*jniEnv)->NewGlobalRef(jniEnv, ref); - (*jniEnv)->DeleteLocalRef(jniEnv, ref); - return g; -} - -// These functions are useful for C+Dart bindings, and not required for pure dart bindings. - -FFI_PLUGIN_EXPORT JniContext* GetJniContextPtr(); - -/// For use by jni_gen's generated code -/// don't use these. - -// these 2 fn ptr vars will be defined by generated code library -extern JniContext* (*context_getter)(void); -extern JNIEnv* (*env_getter)(void); - -// this function will be exported by generated code library -// it will set above 2 variables. -FFI_PLUGIN_EXPORT void setJniGetters(struct JniContext* (*cg)(void), - JNIEnv* (*eg)(void)); - -static inline void load_env() { - if (jniEnv == NULL) { - jni = context_getter(); - jniEnv = env_getter(); - } -} - -static inline jthrowable check_exception() { - jthrowable exception = (*jniEnv)->ExceptionOccurred(jniEnv); - if (exception != NULL) (*jniEnv)->ExceptionClear(jniEnv); - if (exception == NULL) return NULL; - return to_global_ref(exception); -} - -static inline JniResult to_global_ref_result(jobject ref) { - JniResult result; - result.exception = check_exception(); - if (result.exception == NULL) { - result.value.l = to_global_ref(ref); - } - return result; -} diff --git a/pkgs/jnigen/example/kotlin_plugin/src/kotlin_plugin_bindings.c b/pkgs/jnigen/example/kotlin_plugin/src/kotlin_plugin_bindings.c deleted file mode 100644 index 28a2af6212..0000000000 --- a/pkgs/jnigen/example/kotlin_plugin/src/kotlin_plugin_bindings.c +++ /dev/null @@ -1,50 +0,0 @@ -// Autogenerated by jnigen. DO NOT EDIT! - -#include -#include "dartjni.h" -#include "jni.h" - -thread_local JNIEnv* jniEnv; -JniContext* jni; - -JniContext* (*context_getter)(void); -JNIEnv* (*env_getter)(void); - -void setJniGetters(JniContext* (*cg)(void), JNIEnv* (*eg)(void)) { - context_getter = cg; - env_getter = eg; -} - -// Example -jclass _c_Example = NULL; - -jmethodID _m_Example__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__new0() { - load_env(); - load_class_global_ref(&_c_Example, "Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__new0, "", "()V"); - if (_m_Example__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_Example, _m_Example__new0); - return to_global_ref_result(_result); -} - -jmethodID _m_Example__thinkBeforeAnswering = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__thinkBeforeAnswering(jobject self_, jobject continuation) { - load_env(); - load_class_global_ref(&_c_Example, "Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__thinkBeforeAnswering, - "thinkBeforeAnswering", - "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;"); - if (_m_Example__thinkBeforeAnswering == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_Example__thinkBeforeAnswering, continuation); - return to_global_ref_result(_result); -} diff --git a/pkgs/jnigen/example/notification_plugin/android/build.gradle b/pkgs/jnigen/example/notification_plugin/android/build.gradle index c3dd19340e..fd63c0d8a1 100644 --- a/pkgs/jnigen/example/notification_plugin/android/build.gradle +++ b/pkgs/jnigen/example/notification_plugin/android/build.gradle @@ -21,21 +21,6 @@ android { // the version in their app and to download a newer version of the NDK. ndkVersion "21.1.6352462" - // Invoke the shared CMake build with the Android Gradle Plugin. - externalNativeBuild { - cmake { - path "../src/CMakeLists.txt" - - // The default CMake version for the Android Gradle Plugin is 3.10.2. - // https://developer.android.com/studio/projects/install-ndk#vanilla_cmake - // - // The Flutter tooling requires that developers have CMake 3.10 or later - // installed. You should not increase this version, as doing so will cause - // the plugin to fail to compile for some customers of the plugin. - // version "3.10.2" - } - } - compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 diff --git a/pkgs/jnigen/example/notification_plugin/jnigen.yaml b/pkgs/jnigen/example/notification_plugin/jnigen.yaml index 21f4106f1f..25db434592 100644 --- a/pkgs/jnigen/example/notification_plugin/jnigen.yaml +++ b/pkgs/jnigen/example/notification_plugin/jnigen.yaml @@ -13,9 +13,6 @@ classes: - 'com.example.notification_plugin.Notifications' output: - c: - path: 'src/' - library_name: notification_plugin dart: path: 'lib/notifications.dart' ## Output to single file instead of recreating source's file structure. diff --git a/pkgs/jnigen/example/notification_plugin/lib/notifications.dart b/pkgs/jnigen/example/notification_plugin/lib/notifications.dart index f74175f858..ef127a0523 100644 --- a/pkgs/jnigen/example/notification_plugin/lib/notifications.dart +++ b/pkgs/jnigen/example/notification_plugin/lib/notifications.dart @@ -27,11 +27,6 @@ import "dart:ffi" as ffi; import "package:jni/internal_helpers_for_jnigen.dart"; import "package:jni/jni.dart" as jni; -// Auto-generated initialization code. - -final ffi.Pointer Function(String sym) jniLookup = - ProtectedJniExtensions.initGeneratedLibrary("notification_plugin"); - /// from: com.example.notification_plugin.Notifications class Notifications extends jni.JObject { @override @@ -41,28 +36,60 @@ class Notifications extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); + static final _class = + jni.JClass.forName(r"com/example/notification_plugin/Notifications"); + /// The type which includes information such as the signature of this class. static const type = $NotificationsType(); - static final _new0 = jniLookup>( - "Notifications__new0") - .asFunction(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory Notifications() { - return Notifications.fromReference(_new0().reference); + return Notifications.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } - static final _showNotification = jniLookup< + static final _id_showNotification = _class.staticMethodId( + r"showNotification", + r"(Landroid/content/Context;ILjava/lang/String;Ljava/lang/String;)V", + ); + + static final _showNotification = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Int32, + jni.JThrowablePtr Function( ffi.Pointer, - ffi.Pointer)>>("Notifications__showNotification") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticVoidMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, int, - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer)>(); /// from: static public void showNotification(android.content.Context context, int notificationID, java.lang.String title, java.lang.String text) static void showNotification( @@ -71,8 +98,13 @@ class Notifications extends jni.JObject { jni.JString title, jni.JString text, ) { - _showNotification(context.reference.pointer, notificationID, - title.reference.pointer, text.reference.pointer) + _showNotification( + _class.reference.pointer, + _id_showNotification as jni.JMethodIDPtr, + context.reference.pointer, + notificationID, + title.reference.pointer, + text.reference.pointer) .check(); } } diff --git a/pkgs/jnigen/example/notification_plugin/src/.clang-format b/pkgs/jnigen/example/notification_plugin/src/.clang-format deleted file mode 100644 index a256c2f097..0000000000 --- a/pkgs/jnigen/example/notification_plugin/src/.clang-format +++ /dev/null @@ -1,15 +0,0 @@ -# From dart SDK: https://github.com/dart-lang/sdk/blob/main/.clang-format - -# Defines the Chromium style for automatic reformatting. -# http://clang.llvm.org/docs/ClangFormatStyleOptions.html -BasedOnStyle: Chromium - -# clang-format doesn't seem to do a good job of this for longer comments. -ReflowComments: 'false' - -# We have lots of these. Though we need to put them all in curly braces, -# clang-format can't do that. -AllowShortIfStatementsOnASingleLine: 'true' - -# Put escaped newlines into the rightmost column. -AlignEscapedNewlinesLeft: false diff --git a/pkgs/jnigen/example/notification_plugin/src/CMakeLists.txt b/pkgs/jnigen/example/notification_plugin/src/CMakeLists.txt deleted file mode 100644 index 39c9850346..0000000000 --- a/pkgs/jnigen/example/notification_plugin/src/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -# jni_native_build (Build with jni:setup. Do not delete this line.) - -# The Flutter tooling requires that developers have CMake 3.10 or later -# installed. You should not increase this version, as doing so will cause -# the plugin to fail to compile for some customers of the plugin. -cmake_minimum_required(VERSION 3.10) - -project(notification_plugin VERSION 0.0.1 LANGUAGES C) - -add_library(notification_plugin SHARED - "./notification_plugin.c" -) - -set_target_properties(notification_plugin PROPERTIES - OUTPUT_NAME "notification_plugin" -) - -target_compile_definitions(notification_plugin PUBLIC DART_SHARED_LIB) - -if(WIN32) - set_target_properties(${TARGET_NAME} PROPERTIES - LINK_FLAGS "/DELAYLOAD:jvm.dll") -endif() - -if (ANDROID) - target_link_libraries(notification_plugin log) -else() - find_package(Java REQUIRED) - find_package(JNI REQUIRED) - include_directories(${JNI_INCLUDE_DIRS}) - target_link_libraries(notification_plugin ${JNI_LIBRARIES}) -endif() diff --git a/pkgs/jnigen/example/notification_plugin/src/dartjni.h b/pkgs/jnigen/example/notification_plugin/src/dartjni.h deleted file mode 100644 index f834d1577b..0000000000 --- a/pkgs/jnigen/example/notification_plugin/src/dartjni.h +++ /dev/null @@ -1,383 +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. - -#pragma once - -// Note: include appropriate system jni.h as found by CMake, not third_party/jni.h. -#include -#include -#include -#include - -#if _WIN32 -#include -#else -#include -#include -#endif - -#if _WIN32 -#define FFI_PLUGIN_EXPORT __declspec(dllexport) -#else -#define FFI_PLUGIN_EXPORT -#endif - -#if defined _WIN32 -#define thread_local __declspec(thread) -#else -#define thread_local __thread -#endif - -#ifdef __ANDROID__ -#include -#endif - -#ifdef __ANDROID__ -#define __ENVP_CAST (JNIEnv**) -#else -#define __ENVP_CAST (void**) -#endif - -/// Locking functions for windows and pthread. - -#if defined _WIN32 -#include - -typedef CRITICAL_SECTION MutexLock; -typedef CONDITION_VARIABLE ConditionVariable; - -static inline void init_lock(MutexLock* lock) { - InitializeCriticalSection(lock); -} - -static inline void acquire_lock(MutexLock* lock) { - EnterCriticalSection(lock); -} - -static inline void release_lock(MutexLock* lock) { - LeaveCriticalSection(lock); -} - -static inline void destroy_lock(MutexLock* lock) { - DeleteCriticalSection(lock); -} - -static inline void init_cond(ConditionVariable* cond) { - InitializeConditionVariable(cond); -} - -static inline void signal_cond(ConditionVariable* cond) { - WakeConditionVariable(cond); -} - -static inline void wait_for(ConditionVariable* cond, MutexLock* lock) { - SleepConditionVariableCS(cond, lock, INFINITE); -} - -static inline void destroy_cond(ConditionVariable* cond) { - // Not available. -} - -static inline void free_mem(void* mem) { - CoTaskMemFree(mem); -} - -#elif defined __APPLE__ || defined __LINUX__ || defined __ANDROID__ || \ - defined __GNUC__ -#include - -typedef pthread_mutex_t MutexLock; -typedef pthread_cond_t ConditionVariable; - -static inline void init_lock(MutexLock* lock) { - pthread_mutex_init(lock, NULL); -} - -static inline void acquire_lock(MutexLock* lock) { - pthread_mutex_lock(lock); -} - -static inline void release_lock(MutexLock* lock) { - pthread_mutex_unlock(lock); -} - -static inline void destroy_lock(MutexLock* lock) { - pthread_mutex_destroy(lock); -} - -static inline void init_cond(ConditionVariable* cond) { - pthread_cond_init(cond, NULL); -} - -static inline void signal_cond(ConditionVariable* cond) { - pthread_cond_signal(cond); -} - -static inline void wait_for(ConditionVariable* cond, MutexLock* lock) { - pthread_cond_wait(cond, lock); -} - -static inline void destroy_cond(ConditionVariable* cond) { - pthread_cond_destroy(cond); -} - -static inline void free_mem(void* mem) { - free(mem); -} - -#else - -#error "No locking/condition variable support; Possibly unsupported platform" - -#endif - -typedef struct CallbackResult { - MutexLock lock; - ConditionVariable cond; - int ready; - jobject object; -} CallbackResult; - -typedef struct JniLocks { - MutexLock classLoadingLock; -} JniLocks; - -/// Represents the error when dart-jni layer has already spawned singleton VM. -#define DART_JNI_SINGLETON_EXISTS (-99); - -/// Stores the global state of the JNI. -typedef struct JniContext { - JavaVM* jvm; - jobject classLoader; - jmethodID loadClassMethod; - jobject currentActivity; - jobject appContext; - JniLocks locks; -} JniContext; - -// jniEnv for this thread, used by inline functions in this header, -// therefore declared as extern. -extern thread_local JNIEnv* jniEnv; - -extern JniContext* jni; - -/// Types used by JNI API to distinguish between primitive types. -enum JniType { - booleanType = 0, - byteType = 1, - shortType = 2, - charType = 3, - intType = 4, - longType = 5, - floatType = 6, - doubleType = 7, - objectType = 8, - voidType = 9, -}; - -/// Result type for use by JNI. -/// -/// If [exception] is null, it means the result is valid. -/// It's assumed that the caller knows the expected type in [result]. -typedef struct JniResult { - jvalue value; - jthrowable exception; -} JniResult; - -/// Similar to [JniResult] but for class lookups. -typedef struct JniClassLookupResult { - jclass value; - jthrowable exception; -} JniClassLookupResult; - -/// Similar to [JniResult] but for method/field ID lookups. -typedef struct JniPointerResult { - const void* value; - jthrowable exception; -} JniPointerResult; - -/// JniExceptionDetails holds 2 jstring objects, one is the result of -/// calling `toString` on exception object, other is stack trace; -typedef struct JniExceptionDetails { - jstring message; - jstring stacktrace; -} JniExceptionDetails; - -/// This struct contains functions which wrap method call / field access conveniently along with -/// exception checking. -/// -/// Flutter embedding checks for pending JNI exceptions before an FFI transition, which requires us -/// to check for and clear the exception before returning to dart code, which requires these functions -/// to return result types. -typedef struct JniAccessorsStruct { - JniClassLookupResult (*getClass)(char* internalName); - JniPointerResult (*getFieldID)(jclass cls, char* fieldName, char* signature); - JniPointerResult (*getStaticFieldID)(jclass cls, - char* fieldName, - char* signature); - JniPointerResult (*getMethodID)(jclass cls, - char* methodName, - char* signature); - JniPointerResult (*getStaticMethodID)(jclass cls, - char* methodName, - char* signature); - JniResult (*newObject)(jclass cls, jmethodID ctor, jvalue* args); - JniResult (*newPrimitiveArray)(jsize length, int type); - JniResult (*newObjectArray)(jsize length, - jclass elementClass, - jobject initialElement); - JniResult (*getArrayElement)(jarray array, int index, int type); - JniResult (*callMethod)(jobject obj, - jmethodID methodID, - int callType, - jvalue* args); - JniResult (*callStaticMethod)(jclass cls, - jmethodID methodID, - int callType, - jvalue* args); - JniResult (*getField)(jobject obj, jfieldID fieldID, int callType); - JniResult (*getStaticField)(jclass cls, jfieldID fieldID, int callType); - JniExceptionDetails (*getExceptionDetails)(jthrowable exception); -} JniAccessorsStruct; - -FFI_PLUGIN_EXPORT JniAccessorsStruct* GetAccessors(); - -FFI_PLUGIN_EXPORT JavaVM* GetJavaVM(void); - -FFI_PLUGIN_EXPORT JNIEnv* GetJniEnv(void); - -/// Spawn a JVM with given arguments. -/// -/// Returns JNI_OK on success, and one of the documented JNI error codes on -/// failure. It returns DART_JNI_SINGLETON_EXISTS if an attempt to spawn multiple -/// JVMs is made, even if the underlying API potentially supports multiple VMs. -FFI_PLUGIN_EXPORT int SpawnJvm(JavaVMInitArgs* args); - -/// Returns Application classLoader (on Android), -/// which can be used to load application and platform classes. -/// -/// On other platforms, NULL is returned. -FFI_PLUGIN_EXPORT jobject GetClassLoader(void); - -/// Returns application context on Android. -/// -/// On other platforms, NULL is returned. -FFI_PLUGIN_EXPORT jobject GetApplicationContext(void); - -/// Returns current activity of the app on Android. -FFI_PLUGIN_EXPORT jobject GetCurrentActivity(void); - -static inline void attach_thread() { - if (jniEnv == NULL) { - (*jni->jvm)->AttachCurrentThread(jni->jvm, __ENVP_CAST & jniEnv, NULL); - } -} - -/// Load class into [cls] using platform specific mechanism -static inline void load_class_platform(jclass* cls, const char* name) { -#ifdef __ANDROID__ - jstring className = (*jniEnv)->NewStringUTF(jniEnv, name); - *cls = (*jniEnv)->CallObjectMethod(jniEnv, jni->classLoader, - jni->loadClassMethod, className); - (*jniEnv)->DeleteLocalRef(jniEnv, className); -#else - *cls = (*jniEnv)->FindClass(jniEnv, name); -#endif -} - -static inline void load_class_global_ref(jclass* cls, const char* name) { - if (*cls == NULL) { - jclass tmp = NULL; - acquire_lock(&jni->locks.classLoadingLock); - if (*cls == NULL) { - load_class_platform(&tmp, name); - if (!(*jniEnv)->ExceptionCheck(jniEnv)) { - *cls = (*jniEnv)->NewGlobalRef(jniEnv, tmp); - (*jniEnv)->DeleteLocalRef(jniEnv, tmp); - } - } - release_lock(&jni->locks.classLoadingLock); - } -} - -static inline void load_method(jclass cls, - jmethodID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetMethodID(jniEnv, cls, name, sig); - } -} - -static inline void load_static_method(jclass cls, - jmethodID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetStaticMethodID(jniEnv, cls, name, sig); - } -} - -static inline void load_field(jclass cls, - jfieldID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetFieldID(jniEnv, cls, name, sig); - } -} - -static inline void load_static_field(jclass cls, - jfieldID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetStaticFieldID(jniEnv, cls, name, sig); - } -} - -static inline jobject to_global_ref(jobject ref) { - jobject g = (*jniEnv)->NewGlobalRef(jniEnv, ref); - (*jniEnv)->DeleteLocalRef(jniEnv, ref); - return g; -} - -// These functions are useful for C+Dart bindings, and not required for pure dart bindings. - -FFI_PLUGIN_EXPORT JniContext* GetJniContextPtr(); - -/// For use by jni_gen's generated code -/// don't use these. - -// these 2 fn ptr vars will be defined by generated code library -extern JniContext* (*context_getter)(void); -extern JNIEnv* (*env_getter)(void); - -// this function will be exported by generated code library -// it will set above 2 variables. -FFI_PLUGIN_EXPORT void setJniGetters(struct JniContext* (*cg)(void), - JNIEnv* (*eg)(void)); - -static inline void load_env() { - if (jniEnv == NULL) { - jni = context_getter(); - jniEnv = env_getter(); - } -} - -static inline jthrowable check_exception() { - jthrowable exception = (*jniEnv)->ExceptionOccurred(jniEnv); - if (exception != NULL) (*jniEnv)->ExceptionClear(jniEnv); - if (exception == NULL) return NULL; - return to_global_ref(exception); -} - -static inline JniResult to_global_ref_result(jobject ref) { - JniResult result; - result.exception = check_exception(); - if (result.exception == NULL) { - result.value.l = to_global_ref(ref); - } - return result; -} diff --git a/pkgs/jnigen/example/notification_plugin/src/notification_plugin.c b/pkgs/jnigen/example/notification_plugin/src/notification_plugin.c deleted file mode 100644 index 9f1e577451..0000000000 --- a/pkgs/jnigen/example/notification_plugin/src/notification_plugin.c +++ /dev/null @@ -1,61 +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. - -// Autogenerated by jnigen. DO NOT EDIT! - -#include -#include "dartjni.h" -#include "jni.h" - -thread_local JNIEnv* jniEnv; -JniContext* jni; - -JniContext* (*context_getter)(void); -JNIEnv* (*env_getter)(void); - -void setJniGetters(JniContext* (*cg)(void), JNIEnv* (*eg)(void)) { - context_getter = cg; - env_getter = eg; -} - -// com.example.notification_plugin.Notifications -jclass _c_Notifications = NULL; - -jmethodID _m_Notifications__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult Notifications__new0() { - load_env(); - load_class_global_ref(&_c_Notifications, - "com/example/notification_plugin/Notifications"); - if (_c_Notifications == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Notifications, &_m_Notifications__new0, "", "()V"); - if (_m_Notifications__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_Notifications, _m_Notifications__new0); - return to_global_ref_result(_result); -} - -jmethodID _m_Notifications__showNotification = NULL; -FFI_PLUGIN_EXPORT -JniResult Notifications__showNotification(jobject context, - int32_t notificationID, - jobject title, - jobject text) { - load_env(); - load_class_global_ref(&_c_Notifications, - "com/example/notification_plugin/Notifications"); - if (_c_Notifications == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_Notifications, &_m_Notifications__showNotification, "showNotification", - "(Landroid/content/Context;ILjava/lang/String;Ljava/lang/String;)V"); - if (_m_Notifications__showNotification == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallStaticVoidMethod(jniEnv, _c_Notifications, - _m_Notifications__showNotification, context, - notificationID, title, text); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} diff --git a/pkgs/jnigen/example/pdfbox_plugin/android/build.gradle b/pkgs/jnigen/example/pdfbox_plugin/android/build.gradle index 5042ecef5c..6ea97b8327 100644 --- a/pkgs/jnigen/example/pdfbox_plugin/android/build.gradle +++ b/pkgs/jnigen/example/pdfbox_plugin/android/build.gradle @@ -21,21 +21,6 @@ android { // the version in their app and to download a newer version of the NDK. ndkVersion "21.1.6352462" - // Invoke the shared CMake build with the Android Gradle Plugin. - externalNativeBuild { - cmake { - path "../src/CMakeLists.txt" - - // The default CMake version for the Android Gradle Plugin is 3.10.2. - // https://developer.android.com/studio/projects/install-ndk#vanilla_cmake - // - // The Flutter tooling requires that developers have CMake 3.10 or later - // installed. You should not increase this version, as doing so will cause - // the plugin to fail to compile for some customers of the plugin. - // version "3.10.2" - } - } - compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 diff --git a/pkgs/jnigen/example/pdfbox_plugin/jnigen.yaml b/pkgs/jnigen/example/pdfbox_plugin/jnigen.yaml index fa24d85011..33b3ef87c4 100644 --- a/pkgs/jnigen/example/pdfbox_plugin/jnigen.yaml +++ b/pkgs/jnigen/example/pdfbox_plugin/jnigen.yaml @@ -20,18 +20,6 @@ preamble: | ## Output configuration output: - c: - ## Path to write generated C bindings - path: 'src/' - ## C files can be stored in a different sub-directory inside root. - ## - ## We have a guideline to keep all generated code in third_party/ since the - ## original project's license applies to generated code. So we specify - ## third_party/ as c_subdir while keeping generated CMakeLists.txt in src/. - subdir: 'third_party/' - ## Name of the generated library. This is a required parameter, and used - ## for the name of the shared library and CMake configuration. - library_name: 'pdfbox_plugin' dart: ## Generated dart bindings will be written to this path. They will follow ## the same folder hierarchy as the original Java code. diff --git a/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/_init.dart b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/_init.dart deleted file mode 100644 index 57aea60db0..0000000000 --- a/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/_init.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Generated from Apache PDFBox library which is licensed under the Apache License 2.0. -// The following copyright from the original authors applies. -// -// Licensed to the Apache Software Foundation (ASF) under one or more -// contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. -// The ASF licenses this file to You under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with -// the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; - -// Auto-generated initialization code. - -final ffi.Pointer Function(String sym) jniLookup = - ProtectedJniExtensions.initGeneratedLibrary("pdfbox_plugin"); diff --git a/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocument.dart b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocument.dart index 76f8c59d04..e664b41ac9 100644 --- a/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocument.dart +++ b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocument.dart @@ -42,7 +42,6 @@ import "package:jni/internal_helpers_for_jnigen.dart"; import "package:jni/jni.dart" as jni; import "PDDocumentInformation.dart" as pddocumentinformation_; -import "../../../../_init.dart"; /// from: org.apache.pdfbox.pdmodel.PDDocument /// @@ -57,11 +56,26 @@ class PDDocument extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); + static final _class = + jni.JClass.forName(r"org/apache/pdfbox/pdmodel/PDDocument"); + /// The type which includes information such as the signature of this class. static const type = $PDDocumentType(); - static final _new0 = jniLookup>( - "PDDocument__new0") - .asFunction(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public void () /// The returned object must be released after use, by calling the [release] method. @@ -69,14 +83,25 @@ class PDDocument extends jni.JObject { /// Creates an empty PDF document. /// You need to add at least one page for the document to be valid. factory PDDocument() { - return PDDocument.fromReference(_new0().reference); + return PDDocument.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } - static final _new1 = jniLookup< - ffi - .NativeFunction)>>( - "PDDocument__new1") - .asFunction)>(); + static final _id_new1 = _class.constructorId( + r"(Lorg/apache/pdfbox/io/MemoryUsageSetting;)V", + ); + + static final _new1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void (org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting) /// The returned object must be released after use, by calling the [release] method. @@ -87,15 +112,25 @@ class PDDocument extends jni.JObject { factory PDDocument.new1( jni.JObject memUsageSetting, ) { - return PDDocument.fromReference( - _new1(memUsageSetting.reference.pointer).reference); + return PDDocument.fromReference(_new1(_class.reference.pointer, + _id_new1 as jni.JMethodIDPtr, memUsageSetting.reference.pointer) + .reference); } - static final _new2 = jniLookup< - ffi - .NativeFunction)>>( - "PDDocument__new2") - .asFunction)>(); + static final _id_new2 = _class.constructorId( + r"(Lorg/apache/pdfbox/cos/COSDocument;)V", + ); + + static final _new2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void (org.apache.pdfbox.cos.COSDocument doc) /// The returned object must be released after use, by calling the [release] method. @@ -105,15 +140,27 @@ class PDDocument extends jni.JObject { factory PDDocument.new2( jni.JObject doc, ) { - return PDDocument.fromReference(_new2(doc.reference.pointer).reference); + return PDDocument.fromReference(_new2(_class.reference.pointer, + _id_new2 as jni.JMethodIDPtr, doc.reference.pointer) + .reference); } - static final _new3 = jniLookup< + static final _id_new3 = _class.constructorId( + r"(Lorg/apache/pdfbox/cos/COSDocument;Lorg/apache/pdfbox/io/RandomAccessRead;)V", + ); + + static final _new3 = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocument__new3") + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_NewObject") .asFunction< - jni.JniResult Function( + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); /// from: public void (org.apache.pdfbox.cos.COSDocument doc, org.apache.pdfbox.io.RandomAccessRead source) @@ -126,18 +173,35 @@ class PDDocument extends jni.JObject { jni.JObject doc, jni.JObject source, ) { - return PDDocument.fromReference( - _new3(doc.reference.pointer, source.reference.pointer).reference); + return PDDocument.fromReference(_new3( + _class.reference.pointer, + _id_new3 as jni.JMethodIDPtr, + doc.reference.pointer, + source.reference.pointer) + .reference); } - static final _new4 = jniLookup< + static final _id_new4 = _class.constructorId( + r"(Lorg/apache/pdfbox/cos/COSDocument;Lorg/apache/pdfbox/io/RandomAccessRead;Lorg/apache/pdfbox/pdmodel/encryption/AccessPermission;)V", + ); + + static final _new4 = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("PDDocument__new4") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_NewObject") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); /// from: public void (org.apache.pdfbox.cos.COSDocument doc, org.apache.pdfbox.io.RandomAccessRead source, org.apache.pdfbox.pdmodel.encryption.AccessPermission permission) @@ -152,18 +216,30 @@ class PDDocument extends jni.JObject { jni.JObject source, jni.JObject permission, ) { - return PDDocument.fromReference(_new4(doc.reference.pointer, - source.reference.pointer, permission.reference.pointer) + return PDDocument.fromReference(_new4( + _class.reference.pointer, + _id_new4 as jni.JMethodIDPtr, + doc.reference.pointer, + source.reference.pointer, + permission.reference.pointer) .reference); } - static final _addPage = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocument__addPage") + static final _id_addPage = _class.instanceMethodId( + r"addPage", + r"(Lorg/apache/pdfbox/pdmodel/PDPage;)V", + ); + + static final _addPage = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void addPage(org.apache.pdfbox.pdmodel.PDPage page) /// @@ -173,16 +249,26 @@ class PDDocument extends jni.JObject { void addPage( jni.JObject page, ) { - _addPage(reference.pointer, page.reference.pointer).check(); + _addPage(reference.pointer, _id_addPage as jni.JMethodIDPtr, + page.reference.pointer) + .check(); } - static final _addSignature = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocument__addSignature") + static final _id_addSignature = _class.instanceMethodId( + r"addSignature", + r"(Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature;)V", + ); + + static final _addSignature = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void addSignature(org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature sigObject) /// @@ -199,18 +285,29 @@ class PDDocument extends jni.JObject { void addSignature( jni.JObject sigObject, ) { - _addSignature(reference.pointer, sigObject.reference.pointer).check(); + _addSignature(reference.pointer, _id_addSignature as jni.JMethodIDPtr, + sigObject.reference.pointer) + .check(); } - static final _addSignature1 = jniLookup< + static final _id_addSignature1 = _class.instanceMethodId( + r"addSignature", + r"(Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature;Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureOptions;)V", + ); + + static final _addSignature1 = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, + jni.JThrowablePtr Function( ffi.Pointer, - ffi.Pointer)>>("PDDocument__addSignature1") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); /// from: public void addSignature(org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature sigObject, org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureOptions options) /// @@ -229,20 +326,29 @@ class PDDocument extends jni.JObject { jni.JObject sigObject, jni.JObject options, ) { - _addSignature1(reference.pointer, sigObject.reference.pointer, - options.reference.pointer) + _addSignature1(reference.pointer, _id_addSignature1 as jni.JMethodIDPtr, + sigObject.reference.pointer, options.reference.pointer) .check(); } - static final _addSignature2 = jniLookup< + static final _id_addSignature2 = _class.instanceMethodId( + r"addSignature", + r"(Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature;Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureInterface;)V", + ); + + static final _addSignature2 = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, + jni.JThrowablePtr Function( ffi.Pointer, - ffi.Pointer)>>("PDDocument__addSignature2") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); /// from: public void addSignature(org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature sigObject, org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface signatureInterface) /// @@ -260,21 +366,34 @@ class PDDocument extends jni.JObject { jni.JObject sigObject, jni.JObject signatureInterface, ) { - _addSignature2(reference.pointer, sigObject.reference.pointer, - signatureInterface.reference.pointer) + _addSignature2(reference.pointer, _id_addSignature2 as jni.JMethodIDPtr, + sigObject.reference.pointer, signatureInterface.reference.pointer) .check(); } - static final _addSignature3 = jniLookup< + static final _id_addSignature3 = _class.instanceMethodId( + r"addSignature", + r"(Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature;Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureInterface;Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureOptions;)V", + ); + + static final _addSignature3 = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function( + jni.JThrowablePtr Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("PDDocument__addSignature3") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); /// from: public void addSignature(org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature sigObject, org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface signatureInterface, org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureOptions options) /// @@ -296,21 +415,38 @@ class PDDocument extends jni.JObject { jni.JObject signatureInterface, jni.JObject options, ) { - _addSignature3(reference.pointer, sigObject.reference.pointer, - signatureInterface.reference.pointer, options.reference.pointer) + _addSignature3( + reference.pointer, + _id_addSignature3 as jni.JMethodIDPtr, + sigObject.reference.pointer, + signatureInterface.reference.pointer, + options.reference.pointer) .check(); } - static final _addSignatureField = jniLookup< + static final _id_addSignatureField = _class.instanceMethodId( + r"addSignatureField", + r"(Ljava/util/List;Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureInterface;Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureOptions;)V", + ); + + static final _addSignatureField = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Pointer, + jni.JThrowablePtr Function( ffi.Pointer, - ffi.Pointer)>>("PDDocument__addSignatureField") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); /// from: public void addSignatureField(java.util.List sigFields, org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface signatureInterface, org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureOptions options) /// @@ -327,18 +463,30 @@ class PDDocument extends jni.JObject { jni.JObject signatureInterface, jni.JObject options, ) { - _addSignatureField(reference.pointer, sigFields.reference.pointer, - signatureInterface.reference.pointer, options.reference.pointer) + _addSignatureField( + reference.pointer, + _id_addSignatureField as jni.JMethodIDPtr, + sigFields.reference.pointer, + signatureInterface.reference.pointer, + options.reference.pointer) .check(); } - static final _removePage = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocument__removePage") + static final _id_removePage = _class.instanceMethodId( + r"removePage", + r"(Lorg/apache/pdfbox/pdmodel/PDPage;)V", + ); + + static final _removePage = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void removePage(org.apache.pdfbox.pdmodel.PDPage page) /// @@ -347,14 +495,25 @@ class PDDocument extends jni.JObject { void removePage( jni.JObject page, ) { - _removePage(reference.pointer, page.reference.pointer).check(); + _removePage(reference.pointer, _id_removePage as jni.JMethodIDPtr, + page.reference.pointer) + .check(); } - static final _removePage1 = jniLookup< + static final _id_removePage1 = _class.instanceMethodId( + r"removePage", + r"(I)V", + ); + + static final _removePage1 = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Int32)>>("PDDocument__removePage1") - .asFunction, int)>(); + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); /// from: public void removePage(int pageNumber) /// @@ -363,16 +522,26 @@ class PDDocument extends jni.JObject { void removePage1( int pageNumber, ) { - _removePage1(reference.pointer, pageNumber).check(); + _removePage1( + reference.pointer, _id_removePage1 as jni.JMethodIDPtr, pageNumber) + .check(); } - static final _importPage = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocument__importPage") + static final _id_importPage = _class.instanceMethodId( + r"importPage", + r"(Lorg/apache/pdfbox/pdmodel/PDPage;)Lorg/apache/pdfbox/pdmodel/PDPage;", + ); + + static final _importPage = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public org.apache.pdfbox.pdmodel.PDPage importPage(org.apache.pdfbox.pdmodel.PDPage page) /// The returned object must be released after use, by calling the [release] method. @@ -401,15 +570,27 @@ class PDDocument extends jni.JObject { jni.JObject importPage( jni.JObject page, ) { - return _importPage(reference.pointer, page.reference.pointer) + return _importPage(reference.pointer, _id_importPage as jni.JMethodIDPtr, + page.reference.pointer) .object(const jni.JObjectType()); } - static final _getDocument = jniLookup< - ffi - .NativeFunction)>>( - "PDDocument__getDocument") - .asFunction)>(); + static final _id_getDocument = _class.instanceMethodId( + r"getDocument", + r"()Lorg/apache/pdfbox/cos/COSDocument;", + ); + + static final _getDocument = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public org.apache.pdfbox.cos.COSDocument getDocument() /// The returned object must be released after use, by calling the [release] method. @@ -417,14 +598,26 @@ class PDDocument extends jni.JObject { /// This will get the low level document. ///@return The document that this layer sits on top of. jni.JObject getDocument() { - return _getDocument(reference.pointer).object(const jni.JObjectType()); + return _getDocument(reference.pointer, _id_getDocument as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } - static final _getDocumentInformation = jniLookup< - ffi - .NativeFunction)>>( - "PDDocument__getDocumentInformation") - .asFunction)>(); + static final _id_getDocumentInformation = _class.instanceMethodId( + r"getDocumentInformation", + r"()Lorg/apache/pdfbox/pdmodel/PDDocumentInformation;", + ); + + static final _getDocumentInformation = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public org.apache.pdfbox.pdmodel.PDDocumentInformation getDocumentInformation() /// The returned object must be released after use, by calling the [release] method. @@ -437,17 +630,26 @@ class PDDocument extends jni.JObject { /// PDDocumentCatalog\#getMetadata(). ///@return The documents /Info dictionary, never null. pddocumentinformation_.PDDocumentInformation getDocumentInformation() { - return _getDocumentInformation(reference.pointer) + return _getDocumentInformation( + reference.pointer, _id_getDocumentInformation as jni.JMethodIDPtr) .object(const pddocumentinformation_.$PDDocumentInformationType()); } - static final _setDocumentInformation = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocument__setDocumentInformation") + static final _id_setDocumentInformation = _class.instanceMethodId( + r"setDocumentInformation", + r"(Lorg/apache/pdfbox/pdmodel/PDDocumentInformation;)V", + ); + + static final _setDocumentInformation = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setDocumentInformation(org.apache.pdfbox.pdmodel.PDDocumentInformation info) /// @@ -460,14 +662,29 @@ class PDDocument extends jni.JObject { void setDocumentInformation( pddocumentinformation_.PDDocumentInformation info, ) { - _setDocumentInformation(reference.pointer, info.reference.pointer).check(); + _setDocumentInformation( + reference.pointer, + _id_setDocumentInformation as jni.JMethodIDPtr, + info.reference.pointer) + .check(); } - static final _getDocumentCatalog = jniLookup< - ffi - .NativeFunction)>>( - "PDDocument__getDocumentCatalog") - .asFunction)>(); + static final _id_getDocumentCatalog = _class.instanceMethodId( + r"getDocumentCatalog", + r"()Lorg/apache/pdfbox/pdmodel/PDDocumentCatalog;", + ); + + static final _getDocumentCatalog = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public org.apache.pdfbox.pdmodel.PDDocumentCatalog getDocumentCatalog() /// The returned object must be released after use, by calling the [release] method. @@ -475,29 +692,53 @@ class PDDocument extends jni.JObject { /// This will get the document CATALOG. This is guaranteed to not return null. ///@return The documents /Root dictionary jni.JObject getDocumentCatalog() { - return _getDocumentCatalog(reference.pointer) + return _getDocumentCatalog( + reference.pointer, _id_getDocumentCatalog as jni.JMethodIDPtr) .object(const jni.JObjectType()); } - static final _isEncrypted = jniLookup< - ffi - .NativeFunction)>>( - "PDDocument__isEncrypted") - .asFunction)>(); + static final _id_isEncrypted = _class.instanceMethodId( + r"isEncrypted", + r"()Z", + ); + + static final _isEncrypted = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public boolean isEncrypted() /// /// This will tell if this document is encrypted or not. ///@return true If this document is encrypted. bool isEncrypted() { - return _isEncrypted(reference.pointer).boolean; + return _isEncrypted(reference.pointer, _id_isEncrypted as jni.JMethodIDPtr) + .boolean; } - static final _getEncryption = jniLookup< - ffi - .NativeFunction)>>( - "PDDocument__getEncryption") - .asFunction)>(); + static final _id_getEncryption = _class.instanceMethodId( + r"getEncryption", + r"()Lorg/apache/pdfbox/pdmodel/encryption/PDEncryption;", + ); + + static final _getEncryption = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public org.apache.pdfbox.pdmodel.encryption.PDEncryption getEncryption() /// The returned object must be released after use, by calling the [release] method. @@ -508,17 +749,26 @@ class PDDocument extends jni.JObject { /// PDStandardEncryption object. ///@return The encryption dictionary(most likely a PDStandardEncryption object) jni.JObject getEncryption() { - return _getEncryption(reference.pointer).object(const jni.JObjectType()); + return _getEncryption( + reference.pointer, _id_getEncryption as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } - static final _setEncryptionDictionary = jniLookup< + static final _id_setEncryptionDictionary = _class.instanceMethodId( + r"setEncryptionDictionary", + r"(Lorg/apache/pdfbox/pdmodel/encryption/PDEncryption;)V", + ); + + static final _setEncryptionDictionary = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "PDDocument__setEncryptionDictionary") + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setEncryptionDictionary(org.apache.pdfbox.pdmodel.encryption.PDEncryption encryption) /// @@ -528,15 +778,29 @@ class PDDocument extends jni.JObject { void setEncryptionDictionary( jni.JObject encryption, ) { - _setEncryptionDictionary(reference.pointer, encryption.reference.pointer) + _setEncryptionDictionary( + reference.pointer, + _id_setEncryptionDictionary as jni.JMethodIDPtr, + encryption.reference.pointer) .check(); } - static final _getLastSignatureDictionary = jniLookup< - ffi - .NativeFunction)>>( - "PDDocument__getLastSignatureDictionary") - .asFunction)>(); + static final _id_getLastSignatureDictionary = _class.instanceMethodId( + r"getLastSignatureDictionary", + r"()Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature;", + ); + + static final _getLastSignatureDictionary = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature getLastSignatureDictionary() /// The returned object must be released after use, by calling the [release] method. @@ -546,15 +810,27 @@ class PDDocument extends jni.JObject { ///@return the last signature as PDSignatureField. ///@throws IOException if no document catalog can be found. jni.JObject getLastSignatureDictionary() { - return _getLastSignatureDictionary(reference.pointer) + return _getLastSignatureDictionary(reference.pointer, + _id_getLastSignatureDictionary as jni.JMethodIDPtr) .object(const jni.JObjectType()); } - static final _getSignatureFields = jniLookup< - ffi - .NativeFunction)>>( - "PDDocument__getSignatureFields") - .asFunction)>(); + static final _id_getSignatureFields = _class.instanceMethodId( + r"getSignatureFields", + r"()Ljava/util/List;", + ); + + static final _getSignatureFields = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.util.List getSignatureFields() /// The returned object must be released after use, by calling the [release] method. @@ -563,15 +839,27 @@ class PDDocument extends jni.JObject { ///@return a List of PDSignatureFields ///@throws IOException if no document catalog can be found. jni.JList getSignatureFields() { - return _getSignatureFields(reference.pointer) + return _getSignatureFields( + reference.pointer, _id_getSignatureFields as jni.JMethodIDPtr) .object(const jni.JListType(jni.JObjectType())); } - static final _getSignatureDictionaries = jniLookup< - ffi - .NativeFunction)>>( - "PDDocument__getSignatureDictionaries") - .asFunction)>(); + static final _id_getSignatureDictionaries = _class.instanceMethodId( + r"getSignatureDictionaries", + r"()Ljava/util/List;", + ); + + static final _getSignatureDictionaries = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.util.List getSignatureDictionaries() /// The returned object must be released after use, by calling the [release] method. @@ -580,18 +868,26 @@ class PDDocument extends jni.JObject { ///@return a List of PDSignatureFields ///@throws IOException if no document catalog can be found. jni.JList getSignatureDictionaries() { - return _getSignatureDictionaries(reference.pointer) + return _getSignatureDictionaries( + reference.pointer, _id_getSignatureDictionaries as jni.JMethodIDPtr) .object(const jni.JListType(jni.JObjectType())); } - static final _registerTrueTypeFontForClosing = jniLookup< + static final _id_registerTrueTypeFontForClosing = _class.instanceMethodId( + r"registerTrueTypeFontForClosing", + r"(Lorg/apache/fontbox/ttf/TrueTypeFont;)V", + ); + + static final _registerTrueTypeFontForClosing = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "PDDocument__registerTrueTypeFontForClosing") + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void registerTrueTypeFontForClosing(org.apache.fontbox.ttf.TrueTypeFont ttf) /// @@ -602,15 +898,28 @@ class PDDocument extends jni.JObject { void registerTrueTypeFontForClosing( jni.JObject ttf, ) { - _registerTrueTypeFontForClosing(reference.pointer, ttf.reference.pointer) + _registerTrueTypeFontForClosing( + reference.pointer, + _id_registerTrueTypeFontForClosing as jni.JMethodIDPtr, + ttf.reference.pointer) .check(); } - static final _load = jniLookup< - ffi - .NativeFunction)>>( - "PDDocument__load") - .asFunction)>(); + static final _id_load = _class.staticMethodId( + r"load", + r"(Ljava/io/File;)Lorg/apache/pdfbox/pdmodel/PDDocument;", + ); + + static final _load = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.File file) /// The returned object must be released after use, by calling the [release] method. @@ -623,15 +932,28 @@ class PDDocument extends jni.JObject { static PDDocument load( jni.JObject file, ) { - return _load(file.reference.pointer).object(const $PDDocumentType()); + return _load(_class.reference.pointer, _id_load as jni.JMethodIDPtr, + file.reference.pointer) + .object(const $PDDocumentType()); } - static final _load1 = jniLookup< + static final _id_load1 = _class.staticMethodId( + r"load", + r"(Ljava/io/File;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/apache/pdfbox/pdmodel/PDDocument;", + ); + + static final _load1 = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocument__load1") + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") .asFunction< - jni.JniResult Function( + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.File file, org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting) @@ -647,16 +969,28 @@ class PDDocument extends jni.JObject { jni.JObject file, jni.JObject memUsageSetting, ) { - return _load1(file.reference.pointer, memUsageSetting.reference.pointer) + return _load1(_class.reference.pointer, _id_load1 as jni.JMethodIDPtr, + file.reference.pointer, memUsageSetting.reference.pointer) .object(const $PDDocumentType()); } - static final _load2 = jniLookup< + static final _id_load2 = _class.staticMethodId( + r"load", + r"(Ljava/io/File;Ljava/lang/String;)Lorg/apache/pdfbox/pdmodel/PDDocument;", + ); + + static final _load2 = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocument__load2") + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") .asFunction< - jni.JniResult Function( + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.File file, java.lang.String password) @@ -672,18 +1006,33 @@ class PDDocument extends jni.JObject { jni.JObject file, jni.JString password, ) { - return _load2(file.reference.pointer, password.reference.pointer) + return _load2(_class.reference.pointer, _id_load2 as jni.JMethodIDPtr, + file.reference.pointer, password.reference.pointer) .object(const $PDDocumentType()); } - static final _load3 = jniLookup< + static final _id_load3 = _class.staticMethodId( + r"load", + r"(Ljava/io/File;Ljava/lang/String;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/apache/pdfbox/pdmodel/PDDocument;", + ); + + static final _load3 = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("PDDocument__load3") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.File file, java.lang.String password, org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting) @@ -701,21 +1050,40 @@ class PDDocument extends jni.JObject { jni.JString password, jni.JObject memUsageSetting, ) { - return _load3(file.reference.pointer, password.reference.pointer, + return _load3( + _class.reference.pointer, + _id_load3 as jni.JMethodIDPtr, + file.reference.pointer, + password.reference.pointer, memUsageSetting.reference.pointer) .object(const $PDDocumentType()); } - static final _load4 = jniLookup< + static final _id_load4 = _class.staticMethodId( + r"load", + r"(Ljava/io/File;Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/String;)Lorg/apache/pdfbox/pdmodel/PDDocument;", + ); + + static final _load4 = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("PDDocument__load4") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.File file, java.lang.String password, java.io.InputStream keyStore, java.lang.String alias) /// The returned object must be released after use, by calling the [release] method. @@ -733,21 +1101,38 @@ class PDDocument extends jni.JObject { jni.JObject keyStore, jni.JString alias, ) { - return _load4(file.reference.pointer, password.reference.pointer, - keyStore.reference.pointer, alias.reference.pointer) + return _load4( + _class.reference.pointer, + _id_load4 as jni.JMethodIDPtr, + file.reference.pointer, + password.reference.pointer, + keyStore.reference.pointer, + alias.reference.pointer) .object(const $PDDocumentType()); } - static final _load5 = jniLookup< + static final _id_load5 = _class.staticMethodId( + r"load", + r"(Ljava/io/File;Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/String;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/apache/pdfbox/pdmodel/PDDocument;", + ); + + static final _load5 = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("PDDocument__load5") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") .asFunction< jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -773,6 +1158,8 @@ class PDDocument extends jni.JObject { jni.JObject memUsageSetting, ) { return _load5( + _class.reference.pointer, + _id_load5 as jni.JMethodIDPtr, file.reference.pointer, password.reference.pointer, keyStore.reference.pointer, @@ -781,11 +1168,21 @@ class PDDocument extends jni.JObject { .object(const $PDDocumentType()); } - static final _load6 = jniLookup< - ffi - .NativeFunction)>>( - "PDDocument__load6") - .asFunction)>(); + static final _id_load6 = _class.staticMethodId( + r"load", + r"(Ljava/io/InputStream;)Lorg/apache/pdfbox/pdmodel/PDDocument;", + ); + + static final _load6 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.InputStream input) /// The returned object must be released after use, by calling the [release] method. @@ -799,15 +1196,28 @@ class PDDocument extends jni.JObject { static PDDocument load6( jni.JObject input, ) { - return _load6(input.reference.pointer).object(const $PDDocumentType()); + return _load6(_class.reference.pointer, _id_load6 as jni.JMethodIDPtr, + input.reference.pointer) + .object(const $PDDocumentType()); } - static final _load7 = jniLookup< + static final _id_load7 = _class.staticMethodId( + r"load", + r"(Ljava/io/InputStream;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/apache/pdfbox/pdmodel/PDDocument;", + ); + + static final _load7 = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocument__load7") + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") .asFunction< - jni.JniResult Function( + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.InputStream input, org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting) @@ -824,16 +1234,28 @@ class PDDocument extends jni.JObject { jni.JObject input, jni.JObject memUsageSetting, ) { - return _load7(input.reference.pointer, memUsageSetting.reference.pointer) + return _load7(_class.reference.pointer, _id_load7 as jni.JMethodIDPtr, + input.reference.pointer, memUsageSetting.reference.pointer) .object(const $PDDocumentType()); } - static final _load8 = jniLookup< + static final _id_load8 = _class.staticMethodId( + r"load", + r"(Ljava/io/InputStream;Ljava/lang/String;)Lorg/apache/pdfbox/pdmodel/PDDocument;", + ); + + static final _load8 = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocument__load8") + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") .asFunction< - jni.JniResult Function( + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.InputStream input, java.lang.String password) @@ -850,20 +1272,36 @@ class PDDocument extends jni.JObject { jni.JObject input, jni.JString password, ) { - return _load8(input.reference.pointer, password.reference.pointer) + return _load8(_class.reference.pointer, _id_load8 as jni.JMethodIDPtr, + input.reference.pointer, password.reference.pointer) .object(const $PDDocumentType()); } - static final _load9 = jniLookup< + static final _id_load9 = _class.staticMethodId( + r"load", + r"(Ljava/io/InputStream;Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/String;)Lorg/apache/pdfbox/pdmodel/PDDocument;", + ); + + static final _load9 = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("PDDocument__load9") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.InputStream input, java.lang.String password, java.io.InputStream keyStore, java.lang.String alias) /// The returned object must be released after use, by calling the [release] method. @@ -882,19 +1320,38 @@ class PDDocument extends jni.JObject { jni.JObject keyStore, jni.JString alias, ) { - return _load9(input.reference.pointer, password.reference.pointer, - keyStore.reference.pointer, alias.reference.pointer) + return _load9( + _class.reference.pointer, + _id_load9 as jni.JMethodIDPtr, + input.reference.pointer, + password.reference.pointer, + keyStore.reference.pointer, + alias.reference.pointer) .object(const $PDDocumentType()); } - static final _load10 = jniLookup< + static final _id_load10 = _class.staticMethodId( + r"load", + r"(Ljava/io/InputStream;Ljava/lang/String;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/apache/pdfbox/pdmodel/PDDocument;", + ); + + static final _load10 = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("PDDocument__load10") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.InputStream input, java.lang.String password, org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting) @@ -913,21 +1370,37 @@ class PDDocument extends jni.JObject { jni.JString password, jni.JObject memUsageSetting, ) { - return _load10(input.reference.pointer, password.reference.pointer, + return _load10( + _class.reference.pointer, + _id_load10 as jni.JMethodIDPtr, + input.reference.pointer, + password.reference.pointer, memUsageSetting.reference.pointer) .object(const $PDDocumentType()); } - static final _load11 = jniLookup< + static final _id_load11 = _class.staticMethodId( + r"load", + r"(Ljava/io/InputStream;Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/String;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/apache/pdfbox/pdmodel/PDDocument;", + ); + + static final _load11 = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("PDDocument__load11") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") .asFunction< jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -955,6 +1428,8 @@ class PDDocument extends jni.JObject { jni.JObject memUsageSetting, ) { return _load11( + _class.reference.pointer, + _id_load11 as jni.JMethodIDPtr, input.reference.pointer, password.reference.pointer, keyStore.reference.pointer, @@ -963,11 +1438,21 @@ class PDDocument extends jni.JObject { .object(const $PDDocumentType()); } - static final _load12 = jniLookup< - ffi - .NativeFunction)>>( - "PDDocument__load12") - .asFunction)>(); + static final _id_load12 = _class.staticMethodId( + r"load", + r"([B)Lorg/apache/pdfbox/pdmodel/PDDocument;", + ); + + static final _load12 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(byte[] input) /// The returned object must be released after use, by calling the [release] method. @@ -980,15 +1465,28 @@ class PDDocument extends jni.JObject { static PDDocument load12( jni.JArray input, ) { - return _load12(input.reference.pointer).object(const $PDDocumentType()); + return _load12(_class.reference.pointer, _id_load12 as jni.JMethodIDPtr, + input.reference.pointer) + .object(const $PDDocumentType()); } - static final _load13 = jniLookup< + static final _id_load13 = _class.staticMethodId( + r"load", + r"([BLjava/lang/String;)Lorg/apache/pdfbox/pdmodel/PDDocument;", + ); + + static final _load13 = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocument__load13") + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") .asFunction< - jni.JniResult Function( + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(byte[] input, java.lang.String password) @@ -1004,20 +1502,36 @@ class PDDocument extends jni.JObject { jni.JArray input, jni.JString password, ) { - return _load13(input.reference.pointer, password.reference.pointer) + return _load13(_class.reference.pointer, _id_load13 as jni.JMethodIDPtr, + input.reference.pointer, password.reference.pointer) .object(const $PDDocumentType()); } - static final _load14 = jniLookup< + static final _id_load14 = _class.staticMethodId( + r"load", + r"([BLjava/lang/String;Ljava/io/InputStream;Ljava/lang/String;)Lorg/apache/pdfbox/pdmodel/PDDocument;", + ); + + static final _load14 = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("PDDocument__load14") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(byte[] input, java.lang.String password, java.io.InputStream keyStore, java.lang.String alias) /// The returned object must be released after use, by calling the [release] method. @@ -1036,21 +1550,38 @@ class PDDocument extends jni.JObject { jni.JObject keyStore, jni.JString alias, ) { - return _load14(input.reference.pointer, password.reference.pointer, - keyStore.reference.pointer, alias.reference.pointer) + return _load14( + _class.reference.pointer, + _id_load14 as jni.JMethodIDPtr, + input.reference.pointer, + password.reference.pointer, + keyStore.reference.pointer, + alias.reference.pointer) .object(const $PDDocumentType()); } - static final _load15 = jniLookup< + static final _id_load15 = _class.staticMethodId( + r"load", + r"([BLjava/lang/String;Ljava/io/InputStream;Ljava/lang/String;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/apache/pdfbox/pdmodel/PDDocument;", + ); + + static final _load15 = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("PDDocument__load15") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") .asFunction< jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -1077,6 +1608,8 @@ class PDDocument extends jni.JObject { jni.JObject memUsageSetting, ) { return _load15( + _class.reference.pointer, + _id_load15 as jni.JMethodIDPtr, input.reference.pointer, password.reference.pointer, keyStore.reference.pointer, @@ -1085,13 +1618,21 @@ class PDDocument extends jni.JObject { .object(const $PDDocumentType()); } - static final _save = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocument__save") + static final _id_save = _class.instanceMethodId( + r"save", + r"(Ljava/lang/String;)V", + ); + + static final _save = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void save(java.lang.String fileName) /// @@ -1105,16 +1646,26 @@ class PDDocument extends jni.JObject { void save( jni.JString fileName, ) { - _save(reference.pointer, fileName.reference.pointer).check(); + _save(reference.pointer, _id_save as jni.JMethodIDPtr, + fileName.reference.pointer) + .check(); } - static final _save1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocument__save1") + static final _id_save1 = _class.instanceMethodId( + r"save", + r"(Ljava/io/File;)V", + ); + + static final _save1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void save(java.io.File file) /// @@ -1128,16 +1679,26 @@ class PDDocument extends jni.JObject { void save1( jni.JObject file, ) { - _save1(reference.pointer, file.reference.pointer).check(); + _save1(reference.pointer, _id_save1 as jni.JMethodIDPtr, + file.reference.pointer) + .check(); } - static final _save2 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocument__save2") + static final _id_save2 = _class.instanceMethodId( + r"save", + r"(Ljava/io/OutputStream;)V", + ); + + static final _save2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void save(java.io.OutputStream output) /// @@ -1152,16 +1713,26 @@ class PDDocument extends jni.JObject { void save2( jni.JObject output, ) { - _save2(reference.pointer, output.reference.pointer).check(); + _save2(reference.pointer, _id_save2 as jni.JMethodIDPtr, + output.reference.pointer) + .check(); } - static final _saveIncremental = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocument__saveIncremental") + static final _id_saveIncremental = _class.instanceMethodId( + r"saveIncremental", + r"(Ljava/io/OutputStream;)V", + ); + + static final _saveIncremental = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void saveIncremental(java.io.OutputStream output) /// @@ -1181,18 +1752,29 @@ class PDDocument extends jni.JObject { void saveIncremental( jni.JObject output, ) { - _saveIncremental(reference.pointer, output.reference.pointer).check(); + _saveIncremental(reference.pointer, _id_saveIncremental as jni.JMethodIDPtr, + output.reference.pointer) + .check(); } - static final _saveIncremental1 = jniLookup< + static final _id_saveIncremental1 = _class.instanceMethodId( + r"saveIncremental", + r"(Ljava/io/OutputStream;Ljava/util/Set;)V", + ); + + static final _saveIncremental1 = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, + jni.JThrowablePtr Function( ffi.Pointer, - ffi.Pointer)>>("PDDocument__saveIncremental1") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); /// from: public void saveIncremental(java.io.OutputStream output, java.util.Set objectsToWrite) /// @@ -1218,19 +1800,30 @@ class PDDocument extends jni.JObject { jni.JObject output, jni.JSet objectsToWrite, ) { - _saveIncremental1(reference.pointer, output.reference.pointer, + _saveIncremental1( + reference.pointer, + _id_saveIncremental1 as jni.JMethodIDPtr, + output.reference.pointer, objectsToWrite.reference.pointer) .check(); } - static final _saveIncrementalForExternalSigning = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "PDDocument__saveIncrementalForExternalSigning") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + static final _id_saveIncrementalForExternalSigning = _class.instanceMethodId( + r"saveIncrementalForExternalSigning", + r"(Ljava/io/OutputStream;)Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/ExternalSigningSupport;", + ); + + static final _saveIncrementalForExternalSigning = + ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public org.apache.pdfbox.pdmodel.interactive.digitalsignature.ExternalSigningSupport saveIncrementalForExternalSigning(java.io.OutputStream output) /// The returned object must be released after use, by calling the [release] method. @@ -1276,15 +1869,24 @@ class PDDocument extends jni.JObject { jni.JObject output, ) { return _saveIncrementalForExternalSigning( - reference.pointer, output.reference.pointer) + reference.pointer, + _id_saveIncrementalForExternalSigning as jni.JMethodIDPtr, + output.reference.pointer) .object(const jni.JObjectType()); } - static final _getPage = jniLookup< + static final _id_getPage = _class.instanceMethodId( + r"getPage", + r"(I)Lorg/apache/pdfbox/pdmodel/PDPage;", + ); + + static final _getPage = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Int32)>>("PDDocument__getPage") - .asFunction, int)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); /// from: public org.apache.pdfbox.pdmodel.PDPage getPage(int pageIndex) /// The returned object must be released after use, by calling the [release] method. @@ -1299,15 +1901,27 @@ class PDDocument extends jni.JObject { jni.JObject getPage( int pageIndex, ) { - return _getPage(reference.pointer, pageIndex) + return _getPage( + reference.pointer, _id_getPage as jni.JMethodIDPtr, pageIndex) .object(const jni.JObjectType()); } - static final _getPages = jniLookup< - ffi - .NativeFunction)>>( - "PDDocument__getPages") - .asFunction)>(); + static final _id_getPages = _class.instanceMethodId( + r"getPages", + r"()Lorg/apache/pdfbox/pdmodel/PDPageTree;", + ); + + static final _getPages = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public org.apache.pdfbox.pdmodel.PDPageTree getPages() /// The returned object must be released after use, by calling the [release] method. @@ -1315,44 +1929,77 @@ class PDDocument extends jni.JObject { /// Returns the page tree. ///@return the page tree jni.JObject getPages() { - return _getPages(reference.pointer).object(const jni.JObjectType()); + return _getPages(reference.pointer, _id_getPages as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } - static final _getNumberOfPages = jniLookup< - ffi - .NativeFunction)>>( - "PDDocument__getNumberOfPages") - .asFunction)>(); + static final _id_getNumberOfPages = _class.instanceMethodId( + r"getNumberOfPages", + r"()I", + ); + + static final _getNumberOfPages = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public int getNumberOfPages() /// /// This will return the total page count of the PDF document. ///@return The total number of pages in the PDF document. int getNumberOfPages() { - return _getNumberOfPages(reference.pointer).integer; + return _getNumberOfPages( + reference.pointer, _id_getNumberOfPages as jni.JMethodIDPtr) + .integer; } - static final _close = jniLookup< - ffi - .NativeFunction)>>( - "PDDocument__close") - .asFunction)>(); + static final _id_close = _class.instanceMethodId( + r"close", + r"()V", + ); + + static final _close = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public void close() /// /// This will close the underlying COSDocument object. ///@throws IOException If there is an error releasing resources. void close() { - _close(reference.pointer).check(); + _close(reference.pointer, _id_close as jni.JMethodIDPtr).check(); } - static final _protect = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocument__protect") + static final _id_protect = _class.instanceMethodId( + r"protect", + r"(Lorg/apache/pdfbox/pdmodel/encryption/ProtectionPolicy;)V", + ); + + static final _protect = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void protect(org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy policy) /// @@ -1369,14 +2016,27 @@ class PDDocument extends jni.JObject { void protect( jni.JObject policy, ) { - _protect(reference.pointer, policy.reference.pointer).check(); + _protect(reference.pointer, _id_protect as jni.JMethodIDPtr, + policy.reference.pointer) + .check(); } - static final _getCurrentAccessPermission = jniLookup< - ffi - .NativeFunction)>>( - "PDDocument__getCurrentAccessPermission") - .asFunction)>(); + static final _id_getCurrentAccessPermission = _class.instanceMethodId( + r"getCurrentAccessPermission", + r"()Lorg/apache/pdfbox/pdmodel/encryption/AccessPermission;", + ); + + static final _getCurrentAccessPermission = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public org.apache.pdfbox.pdmodel.encryption.AccessPermission getCurrentAccessPermission() /// The returned object must be released after use, by calling the [release] method. @@ -1387,29 +2047,52 @@ class PDDocument extends jni.JObject { /// to verify if the current user is allowed to proceed. ///@return the access permissions for the current user on the document. jni.JObject getCurrentAccessPermission() { - return _getCurrentAccessPermission(reference.pointer) + return _getCurrentAccessPermission(reference.pointer, + _id_getCurrentAccessPermission as jni.JMethodIDPtr) .object(const jni.JObjectType()); } - static final _isAllSecurityToBeRemoved = jniLookup< - ffi - .NativeFunction)>>( - "PDDocument__isAllSecurityToBeRemoved") - .asFunction)>(); + static final _id_isAllSecurityToBeRemoved = _class.instanceMethodId( + r"isAllSecurityToBeRemoved", + r"()Z", + ); + + static final _isAllSecurityToBeRemoved = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public boolean isAllSecurityToBeRemoved() /// /// Indicates if all security is removed or not when writing the pdf. ///@return returns true if all security shall be removed otherwise false bool isAllSecurityToBeRemoved() { - return _isAllSecurityToBeRemoved(reference.pointer).boolean; + return _isAllSecurityToBeRemoved( + reference.pointer, _id_isAllSecurityToBeRemoved as jni.JMethodIDPtr) + .boolean; } - static final _setAllSecurityToBeRemoved = jniLookup< + static final _id_setAllSecurityToBeRemoved = _class.instanceMethodId( + r"setAllSecurityToBeRemoved", + r"(Z)V", + ); + + static final _setAllSecurityToBeRemoved = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Uint8)>>("PDDocument__setAllSecurityToBeRemoved") - .asFunction, int)>(); + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); /// from: public void setAllSecurityToBeRemoved(boolean removeAllSecurity) /// @@ -1418,15 +2101,29 @@ class PDDocument extends jni.JObject { void setAllSecurityToBeRemoved( bool removeAllSecurity, ) { - _setAllSecurityToBeRemoved(reference.pointer, removeAllSecurity ? 1 : 0) + _setAllSecurityToBeRemoved( + reference.pointer, + _id_setAllSecurityToBeRemoved as jni.JMethodIDPtr, + removeAllSecurity ? 1 : 0) .check(); } - static final _getDocumentId = jniLookup< - ffi - .NativeFunction)>>( - "PDDocument__getDocumentId") - .asFunction)>(); + static final _id_getDocumentId = _class.instanceMethodId( + r"getDocumentId", + r"()Ljava/lang/Long;", + ); + + static final _getDocumentId = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.lang.Long getDocumentId() /// The returned object must be released after use, by calling the [release] method. @@ -1434,16 +2131,26 @@ class PDDocument extends jni.JObject { /// Provides the document ID. ///@return the document ID jni.JLong getDocumentId() { - return _getDocumentId(reference.pointer).object(const jni.JLongType()); + return _getDocumentId( + reference.pointer, _id_getDocumentId as jni.JMethodIDPtr) + .object(const jni.JLongType()); } - static final _setDocumentId = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocument__setDocumentId") + static final _id_setDocumentId = _class.instanceMethodId( + r"setDocumentId", + r"(Ljava/lang/Long;)V", + ); + + static final _setDocumentId = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setDocumentId(java.lang.Long docId) /// @@ -1452,28 +2159,51 @@ class PDDocument extends jni.JObject { void setDocumentId( jni.JLong docId, ) { - _setDocumentId(reference.pointer, docId.reference.pointer).check(); + _setDocumentId(reference.pointer, _id_setDocumentId as jni.JMethodIDPtr, + docId.reference.pointer) + .check(); } - static final _getVersion = jniLookup< - ffi - .NativeFunction)>>( - "PDDocument__getVersion") - .asFunction)>(); + static final _id_getVersion = _class.instanceMethodId( + r"getVersion", + r"()F", + ); + + static final _getVersion = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallFloatMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public float getVersion() /// /// Returns the PDF specification version this document conforms to. ///@return the PDF version (e.g. 1.4f) double getVersion() { - return _getVersion(reference.pointer).float; + return _getVersion(reference.pointer, _id_getVersion as jni.JMethodIDPtr) + .float; } - static final _setVersion = jniLookup< + static final _id_setVersion = _class.instanceMethodId( + r"setVersion", + r"(F)V", + ); + + static final _setVersion = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Float)>>("PDDocument__setVersion") - .asFunction, double)>(); + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Double,)>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, double)>(); /// from: public void setVersion(float newVersion) /// @@ -1482,14 +2212,27 @@ class PDDocument extends jni.JObject { void setVersion( double newVersion, ) { - _setVersion(reference.pointer, newVersion).check(); + _setVersion( + reference.pointer, _id_setVersion as jni.JMethodIDPtr, newVersion) + .check(); } - static final _getResourceCache = jniLookup< - ffi - .NativeFunction)>>( - "PDDocument__getResourceCache") - .asFunction)>(); + static final _id_getResourceCache = _class.instanceMethodId( + r"getResourceCache", + r"()Lorg/apache/pdfbox/pdmodel/ResourceCache;", + ); + + static final _getResourceCache = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public org.apache.pdfbox.pdmodel.ResourceCache getResourceCache() /// The returned object must be released after use, by calling the [release] method. @@ -1497,16 +2240,26 @@ class PDDocument extends jni.JObject { /// Returns the resource cache associated with this document, or null if there is none. ///@return the resource cache or null. jni.JObject getResourceCache() { - return _getResourceCache(reference.pointer).object(const jni.JObjectType()); + return _getResourceCache( + reference.pointer, _id_getResourceCache as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } - static final _setResourceCache = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocument__setResourceCache") + static final _id_setResourceCache = _class.instanceMethodId( + r"setResourceCache", + r"(Lorg/apache/pdfbox/pdmodel/ResourceCache;)V", + ); + + static final _setResourceCache = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setResourceCache(org.apache.pdfbox.pdmodel.ResourceCache resourceCache) /// @@ -1515,7 +2268,10 @@ class PDDocument extends jni.JObject { void setResourceCache( jni.JObject resourceCache, ) { - _setResourceCache(reference.pointer, resourceCache.reference.pointer) + _setResourceCache( + reference.pointer, + _id_setResourceCache as jni.JMethodIDPtr, + resourceCache.reference.pointer) .check(); } } diff --git a/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocumentInformation.dart b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocumentInformation.dart index 99b1e7f089..c20f7b1836 100644 --- a/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocumentInformation.dart +++ b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocumentInformation.dart @@ -41,8 +41,6 @@ import "dart:ffi" as ffi; import "package:jni/internal_helpers_for_jnigen.dart"; import "package:jni/jni.dart" as jni; -import "../../../../_init.dart"; - /// from: org.apache.pdfbox.pdmodel.PDDocumentInformation /// /// This is the document metadata. Each getXXX method will return the entry if @@ -58,25 +56,51 @@ class PDDocumentInformation extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); + static final _class = + jni.JClass.forName(r"org/apache/pdfbox/pdmodel/PDDocumentInformation"); + /// The type which includes information such as the signature of this class. static const type = $PDDocumentInformationType(); - static final _new0 = jniLookup>( - "PDDocumentInformation__new0") - .asFunction(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public void () /// The returned object must be released after use, by calling the [release] method. /// /// Default Constructor. factory PDDocumentInformation() { - return PDDocumentInformation.fromReference(_new0().reference); + return PDDocumentInformation.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } - static final _new1 = jniLookup< - ffi - .NativeFunction)>>( - "PDDocumentInformation__new1") - .asFunction)>(); + static final _id_new1 = _class.constructorId( + r"(Lorg/apache/pdfbox/cos/COSDictionary;)V", + ); + + static final _new1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void (org.apache.pdfbox.cos.COSDictionary dic) /// The returned object must be released after use, by calling the [release] method. @@ -86,15 +110,27 @@ class PDDocumentInformation extends jni.JObject { factory PDDocumentInformation.new1( jni.JObject dic, ) { - return PDDocumentInformation.fromReference( - _new1(dic.reference.pointer).reference); + return PDDocumentInformation.fromReference(_new1(_class.reference.pointer, + _id_new1 as jni.JMethodIDPtr, dic.reference.pointer) + .reference); } - static final _getCOSObject = jniLookup< - ffi - .NativeFunction)>>( - "PDDocumentInformation__getCOSObject") - .asFunction)>(); + static final _id_getCOSObject = _class.instanceMethodId( + r"getCOSObject", + r"()Lorg/apache/pdfbox/cos/COSDictionary;", + ); + + static final _getCOSObject = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public org.apache.pdfbox.cos.COSDictionary getCOSObject() /// The returned object must be released after use, by calling the [release] method. @@ -102,17 +138,26 @@ class PDDocumentInformation extends jni.JObject { /// This will get the underlying dictionary that this object wraps. ///@return The underlying info dictionary. jni.JObject getCOSObject() { - return _getCOSObject(reference.pointer).object(const jni.JObjectType()); + return _getCOSObject( + reference.pointer, _id_getCOSObject as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } - static final _getPropertyStringValue = jniLookup< + static final _id_getPropertyStringValue = _class.instanceMethodId( + r"getPropertyStringValue", + r"(Ljava/lang/String;)Ljava/lang/Object;", + ); + + static final _getPropertyStringValue = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "PDDocumentInformation__getPropertyStringValue") + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public java.lang.Object getPropertyStringValue(java.lang.String propertyKey) /// The returned object must be released after use, by calling the [release] method. @@ -129,15 +174,28 @@ class PDDocumentInformation extends jni.JObject { jni.JString propertyKey, ) { return _getPropertyStringValue( - reference.pointer, propertyKey.reference.pointer) + reference.pointer, + _id_getPropertyStringValue as jni.JMethodIDPtr, + propertyKey.reference.pointer) .object(const jni.JObjectType()); } - static final _getTitle = jniLookup< - ffi - .NativeFunction)>>( - "PDDocumentInformation__getTitle") - .asFunction)>(); + static final _id_getTitle = _class.instanceMethodId( + r"getTitle", + r"()Ljava/lang/String;", + ); + + static final _getTitle = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.lang.String getTitle() /// The returned object must be released after use, by calling the [release] method. @@ -145,16 +203,25 @@ class PDDocumentInformation extends jni.JObject { /// This will get the title of the document. This will return null if no title exists. ///@return The title of the document. jni.JString getTitle() { - return _getTitle(reference.pointer).object(const jni.JStringType()); + return _getTitle(reference.pointer, _id_getTitle as jni.JMethodIDPtr) + .object(const jni.JStringType()); } - static final _setTitle = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocumentInformation__setTitle") + static final _id_setTitle = _class.instanceMethodId( + r"setTitle", + r"(Ljava/lang/String;)V", + ); + + static final _setTitle = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setTitle(java.lang.String title) /// @@ -163,14 +230,27 @@ class PDDocumentInformation extends jni.JObject { void setTitle( jni.JString title, ) { - _setTitle(reference.pointer, title.reference.pointer).check(); + _setTitle(reference.pointer, _id_setTitle as jni.JMethodIDPtr, + title.reference.pointer) + .check(); } - static final _getAuthor = jniLookup< - ffi - .NativeFunction)>>( - "PDDocumentInformation__getAuthor") - .asFunction)>(); + static final _id_getAuthor = _class.instanceMethodId( + r"getAuthor", + r"()Ljava/lang/String;", + ); + + static final _getAuthor = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.lang.String getAuthor() /// The returned object must be released after use, by calling the [release] method. @@ -178,16 +258,25 @@ class PDDocumentInformation extends jni.JObject { /// This will get the author of the document. This will return null if no author exists. ///@return The author of the document. jni.JString getAuthor() { - return _getAuthor(reference.pointer).object(const jni.JStringType()); + return _getAuthor(reference.pointer, _id_getAuthor as jni.JMethodIDPtr) + .object(const jni.JStringType()); } - static final _setAuthor = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocumentInformation__setAuthor") + static final _id_setAuthor = _class.instanceMethodId( + r"setAuthor", + r"(Ljava/lang/String;)V", + ); + + static final _setAuthor = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setAuthor(java.lang.String author) /// @@ -196,14 +285,27 @@ class PDDocumentInformation extends jni.JObject { void setAuthor( jni.JString author, ) { - _setAuthor(reference.pointer, author.reference.pointer).check(); + _setAuthor(reference.pointer, _id_setAuthor as jni.JMethodIDPtr, + author.reference.pointer) + .check(); } - static final _getSubject = jniLookup< - ffi - .NativeFunction)>>( - "PDDocumentInformation__getSubject") - .asFunction)>(); + static final _id_getSubject = _class.instanceMethodId( + r"getSubject", + r"()Ljava/lang/String;", + ); + + static final _getSubject = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.lang.String getSubject() /// The returned object must be released after use, by calling the [release] method. @@ -211,16 +313,25 @@ class PDDocumentInformation extends jni.JObject { /// This will get the subject of the document. This will return null if no subject exists. ///@return The subject of the document. jni.JString getSubject() { - return _getSubject(reference.pointer).object(const jni.JStringType()); + return _getSubject(reference.pointer, _id_getSubject as jni.JMethodIDPtr) + .object(const jni.JStringType()); } - static final _setSubject = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocumentInformation__setSubject") + static final _id_setSubject = _class.instanceMethodId( + r"setSubject", + r"(Ljava/lang/String;)V", + ); + + static final _setSubject = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setSubject(java.lang.String subject) /// @@ -229,14 +340,27 @@ class PDDocumentInformation extends jni.JObject { void setSubject( jni.JString subject, ) { - _setSubject(reference.pointer, subject.reference.pointer).check(); + _setSubject(reference.pointer, _id_setSubject as jni.JMethodIDPtr, + subject.reference.pointer) + .check(); } - static final _getKeywords = jniLookup< - ffi - .NativeFunction)>>( - "PDDocumentInformation__getKeywords") - .asFunction)>(); + static final _id_getKeywords = _class.instanceMethodId( + r"getKeywords", + r"()Ljava/lang/String;", + ); + + static final _getKeywords = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.lang.String getKeywords() /// The returned object must be released after use, by calling the [release] method. @@ -244,16 +368,25 @@ class PDDocumentInformation extends jni.JObject { /// This will get the keywords of the document. This will return null if no keywords exists. ///@return The keywords of the document. jni.JString getKeywords() { - return _getKeywords(reference.pointer).object(const jni.JStringType()); + return _getKeywords(reference.pointer, _id_getKeywords as jni.JMethodIDPtr) + .object(const jni.JStringType()); } - static final _setKeywords = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocumentInformation__setKeywords") + static final _id_setKeywords = _class.instanceMethodId( + r"setKeywords", + r"(Ljava/lang/String;)V", + ); + + static final _setKeywords = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setKeywords(java.lang.String keywords) /// @@ -262,14 +395,27 @@ class PDDocumentInformation extends jni.JObject { void setKeywords( jni.JString keywords, ) { - _setKeywords(reference.pointer, keywords.reference.pointer).check(); + _setKeywords(reference.pointer, _id_setKeywords as jni.JMethodIDPtr, + keywords.reference.pointer) + .check(); } - static final _getCreator = jniLookup< - ffi - .NativeFunction)>>( - "PDDocumentInformation__getCreator") - .asFunction)>(); + static final _id_getCreator = _class.instanceMethodId( + r"getCreator", + r"()Ljava/lang/String;", + ); + + static final _getCreator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.lang.String getCreator() /// The returned object must be released after use, by calling the [release] method. @@ -277,16 +423,25 @@ class PDDocumentInformation extends jni.JObject { /// This will get the creator of the document. This will return null if no creator exists. ///@return The creator of the document. jni.JString getCreator() { - return _getCreator(reference.pointer).object(const jni.JStringType()); + return _getCreator(reference.pointer, _id_getCreator as jni.JMethodIDPtr) + .object(const jni.JStringType()); } - static final _setCreator = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocumentInformation__setCreator") + static final _id_setCreator = _class.instanceMethodId( + r"setCreator", + r"(Ljava/lang/String;)V", + ); + + static final _setCreator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setCreator(java.lang.String creator) /// @@ -295,14 +450,27 @@ class PDDocumentInformation extends jni.JObject { void setCreator( jni.JString creator, ) { - _setCreator(reference.pointer, creator.reference.pointer).check(); + _setCreator(reference.pointer, _id_setCreator as jni.JMethodIDPtr, + creator.reference.pointer) + .check(); } - static final _getProducer = jniLookup< - ffi - .NativeFunction)>>( - "PDDocumentInformation__getProducer") - .asFunction)>(); + static final _id_getProducer = _class.instanceMethodId( + r"getProducer", + r"()Ljava/lang/String;", + ); + + static final _getProducer = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.lang.String getProducer() /// The returned object must be released after use, by calling the [release] method. @@ -310,16 +478,25 @@ class PDDocumentInformation extends jni.JObject { /// This will get the producer of the document. This will return null if no producer exists. ///@return The producer of the document. jni.JString getProducer() { - return _getProducer(reference.pointer).object(const jni.JStringType()); + return _getProducer(reference.pointer, _id_getProducer as jni.JMethodIDPtr) + .object(const jni.JStringType()); } - static final _setProducer = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocumentInformation__setProducer") + static final _id_setProducer = _class.instanceMethodId( + r"setProducer", + r"(Ljava/lang/String;)V", + ); + + static final _setProducer = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setProducer(java.lang.String producer) /// @@ -328,14 +505,27 @@ class PDDocumentInformation extends jni.JObject { void setProducer( jni.JString producer, ) { - _setProducer(reference.pointer, producer.reference.pointer).check(); + _setProducer(reference.pointer, _id_setProducer as jni.JMethodIDPtr, + producer.reference.pointer) + .check(); } - static final _getCreationDate = jniLookup< - ffi - .NativeFunction)>>( - "PDDocumentInformation__getCreationDate") - .asFunction)>(); + static final _id_getCreationDate = _class.instanceMethodId( + r"getCreationDate", + r"()Ljava/util/Calendar;", + ); + + static final _getCreationDate = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.util.Calendar getCreationDate() /// The returned object must be released after use, by calling the [release] method. @@ -343,17 +533,26 @@ class PDDocumentInformation extends jni.JObject { /// This will get the creation date of the document. This will return null if no creation date exists. ///@return The creation date of the document. jni.JObject getCreationDate() { - return _getCreationDate(reference.pointer).object(const jni.JObjectType()); + return _getCreationDate( + reference.pointer, _id_getCreationDate as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } - static final _setCreationDate = jniLookup< + static final _id_setCreationDate = _class.instanceMethodId( + r"setCreationDate", + r"(Ljava/util/Calendar;)V", + ); + + static final _setCreationDate = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "PDDocumentInformation__setCreationDate") + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setCreationDate(java.util.Calendar date) /// @@ -362,14 +561,27 @@ class PDDocumentInformation extends jni.JObject { void setCreationDate( jni.JObject date, ) { - _setCreationDate(reference.pointer, date.reference.pointer).check(); + _setCreationDate(reference.pointer, _id_setCreationDate as jni.JMethodIDPtr, + date.reference.pointer) + .check(); } - static final _getModificationDate = jniLookup< - ffi - .NativeFunction)>>( - "PDDocumentInformation__getModificationDate") - .asFunction)>(); + static final _id_getModificationDate = _class.instanceMethodId( + r"getModificationDate", + r"()Ljava/util/Calendar;", + ); + + static final _getModificationDate = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.util.Calendar getModificationDate() /// The returned object must be released after use, by calling the [release] method. @@ -377,18 +589,26 @@ class PDDocumentInformation extends jni.JObject { /// This will get the modification date of the document. This will return null if no modification date exists. ///@return The modification date of the document. jni.JObject getModificationDate() { - return _getModificationDate(reference.pointer) + return _getModificationDate( + reference.pointer, _id_getModificationDate as jni.JMethodIDPtr) .object(const jni.JObjectType()); } - static final _setModificationDate = jniLookup< + static final _id_setModificationDate = _class.instanceMethodId( + r"setModificationDate", + r"(Ljava/util/Calendar;)V", + ); + + static final _setModificationDate = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "PDDocumentInformation__setModificationDate") + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setModificationDate(java.util.Calendar date) /// @@ -397,14 +617,27 @@ class PDDocumentInformation extends jni.JObject { void setModificationDate( jni.JObject date, ) { - _setModificationDate(reference.pointer, date.reference.pointer).check(); + _setModificationDate(reference.pointer, + _id_setModificationDate as jni.JMethodIDPtr, date.reference.pointer) + .check(); } - static final _getTrapped = jniLookup< - ffi - .NativeFunction)>>( - "PDDocumentInformation__getTrapped") - .asFunction)>(); + static final _id_getTrapped = _class.instanceMethodId( + r"getTrapped", + r"()Ljava/lang/String;", + ); + + static final _getTrapped = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.lang.String getTrapped() /// The returned object must be released after use, by calling the [release] method. @@ -413,14 +646,26 @@ class PDDocumentInformation extends jni.JObject { /// This will return null if one is not found. ///@return The trapped value for the document. jni.JString getTrapped() { - return _getTrapped(reference.pointer).object(const jni.JStringType()); + return _getTrapped(reference.pointer, _id_getTrapped as jni.JMethodIDPtr) + .object(const jni.JStringType()); } - static final _getMetadataKeys = jniLookup< - ffi - .NativeFunction)>>( - "PDDocumentInformation__getMetadataKeys") - .asFunction)>(); + static final _id_getMetadataKeys = _class.instanceMethodId( + r"getMetadataKeys", + r"()Ljava/util/Set;", + ); + + static final _getMetadataKeys = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.util.Set getMetadataKeys() /// The returned object must be released after use, by calling the [release] method. @@ -429,18 +674,26 @@ class PDDocumentInformation extends jni.JObject { ///@return all metadata key strings. ///@since Apache PDFBox 1.3.0 jni.JSet getMetadataKeys() { - return _getMetadataKeys(reference.pointer) + return _getMetadataKeys( + reference.pointer, _id_getMetadataKeys as jni.JMethodIDPtr) .object(const jni.JSetType(jni.JStringType())); } - static final _getCustomMetadataValue = jniLookup< + static final _id_getCustomMetadataValue = _class.instanceMethodId( + r"getCustomMetadataValue", + r"(Ljava/lang/String;)Ljava/lang/String;", + ); + + static final _getCustomMetadataValue = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "PDDocumentInformation__getCustomMetadataValue") + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public java.lang.String getCustomMetadataValue(java.lang.String fieldName) /// The returned object must be released after use, by calling the [release] method. @@ -453,18 +706,30 @@ class PDDocumentInformation extends jni.JObject { jni.JString fieldName, ) { return _getCustomMetadataValue( - reference.pointer, fieldName.reference.pointer) + reference.pointer, + _id_getCustomMetadataValue as jni.JMethodIDPtr, + fieldName.reference.pointer) .object(const jni.JStringType()); } - static final _setCustomMetadataValue = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>( - "PDDocumentInformation__setCustomMetadataValue") + static final _id_setCustomMetadataValue = _class.instanceMethodId( + r"setCustomMetadataValue", + r"(Ljava/lang/String;Ljava/lang/String;)V", + ); + + static final _setCustomMetadataValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); /// from: public void setCustomMetadataValue(java.lang.String fieldName, java.lang.String fieldValue) /// @@ -475,18 +740,29 @@ class PDDocumentInformation extends jni.JObject { jni.JString fieldName, jni.JString fieldValue, ) { - _setCustomMetadataValue(reference.pointer, fieldName.reference.pointer, + _setCustomMetadataValue( + reference.pointer, + _id_setCustomMetadataValue as jni.JMethodIDPtr, + fieldName.reference.pointer, fieldValue.reference.pointer) .check(); } - static final _setTrapped = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDDocumentInformation__setTrapped") + static final _id_setTrapped = _class.instanceMethodId( + r"setTrapped", + r"(Ljava/lang/String;)V", + ); + + static final _setTrapped = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setTrapped(java.lang.String value) /// @@ -497,7 +773,9 @@ class PDDocumentInformation extends jni.JObject { void setTrapped( jni.JString value, ) { - _setTrapped(reference.pointer, value.reference.pointer).check(); + _setTrapped(reference.pointer, _id_setTrapped as jni.JMethodIDPtr, + value.reference.pointer) + .check(); } } diff --git a/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/text/PDFTextStripper.dart b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/text/PDFTextStripper.dart index d7d559575d..82e25c582a 100644 --- a/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/text/PDFTextStripper.dart +++ b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/text/PDFTextStripper.dart @@ -42,7 +42,6 @@ import "package:jni/internal_helpers_for_jnigen.dart"; import "package:jni/jni.dart" as jni; import "../pdmodel/PDDocument.dart" as pddocument_; -import "../../../../_init.dart"; /// from: org.apache.pdfbox.text.PDFTextStripper /// @@ -61,42 +60,27 @@ class PDFTextStripper extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); + static final _class = + jni.JClass.forName(r"org/apache/pdfbox/text/PDFTextStripper"); + /// The type which includes information such as the signature of this class. static const type = $PDFTextStripperType(); - static final _get_LINE_SEPARATOR = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_PDFTextStripper__LINE_SEPARATOR") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); + static final _id_LINE_SEPARATOR = _class.instanceFieldId( + r"LINE_SEPARATOR", + r"Ljava/lang/String;", + ); /// from: protected final java.lang.String LINE_SEPARATOR /// The returned object must be released after use, by calling the [release] method. /// /// The platform's line separator. jni.JString get LINE_SEPARATOR => - _get_LINE_SEPARATOR(reference.pointer).object(const jni.JStringType()); + _id_LINE_SEPARATOR.get(this, const jni.JStringType()); - static final _get_charactersByArticle = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_PDFTextStripper__charactersByArticle") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); - - static final _set_charactersByArticle = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, ffi.Pointer)>>( - "set_PDFTextStripper__charactersByArticle") - .asFunction< - jni.JniResult Function(jni.JObjectPtr, ffi.Pointer)>(); + static final _id_charactersByArticle = _class.instanceFieldId( + r"charactersByArticle", + r"Ljava/util/ArrayList;", + ); /// from: protected java.util.ArrayList> charactersByArticle /// The returned object must be released after use, by calling the [release] method. @@ -114,8 +98,7 @@ class PDFTextStripper extends jni.JObject { /// /// Most PDFs won't have any beads, so charactersByArticle will contain a single entry. jni.JObject get charactersByArticle => - _get_charactersByArticle(reference.pointer) - .object(const jni.JObjectType()); + _id_charactersByArticle.get(this, const jni.JObjectType()); /// from: protected java.util.ArrayList> charactersByArticle /// The returned object must be released after use, by calling the [release] method. @@ -133,66 +116,52 @@ class PDFTextStripper extends jni.JObject { /// /// Most PDFs won't have any beads, so charactersByArticle will contain a single entry. set charactersByArticle(jni.JObject value) => - _set_charactersByArticle(reference.pointer, value.reference.pointer) - .check(); + _id_charactersByArticle.set(this, const jni.JObjectType(), value); - static final _get_document = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_PDFTextStripper__document") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); - - static final _set_document = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(jni.JObjectPtr, - ffi.Pointer)>>("set_PDFTextStripper__document") - .asFunction< - jni.JniResult Function(jni.JObjectPtr, ffi.Pointer)>(); + static final _id_document = _class.instanceFieldId( + r"document", + r"Lorg/apache/pdfbox/pdmodel/PDDocument;", + ); /// from: protected org.apache.pdfbox.pdmodel.PDDocument document /// The returned object must be released after use, by calling the [release] method. - pddocument_.PDDocument get document => _get_document(reference.pointer) - .object(const pddocument_.$PDDocumentType()); + pddocument_.PDDocument get document => + _id_document.get(this, const pddocument_.$PDDocumentType()); /// from: protected org.apache.pdfbox.pdmodel.PDDocument document /// The returned object must be released after use, by calling the [release] method. set document(pddocument_.PDDocument value) => - _set_document(reference.pointer, value.reference.pointer).check(); - - static final _get_output = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_PDFTextStripper__output") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); + _id_document.set(this, const pddocument_.$PDDocumentType(), value); - static final _set_output = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(jni.JObjectPtr, - ffi.Pointer)>>("set_PDFTextStripper__output") - .asFunction< - jni.JniResult Function(jni.JObjectPtr, ffi.Pointer)>(); + static final _id_output = _class.instanceFieldId( + r"output", + r"Ljava/io/Writer;", + ); /// from: protected java.io.Writer output /// The returned object must be released after use, by calling the [release] method. - jni.JObject get output => - _get_output(reference.pointer).object(const jni.JObjectType()); + jni.JObject get output => _id_output.get(this, const jni.JObjectType()); /// from: protected java.io.Writer output /// The returned object must be released after use, by calling the [release] method. set output(jni.JObject value) => - _set_output(reference.pointer, value.reference.pointer).check(); + _id_output.set(this, const jni.JObjectType(), value); - static final _new0 = jniLookup>( - "PDFTextStripper__new0") - .asFunction(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public void () /// The returned object must be released after use, by calling the [release] method. @@ -200,16 +169,26 @@ class PDFTextStripper extends jni.JObject { /// Instantiate a new PDFTextStripper object. ///@throws IOException If there is an error loading the properties. factory PDFTextStripper() { - return PDFTextStripper.fromReference(_new0().reference); + return PDFTextStripper.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } - static final _getText = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDFTextStripper__getText") + static final _id_getText = _class.instanceMethodId( + r"getText", + r"(Lorg/apache/pdfbox/pdmodel/PDDocument;)Ljava/lang/String;", + ); + + static final _getText = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public java.lang.String getText(org.apache.pdfbox.pdmodel.PDDocument doc) /// The returned object must be released after use, by calling the [release] method. @@ -227,19 +206,29 @@ class PDFTextStripper extends jni.JObject { jni.JString getText( pddocument_.PDDocument doc, ) { - return _getText(reference.pointer, doc.reference.pointer) + return _getText(reference.pointer, _id_getText as jni.JMethodIDPtr, + doc.reference.pointer) .object(const jni.JStringType()); } - static final _writeText = jniLookup< + static final _id_writeText = _class.instanceMethodId( + r"writeText", + r"(Lorg/apache/pdfbox/pdmodel/PDDocument;Ljava/io/Writer;)V", + ); + + static final _writeText = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, + jni.JThrowablePtr Function( ffi.Pointer, - ffi.Pointer)>>("PDFTextStripper__writeText") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); /// from: public void writeText(org.apache.pdfbox.pdmodel.PDDocument doc, java.io.Writer outputStream) /// @@ -251,18 +240,26 @@ class PDFTextStripper extends jni.JObject { pddocument_.PDDocument doc, jni.JObject outputStream, ) { - _writeText(reference.pointer, doc.reference.pointer, - outputStream.reference.pointer) + _writeText(reference.pointer, _id_writeText as jni.JMethodIDPtr, + doc.reference.pointer, outputStream.reference.pointer) .check(); } - static final _processPages = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDFTextStripper__processPages") + static final _id_processPages = _class.instanceMethodId( + r"processPages", + r"(Lorg/apache/pdfbox/pdmodel/PDPageTree;)V", + ); + + static final _processPages = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: protected void processPages(org.apache.pdfbox.pdmodel.PDPageTree pages) /// @@ -272,16 +269,26 @@ class PDFTextStripper extends jni.JObject { void processPages( jni.JObject pages, ) { - _processPages(reference.pointer, pages.reference.pointer).check(); + _processPages(reference.pointer, _id_processPages as jni.JMethodIDPtr, + pages.reference.pointer) + .check(); } - static final _startDocument = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDFTextStripper__startDocument") + static final _id_startDocument = _class.instanceMethodId( + r"startDocument", + r"(Lorg/apache/pdfbox/pdmodel/PDDocument;)V", + ); + + static final _startDocument = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: protected void startDocument(org.apache.pdfbox.pdmodel.PDDocument document) /// @@ -291,16 +298,26 @@ class PDFTextStripper extends jni.JObject { void startDocument( pddocument_.PDDocument document, ) { - _startDocument(reference.pointer, document.reference.pointer).check(); + _startDocument(reference.pointer, _id_startDocument as jni.JMethodIDPtr, + document.reference.pointer) + .check(); } - static final _endDocument = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDFTextStripper__endDocument") + static final _id_endDocument = _class.instanceMethodId( + r"endDocument", + r"(Lorg/apache/pdfbox/pdmodel/PDDocument;)V", + ); + + static final _endDocument = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: protected void endDocument(org.apache.pdfbox.pdmodel.PDDocument document) /// @@ -311,16 +328,26 @@ class PDFTextStripper extends jni.JObject { void endDocument( pddocument_.PDDocument document, ) { - _endDocument(reference.pointer, document.reference.pointer).check(); + _endDocument(reference.pointer, _id_endDocument as jni.JMethodIDPtr, + document.reference.pointer) + .check(); } - static final _processPage = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDFTextStripper__processPage") + static final _id_processPage = _class.instanceMethodId( + r"processPage", + r"(Lorg/apache/pdfbox/pdmodel/PDPage;)V", + ); + + static final _processPage = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void processPage(org.apache.pdfbox.pdmodel.PDPage page) /// @@ -330,14 +357,27 @@ class PDFTextStripper extends jni.JObject { void processPage( jni.JObject page, ) { - _processPage(reference.pointer, page.reference.pointer).check(); + _processPage(reference.pointer, _id_processPage as jni.JMethodIDPtr, + page.reference.pointer) + .check(); } - static final _startArticle = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__startArticle") - .asFunction)>(); + static final _id_startArticle = _class.instanceMethodId( + r"startArticle", + r"()V", + ); + + static final _startArticle = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: protected void startArticle() /// @@ -346,14 +386,24 @@ class PDFTextStripper extends jni.JObject { /// may provide additional information. ///@throws IOException If there is any error writing to the stream. void startArticle() { - _startArticle(reference.pointer).check(); + _startArticle(reference.pointer, _id_startArticle as jni.JMethodIDPtr) + .check(); } - static final _startArticle1 = jniLookup< + static final _id_startArticle1 = _class.instanceMethodId( + r"startArticle", + r"(Z)V", + ); + + static final _startArticle1 = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Uint8)>>("PDFTextStripper__startArticle1") - .asFunction, int)>(); + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); /// from: protected void startArticle(boolean isLTR) /// @@ -364,30 +414,51 @@ class PDFTextStripper extends jni.JObject { void startArticle1( bool isLTR, ) { - _startArticle1(reference.pointer, isLTR ? 1 : 0).check(); + _startArticle1(reference.pointer, _id_startArticle1 as jni.JMethodIDPtr, + isLTR ? 1 : 0) + .check(); } - static final _endArticle = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__endArticle") - .asFunction)>(); + static final _id_endArticle = _class.instanceMethodId( + r"endArticle", + r"()V", + ); + + static final _endArticle = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: protected void endArticle() /// /// End an article. Default implementation is to do nothing. Subclasses may provide additional information. ///@throws IOException If there is any error writing to the stream. void endArticle() { - _endArticle(reference.pointer).check(); + _endArticle(reference.pointer, _id_endArticle as jni.JMethodIDPtr).check(); } - static final _startPage = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDFTextStripper__startPage") + static final _id_startPage = _class.instanceMethodId( + r"startPage", + r"(Lorg/apache/pdfbox/pdmodel/PDPage;)V", + ); + + static final _startPage = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: protected void startPage(org.apache.pdfbox.pdmodel.PDPage page) /// @@ -397,16 +468,26 @@ class PDFTextStripper extends jni.JObject { void startPage( jni.JObject page, ) { - _startPage(reference.pointer, page.reference.pointer).check(); + _startPage(reference.pointer, _id_startPage as jni.JMethodIDPtr, + page.reference.pointer) + .check(); } - static final _endPage = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDFTextStripper__endPage") + static final _id_endPage = _class.instanceMethodId( + r"endPage", + r"(Lorg/apache/pdfbox/pdmodel/PDPage;)V", + ); + + static final _endPage = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: protected void endPage(org.apache.pdfbox.pdmodel.PDPage page) /// @@ -416,14 +497,27 @@ class PDFTextStripper extends jni.JObject { void endPage( jni.JObject page, ) { - _endPage(reference.pointer, page.reference.pointer).check(); + _endPage(reference.pointer, _id_endPage as jni.JMethodIDPtr, + page.reference.pointer) + .check(); } - static final _writePage = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__writePage") - .asFunction)>(); + static final _id_writePage = _class.instanceMethodId( + r"writePage", + r"()V", + ); + + static final _writePage = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: protected void writePage() /// @@ -432,44 +526,78 @@ class PDFTextStripper extends jni.JObject { /// enabled. ///@throws IOException If there is an error writing the text. void writePage() { - _writePage(reference.pointer).check(); + _writePage(reference.pointer, _id_writePage as jni.JMethodIDPtr).check(); } - static final _writeLineSeparator = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__writeLineSeparator") - .asFunction)>(); + static final _id_writeLineSeparator = _class.instanceMethodId( + r"writeLineSeparator", + r"()V", + ); + + static final _writeLineSeparator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: protected void writeLineSeparator() /// /// Write the line separator value to the output stream. ///@throws IOException If there is a problem writing out the line separator to the document. void writeLineSeparator() { - _writeLineSeparator(reference.pointer).check(); + _writeLineSeparator( + reference.pointer, _id_writeLineSeparator as jni.JMethodIDPtr) + .check(); } - static final _writeWordSeparator = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__writeWordSeparator") - .asFunction)>(); + static final _id_writeWordSeparator = _class.instanceMethodId( + r"writeWordSeparator", + r"()V", + ); + + static final _writeWordSeparator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: protected void writeWordSeparator() /// /// Write the word separator value to the output stream. ///@throws IOException If there is a problem writing out the word separator to the document. void writeWordSeparator() { - _writeWordSeparator(reference.pointer).check(); + _writeWordSeparator( + reference.pointer, _id_writeWordSeparator as jni.JMethodIDPtr) + .check(); } - static final _writeCharacters = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDFTextStripper__writeCharacters") + static final _id_writeCharacters = _class.instanceMethodId( + r"writeCharacters", + r"(Lorg/apache/pdfbox/text/TextPosition;)V", + ); + + static final _writeCharacters = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: protected void writeCharacters(org.apache.pdfbox.text.TextPosition text) /// @@ -479,18 +607,29 @@ class PDFTextStripper extends jni.JObject { void writeCharacters( jni.JObject text, ) { - _writeCharacters(reference.pointer, text.reference.pointer).check(); + _writeCharacters(reference.pointer, _id_writeCharacters as jni.JMethodIDPtr, + text.reference.pointer) + .check(); } - static final _writeString = jniLookup< + static final _id_writeString = _class.instanceMethodId( + r"writeString", + r"(Ljava/lang/String;Ljava/util/List;)V", + ); + + static final _writeString = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, + jni.JThrowablePtr Function( ffi.Pointer, - ffi.Pointer)>>("PDFTextStripper__writeString") + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); /// from: protected void writeString(java.lang.String text, java.util.List textPositions) /// @@ -503,18 +642,26 @@ class PDFTextStripper extends jni.JObject { jni.JString text, jni.JList textPositions, ) { - _writeString(reference.pointer, text.reference.pointer, - textPositions.reference.pointer) + _writeString(reference.pointer, _id_writeString as jni.JMethodIDPtr, + text.reference.pointer, textPositions.reference.pointer) .check(); } - static final _writeString1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDFTextStripper__writeString1") + static final _id_writeString1 = _class.instanceMethodId( + r"writeString", + r"(Ljava/lang/String;)V", + ); + + static final _writeString1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: protected void writeString(java.lang.String text) /// @@ -524,17 +671,26 @@ class PDFTextStripper extends jni.JObject { void writeString1( jni.JString text, ) { - _writeString1(reference.pointer, text.reference.pointer).check(); + _writeString1(reference.pointer, _id_writeString1 as jni.JMethodIDPtr, + text.reference.pointer) + .check(); } - static final _processTextPosition = jniLookup< + static final _id_processTextPosition = _class.instanceMethodId( + r"processTextPosition", + r"(Lorg/apache/pdfbox/text/TextPosition;)V", + ); + + static final _processTextPosition = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "PDFTextStripper__processTextPosition") + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: protected void processTextPosition(org.apache.pdfbox.text.TextPosition text) /// @@ -544,14 +700,27 @@ class PDFTextStripper extends jni.JObject { void processTextPosition( jni.JObject text, ) { - _processTextPosition(reference.pointer, text.reference.pointer).check(); + _processTextPosition(reference.pointer, + _id_processTextPosition as jni.JMethodIDPtr, text.reference.pointer) + .check(); } - static final _getStartPage = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getStartPage") - .asFunction)>(); + static final _id_getStartPage = _class.instanceMethodId( + r"getStartPage", + r"()I", + ); + + static final _getStartPage = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public int getStartPage() /// @@ -560,14 +729,25 @@ class PDFTextStripper extends jni.JObject { /// be extracted. The default value is 1. ///@return Value of property startPage. int getStartPage() { - return _getStartPage(reference.pointer).integer; + return _getStartPage( + reference.pointer, _id_getStartPage as jni.JMethodIDPtr) + .integer; } - static final _setStartPage = jniLookup< + static final _id_setStartPage = _class.instanceMethodId( + r"setStartPage", + r"(I)V", + ); + + static final _setStartPage = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Int32)>>("PDFTextStripper__setStartPage") - .asFunction, int)>(); + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); /// from: public void setStartPage(int startPageValue) /// @@ -576,14 +756,27 @@ class PDFTextStripper extends jni.JObject { void setStartPage( int startPageValue, ) { - _setStartPage(reference.pointer, startPageValue).check(); + _setStartPage(reference.pointer, _id_setStartPage as jni.JMethodIDPtr, + startPageValue) + .check(); } - static final _getEndPage = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getEndPage") - .asFunction)>(); + static final _id_getEndPage = _class.instanceMethodId( + r"getEndPage", + r"()I", + ); + + static final _getEndPage = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public int getEndPage() /// @@ -592,14 +785,24 @@ class PDFTextStripper extends jni.JObject { /// Integer.MAX_VALUE such that all pages of the pdf will be extracted. ///@return Value of property endPage. int getEndPage() { - return _getEndPage(reference.pointer).integer; + return _getEndPage(reference.pointer, _id_getEndPage as jni.JMethodIDPtr) + .integer; } - static final _setEndPage = jniLookup< + static final _id_setEndPage = _class.instanceMethodId( + r"setEndPage", + r"(I)V", + ); + + static final _setEndPage = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Int32)>>("PDFTextStripper__setEndPage") - .asFunction, int)>(); + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); /// from: public void setEndPage(int endPageValue) /// @@ -608,16 +811,26 @@ class PDFTextStripper extends jni.JObject { void setEndPage( int endPageValue, ) { - _setEndPage(reference.pointer, endPageValue).check(); + _setEndPage( + reference.pointer, _id_setEndPage as jni.JMethodIDPtr, endPageValue) + .check(); } - static final _setLineSeparator = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDFTextStripper__setLineSeparator") + static final _id_setLineSeparator = _class.instanceMethodId( + r"setLineSeparator", + r"(Ljava/lang/String;)V", + ); + + static final _setLineSeparator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setLineSeparator(java.lang.String separator) /// @@ -627,14 +840,29 @@ class PDFTextStripper extends jni.JObject { void setLineSeparator( jni.JString separator, ) { - _setLineSeparator(reference.pointer, separator.reference.pointer).check(); + _setLineSeparator( + reference.pointer, + _id_setLineSeparator as jni.JMethodIDPtr, + separator.reference.pointer) + .check(); } - static final _getLineSeparator = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getLineSeparator") - .asFunction)>(); + static final _id_getLineSeparator = _class.instanceMethodId( + r"getLineSeparator", + r"()Ljava/lang/String;", + ); + + static final _getLineSeparator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.lang.String getLineSeparator() /// The returned object must be released after use, by calling the [release] method. @@ -642,14 +870,27 @@ class PDFTextStripper extends jni.JObject { /// This will get the line separator. ///@return The desired line separator string. jni.JString getLineSeparator() { - return _getLineSeparator(reference.pointer).object(const jni.JStringType()); + return _getLineSeparator( + reference.pointer, _id_getLineSeparator as jni.JMethodIDPtr) + .object(const jni.JStringType()); } - static final _getWordSeparator = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getWordSeparator") - .asFunction)>(); + static final _id_getWordSeparator = _class.instanceMethodId( + r"getWordSeparator", + r"()Ljava/lang/String;", + ); + + static final _getWordSeparator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.lang.String getWordSeparator() /// The returned object must be released after use, by calling the [release] method. @@ -657,16 +898,26 @@ class PDFTextStripper extends jni.JObject { /// This will get the word separator. ///@return The desired word separator string. jni.JString getWordSeparator() { - return _getWordSeparator(reference.pointer).object(const jni.JStringType()); + return _getWordSeparator( + reference.pointer, _id_getWordSeparator as jni.JMethodIDPtr) + .object(const jni.JStringType()); } - static final _setWordSeparator = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDFTextStripper__setWordSeparator") + static final _id_setWordSeparator = _class.instanceMethodId( + r"setWordSeparator", + r"(Ljava/lang/String;)V", + ); + + static final _setWordSeparator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setWordSeparator(java.lang.String separator) /// @@ -678,41 +929,84 @@ class PDFTextStripper extends jni.JObject { void setWordSeparator( jni.JString separator, ) { - _setWordSeparator(reference.pointer, separator.reference.pointer).check(); + _setWordSeparator( + reference.pointer, + _id_setWordSeparator as jni.JMethodIDPtr, + separator.reference.pointer) + .check(); } - static final _getSuppressDuplicateOverlappingText = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getSuppressDuplicateOverlappingText") - .asFunction)>(); + static final _id_getSuppressDuplicateOverlappingText = + _class.instanceMethodId( + r"getSuppressDuplicateOverlappingText", + r"()Z", + ); + + static final _getSuppressDuplicateOverlappingText = + ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public boolean getSuppressDuplicateOverlappingText() /// /// @return Returns the suppressDuplicateOverlappingText. bool getSuppressDuplicateOverlappingText() { - return _getSuppressDuplicateOverlappingText(reference.pointer).boolean; + return _getSuppressDuplicateOverlappingText(reference.pointer, + _id_getSuppressDuplicateOverlappingText as jni.JMethodIDPtr) + .boolean; } - static final _getCurrentPageNo = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getCurrentPageNo") - .asFunction)>(); + static final _id_getCurrentPageNo = _class.instanceMethodId( + r"getCurrentPageNo", + r"()I", + ); + + static final _getCurrentPageNo = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: protected int getCurrentPageNo() /// /// Get the current page number that is being processed. ///@return A 1 based number representing the current page. int getCurrentPageNo() { - return _getCurrentPageNo(reference.pointer).integer; + return _getCurrentPageNo( + reference.pointer, _id_getCurrentPageNo as jni.JMethodIDPtr) + .integer; } - static final _getOutput = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getOutput") - .asFunction)>(); + static final _id_getOutput = _class.instanceMethodId( + r"getOutput", + r"()Ljava/io/Writer;", + ); + + static final _getOutput = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: protected java.io.Writer getOutput() /// The returned object must be released after use, by calling the [release] method. @@ -720,14 +1014,26 @@ class PDFTextStripper extends jni.JObject { /// The output stream that is being written to. ///@return The stream that output is being written to. jni.JObject getOutput() { - return _getOutput(reference.pointer).object(const jni.JObjectType()); + return _getOutput(reference.pointer, _id_getOutput as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } - static final _getCharactersByArticle = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getCharactersByArticle") - .asFunction)>(); + static final _id_getCharactersByArticle = _class.instanceMethodId( + r"getCharactersByArticle", + r"()Ljava/util/List;", + ); + + static final _getCharactersByArticle = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: protected java.util.List> getCharactersByArticle() /// The returned object must be released after use, by calling the [release] method. @@ -736,15 +1042,27 @@ class PDFTextStripper extends jni.JObject { /// returns a List that contains List objects, the inner lists will contain TextPosition objects. ///@return A double List of TextPositions for all text strings on the page. jni.JList> getCharactersByArticle() { - return _getCharactersByArticle(reference.pointer) + return _getCharactersByArticle( + reference.pointer, _id_getCharactersByArticle as jni.JMethodIDPtr) .object(const jni.JListType(jni.JListType(jni.JObjectType()))); } - static final _setSuppressDuplicateOverlappingText = jniLookup< + static final _id_setSuppressDuplicateOverlappingText = + _class.instanceMethodId( + r"setSuppressDuplicateOverlappingText", + r"(Z)V", + ); + + static final _setSuppressDuplicateOverlappingText = + ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, ffi.Uint8)>>( - "PDFTextStripper__setSuppressDuplicateOverlappingText") - .asFunction, int)>(); + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); /// from: public void setSuppressDuplicateOverlappingText(boolean suppressDuplicateOverlappingTextValue) /// @@ -756,29 +1074,53 @@ class PDFTextStripper extends jni.JObject { bool suppressDuplicateOverlappingTextValue, ) { _setSuppressDuplicateOverlappingText( - reference.pointer, suppressDuplicateOverlappingTextValue ? 1 : 0) + reference.pointer, + _id_setSuppressDuplicateOverlappingText as jni.JMethodIDPtr, + suppressDuplicateOverlappingTextValue ? 1 : 0) .check(); } - static final _getSeparateByBeads = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getSeparateByBeads") - .asFunction)>(); + static final _id_getSeparateByBeads = _class.instanceMethodId( + r"getSeparateByBeads", + r"()Z", + ); + + static final _getSeparateByBeads = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public boolean getSeparateByBeads() /// /// This will tell if the text stripper should separate by beads. ///@return If the text will be grouped by beads. bool getSeparateByBeads() { - return _getSeparateByBeads(reference.pointer).boolean; + return _getSeparateByBeads( + reference.pointer, _id_getSeparateByBeads as jni.JMethodIDPtr) + .boolean; } - static final _setShouldSeparateByBeads = jniLookup< + static final _id_setShouldSeparateByBeads = _class.instanceMethodId( + r"setShouldSeparateByBeads", + r"(Z)V", + ); + + static final _setShouldSeparateByBeads = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Uint8)>>("PDFTextStripper__setShouldSeparateByBeads") - .asFunction, int)>(); + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); /// from: public void setShouldSeparateByBeads(boolean aShouldSeparateByBeads) /// @@ -787,15 +1129,29 @@ class PDFTextStripper extends jni.JObject { void setShouldSeparateByBeads( bool aShouldSeparateByBeads, ) { - _setShouldSeparateByBeads(reference.pointer, aShouldSeparateByBeads ? 1 : 0) + _setShouldSeparateByBeads( + reference.pointer, + _id_setShouldSeparateByBeads as jni.JMethodIDPtr, + aShouldSeparateByBeads ? 1 : 0) .check(); } - static final _getEndBookmark = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getEndBookmark") - .asFunction)>(); + static final _id_getEndBookmark = _class.instanceMethodId( + r"getEndBookmark", + r"()Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem;", + ); + + static final _getEndBookmark = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem getEndBookmark() /// The returned object must be released after use, by calling the [release] method. @@ -803,16 +1159,26 @@ class PDFTextStripper extends jni.JObject { /// Get the bookmark where text extraction should end, inclusive. Default is null. ///@return The ending bookmark. jni.JObject getEndBookmark() { - return _getEndBookmark(reference.pointer).object(const jni.JObjectType()); + return _getEndBookmark( + reference.pointer, _id_getEndBookmark as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } - static final _setEndBookmark = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDFTextStripper__setEndBookmark") + static final _id_setEndBookmark = _class.instanceMethodId( + r"setEndBookmark", + r"(Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem;)V", + ); + + static final _setEndBookmark = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setEndBookmark(org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem aEndBookmark) /// @@ -821,14 +1187,27 @@ class PDFTextStripper extends jni.JObject { void setEndBookmark( jni.JObject aEndBookmark, ) { - _setEndBookmark(reference.pointer, aEndBookmark.reference.pointer).check(); + _setEndBookmark(reference.pointer, _id_setEndBookmark as jni.JMethodIDPtr, + aEndBookmark.reference.pointer) + .check(); } - static final _getStartBookmark = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getStartBookmark") - .asFunction)>(); + static final _id_getStartBookmark = _class.instanceMethodId( + r"getStartBookmark", + r"()Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem;", + ); + + static final _getStartBookmark = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem getStartBookmark() /// The returned object must be released after use, by calling the [release] method. @@ -836,16 +1215,26 @@ class PDFTextStripper extends jni.JObject { /// Get the bookmark where text extraction should start, inclusive. Default is null. ///@return The starting bookmark. jni.JObject getStartBookmark() { - return _getStartBookmark(reference.pointer).object(const jni.JObjectType()); + return _getStartBookmark( + reference.pointer, _id_getStartBookmark as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } - static final _setStartBookmark = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDFTextStripper__setStartBookmark") + static final _id_setStartBookmark = _class.instanceMethodId( + r"setStartBookmark", + r"(Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem;)V", + ); + + static final _setStartBookmark = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setStartBookmark(org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem aStartBookmark) /// @@ -854,29 +1243,54 @@ class PDFTextStripper extends jni.JObject { void setStartBookmark( jni.JObject aStartBookmark, ) { - _setStartBookmark(reference.pointer, aStartBookmark.reference.pointer) + _setStartBookmark( + reference.pointer, + _id_setStartBookmark as jni.JMethodIDPtr, + aStartBookmark.reference.pointer) .check(); } - static final _getAddMoreFormatting = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getAddMoreFormatting") - .asFunction)>(); + static final _id_getAddMoreFormatting = _class.instanceMethodId( + r"getAddMoreFormatting", + r"()Z", + ); + + static final _getAddMoreFormatting = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public boolean getAddMoreFormatting() /// /// This will tell if the text stripper should add some more text formatting. ///@return true if some more text formatting will be added bool getAddMoreFormatting() { - return _getAddMoreFormatting(reference.pointer).boolean; + return _getAddMoreFormatting( + reference.pointer, _id_getAddMoreFormatting as jni.JMethodIDPtr) + .boolean; } - static final _setAddMoreFormatting = jniLookup< + static final _id_setAddMoreFormatting = _class.instanceMethodId( + r"setAddMoreFormatting", + r"(Z)V", + ); + + static final _setAddMoreFormatting = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Uint8)>>("PDFTextStripper__setAddMoreFormatting") - .asFunction, int)>(); + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); /// from: public void setAddMoreFormatting(boolean newAddMoreFormatting) /// @@ -885,29 +1299,54 @@ class PDFTextStripper extends jni.JObject { void setAddMoreFormatting( bool newAddMoreFormatting, ) { - _setAddMoreFormatting(reference.pointer, newAddMoreFormatting ? 1 : 0) + _setAddMoreFormatting( + reference.pointer, + _id_setAddMoreFormatting as jni.JMethodIDPtr, + newAddMoreFormatting ? 1 : 0) .check(); } - static final _getSortByPosition = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getSortByPosition") - .asFunction)>(); + static final _id_getSortByPosition = _class.instanceMethodId( + r"getSortByPosition", + r"()Z", + ); + + static final _getSortByPosition = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public boolean getSortByPosition() /// /// This will tell if the text stripper should sort the text tokens before writing to the stream. ///@return true If the text tokens will be sorted before being written. bool getSortByPosition() { - return _getSortByPosition(reference.pointer).boolean; + return _getSortByPosition( + reference.pointer, _id_getSortByPosition as jni.JMethodIDPtr) + .boolean; } - static final _setSortByPosition = jniLookup< + static final _id_setSortByPosition = _class.instanceMethodId( + r"setSortByPosition", + r"(Z)V", + ); + + static final _setSortByPosition = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Uint8)>>("PDFTextStripper__setSortByPosition") - .asFunction, int)>(); + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); /// from: public void setSortByPosition(boolean newSortByPosition) /// @@ -922,14 +1361,29 @@ class PDFTextStripper extends jni.JObject { void setSortByPosition( bool newSortByPosition, ) { - _setSortByPosition(reference.pointer, newSortByPosition ? 1 : 0).check(); + _setSortByPosition( + reference.pointer, + _id_setSortByPosition as jni.JMethodIDPtr, + newSortByPosition ? 1 : 0) + .check(); } - static final _getSpacingTolerance = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getSpacingTolerance") - .asFunction)>(); + static final _id_getSpacingTolerance = _class.instanceMethodId( + r"getSpacingTolerance", + r"()F", + ); + + static final _getSpacingTolerance = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallFloatMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public float getSpacingTolerance() /// @@ -937,14 +1391,25 @@ class PDFTextStripper extends jni.JObject { /// added. Note that the default value for this has been determined from trial and error. ///@return The current tolerance / scaling factor double getSpacingTolerance() { - return _getSpacingTolerance(reference.pointer).float; + return _getSpacingTolerance( + reference.pointer, _id_getSpacingTolerance as jni.JMethodIDPtr) + .float; } - static final _setSpacingTolerance = jniLookup< + static final _id_setSpacingTolerance = _class.instanceMethodId( + r"setSpacingTolerance", + r"(F)V", + ); + + static final _setSpacingTolerance = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Float)>>("PDFTextStripper__setSpacingTolerance") - .asFunction, double)>(); + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Double,)>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, double)>(); /// from: public void setSpacingTolerance(float spacingToleranceValue) /// @@ -955,14 +1420,27 @@ class PDFTextStripper extends jni.JObject { void setSpacingTolerance( double spacingToleranceValue, ) { - _setSpacingTolerance(reference.pointer, spacingToleranceValue).check(); + _setSpacingTolerance(reference.pointer, + _id_setSpacingTolerance as jni.JMethodIDPtr, spacingToleranceValue) + .check(); } - static final _getAverageCharTolerance = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getAverageCharTolerance") - .asFunction)>(); + static final _id_getAverageCharTolerance = _class.instanceMethodId( + r"getAverageCharTolerance", + r"()F", + ); + + static final _getAverageCharTolerance = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallFloatMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public float getAverageCharTolerance() /// @@ -970,14 +1448,25 @@ class PDFTextStripper extends jni.JObject { /// be added. Note that the default value for this has been determined from trial and error. ///@return The current tolerance / scaling factor double getAverageCharTolerance() { - return _getAverageCharTolerance(reference.pointer).float; + return _getAverageCharTolerance( + reference.pointer, _id_getAverageCharTolerance as jni.JMethodIDPtr) + .float; } - static final _setAverageCharTolerance = jniLookup< + static final _id_setAverageCharTolerance = _class.instanceMethodId( + r"setAverageCharTolerance", + r"(F)V", + ); + + static final _setAverageCharTolerance = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Float)>>("PDFTextStripper__setAverageCharTolerance") - .asFunction, double)>(); + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Double,)>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, double)>(); /// from: public void setAverageCharTolerance(float averageCharToleranceValue) /// @@ -988,15 +1477,29 @@ class PDFTextStripper extends jni.JObject { void setAverageCharTolerance( double averageCharToleranceValue, ) { - _setAverageCharTolerance(reference.pointer, averageCharToleranceValue) + _setAverageCharTolerance( + reference.pointer, + _id_setAverageCharTolerance as jni.JMethodIDPtr, + averageCharToleranceValue) .check(); } - static final _getIndentThreshold = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getIndentThreshold") - .asFunction)>(); + static final _id_getIndentThreshold = _class.instanceMethodId( + r"getIndentThreshold", + r"()F", + ); + + static final _getIndentThreshold = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallFloatMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public float getIndentThreshold() /// @@ -1004,14 +1507,25 @@ class PDFTextStripper extends jni.JObject { /// indented from the previous line start beyond which the current line start is considered to be a paragraph start. ///@return the number of whitespace character widths to use when detecting paragraph indents. double getIndentThreshold() { - return _getIndentThreshold(reference.pointer).float; + return _getIndentThreshold( + reference.pointer, _id_getIndentThreshold as jni.JMethodIDPtr) + .float; } - static final _setIndentThreshold = jniLookup< + static final _id_setIndentThreshold = _class.instanceMethodId( + r"setIndentThreshold", + r"(F)V", + ); + + static final _setIndentThreshold = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Float)>>("PDFTextStripper__setIndentThreshold") - .asFunction, double)>(); + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Double,)>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, double)>(); /// from: public void setIndentThreshold(float indentThresholdValue) /// @@ -1022,14 +1536,27 @@ class PDFTextStripper extends jni.JObject { void setIndentThreshold( double indentThresholdValue, ) { - _setIndentThreshold(reference.pointer, indentThresholdValue).check(); + _setIndentThreshold(reference.pointer, + _id_setIndentThreshold as jni.JMethodIDPtr, indentThresholdValue) + .check(); } - static final _getDropThreshold = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getDropThreshold") - .asFunction)>(); + static final _id_getDropThreshold = _class.instanceMethodId( + r"getDropThreshold", + r"()F", + ); + + static final _getDropThreshold = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallFloatMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public float getDropThreshold() /// @@ -1037,14 +1564,25 @@ class PDFTextStripper extends jni.JObject { /// start is considered to be a paragraph start. ///@return the character height multiple for max allowed whitespace between lines in the same paragraph. double getDropThreshold() { - return _getDropThreshold(reference.pointer).float; + return _getDropThreshold( + reference.pointer, _id_getDropThreshold as jni.JMethodIDPtr) + .float; } - static final _setDropThreshold = jniLookup< + static final _id_setDropThreshold = _class.instanceMethodId( + r"setDropThreshold", + r"(F)V", + ); + + static final _setDropThreshold = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Float)>>("PDFTextStripper__setDropThreshold") - .asFunction, double)>(); + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Double,)>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, double)>(); /// from: public void setDropThreshold(float dropThresholdValue) /// @@ -1055,14 +1593,27 @@ class PDFTextStripper extends jni.JObject { void setDropThreshold( double dropThresholdValue, ) { - _setDropThreshold(reference.pointer, dropThresholdValue).check(); + _setDropThreshold(reference.pointer, + _id_setDropThreshold as jni.JMethodIDPtr, dropThresholdValue) + .check(); } - static final _getParagraphStart = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getParagraphStart") - .asFunction)>(); + static final _id_getParagraphStart = _class.instanceMethodId( + r"getParagraphStart", + r"()Ljava/lang/String;", + ); + + static final _getParagraphStart = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.lang.String getParagraphStart() /// The returned object must be released after use, by calling the [release] method. @@ -1070,17 +1621,26 @@ class PDFTextStripper extends jni.JObject { /// Returns the string which will be used at the beginning of a paragraph. ///@return the paragraph start string jni.JString getParagraphStart() { - return _getParagraphStart(reference.pointer) + return _getParagraphStart( + reference.pointer, _id_getParagraphStart as jni.JMethodIDPtr) .object(const jni.JStringType()); } - static final _setParagraphStart = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDFTextStripper__setParagraphStart") + static final _id_setParagraphStart = _class.instanceMethodId( + r"setParagraphStart", + r"(Ljava/lang/String;)V", + ); + + static final _setParagraphStart = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setParagraphStart(java.lang.String s) /// @@ -1089,14 +1649,27 @@ class PDFTextStripper extends jni.JObject { void setParagraphStart( jni.JString s, ) { - _setParagraphStart(reference.pointer, s.reference.pointer).check(); + _setParagraphStart(reference.pointer, + _id_setParagraphStart as jni.JMethodIDPtr, s.reference.pointer) + .check(); } - static final _getParagraphEnd = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getParagraphEnd") - .asFunction)>(); + static final _id_getParagraphEnd = _class.instanceMethodId( + r"getParagraphEnd", + r"()Ljava/lang/String;", + ); + + static final _getParagraphEnd = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.lang.String getParagraphEnd() /// The returned object must be released after use, by calling the [release] method. @@ -1104,16 +1677,26 @@ class PDFTextStripper extends jni.JObject { /// Returns the string which will be used at the end of a paragraph. ///@return the paragraph end string jni.JString getParagraphEnd() { - return _getParagraphEnd(reference.pointer).object(const jni.JStringType()); + return _getParagraphEnd( + reference.pointer, _id_getParagraphEnd as jni.JMethodIDPtr) + .object(const jni.JStringType()); } - static final _setParagraphEnd = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDFTextStripper__setParagraphEnd") + static final _id_setParagraphEnd = _class.instanceMethodId( + r"setParagraphEnd", + r"(Ljava/lang/String;)V", + ); + + static final _setParagraphEnd = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setParagraphEnd(java.lang.String s) /// @@ -1122,14 +1705,27 @@ class PDFTextStripper extends jni.JObject { void setParagraphEnd( jni.JString s, ) { - _setParagraphEnd(reference.pointer, s.reference.pointer).check(); + _setParagraphEnd(reference.pointer, _id_setParagraphEnd as jni.JMethodIDPtr, + s.reference.pointer) + .check(); } - static final _getPageStart = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getPageStart") - .asFunction)>(); + static final _id_getPageStart = _class.instanceMethodId( + r"getPageStart", + r"()Ljava/lang/String;", + ); + + static final _getPageStart = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.lang.String getPageStart() /// The returned object must be released after use, by calling the [release] method. @@ -1137,16 +1733,26 @@ class PDFTextStripper extends jni.JObject { /// Returns the string which will be used at the beginning of a page. ///@return the page start string jni.JString getPageStart() { - return _getPageStart(reference.pointer).object(const jni.JStringType()); + return _getPageStart( + reference.pointer, _id_getPageStart as jni.JMethodIDPtr) + .object(const jni.JStringType()); } - static final _setPageStart = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDFTextStripper__setPageStart") + static final _id_setPageStart = _class.instanceMethodId( + r"setPageStart", + r"(Ljava/lang/String;)V", + ); + + static final _setPageStart = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setPageStart(java.lang.String pageStartValue) /// @@ -1155,14 +1761,27 @@ class PDFTextStripper extends jni.JObject { void setPageStart( jni.JString pageStartValue, ) { - _setPageStart(reference.pointer, pageStartValue.reference.pointer).check(); + _setPageStart(reference.pointer, _id_setPageStart as jni.JMethodIDPtr, + pageStartValue.reference.pointer) + .check(); } - static final _getPageEnd = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getPageEnd") - .asFunction)>(); + static final _id_getPageEnd = _class.instanceMethodId( + r"getPageEnd", + r"()Ljava/lang/String;", + ); + + static final _getPageEnd = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.lang.String getPageEnd() /// The returned object must be released after use, by calling the [release] method. @@ -1170,16 +1789,25 @@ class PDFTextStripper extends jni.JObject { /// Returns the string which will be used at the end of a page. ///@return the page end string jni.JString getPageEnd() { - return _getPageEnd(reference.pointer).object(const jni.JStringType()); + return _getPageEnd(reference.pointer, _id_getPageEnd as jni.JMethodIDPtr) + .object(const jni.JStringType()); } - static final _setPageEnd = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDFTextStripper__setPageEnd") + static final _id_setPageEnd = _class.instanceMethodId( + r"setPageEnd", + r"(Ljava/lang/String;)V", + ); + + static final _setPageEnd = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setPageEnd(java.lang.String pageEndValue) /// @@ -1188,14 +1816,27 @@ class PDFTextStripper extends jni.JObject { void setPageEnd( jni.JString pageEndValue, ) { - _setPageEnd(reference.pointer, pageEndValue.reference.pointer).check(); + _setPageEnd(reference.pointer, _id_setPageEnd as jni.JMethodIDPtr, + pageEndValue.reference.pointer) + .check(); } - static final _getArticleStart = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getArticleStart") - .asFunction)>(); + static final _id_getArticleStart = _class.instanceMethodId( + r"getArticleStart", + r"()Ljava/lang/String;", + ); + + static final _getArticleStart = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.lang.String getArticleStart() /// The returned object must be released after use, by calling the [release] method. @@ -1203,16 +1844,26 @@ class PDFTextStripper extends jni.JObject { /// Returns the string which will be used at the beginning of an article. ///@return the article start string jni.JString getArticleStart() { - return _getArticleStart(reference.pointer).object(const jni.JStringType()); + return _getArticleStart( + reference.pointer, _id_getArticleStart as jni.JMethodIDPtr) + .object(const jni.JStringType()); } - static final _setArticleStart = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDFTextStripper__setArticleStart") + static final _id_setArticleStart = _class.instanceMethodId( + r"setArticleStart", + r"(Ljava/lang/String;)V", + ); + + static final _setArticleStart = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setArticleStart(java.lang.String articleStartValue) /// @@ -1221,15 +1872,27 @@ class PDFTextStripper extends jni.JObject { void setArticleStart( jni.JString articleStartValue, ) { - _setArticleStart(reference.pointer, articleStartValue.reference.pointer) + _setArticleStart(reference.pointer, _id_setArticleStart as jni.JMethodIDPtr, + articleStartValue.reference.pointer) .check(); } - static final _getArticleEnd = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getArticleEnd") - .asFunction)>(); + static final _id_getArticleEnd = _class.instanceMethodId( + r"getArticleEnd", + r"()Ljava/lang/String;", + ); + + static final _getArticleEnd = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: public java.lang.String getArticleEnd() /// The returned object must be released after use, by calling the [release] method. @@ -1237,16 +1900,26 @@ class PDFTextStripper extends jni.JObject { /// Returns the string which will be used at the end of an article. ///@return the article end string jni.JString getArticleEnd() { - return _getArticleEnd(reference.pointer).object(const jni.JStringType()); + return _getArticleEnd( + reference.pointer, _id_getArticleEnd as jni.JMethodIDPtr) + .object(const jni.JStringType()); } - static final _setArticleEnd = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDFTextStripper__setArticleEnd") + static final _id_setArticleEnd = _class.instanceMethodId( + r"setArticleEnd", + r"(Ljava/lang/String;)V", + ); + + static final _setArticleEnd = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: public void setArticleEnd(java.lang.String articleEndValue) /// @@ -1255,88 +1928,159 @@ class PDFTextStripper extends jni.JObject { void setArticleEnd( jni.JString articleEndValue, ) { - _setArticleEnd(reference.pointer, articleEndValue.reference.pointer) + _setArticleEnd(reference.pointer, _id_setArticleEnd as jni.JMethodIDPtr, + articleEndValue.reference.pointer) .check(); } - static final _writeParagraphSeparator = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__writeParagraphSeparator") - .asFunction)>(); + static final _id_writeParagraphSeparator = _class.instanceMethodId( + r"writeParagraphSeparator", + r"()V", + ); + + static final _writeParagraphSeparator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: protected void writeParagraphSeparator() /// /// writes the paragraph separator string to the output. ///@throws IOException if something went wrong void writeParagraphSeparator() { - _writeParagraphSeparator(reference.pointer).check(); + _writeParagraphSeparator( + reference.pointer, _id_writeParagraphSeparator as jni.JMethodIDPtr) + .check(); } - static final _writeParagraphStart = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__writeParagraphStart") - .asFunction)>(); + static final _id_writeParagraphStart = _class.instanceMethodId( + r"writeParagraphStart", + r"()V", + ); + + static final _writeParagraphStart = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: protected void writeParagraphStart() /// /// Write something (if defined) at the start of a paragraph. ///@throws IOException if something went wrong void writeParagraphStart() { - _writeParagraphStart(reference.pointer).check(); + _writeParagraphStart( + reference.pointer, _id_writeParagraphStart as jni.JMethodIDPtr) + .check(); } - static final _writeParagraphEnd = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__writeParagraphEnd") - .asFunction)>(); + static final _id_writeParagraphEnd = _class.instanceMethodId( + r"writeParagraphEnd", + r"()V", + ); + + static final _writeParagraphEnd = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: protected void writeParagraphEnd() /// /// Write something (if defined) at the end of a paragraph. ///@throws IOException if something went wrong void writeParagraphEnd() { - _writeParagraphEnd(reference.pointer).check(); + _writeParagraphEnd( + reference.pointer, _id_writeParagraphEnd as jni.JMethodIDPtr) + .check(); } - static final _writePageStart = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__writePageStart") - .asFunction)>(); + static final _id_writePageStart = _class.instanceMethodId( + r"writePageStart", + r"()V", + ); + + static final _writePageStart = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: protected void writePageStart() /// /// Write something (if defined) at the start of a page. ///@throws IOException if something went wrong void writePageStart() { - _writePageStart(reference.pointer).check(); + _writePageStart(reference.pointer, _id_writePageStart as jni.JMethodIDPtr) + .check(); } - static final _writePageEnd = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__writePageEnd") - .asFunction)>(); + static final _id_writePageEnd = _class.instanceMethodId( + r"writePageEnd", + r"()V", + ); + + static final _writePageEnd = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: protected void writePageEnd() /// /// Write something (if defined) at the end of a page. ///@throws IOException if something went wrong void writePageEnd() { - _writePageEnd(reference.pointer).check(); + _writePageEnd(reference.pointer, _id_writePageEnd as jni.JMethodIDPtr) + .check(); } - static final _setListItemPatterns = jniLookup< + static final _id_setListItemPatterns = _class.instanceMethodId( + r"setListItemPatterns", + r"(Ljava/util/List;)V", + ); + + static final _setListItemPatterns = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "PDFTextStripper__setListItemPatterns") + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); /// from: protected void setListItemPatterns(java.util.List patterns) /// @@ -1345,14 +2089,29 @@ class PDFTextStripper extends jni.JObject { void setListItemPatterns( jni.JList patterns, ) { - _setListItemPatterns(reference.pointer, patterns.reference.pointer).check(); + _setListItemPatterns( + reference.pointer, + _id_setListItemPatterns as jni.JMethodIDPtr, + patterns.reference.pointer) + .check(); } - static final _getListItemPatterns = jniLookup< - ffi - .NativeFunction)>>( - "PDFTextStripper__getListItemPatterns") - .asFunction)>(); + static final _id_getListItemPatterns = _class.instanceMethodId( + r"getListItemPatterns", + r"()Ljava/util/List;", + ); + + static final _getListItemPatterns = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); /// from: protected java.util.List getListItemPatterns() /// The returned object must be released after use, by calling the [release] method. @@ -1374,16 +2133,28 @@ class PDFTextStripper extends jni.JObject { /// This method returns a list of such regular expression Patterns. ///@return a list of Pattern objects. jni.JList getListItemPatterns() { - return _getListItemPatterns(reference.pointer) + return _getListItemPatterns( + reference.pointer, _id_getListItemPatterns as jni.JMethodIDPtr) .object(const jni.JListType(jni.JObjectType())); } - static final _matchPattern = jniLookup< + static final _id_matchPattern = _class.staticMethodId( + r"matchPattern", + r"(Ljava/lang/String;Ljava/util/List;)Ljava/util/regex/Pattern;", + ); + + static final _matchPattern = ProtectedJniExtensions.lookup< ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("PDFTextStripper__matchPattern") + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") .asFunction< - jni.JniResult Function( + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); /// from: static protected java.util.regex.Pattern matchPattern(java.lang.String string, java.util.List patterns) @@ -1403,7 +2174,11 @@ class PDFTextStripper extends jni.JObject { jni.JString string, jni.JList patterns, ) { - return _matchPattern(string.reference.pointer, patterns.reference.pointer) + return _matchPattern( + _class.reference.pointer, + _id_matchPattern as jni.JMethodIDPtr, + string.reference.pointer, + patterns.reference.pointer) .object(const jni.JObjectType()); } } diff --git a/pkgs/jnigen/example/pdfbox_plugin/linux/CMakeLists.txt b/pkgs/jnigen/example/pdfbox_plugin/linux/CMakeLists.txt index 986e388aa6..ccfca4de73 100644 --- a/pkgs/jnigen/example/pdfbox_plugin/linux/CMakeLists.txt +++ b/pkgs/jnigen/example/pdfbox_plugin/linux/CMakeLists.txt @@ -6,17 +6,3 @@ cmake_minimum_required(VERSION 3.10) # Project-level configuration. set(PROJECT_NAME "pdfbox_plugin") project(${PROJECT_NAME} LANGUAGES CXX) - -# Invoke the build for native code shared with the other target platforms. -# This can be changed to accomodate different builds. -add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../src" "${CMAKE_CURRENT_BINARY_DIR}/shared") - -# List of absolute paths to libraries that should be bundled with the plugin. -# This list could contain prebuilt libraries, or libraries created by an -# external build triggered from this build file. -set(pdfbox_plugin_bundled_libraries - # Defined in ../src/CMakeLists.txt. - # This can be changed to accomodate different builds. - $ - PARENT_SCOPE -) diff --git a/pkgs/jnigen/example/pdfbox_plugin/src/CMakeLists.txt b/pkgs/jnigen/example/pdfbox_plugin/src/CMakeLists.txt deleted file mode 100644 index f353765689..0000000000 --- a/pkgs/jnigen/example/pdfbox_plugin/src/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -# jni_native_build (Build with jni:setup. Do not delete this line.) - -# The Flutter tooling requires that developers have CMake 3.10 or later -# installed. You should not increase this version, as doing so will cause -# the plugin to fail to compile for some customers of the plugin. -cmake_minimum_required(VERSION 3.10) - -project(pdfbox_plugin VERSION 0.0.1 LANGUAGES C) - -add_library(pdfbox_plugin SHARED - "third_party//pdfbox_plugin.c" -) - -set_target_properties(pdfbox_plugin PROPERTIES - OUTPUT_NAME "pdfbox_plugin" -) - -target_compile_definitions(pdfbox_plugin PUBLIC DART_SHARED_LIB) - -if(WIN32) - set_target_properties(${TARGET_NAME} PROPERTIES - LINK_FLAGS "/DELAYLOAD:jvm.dll") -endif() - -if (ANDROID) - target_link_libraries(pdfbox_plugin log) -else() - find_package(Java REQUIRED) - find_package(JNI REQUIRED) - include_directories(${JNI_INCLUDE_DIRS}) - target_link_libraries(pdfbox_plugin ${JNI_LIBRARIES}) -endif() diff --git a/pkgs/jnigen/example/pdfbox_plugin/src/third_party/.clang-format b/pkgs/jnigen/example/pdfbox_plugin/src/third_party/.clang-format deleted file mode 100644 index a256c2f097..0000000000 --- a/pkgs/jnigen/example/pdfbox_plugin/src/third_party/.clang-format +++ /dev/null @@ -1,15 +0,0 @@ -# From dart SDK: https://github.com/dart-lang/sdk/blob/main/.clang-format - -# Defines the Chromium style for automatic reformatting. -# http://clang.llvm.org/docs/ClangFormatStyleOptions.html -BasedOnStyle: Chromium - -# clang-format doesn't seem to do a good job of this for longer comments. -ReflowComments: 'false' - -# We have lots of these. Though we need to put them all in curly braces, -# clang-format can't do that. -AllowShortIfStatementsOnASingleLine: 'true' - -# Put escaped newlines into the rightmost column. -AlignEscapedNewlinesLeft: false diff --git a/pkgs/jnigen/example/pdfbox_plugin/src/third_party/dartjni.h b/pkgs/jnigen/example/pdfbox_plugin/src/third_party/dartjni.h deleted file mode 100644 index f834d1577b..0000000000 --- a/pkgs/jnigen/example/pdfbox_plugin/src/third_party/dartjni.h +++ /dev/null @@ -1,383 +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. - -#pragma once - -// Note: include appropriate system jni.h as found by CMake, not third_party/jni.h. -#include -#include -#include -#include - -#if _WIN32 -#include -#else -#include -#include -#endif - -#if _WIN32 -#define FFI_PLUGIN_EXPORT __declspec(dllexport) -#else -#define FFI_PLUGIN_EXPORT -#endif - -#if defined _WIN32 -#define thread_local __declspec(thread) -#else -#define thread_local __thread -#endif - -#ifdef __ANDROID__ -#include -#endif - -#ifdef __ANDROID__ -#define __ENVP_CAST (JNIEnv**) -#else -#define __ENVP_CAST (void**) -#endif - -/// Locking functions for windows and pthread. - -#if defined _WIN32 -#include - -typedef CRITICAL_SECTION MutexLock; -typedef CONDITION_VARIABLE ConditionVariable; - -static inline void init_lock(MutexLock* lock) { - InitializeCriticalSection(lock); -} - -static inline void acquire_lock(MutexLock* lock) { - EnterCriticalSection(lock); -} - -static inline void release_lock(MutexLock* lock) { - LeaveCriticalSection(lock); -} - -static inline void destroy_lock(MutexLock* lock) { - DeleteCriticalSection(lock); -} - -static inline void init_cond(ConditionVariable* cond) { - InitializeConditionVariable(cond); -} - -static inline void signal_cond(ConditionVariable* cond) { - WakeConditionVariable(cond); -} - -static inline void wait_for(ConditionVariable* cond, MutexLock* lock) { - SleepConditionVariableCS(cond, lock, INFINITE); -} - -static inline void destroy_cond(ConditionVariable* cond) { - // Not available. -} - -static inline void free_mem(void* mem) { - CoTaskMemFree(mem); -} - -#elif defined __APPLE__ || defined __LINUX__ || defined __ANDROID__ || \ - defined __GNUC__ -#include - -typedef pthread_mutex_t MutexLock; -typedef pthread_cond_t ConditionVariable; - -static inline void init_lock(MutexLock* lock) { - pthread_mutex_init(lock, NULL); -} - -static inline void acquire_lock(MutexLock* lock) { - pthread_mutex_lock(lock); -} - -static inline void release_lock(MutexLock* lock) { - pthread_mutex_unlock(lock); -} - -static inline void destroy_lock(MutexLock* lock) { - pthread_mutex_destroy(lock); -} - -static inline void init_cond(ConditionVariable* cond) { - pthread_cond_init(cond, NULL); -} - -static inline void signal_cond(ConditionVariable* cond) { - pthread_cond_signal(cond); -} - -static inline void wait_for(ConditionVariable* cond, MutexLock* lock) { - pthread_cond_wait(cond, lock); -} - -static inline void destroy_cond(ConditionVariable* cond) { - pthread_cond_destroy(cond); -} - -static inline void free_mem(void* mem) { - free(mem); -} - -#else - -#error "No locking/condition variable support; Possibly unsupported platform" - -#endif - -typedef struct CallbackResult { - MutexLock lock; - ConditionVariable cond; - int ready; - jobject object; -} CallbackResult; - -typedef struct JniLocks { - MutexLock classLoadingLock; -} JniLocks; - -/// Represents the error when dart-jni layer has already spawned singleton VM. -#define DART_JNI_SINGLETON_EXISTS (-99); - -/// Stores the global state of the JNI. -typedef struct JniContext { - JavaVM* jvm; - jobject classLoader; - jmethodID loadClassMethod; - jobject currentActivity; - jobject appContext; - JniLocks locks; -} JniContext; - -// jniEnv for this thread, used by inline functions in this header, -// therefore declared as extern. -extern thread_local JNIEnv* jniEnv; - -extern JniContext* jni; - -/// Types used by JNI API to distinguish between primitive types. -enum JniType { - booleanType = 0, - byteType = 1, - shortType = 2, - charType = 3, - intType = 4, - longType = 5, - floatType = 6, - doubleType = 7, - objectType = 8, - voidType = 9, -}; - -/// Result type for use by JNI. -/// -/// If [exception] is null, it means the result is valid. -/// It's assumed that the caller knows the expected type in [result]. -typedef struct JniResult { - jvalue value; - jthrowable exception; -} JniResult; - -/// Similar to [JniResult] but for class lookups. -typedef struct JniClassLookupResult { - jclass value; - jthrowable exception; -} JniClassLookupResult; - -/// Similar to [JniResult] but for method/field ID lookups. -typedef struct JniPointerResult { - const void* value; - jthrowable exception; -} JniPointerResult; - -/// JniExceptionDetails holds 2 jstring objects, one is the result of -/// calling `toString` on exception object, other is stack trace; -typedef struct JniExceptionDetails { - jstring message; - jstring stacktrace; -} JniExceptionDetails; - -/// This struct contains functions which wrap method call / field access conveniently along with -/// exception checking. -/// -/// Flutter embedding checks for pending JNI exceptions before an FFI transition, which requires us -/// to check for and clear the exception before returning to dart code, which requires these functions -/// to return result types. -typedef struct JniAccessorsStruct { - JniClassLookupResult (*getClass)(char* internalName); - JniPointerResult (*getFieldID)(jclass cls, char* fieldName, char* signature); - JniPointerResult (*getStaticFieldID)(jclass cls, - char* fieldName, - char* signature); - JniPointerResult (*getMethodID)(jclass cls, - char* methodName, - char* signature); - JniPointerResult (*getStaticMethodID)(jclass cls, - char* methodName, - char* signature); - JniResult (*newObject)(jclass cls, jmethodID ctor, jvalue* args); - JniResult (*newPrimitiveArray)(jsize length, int type); - JniResult (*newObjectArray)(jsize length, - jclass elementClass, - jobject initialElement); - JniResult (*getArrayElement)(jarray array, int index, int type); - JniResult (*callMethod)(jobject obj, - jmethodID methodID, - int callType, - jvalue* args); - JniResult (*callStaticMethod)(jclass cls, - jmethodID methodID, - int callType, - jvalue* args); - JniResult (*getField)(jobject obj, jfieldID fieldID, int callType); - JniResult (*getStaticField)(jclass cls, jfieldID fieldID, int callType); - JniExceptionDetails (*getExceptionDetails)(jthrowable exception); -} JniAccessorsStruct; - -FFI_PLUGIN_EXPORT JniAccessorsStruct* GetAccessors(); - -FFI_PLUGIN_EXPORT JavaVM* GetJavaVM(void); - -FFI_PLUGIN_EXPORT JNIEnv* GetJniEnv(void); - -/// Spawn a JVM with given arguments. -/// -/// Returns JNI_OK on success, and one of the documented JNI error codes on -/// failure. It returns DART_JNI_SINGLETON_EXISTS if an attempt to spawn multiple -/// JVMs is made, even if the underlying API potentially supports multiple VMs. -FFI_PLUGIN_EXPORT int SpawnJvm(JavaVMInitArgs* args); - -/// Returns Application classLoader (on Android), -/// which can be used to load application and platform classes. -/// -/// On other platforms, NULL is returned. -FFI_PLUGIN_EXPORT jobject GetClassLoader(void); - -/// Returns application context on Android. -/// -/// On other platforms, NULL is returned. -FFI_PLUGIN_EXPORT jobject GetApplicationContext(void); - -/// Returns current activity of the app on Android. -FFI_PLUGIN_EXPORT jobject GetCurrentActivity(void); - -static inline void attach_thread() { - if (jniEnv == NULL) { - (*jni->jvm)->AttachCurrentThread(jni->jvm, __ENVP_CAST & jniEnv, NULL); - } -} - -/// Load class into [cls] using platform specific mechanism -static inline void load_class_platform(jclass* cls, const char* name) { -#ifdef __ANDROID__ - jstring className = (*jniEnv)->NewStringUTF(jniEnv, name); - *cls = (*jniEnv)->CallObjectMethod(jniEnv, jni->classLoader, - jni->loadClassMethod, className); - (*jniEnv)->DeleteLocalRef(jniEnv, className); -#else - *cls = (*jniEnv)->FindClass(jniEnv, name); -#endif -} - -static inline void load_class_global_ref(jclass* cls, const char* name) { - if (*cls == NULL) { - jclass tmp = NULL; - acquire_lock(&jni->locks.classLoadingLock); - if (*cls == NULL) { - load_class_platform(&tmp, name); - if (!(*jniEnv)->ExceptionCheck(jniEnv)) { - *cls = (*jniEnv)->NewGlobalRef(jniEnv, tmp); - (*jniEnv)->DeleteLocalRef(jniEnv, tmp); - } - } - release_lock(&jni->locks.classLoadingLock); - } -} - -static inline void load_method(jclass cls, - jmethodID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetMethodID(jniEnv, cls, name, sig); - } -} - -static inline void load_static_method(jclass cls, - jmethodID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetStaticMethodID(jniEnv, cls, name, sig); - } -} - -static inline void load_field(jclass cls, - jfieldID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetFieldID(jniEnv, cls, name, sig); - } -} - -static inline void load_static_field(jclass cls, - jfieldID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetStaticFieldID(jniEnv, cls, name, sig); - } -} - -static inline jobject to_global_ref(jobject ref) { - jobject g = (*jniEnv)->NewGlobalRef(jniEnv, ref); - (*jniEnv)->DeleteLocalRef(jniEnv, ref); - return g; -} - -// These functions are useful for C+Dart bindings, and not required for pure dart bindings. - -FFI_PLUGIN_EXPORT JniContext* GetJniContextPtr(); - -/// For use by jni_gen's generated code -/// don't use these. - -// these 2 fn ptr vars will be defined by generated code library -extern JniContext* (*context_getter)(void); -extern JNIEnv* (*env_getter)(void); - -// this function will be exported by generated code library -// it will set above 2 variables. -FFI_PLUGIN_EXPORT void setJniGetters(struct JniContext* (*cg)(void), - JNIEnv* (*eg)(void)); - -static inline void load_env() { - if (jniEnv == NULL) { - jni = context_getter(); - jniEnv = env_getter(); - } -} - -static inline jthrowable check_exception() { - jthrowable exception = (*jniEnv)->ExceptionOccurred(jniEnv); - if (exception != NULL) (*jniEnv)->ExceptionClear(jniEnv); - if (exception == NULL) return NULL; - return to_global_ref(exception); -} - -static inline JniResult to_global_ref_result(jobject ref) { - JniResult result; - result.exception = check_exception(); - if (result.exception == NULL) { - result.value.l = to_global_ref(ref); - } - return result; -} diff --git a/pkgs/jnigen/example/pdfbox_plugin/src/third_party/pdfbox_plugin.c b/pkgs/jnigen/example/pdfbox_plugin/src/third_party/pdfbox_plugin.c deleted file mode 100644 index 6b111335ce..0000000000 --- a/pkgs/jnigen/example/pdfbox_plugin/src/third_party/pdfbox_plugin.c +++ /dev/null @@ -1,2872 +0,0 @@ -// Generated from Apache PDFBox library which is licensed under the Apache License 2.0. -// The following copyright from the original authors applies. -// -// Licensed to the Apache Software Foundation (ASF) under one or more -// contributor license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright ownership. -// The ASF licenses this file to You under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance with -// the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Autogenerated by jnigen. DO NOT EDIT! - -#include -#include "dartjni.h" -#include "jni.h" - -thread_local JNIEnv* jniEnv; -JniContext* jni; - -JniContext* (*context_getter)(void); -JNIEnv* (*env_getter)(void); - -void setJniGetters(JniContext* (*cg)(void), JNIEnv* (*eg)(void)) { - context_getter = cg; - env_getter = eg; -} - -// org.apache.pdfbox.pdmodel.PDDocument -jclass _c_PDDocument = NULL; - -jmethodID _m_PDDocument__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__new0() { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__new0, "", "()V"); - if (_m_PDDocument__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_PDDocument, _m_PDDocument__new0); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__new1 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__new1(jobject memUsageSetting) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__new1, "", - "(Lorg/apache/pdfbox/io/MemoryUsageSetting;)V"); - if (_m_PDDocument__new1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_PDDocument, - _m_PDDocument__new1, memUsageSetting); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__new2 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__new2(jobject doc) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__new2, "", - "(Lorg/apache/pdfbox/cos/COSDocument;)V"); - if (_m_PDDocument__new2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_PDDocument, _m_PDDocument__new2, doc); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__new3 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__new3(jobject doc, jobject source) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__new3, "", - "(Lorg/apache/pdfbox/cos/COSDocument;Lorg/apache/pdfbox/io/" - "RandomAccessRead;)V"); - if (_m_PDDocument__new3 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_PDDocument, - _m_PDDocument__new3, doc, source); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__new4 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__new4(jobject doc, jobject source, jobject permission) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__new4, "", - "(Lorg/apache/pdfbox/cos/COSDocument;Lorg/apache/pdfbox/io/" - "RandomAccessRead;Lorg/apache/pdfbox/pdmodel/encryption/" - "AccessPermission;)V"); - if (_m_PDDocument__new4 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject( - jniEnv, _c_PDDocument, _m_PDDocument__new4, doc, source, permission); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__addPage = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__addPage(jobject self_, jobject page) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__addPage, "addPage", - "(Lorg/apache/pdfbox/pdmodel/PDPage;)V"); - if (_m_PDDocument__addPage == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__addPage, page); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__addSignature = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__addSignature(jobject self_, jobject sigObject) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__addSignature, "addSignature", - "(Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/" - "PDSignature;)V"); - if (_m_PDDocument__addSignature == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__addSignature, - sigObject); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__addSignature1 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__addSignature1(jobject self_, - jobject sigObject, - jobject options) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__addSignature1, "addSignature", - "(Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/" - "PDSignature;Lorg/apache/pdfbox/pdmodel/interactive/" - "digitalsignature/SignatureOptions;)V"); - if (_m_PDDocument__addSignature1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__addSignature1, - sigObject, options); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__addSignature2 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__addSignature2(jobject self_, - jobject sigObject, - jobject signatureInterface) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__addSignature2, "addSignature", - "(Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/" - "PDSignature;Lorg/apache/pdfbox/pdmodel/interactive/" - "digitalsignature/SignatureInterface;)V"); - if (_m_PDDocument__addSignature2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__addSignature2, - sigObject, signatureInterface); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__addSignature3 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__addSignature3(jobject self_, - jobject sigObject, - jobject signatureInterface, - jobject options) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__addSignature3, "addSignature", - "(Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/" - "PDSignature;Lorg/apache/pdfbox/pdmodel/interactive/" - "digitalsignature/SignatureInterface;Lorg/apache/pdfbox/pdmodel/" - "interactive/digitalsignature/SignatureOptions;)V"); - if (_m_PDDocument__addSignature3 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__addSignature3, - sigObject, signatureInterface, options); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__addSignatureField = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__addSignatureField(jobject self_, - jobject sigFields, - jobject signatureInterface, - jobject options) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__addSignatureField, - "addSignatureField", - "(Ljava/util/List;Lorg/apache/pdfbox/pdmodel/interactive/" - "digitalsignature/SignatureInterface;Lorg/apache/pdfbox/pdmodel/" - "interactive/digitalsignature/SignatureOptions;)V"); - if (_m_PDDocument__addSignatureField == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__addSignatureField, - sigFields, signatureInterface, options); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__removePage = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__removePage(jobject self_, jobject page) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__removePage, "removePage", - "(Lorg/apache/pdfbox/pdmodel/PDPage;)V"); - if (_m_PDDocument__removePage == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__removePage, page); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__removePage1 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__removePage1(jobject self_, int32_t pageNumber) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__removePage1, "removePage", "(I)V"); - if (_m_PDDocument__removePage1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__removePage1, - pageNumber); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__importPage = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__importPage(jobject self_, jobject page) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_PDDocument, &_m_PDDocument__importPage, "importPage", - "(Lorg/apache/pdfbox/pdmodel/PDPage;)Lorg/apache/pdfbox/pdmodel/PDPage;"); - if (_m_PDDocument__importPage == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocument__importPage, page); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__getDocument = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__getDocument(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__getDocument, "getDocument", - "()Lorg/apache/pdfbox/cos/COSDocument;"); - if (_m_PDDocument__getDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_PDDocument__getDocument); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__getDocumentInformation = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__getDocumentInformation(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__getDocumentInformation, - "getDocumentInformation", - "()Lorg/apache/pdfbox/pdmodel/PDDocumentInformation;"); - if (_m_PDDocument__getDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocument__getDocumentInformation); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__setDocumentInformation = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__setDocumentInformation(jobject self_, jobject info) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__setDocumentInformation, - "setDocumentInformation", - "(Lorg/apache/pdfbox/pdmodel/PDDocumentInformation;)V"); - if (_m_PDDocument__setDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_PDDocument__setDocumentInformation, info); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__getDocumentCatalog = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__getDocumentCatalog(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__getDocumentCatalog, - "getDocumentCatalog", - "()Lorg/apache/pdfbox/pdmodel/PDDocumentCatalog;"); - if (_m_PDDocument__getDocumentCatalog == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocument__getDocumentCatalog); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__isEncrypted = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__isEncrypted(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__isEncrypted, "isEncrypted", "()Z"); - if (_m_PDDocument__isEncrypted == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = - (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_PDDocument__isEncrypted); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__getEncryption = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__getEncryption(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__getEncryption, "getEncryption", - "()Lorg/apache/pdfbox/pdmodel/encryption/PDEncryption;"); - if (_m_PDDocument__getEncryption == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_PDDocument__getEncryption); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__setEncryptionDictionary = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__setEncryptionDictionary(jobject self_, - jobject encryption) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__setEncryptionDictionary, - "setEncryptionDictionary", - "(Lorg/apache/pdfbox/pdmodel/encryption/PDEncryption;)V"); - if (_m_PDDocument__setEncryptionDictionary == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_PDDocument__setEncryptionDictionary, encryption); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__getLastSignatureDictionary = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__getLastSignatureDictionary(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_PDDocument, &_m_PDDocument__getLastSignatureDictionary, - "getLastSignatureDictionary", - "()Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature;"); - if (_m_PDDocument__getLastSignatureDictionary == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocument__getLastSignatureDictionary); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__getSignatureFields = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__getSignatureFields(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__getSignatureFields, - "getSignatureFields", "()Ljava/util/List;"); - if (_m_PDDocument__getSignatureFields == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocument__getSignatureFields); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__getSignatureDictionaries = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__getSignatureDictionaries(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__getSignatureDictionaries, - "getSignatureDictionaries", "()Ljava/util/List;"); - if (_m_PDDocument__getSignatureDictionaries == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocument__getSignatureDictionaries); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__registerTrueTypeFontForClosing = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__registerTrueTypeFontForClosing(jobject self_, - jobject ttf) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__registerTrueTypeFontForClosing, - "registerTrueTypeFontForClosing", - "(Lorg/apache/fontbox/ttf/TrueTypeFont;)V"); - if (_m_PDDocument__registerTrueTypeFontForClosing == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_PDDocument__registerTrueTypeFontForClosing, ttf); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__load = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__load(jobject file) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_PDDocument, &_m_PDDocument__load, "load", - "(Ljava/io/File;)Lorg/apache/pdfbox/pdmodel/PDDocument;"); - if (_m_PDDocument__load == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_PDDocument, _m_PDDocument__load, file); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__load1 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__load1(jobject file, jobject memUsageSetting) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_PDDocument, &_m_PDDocument__load1, "load", - "(Ljava/io/File;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/apache/" - "pdfbox/pdmodel/PDDocument;"); - if (_m_PDDocument__load1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_PDDocument, _m_PDDocument__load1, file, memUsageSetting); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__load2 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__load2(jobject file, jobject password) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_PDDocument, &_m_PDDocument__load2, "load", - "(Ljava/io/File;Ljava/lang/String;)Lorg/apache/pdfbox/" - "pdmodel/PDDocument;"); - if (_m_PDDocument__load2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_PDDocument, _m_PDDocument__load2, file, password); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__load3 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__load3(jobject file, - jobject password, - jobject memUsageSetting) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_PDDocument, &_m_PDDocument__load3, "load", - "(Ljava/io/File;Ljava/lang/String;Lorg/apache/pdfbox/io/" - "MemoryUsageSetting;)Lorg/apache/pdfbox/pdmodel/PDDocument;"); - if (_m_PDDocument__load3 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_PDDocument, _m_PDDocument__load3, file, password, - memUsageSetting); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__load4 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__load4(jobject file, - jobject password, - jobject keyStore, - jobject alias) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_PDDocument, &_m_PDDocument__load4, "load", - "(Ljava/io/File;Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/" - "String;)Lorg/apache/pdfbox/pdmodel/PDDocument;"); - if (_m_PDDocument__load4 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_PDDocument, _m_PDDocument__load4, file, password, keyStore, - alias); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__load5 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__load5(jobject file, - jobject password, - jobject keyStore, - jobject alias, - jobject memUsageSetting) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_PDDocument, &_m_PDDocument__load5, "load", - "(Ljava/io/File;Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/" - "String;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/apache/pdfbox/" - "pdmodel/PDDocument;"); - if (_m_PDDocument__load5 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_PDDocument, _m_PDDocument__load5, file, password, keyStore, - alias, memUsageSetting); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__load6 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__load6(jobject input) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_PDDocument, &_m_PDDocument__load6, "load", - "(Ljava/io/InputStream;)Lorg/apache/pdfbox/pdmodel/PDDocument;"); - if (_m_PDDocument__load6 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_PDDocument, _m_PDDocument__load6, input); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__load7 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__load7(jobject input, jobject memUsageSetting) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_PDDocument, &_m_PDDocument__load7, "load", - "(Ljava/io/InputStream;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/" - "apache/pdfbox/pdmodel/PDDocument;"); - if (_m_PDDocument__load7 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_PDDocument, _m_PDDocument__load7, input, memUsageSetting); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__load8 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__load8(jobject input, jobject password) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_PDDocument, &_m_PDDocument__load8, "load", - "(Ljava/io/InputStream;Ljava/lang/String;)Lorg/apache/" - "pdfbox/pdmodel/PDDocument;"); - if (_m_PDDocument__load8 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_PDDocument, _m_PDDocument__load8, input, password); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__load9 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__load9(jobject input, - jobject password, - jobject keyStore, - jobject alias) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_PDDocument, &_m_PDDocument__load9, "load", - "(Ljava/io/InputStream;Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/" - "String;)Lorg/apache/pdfbox/pdmodel/PDDocument;"); - if (_m_PDDocument__load9 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_PDDocument, _m_PDDocument__load9, input, password, keyStore, - alias); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__load10 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__load10(jobject input, - jobject password, - jobject memUsageSetting) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_PDDocument, &_m_PDDocument__load10, "load", - "(Ljava/io/InputStream;Ljava/lang/String;Lorg/apache/pdfbox/io/" - "MemoryUsageSetting;)Lorg/apache/pdfbox/pdmodel/PDDocument;"); - if (_m_PDDocument__load10 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_PDDocument, _m_PDDocument__load10, input, password, - memUsageSetting); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__load11 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__load11(jobject input, - jobject password, - jobject keyStore, - jobject alias, - jobject memUsageSetting) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_PDDocument, &_m_PDDocument__load11, "load", - "(Ljava/io/InputStream;Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/" - "String;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/apache/pdfbox/" - "pdmodel/PDDocument;"); - if (_m_PDDocument__load11 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_PDDocument, _m_PDDocument__load11, input, password, keyStore, - alias, memUsageSetting); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__load12 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__load12(jobject input) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_PDDocument, &_m_PDDocument__load12, "load", - "([B)Lorg/apache/pdfbox/pdmodel/PDDocument;"); - if (_m_PDDocument__load12 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_PDDocument, _m_PDDocument__load12, input); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__load13 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__load13(jobject input, jobject password) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_PDDocument, &_m_PDDocument__load13, "load", - "([BLjava/lang/String;)Lorg/apache/pdfbox/pdmodel/PDDocument;"); - if (_m_PDDocument__load13 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_PDDocument, _m_PDDocument__load13, input, password); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__load14 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__load14(jobject input, - jobject password, - jobject keyStore, - jobject alias) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_PDDocument, &_m_PDDocument__load14, "load", - "([BLjava/lang/String;Ljava/io/InputStream;Ljava/lang/" - "String;)Lorg/apache/pdfbox/pdmodel/PDDocument;"); - if (_m_PDDocument__load14 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_PDDocument, _m_PDDocument__load14, input, password, keyStore, - alias); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__load15 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__load15(jobject input, - jobject password, - jobject keyStore, - jobject alias, - jobject memUsageSetting) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_PDDocument, &_m_PDDocument__load15, "load", - "([BLjava/lang/String;Ljava/io/InputStream;Ljava/lang/String;Lorg/apache/" - "pdfbox/io/MemoryUsageSetting;)Lorg/apache/pdfbox/pdmodel/PDDocument;"); - if (_m_PDDocument__load15 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_PDDocument, _m_PDDocument__load15, input, password, keyStore, - alias, memUsageSetting); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__save = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__save(jobject self_, jobject fileName) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__save, "save", - "(Ljava/lang/String;)V"); - if (_m_PDDocument__save == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__save, fileName); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__save1 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__save1(jobject self_, jobject file) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__save1, "save", - "(Ljava/io/File;)V"); - if (_m_PDDocument__save1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__save1, file); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__save2 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__save2(jobject self_, jobject output) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__save2, "save", - "(Ljava/io/OutputStream;)V"); - if (_m_PDDocument__save2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__save2, output); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__saveIncremental = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__saveIncremental(jobject self_, jobject output) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__saveIncremental, "saveIncremental", - "(Ljava/io/OutputStream;)V"); - if (_m_PDDocument__saveIncremental == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__saveIncremental, - output); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__saveIncremental1 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__saveIncremental1(jobject self_, - jobject output, - jobject objectsToWrite) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__saveIncremental1, - "saveIncremental", "(Ljava/io/OutputStream;Ljava/util/Set;)V"); - if (_m_PDDocument__saveIncremental1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__saveIncremental1, - output, objectsToWrite); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__saveIncrementalForExternalSigning = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__saveIncrementalForExternalSigning(jobject self_, - jobject output) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__saveIncrementalForExternalSigning, - "saveIncrementalForExternalSigning", - "(Ljava/io/OutputStream;)Lorg/apache/pdfbox/pdmodel/interactive/" - "digitalsignature/ExternalSigningSupport;"); - if (_m_PDDocument__saveIncrementalForExternalSigning == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocument__saveIncrementalForExternalSigning, output); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__getPage = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__getPage(jobject self_, int32_t pageIndex) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__getPage, "getPage", - "(I)Lorg/apache/pdfbox/pdmodel/PDPage;"); - if (_m_PDDocument__getPage == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocument__getPage, pageIndex); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__getPages = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__getPages(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__getPages, "getPages", - "()Lorg/apache/pdfbox/pdmodel/PDPageTree;"); - if (_m_PDDocument__getPages == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_PDDocument__getPages); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__getNumberOfPages = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__getNumberOfPages(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__getNumberOfPages, - "getNumberOfPages", "()I"); - if (_m_PDDocument__getNumberOfPages == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = - (*jniEnv)->CallIntMethod(jniEnv, self_, _m_PDDocument__getNumberOfPages); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__close = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__close(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__close, "close", "()V"); - if (_m_PDDocument__close == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__close); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__protect = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__protect(jobject self_, jobject policy) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__protect, "protect", - "(Lorg/apache/pdfbox/pdmodel/encryption/ProtectionPolicy;)V"); - if (_m_PDDocument__protect == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__protect, policy); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__getCurrentAccessPermission = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__getCurrentAccessPermission(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__getCurrentAccessPermission, - "getCurrentAccessPermission", - "()Lorg/apache/pdfbox/pdmodel/encryption/AccessPermission;"); - if (_m_PDDocument__getCurrentAccessPermission == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocument__getCurrentAccessPermission); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__isAllSecurityToBeRemoved = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__isAllSecurityToBeRemoved(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__isAllSecurityToBeRemoved, - "isAllSecurityToBeRemoved", "()Z"); - if (_m_PDDocument__isAllSecurityToBeRemoved == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_PDDocument__isAllSecurityToBeRemoved); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__setAllSecurityToBeRemoved = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__setAllSecurityToBeRemoved(jobject self_, - uint8_t removeAllSecurity) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__setAllSecurityToBeRemoved, - "setAllSecurityToBeRemoved", "(Z)V"); - if (_m_PDDocument__setAllSecurityToBeRemoved == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_PDDocument__setAllSecurityToBeRemoved, - removeAllSecurity); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__getDocumentId = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__getDocumentId(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__getDocumentId, "getDocumentId", - "()Ljava/lang/Long;"); - if (_m_PDDocument__getDocumentId == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_PDDocument__getDocumentId); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__setDocumentId = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__setDocumentId(jobject self_, jobject docId) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__setDocumentId, "setDocumentId", - "(Ljava/lang/Long;)V"); - if (_m_PDDocument__setDocumentId == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__setDocumentId, docId); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__getVersion = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__getVersion(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__getVersion, "getVersion", "()F"); - if (_m_PDDocument__getVersion == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - float _result = - (*jniEnv)->CallFloatMethod(jniEnv, self_, _m_PDDocument__getVersion); - return (JniResult){.value = {.f = _result}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__setVersion = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__setVersion(jobject self_, float newVersion) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__setVersion, "setVersion", "(F)V"); - if (_m_PDDocument__setVersion == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__setVersion, - newVersion); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocument__getResourceCache = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__getResourceCache(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__getResourceCache, - "getResourceCache", - "()Lorg/apache/pdfbox/pdmodel/ResourceCache;"); - if (_m_PDDocument__getResourceCache == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocument__getResourceCache); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocument__setResourceCache = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocument__setResourceCache(jobject self_, jobject resourceCache) { - load_env(); - load_class_global_ref(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument"); - if (_c_PDDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocument, &_m_PDDocument__setResourceCache, - "setResourceCache", - "(Lorg/apache/pdfbox/pdmodel/ResourceCache;)V"); - if (_m_PDDocument__setResourceCache == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__setResourceCache, - resourceCache); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -// org.apache.pdfbox.pdmodel.PDDocumentInformation -jclass _c_PDDocumentInformation = NULL; - -jmethodID _m_PDDocumentInformation__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__new0() { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__new0, - "", "()V"); - if (_m_PDDocumentInformation__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_PDDocumentInformation, - _m_PDDocumentInformation__new0); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocumentInformation__new1 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__new1(jobject dic) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__new1, - "", "(Lorg/apache/pdfbox/cos/COSDictionary;)V"); - if (_m_PDDocumentInformation__new1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_PDDocumentInformation, - _m_PDDocumentInformation__new1, dic); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocumentInformation__getCOSObject = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__getCOSObject(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__getCOSObject, - "getCOSObject", "()Lorg/apache/pdfbox/cos/COSDictionary;"); - if (_m_PDDocumentInformation__getCOSObject == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocumentInformation__getCOSObject); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocumentInformation__getPropertyStringValue = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__getPropertyStringValue(jobject self_, - jobject propertyKey) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, - &_m_PDDocumentInformation__getPropertyStringValue, - "getPropertyStringValue", - "(Ljava/lang/String;)Ljava/lang/Object;"); - if (_m_PDDocumentInformation__getPropertyStringValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocumentInformation__getPropertyStringValue, - propertyKey); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocumentInformation__getTitle = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__getTitle(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__getTitle, - "getTitle", "()Ljava/lang/String;"); - if (_m_PDDocumentInformation__getTitle == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocumentInformation__getTitle); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocumentInformation__setTitle = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__setTitle(jobject self_, jobject title) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__setTitle, - "setTitle", "(Ljava/lang/String;)V"); - if (_m_PDDocumentInformation__setTitle == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocumentInformation__setTitle, - title); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocumentInformation__getAuthor = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__getAuthor(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__getAuthor, - "getAuthor", "()Ljava/lang/String;"); - if (_m_PDDocumentInformation__getAuthor == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocumentInformation__getAuthor); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocumentInformation__setAuthor = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__setAuthor(jobject self_, jobject author) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__setAuthor, - "setAuthor", "(Ljava/lang/String;)V"); - if (_m_PDDocumentInformation__setAuthor == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocumentInformation__setAuthor, - author); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocumentInformation__getSubject = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__getSubject(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__getSubject, - "getSubject", "()Ljava/lang/String;"); - if (_m_PDDocumentInformation__getSubject == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocumentInformation__getSubject); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocumentInformation__setSubject = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__setSubject(jobject self_, jobject subject) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__setSubject, - "setSubject", "(Ljava/lang/String;)V"); - if (_m_PDDocumentInformation__setSubject == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocumentInformation__setSubject, - subject); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocumentInformation__getKeywords = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__getKeywords(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__getKeywords, - "getKeywords", "()Ljava/lang/String;"); - if (_m_PDDocumentInformation__getKeywords == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocumentInformation__getKeywords); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocumentInformation__setKeywords = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__setKeywords(jobject self_, jobject keywords) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__setKeywords, - "setKeywords", "(Ljava/lang/String;)V"); - if (_m_PDDocumentInformation__setKeywords == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_PDDocumentInformation__setKeywords, keywords); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocumentInformation__getCreator = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__getCreator(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__getCreator, - "getCreator", "()Ljava/lang/String;"); - if (_m_PDDocumentInformation__getCreator == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocumentInformation__getCreator); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocumentInformation__setCreator = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__setCreator(jobject self_, jobject creator) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__setCreator, - "setCreator", "(Ljava/lang/String;)V"); - if (_m_PDDocumentInformation__setCreator == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocumentInformation__setCreator, - creator); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocumentInformation__getProducer = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__getProducer(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__getProducer, - "getProducer", "()Ljava/lang/String;"); - if (_m_PDDocumentInformation__getProducer == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocumentInformation__getProducer); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocumentInformation__setProducer = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__setProducer(jobject self_, jobject producer) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__setProducer, - "setProducer", "(Ljava/lang/String;)V"); - if (_m_PDDocumentInformation__setProducer == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_PDDocumentInformation__setProducer, producer); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocumentInformation__getCreationDate = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__getCreationDate(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, - &_m_PDDocumentInformation__getCreationDate, "getCreationDate", - "()Ljava/util/Calendar;"); - if (_m_PDDocumentInformation__getCreationDate == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocumentInformation__getCreationDate); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocumentInformation__setCreationDate = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__setCreationDate(jobject self_, jobject date) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, - &_m_PDDocumentInformation__setCreationDate, "setCreationDate", - "(Ljava/util/Calendar;)V"); - if (_m_PDDocumentInformation__setCreationDate == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_PDDocumentInformation__setCreationDate, date); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocumentInformation__getModificationDate = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__getModificationDate(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, - &_m_PDDocumentInformation__getModificationDate, - "getModificationDate", "()Ljava/util/Calendar;"); - if (_m_PDDocumentInformation__getModificationDate == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocumentInformation__getModificationDate); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocumentInformation__setModificationDate = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__setModificationDate(jobject self_, - jobject date) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, - &_m_PDDocumentInformation__setModificationDate, - "setModificationDate", "(Ljava/util/Calendar;)V"); - if (_m_PDDocumentInformation__setModificationDate == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod( - jniEnv, self_, _m_PDDocumentInformation__setModificationDate, date); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocumentInformation__getTrapped = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__getTrapped(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__getTrapped, - "getTrapped", "()Ljava/lang/String;"); - if (_m_PDDocumentInformation__getTrapped == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocumentInformation__getTrapped); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocumentInformation__getMetadataKeys = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__getMetadataKeys(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, - &_m_PDDocumentInformation__getMetadataKeys, "getMetadataKeys", - "()Ljava/util/Set;"); - if (_m_PDDocumentInformation__getMetadataKeys == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocumentInformation__getMetadataKeys); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocumentInformation__getCustomMetadataValue = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__getCustomMetadataValue(jobject self_, - jobject fieldName) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, - &_m_PDDocumentInformation__getCustomMetadataValue, - "getCustomMetadataValue", - "(Ljava/lang/String;)Ljava/lang/String;"); - if (_m_PDDocumentInformation__getCustomMetadataValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDDocumentInformation__getCustomMetadataValue, - fieldName); - return to_global_ref_result(_result); -} - -jmethodID _m_PDDocumentInformation__setCustomMetadataValue = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__setCustomMetadataValue(jobject self_, - jobject fieldName, - jobject fieldValue) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, - &_m_PDDocumentInformation__setCustomMetadataValue, - "setCustomMetadataValue", - "(Ljava/lang/String;Ljava/lang/String;)V"); - if (_m_PDDocumentInformation__setCustomMetadataValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_PDDocumentInformation__setCustomMetadataValue, - fieldName, fieldValue); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDDocumentInformation__setTrapped = NULL; -FFI_PLUGIN_EXPORT -JniResult PDDocumentInformation__setTrapped(jobject self_, jobject value) { - load_env(); - load_class_global_ref(&_c_PDDocumentInformation, - "org/apache/pdfbox/pdmodel/PDDocumentInformation"); - if (_c_PDDocumentInformation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__setTrapped, - "setTrapped", "(Ljava/lang/String;)V"); - if (_m_PDDocumentInformation__setTrapped == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocumentInformation__setTrapped, - value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -// org.apache.pdfbox.text.PDFTextStripper -jclass _c_PDFTextStripper = NULL; - -jmethodID _m_PDFTextStripper__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__new0() { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__new0, "", "()V"); - if (_m_PDFTextStripper__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_PDFTextStripper, - _m_PDFTextStripper__new0); - return to_global_ref_result(_result); -} - -jmethodID _m_PDFTextStripper__getText = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getText(jobject self_, jobject doc) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getText, "getText", - "(Lorg/apache/pdfbox/pdmodel/PDDocument;)Ljava/lang/String;"); - if (_m_PDFTextStripper__getText == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDFTextStripper__getText, doc); - return to_global_ref_result(_result); -} - -jmethodID _m_PDFTextStripper__writeText = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__writeText(jobject self_, - jobject doc, - jobject outputStream) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writeText, "writeText", - "(Lorg/apache/pdfbox/pdmodel/PDDocument;Ljava/io/Writer;)V"); - if (_m_PDFTextStripper__writeText == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__writeText, doc, - outputStream); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__processPages = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__processPages(jobject self_, jobject pages) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__processPages, - "processPages", "(Lorg/apache/pdfbox/pdmodel/PDPageTree;)V"); - if (_m_PDFTextStripper__processPages == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__processPages, - pages); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__startDocument = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__startDocument(jobject self_, jobject document) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__startDocument, - "startDocument", "(Lorg/apache/pdfbox/pdmodel/PDDocument;)V"); - if (_m_PDFTextStripper__startDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__startDocument, - document); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__endDocument = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__endDocument(jobject self_, jobject document) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__endDocument, - "endDocument", "(Lorg/apache/pdfbox/pdmodel/PDDocument;)V"); - if (_m_PDFTextStripper__endDocument == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__endDocument, - document); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__processPage = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__processPage(jobject self_, jobject page) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__processPage, - "processPage", "(Lorg/apache/pdfbox/pdmodel/PDPage;)V"); - if (_m_PDFTextStripper__processPage == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__processPage, - page); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__startArticle = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__startArticle(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__startArticle, - "startArticle", "()V"); - if (_m_PDFTextStripper__startArticle == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__startArticle); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__startArticle1 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__startArticle1(jobject self_, uint8_t isLTR) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__startArticle1, - "startArticle", "(Z)V"); - if (_m_PDFTextStripper__startArticle1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__startArticle1, - isLTR); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__endArticle = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__endArticle(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__endArticle, "endArticle", - "()V"); - if (_m_PDFTextStripper__endArticle == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__endArticle); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__startPage = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__startPage(jobject self_, jobject page) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__startPage, "startPage", - "(Lorg/apache/pdfbox/pdmodel/PDPage;)V"); - if (_m_PDFTextStripper__startPage == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__startPage, page); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__endPage = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__endPage(jobject self_, jobject page) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__endPage, "endPage", - "(Lorg/apache/pdfbox/pdmodel/PDPage;)V"); - if (_m_PDFTextStripper__endPage == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__endPage, page); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__writePage = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__writePage(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writePage, "writePage", - "()V"); - if (_m_PDFTextStripper__writePage == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__writePage); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__writeLineSeparator = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__writeLineSeparator(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writeLineSeparator, - "writeLineSeparator", "()V"); - if (_m_PDFTextStripper__writeLineSeparator == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_PDFTextStripper__writeLineSeparator); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__writeWordSeparator = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__writeWordSeparator(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writeWordSeparator, - "writeWordSeparator", "()V"); - if (_m_PDFTextStripper__writeWordSeparator == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_PDFTextStripper__writeWordSeparator); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__writeCharacters = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__writeCharacters(jobject self_, jobject text) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writeCharacters, - "writeCharacters", "(Lorg/apache/pdfbox/text/TextPosition;)V"); - if (_m_PDFTextStripper__writeCharacters == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__writeCharacters, - text); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__writeString = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__writeString(jobject self_, - jobject text, - jobject textPositions) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writeString, - "writeString", "(Ljava/lang/String;Ljava/util/List;)V"); - if (_m_PDFTextStripper__writeString == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__writeString, - text, textPositions); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__writeString1 = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__writeString1(jobject self_, jobject text) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writeString1, - "writeString", "(Ljava/lang/String;)V"); - if (_m_PDFTextStripper__writeString1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__writeString1, - text); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__processTextPosition = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__processTextPosition(jobject self_, jobject text) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__processTextPosition, - "processTextPosition", - "(Lorg/apache/pdfbox/text/TextPosition;)V"); - if (_m_PDFTextStripper__processTextPosition == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_PDFTextStripper__processTextPosition, text); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__getStartPage = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getStartPage(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getStartPage, - "getStartPage", "()I"); - if (_m_PDFTextStripper__getStartPage == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = - (*jniEnv)->CallIntMethod(jniEnv, self_, _m_PDFTextStripper__getStartPage); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__setStartPage = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__setStartPage(jobject self_, int32_t startPageValue) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setStartPage, - "setStartPage", "(I)V"); - if (_m_PDFTextStripper__setStartPage == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setStartPage, - startPageValue); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__getEndPage = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getEndPage(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getEndPage, "getEndPage", - "()I"); - if (_m_PDFTextStripper__getEndPage == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = - (*jniEnv)->CallIntMethod(jniEnv, self_, _m_PDFTextStripper__getEndPage); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__setEndPage = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__setEndPage(jobject self_, int32_t endPageValue) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setEndPage, "setEndPage", - "(I)V"); - if (_m_PDFTextStripper__setEndPage == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setEndPage, - endPageValue); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__setLineSeparator = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__setLineSeparator(jobject self_, jobject separator) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setLineSeparator, - "setLineSeparator", "(Ljava/lang/String;)V"); - if (_m_PDFTextStripper__setLineSeparator == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setLineSeparator, - separator); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__getLineSeparator = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getLineSeparator(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getLineSeparator, - "getLineSeparator", "()Ljava/lang/String;"); - if (_m_PDFTextStripper__getLineSeparator == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDFTextStripper__getLineSeparator); - return to_global_ref_result(_result); -} - -jmethodID _m_PDFTextStripper__getWordSeparator = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getWordSeparator(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getWordSeparator, - "getWordSeparator", "()Ljava/lang/String;"); - if (_m_PDFTextStripper__getWordSeparator == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDFTextStripper__getWordSeparator); - return to_global_ref_result(_result); -} - -jmethodID _m_PDFTextStripper__setWordSeparator = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__setWordSeparator(jobject self_, jobject separator) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setWordSeparator, - "setWordSeparator", "(Ljava/lang/String;)V"); - if (_m_PDFTextStripper__setWordSeparator == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setWordSeparator, - separator); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__getSuppressDuplicateOverlappingText = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getSuppressDuplicateOverlappingText(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, - &_m_PDFTextStripper__getSuppressDuplicateOverlappingText, - "getSuppressDuplicateOverlappingText", "()Z"); - if (_m_PDFTextStripper__getSuppressDuplicateOverlappingText == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_PDFTextStripper__getSuppressDuplicateOverlappingText); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__getCurrentPageNo = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getCurrentPageNo(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getCurrentPageNo, - "getCurrentPageNo", "()I"); - if (_m_PDFTextStripper__getCurrentPageNo == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallIntMethod( - jniEnv, self_, _m_PDFTextStripper__getCurrentPageNo); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__getOutput = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getOutput(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getOutput, "getOutput", - "()Ljava/io/Writer;"); - if (_m_PDFTextStripper__getOutput == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_PDFTextStripper__getOutput); - return to_global_ref_result(_result); -} - -jmethodID _m_PDFTextStripper__getCharactersByArticle = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getCharactersByArticle(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getCharactersByArticle, - "getCharactersByArticle", "()Ljava/util/List;"); - if (_m_PDFTextStripper__getCharactersByArticle == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDFTextStripper__getCharactersByArticle); - return to_global_ref_result(_result); -} - -jmethodID _m_PDFTextStripper__setSuppressDuplicateOverlappingText = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__setSuppressDuplicateOverlappingText( - jobject self_, - uint8_t suppressDuplicateOverlappingTextValue) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, - &_m_PDFTextStripper__setSuppressDuplicateOverlappingText, - "setSuppressDuplicateOverlappingText", "(Z)V"); - if (_m_PDFTextStripper__setSuppressDuplicateOverlappingText == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod( - jniEnv, self_, _m_PDFTextStripper__setSuppressDuplicateOverlappingText, - suppressDuplicateOverlappingTextValue); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__getSeparateByBeads = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getSeparateByBeads(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getSeparateByBeads, - "getSeparateByBeads", "()Z"); - if (_m_PDFTextStripper__getSeparateByBeads == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_PDFTextStripper__getSeparateByBeads); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__setShouldSeparateByBeads = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__setShouldSeparateByBeads( - jobject self_, - uint8_t aShouldSeparateByBeads) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setShouldSeparateByBeads, - "setShouldSeparateByBeads", "(Z)V"); - if (_m_PDFTextStripper__setShouldSeparateByBeads == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_PDFTextStripper__setShouldSeparateByBeads, - aShouldSeparateByBeads); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__getEndBookmark = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getEndBookmark(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getEndBookmark, - "getEndBookmark", - "()Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/" - "outline/PDOutlineItem;"); - if (_m_PDFTextStripper__getEndBookmark == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDFTextStripper__getEndBookmark); - return to_global_ref_result(_result); -} - -jmethodID _m_PDFTextStripper__setEndBookmark = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__setEndBookmark(jobject self_, jobject aEndBookmark) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setEndBookmark, - "setEndBookmark", - "(Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/" - "outline/PDOutlineItem;)V"); - if (_m_PDFTextStripper__setEndBookmark == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setEndBookmark, - aEndBookmark); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__getStartBookmark = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getStartBookmark(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getStartBookmark, - "getStartBookmark", - "()Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/" - "outline/PDOutlineItem;"); - if (_m_PDFTextStripper__getStartBookmark == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDFTextStripper__getStartBookmark); - return to_global_ref_result(_result); -} - -jmethodID _m_PDFTextStripper__setStartBookmark = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__setStartBookmark(jobject self_, - jobject aStartBookmark) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setStartBookmark, - "setStartBookmark", - "(Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/" - "outline/PDOutlineItem;)V"); - if (_m_PDFTextStripper__setStartBookmark == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setStartBookmark, - aStartBookmark); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__getAddMoreFormatting = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getAddMoreFormatting(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getAddMoreFormatting, - "getAddMoreFormatting", "()Z"); - if (_m_PDFTextStripper__getAddMoreFormatting == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_PDFTextStripper__getAddMoreFormatting); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__setAddMoreFormatting = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__setAddMoreFormatting(jobject self_, - uint8_t newAddMoreFormatting) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setAddMoreFormatting, - "setAddMoreFormatting", "(Z)V"); - if (_m_PDFTextStripper__setAddMoreFormatting == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_PDFTextStripper__setAddMoreFormatting, - newAddMoreFormatting); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__getSortByPosition = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getSortByPosition(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getSortByPosition, - "getSortByPosition", "()Z"); - if (_m_PDFTextStripper__getSortByPosition == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_PDFTextStripper__getSortByPosition); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__setSortByPosition = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__setSortByPosition(jobject self_, - uint8_t newSortByPosition) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setSortByPosition, - "setSortByPosition", "(Z)V"); - if (_m_PDFTextStripper__setSortByPosition == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod( - jniEnv, self_, _m_PDFTextStripper__setSortByPosition, newSortByPosition); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__getSpacingTolerance = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getSpacingTolerance(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getSpacingTolerance, - "getSpacingTolerance", "()F"); - if (_m_PDFTextStripper__getSpacingTolerance == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - float _result = (*jniEnv)->CallFloatMethod( - jniEnv, self_, _m_PDFTextStripper__getSpacingTolerance); - return (JniResult){.value = {.f = _result}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__setSpacingTolerance = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__setSpacingTolerance(jobject self_, - float spacingToleranceValue) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setSpacingTolerance, - "setSpacingTolerance", "(F)V"); - if (_m_PDFTextStripper__setSpacingTolerance == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_PDFTextStripper__setSpacingTolerance, - spacingToleranceValue); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__getAverageCharTolerance = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getAverageCharTolerance(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getAverageCharTolerance, - "getAverageCharTolerance", "()F"); - if (_m_PDFTextStripper__getAverageCharTolerance == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - float _result = (*jniEnv)->CallFloatMethod( - jniEnv, self_, _m_PDFTextStripper__getAverageCharTolerance); - return (JniResult){.value = {.f = _result}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__setAverageCharTolerance = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__setAverageCharTolerance( - jobject self_, - float averageCharToleranceValue) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setAverageCharTolerance, - "setAverageCharTolerance", "(F)V"); - if (_m_PDFTextStripper__setAverageCharTolerance == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_PDFTextStripper__setAverageCharTolerance, - averageCharToleranceValue); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__getIndentThreshold = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getIndentThreshold(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getIndentThreshold, - "getIndentThreshold", "()F"); - if (_m_PDFTextStripper__getIndentThreshold == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - float _result = (*jniEnv)->CallFloatMethod( - jniEnv, self_, _m_PDFTextStripper__getIndentThreshold); - return (JniResult){.value = {.f = _result}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__setIndentThreshold = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__setIndentThreshold(jobject self_, - float indentThresholdValue) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setIndentThreshold, - "setIndentThreshold", "(F)V"); - if (_m_PDFTextStripper__setIndentThreshold == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_PDFTextStripper__setIndentThreshold, - indentThresholdValue); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__getDropThreshold = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getDropThreshold(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getDropThreshold, - "getDropThreshold", "()F"); - if (_m_PDFTextStripper__getDropThreshold == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - float _result = (*jniEnv)->CallFloatMethod( - jniEnv, self_, _m_PDFTextStripper__getDropThreshold); - return (JniResult){.value = {.f = _result}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__setDropThreshold = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__setDropThreshold(jobject self_, - float dropThresholdValue) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setDropThreshold, - "setDropThreshold", "(F)V"); - if (_m_PDFTextStripper__setDropThreshold == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setDropThreshold, - dropThresholdValue); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__getParagraphStart = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getParagraphStart(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getParagraphStart, - "getParagraphStart", "()Ljava/lang/String;"); - if (_m_PDFTextStripper__getParagraphStart == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDFTextStripper__getParagraphStart); - return to_global_ref_result(_result); -} - -jmethodID _m_PDFTextStripper__setParagraphStart = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__setParagraphStart(jobject self_, jobject s) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setParagraphStart, - "setParagraphStart", "(Ljava/lang/String;)V"); - if (_m_PDFTextStripper__setParagraphStart == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_PDFTextStripper__setParagraphStart, s); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__getParagraphEnd = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getParagraphEnd(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getParagraphEnd, - "getParagraphEnd", "()Ljava/lang/String;"); - if (_m_PDFTextStripper__getParagraphEnd == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDFTextStripper__getParagraphEnd); - return to_global_ref_result(_result); -} - -jmethodID _m_PDFTextStripper__setParagraphEnd = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__setParagraphEnd(jobject self_, jobject s) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setParagraphEnd, - "setParagraphEnd", "(Ljava/lang/String;)V"); - if (_m_PDFTextStripper__setParagraphEnd == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setParagraphEnd, - s); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__getPageStart = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getPageStart(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getPageStart, - "getPageStart", "()Ljava/lang/String;"); - if (_m_PDFTextStripper__getPageStart == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDFTextStripper__getPageStart); - return to_global_ref_result(_result); -} - -jmethodID _m_PDFTextStripper__setPageStart = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__setPageStart(jobject self_, jobject pageStartValue) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setPageStart, - "setPageStart", "(Ljava/lang/String;)V"); - if (_m_PDFTextStripper__setPageStart == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setPageStart, - pageStartValue); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__getPageEnd = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getPageEnd(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getPageEnd, "getPageEnd", - "()Ljava/lang/String;"); - if (_m_PDFTextStripper__getPageEnd == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, - _m_PDFTextStripper__getPageEnd); - return to_global_ref_result(_result); -} - -jmethodID _m_PDFTextStripper__setPageEnd = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__setPageEnd(jobject self_, jobject pageEndValue) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setPageEnd, "setPageEnd", - "(Ljava/lang/String;)V"); - if (_m_PDFTextStripper__setPageEnd == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setPageEnd, - pageEndValue); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__getArticleStart = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getArticleStart(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getArticleStart, - "getArticleStart", "()Ljava/lang/String;"); - if (_m_PDFTextStripper__getArticleStart == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDFTextStripper__getArticleStart); - return to_global_ref_result(_result); -} - -jmethodID _m_PDFTextStripper__setArticleStart = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__setArticleStart(jobject self_, - jobject articleStartValue) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setArticleStart, - "setArticleStart", "(Ljava/lang/String;)V"); - if (_m_PDFTextStripper__setArticleStart == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setArticleStart, - articleStartValue); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__getArticleEnd = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getArticleEnd(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getArticleEnd, - "getArticleEnd", "()Ljava/lang/String;"); - if (_m_PDFTextStripper__getArticleEnd == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDFTextStripper__getArticleEnd); - return to_global_ref_result(_result); -} - -jmethodID _m_PDFTextStripper__setArticleEnd = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__setArticleEnd(jobject self_, - jobject articleEndValue) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setArticleEnd, - "setArticleEnd", "(Ljava/lang/String;)V"); - if (_m_PDFTextStripper__setArticleEnd == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setArticleEnd, - articleEndValue); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__writeParagraphSeparator = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__writeParagraphSeparator(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writeParagraphSeparator, - "writeParagraphSeparator", "()V"); - if (_m_PDFTextStripper__writeParagraphSeparator == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_PDFTextStripper__writeParagraphSeparator); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__writeParagraphStart = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__writeParagraphStart(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writeParagraphStart, - "writeParagraphStart", "()V"); - if (_m_PDFTextStripper__writeParagraphStart == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_PDFTextStripper__writeParagraphStart); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__writeParagraphEnd = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__writeParagraphEnd(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writeParagraphEnd, - "writeParagraphEnd", "()V"); - if (_m_PDFTextStripper__writeParagraphEnd == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_PDFTextStripper__writeParagraphEnd); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__writePageStart = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__writePageStart(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writePageStart, - "writePageStart", "()V"); - if (_m_PDFTextStripper__writePageStart == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__writePageStart); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__writePageEnd = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__writePageEnd(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writePageEnd, - "writePageEnd", "()V"); - if (_m_PDFTextStripper__writePageEnd == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__writePageEnd); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__setListItemPatterns = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__setListItemPatterns(jobject self_, - jobject patterns) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setListItemPatterns, - "setListItemPatterns", "(Ljava/util/List;)V"); - if (_m_PDFTextStripper__setListItemPatterns == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_PDFTextStripper__setListItemPatterns, patterns); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_PDFTextStripper__getListItemPatterns = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__getListItemPatterns(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getListItemPatterns, - "getListItemPatterns", "()Ljava/util/List;"); - if (_m_PDFTextStripper__getListItemPatterns == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_PDFTextStripper__getListItemPatterns); - return to_global_ref_result(_result); -} - -jmethodID _m_PDFTextStripper__matchPattern = NULL; -FFI_PLUGIN_EXPORT -JniResult PDFTextStripper__matchPattern(jobject string, jobject patterns) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_PDFTextStripper, &_m_PDFTextStripper__matchPattern, "matchPattern", - "(Ljava/lang/String;Ljava/util/List;)Ljava/util/regex/Pattern;"); - if (_m_PDFTextStripper__matchPattern == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_PDFTextStripper, _m_PDFTextStripper__matchPattern, string, - patterns); - return to_global_ref_result(_result); -} - -jfieldID _f_PDFTextStripper__LINE_SEPARATOR = NULL; -FFI_PLUGIN_EXPORT -JniResult get_PDFTextStripper__LINE_SEPARATOR(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_PDFTextStripper, &_f_PDFTextStripper__LINE_SEPARATOR, - "LINE_SEPARATOR", "Ljava/lang/String;"); - jobject _result = (*jniEnv)->GetObjectField( - jniEnv, self_, _f_PDFTextStripper__LINE_SEPARATOR); - return to_global_ref_result(_result); -} - -jfieldID _f_PDFTextStripper__charactersByArticle = NULL; -FFI_PLUGIN_EXPORT -JniResult get_PDFTextStripper__charactersByArticle(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_PDFTextStripper, &_f_PDFTextStripper__charactersByArticle, - "charactersByArticle", "Ljava/util/ArrayList;"); - jobject _result = (*jniEnv)->GetObjectField( - jniEnv, self_, _f_PDFTextStripper__charactersByArticle); - return to_global_ref_result(_result); -} - -FFI_PLUGIN_EXPORT -JniResult set_PDFTextStripper__charactersByArticle(jobject self_, - jobject value) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_PDFTextStripper, &_f_PDFTextStripper__charactersByArticle, - "charactersByArticle", "Ljava/util/ArrayList;"); - (*jniEnv)->SetObjectField(jniEnv, self_, - _f_PDFTextStripper__charactersByArticle, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jfieldID _f_PDFTextStripper__document = NULL; -FFI_PLUGIN_EXPORT -JniResult get_PDFTextStripper__document(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_PDFTextStripper, &_f_PDFTextStripper__document, "document", - "Lorg/apache/pdfbox/pdmodel/PDDocument;"); - jobject _result = - (*jniEnv)->GetObjectField(jniEnv, self_, _f_PDFTextStripper__document); - return to_global_ref_result(_result); -} - -FFI_PLUGIN_EXPORT -JniResult set_PDFTextStripper__document(jobject self_, jobject value) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_PDFTextStripper, &_f_PDFTextStripper__document, "document", - "Lorg/apache/pdfbox/pdmodel/PDDocument;"); - (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDFTextStripper__document, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jfieldID _f_PDFTextStripper__output = NULL; -FFI_PLUGIN_EXPORT -JniResult get_PDFTextStripper__output(jobject self_) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_PDFTextStripper, &_f_PDFTextStripper__output, "output", - "Ljava/io/Writer;"); - jobject _result = - (*jniEnv)->GetObjectField(jniEnv, self_, _f_PDFTextStripper__output); - return to_global_ref_result(_result); -} - -FFI_PLUGIN_EXPORT -JniResult set_PDFTextStripper__output(jobject self_, jobject value) { - load_env(); - load_class_global_ref(&_c_PDFTextStripper, - "org/apache/pdfbox/text/PDFTextStripper"); - if (_c_PDFTextStripper == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_PDFTextStripper, &_f_PDFTextStripper__output, "output", - "Ljava/io/Writer;"); - (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDFTextStripper__output, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} diff --git a/pkgs/jnigen/example/pdfbox_plugin/windows/CMakeLists.txt b/pkgs/jnigen/example/pdfbox_plugin/windows/CMakeLists.txt index 3d9bd5c701..0413ac97a3 100644 --- a/pkgs/jnigen/example/pdfbox_plugin/windows/CMakeLists.txt +++ b/pkgs/jnigen/example/pdfbox_plugin/windows/CMakeLists.txt @@ -7,17 +7,3 @@ cmake_minimum_required(VERSION 3.14) # Project-level configuration. set(PROJECT_NAME "pdfbox_plugin") project(${PROJECT_NAME} LANGUAGES CXX) - -# Invoke the build for native code shared with the other target platforms. -# This can be changed to accomodate different builds. -add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../src" "${CMAKE_CURRENT_BINARY_DIR}/shared") - -# List of absolute paths to libraries that should be bundled with the plugin. -# This list could contain prebuilt libraries, or libraries created by an -# external build triggered from this build file. -set(pdfbox_plugin_bundled_libraries - # Defined in ../src/CMakeLists.txt. - # This can be changed to accomodate different builds. - $ - PARENT_SCOPE -) diff --git a/pkgs/jnigen/java/src/main/java/com/github/dart_lang/jnigen/apisummarizer/SummarizerOptions.java b/pkgs/jnigen/java/src/main/java/com/github/dart_lang/jnigen/apisummarizer/SummarizerOptions.java index 8a3e5450cd..70b7408e5c 100644 --- a/pkgs/jnigen/java/src/main/java/com/github/dart_lang/jnigen/apisummarizer/SummarizerOptions.java +++ b/pkgs/jnigen/java/src/main/java/com/github/dart_lang/jnigen/apisummarizer/SummarizerOptions.java @@ -1,5 +1,6 @@ package com.github.dart_lang.jnigen.apisummarizer; +import java.io.PrintWriter; import java.util.Arrays; import org.apache.commons.cli.*; @@ -63,15 +64,22 @@ public static SummarizerOptions parseArgs(String[] args) { try { cmd = parser.parse(options, args); if (cmd.getArgs().length < 1) { - throw new ParseException("Need to specify paths to source files"); + throw new ParseException("Need to specify the package or class names"); } } catch (ParseException e) { - System.out.println(e.getMessage()); + System.err.println(e.getMessage()); help.printHelp( + new PrintWriter(System.err, true), + help.getWidth(), "java -jar [-s ] " + "[-c ] \n" + "Class or package names should be fully qualified.\n\n", - options); + null, + options, + help.getLeftPadding(), + help.getDescPadding(), + null, + false); System.exit(1); throw new RuntimeException("Unreachable code"); } diff --git a/pkgs/jnigen/lib/src/bindings/c_generator.dart b/pkgs/jnigen/lib/src/bindings/c_generator.dart deleted file mode 100644 index b99e7136a8..0000000000 --- a/pkgs/jnigen/lib/src/bindings/c_generator.dart +++ /dev/null @@ -1,386 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import 'dart:io'; - -import '../config/config.dart'; -import '../elements/elements.dart'; -import '../logging/logging.dart'; -import '../util/find_package.dart'; -import '../util/string_util.dart'; -import 'visitor.dart'; - -class CFieldName extends Visitor { - const CFieldName(); - - @override - String visit(Field node) { - final className = node.classDecl.uniqueName; - final fieldName = node.finalName; - return '${className}__$fieldName'; - } -} - -class CMethodName extends Visitor { - const CMethodName(); - - @override - String visit(Method node) { - final className = node.classDecl.uniqueName; - final methodName = node.finalName; - return '${className}__$methodName'; - } -} - -class CGenerator extends Visitor> { - static const _prelude = '''// Autogenerated by jnigen. DO NOT EDIT! - -#include -#include "jni.h" -#include "dartjni.h" - -thread_local JNIEnv *jniEnv; -JniContext *jni; - -JniContext *(*context_getter)(void); -JNIEnv *(*env_getter)(void); - -void setJniGetters(JniContext *(*cg)(void), - JNIEnv *(*eg)(void)) { - context_getter = cg; - env_getter = eg; -} - -'''; - - final Config config; - - CGenerator(this.config); - - Future _copyFileFromPackage(String package, String relPath, Uri target, - {String Function(String)? transform}) async { - final packagePath = await findPackageRoot(package); - if (packagePath != null) { - final sourceFile = File.fromUri(packagePath.resolve(relPath)); - final targetFile = await File.fromUri(target).create(recursive: true); - var source = await sourceFile.readAsString(); - if (transform != null) { - source = transform(source); - } - await targetFile.writeAsString(source); - } else { - log.warning('package $package not found! ' - 'skipped copying ${target.toFilePath()}'); - } - } - - @override - Future visit(Classes node) async { - // Write C file and init file. - final cConfig = config.outputConfig.cConfig!; - final cRoot = cConfig.path; - final preamble = config.preamble; - log.info("Using c root = $cRoot"); - final libraryName = cConfig.libraryName; - log.info('Creating dart init file ...'); - // Create C file. - final subdir = cConfig.subdir ?? '.'; - final cFileRelativePath = '$subdir/$libraryName.c'; - final cFile = await File.fromUri(cRoot.resolve(cFileRelativePath)) - .create(recursive: true); - final cFileStream = cFile.openWrite(); - // Write C Bindings. - if (preamble != null) { - cFileStream.writeln(preamble); - } - cFileStream.write(_prelude); - final classGenerator = _CClassGenerator(config, cFileStream); - for (final classDecl in node.decls.values) { - classDecl.accept(classGenerator); - } - await cFileStream.close(); - log.info('Copying auxiliary files...'); - for (final file in ['dartjni.h', '.clang-format']) { - await _copyFileFromPackage( - 'jni', 'src/$file', cRoot.resolve('$subdir/$file')); - } - await _copyFileFromPackage( - 'jnigen', 'cmake/CMakeLists.txt.tmpl', cRoot.resolve('CMakeLists.txt'), - transform: (s) { - return s - .replaceAll('{{LIBRARY_NAME}}', libraryName) - .replaceAll('{{SUBDIR}}', subdir); - }); - log.info('Running clang-format on C bindings'); - try { - final clangFormat = Process.runSync('clang-format', ['-i', cFile.path]); - if (clangFormat.exitCode != 0) { - printError(clangFormat.stderr); - log.warning('clang-format exited with ${clangFormat.exitCode}'); - } - } on ProcessException catch (e) { - log.warning('cannot run clang-format: $e'); - } - } -} - -const _classVarPrefix = '_c_'; -const _jniResultType = 'JniResult'; -const _loadEnvCall = 'load_env();'; -const _ifError = - '(JniResult){.value = {.j = 0}, .exception = check_exception()}'; - -class _CClassGenerator extends Visitor { - final Config config; - final StringSink s; - - _CClassGenerator(this.config, this.s); - - @override - void visit(ClassDecl node) { - final classNameInC = node.uniqueName; - final classVar = '$_classVarPrefix$classNameInC'; - // Global variable in C that holds the reference to class. - s.write('''// ${node.binaryName} -jclass $classVar = NULL; - -'''); - - final methodGenerator = _CMethodGenerator(config, s); - for (final method in node.methods) { - method.accept(methodGenerator); - } - - final fieldGenerator = _CFieldGenerator(config, s); - for (final field in node.fields) { - field.accept(fieldGenerator); - } - } -} - -class _CLoadClassGenerator extends Visitor { - _CLoadClassGenerator(); - - @override - String visit(ClassDecl node) { - final classVar = '$_classVarPrefix${node.uniqueName}'; - return ''' load_class_global_ref(&$classVar, "${node.internalName}"); - if ($classVar == NULL) return $_ifError;'''; - } -} - -class _CMethodGenerator extends Visitor { - static const _methodVarPrefix = '_m_'; - - final Config config; - final StringSink s; - - _CMethodGenerator(this.config, this.s); - - @override - void visit(Method node) { - final classNameInC = node.classDecl.uniqueName; - - final cMethodName = node.accept(const CMethodName()); - final classRef = '$_classVarPrefix$classNameInC'; - final methodId = '$_methodVarPrefix$cMethodName'; - final cMethodParams = [ - if (!node.isCtor && !node.isStatic) 'jobject self_', - ...node.params.accept(const _CParamGenerator(addReturnType: true)), - ].join(','); - final jniSignature = node.descriptor; - final ifStaticMethodID = node.isStatic ? 'static_' : ''; - - var javaReturnType = node.returnType.type; - if (node.isCtor) { - javaReturnType = DeclaredType( - binaryName: node.classDecl.binaryName, - ); - } - final callType = node.returnType.accept(const _CTypeCallSite()); - final callArgs = [ - 'jniEnv', - if (!node.isCtor && !node.isStatic) 'self_' else classRef, - methodId, - ...node.params.accept(const _CParamGenerator(addReturnType: false)) - ].join(', '); - - var ifAssignResult = ''; - if (javaReturnType.name != 'void') { - ifAssignResult = - '${javaReturnType.accept(const _CReturnType())} _result = '; - } - - final ifStaticCall = node.isStatic ? 'Static' : ''; - final envMethod = - node.isCtor ? 'NewObject' : 'Call$ifStaticCall${callType}Method'; - final returnResultIfAny = javaReturnType.accept(const _CResult()); - s.write(''' -jmethodID $methodId = NULL; -FFI_PLUGIN_EXPORT -$_jniResultType $cMethodName($cMethodParams) { - $_loadEnvCall - ${node.classDecl.accept(_CLoadClassGenerator())} - load_${ifStaticMethodID}method($classRef, - &$methodId, "${node.name}", "$jniSignature"); - if ($methodId == NULL) return $_ifError; - $ifAssignResult(*jniEnv)->$envMethod($callArgs); - $returnResultIfAny -} - -'''); - } -} - -class _CFieldGenerator extends Visitor { - static const _fieldVarPrefix = '_f_'; - - final Config config; - final StringSink s; - - _CFieldGenerator(this.config, this.s); - - @override - void visit(Field node) { - final cClassName = node.classDecl.uniqueName; - - final fieldName = node.finalName; - final fieldNameInC = node.accept(const CFieldName()); - final fieldVar = "$_fieldVarPrefix$fieldNameInC"; - - // If the field is final and default is assigned, then no need to wrap - // this field. It should then be a constant in dart code. - if (node.isStatic && - node.isFinal && - node.defaultValue != null && - (node.defaultValue is num || node.defaultValue is bool)) { - return; - } - - s.write('jfieldID $fieldVar = NULL;\n'); - - final classVar = '$_classVarPrefix$cClassName'; - void writeAccessor({bool isSetter = false}) { - const cReturnType = _jniResultType; - final cMethodPrefix = isSetter ? 'set' : 'get'; - final formalArgs = [ - if (!node.isStatic) 'jobject self_', - if (isSetter) '${node.type.accept(const _CReturnType())} value', - ].join(', '); - final ifStaticField = node.isStatic ? 'static_' : ''; - final ifStaticCall = node.isStatic ? 'Static' : ''; - final callType = node.type.accept(const _CTypeCallSite()); - final objectArgument = node.isStatic ? classVar : 'self_'; - - String accessorStatements; - if (isSetter) { - accessorStatements = - ' (*jniEnv)->Set$ifStaticCall${callType}Field(jniEnv, ' - '$objectArgument, $fieldVar, value);\n' - ' return $_ifError;'; - } else { - final getterExpr = - '(*jniEnv)->Get$ifStaticCall${callType}Field(jniEnv, ' - '$objectArgument, $fieldVar)'; - final cResultType = node.type.accept(const _CReturnType()); - final result = node.type.accept(const _CResult()); - accessorStatements = ''' $cResultType _result = $getterExpr; - $result'''; - } - s.write(''' -FFI_PLUGIN_EXPORT -$cReturnType ${cMethodPrefix}_$fieldNameInC($formalArgs) { - $_loadEnvCall - ${node.classDecl.accept(_CLoadClassGenerator())} - load_${ifStaticField}field($classVar, &$fieldVar, "$fieldName", - "${node.type.descriptor}"); -$accessorStatements -} - -'''); - } - - writeAccessor(isSetter: false); - if (node.isFinal) { - return; - } - writeAccessor(isSetter: true); - } -} - -class _CParamGenerator extends Visitor { - /// These should be avoided in parameter names. - static const _cTypeKeywords = { - 'short', - 'char', - 'int', - 'long', - 'float', - 'double', - }; - - const _CParamGenerator({required this.addReturnType}); - - final bool addReturnType; - - @override - String visit(Param node) { - final paramName = - (_cTypeKeywords.contains(node.name) ? '${node.name}0' : node.name) - .replaceAll('\$', '_'); - if (addReturnType) { - final type = node.type.accept(const _CReturnType()); - return '$type $paramName'; - } - return paramName; - } -} - -class _CReturnType extends TypeVisitor { - const _CReturnType(); - - @override - String visitNonPrimitiveType(ReferredType node) { - return 'jobject'; - } - - @override - String visitPrimitiveType(PrimitiveType node) { - return node.cType; - } -} - -class _CTypeCallSite extends TypeVisitor { - const _CTypeCallSite(); - - @override - String visitNonPrimitiveType(ReferredType node) { - return 'Object'; - } - - @override - String visitPrimitiveType(PrimitiveType node) { - return node.name.capitalize(); - } -} - -class _CResult extends TypeVisitor { - const _CResult(); - - @override - String visitNonPrimitiveType(ReferredType node) { - return 'return to_global_ref_result(_result);'; - } - - @override - String visitPrimitiveType(PrimitiveType node) { - if (node.name == 'void') { - return 'return $_ifError;'; - } - // The union field is the same as the type's signature, but in lowercase. - final unionField = node.signature.toLowerCase(); - return 'return (JniResult){.value = {.$unionField = _result}, ' - '.exception = check_exception()};'; - } -} diff --git a/pkgs/jnigen/lib/src/bindings/dart_generator.dart b/pkgs/jnigen/lib/src/bindings/dart_generator.dart index 79f093b50a..987eaa7199 100644 --- a/pkgs/jnigen/lib/src/bindings/dart_generator.dart +++ b/pkgs/jnigen/lib/src/bindings/dart_generator.dart @@ -11,7 +11,6 @@ import '../config/experiments.dart'; import '../elements/elements.dart'; import '../logging/logging.dart'; import '../util/string_util.dart'; -import 'c_generator.dart'; import 'resolver.dart'; import 'visitor.dart'; @@ -27,6 +26,7 @@ const _jGlobalReference = '$_jni.JGlobalReference'; const _jArray = '$_jni.JArray'; const _jObject = '$_jni.JObject'; const _jResult = '$_jni.JniResult'; +const _jThrowable = '$_jni.JThrowablePtr'; // package:ffi types. const _voidPointer = '$_ffi.Pointer<$_ffi.Void>'; @@ -37,7 +37,6 @@ const _typeParamPrefix = '\$'; // Misc. const _protectedExtension = 'ProtectedJniExtensions'; const _classRef = '_class'; -const _lookup = 'jniLookup'; /// Used for C bindings. const _selfPointer = 'reference.pointer'; @@ -123,22 +122,6 @@ class DartGenerator extends Visitor> { DartGenerator(this.config); - static const cInitImport = 'import "dart:ffi" as ffi;\n' - 'import "package:jni/internal_helpers_for_jnigen.dart";\n'; - - /// Initialization code for C based bindings. - /// - /// Should be called once in a package. In package-structured bindings - /// this is placed in _init.dart in package root. - String get cInitCode => ''' -// Auto-generated initialization code. - -final $_ffi.Pointer Function(String sym) $_lookup = - $_protectedExtension.initGeneratedLibrary("${config.outputConfig.cConfig!.libraryName}"); - - -'''; - static const autoGeneratedNotice = '// Autogenerated by jnigen. ' 'DO NOT EDIT!\n\n'; static const defaultImports = ''' @@ -188,22 +171,18 @@ import "package:jni/jni.dart" as jni; @override Future visit(Classes node) async { - final cBased = config.outputConfig.bindingsType == BindingsType.cBased; final root = config.outputConfig.dartConfig.path; final preamble = config.preamble ?? ''; if (config.outputConfig.dartConfig.structure == OutputStructure.singleFile) { final file = File.fromUri(root); await file.create(recursive: true); - log.info("Generating ${cBased ? "C + Dart" : "Pure Dart"} Bindings"); + log.info("Generating bindings"); final s = file.openWrite(); s.writeln(preamble); s.writeln(autoGeneratedNotice); s.writeln(defaultLintSuppressions); s.writeln(defaultImports); - if (cBased) { - s.writeln(cInitCode); - } final resolver = Resolver( importedClasses: config.importedClasses, currentClass: null, // Single file mode. @@ -230,17 +209,6 @@ import "package:jni/jni.dart" as jni; } log.info("Using dart root = $root"); - const initFileName = '_init.dart'; - if (cBased) { - final initFileUri = root.resolve(initFileName); - final initFile = File.fromUri(initFileUri); - await initFile.create(recursive: true); - final initStream = initFile.openWrite(); - initStream.writeln(preamble); - initStream.writeln(cInitImport); - initStream.writeln(cInitCode); - await initStream.close(); - } for (var fileClassName in files.keys) { final relativeFileName = '${fileClassName.replaceAll('.', '/')}.dart'; final dartFileUri = root.resolve(relativeFileName); @@ -254,14 +222,6 @@ import "package:jni/jni.dart" as jni; dartFileStream.writeln(defaultLintSuppressions); dartFileStream.writeln(defaultImports); final s = StringBuffer(); - if (cBased) { - final initFilePath = ('../' * - relativeFileName.codeUnits - .where((cu) => cu == '/'.codeUnitAt(0)) - .length) + - initFileName; - s.write('import "$initFilePath";'); - } final resolver = Resolver( importedClasses: config.importedClasses, currentClass: fileClassName, @@ -308,9 +268,6 @@ class _ClassGenerator extends Visitor { @override void visit(ClassDecl node) { - final isDartOnly = - config.outputConfig.bindingsType == BindingsType.dartOnly; - // Docs. s.write('/// from: ${node.binaryName}\n'); node.javadoc?.accept(_DocGenerator(s, depth: 0)); @@ -369,13 +326,11 @@ class $name$typeParamsDef extends $superName { '''); - if (isDartOnly) { - final internalName = node.internalName; - s.write(''' + final internalName = node.internalName; + s.write(''' static final $_classRef = $_jni.JClass.forName(r"$internalName"); '''); - } // Static TypeClass getter. s.writeln( @@ -908,6 +863,15 @@ class _TypeSig extends TypeVisitor { @override String visitPrimitiveType(PrimitiveType node) { + if (isFfi) { + // TODO(https://github.com/dart-lang/sdk/issues/55471): Once this lands in + // the stable, use the actual types instead. + if (node.name == 'float' || node.name == 'double') { + return '$_ffi.Double'; + } else { + return '$_ffi.Int64'; + } + } if (isFfi) return '$_ffi.${node.ffiType}'; if (node.name == 'boolean') return 'int'; return node.dartType; @@ -943,46 +907,6 @@ class _FieldGenerator extends Visitor { const _FieldGenerator(this.config, this.resolver, this.s); - void writeCAccessor(Field node) { - final name = node.finalName; - final cName = node.accept(const CFieldName()); - final ifRef = node.isStatic ? '' : '$_jPointer, '; - - s.write(''' - static final _get_$name = - $_lookup<$_ffi.NativeFunction<$_jResult Function($ifRef)>>( - "get_$cName") - .asFunction<$_jResult Function($ifRef)>(); - -'''); - - if (!node.isFinal) { - final ffiSig = node.type.accept(const _TypeSig(isFfi: true)); - final dartSig = node.type.accept(const _TypeSig(isFfi: false)); - s.write(''' - static final _set_$name = - $_lookup<$_ffi.NativeFunction<$_jResult Function($ifRef$ffiSig)>>( - "set_$cName") - .asFunction<$_jResult Function($ifRef$dartSig)>(); - -'''); - } - } - - String cGetter(Field node) { - final name = node.finalName; - final getter = node.type.accept(_JniResultGetter(resolver)); - final self = node.isStatic ? '' : _selfPointer; - return '_get_$name($self).$getter'; - } - - String cSetter(Field node) { - final name = node.finalName; - final self = node.isStatic ? '' : '$_selfPointer, '; - final toNativeSuffix = node.type.accept(const _ToNativeSuffix()); - return '_set_$name(${self}value$toNativeSuffix).check()'; - } - void writeDartOnlyAccessor(Field node) { final name = node.finalName; final staticOrInstance = node.isStatic ? 'static' : 'instance'; @@ -1021,8 +945,6 @@ class _FieldGenerator extends Visitor { @override void visit(Field node) { - final isCBased = config.outputConfig.bindingsType == BindingsType.cBased; - // Check if it should be a `static const` getter. if (node.isFinal && node.isStatic && node.defaultValue != null) { final name = node.finalName; @@ -1035,7 +957,7 @@ class _FieldGenerator extends Visitor { } // Accessors. - (isCBased ? writeCAccessor : writeDartOnlyAccessor)(node); + writeDartOnlyAccessor(node); // Getter docs. writeDocs(node, writeReleaseInstructions: true); @@ -1044,14 +966,14 @@ class _FieldGenerator extends Visitor { final ifStatic = node.isStatic ? 'static ' : ''; final type = node.type.accept(_TypeGenerator(resolver)); s.write('$ifStatic$type get $name => '); - s.write((isCBased ? cGetter : dartOnlyGetter)(node)); + s.write(dartOnlyGetter(node)); s.writeln(';\n'); if (!node.isFinal) { // Setter docs. writeDocs(node, writeReleaseInstructions: true); s.write('${ifStatic}set $name($type value) => '); - s.write((isCBased ? cSetter : dartOnlySetter)(node)); + s.write(dartOnlySetter(node)); s.writeln(';\n'); } } @@ -1064,13 +986,21 @@ class _MethodTypeSig extends Visitor { @override String visit(Method node) { + final callParams = node.params + .map((param) => param.type) + .accept(_TypeSig(isFfi: isFfi)) + .join(', '); final args = [ - if (!node.isCtor && !node.isStatic) _voidPointer, - ...node.params.map((param) => param.type).accept( - _TypeSig(isFfi: isFfi), - ) + _voidPointer, + '$_jni.JMethodIDPtr', + isFfi && callParams.isNotEmpty + ? '$_ffi.VarArgs<($callParams${node.params.length == 1 ? ',' : ''})>' + : callParams ].join(', '); - return '$_jResult Function($args)'; + final isCtor = node.isCtor; + final isVoid = node.returnType.name == 'void'; + final returnType = !isCtor && isVoid ? _jThrowable : _jResult; + return '$returnType Function($args)'; } } @@ -1082,19 +1012,6 @@ class _MethodGenerator extends Visitor { const _MethodGenerator(this.config, this.resolver, this.s); - void writeCAccessor(Method node) { - final name = node.finalName; - final cName = node.accept(const CMethodName()); - final ffiSig = node.accept(const _MethodTypeSig(isFfi: true)); - final dartSig = node.accept(const _MethodTypeSig(isFfi: false)); - s.write(''' - static final _$name = - $_lookup<$_ffi.NativeFunction<$ffiSig>>("$cName") - .asFunction<$dartSig>(); - -'''); - } - void writeDartOnlyAccessor(Method node) { final name = node.finalName; final kind = node.isCtor @@ -1110,6 +1027,15 @@ class _MethodGenerator extends Visitor { s.write(''' r"$descriptor", ); +'''); + final ffiSig = node.accept(const _MethodTypeSig(isFfi: true)); + final dartSig = node.accept(const _MethodTypeSig(isFfi: false)); + final methodName = node.accept(const _CallMethodName()); + s.write(''' + + static final _$name = $_protectedExtension + .lookup<$_ffi.NativeFunction<$ffiSig>>("$methodName") + .asFunction<$dartSig>(); '''); } @@ -1119,23 +1045,25 @@ class _MethodGenerator extends Visitor { String cCtor(Method node) { final name = node.finalName; - final params = - node.params.accept(const _ParamCall(isCBased: true)).join(', '); + final params = node.params.accept(const _ParamCall()).join(', '); return '_$name($params).reference'; } String dartOnlyCtor(Method node) { final name = node.finalName; - final params = - node.params.accept(const _ParamCall(isCBased: false)).join(', '); - return '_id_$name($_classRef, referenceType, [$params])'; + final params = [ + '$_classRef.reference.pointer', + '_id_$name as $_jni.JMethodIDPtr', + ...node.params.accept(const _ParamCall()), + ].join(', '); + return '_$name($params).reference'; } String cMethodCall(Method node) { final name = node.finalName; final params = [ if (!node.isStatic) _selfPointer, - ...node.params.accept(const _ParamCall(isCBased: true)), + ...node.params.accept(const _ParamCall()), ].join(', '); final resultGetter = node.returnType.accept(_JniResultGetter(resolver)); return '_$name($params).$resultGetter'; @@ -1143,19 +1071,19 @@ class _MethodGenerator extends Visitor { String dartOnlyMethodCall(Method node) { final name = node.finalName; - final self = node.isStatic ? _classRef : _self; - final params = - node.params.accept(const _ParamCall(isCBased: false)).join(', '); - final type = node.returnType.accept(_TypeClassGenerator(resolver)).name; - return '_id_$name($self, $type, [$params])'; + final params = [ + node.isStatic ? '$_classRef.reference.pointer' : _selfPointer, + '_id_$name as $_jni.JMethodIDPtr', + ...node.params.accept(const _ParamCall()), + ].join(', '); + final resultGetter = node.returnType.accept(_JniResultGetter(resolver)); + return '_$name($params).$resultGetter'; } @override void visit(Method node) { - final isCBased = config.outputConfig.bindingsType == BindingsType.cBased; - // Accessors - (isCBased ? writeCAccessor : writeDartOnlyAccessor)(node); + writeDartOnlyAccessor(node); // Docs s.write(' /// from: '); @@ -1211,7 +1139,7 @@ class _MethodGenerator extends Visitor { typeParam.accept(const _TypeParamGenerator(withExtends: false))) .delimited(', '); - final ctorExpr = (isCBased ? cCtor : dartOnlyCtor)(node); + final ctorExpr = dartOnlyCtor(node); s.write(''' factory $ctorName($paramsDef$typeClassDef) { $typeInference @@ -1255,7 +1183,7 @@ class _MethodGenerator extends Visitor { } final params = defArgs.delimited(', '); s.write(' $ifStatic$returnType $name$typeParamsDef($params$typeClassDef)'); - final callExpr = (isCBased ? cMethodCall : dartOnlyMethodCall)(node); + final callExpr = dartOnlyMethodCall(node); if (isSuspendFun(node)) { final returningType = node.asyncReturnType!.accept(_TypeClassGenerator(resolver)).name; @@ -1348,47 +1276,16 @@ class _ParamDef extends Visitor { /// void bar(Foo foo) => _bar(foo.reference.pointer); /// ``` class _ParamCall extends Visitor { - final bool isCBased; - - const _ParamCall({required this.isCBased}); + const _ParamCall(); @override String visit(Param node) { final nativeSuffix = node.type.accept(const _ToNativeSuffix()); final paramCall = '${node.finalName}$nativeSuffix'; - if (!isCBased) { - // We need to wrap [paramCall] in the appropriate wrapper class. - return node.type.accept(_JValueWrapper(paramCall)); - } return paramCall; } } -/// Wraps the parameter in the appropriate JValue wrapper class. -/// -/// For instance, `int` in Dart can be mapped to `long` or `int` or ... in Java. -/// The wrapper class is how we identify the type in pure dart bindings. -class _JValueWrapper extends TypeVisitor { - final String param; - - _JValueWrapper(this.param); - - @override - String visitNonPrimitiveType(ReferredType node) { - return param; - } - - @override - String visitPrimitiveType(PrimitiveType node) { - if (node.name == 'long' || - node.name == 'double' || - node.name == 'boolean') { - return param; - } - return '$_jni.JValue${node.name.capitalize()}($param)'; - } -} - /// A pair of [StringBuffer]s that can create an expression from the outer layer /// inwards. /// @@ -1681,3 +1578,21 @@ class _InterfaceReturnBox extends TypeVisitor { return '$_jni.J${node.boxedName}(\$r).reference.toPointer()'; } } + +class _CallMethodName extends Visitor { + const _CallMethodName(); + + @override + String visit(Method node) { + if (node.isCtor) { + return 'globalEnv_NewObject'; + } + final String type; + if (node.returnType.kind == Kind.primitive) { + type = (node.returnType.type as PrimitiveType).name.capitalize(); + } else { + type = 'Object'; + } + return 'globalEnv_Call${node.isStatic ? 'Static' : ''}${type}Method'; + } +} diff --git a/pkgs/jnigen/lib/src/config/config_types.dart b/pkgs/jnigen/lib/src/config/config_types.dart index 02dcbc2ea7..e00717f880 100644 --- a/pkgs/jnigen/lib/src/config/config_types.dart +++ b/pkgs/jnigen/lib/src/config/config_types.dart @@ -190,51 +190,6 @@ OutputStructure getOutputStructure(String? name, OutputStructure defaultVal) { ); } -enum BindingsType { cBased, dartOnly } - -extension GetConfigString on BindingsType { - String getConfigString() { - return name.toSnakeCase(); - } -} - -BindingsType getBindingsType(String? name, BindingsType defaultVal) { - return _getEnumValueFromString( - BindingsType.values.valuesMap(), - name, - defaultVal, - ); -} - -class CCodeOutputConfig { - CCodeOutputConfig({ - required this.path, - required this.libraryName, - this.subdir, - }) { - _ensureIsDirectory('C output path', path); - if (subdir != null) { - _ensureIsDirectory('C subdirectory', path.resolve(subdir!)); - } - } - - /// Directory to write JNI C Bindings, in C+Dart mode. - /// - /// Strictly speaking, this is the root to place the `CMakeLists.txt` file - /// for the generated C bindings. It may be desirable to use the [subdir] - /// options to write C files to a subdirectory of [path]. For instance, - /// when generated code is required to be in `third_party` directory. - Uri path; - - /// Name of generated library in CMakeLists.txt configuration. - /// - /// This will also determine the name of shared object file. - String libraryName; - - /// Subfolder relative to [path] to write generated C code. - String? subdir; -} - class DartCodeOutputConfig { DartCodeOutputConfig({ required this.path, @@ -271,17 +226,10 @@ class SymbolsOutputConfig { class OutputConfig { OutputConfig({ required this.dartConfig, - this.bindingsType = BindingsType.cBased, - this.cConfig, this.symbolsConfig, - }) { - if (bindingsType == BindingsType.cBased && cConfig == null) { - throw ConfigException('C output config must be provided!'); - } - } - BindingsType bindingsType; + }); + DartCodeOutputConfig dartConfig; - CCodeOutputConfig? cConfig; SymbolsOutputConfig? symbolsConfig; } @@ -578,17 +526,6 @@ class Config { fields: regexFilter(_Props.excludeFields), ), outputConfig: OutputConfig( - bindingsType: getBindingsType( - prov.getString(_Props.bindingsType), - BindingsType.cBased, - ), - cConfig: prov.hasValue(_Props.cCodeOutputConfig) - ? CCodeOutputConfig( - libraryName: must(prov.getString, '', _Props.libraryName), - path: must(prov.getPath, Uri.parse('.'), _Props.cRoot), - subdir: prov.getString(_Props.cSubdir), - ) - : null, dartConfig: DartCodeOutputConfig( path: must(prov.getPath, Uri.parse('.'), _Props.dartRoot), structure: getOutputStructure( @@ -676,15 +613,10 @@ class _Props { static const experiments = 'enable_experiment'; static const import = 'import'; static const outputConfig = 'output'; - static const bindingsType = '$outputConfig.bindings_type'; - static const cCodeOutputConfig = '$outputConfig.c'; static const dartCodeOutputConfig = '$outputConfig.dart'; static const symbolsOutputConfig = '$outputConfig.symbols'; - static const cRoot = '$cCodeOutputConfig.path'; - static const cSubdir = '$cCodeOutputConfig.subdir'; static const dartRoot = '$dartCodeOutputConfig.path'; static const outputStructure = '$dartCodeOutputConfig.structure'; - static const libraryName = '$cCodeOutputConfig.library_name'; static const preamble = 'preamble'; static const logLevel = 'log_level'; diff --git a/pkgs/jnigen/lib/src/generate_bindings.dart b/pkgs/jnigen/lib/src/generate_bindings.dart index 883ca8575b..e0027f87de 100644 --- a/pkgs/jnigen/lib/src/generate_bindings.dart +++ b/pkgs/jnigen/lib/src/generate_bindings.dart @@ -5,7 +5,6 @@ import 'dart:io'; import 'dart:convert'; -import 'bindings/c_generator.dart'; import 'bindings/dart_generator.dart'; import 'bindings/descriptor.dart'; import 'bindings/excluder.dart'; @@ -44,11 +43,6 @@ Future generateJniBindings(Config config) async { classes.accept(const Descriptor()); classes.accept(Renamer(config)); - final cBased = config.outputConfig.bindingsType == BindingsType.cBased; - if (cBased) { - await classes.accept(CGenerator(config)); - } - try { await classes.accept(DartGenerator(config)); log.info('Completed'); diff --git a/pkgs/jnigen/lib/src/summary/summary.dart b/pkgs/jnigen/lib/src/summary/summary.dart index 25f932d2fd..87c5819e5f 100644 --- a/pkgs/jnigen/lib/src/summary/summary.dart +++ b/pkgs/jnigen/lib/src/summary/summary.dart @@ -71,11 +71,7 @@ class SummarizerCommand { final joined = paths .map((uri) => uri.toFilePath()) .join(Platform.isWindows ? ';' : ':'); - if (option.endsWith("=")) { - args.add(option + joined); - } else { - args.addAll([option, joined]); - } + args.addAll([option, '"$joined"']); } } diff --git a/pkgs/jnigen/pubspec.yaml b/pkgs/jnigen/pubspec.yaml index 159f838436..0f4441f258 100644 --- a/pkgs/jnigen/pubspec.yaml +++ b/pkgs/jnigen/pubspec.yaml @@ -4,7 +4,7 @@ name: jnigen description: A Dart bindings generator for Java and Kotlin that uses JNI under the hood to interop with Java virtual machine. -version: 0.8.1-wip +version: 0.9.0 repository: https://github.com/dart-lang/native/tree/main/pkgs/jnigen environment: diff --git a/pkgs/jnigen/test/.gitignore b/pkgs/jnigen/test/.gitignore index 36f1ec5bcf..3bde18030b 100644 --- a/pkgs/jnigen/test/.gitignore +++ b/pkgs/jnigen/test/.gitignore @@ -1,4 +1,2 @@ # TODO(#166): Remove this. !jni.jar -runtime_test_registrant_dartonly_generated.dart -generated_runtime_test.dart \ No newline at end of file diff --git a/pkgs/jnigen/test/config_test.dart b/pkgs/jnigen/test/config_test.dart index ae2f9871e2..53d432703e 100644 --- a/pkgs/jnigen/test/config_test.dart +++ b/pkgs/jnigen/test/config_test.dart @@ -15,20 +15,13 @@ import 'test_util/test_util.dart'; const packageTests = 'test'; final jacksonCoreTests = absolute(packageTests, 'jackson_core_test'); final thirdParty = absolute(jacksonCoreTests, 'third_party'); -final lib = absolute(thirdParty, 'c_based', 'dart_bindings'); -final src = absolute(thirdParty, 'c_based', 'c_bindings'); -final testLib = absolute(thirdParty, 'test_', 'c_based', 'dart_bindings'); -final testSrc = absolute(thirdParty, 'test_', 'c_based', 'c_bindings'); +final lib = absolute(thirdParty, 'bindings'); +final testLib = absolute(thirdParty, 'test_', 'bindings'); /// Compares 2 [Config] objects using [expect] to give useful errors when /// two fields are not equal. void expectConfigsAreEqual(Config a, Config b) { expect(a.classes, equals(b.classes), reason: "classes"); - expect(a.outputConfig.cConfig?.libraryName, - equals(b.outputConfig.cConfig?.libraryName), - reason: "libraryName"); - expect(a.outputConfig.cConfig?.path, equals(b.outputConfig.cConfig?.path), - reason: "cRoot"); expect(a.outputConfig.dartConfig.path, equals(b.outputConfig.dartConfig.path), reason: "dartRoot"); expect(a.outputConfig.symbolsConfig?.path, @@ -102,7 +95,6 @@ void main() async { final config = Config.parseArgs([ '--config', jnigenYaml, - '-Doutput.c.path=$testSrc${Platform.pathSeparator}', '-Doutput.dart.path=$testLib${Platform.pathSeparator}', ]); @@ -111,16 +103,11 @@ void main() async { config, getConfig( root: join(thirdParty, 'test_'), - bindingsType: BindingsType.cBased, ), ); }); group('Test for config error checking', () { - testForErrorChecking( - name: 'Invalid bindings type', - overrides: ['-Doutput.bindings_type=c_base'], - ); testForErrorChecking( name: 'Invalid output structure', overrides: ['-Doutput.dart.structure=singl_file'], diff --git a/pkgs/jnigen/test/jackson_core_test/generate.dart b/pkgs/jnigen/test/jackson_core_test/generate.dart index 796a760ca2..2e6009d4b1 100644 --- a/pkgs/jnigen/test/jackson_core_test/generate.dart +++ b/pkgs/jnigen/test/jackson_core_test/generate.dart @@ -33,10 +33,8 @@ Config getConfig({ String? root, bool generateFullVersion = false, bool useAsm = false, - BindingsType bindingsType = BindingsType.dartOnly, }) { final rootDir = root ?? thirdPartyDir; - final bindingTypeDir = bindingsType.getConfigString(); final config = Config( mavenDownloads: MavenDownloads( sourceDeps: deps, @@ -48,17 +46,8 @@ Config getConfig({ ), preamble: jacksonPreamble, outputConfig: OutputConfig( - bindingsType: bindingsType, - // Have to be judicious here, and ensure null when bindings type is - // dart-only, because config-test is also using this. - cConfig: bindingsType == BindingsType.cBased - ? CCodeOutputConfig( - libraryName: 'jackson_core', - path: Uri.directory(join(rootDir, bindingTypeDir, 'c_bindings')), - ) - : null, dartConfig: DartCodeOutputConfig( - path: Uri.directory(join(rootDir, bindingTypeDir, 'dart_bindings')), + path: Uri.directory(join(rootDir, 'bindings')), ), ), classes: (generateFullVersion) @@ -88,6 +77,5 @@ Config getConfig({ } void main() async { - await generateJniBindings(getConfig(bindingsType: BindingsType.cBased)); - await generateJniBindings(getConfig(bindingsType: BindingsType.dartOnly)); + await generateJniBindings(getConfig()); } diff --git a/pkgs/jnigen/test/jackson_core_test/generated_files_test.dart b/pkgs/jnigen/test/jackson_core_test/generated_files_test.dart index cc53c8cf8d..273232f7c1 100644 --- a/pkgs/jnigen/test/jackson_core_test/generated_files_test.dart +++ b/pkgs/jnigen/test/jackson_core_test/generated_files_test.dart @@ -4,18 +4,15 @@ import 'package:test/test.dart'; -import 'package:jnigen/jnigen.dart'; - import '../test_util/test_util.dart'; import 'generate.dart'; void main() async { await checkLocallyBuiltDependencies(); - generateAndCompareBothModes( + generateAndCompare( 'Generate and compare bindings for jackson_core library', - getConfig(bindingsType: BindingsType.cBased), - getConfig(bindingsType: BindingsType.dartOnly), + getConfig(), ); test( 'generate and analyze bindings for complete library, ' @@ -28,10 +25,4 @@ void main() async { final config = getConfig(generateFullVersion: true, useAsm: true); await generateAndAnalyzeBindings(config); }, timeout: const Timeout(Duration(minutes: 2)), tags: largeTestTag); - - test('Generate and analyze pure dart bindings', () async { - final config = getConfig(generateFullVersion: true); - config.outputConfig.bindingsType = BindingsType.dartOnly; - await generateAndAnalyzeBindings(config); - }, timeout: const Timeout(Duration(minutes: 2)), tags: largeTestTag); } diff --git a/pkgs/jnigen/test/jackson_core_test/jnigen.yaml b/pkgs/jnigen/test/jackson_core_test/jnigen.yaml index cf3b4db158..66bd515ee7 100644 --- a/pkgs/jnigen/test/jackson_core_test/jnigen.yaml +++ b/pkgs/jnigen/test/jackson_core_test/jnigen.yaml @@ -5,12 +5,8 @@ maven_downloads: jar_dir: third_party/jar/ output: - bindings_type: c_based - c: - library_name: jackson_core - path: third_party/c_based/c_bindings/ dart: - path: third_party/c_based/dart_bindings/ + path: third_party/bindings/ classes: - 'com.fasterxml.jackson.core.JsonFactory' diff --git a/pkgs/jnigen/test/jackson_core_test/runtime_test_registrant.dart b/pkgs/jnigen/test/jackson_core_test/runtime_test_registrant.dart index 28e6c2b6cc..bfb09c1dbd 100644 --- a/pkgs/jnigen/test/jackson_core_test/runtime_test_registrant.dart +++ b/pkgs/jnigen/test/jackson_core_test/runtime_test_registrant.dart @@ -7,7 +7,7 @@ import 'package:jni/jni.dart'; import '../test_util/callback_types.dart'; -import 'third_party/c_based/dart_bindings/com/fasterxml/jackson/core/_package.dart'; +import 'third_party/bindings/com/fasterxml/jackson/core/_package.dart'; // This file doesn't define main, because only one JVM has to be spawned with // all classpaths, it's managed at a different file which calls these tests. diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/dart_only/dart_bindings/com/fasterxml/jackson/core/JsonFactory.dart b/pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/JsonFactory.dart similarity index 55% rename from pkgs/jnigen/test/jackson_core_test/third_party/dart_only/dart_bindings/com/fasterxml/jackson/core/JsonFactory.dart rename to pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/JsonFactory.dart index bd94fa877d..2b11545039 100644 --- a/pkgs/jnigen/test/jackson_core_test/third_party/dart_only/dart_bindings/com/fasterxml/jackson/core/JsonFactory.dart +++ b/pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/JsonFactory.dart @@ -64,11 +64,23 @@ class JsonFactory_Feature extends jni.JObject { r"()[Lcom/fasterxml/jackson/core/JsonFactory$Feature;", ); + static final _values = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public com.fasterxml.jackson.core.JsonFactory.Feature[] values() /// The returned object must be released after use, by calling the [release] method. static jni.JArray values() { - return _id_values( - _class, const jni.JArrayType($JsonFactory_FeatureType()), []); + return _values(_class.reference.pointer, _id_values as jni.JMethodIDPtr) + .object(const jni.JArrayType($JsonFactory_FeatureType())); } static final _id_valueOf = _class.staticMethodId( @@ -76,13 +88,25 @@ class JsonFactory_Feature extends jni.JObject { r"(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonFactory$Feature;", ); + static final _valueOf = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public com.fasterxml.jackson.core.JsonFactory.Feature valueOf(java.lang.String name) /// The returned object must be released after use, by calling the [release] method. static JsonFactory_Feature valueOf( jni.JString name, ) { - return _id_valueOf( - _class, const $JsonFactory_FeatureType(), [name.reference.pointer]); + return _valueOf(_class.reference.pointer, _id_valueOf as jni.JMethodIDPtr, + name.reference.pointer) + .object(const $JsonFactory_FeatureType()); } static final _id_collectDefaults = _class.staticMethodId( @@ -90,13 +114,27 @@ class JsonFactory_Feature extends jni.JObject { r"()I", ); + static final _collectDefaults = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public int collectDefaults() /// /// Method that calculates bit set (flags) of all features that /// are enabled by default. ///@return Bit field of features enabled by default static int collectDefaults() { - return _id_collectDefaults(_class, const jni.jintType(), []); + return _collectDefaults( + _class.reference.pointer, _id_collectDefaults as jni.JMethodIDPtr) + .integer; } static final _id_enabledByDefault = _class.instanceMethodId( @@ -104,9 +142,23 @@ class JsonFactory_Feature extends jni.JObject { r"()Z", ); + static final _enabledByDefault = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public boolean enabledByDefault() bool enabledByDefault() { - return _id_enabledByDefault(this, const jni.jbooleanType(), []); + return _enabledByDefault( + reference.pointer, _id_enabledByDefault as jni.JMethodIDPtr) + .boolean; } static final _id_enabledIn = _class.instanceMethodId( @@ -114,12 +166,21 @@ class JsonFactory_Feature extends jni.JObject { r"(I)Z", ); + static final _enabledIn = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: public boolean enabledIn(int flags) bool enabledIn( int flags, ) { - return _id_enabledIn( - this, const jni.jbooleanType(), [jni.JValueInt(flags)]); + return _enabledIn( + reference.pointer, _id_enabledIn as jni.JMethodIDPtr, flags) + .boolean; } static final _id_getMask = _class.instanceMethodId( @@ -127,9 +188,21 @@ class JsonFactory_Feature extends jni.JObject { r"()I", ); + static final _getMask = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public int getMask() int getMask() { - return _id_getMask(this, const jni.jintType(), []); + return _getMask(reference.pointer, _id_getMask as jni.JMethodIDPtr).integer; } } @@ -253,6 +326,18 @@ class JsonFactory extends jni.JObject { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. /// @@ -265,26 +350,54 @@ class JsonFactory extends jni.JObject { /// and this reuse only works within context of a single /// factory instance. factory JsonFactory() { - return JsonFactory.fromReference(_id_new0(_class, referenceType, [])); + return JsonFactory.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } static final _id_new1 = _class.constructorId( r"(Lcom/fasterxml/jackson/core/ObjectCodec;)V", ); + static final _new1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public void (com.fasterxml.jackson.core.ObjectCodec oc) /// The returned object must be released after use, by calling the [release] method. factory JsonFactory.new1( jni.JObject oc, ) { - return JsonFactory.fromReference( - _id_new1(_class, referenceType, [oc.reference.pointer])); + return JsonFactory.fromReference(_new1(_class.reference.pointer, + _id_new1 as jni.JMethodIDPtr, oc.reference.pointer) + .reference); } static final _id_new2 = _class.constructorId( r"(Lcom/fasterxml/jackson/core/JsonFactory;Lcom/fasterxml/jackson/core/ObjectCodec;)V", ); + static final _new2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: protected void (com.fasterxml.jackson.core.JsonFactory src, com.fasterxml.jackson.core.ObjectCodec codec) /// The returned object must be released after use, by calling the [release] method. /// @@ -296,14 +409,29 @@ class JsonFactory extends jni.JObject { JsonFactory src, jni.JObject codec, ) { - return JsonFactory.fromReference(_id_new2(_class, referenceType, - [src.reference.pointer, codec.reference.pointer])); + return JsonFactory.fromReference(_new2( + _class.reference.pointer, + _id_new2 as jni.JMethodIDPtr, + src.reference.pointer, + codec.reference.pointer) + .reference); } static final _id_new3 = _class.constructorId( r"(Lcom/fasterxml/jackson/core/JsonFactoryBuilder;)V", ); + static final _new3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public void (com.fasterxml.jackson.core.JsonFactoryBuilder b) /// The returned object must be released after use, by calling the [release] method. /// @@ -313,14 +441,26 @@ class JsonFactory extends jni.JObject { factory JsonFactory.new3( jni.JObject b, ) { - return JsonFactory.fromReference( - _id_new3(_class, referenceType, [b.reference.pointer])); + return JsonFactory.fromReference(_new3(_class.reference.pointer, + _id_new3 as jni.JMethodIDPtr, b.reference.pointer) + .reference); } static final _id_new4 = _class.constructorId( r"(Lcom/fasterxml/jackson/core/TSFBuilder;Z)V", ); + static final _new4 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, ffi.Int64)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); + /// from: protected void (com.fasterxml.jackson.core.TSFBuilder b, boolean bogus) /// The returned object must be released after use, by calling the [release] method. /// @@ -333,8 +473,9 @@ class JsonFactory extends jni.JObject { jni.JObject b, bool bogus, ) { - return JsonFactory.fromReference( - _id_new4(_class, referenceType, [b.reference.pointer, bogus ? 1 : 0])); + return JsonFactory.fromReference(_new4(_class.reference.pointer, + _id_new4 as jni.JMethodIDPtr, b.reference.pointer, bogus ? 1 : 0) + .reference); } static final _id_rebuild = _class.instanceMethodId( @@ -342,6 +483,18 @@ class JsonFactory extends jni.JObject { r"()Lcom/fasterxml/jackson/core/TSFBuilder;", ); + static final _rebuild = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public com.fasterxml.jackson.core.TSFBuilder rebuild() /// The returned object must be released after use, by calling the [release] method. /// @@ -350,7 +503,8 @@ class JsonFactory extends jni.JObject { ///@return Builder instance to use ///@since 2.10 jni.JObject rebuild() { - return _id_rebuild(this, const jni.JObjectType(), []); + return _rebuild(reference.pointer, _id_rebuild as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_builder = _class.staticMethodId( @@ -358,6 +512,18 @@ class JsonFactory extends jni.JObject { r"()Lcom/fasterxml/jackson/core/TSFBuilder;", ); + static final _builder = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public com.fasterxml.jackson.core.TSFBuilder builder() /// The returned object must be released after use, by calling the [release] method. /// @@ -370,7 +536,8 @@ class JsonFactory extends jni.JObject { /// will be fixed in 3.0. ///@return Builder instance to use static jni.JObject builder() { - return _id_builder(_class, const jni.JObjectType(), []); + return _builder(_class.reference.pointer, _id_builder as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_copy = _class.instanceMethodId( @@ -378,6 +545,18 @@ class JsonFactory extends jni.JObject { r"()Lcom/fasterxml/jackson/core/JsonFactory;", ); + static final _copy = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public com.fasterxml.jackson.core.JsonFactory copy() /// The returned object must be released after use, by calling the [release] method. /// @@ -394,7 +573,8 @@ class JsonFactory extends jni.JObject { ///@return Copy of this factory instance ///@since 2.1 JsonFactory copy() { - return _id_copy(this, const $JsonFactoryType(), []); + return _copy(reference.pointer, _id_copy as jni.JMethodIDPtr) + .object(const $JsonFactoryType()); } static final _id_readResolve = _class.instanceMethodId( @@ -402,6 +582,18 @@ class JsonFactory extends jni.JObject { r"()Ljava/lang/Object;", ); + static final _readResolve = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: protected java.lang.Object readResolve() /// The returned object must be released after use, by calling the [release] method. /// @@ -412,7 +604,8 @@ class JsonFactory extends jni.JObject { /// Note: must be overridden by sub-classes as well. ///@return Newly constructed instance jni.JObject readResolve() { - return _id_readResolve(this, const jni.JObjectType(), []); + return _readResolve(reference.pointer, _id_readResolve as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_requiresPropertyOrdering = _class.instanceMethodId( @@ -420,6 +613,18 @@ class JsonFactory extends jni.JObject { r"()Z", ); + static final _requiresPropertyOrdering = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public boolean requiresPropertyOrdering() /// /// Introspection method that higher-level functionality may call @@ -437,7 +642,9 @@ class JsonFactory extends jni.JObject { /// requires Object properties to be ordered. ///@since 2.3 bool requiresPropertyOrdering() { - return _id_requiresPropertyOrdering(this, const jni.jbooleanType(), []); + return _requiresPropertyOrdering( + reference.pointer, _id_requiresPropertyOrdering as jni.JMethodIDPtr) + .boolean; } static final _id_canHandleBinaryNatively = _class.instanceMethodId( @@ -445,6 +652,18 @@ class JsonFactory extends jni.JObject { r"()Z", ); + static final _canHandleBinaryNatively = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public boolean canHandleBinaryNatively() /// /// Introspection method that higher-level functionality may call @@ -459,7 +678,9 @@ class JsonFactory extends jni.JObject { /// supports native binary content ///@since 2.3 bool canHandleBinaryNatively() { - return _id_canHandleBinaryNatively(this, const jni.jbooleanType(), []); + return _canHandleBinaryNatively( + reference.pointer, _id_canHandleBinaryNatively as jni.JMethodIDPtr) + .boolean; } static final _id_canUseCharArrays = _class.instanceMethodId( @@ -467,6 +688,18 @@ class JsonFactory extends jni.JObject { r"()Z", ); + static final _canUseCharArrays = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public boolean canUseCharArrays() /// /// Introspection method that can be used by base factory to check @@ -481,7 +714,9 @@ class JsonFactory extends jni.JObject { /// accessed using parser method {@code getTextCharacters()}. ///@since 2.4 bool canUseCharArrays() { - return _id_canUseCharArrays(this, const jni.jbooleanType(), []); + return _canUseCharArrays( + reference.pointer, _id_canUseCharArrays as jni.JMethodIDPtr) + .boolean; } static final _id_canParseAsync = _class.instanceMethodId( @@ -489,6 +724,18 @@ class JsonFactory extends jni.JObject { r"()Z", ); + static final _canParseAsync = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public boolean canParseAsync() /// /// Introspection method that can be used to check whether this @@ -499,7 +746,9 @@ class JsonFactory extends jni.JObject { /// not (and consequently whether {@code createNonBlockingXxx()} method(s) work) ///@since 2.9 bool canParseAsync() { - return _id_canParseAsync(this, const jni.jbooleanType(), []); + return _canParseAsync( + reference.pointer, _id_canParseAsync as jni.JMethodIDPtr) + .boolean; } static final _id_getFormatReadFeatureType = _class.instanceMethodId( @@ -507,10 +756,24 @@ class JsonFactory extends jni.JObject { r"()Ljava/lang/Class;", ); + static final _getFormatReadFeatureType = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.Class getFormatReadFeatureType() /// The returned object must be released after use, by calling the [release] method. jni.JObject getFormatReadFeatureType() { - return _id_getFormatReadFeatureType(this, const jni.JObjectType(), []); + return _getFormatReadFeatureType( + reference.pointer, _id_getFormatReadFeatureType as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_getFormatWriteFeatureType = _class.instanceMethodId( @@ -518,10 +781,24 @@ class JsonFactory extends jni.JObject { r"()Ljava/lang/Class;", ); + static final _getFormatWriteFeatureType = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.Class getFormatWriteFeatureType() /// The returned object must be released after use, by calling the [release] method. jni.JObject getFormatWriteFeatureType() { - return _id_getFormatWriteFeatureType(this, const jni.JObjectType(), []); + return _getFormatWriteFeatureType(reference.pointer, + _id_getFormatWriteFeatureType as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_canUseSchema = _class.instanceMethodId( @@ -529,6 +806,17 @@ class JsonFactory extends jni.JObject { r"(Lcom/fasterxml/jackson/core/FormatSchema;)Z", ); + static final _canUseSchema = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public boolean canUseSchema(com.fasterxml.jackson.core.FormatSchema schema) /// /// Method that can be used to quickly check whether given schema @@ -543,8 +831,9 @@ class JsonFactory extends jni.JObject { bool canUseSchema( jni.JObject schema, ) { - return _id_canUseSchema( - this, const jni.jbooleanType(), [schema.reference.pointer]); + return _canUseSchema(reference.pointer, + _id_canUseSchema as jni.JMethodIDPtr, schema.reference.pointer) + .boolean; } static final _id_getFormatName = _class.instanceMethodId( @@ -552,6 +841,18 @@ class JsonFactory extends jni.JObject { r"()Ljava/lang/String;", ); + static final _getFormatName = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.String getFormatName() /// The returned object must be released after use, by calling the [release] method. /// @@ -562,7 +863,9 @@ class JsonFactory extends jni.JObject { /// implementation will return null for all sub-classes ///@return Name of the format handled by parsers, generators this factory creates jni.JString getFormatName() { - return _id_getFormatName(this, const jni.JStringType(), []); + return _getFormatName( + reference.pointer, _id_getFormatName as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_hasFormat = _class.instanceMethodId( @@ -570,13 +873,25 @@ class JsonFactory extends jni.JObject { r"(Lcom/fasterxml/jackson/core/format/InputAccessor;)Lcom/fasterxml/jackson/core/format/MatchStrength;", ); + static final _hasFormat = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.format.MatchStrength hasFormat(com.fasterxml.jackson.core.format.InputAccessor acc) /// The returned object must be released after use, by calling the [release] method. jni.JObject hasFormat( jni.JObject acc, ) { - return _id_hasFormat( - this, const jni.JObjectType(), [acc.reference.pointer]); + return _hasFormat(reference.pointer, _id_hasFormat as jni.JMethodIDPtr, + acc.reference.pointer) + .object(const jni.JObjectType()); } static final _id_requiresCustomCodec = _class.instanceMethodId( @@ -584,6 +899,18 @@ class JsonFactory extends jni.JObject { r"()Z", ); + static final _requiresCustomCodec = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public boolean requiresCustomCodec() /// /// Method that can be called to determine if a custom @@ -596,7 +923,9 @@ class JsonFactory extends jni.JObject { /// ObjectCodec is enough ///@since 2.1 bool requiresCustomCodec() { - return _id_requiresCustomCodec(this, const jni.jbooleanType(), []); + return _requiresCustomCodec( + reference.pointer, _id_requiresCustomCodec as jni.JMethodIDPtr) + .boolean; } static final _id_hasJSONFormat = _class.instanceMethodId( @@ -604,13 +933,25 @@ class JsonFactory extends jni.JObject { r"(Lcom/fasterxml/jackson/core/format/InputAccessor;)Lcom/fasterxml/jackson/core/format/MatchStrength;", ); + static final _hasJSONFormat = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: protected com.fasterxml.jackson.core.format.MatchStrength hasJSONFormat(com.fasterxml.jackson.core.format.InputAccessor acc) /// The returned object must be released after use, by calling the [release] method. jni.JObject hasJSONFormat( jni.JObject acc, ) { - return _id_hasJSONFormat( - this, const jni.JObjectType(), [acc.reference.pointer]); + return _hasJSONFormat(reference.pointer, + _id_hasJSONFormat as jni.JMethodIDPtr, acc.reference.pointer) + .object(const jni.JObjectType()); } static final _id_version = _class.instanceMethodId( @@ -618,10 +959,23 @@ class JsonFactory extends jni.JObject { r"()Lcom/fasterxml/jackson/core/Version;", ); + static final _version = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public com.fasterxml.jackson.core.Version version() /// The returned object must be released after use, by calling the [release] method. jni.JObject version() { - return _id_version(this, const jni.JObjectType(), []); + return _version(reference.pointer, _id_version as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_configure = _class.instanceMethodId( @@ -629,6 +983,17 @@ class JsonFactory extends jni.JObject { r"(Lcom/fasterxml/jackson/core/JsonFactory$Feature;Z)Lcom/fasterxml/jackson/core/JsonFactory;", ); + static final _configure = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, ffi.Int64)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); + /// from: public final com.fasterxml.jackson.core.JsonFactory configure(com.fasterxml.jackson.core.JsonFactory.Feature f, boolean state) /// The returned object must be released after use, by calling the [release] method. /// @@ -642,8 +1007,9 @@ class JsonFactory extends jni.JObject { JsonFactory_Feature f, bool state, ) { - return _id_configure( - this, const $JsonFactoryType(), [f.reference.pointer, state ? 1 : 0]); + return _configure(reference.pointer, _id_configure as jni.JMethodIDPtr, + f.reference.pointer, state ? 1 : 0) + .object(const $JsonFactoryType()); } static final _id_enable = _class.instanceMethodId( @@ -651,6 +1017,17 @@ class JsonFactory extends jni.JObject { r"(Lcom/fasterxml/jackson/core/JsonFactory$Feature;)Lcom/fasterxml/jackson/core/JsonFactory;", ); + static final _enable = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonFactory enable(com.fasterxml.jackson.core.JsonFactory.Feature f) /// The returned object must be released after use, by calling the [release] method. /// @@ -662,7 +1039,9 @@ class JsonFactory extends jni.JObject { JsonFactory enable( JsonFactory_Feature f, ) { - return _id_enable(this, const $JsonFactoryType(), [f.reference.pointer]); + return _enable(reference.pointer, _id_enable as jni.JMethodIDPtr, + f.reference.pointer) + .object(const $JsonFactoryType()); } static final _id_disable = _class.instanceMethodId( @@ -670,6 +1049,17 @@ class JsonFactory extends jni.JObject { r"(Lcom/fasterxml/jackson/core/JsonFactory$Feature;)Lcom/fasterxml/jackson/core/JsonFactory;", ); + static final _disable = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonFactory disable(com.fasterxml.jackson.core.JsonFactory.Feature f) /// The returned object must be released after use, by calling the [release] method. /// @@ -681,7 +1071,9 @@ class JsonFactory extends jni.JObject { JsonFactory disable( JsonFactory_Feature f, ) { - return _id_disable(this, const $JsonFactoryType(), [f.reference.pointer]); + return _disable(reference.pointer, _id_disable as jni.JMethodIDPtr, + f.reference.pointer) + .object(const $JsonFactoryType()); } static final _id_isEnabled = _class.instanceMethodId( @@ -689,6 +1081,17 @@ class JsonFactory extends jni.JObject { r"(Lcom/fasterxml/jackson/core/JsonFactory$Feature;)Z", ); + static final _isEnabled = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public final boolean isEnabled(com.fasterxml.jackson.core.JsonFactory.Feature f) /// /// Checked whether specified parser feature is enabled. @@ -697,7 +1100,9 @@ class JsonFactory extends jni.JObject { bool isEnabled( JsonFactory_Feature f, ) { - return _id_isEnabled(this, const jni.jbooleanType(), [f.reference.pointer]); + return _isEnabled(reference.pointer, _id_isEnabled as jni.JMethodIDPtr, + f.reference.pointer) + .boolean; } static final _id_getParserFeatures = _class.instanceMethodId( @@ -705,9 +1110,23 @@ class JsonFactory extends jni.JObject { r"()I", ); + static final _getParserFeatures = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public final int getParserFeatures() int getParserFeatures() { - return _id_getParserFeatures(this, const jni.jintType(), []); + return _getParserFeatures( + reference.pointer, _id_getParserFeatures as jni.JMethodIDPtr) + .integer; } static final _id_getGeneratorFeatures = _class.instanceMethodId( @@ -715,9 +1134,23 @@ class JsonFactory extends jni.JObject { r"()I", ); + static final _getGeneratorFeatures = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public final int getGeneratorFeatures() int getGeneratorFeatures() { - return _id_getGeneratorFeatures(this, const jni.jintType(), []); + return _getGeneratorFeatures( + reference.pointer, _id_getGeneratorFeatures as jni.JMethodIDPtr) + .integer; } static final _id_getFormatParserFeatures = _class.instanceMethodId( @@ -725,9 +1158,23 @@ class JsonFactory extends jni.JObject { r"()I", ); + static final _getFormatParserFeatures = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public int getFormatParserFeatures() int getFormatParserFeatures() { - return _id_getFormatParserFeatures(this, const jni.jintType(), []); + return _getFormatParserFeatures( + reference.pointer, _id_getFormatParserFeatures as jni.JMethodIDPtr) + .integer; } static final _id_getFormatGeneratorFeatures = _class.instanceMethodId( @@ -735,9 +1182,23 @@ class JsonFactory extends jni.JObject { r"()I", ); + static final _getFormatGeneratorFeatures = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public int getFormatGeneratorFeatures() int getFormatGeneratorFeatures() { - return _id_getFormatGeneratorFeatures(this, const jni.jintType(), []); + return _getFormatGeneratorFeatures(reference.pointer, + _id_getFormatGeneratorFeatures as jni.JMethodIDPtr) + .integer; } static final _id_configure1 = _class.instanceMethodId( @@ -745,6 +1206,17 @@ class JsonFactory extends jni.JObject { r"(Lcom/fasterxml/jackson/core/JsonParser$Feature;Z)Lcom/fasterxml/jackson/core/JsonFactory;", ); + static final _configure1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, ffi.Int64)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); + /// from: public final com.fasterxml.jackson.core.JsonFactory configure(com.fasterxml.jackson.core.JsonParser.Feature f, boolean state) /// The returned object must be released after use, by calling the [release] method. /// @@ -757,8 +1229,9 @@ class JsonFactory extends jni.JObject { jsonparser_.JsonParser_Feature f, bool state, ) { - return _id_configure1( - this, const $JsonFactoryType(), [f.reference.pointer, state ? 1 : 0]); + return _configure1(reference.pointer, _id_configure1 as jni.JMethodIDPtr, + f.reference.pointer, state ? 1 : 0) + .object(const $JsonFactoryType()); } static final _id_enable1 = _class.instanceMethodId( @@ -766,6 +1239,17 @@ class JsonFactory extends jni.JObject { r"(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Lcom/fasterxml/jackson/core/JsonFactory;", ); + static final _enable1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonFactory enable(com.fasterxml.jackson.core.JsonParser.Feature f) /// The returned object must be released after use, by calling the [release] method. /// @@ -776,7 +1260,9 @@ class JsonFactory extends jni.JObject { JsonFactory enable1( jsonparser_.JsonParser_Feature f, ) { - return _id_enable1(this, const $JsonFactoryType(), [f.reference.pointer]); + return _enable1(reference.pointer, _id_enable1 as jni.JMethodIDPtr, + f.reference.pointer) + .object(const $JsonFactoryType()); } static final _id_disable1 = _class.instanceMethodId( @@ -784,6 +1270,17 @@ class JsonFactory extends jni.JObject { r"(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Lcom/fasterxml/jackson/core/JsonFactory;", ); + static final _disable1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonFactory disable(com.fasterxml.jackson.core.JsonParser.Feature f) /// The returned object must be released after use, by calling the [release] method. /// @@ -794,7 +1291,9 @@ class JsonFactory extends jni.JObject { JsonFactory disable1( jsonparser_.JsonParser_Feature f, ) { - return _id_disable1(this, const $JsonFactoryType(), [f.reference.pointer]); + return _disable1(reference.pointer, _id_disable1 as jni.JMethodIDPtr, + f.reference.pointer) + .object(const $JsonFactoryType()); } static final _id_isEnabled1 = _class.instanceMethodId( @@ -802,6 +1301,17 @@ class JsonFactory extends jni.JObject { r"(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Z", ); + static final _isEnabled1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public final boolean isEnabled(com.fasterxml.jackson.core.JsonParser.Feature f) /// /// Method for checking if the specified parser feature is enabled. @@ -810,8 +1320,9 @@ class JsonFactory extends jni.JObject { bool isEnabled1( jsonparser_.JsonParser_Feature f, ) { - return _id_isEnabled1( - this, const jni.jbooleanType(), [f.reference.pointer]); + return _isEnabled1(reference.pointer, _id_isEnabled1 as jni.JMethodIDPtr, + f.reference.pointer) + .boolean; } static final _id_isEnabled2 = _class.instanceMethodId( @@ -819,6 +1330,17 @@ class JsonFactory extends jni.JObject { r"(Lcom/fasterxml/jackson/core/StreamReadFeature;)Z", ); + static final _isEnabled2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public final boolean isEnabled(com.fasterxml.jackson.core.StreamReadFeature f) /// /// Method for checking if the specified stream read feature is enabled. @@ -828,8 +1350,9 @@ class JsonFactory extends jni.JObject { bool isEnabled2( jni.JObject f, ) { - return _id_isEnabled2( - this, const jni.jbooleanType(), [f.reference.pointer]); + return _isEnabled2(reference.pointer, _id_isEnabled2 as jni.JMethodIDPtr, + f.reference.pointer) + .boolean; } static final _id_getInputDecorator = _class.instanceMethodId( @@ -837,6 +1360,18 @@ class JsonFactory extends jni.JObject { r"()Lcom/fasterxml/jackson/core/io/InputDecorator;", ); + static final _getInputDecorator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public com.fasterxml.jackson.core.io.InputDecorator getInputDecorator() /// The returned object must be released after use, by calling the [release] method. /// @@ -844,7 +1379,9 @@ class JsonFactory extends jni.JObject { /// there is no default decorator). ///@return InputDecorator configured, if any jni.JObject getInputDecorator() { - return _id_getInputDecorator(this, const jni.JObjectType(), []); + return _getInputDecorator( + reference.pointer, _id_getInputDecorator as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_setInputDecorator = _class.instanceMethodId( @@ -852,6 +1389,17 @@ class JsonFactory extends jni.JObject { r"(Lcom/fasterxml/jackson/core/io/InputDecorator;)Lcom/fasterxml/jackson/core/JsonFactory;", ); + static final _setInputDecorator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonFactory setInputDecorator(com.fasterxml.jackson.core.io.InputDecorator d) /// The returned object must be released after use, by calling the [release] method. /// @@ -862,8 +1410,9 @@ class JsonFactory extends jni.JObject { JsonFactory setInputDecorator( jni.JObject d, ) { - return _id_setInputDecorator( - this, const $JsonFactoryType(), [d.reference.pointer]); + return _setInputDecorator(reference.pointer, + _id_setInputDecorator as jni.JMethodIDPtr, d.reference.pointer) + .object(const $JsonFactoryType()); } static final _id_configure2 = _class.instanceMethodId( @@ -871,6 +1420,17 @@ class JsonFactory extends jni.JObject { r"(Lcom/fasterxml/jackson/core/JsonGenerator$Feature;Z)Lcom/fasterxml/jackson/core/JsonFactory;", ); + static final _configure2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, ffi.Int64)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); + /// from: public final com.fasterxml.jackson.core.JsonFactory configure(com.fasterxml.jackson.core.JsonGenerator.Feature f, boolean state) /// The returned object must be released after use, by calling the [release] method. /// @@ -883,8 +1443,9 @@ class JsonFactory extends jni.JObject { jni.JObject f, bool state, ) { - return _id_configure2( - this, const $JsonFactoryType(), [f.reference.pointer, state ? 1 : 0]); + return _configure2(reference.pointer, _id_configure2 as jni.JMethodIDPtr, + f.reference.pointer, state ? 1 : 0) + .object(const $JsonFactoryType()); } static final _id_enable2 = _class.instanceMethodId( @@ -892,6 +1453,17 @@ class JsonFactory extends jni.JObject { r"(Lcom/fasterxml/jackson/core/JsonGenerator$Feature;)Lcom/fasterxml/jackson/core/JsonFactory;", ); + static final _enable2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonFactory enable(com.fasterxml.jackson.core.JsonGenerator.Feature f) /// The returned object must be released after use, by calling the [release] method. /// @@ -902,7 +1474,9 @@ class JsonFactory extends jni.JObject { JsonFactory enable2( jni.JObject f, ) { - return _id_enable2(this, const $JsonFactoryType(), [f.reference.pointer]); + return _enable2(reference.pointer, _id_enable2 as jni.JMethodIDPtr, + f.reference.pointer) + .object(const $JsonFactoryType()); } static final _id_disable2 = _class.instanceMethodId( @@ -910,6 +1484,17 @@ class JsonFactory extends jni.JObject { r"(Lcom/fasterxml/jackson/core/JsonGenerator$Feature;)Lcom/fasterxml/jackson/core/JsonFactory;", ); + static final _disable2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonFactory disable(com.fasterxml.jackson.core.JsonGenerator.Feature f) /// The returned object must be released after use, by calling the [release] method. /// @@ -920,7 +1505,9 @@ class JsonFactory extends jni.JObject { JsonFactory disable2( jni.JObject f, ) { - return _id_disable2(this, const $JsonFactoryType(), [f.reference.pointer]); + return _disable2(reference.pointer, _id_disable2 as jni.JMethodIDPtr, + f.reference.pointer) + .object(const $JsonFactoryType()); } static final _id_isEnabled3 = _class.instanceMethodId( @@ -928,6 +1515,17 @@ class JsonFactory extends jni.JObject { r"(Lcom/fasterxml/jackson/core/JsonGenerator$Feature;)Z", ); + static final _isEnabled3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public final boolean isEnabled(com.fasterxml.jackson.core.JsonGenerator.Feature f) /// /// Check whether specified generator feature is enabled. @@ -936,8 +1534,9 @@ class JsonFactory extends jni.JObject { bool isEnabled3( jni.JObject f, ) { - return _id_isEnabled3( - this, const jni.jbooleanType(), [f.reference.pointer]); + return _isEnabled3(reference.pointer, _id_isEnabled3 as jni.JMethodIDPtr, + f.reference.pointer) + .boolean; } static final _id_isEnabled4 = _class.instanceMethodId( @@ -945,6 +1544,17 @@ class JsonFactory extends jni.JObject { r"(Lcom/fasterxml/jackson/core/StreamWriteFeature;)Z", ); + static final _isEnabled4 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public final boolean isEnabled(com.fasterxml.jackson.core.StreamWriteFeature f) /// /// Check whether specified stream write feature is enabled. @@ -954,8 +1564,9 @@ class JsonFactory extends jni.JObject { bool isEnabled4( jni.JObject f, ) { - return _id_isEnabled4( - this, const jni.jbooleanType(), [f.reference.pointer]); + return _isEnabled4(reference.pointer, _id_isEnabled4 as jni.JMethodIDPtr, + f.reference.pointer) + .boolean; } static final _id_getCharacterEscapes = _class.instanceMethodId( @@ -963,6 +1574,18 @@ class JsonFactory extends jni.JObject { r"()Lcom/fasterxml/jackson/core/io/CharacterEscapes;", ); + static final _getCharacterEscapes = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public com.fasterxml.jackson.core.io.CharacterEscapes getCharacterEscapes() /// The returned object must be released after use, by calling the [release] method. /// @@ -970,7 +1593,9 @@ class JsonFactory extends jni.JObject { /// it creates. ///@return Configured {@code CharacterEscapes}, if any; {@code null} if none jni.JObject getCharacterEscapes() { - return _id_getCharacterEscapes(this, const jni.JObjectType(), []); + return _getCharacterEscapes( + reference.pointer, _id_getCharacterEscapes as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_setCharacterEscapes = _class.instanceMethodId( @@ -978,6 +1603,17 @@ class JsonFactory extends jni.JObject { r"(Lcom/fasterxml/jackson/core/io/CharacterEscapes;)Lcom/fasterxml/jackson/core/JsonFactory;", ); + static final _setCharacterEscapes = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonFactory setCharacterEscapes(com.fasterxml.jackson.core.io.CharacterEscapes esc) /// The returned object must be released after use, by calling the [release] method. /// @@ -988,8 +1624,9 @@ class JsonFactory extends jni.JObject { JsonFactory setCharacterEscapes( jni.JObject esc, ) { - return _id_setCharacterEscapes( - this, const $JsonFactoryType(), [esc.reference.pointer]); + return _setCharacterEscapes(reference.pointer, + _id_setCharacterEscapes as jni.JMethodIDPtr, esc.reference.pointer) + .object(const $JsonFactoryType()); } static final _id_getOutputDecorator = _class.instanceMethodId( @@ -997,6 +1634,18 @@ class JsonFactory extends jni.JObject { r"()Lcom/fasterxml/jackson/core/io/OutputDecorator;", ); + static final _getOutputDecorator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public com.fasterxml.jackson.core.io.OutputDecorator getOutputDecorator() /// The returned object must be released after use, by calling the [release] method. /// @@ -1005,7 +1654,9 @@ class JsonFactory extends jni.JObject { ///@return OutputDecorator configured for generators factory creates, if any; /// {@code null} if none. jni.JObject getOutputDecorator() { - return _id_getOutputDecorator(this, const jni.JObjectType(), []); + return _getOutputDecorator( + reference.pointer, _id_getOutputDecorator as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_setOutputDecorator = _class.instanceMethodId( @@ -1013,6 +1664,17 @@ class JsonFactory extends jni.JObject { r"(Lcom/fasterxml/jackson/core/io/OutputDecorator;)Lcom/fasterxml/jackson/core/JsonFactory;", ); + static final _setOutputDecorator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonFactory setOutputDecorator(com.fasterxml.jackson.core.io.OutputDecorator d) /// The returned object must be released after use, by calling the [release] method. /// @@ -1023,8 +1685,9 @@ class JsonFactory extends jni.JObject { JsonFactory setOutputDecorator( jni.JObject d, ) { - return _id_setOutputDecorator( - this, const $JsonFactoryType(), [d.reference.pointer]); + return _setOutputDecorator(reference.pointer, + _id_setOutputDecorator as jni.JMethodIDPtr, d.reference.pointer) + .object(const $JsonFactoryType()); } static final _id_setRootValueSeparator = _class.instanceMethodId( @@ -1032,6 +1695,17 @@ class JsonFactory extends jni.JObject { r"(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonFactory;", ); + static final _setRootValueSeparator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonFactory setRootValueSeparator(java.lang.String sep) /// The returned object must be released after use, by calling the [release] method. /// @@ -1043,8 +1717,11 @@ class JsonFactory extends jni.JObject { JsonFactory setRootValueSeparator( jni.JString sep, ) { - return _id_setRootValueSeparator( - this, const $JsonFactoryType(), [sep.reference.pointer]); + return _setRootValueSeparator( + reference.pointer, + _id_setRootValueSeparator as jni.JMethodIDPtr, + sep.reference.pointer) + .object(const $JsonFactoryType()); } static final _id_getRootValueSeparator = _class.instanceMethodId( @@ -1052,12 +1729,26 @@ class JsonFactory extends jni.JObject { r"()Ljava/lang/String;", ); + static final _getRootValueSeparator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.String getRootValueSeparator() /// The returned object must be released after use, by calling the [release] method. /// /// @return Root value separator configured, if any jni.JString getRootValueSeparator() { - return _id_getRootValueSeparator(this, const jni.JStringType(), []); + return _getRootValueSeparator( + reference.pointer, _id_getRootValueSeparator as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_setCodec = _class.instanceMethodId( @@ -1065,6 +1756,17 @@ class JsonFactory extends jni.JObject { r"(Lcom/fasterxml/jackson/core/ObjectCodec;)Lcom/fasterxml/jackson/core/JsonFactory;", ); + static final _setCodec = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonFactory setCodec(com.fasterxml.jackson.core.ObjectCodec oc) /// The returned object must be released after use, by calling the [release] method. /// @@ -1078,7 +1780,9 @@ class JsonFactory extends jni.JObject { JsonFactory setCodec( jni.JObject oc, ) { - return _id_setCodec(this, const $JsonFactoryType(), [oc.reference.pointer]); + return _setCodec(reference.pointer, _id_setCodec as jni.JMethodIDPtr, + oc.reference.pointer) + .object(const $JsonFactoryType()); } static final _id_getCodec = _class.instanceMethodId( @@ -1086,10 +1790,23 @@ class JsonFactory extends jni.JObject { r"()Lcom/fasterxml/jackson/core/ObjectCodec;", ); + static final _getCodec = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public com.fasterxml.jackson.core.ObjectCodec getCodec() /// The returned object must be released after use, by calling the [release] method. jni.JObject getCodec() { - return _id_getCodec(this, const jni.JObjectType(), []); + return _getCodec(reference.pointer, _id_getCodec as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_createParser = _class.instanceMethodId( @@ -1097,6 +1814,17 @@ class JsonFactory extends jni.JObject { r"(Ljava/io/File;)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _createParser = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonParser createParser(java.io.File f) /// The returned object must be released after use, by calling the [release] method. /// @@ -1119,8 +1847,9 @@ class JsonFactory extends jni.JObject { jsonparser_.JsonParser createParser( jni.JObject f, ) { - return _id_createParser( - this, const jsonparser_.$JsonParserType(), [f.reference.pointer]); + return _createParser(reference.pointer, + _id_createParser as jni.JMethodIDPtr, f.reference.pointer) + .object(const jsonparser_.$JsonParserType()); } static final _id_createParser1 = _class.instanceMethodId( @@ -1128,6 +1857,17 @@ class JsonFactory extends jni.JObject { r"(Ljava/net/URL;)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _createParser1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonParser createParser(java.net.URL url) /// The returned object must be released after use, by calling the [release] method. /// @@ -1148,8 +1888,9 @@ class JsonFactory extends jni.JObject { jsonparser_.JsonParser createParser1( jni.JObject url, ) { - return _id_createParser1( - this, const jsonparser_.$JsonParserType(), [url.reference.pointer]); + return _createParser1(reference.pointer, + _id_createParser1 as jni.JMethodIDPtr, url.reference.pointer) + .object(const jsonparser_.$JsonParserType()); } static final _id_createParser2 = _class.instanceMethodId( @@ -1157,6 +1898,17 @@ class JsonFactory extends jni.JObject { r"(Ljava/io/InputStream;)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _createParser2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonParser createParser(java.io.InputStream in) /// The returned object must be released after use, by calling the [release] method. /// @@ -1180,8 +1932,9 @@ class JsonFactory extends jni.JObject { jsonparser_.JsonParser createParser2( jni.JObject in0, ) { - return _id_createParser2( - this, const jsonparser_.$JsonParserType(), [in0.reference.pointer]); + return _createParser2(reference.pointer, + _id_createParser2 as jni.JMethodIDPtr, in0.reference.pointer) + .object(const jsonparser_.$JsonParserType()); } static final _id_createParser3 = _class.instanceMethodId( @@ -1189,6 +1942,17 @@ class JsonFactory extends jni.JObject { r"(Ljava/io/Reader;)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _createParser3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonParser createParser(java.io.Reader r) /// The returned object must be released after use, by calling the [release] method. /// @@ -1205,8 +1969,9 @@ class JsonFactory extends jni.JObject { jsonparser_.JsonParser createParser3( jni.JObject r, ) { - return _id_createParser3( - this, const jsonparser_.$JsonParserType(), [r.reference.pointer]); + return _createParser3(reference.pointer, + _id_createParser3 as jni.JMethodIDPtr, r.reference.pointer) + .object(const jsonparser_.$JsonParserType()); } static final _id_createParser4 = _class.instanceMethodId( @@ -1214,6 +1979,17 @@ class JsonFactory extends jni.JObject { r"([B)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _createParser4 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonParser createParser(byte[] data) /// The returned object must be released after use, by calling the [release] method. /// @@ -1223,8 +1999,9 @@ class JsonFactory extends jni.JObject { jsonparser_.JsonParser createParser4( jni.JArray data, ) { - return _id_createParser4( - this, const jsonparser_.$JsonParserType(), [data.reference.pointer]); + return _createParser4(reference.pointer, + _id_createParser4 as jni.JMethodIDPtr, data.reference.pointer) + .object(const jsonparser_.$JsonParserType()); } static final _id_createParser5 = _class.instanceMethodId( @@ -1232,6 +2009,21 @@ class JsonFactory extends jni.JObject { r"([BII)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _createParser5 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, int)>(); + /// from: public com.fasterxml.jackson.core.JsonParser createParser(byte[] data, int offset, int len) /// The returned object must be released after use, by calling the [release] method. /// @@ -1246,8 +2038,13 @@ class JsonFactory extends jni.JObject { int offset, int len, ) { - return _id_createParser5(this, const jsonparser_.$JsonParserType(), - [data.reference.pointer, jni.JValueInt(offset), jni.JValueInt(len)]); + return _createParser5( + reference.pointer, + _id_createParser5 as jni.JMethodIDPtr, + data.reference.pointer, + offset, + len) + .object(const jsonparser_.$JsonParserType()); } static final _id_createParser6 = _class.instanceMethodId( @@ -1255,6 +2052,17 @@ class JsonFactory extends jni.JObject { r"(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _createParser6 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonParser createParser(java.lang.String content) /// The returned object must be released after use, by calling the [release] method. /// @@ -1264,8 +2072,9 @@ class JsonFactory extends jni.JObject { jsonparser_.JsonParser createParser6( jni.JString content, ) { - return _id_createParser6( - this, const jsonparser_.$JsonParserType(), [content.reference.pointer]); + return _createParser6(reference.pointer, + _id_createParser6 as jni.JMethodIDPtr, content.reference.pointer) + .object(const jsonparser_.$JsonParserType()); } static final _id_createParser7 = _class.instanceMethodId( @@ -1273,6 +2082,17 @@ class JsonFactory extends jni.JObject { r"([C)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _createParser7 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonParser createParser(char[] content) /// The returned object must be released after use, by calling the [release] method. /// @@ -1282,8 +2102,9 @@ class JsonFactory extends jni.JObject { jsonparser_.JsonParser createParser7( jni.JArray content, ) { - return _id_createParser7( - this, const jsonparser_.$JsonParserType(), [content.reference.pointer]); + return _createParser7(reference.pointer, + _id_createParser7 as jni.JMethodIDPtr, content.reference.pointer) + .object(const jsonparser_.$JsonParserType()); } static final _id_createParser8 = _class.instanceMethodId( @@ -1291,6 +2112,21 @@ class JsonFactory extends jni.JObject { r"([CII)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _createParser8 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, int)>(); + /// from: public com.fasterxml.jackson.core.JsonParser createParser(char[] content, int offset, int len) /// The returned object must be released after use, by calling the [release] method. /// @@ -1301,8 +2137,13 @@ class JsonFactory extends jni.JObject { int offset, int len, ) { - return _id_createParser8(this, const jsonparser_.$JsonParserType(), - [content.reference.pointer, jni.JValueInt(offset), jni.JValueInt(len)]); + return _createParser8( + reference.pointer, + _id_createParser8 as jni.JMethodIDPtr, + content.reference.pointer, + offset, + len) + .object(const jsonparser_.$JsonParserType()); } static final _id_createParser9 = _class.instanceMethodId( @@ -1310,6 +2151,17 @@ class JsonFactory extends jni.JObject { r"(Ljava/io/DataInput;)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _createParser9 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonParser createParser(java.io.DataInput in) /// The returned object must be released after use, by calling the [release] method. /// @@ -1322,8 +2174,9 @@ class JsonFactory extends jni.JObject { jsonparser_.JsonParser createParser9( jni.JObject in0, ) { - return _id_createParser9( - this, const jsonparser_.$JsonParserType(), [in0.reference.pointer]); + return _createParser9(reference.pointer, + _id_createParser9 as jni.JMethodIDPtr, in0.reference.pointer) + .object(const jsonparser_.$JsonParserType()); } static final _id_createNonBlockingByteArrayParser = _class.instanceMethodId( @@ -1331,6 +2184,19 @@ class JsonFactory extends jni.JObject { r"()Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _createNonBlockingByteArrayParser = + ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public com.fasterxml.jackson.core.JsonParser createNonBlockingByteArrayParser() /// The returned object must be released after use, by calling the [release] method. /// @@ -1348,8 +2214,9 @@ class JsonFactory extends jni.JObject { /// at this point. ///@since 2.9 jsonparser_.JsonParser createNonBlockingByteArrayParser() { - return _id_createNonBlockingByteArrayParser( - this, const jsonparser_.$JsonParserType(), []); + return _createNonBlockingByteArrayParser(reference.pointer, + _id_createNonBlockingByteArrayParser as jni.JMethodIDPtr) + .object(const jsonparser_.$JsonParserType()); } static final _id_createGenerator = _class.instanceMethodId( @@ -1357,6 +2224,20 @@ class JsonFactory extends jni.JObject { r"(Ljava/io/OutputStream;Lcom/fasterxml/jackson/core/JsonEncoding;)Lcom/fasterxml/jackson/core/JsonGenerator;", ); + static final _createGenerator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonGenerator createGenerator(java.io.OutputStream out, com.fasterxml.jackson.core.JsonEncoding enc) /// The returned object must be released after use, by calling the [release] method. /// @@ -1382,8 +2263,12 @@ class JsonFactory extends jni.JObject { jni.JObject out, jni.JObject enc, ) { - return _id_createGenerator(this, const jni.JObjectType(), - [out.reference.pointer, enc.reference.pointer]); + return _createGenerator( + reference.pointer, + _id_createGenerator as jni.JMethodIDPtr, + out.reference.pointer, + enc.reference.pointer) + .object(const jni.JObjectType()); } static final _id_createGenerator1 = _class.instanceMethodId( @@ -1391,6 +2276,17 @@ class JsonFactory extends jni.JObject { r"(Ljava/io/OutputStream;)Lcom/fasterxml/jackson/core/JsonGenerator;", ); + static final _createGenerator1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonGenerator createGenerator(java.io.OutputStream out) /// The returned object must be released after use, by calling the [release] method. /// @@ -1402,8 +2298,9 @@ class JsonFactory extends jni.JObject { jni.JObject createGenerator1( jni.JObject out, ) { - return _id_createGenerator1( - this, const jni.JObjectType(), [out.reference.pointer]); + return _createGenerator1(reference.pointer, + _id_createGenerator1 as jni.JMethodIDPtr, out.reference.pointer) + .object(const jni.JObjectType()); } static final _id_createGenerator2 = _class.instanceMethodId( @@ -1411,6 +2308,17 @@ class JsonFactory extends jni.JObject { r"(Ljava/io/Writer;)Lcom/fasterxml/jackson/core/JsonGenerator;", ); + static final _createGenerator2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonGenerator createGenerator(java.io.Writer w) /// The returned object must be released after use, by calling the [release] method. /// @@ -1428,8 +2336,9 @@ class JsonFactory extends jni.JObject { jni.JObject createGenerator2( jni.JObject w, ) { - return _id_createGenerator2( - this, const jni.JObjectType(), [w.reference.pointer]); + return _createGenerator2(reference.pointer, + _id_createGenerator2 as jni.JMethodIDPtr, w.reference.pointer) + .object(const jni.JObjectType()); } static final _id_createGenerator3 = _class.instanceMethodId( @@ -1437,6 +2346,20 @@ class JsonFactory extends jni.JObject { r"(Ljava/io/File;Lcom/fasterxml/jackson/core/JsonEncoding;)Lcom/fasterxml/jackson/core/JsonGenerator;", ); + static final _createGenerator3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonGenerator createGenerator(java.io.File f, com.fasterxml.jackson.core.JsonEncoding enc) /// The returned object must be released after use, by calling the [release] method. /// @@ -1456,8 +2379,12 @@ class JsonFactory extends jni.JObject { jni.JObject f, jni.JObject enc, ) { - return _id_createGenerator3(this, const jni.JObjectType(), - [f.reference.pointer, enc.reference.pointer]); + return _createGenerator3( + reference.pointer, + _id_createGenerator3 as jni.JMethodIDPtr, + f.reference.pointer, + enc.reference.pointer) + .object(const jni.JObjectType()); } static final _id_createGenerator4 = _class.instanceMethodId( @@ -1465,6 +2392,20 @@ class JsonFactory extends jni.JObject { r"(Ljava/io/DataOutput;Lcom/fasterxml/jackson/core/JsonEncoding;)Lcom/fasterxml/jackson/core/JsonGenerator;", ); + static final _createGenerator4 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonGenerator createGenerator(java.io.DataOutput out, com.fasterxml.jackson.core.JsonEncoding enc) /// The returned object must be released after use, by calling the [release] method. /// @@ -1475,8 +2416,12 @@ class JsonFactory extends jni.JObject { jni.JObject out, jni.JObject enc, ) { - return _id_createGenerator4(this, const jni.JObjectType(), - [out.reference.pointer, enc.reference.pointer]); + return _createGenerator4( + reference.pointer, + _id_createGenerator4 as jni.JMethodIDPtr, + out.reference.pointer, + enc.reference.pointer) + .object(const jni.JObjectType()); } static final _id_createGenerator5 = _class.instanceMethodId( @@ -1484,6 +2429,17 @@ class JsonFactory extends jni.JObject { r"(Ljava/io/DataOutput;)Lcom/fasterxml/jackson/core/JsonGenerator;", ); + static final _createGenerator5 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonGenerator createGenerator(java.io.DataOutput out) /// The returned object must be released after use, by calling the [release] method. /// @@ -1495,8 +2451,9 @@ class JsonFactory extends jni.JObject { jni.JObject createGenerator5( jni.JObject out, ) { - return _id_createGenerator5( - this, const jni.JObjectType(), [out.reference.pointer]); + return _createGenerator5(reference.pointer, + _id_createGenerator5 as jni.JMethodIDPtr, out.reference.pointer) + .object(const jni.JObjectType()); } static final _id_createJsonParser = _class.instanceMethodId( @@ -1504,6 +2461,17 @@ class JsonFactory extends jni.JObject { r"(Ljava/io/File;)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _createJsonParser = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(java.io.File f) /// The returned object must be released after use, by calling the [release] method. /// @@ -1528,8 +2496,9 @@ class JsonFactory extends jni.JObject { jsonparser_.JsonParser createJsonParser( jni.JObject f, ) { - return _id_createJsonParser( - this, const jsonparser_.$JsonParserType(), [f.reference.pointer]); + return _createJsonParser(reference.pointer, + _id_createJsonParser as jni.JMethodIDPtr, f.reference.pointer) + .object(const jsonparser_.$JsonParserType()); } static final _id_createJsonParser1 = _class.instanceMethodId( @@ -1537,6 +2506,17 @@ class JsonFactory extends jni.JObject { r"(Ljava/net/URL;)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _createJsonParser1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(java.net.URL url) /// The returned object must be released after use, by calling the [release] method. /// @@ -1560,8 +2540,9 @@ class JsonFactory extends jni.JObject { jsonparser_.JsonParser createJsonParser1( jni.JObject url, ) { - return _id_createJsonParser1( - this, const jsonparser_.$JsonParserType(), [url.reference.pointer]); + return _createJsonParser1(reference.pointer, + _id_createJsonParser1 as jni.JMethodIDPtr, url.reference.pointer) + .object(const jsonparser_.$JsonParserType()); } static final _id_createJsonParser2 = _class.instanceMethodId( @@ -1569,6 +2550,17 @@ class JsonFactory extends jni.JObject { r"(Ljava/io/InputStream;)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _createJsonParser2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(java.io.InputStream in) /// The returned object must be released after use, by calling the [release] method. /// @@ -1595,8 +2587,9 @@ class JsonFactory extends jni.JObject { jsonparser_.JsonParser createJsonParser2( jni.JObject in0, ) { - return _id_createJsonParser2( - this, const jsonparser_.$JsonParserType(), [in0.reference.pointer]); + return _createJsonParser2(reference.pointer, + _id_createJsonParser2 as jni.JMethodIDPtr, in0.reference.pointer) + .object(const jsonparser_.$JsonParserType()); } static final _id_createJsonParser3 = _class.instanceMethodId( @@ -1604,6 +2597,17 @@ class JsonFactory extends jni.JObject { r"(Ljava/io/Reader;)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _createJsonParser3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(java.io.Reader r) /// The returned object must be released after use, by calling the [release] method. /// @@ -1623,8 +2627,9 @@ class JsonFactory extends jni.JObject { jsonparser_.JsonParser createJsonParser3( jni.JObject r, ) { - return _id_createJsonParser3( - this, const jsonparser_.$JsonParserType(), [r.reference.pointer]); + return _createJsonParser3(reference.pointer, + _id_createJsonParser3 as jni.JMethodIDPtr, r.reference.pointer) + .object(const jsonparser_.$JsonParserType()); } static final _id_createJsonParser4 = _class.instanceMethodId( @@ -1632,6 +2637,17 @@ class JsonFactory extends jni.JObject { r"([B)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _createJsonParser4 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(byte[] data) /// The returned object must be released after use, by calling the [release] method. /// @@ -1644,8 +2660,9 @@ class JsonFactory extends jni.JObject { jsonparser_.JsonParser createJsonParser4( jni.JArray data, ) { - return _id_createJsonParser4( - this, const jsonparser_.$JsonParserType(), [data.reference.pointer]); + return _createJsonParser4(reference.pointer, + _id_createJsonParser4 as jni.JMethodIDPtr, data.reference.pointer) + .object(const jsonparser_.$JsonParserType()); } static final _id_createJsonParser5 = _class.instanceMethodId( @@ -1653,6 +2670,21 @@ class JsonFactory extends jni.JObject { r"([BII)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _createJsonParser5 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, int)>(); + /// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(byte[] data, int offset, int len) /// The returned object must be released after use, by calling the [release] method. /// @@ -1670,8 +2702,13 @@ class JsonFactory extends jni.JObject { int offset, int len, ) { - return _id_createJsonParser5(this, const jsonparser_.$JsonParserType(), - [data.reference.pointer, jni.JValueInt(offset), jni.JValueInt(len)]); + return _createJsonParser5( + reference.pointer, + _id_createJsonParser5 as jni.JMethodIDPtr, + data.reference.pointer, + offset, + len) + .object(const jsonparser_.$JsonParserType()); } static final _id_createJsonParser6 = _class.instanceMethodId( @@ -1679,6 +2716,17 @@ class JsonFactory extends jni.JObject { r"(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _createJsonParser6 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(java.lang.String content) /// The returned object must be released after use, by calling the [release] method. /// @@ -1692,8 +2740,11 @@ class JsonFactory extends jni.JObject { jsonparser_.JsonParser createJsonParser6( jni.JString content, ) { - return _id_createJsonParser6( - this, const jsonparser_.$JsonParserType(), [content.reference.pointer]); + return _createJsonParser6( + reference.pointer, + _id_createJsonParser6 as jni.JMethodIDPtr, + content.reference.pointer) + .object(const jsonparser_.$JsonParserType()); } static final _id_createJsonGenerator = _class.instanceMethodId( @@ -1701,6 +2752,20 @@ class JsonFactory extends jni.JObject { r"(Ljava/io/OutputStream;Lcom/fasterxml/jackson/core/JsonEncoding;)Lcom/fasterxml/jackson/core/JsonGenerator;", ); + static final _createJsonGenerator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonGenerator createJsonGenerator(java.io.OutputStream out, com.fasterxml.jackson.core.JsonEncoding enc) /// The returned object must be released after use, by calling the [release] method. /// @@ -1728,8 +2793,12 @@ class JsonFactory extends jni.JObject { jni.JObject out, jni.JObject enc, ) { - return _id_createJsonGenerator(this, const jni.JObjectType(), - [out.reference.pointer, enc.reference.pointer]); + return _createJsonGenerator( + reference.pointer, + _id_createJsonGenerator as jni.JMethodIDPtr, + out.reference.pointer, + enc.reference.pointer) + .object(const jni.JObjectType()); } static final _id_createJsonGenerator1 = _class.instanceMethodId( @@ -1737,6 +2806,17 @@ class JsonFactory extends jni.JObject { r"(Ljava/io/Writer;)Lcom/fasterxml/jackson/core/JsonGenerator;", ); + static final _createJsonGenerator1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonGenerator createJsonGenerator(java.io.Writer out) /// The returned object must be released after use, by calling the [release] method. /// @@ -1756,8 +2836,9 @@ class JsonFactory extends jni.JObject { jni.JObject createJsonGenerator1( jni.JObject out, ) { - return _id_createJsonGenerator1( - this, const jni.JObjectType(), [out.reference.pointer]); + return _createJsonGenerator1(reference.pointer, + _id_createJsonGenerator1 as jni.JMethodIDPtr, out.reference.pointer) + .object(const jni.JObjectType()); } static final _id_createJsonGenerator2 = _class.instanceMethodId( @@ -1765,6 +2846,17 @@ class JsonFactory extends jni.JObject { r"(Ljava/io/OutputStream;)Lcom/fasterxml/jackson/core/JsonGenerator;", ); + static final _createJsonGenerator2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonGenerator createJsonGenerator(java.io.OutputStream out) /// The returned object must be released after use, by calling the [release] method. /// @@ -1779,8 +2871,9 @@ class JsonFactory extends jni.JObject { jni.JObject createJsonGenerator2( jni.JObject out, ) { - return _id_createJsonGenerator2( - this, const jni.JObjectType(), [out.reference.pointer]); + return _createJsonGenerator2(reference.pointer, + _id_createJsonGenerator2 as jni.JMethodIDPtr, out.reference.pointer) + .object(const jni.JObjectType()); } } diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/dart_only/dart_bindings/com/fasterxml/jackson/core/JsonParser.dart b/pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/JsonParser.dart similarity index 60% rename from pkgs/jnigen/test/jackson_core_test/third_party/dart_only/dart_bindings/com/fasterxml/jackson/core/JsonParser.dart rename to pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/JsonParser.dart index f423b52e72..9a4cce7794 100644 --- a/pkgs/jnigen/test/jackson_core_test/third_party/dart_only/dart_bindings/com/fasterxml/jackson/core/JsonParser.dart +++ b/pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/JsonParser.dart @@ -63,11 +63,23 @@ class JsonParser_Feature extends jni.JObject { r"()[Lcom/fasterxml/jackson/core/JsonParser$Feature;", ); + static final _values = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public com.fasterxml.jackson.core.JsonParser.Feature[] values() /// The returned object must be released after use, by calling the [release] method. static jni.JArray values() { - return _id_values( - _class, const jni.JArrayType($JsonParser_FeatureType()), []); + return _values(_class.reference.pointer, _id_values as jni.JMethodIDPtr) + .object(const jni.JArrayType($JsonParser_FeatureType())); } static final _id_valueOf = _class.staticMethodId( @@ -75,13 +87,25 @@ class JsonParser_Feature extends jni.JObject { r"(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonParser$Feature;", ); + static final _valueOf = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public com.fasterxml.jackson.core.JsonParser.Feature valueOf(java.lang.String name) /// The returned object must be released after use, by calling the [release] method. static JsonParser_Feature valueOf( jni.JString name, ) { - return _id_valueOf( - _class, const $JsonParser_FeatureType(), [name.reference.pointer]); + return _valueOf(_class.reference.pointer, _id_valueOf as jni.JMethodIDPtr, + name.reference.pointer) + .object(const $JsonParser_FeatureType()); } static final _id_collectDefaults = _class.staticMethodId( @@ -89,13 +113,27 @@ class JsonParser_Feature extends jni.JObject { r"()I", ); + static final _collectDefaults = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public int collectDefaults() /// /// Method that calculates bit set (flags) of all features that /// are enabled by default. ///@return Bit mask of all features that are enabled by default static int collectDefaults() { - return _id_collectDefaults(_class, const jni.jintType(), []); + return _collectDefaults( + _class.reference.pointer, _id_collectDefaults as jni.JMethodIDPtr) + .integer; } static final _id_enabledByDefault = _class.instanceMethodId( @@ -103,9 +141,23 @@ class JsonParser_Feature extends jni.JObject { r"()Z", ); + static final _enabledByDefault = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public boolean enabledByDefault() bool enabledByDefault() { - return _id_enabledByDefault(this, const jni.jbooleanType(), []); + return _enabledByDefault( + reference.pointer, _id_enabledByDefault as jni.JMethodIDPtr) + .boolean; } static final _id_enabledIn = _class.instanceMethodId( @@ -113,12 +165,21 @@ class JsonParser_Feature extends jni.JObject { r"(I)Z", ); + static final _enabledIn = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: public boolean enabledIn(int flags) bool enabledIn( int flags, ) { - return _id_enabledIn( - this, const jni.jbooleanType(), [jni.JValueInt(flags)]); + return _enabledIn( + reference.pointer, _id_enabledIn as jni.JMethodIDPtr, flags) + .boolean; } static final _id_getMask = _class.instanceMethodId( @@ -126,9 +187,21 @@ class JsonParser_Feature extends jni.JObject { r"()I", ); + static final _getMask = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public int getMask() int getMask() { - return _id_getMask(this, const jni.jintType(), []); + return _getMask(reference.pointer, _id_getMask as jni.JMethodIDPtr).integer; } } @@ -180,11 +253,23 @@ class JsonParser_NumberType extends jni.JObject { r"()[Lcom/fasterxml/jackson/core/JsonParser$NumberType;", ); + static final _values = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public com.fasterxml.jackson.core.JsonParser.NumberType[] values() /// The returned object must be released after use, by calling the [release] method. static jni.JArray values() { - return _id_values( - _class, const jni.JArrayType($JsonParser_NumberTypeType()), []); + return _values(_class.reference.pointer, _id_values as jni.JMethodIDPtr) + .object(const jni.JArrayType($JsonParser_NumberTypeType())); } static final _id_valueOf = _class.staticMethodId( @@ -192,13 +277,25 @@ class JsonParser_NumberType extends jni.JObject { r"(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonParser$NumberType;", ); + static final _valueOf = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public com.fasterxml.jackson.core.JsonParser.NumberType valueOf(java.lang.String name) /// The returned object must be released after use, by calling the [release] method. static JsonParser_NumberType valueOf( jni.JString name, ) { - return _id_valueOf( - _class, const $JsonParser_NumberTypeType(), [name.reference.pointer]); + return _valueOf(_class.reference.pointer, _id_valueOf as jni.JMethodIDPtr, + name.reference.pointer) + .object(const $JsonParser_NumberTypeType()); } } @@ -267,23 +364,46 @@ class JsonParser extends jni.JObject { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: protected void () /// The returned object must be released after use, by calling the [release] method. factory JsonParser() { - return JsonParser.fromReference(_id_new0(_class, referenceType, [])); + return JsonParser.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } static final _id_new1 = _class.constructorId( r"(I)V", ); + static final _new1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: protected void (int features) /// The returned object must be released after use, by calling the [release] method. factory JsonParser.new1( int features, ) { return JsonParser.fromReference( - _id_new1(_class, referenceType, [jni.JValueInt(features)])); + _new1(_class.reference.pointer, _id_new1 as jni.JMethodIDPtr, features) + .reference); } static final _id_getCodec = _class.instanceMethodId( @@ -291,6 +411,18 @@ class JsonParser extends jni.JObject { r"()Lcom/fasterxml/jackson/core/ObjectCodec;", ); + static final _getCodec = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract com.fasterxml.jackson.core.ObjectCodec getCodec() /// The returned object must be released after use, by calling the [release] method. /// @@ -299,7 +431,8 @@ class JsonParser extends jni.JObject { /// method (and its variants). ///@return Codec assigned to this parser, if any; {@code null} if none jni.JObject getCodec() { - return _id_getCodec(this, const jni.JObjectType(), []); + return _getCodec(reference.pointer, _id_getCodec as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_setCodec = _class.instanceMethodId( @@ -307,6 +440,17 @@ class JsonParser extends jni.JObject { r"(Lcom/fasterxml/jackson/core/ObjectCodec;)V", ); + static final _setCodec = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public abstract void setCodec(com.fasterxml.jackson.core.ObjectCodec oc) /// /// Setter that allows defining ObjectCodec associated with this @@ -316,7 +460,9 @@ class JsonParser extends jni.JObject { void setCodec( jni.JObject oc, ) { - _id_setCodec(this, const jni.jvoidType(), [oc.reference.pointer]); + _setCodec(reference.pointer, _id_setCodec as jni.JMethodIDPtr, + oc.reference.pointer) + .check(); } static final _id_getInputSource = _class.instanceMethodId( @@ -324,6 +470,18 @@ class JsonParser extends jni.JObject { r"()Ljava/lang/Object;", ); + static final _getInputSource = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.Object getInputSource() /// The returned object must be released after use, by calling the [release] method. /// @@ -342,7 +500,9 @@ class JsonParser extends jni.JObject { /// "last effort", i.e. only used if no other mechanism is applicable. ///@return Input source this parser was configured with jni.JObject getInputSource() { - return _id_getInputSource(this, const jni.JObjectType(), []); + return _getInputSource( + reference.pointer, _id_getInputSource as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_setRequestPayloadOnError = _class.instanceMethodId( @@ -350,6 +510,17 @@ class JsonParser extends jni.JObject { r"(Lcom/fasterxml/jackson/core/util/RequestPayload;)V", ); + static final _setRequestPayloadOnError = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public void setRequestPayloadOnError(com.fasterxml.jackson.core.util.RequestPayload payload) /// /// Sets the payload to be passed if JsonParseException is thrown. @@ -358,8 +529,11 @@ class JsonParser extends jni.JObject { void setRequestPayloadOnError( jni.JObject payload, ) { - _id_setRequestPayloadOnError( - this, const jni.jvoidType(), [payload.reference.pointer]); + _setRequestPayloadOnError( + reference.pointer, + _id_setRequestPayloadOnError as jni.JMethodIDPtr, + payload.reference.pointer) + .check(); } static final _id_setRequestPayloadOnError1 = _class.instanceMethodId( @@ -367,6 +541,20 @@ class JsonParser extends jni.JObject { r"([BLjava/lang/String;)V", ); + static final _setRequestPayloadOnError1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: public void setRequestPayloadOnError(byte[] payload, java.lang.String charset) /// /// Sets the byte[] request payload and the charset @@ -377,8 +565,12 @@ class JsonParser extends jni.JObject { jni.JArray payload, jni.JString charset, ) { - _id_setRequestPayloadOnError1(this, const jni.jvoidType(), - [payload.reference.pointer, charset.reference.pointer]); + _setRequestPayloadOnError1( + reference.pointer, + _id_setRequestPayloadOnError1 as jni.JMethodIDPtr, + payload.reference.pointer, + charset.reference.pointer) + .check(); } static final _id_setRequestPayloadOnError2 = _class.instanceMethodId( @@ -386,6 +578,17 @@ class JsonParser extends jni.JObject { r"(Ljava/lang/String;)V", ); + static final _setRequestPayloadOnError2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public void setRequestPayloadOnError(java.lang.String payload) /// /// Sets the String request payload @@ -394,8 +597,11 @@ class JsonParser extends jni.JObject { void setRequestPayloadOnError2( jni.JString payload, ) { - _id_setRequestPayloadOnError2( - this, const jni.jvoidType(), [payload.reference.pointer]); + _setRequestPayloadOnError2( + reference.pointer, + _id_setRequestPayloadOnError2 as jni.JMethodIDPtr, + payload.reference.pointer) + .check(); } static final _id_setSchema = _class.instanceMethodId( @@ -403,6 +609,17 @@ class JsonParser extends jni.JObject { r"(Lcom/fasterxml/jackson/core/FormatSchema;)V", ); + static final _setSchema = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public void setSchema(com.fasterxml.jackson.core.FormatSchema schema) /// /// Method to call to make this parser use specified schema. Method must @@ -418,7 +635,9 @@ class JsonParser extends jni.JObject { void setSchema( jni.JObject schema, ) { - _id_setSchema(this, const jni.jvoidType(), [schema.reference.pointer]); + _setSchema(reference.pointer, _id_setSchema as jni.JMethodIDPtr, + schema.reference.pointer) + .check(); } static final _id_getSchema = _class.instanceMethodId( @@ -426,6 +645,18 @@ class JsonParser extends jni.JObject { r"()Lcom/fasterxml/jackson/core/FormatSchema;", ); + static final _getSchema = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public com.fasterxml.jackson.core.FormatSchema getSchema() /// The returned object must be released after use, by calling the [release] method. /// @@ -434,7 +665,8 @@ class JsonParser extends jni.JObject { ///@return Schema in use by this parser, if any; {@code null} if none ///@since 2.1 jni.JObject getSchema() { - return _id_getSchema(this, const jni.JObjectType(), []); + return _getSchema(reference.pointer, _id_getSchema as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_canUseSchema = _class.instanceMethodId( @@ -442,6 +674,17 @@ class JsonParser extends jni.JObject { r"(Lcom/fasterxml/jackson/core/FormatSchema;)Z", ); + static final _canUseSchema = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public boolean canUseSchema(com.fasterxml.jackson.core.FormatSchema schema) /// /// Method that can be used to verify that given schema can be used with @@ -451,8 +694,9 @@ class JsonParser extends jni.JObject { bool canUseSchema( jni.JObject schema, ) { - return _id_canUseSchema( - this, const jni.jbooleanType(), [schema.reference.pointer]); + return _canUseSchema(reference.pointer, + _id_canUseSchema as jni.JMethodIDPtr, schema.reference.pointer) + .boolean; } static final _id_requiresCustomCodec = _class.instanceMethodId( @@ -460,6 +704,18 @@ class JsonParser extends jni.JObject { r"()Z", ); + static final _requiresCustomCodec = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public boolean requiresCustomCodec() /// /// Method that can be called to determine if a custom @@ -471,7 +727,9 @@ class JsonParser extends jni.JObject { /// ObjectCodec is enough ///@since 2.1 bool requiresCustomCodec() { - return _id_requiresCustomCodec(this, const jni.jbooleanType(), []); + return _requiresCustomCodec( + reference.pointer, _id_requiresCustomCodec as jni.JMethodIDPtr) + .boolean; } static final _id_canParseAsync = _class.instanceMethodId( @@ -479,6 +737,18 @@ class JsonParser extends jni.JObject { r"()Z", ); + static final _canParseAsync = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public boolean canParseAsync() /// /// Method that can be called to determine if this parser instance @@ -493,7 +763,9 @@ class JsonParser extends jni.JObject { ///@return True if this is a non-blocking ("asynchronous") parser ///@since 2.9 bool canParseAsync() { - return _id_canParseAsync(this, const jni.jbooleanType(), []); + return _canParseAsync( + reference.pointer, _id_canParseAsync as jni.JMethodIDPtr) + .boolean; } static final _id_getNonBlockingInputFeeder = _class.instanceMethodId( @@ -501,6 +773,18 @@ class JsonParser extends jni.JObject { r"()Lcom/fasterxml/jackson/core/async/NonBlockingInputFeeder;", ); + static final _getNonBlockingInputFeeder = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public com.fasterxml.jackson.core.async.NonBlockingInputFeeder getNonBlockingInputFeeder() /// The returned object must be released after use, by calling the [release] method. /// @@ -510,7 +794,9 @@ class JsonParser extends jni.JObject { ///@return Input feeder to use with non-blocking (async) parsing ///@since 2.9 jni.JObject getNonBlockingInputFeeder() { - return _id_getNonBlockingInputFeeder(this, const jni.JObjectType(), []); + return _getNonBlockingInputFeeder(reference.pointer, + _id_getNonBlockingInputFeeder as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_getReadCapabilities = _class.instanceMethodId( @@ -518,6 +804,18 @@ class JsonParser extends jni.JObject { r"()Lcom/fasterxml/jackson/core/util/JacksonFeatureSet;", ); + static final _getReadCapabilities = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public com.fasterxml.jackson.core.util.JacksonFeatureSet getReadCapabilities() /// The returned object must be released after use, by calling the [release] method. /// @@ -526,7 +824,9 @@ class JsonParser extends jni.JObject { ///@return Set of read capabilities for content to read via this parser ///@since 2.12 jni.JObject getReadCapabilities() { - return _id_getReadCapabilities(this, const jni.JObjectType(), []); + return _getReadCapabilities( + reference.pointer, _id_getReadCapabilities as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_version = _class.instanceMethodId( @@ -534,6 +834,18 @@ class JsonParser extends jni.JObject { r"()Lcom/fasterxml/jackson/core/Version;", ); + static final _version = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract com.fasterxml.jackson.core.Version version() /// The returned object must be released after use, by calling the [release] method. /// @@ -542,7 +854,8 @@ class JsonParser extends jni.JObject { ///@return Version of this generator (derived from version declared for /// {@code jackson-core} jar that contains the class jni.JObject version() { - return _id_version(this, const jni.JObjectType(), []); + return _version(reference.pointer, _id_version as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_close = _class.instanceMethodId( @@ -550,6 +863,18 @@ class JsonParser extends jni.JObject { r"()V", ); + static final _close = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract void close() /// /// Closes the parser so that no further iteration or data access @@ -567,7 +892,7 @@ class JsonParser extends jni.JObject { /// stream or reader it does own them. ///@throws IOException if there is either an underlying I/O problem void close() { - _id_close(this, const jni.jvoidType(), []); + _close(reference.pointer, _id_close as jni.JMethodIDPtr).check(); } static final _id_isClosed = _class.instanceMethodId( @@ -575,6 +900,18 @@ class JsonParser extends jni.JObject { r"()Z", ); + static final _isClosed = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract boolean isClosed() /// /// Method that can be called to determine whether this parser @@ -585,7 +922,8 @@ class JsonParser extends jni.JObject { /// end of input. ///@return {@code True} if this parser instance has been closed bool isClosed() { - return _id_isClosed(this, const jni.jbooleanType(), []); + return _isClosed(reference.pointer, _id_isClosed as jni.JMethodIDPtr) + .boolean; } static final _id_getParsingContext = _class.instanceMethodId( @@ -593,6 +931,18 @@ class JsonParser extends jni.JObject { r"()Lcom/fasterxml/jackson/core/JsonStreamContext;", ); + static final _getParsingContext = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract com.fasterxml.jackson.core.JsonStreamContext getParsingContext() /// The returned object must be released after use, by calling the [release] method. /// @@ -606,7 +956,9 @@ class JsonParser extends jni.JObject { /// input, if so desired. ///@return Stream input context (JsonStreamContext) associated with this parser jni.JObject getParsingContext() { - return _id_getParsingContext(this, const jni.JObjectType(), []); + return _getParsingContext( + reference.pointer, _id_getParsingContext as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_currentLocation = _class.instanceMethodId( @@ -614,6 +966,18 @@ class JsonParser extends jni.JObject { r"()Lcom/fasterxml/jackson/core/JsonLocation;", ); + static final _currentLocation = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public com.fasterxml.jackson.core.JsonLocation currentLocation() /// The returned object must be released after use, by calling the [release] method. /// @@ -630,7 +994,9 @@ class JsonParser extends jni.JObject { ///@return Location of the last processed input unit (byte or character) ///@since 2.13 jni.JObject currentLocation() { - return _id_currentLocation(this, const jni.JObjectType(), []); + return _currentLocation( + reference.pointer, _id_currentLocation as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_currentTokenLocation = _class.instanceMethodId( @@ -638,6 +1004,18 @@ class JsonParser extends jni.JObject { r"()Lcom/fasterxml/jackson/core/JsonLocation;", ); + static final _currentTokenLocation = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public com.fasterxml.jackson.core.JsonLocation currentTokenLocation() /// The returned object must be released after use, by calling the [release] method. /// @@ -654,7 +1032,9 @@ class JsonParser extends jni.JObject { ///@return Starting location of the token parser currently points to ///@since 2.13 (will eventually replace \#getTokenLocation) jni.JObject currentTokenLocation() { - return _id_currentTokenLocation(this, const jni.JObjectType(), []); + return _currentTokenLocation( + reference.pointer, _id_currentTokenLocation as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_getCurrentLocation = _class.instanceMethodId( @@ -662,6 +1042,18 @@ class JsonParser extends jni.JObject { r"()Lcom/fasterxml/jackson/core/JsonLocation;", ); + static final _getCurrentLocation = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract com.fasterxml.jackson.core.JsonLocation getCurrentLocation() /// The returned object must be released after use, by calling the [release] method. /// @@ -669,7 +1061,9 @@ class JsonParser extends jni.JObject { /// Jackson 2.x versions (and removed from Jackson 3.0). ///@return Location of the last processed input unit (byte or character) jni.JObject getCurrentLocation() { - return _id_getCurrentLocation(this, const jni.JObjectType(), []); + return _getCurrentLocation( + reference.pointer, _id_getCurrentLocation as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_getTokenLocation = _class.instanceMethodId( @@ -677,6 +1071,18 @@ class JsonParser extends jni.JObject { r"()Lcom/fasterxml/jackson/core/JsonLocation;", ); + static final _getTokenLocation = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract com.fasterxml.jackson.core.JsonLocation getTokenLocation() /// The returned object must be released after use, by calling the [release] method. /// @@ -684,7 +1090,9 @@ class JsonParser extends jni.JObject { /// Jackson 2.x versions (and removed from Jackson 3.0). ///@return Starting location of the token parser currently points to jni.JObject getTokenLocation() { - return _id_getTokenLocation(this, const jni.JObjectType(), []); + return _getTokenLocation( + reference.pointer, _id_getTokenLocation as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_currentValue = _class.instanceMethodId( @@ -692,6 +1100,18 @@ class JsonParser extends jni.JObject { r"()Ljava/lang/Object;", ); + static final _currentValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.Object currentValue() /// The returned object must be released after use, by calling the [release] method. /// @@ -707,7 +1127,9 @@ class JsonParser extends jni.JObject { ///@return "Current value" associated with the current input context (state) of this parser ///@since 2.13 (added as replacement for older \#getCurrentValue() jni.JObject currentValue() { - return _id_currentValue(this, const jni.JObjectType(), []); + return _currentValue( + reference.pointer, _id_currentValue as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_assignCurrentValue = _class.instanceMethodId( @@ -715,6 +1137,17 @@ class JsonParser extends jni.JObject { r"(Ljava/lang/Object;)V", ); + static final _assignCurrentValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public void assignCurrentValue(java.lang.Object v) /// /// Helper method, usually equivalent to: @@ -726,7 +1159,9 @@ class JsonParser extends jni.JObject { void assignCurrentValue( jni.JObject v, ) { - _id_assignCurrentValue(this, const jni.jvoidType(), [v.reference.pointer]); + _assignCurrentValue(reference.pointer, + _id_assignCurrentValue as jni.JMethodIDPtr, v.reference.pointer) + .check(); } static final _id_getCurrentValue = _class.instanceMethodId( @@ -734,6 +1169,18 @@ class JsonParser extends jni.JObject { r"()Ljava/lang/Object;", ); + static final _getCurrentValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.Object getCurrentValue() /// The returned object must be released after use, by calling the [release] method. /// @@ -741,7 +1188,9 @@ class JsonParser extends jni.JObject { /// Jackson 2.x versions (and removed from Jackson 3.0). ///@return Location of the last processed input unit (byte or character) jni.JObject getCurrentValue() { - return _id_getCurrentValue(this, const jni.JObjectType(), []); + return _getCurrentValue( + reference.pointer, _id_getCurrentValue as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_setCurrentValue = _class.instanceMethodId( @@ -749,6 +1198,17 @@ class JsonParser extends jni.JObject { r"(Ljava/lang/Object;)V", ); + static final _setCurrentValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public void setCurrentValue(java.lang.Object v) /// /// Alias for \#assignCurrentValue, to be deprecated in later @@ -757,7 +1217,9 @@ class JsonParser extends jni.JObject { void setCurrentValue( jni.JObject v, ) { - _id_setCurrentValue(this, const jni.jvoidType(), [v.reference.pointer]); + _setCurrentValue(reference.pointer, _id_setCurrentValue as jni.JMethodIDPtr, + v.reference.pointer) + .check(); } static final _id_releaseBuffered = _class.instanceMethodId( @@ -765,6 +1227,17 @@ class JsonParser extends jni.JObject { r"(Ljava/io/OutputStream;)I", ); + static final _releaseBuffered = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public int releaseBuffered(java.io.OutputStream out) /// /// Method that can be called to push back any content that @@ -781,8 +1254,9 @@ class JsonParser extends jni.JObject { int releaseBuffered( jni.JObject out, ) { - return _id_releaseBuffered( - this, const jni.jintType(), [out.reference.pointer]); + return _releaseBuffered(reference.pointer, + _id_releaseBuffered as jni.JMethodIDPtr, out.reference.pointer) + .integer; } static final _id_releaseBuffered1 = _class.instanceMethodId( @@ -790,6 +1264,17 @@ class JsonParser extends jni.JObject { r"(Ljava/io/Writer;)I", ); + static final _releaseBuffered1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public int releaseBuffered(java.io.Writer w) /// /// Method that can be called to push back any content that @@ -807,8 +1292,9 @@ class JsonParser extends jni.JObject { int releaseBuffered1( jni.JObject w, ) { - return _id_releaseBuffered1( - this, const jni.jintType(), [w.reference.pointer]); + return _releaseBuffered1(reference.pointer, + _id_releaseBuffered1 as jni.JMethodIDPtr, w.reference.pointer) + .integer; } static final _id_enable = _class.instanceMethodId( @@ -816,6 +1302,17 @@ class JsonParser extends jni.JObject { r"(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _enable = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonParser enable(com.fasterxml.jackson.core.JsonParser.Feature f) /// The returned object must be released after use, by calling the [release] method. /// @@ -826,7 +1323,9 @@ class JsonParser extends jni.JObject { JsonParser enable( JsonParser_Feature f, ) { - return _id_enable(this, const $JsonParserType(), [f.reference.pointer]); + return _enable(reference.pointer, _id_enable as jni.JMethodIDPtr, + f.reference.pointer) + .object(const $JsonParserType()); } static final _id_disable = _class.instanceMethodId( @@ -834,6 +1333,17 @@ class JsonParser extends jni.JObject { r"(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _disable = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.fasterxml.jackson.core.JsonParser disable(com.fasterxml.jackson.core.JsonParser.Feature f) /// The returned object must be released after use, by calling the [release] method. /// @@ -844,7 +1354,9 @@ class JsonParser extends jni.JObject { JsonParser disable( JsonParser_Feature f, ) { - return _id_disable(this, const $JsonParserType(), [f.reference.pointer]); + return _disable(reference.pointer, _id_disable as jni.JMethodIDPtr, + f.reference.pointer) + .object(const $JsonParserType()); } static final _id_configure = _class.instanceMethodId( @@ -852,6 +1364,17 @@ class JsonParser extends jni.JObject { r"(Lcom/fasterxml/jackson/core/JsonParser$Feature;Z)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _configure = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, ffi.Int64)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); + /// from: public com.fasterxml.jackson.core.JsonParser configure(com.fasterxml.jackson.core.JsonParser.Feature f, boolean state) /// The returned object must be released after use, by calling the [release] method. /// @@ -864,8 +1387,9 @@ class JsonParser extends jni.JObject { JsonParser_Feature f, bool state, ) { - return _id_configure( - this, const $JsonParserType(), [f.reference.pointer, state ? 1 : 0]); + return _configure(reference.pointer, _id_configure as jni.JMethodIDPtr, + f.reference.pointer, state ? 1 : 0) + .object(const $JsonParserType()); } static final _id_isEnabled = _class.instanceMethodId( @@ -873,6 +1397,17 @@ class JsonParser extends jni.JObject { r"(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Z", ); + static final _isEnabled = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public boolean isEnabled(com.fasterxml.jackson.core.JsonParser.Feature f) /// /// Method for checking whether specified Feature is enabled. @@ -881,7 +1416,9 @@ class JsonParser extends jni.JObject { bool isEnabled( JsonParser_Feature f, ) { - return _id_isEnabled(this, const jni.jbooleanType(), [f.reference.pointer]); + return _isEnabled(reference.pointer, _id_isEnabled as jni.JMethodIDPtr, + f.reference.pointer) + .boolean; } static final _id_isEnabled1 = _class.instanceMethodId( @@ -889,6 +1426,17 @@ class JsonParser extends jni.JObject { r"(Lcom/fasterxml/jackson/core/StreamReadFeature;)Z", ); + static final _isEnabled1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public boolean isEnabled(com.fasterxml.jackson.core.StreamReadFeature f) /// /// Method for checking whether specified Feature is enabled. @@ -898,8 +1446,9 @@ class JsonParser extends jni.JObject { bool isEnabled1( jni.JObject f, ) { - return _id_isEnabled1( - this, const jni.jbooleanType(), [f.reference.pointer]); + return _isEnabled1(reference.pointer, _id_isEnabled1 as jni.JMethodIDPtr, + f.reference.pointer) + .boolean; } static final _id_getFeatureMask = _class.instanceMethodId( @@ -907,13 +1456,27 @@ class JsonParser extends jni.JObject { r"()I", ); + static final _getFeatureMask = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public int getFeatureMask() /// /// Bulk access method for getting state of all standard Features. ///@return Bit mask that defines current states of all standard Features. ///@since 2.3 int getFeatureMask() { - return _id_getFeatureMask(this, const jni.jintType(), []); + return _getFeatureMask( + reference.pointer, _id_getFeatureMask as jni.JMethodIDPtr) + .integer; } static final _id_setFeatureMask = _class.instanceMethodId( @@ -921,6 +1484,14 @@ class JsonParser extends jni.JObject { r"(I)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _setFeatureMask = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: public com.fasterxml.jackson.core.JsonParser setFeatureMask(int mask) /// The returned object must be released after use, by calling the [release] method. /// @@ -932,8 +1503,9 @@ class JsonParser extends jni.JObject { JsonParser setFeatureMask( int mask, ) { - return _id_setFeatureMask( - this, const $JsonParserType(), [jni.JValueInt(mask)]); + return _setFeatureMask( + reference.pointer, _id_setFeatureMask as jni.JMethodIDPtr, mask) + .object(const $JsonParserType()); } static final _id_overrideStdFeatures = _class.instanceMethodId( @@ -941,6 +1513,15 @@ class JsonParser extends jni.JObject { r"(II)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _overrideStdFeatures = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, + jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int64, ffi.Int64)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int, int)>(); + /// from: public com.fasterxml.jackson.core.JsonParser overrideStdFeatures(int values, int mask) /// The returned object must be released after use, by calling the [release] method. /// @@ -960,8 +1541,9 @@ class JsonParser extends jni.JObject { int values, int mask, ) { - return _id_overrideStdFeatures(this, const $JsonParserType(), - [jni.JValueInt(values), jni.JValueInt(mask)]); + return _overrideStdFeatures(reference.pointer, + _id_overrideStdFeatures as jni.JMethodIDPtr, values, mask) + .object(const $JsonParserType()); } static final _id_getFormatFeatures = _class.instanceMethodId( @@ -969,6 +1551,18 @@ class JsonParser extends jni.JObject { r"()I", ); + static final _getFormatFeatures = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public int getFormatFeatures() /// /// Bulk access method for getting state of all FormatFeatures, format-specific @@ -976,7 +1570,9 @@ class JsonParser extends jni.JObject { ///@return Bit mask that defines current states of all standard FormatFeatures. ///@since 2.6 int getFormatFeatures() { - return _id_getFormatFeatures(this, const jni.jintType(), []); + return _getFormatFeatures( + reference.pointer, _id_getFormatFeatures as jni.JMethodIDPtr) + .integer; } static final _id_overrideFormatFeatures = _class.instanceMethodId( @@ -984,6 +1580,15 @@ class JsonParser extends jni.JObject { r"(II)Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _overrideFormatFeatures = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, + jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int64, ffi.Int64)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int, int)>(); + /// from: public com.fasterxml.jackson.core.JsonParser overrideFormatFeatures(int values, int mask) /// The returned object must be released after use, by calling the [release] method. /// @@ -1001,8 +1606,9 @@ class JsonParser extends jni.JObject { int values, int mask, ) { - return _id_overrideFormatFeatures(this, const $JsonParserType(), - [jni.JValueInt(values), jni.JValueInt(mask)]); + return _overrideFormatFeatures(reference.pointer, + _id_overrideFormatFeatures as jni.JMethodIDPtr, values, mask) + .object(const $JsonParserType()); } static final _id_nextToken = _class.instanceMethodId( @@ -1010,6 +1616,18 @@ class JsonParser extends jni.JObject { r"()Lcom/fasterxml/jackson/core/JsonToken;", ); + static final _nextToken = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract com.fasterxml.jackson.core.JsonToken nextToken() /// The returned object must be released after use, by calling the [release] method. /// @@ -1022,7 +1640,8 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems jsontoken_.JsonToken nextToken() { - return _id_nextToken(this, const jsontoken_.$JsonTokenType(), []); + return _nextToken(reference.pointer, _id_nextToken as jni.JMethodIDPtr) + .object(const jsontoken_.$JsonTokenType()); } static final _id_nextValue = _class.instanceMethodId( @@ -1030,6 +1649,18 @@ class JsonParser extends jni.JObject { r"()Lcom/fasterxml/jackson/core/JsonToken;", ); + static final _nextValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract com.fasterxml.jackson.core.JsonToken nextValue() /// The returned object must be released after use, by calling the [release] method. /// @@ -1050,7 +1681,8 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems jsontoken_.JsonToken nextValue() { - return _id_nextValue(this, const jsontoken_.$JsonTokenType(), []); + return _nextValue(reference.pointer, _id_nextValue as jni.JMethodIDPtr) + .object(const jsontoken_.$JsonTokenType()); } static final _id_nextFieldName = _class.instanceMethodId( @@ -1058,6 +1690,17 @@ class JsonParser extends jni.JObject { r"(Lcom/fasterxml/jackson/core/SerializableString;)Z", ); + static final _nextFieldName = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public boolean nextFieldName(com.fasterxml.jackson.core.SerializableString str) /// /// Method that fetches next token (as if calling \#nextToken) and @@ -1078,8 +1721,9 @@ class JsonParser extends jni.JObject { bool nextFieldName( jni.JObject str, ) { - return _id_nextFieldName( - this, const jni.jbooleanType(), [str.reference.pointer]); + return _nextFieldName(reference.pointer, + _id_nextFieldName as jni.JMethodIDPtr, str.reference.pointer) + .boolean; } static final _id_nextFieldName1 = _class.instanceMethodId( @@ -1087,6 +1731,18 @@ class JsonParser extends jni.JObject { r"()Ljava/lang/String;", ); + static final _nextFieldName1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.String nextFieldName() /// The returned object must be released after use, by calling the [release] method. /// @@ -1099,7 +1755,9 @@ class JsonParser extends jni.JObject { /// JsonParseException for decoding problems ///@since 2.5 jni.JString nextFieldName1() { - return _id_nextFieldName1(this, const jni.JStringType(), []); + return _nextFieldName1( + reference.pointer, _id_nextFieldName1 as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_nextTextValue = _class.instanceMethodId( @@ -1107,6 +1765,18 @@ class JsonParser extends jni.JObject { r"()Ljava/lang/String;", ); + static final _nextTextValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.String nextTextValue() /// The returned object must be released after use, by calling the [release] method. /// @@ -1124,7 +1794,9 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems jni.JString nextTextValue() { - return _id_nextTextValue(this, const jni.JStringType(), []); + return _nextTextValue( + reference.pointer, _id_nextTextValue as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_nextIntValue = _class.instanceMethodId( @@ -1132,6 +1804,14 @@ class JsonParser extends jni.JObject { r"(I)I", ); + static final _nextIntValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: public int nextIntValue(int defaultValue) /// /// Method that fetches next token (as if calling \#nextToken) and @@ -1154,8 +1834,9 @@ class JsonParser extends jni.JObject { int nextIntValue( int defaultValue, ) { - return _id_nextIntValue( - this, const jni.jintType(), [jni.JValueInt(defaultValue)]); + return _nextIntValue(reference.pointer, + _id_nextIntValue as jni.JMethodIDPtr, defaultValue) + .integer; } static final _id_nextLongValue = _class.instanceMethodId( @@ -1163,6 +1844,14 @@ class JsonParser extends jni.JObject { r"(J)J", ); + static final _nextLongValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: public long nextLongValue(long defaultValue) /// /// Method that fetches next token (as if calling \#nextToken) and @@ -1185,7 +1874,9 @@ class JsonParser extends jni.JObject { int nextLongValue( int defaultValue, ) { - return _id_nextLongValue(this, const jni.jlongType(), [defaultValue]); + return _nextLongValue(reference.pointer, + _id_nextLongValue as jni.JMethodIDPtr, defaultValue) + .long; } static final _id_nextBooleanValue = _class.instanceMethodId( @@ -1193,6 +1884,18 @@ class JsonParser extends jni.JObject { r"()Ljava/lang/Boolean;", ); + static final _nextBooleanValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.Boolean nextBooleanValue() /// The returned object must be released after use, by calling the [release] method. /// @@ -1213,7 +1916,9 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems jni.JBoolean nextBooleanValue() { - return _id_nextBooleanValue(this, const jni.JBooleanType(), []); + return _nextBooleanValue( + reference.pointer, _id_nextBooleanValue as jni.JMethodIDPtr) + .object(const jni.JBooleanType()); } static final _id_skipChildren = _class.instanceMethodId( @@ -1221,6 +1926,18 @@ class JsonParser extends jni.JObject { r"()Lcom/fasterxml/jackson/core/JsonParser;", ); + static final _skipChildren = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract com.fasterxml.jackson.core.JsonParser skipChildren() /// The returned object must be released after use, by calling the [release] method. /// @@ -1240,7 +1957,9 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems JsonParser skipChildren() { - return _id_skipChildren(this, const $JsonParserType(), []); + return _skipChildren( + reference.pointer, _id_skipChildren as jni.JMethodIDPtr) + .object(const $JsonParserType()); } static final _id_finishToken = _class.instanceMethodId( @@ -1248,6 +1967,18 @@ class JsonParser extends jni.JObject { r"()V", ); + static final _finishToken = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void finishToken() /// /// Method that may be used to force full handling of the current token @@ -1264,7 +1995,8 @@ class JsonParser extends jni.JObject { /// JsonParseException for decoding problems ///@since 2.8 void finishToken() { - _id_finishToken(this, const jni.jvoidType(), []); + _finishToken(reference.pointer, _id_finishToken as jni.JMethodIDPtr) + .check(); } static final _id_currentToken = _class.instanceMethodId( @@ -1272,6 +2004,18 @@ class JsonParser extends jni.JObject { r"()Lcom/fasterxml/jackson/core/JsonToken;", ); + static final _currentToken = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public com.fasterxml.jackson.core.JsonToken currentToken() /// The returned object must be released after use, by calling the [release] method. /// @@ -1285,7 +2029,9 @@ class JsonParser extends jni.JObject { /// if the current token has been explicitly cleared. ///@since 2.8 jsontoken_.JsonToken currentToken() { - return _id_currentToken(this, const jsontoken_.$JsonTokenType(), []); + return _currentToken( + reference.pointer, _id_currentToken as jni.JMethodIDPtr) + .object(const jsontoken_.$JsonTokenType()); } static final _id_currentTokenId = _class.instanceMethodId( @@ -1293,6 +2039,18 @@ class JsonParser extends jni.JObject { r"()I", ); + static final _currentTokenId = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public int currentTokenId() /// /// Method similar to \#getCurrentToken() but that returns an @@ -1305,7 +2063,9 @@ class JsonParser extends jni.JObject { ///@since 2.8 ///@return {@code int} matching one of constants from JsonTokenId. int currentTokenId() { - return _id_currentTokenId(this, const jni.jintType(), []); + return _currentTokenId( + reference.pointer, _id_currentTokenId as jni.JMethodIDPtr) + .integer; } static final _id_getCurrentToken = _class.instanceMethodId( @@ -1313,6 +2073,18 @@ class JsonParser extends jni.JObject { r"()Lcom/fasterxml/jackson/core/JsonToken;", ); + static final _getCurrentToken = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract com.fasterxml.jackson.core.JsonToken getCurrentToken() /// The returned object must be released after use, by calling the [release] method. /// @@ -1321,7 +2093,9 @@ class JsonParser extends jni.JObject { ///@return Type of the token this parser currently points to, /// if any: null before any tokens have been read, and jsontoken_.JsonToken getCurrentToken() { - return _id_getCurrentToken(this, const jsontoken_.$JsonTokenType(), []); + return _getCurrentToken( + reference.pointer, _id_getCurrentToken as jni.JMethodIDPtr) + .object(const jsontoken_.$JsonTokenType()); } static final _id_getCurrentTokenId = _class.instanceMethodId( @@ -1329,13 +2103,27 @@ class JsonParser extends jni.JObject { r"()I", ); + static final _getCurrentTokenId = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract int getCurrentTokenId() /// /// Deprecated alias for \#currentTokenId(). ///@return {@code int} matching one of constants from JsonTokenId. ///@deprecated Since 2.12 use \#currentTokenId instead int getCurrentTokenId() { - return _id_getCurrentTokenId(this, const jni.jintType(), []); + return _getCurrentTokenId( + reference.pointer, _id_getCurrentTokenId as jni.JMethodIDPtr) + .integer; } static final _id_hasCurrentToken = _class.instanceMethodId( @@ -1343,6 +2131,18 @@ class JsonParser extends jni.JObject { r"()Z", ); + static final _hasCurrentToken = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract boolean hasCurrentToken() /// /// Method for checking whether parser currently points to @@ -1354,7 +2154,9 @@ class JsonParser extends jni.JObject { /// and returned null from \#nextToken, or the token /// has been consumed) bool hasCurrentToken() { - return _id_hasCurrentToken(this, const jni.jbooleanType(), []); + return _hasCurrentToken( + reference.pointer, _id_hasCurrentToken as jni.JMethodIDPtr) + .boolean; } static final _id_hasTokenId = _class.instanceMethodId( @@ -1362,6 +2164,14 @@ class JsonParser extends jni.JObject { r"(I)Z", ); + static final _hasTokenId = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: public abstract boolean hasTokenId(int id) /// /// Method that is functionally equivalent to: @@ -1379,7 +2189,9 @@ class JsonParser extends jni.JObject { bool hasTokenId( int id, ) { - return _id_hasTokenId(this, const jni.jbooleanType(), [jni.JValueInt(id)]); + return _hasTokenId( + reference.pointer, _id_hasTokenId as jni.JMethodIDPtr, id) + .boolean; } static final _id_hasToken = _class.instanceMethodId( @@ -1387,6 +2199,17 @@ class JsonParser extends jni.JObject { r"(Lcom/fasterxml/jackson/core/JsonToken;)Z", ); + static final _hasToken = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public abstract boolean hasToken(com.fasterxml.jackson.core.JsonToken t) /// /// Method that is functionally equivalent to: @@ -1404,7 +2227,9 @@ class JsonParser extends jni.JObject { bool hasToken( jsontoken_.JsonToken t, ) { - return _id_hasToken(this, const jni.jbooleanType(), [t.reference.pointer]); + return _hasToken(reference.pointer, _id_hasToken as jni.JMethodIDPtr, + t.reference.pointer) + .boolean; } static final _id_isExpectedStartArrayToken = _class.instanceMethodId( @@ -1412,6 +2237,18 @@ class JsonParser extends jni.JObject { r"()Z", ); + static final _isExpectedStartArrayToken = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public boolean isExpectedStartArrayToken() /// /// Specialized accessor that can be used to verify that the current @@ -1431,7 +2268,9 @@ class JsonParser extends jni.JObject { /// start-array marker (such JsonToken\#START_ARRAY); /// {@code false} if not bool isExpectedStartArrayToken() { - return _id_isExpectedStartArrayToken(this, const jni.jbooleanType(), []); + return _isExpectedStartArrayToken(reference.pointer, + _id_isExpectedStartArrayToken as jni.JMethodIDPtr) + .boolean; } static final _id_isExpectedStartObjectToken = _class.instanceMethodId( @@ -1439,6 +2278,18 @@ class JsonParser extends jni.JObject { r"()Z", ); + static final _isExpectedStartObjectToken = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public boolean isExpectedStartObjectToken() /// /// Similar to \#isExpectedStartArrayToken(), but checks whether stream @@ -1448,7 +2299,9 @@ class JsonParser extends jni.JObject { /// {@code false} if not ///@since 2.5 bool isExpectedStartObjectToken() { - return _id_isExpectedStartObjectToken(this, const jni.jbooleanType(), []); + return _isExpectedStartObjectToken(reference.pointer, + _id_isExpectedStartObjectToken as jni.JMethodIDPtr) + .boolean; } static final _id_isExpectedNumberIntToken = _class.instanceMethodId( @@ -1456,6 +2309,18 @@ class JsonParser extends jni.JObject { r"()Z", ); + static final _isExpectedNumberIntToken = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public boolean isExpectedNumberIntToken() /// /// Similar to \#isExpectedStartArrayToken(), but checks whether stream @@ -1468,7 +2333,9 @@ class JsonParser extends jni.JObject { /// {@code false} if not ///@since 2.12 bool isExpectedNumberIntToken() { - return _id_isExpectedNumberIntToken(this, const jni.jbooleanType(), []); + return _isExpectedNumberIntToken( + reference.pointer, _id_isExpectedNumberIntToken as jni.JMethodIDPtr) + .boolean; } static final _id_isNaN = _class.instanceMethodId( @@ -1476,6 +2343,18 @@ class JsonParser extends jni.JObject { r"()Z", ); + static final _isNaN = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public boolean isNaN() /// /// Access for checking whether current token is a numeric value token, but @@ -1491,7 +2370,7 @@ class JsonParser extends jni.JObject { /// JsonParseException for decoding problems ///@since 2.9 bool isNaN() { - return _id_isNaN(this, const jni.jbooleanType(), []); + return _isNaN(reference.pointer, _id_isNaN as jni.JMethodIDPtr).boolean; } static final _id_clearCurrentToken = _class.instanceMethodId( @@ -1499,6 +2378,18 @@ class JsonParser extends jni.JObject { r"()V", ); + static final _clearCurrentToken = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract void clearCurrentToken() /// /// Method called to "consume" the current token by effectively @@ -1512,7 +2403,9 @@ class JsonParser extends jni.JObject { /// it has to be able to consume last token used for binding (so that /// it will not be used again). void clearCurrentToken() { - _id_clearCurrentToken(this, const jni.jvoidType(), []); + _clearCurrentToken( + reference.pointer, _id_clearCurrentToken as jni.JMethodIDPtr) + .check(); } static final _id_getLastClearedToken = _class.instanceMethodId( @@ -1520,6 +2413,18 @@ class JsonParser extends jni.JObject { r"()Lcom/fasterxml/jackson/core/JsonToken;", ); + static final _getLastClearedToken = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract com.fasterxml.jackson.core.JsonToken getLastClearedToken() /// The returned object must be released after use, by calling the [release] method. /// @@ -1530,7 +2435,9 @@ class JsonParser extends jni.JObject { /// or if parser has been closed. ///@return Last cleared token, if any; {@code null} otherwise jsontoken_.JsonToken getLastClearedToken() { - return _id_getLastClearedToken(this, const jsontoken_.$JsonTokenType(), []); + return _getLastClearedToken( + reference.pointer, _id_getLastClearedToken as jni.JMethodIDPtr) + .object(const jsontoken_.$JsonTokenType()); } static final _id_overrideCurrentName = _class.instanceMethodId( @@ -1538,6 +2445,17 @@ class JsonParser extends jni.JObject { r"(Ljava/lang/String;)V", ); + static final _overrideCurrentName = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public abstract void overrideCurrentName(java.lang.String name) /// /// Method that can be used to change what is considered to be @@ -1551,8 +2469,9 @@ class JsonParser extends jni.JObject { void overrideCurrentName( jni.JString name, ) { - _id_overrideCurrentName( - this, const jni.jvoidType(), [name.reference.pointer]); + _overrideCurrentName(reference.pointer, + _id_overrideCurrentName as jni.JMethodIDPtr, name.reference.pointer) + .check(); } static final _id_getCurrentName = _class.instanceMethodId( @@ -1560,6 +2479,18 @@ class JsonParser extends jni.JObject { r"()Ljava/lang/String;", ); + static final _getCurrentName = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract java.lang.String getCurrentName() /// The returned object must be released after use, by calling the [release] method. /// @@ -1568,7 +2499,9 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems jni.JString getCurrentName() { - return _id_getCurrentName(this, const jni.JStringType(), []); + return _getCurrentName( + reference.pointer, _id_getCurrentName as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_currentName = _class.instanceMethodId( @@ -1576,6 +2509,18 @@ class JsonParser extends jni.JObject { r"()Ljava/lang/String;", ); + static final _currentName = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.String currentName() /// The returned object must be released after use, by calling the [release] method. /// @@ -1589,7 +2534,8 @@ class JsonParser extends jni.JObject { /// JsonParseException for decoding problems ///@since 2.10 jni.JString currentName() { - return _id_currentName(this, const jni.JStringType(), []); + return _currentName(reference.pointer, _id_currentName as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_getText = _class.instanceMethodId( @@ -1597,6 +2543,18 @@ class JsonParser extends jni.JObject { r"()Ljava/lang/String;", ); + static final _getText = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract java.lang.String getText() /// The returned object must be released after use, by calling the [release] method. /// @@ -1609,7 +2567,8 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems jni.JString getText() { - return _id_getText(this, const jni.JStringType(), []); + return _getText(reference.pointer, _id_getText as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_getText1 = _class.instanceMethodId( @@ -1617,6 +2576,17 @@ class JsonParser extends jni.JObject { r"(Ljava/io/Writer;)I", ); + static final _getText1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public int getText(java.io.Writer writer) /// /// Method to read the textual representation of the current token in chunks and @@ -1637,7 +2607,9 @@ class JsonParser extends jni.JObject { int getText1( jni.JObject writer, ) { - return _id_getText1(this, const jni.jintType(), [writer.reference.pointer]); + return _getText1(reference.pointer, _id_getText1 as jni.JMethodIDPtr, + writer.reference.pointer) + .integer; } static final _id_getTextCharacters = _class.instanceMethodId( @@ -1645,6 +2617,18 @@ class JsonParser extends jni.JObject { r"()[C", ); + static final _getTextCharacters = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract char[] getTextCharacters() /// The returned object must be released after use, by calling the [release] method. /// @@ -1676,8 +2660,9 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems jni.JArray getTextCharacters() { - return _id_getTextCharacters( - this, const jni.JArrayType(jni.jcharType()), []); + return _getTextCharacters( + reference.pointer, _id_getTextCharacters as jni.JMethodIDPtr) + .object(const jni.JArrayType(jni.jcharType())); } static final _id_getTextLength = _class.instanceMethodId( @@ -1685,6 +2670,18 @@ class JsonParser extends jni.JObject { r"()I", ); + static final _getTextLength = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract int getTextLength() /// /// Accessor used with \#getTextCharacters, to know length @@ -1695,7 +2692,9 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems int getTextLength() { - return _id_getTextLength(this, const jni.jintType(), []); + return _getTextLength( + reference.pointer, _id_getTextLength as jni.JMethodIDPtr) + .integer; } static final _id_getTextOffset = _class.instanceMethodId( @@ -1703,6 +2702,18 @@ class JsonParser extends jni.JObject { r"()I", ); + static final _getTextOffset = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract int getTextOffset() /// /// Accessor used with \#getTextCharacters, to know offset @@ -1713,7 +2724,9 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems int getTextOffset() { - return _id_getTextOffset(this, const jni.jintType(), []); + return _getTextOffset( + reference.pointer, _id_getTextOffset as jni.JMethodIDPtr) + .integer; } static final _id_hasTextCharacters = _class.instanceMethodId( @@ -1721,6 +2734,18 @@ class JsonParser extends jni.JObject { r"()Z", ); + static final _hasTextCharacters = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract boolean hasTextCharacters() /// /// Method that can be used to determine whether calling of @@ -1738,7 +2763,9 @@ class JsonParser extends jni.JObject { /// be efficiently returned via \#getTextCharacters; false /// means that it may or may not exist bool hasTextCharacters() { - return _id_hasTextCharacters(this, const jni.jbooleanType(), []); + return _hasTextCharacters( + reference.pointer, _id_hasTextCharacters as jni.JMethodIDPtr) + .boolean; } static final _id_getNumberValue = _class.instanceMethodId( @@ -1746,6 +2773,18 @@ class JsonParser extends jni.JObject { r"()Ljava/lang/Number;", ); + static final _getNumberValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract java.lang.Number getNumberValue() /// The returned object must be released after use, by calling the [release] method. /// @@ -1760,7 +2799,9 @@ class JsonParser extends jni.JObject { /// (invalid format for numbers); plain IOException if underlying /// content read fails (possible if values are extracted lazily) jni.JNumber getNumberValue() { - return _id_getNumberValue(this, const jni.JNumberType(), []); + return _getNumberValue( + reference.pointer, _id_getNumberValue as jni.JMethodIDPtr) + .object(const jni.JNumberType()); } static final _id_getNumberValueExact = _class.instanceMethodId( @@ -1768,6 +2809,18 @@ class JsonParser extends jni.JObject { r"()Ljava/lang/Number;", ); + static final _getNumberValueExact = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.Number getNumberValueExact() /// The returned object must be released after use, by calling the [release] method. /// @@ -1786,7 +2839,9 @@ class JsonParser extends jni.JObject { /// content read fails (possible if values are extracted lazily) ///@since 2.12 jni.JNumber getNumberValueExact() { - return _id_getNumberValueExact(this, const jni.JNumberType(), []); + return _getNumberValueExact( + reference.pointer, _id_getNumberValueExact as jni.JMethodIDPtr) + .object(const jni.JNumberType()); } static final _id_getNumberType = _class.instanceMethodId( @@ -1794,6 +2849,18 @@ class JsonParser extends jni.JObject { r"()Lcom/fasterxml/jackson/core/JsonParser$NumberType;", ); + static final _getNumberType = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract com.fasterxml.jackson.core.JsonParser.NumberType getNumberType() /// The returned object must be released after use, by calling the [release] method. /// @@ -1805,7 +2872,9 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems JsonParser_NumberType getNumberType() { - return _id_getNumberType(this, const $JsonParser_NumberTypeType(), []); + return _getNumberType( + reference.pointer, _id_getNumberType as jni.JMethodIDPtr) + .object(const $JsonParser_NumberTypeType()); } static final _id_getByteValue = _class.instanceMethodId( @@ -1813,6 +2882,18 @@ class JsonParser extends jni.JObject { r"()B", ); + static final _getByteValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallByteMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public byte getByteValue() /// /// Numeric accessor that can be called when the current @@ -1837,7 +2918,9 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems int getByteValue() { - return _id_getByteValue(this, const jni.jbyteType(), []); + return _getByteValue( + reference.pointer, _id_getByteValue as jni.JMethodIDPtr) + .byte; } static final _id_getShortValue = _class.instanceMethodId( @@ -1845,6 +2928,18 @@ class JsonParser extends jni.JObject { r"()S", ); + static final _getShortValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallShortMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public short getShortValue() /// /// Numeric accessor that can be called when the current @@ -1863,7 +2958,9 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems int getShortValue() { - return _id_getShortValue(this, const jni.jshortType(), []); + return _getShortValue( + reference.pointer, _id_getShortValue as jni.JMethodIDPtr) + .short; } static final _id_getIntValue = _class.instanceMethodId( @@ -1871,6 +2968,18 @@ class JsonParser extends jni.JObject { r"()I", ); + static final _getIntValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract int getIntValue() /// /// Numeric accessor that can be called when the current @@ -1889,7 +2998,8 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems int getIntValue() { - return _id_getIntValue(this, const jni.jintType(), []); + return _getIntValue(reference.pointer, _id_getIntValue as jni.JMethodIDPtr) + .integer; } static final _id_getLongValue = _class.instanceMethodId( @@ -1897,6 +3007,18 @@ class JsonParser extends jni.JObject { r"()J", ); + static final _getLongValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract long getLongValue() /// /// Numeric accessor that can be called when the current @@ -1915,7 +3037,9 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems int getLongValue() { - return _id_getLongValue(this, const jni.jlongType(), []); + return _getLongValue( + reference.pointer, _id_getLongValue as jni.JMethodIDPtr) + .long; } static final _id_getBigIntegerValue = _class.instanceMethodId( @@ -1923,6 +3047,18 @@ class JsonParser extends jni.JObject { r"()Ljava/math/BigInteger;", ); + static final _getBigIntegerValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract java.math.BigInteger getBigIntegerValue() /// The returned object must be released after use, by calling the [release] method. /// @@ -1938,7 +3074,9 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems jni.JObject getBigIntegerValue() { - return _id_getBigIntegerValue(this, const jni.JObjectType(), []); + return _getBigIntegerValue( + reference.pointer, _id_getBigIntegerValue as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_getFloatValue = _class.instanceMethodId( @@ -1946,6 +3084,18 @@ class JsonParser extends jni.JObject { r"()F", ); + static final _getFloatValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallFloatMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract float getFloatValue() /// /// Numeric accessor that can be called when the current @@ -1964,7 +3114,9 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems double getFloatValue() { - return _id_getFloatValue(this, const jni.jfloatType(), []); + return _getFloatValue( + reference.pointer, _id_getFloatValue as jni.JMethodIDPtr) + .float; } static final _id_getDoubleValue = _class.instanceMethodId( @@ -1972,6 +3124,18 @@ class JsonParser extends jni.JObject { r"()D", ); + static final _getDoubleValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallDoubleMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract double getDoubleValue() /// /// Numeric accessor that can be called when the current @@ -1990,7 +3154,9 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems double getDoubleValue() { - return _id_getDoubleValue(this, const jni.jdoubleType(), []); + return _getDoubleValue( + reference.pointer, _id_getDoubleValue as jni.JMethodIDPtr) + .doubleFloat; } static final _id_getDecimalValue = _class.instanceMethodId( @@ -1998,6 +3164,18 @@ class JsonParser extends jni.JObject { r"()Ljava/math/BigDecimal;", ); + static final _getDecimalValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract java.math.BigDecimal getDecimalValue() /// The returned object must be released after use, by calling the [release] method. /// @@ -2010,7 +3188,9 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems jni.JObject getDecimalValue() { - return _id_getDecimalValue(this, const jni.JObjectType(), []); + return _getDecimalValue( + reference.pointer, _id_getDecimalValue as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_getBooleanValue = _class.instanceMethodId( @@ -2018,6 +3198,18 @@ class JsonParser extends jni.JObject { r"()Z", ); + static final _getBooleanValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public boolean getBooleanValue() /// /// Convenience accessor that can be called when the current @@ -2032,7 +3224,9 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems bool getBooleanValue() { - return _id_getBooleanValue(this, const jni.jbooleanType(), []); + return _getBooleanValue( + reference.pointer, _id_getBooleanValue as jni.JMethodIDPtr) + .boolean; } static final _id_getEmbeddedObject = _class.instanceMethodId( @@ -2040,6 +3234,18 @@ class JsonParser extends jni.JObject { r"()Ljava/lang/Object;", ); + static final _getEmbeddedObject = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.Object getEmbeddedObject() /// The returned object must be released after use, by calling the [release] method. /// @@ -2058,7 +3264,9 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems jni.JObject getEmbeddedObject() { - return _id_getEmbeddedObject(this, const jni.JObjectType(), []); + return _getEmbeddedObject( + reference.pointer, _id_getEmbeddedObject as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_getBinaryValue = _class.instanceMethodId( @@ -2066,6 +3274,17 @@ class JsonParser extends jni.JObject { r"(Lcom/fasterxml/jackson/core/Base64Variant;)[B", ); + static final _getBinaryValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public abstract byte[] getBinaryValue(com.fasterxml.jackson.core.Base64Variant bv) /// The returned object must be released after use, by calling the [release] method. /// @@ -2092,8 +3311,9 @@ class JsonParser extends jni.JObject { jni.JArray getBinaryValue( jni.JObject bv, ) { - return _id_getBinaryValue( - this, const jni.JArrayType(jni.jbyteType()), [bv.reference.pointer]); + return _getBinaryValue(reference.pointer, + _id_getBinaryValue as jni.JMethodIDPtr, bv.reference.pointer) + .object(const jni.JArrayType(jni.jbyteType())); } static final _id_getBinaryValue1 = _class.instanceMethodId( @@ -2101,6 +3321,18 @@ class JsonParser extends jni.JObject { r"()[B", ); + static final _getBinaryValue1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public byte[] getBinaryValue() /// The returned object must be released after use, by calling the [release] method. /// @@ -2111,7 +3343,9 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems jni.JArray getBinaryValue1() { - return _id_getBinaryValue1(this, const jni.JArrayType(jni.jbyteType()), []); + return _getBinaryValue1( + reference.pointer, _id_getBinaryValue1 as jni.JMethodIDPtr) + .object(const jni.JArrayType(jni.jbyteType())); } static final _id_readBinaryValue = _class.instanceMethodId( @@ -2119,6 +3353,17 @@ class JsonParser extends jni.JObject { r"(Ljava/io/OutputStream;)I", ); + static final _readBinaryValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public int readBinaryValue(java.io.OutputStream out) /// /// Method that can be used as an alternative to \#getBigIntegerValue(), @@ -2135,8 +3380,9 @@ class JsonParser extends jni.JObject { int readBinaryValue( jni.JObject out, ) { - return _id_readBinaryValue( - this, const jni.jintType(), [out.reference.pointer]); + return _readBinaryValue(reference.pointer, + _id_readBinaryValue as jni.JMethodIDPtr, out.reference.pointer) + .integer; } static final _id_readBinaryValue1 = _class.instanceMethodId( @@ -2144,6 +3390,20 @@ class JsonParser extends jni.JObject { r"(Lcom/fasterxml/jackson/core/Base64Variant;Ljava/io/OutputStream;)I", ); + static final _readBinaryValue1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: public int readBinaryValue(com.fasterxml.jackson.core.Base64Variant bv, java.io.OutputStream out) /// /// Similar to \#readBinaryValue(OutputStream) but allows explicitly @@ -2158,8 +3418,12 @@ class JsonParser extends jni.JObject { jni.JObject bv, jni.JObject out, ) { - return _id_readBinaryValue1(this, const jni.jintType(), - [bv.reference.pointer, out.reference.pointer]); + return _readBinaryValue1( + reference.pointer, + _id_readBinaryValue1 as jni.JMethodIDPtr, + bv.reference.pointer, + out.reference.pointer) + .integer; } static final _id_getValueAsInt = _class.instanceMethodId( @@ -2167,6 +3431,18 @@ class JsonParser extends jni.JObject { r"()I", ); + static final _getValueAsInt = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public int getValueAsInt() /// /// Method that will try to convert value of current token to a @@ -2183,7 +3459,9 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems int getValueAsInt() { - return _id_getValueAsInt(this, const jni.jintType(), []); + return _getValueAsInt( + reference.pointer, _id_getValueAsInt as jni.JMethodIDPtr) + .integer; } static final _id_getValueAsInt1 = _class.instanceMethodId( @@ -2191,6 +3469,14 @@ class JsonParser extends jni.JObject { r"(I)I", ); + static final _getValueAsInt1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: public int getValueAsInt(int def) /// /// Method that will try to convert value of current token to a @@ -2209,7 +3495,9 @@ class JsonParser extends jni.JObject { int getValueAsInt1( int def, ) { - return _id_getValueAsInt1(this, const jni.jintType(), [jni.JValueInt(def)]); + return _getValueAsInt1( + reference.pointer, _id_getValueAsInt1 as jni.JMethodIDPtr, def) + .integer; } static final _id_getValueAsLong = _class.instanceMethodId( @@ -2217,6 +3505,18 @@ class JsonParser extends jni.JObject { r"()J", ); + static final _getValueAsLong = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public long getValueAsLong() /// /// Method that will try to convert value of current token to a @@ -2233,7 +3533,9 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems int getValueAsLong() { - return _id_getValueAsLong(this, const jni.jlongType(), []); + return _getValueAsLong( + reference.pointer, _id_getValueAsLong as jni.JMethodIDPtr) + .long; } static final _id_getValueAsLong1 = _class.instanceMethodId( @@ -2241,6 +3543,14 @@ class JsonParser extends jni.JObject { r"(J)J", ); + static final _getValueAsLong1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: public long getValueAsLong(long def) /// /// Method that will try to convert value of current token to a @@ -2259,7 +3569,9 @@ class JsonParser extends jni.JObject { int getValueAsLong1( int def, ) { - return _id_getValueAsLong1(this, const jni.jlongType(), [def]); + return _getValueAsLong1( + reference.pointer, _id_getValueAsLong1 as jni.JMethodIDPtr, def) + .long; } static final _id_getValueAsDouble = _class.instanceMethodId( @@ -2267,6 +3579,18 @@ class JsonParser extends jni.JObject { r"()D", ); + static final _getValueAsDouble = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallDoubleMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public double getValueAsDouble() /// /// Method that will try to convert value of current token to a Java @@ -2283,7 +3607,9 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems double getValueAsDouble() { - return _id_getValueAsDouble(this, const jni.jdoubleType(), []); + return _getValueAsDouble( + reference.pointer, _id_getValueAsDouble as jni.JMethodIDPtr) + .doubleFloat; } static final _id_getValueAsDouble1 = _class.instanceMethodId( @@ -2291,6 +3617,14 @@ class JsonParser extends jni.JObject { r"(D)D", ); + static final _getValueAsDouble1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Double,)>)>>("globalEnv_CallDoubleMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, double)>(); + /// from: public double getValueAsDouble(double def) /// /// Method that will try to convert value of current token to a @@ -2309,7 +3643,9 @@ class JsonParser extends jni.JObject { double getValueAsDouble1( double def, ) { - return _id_getValueAsDouble1(this, const jni.jdoubleType(), [def]); + return _getValueAsDouble1( + reference.pointer, _id_getValueAsDouble1 as jni.JMethodIDPtr, def) + .doubleFloat; } static final _id_getValueAsBoolean = _class.instanceMethodId( @@ -2317,6 +3653,18 @@ class JsonParser extends jni.JObject { r"()Z", ); + static final _getValueAsBoolean = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public boolean getValueAsBoolean() /// /// Method that will try to convert value of current token to a @@ -2333,7 +3681,9 @@ class JsonParser extends jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems bool getValueAsBoolean() { - return _id_getValueAsBoolean(this, const jni.jbooleanType(), []); + return _getValueAsBoolean( + reference.pointer, _id_getValueAsBoolean as jni.JMethodIDPtr) + .boolean; } static final _id_getValueAsBoolean1 = _class.instanceMethodId( @@ -2341,6 +3691,14 @@ class JsonParser extends jni.JObject { r"(Z)Z", ); + static final _getValueAsBoolean1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: public boolean getValueAsBoolean(boolean def) /// /// Method that will try to convert value of current token to a @@ -2359,8 +3717,9 @@ class JsonParser extends jni.JObject { bool getValueAsBoolean1( bool def, ) { - return _id_getValueAsBoolean1( - this, const jni.jbooleanType(), [def ? 1 : 0]); + return _getValueAsBoolean1(reference.pointer, + _id_getValueAsBoolean1 as jni.JMethodIDPtr, def ? 1 : 0) + .boolean; } static final _id_getValueAsString = _class.instanceMethodId( @@ -2368,6 +3727,18 @@ class JsonParser extends jni.JObject { r"()Ljava/lang/String;", ); + static final _getValueAsString = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.String getValueAsString() /// The returned object must be released after use, by calling the [release] method. /// @@ -2383,7 +3754,9 @@ class JsonParser extends jni.JObject { /// JsonParseException for decoding problems ///@since 2.1 jni.JString getValueAsString() { - return _id_getValueAsString(this, const jni.JStringType(), []); + return _getValueAsString( + reference.pointer, _id_getValueAsString as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_getValueAsString1 = _class.instanceMethodId( @@ -2391,6 +3764,17 @@ class JsonParser extends jni.JObject { r"(Ljava/lang/String;)Ljava/lang/String;", ); + static final _getValueAsString1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public abstract java.lang.String getValueAsString(java.lang.String def) /// The returned object must be released after use, by calling the [release] method. /// @@ -2409,8 +3793,9 @@ class JsonParser extends jni.JObject { jni.JString getValueAsString1( jni.JString def, ) { - return _id_getValueAsString1( - this, const jni.JStringType(), [def.reference.pointer]); + return _getValueAsString1(reference.pointer, + _id_getValueAsString1 as jni.JMethodIDPtr, def.reference.pointer) + .object(const jni.JStringType()); } static final _id_canReadObjectId = _class.instanceMethodId( @@ -2418,6 +3803,18 @@ class JsonParser extends jni.JObject { r"()Z", ); + static final _canReadObjectId = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public boolean canReadObjectId() /// /// Introspection method that may be called to see if the underlying @@ -2432,7 +3829,9 @@ class JsonParser extends jni.JObject { /// {@code false} if not ///@since 2.3 bool canReadObjectId() { - return _id_canReadObjectId(this, const jni.jbooleanType(), []); + return _canReadObjectId( + reference.pointer, _id_canReadObjectId as jni.JMethodIDPtr) + .boolean; } static final _id_canReadTypeId = _class.instanceMethodId( @@ -2440,6 +3839,18 @@ class JsonParser extends jni.JObject { r"()Z", ); + static final _canReadTypeId = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public boolean canReadTypeId() /// /// Introspection method that may be called to see if the underlying @@ -2454,7 +3865,9 @@ class JsonParser extends jni.JObject { /// {@code false} if not ///@since 2.3 bool canReadTypeId() { - return _id_canReadTypeId(this, const jni.jbooleanType(), []); + return _canReadTypeId( + reference.pointer, _id_canReadTypeId as jni.JMethodIDPtr) + .boolean; } static final _id_getObjectId = _class.instanceMethodId( @@ -2462,6 +3875,18 @@ class JsonParser extends jni.JObject { r"()Ljava/lang/Object;", ); + static final _getObjectId = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.Object getObjectId() /// The returned object must be released after use, by calling the [release] method. /// @@ -2479,7 +3904,8 @@ class JsonParser extends jni.JObject { /// JsonParseException for decoding problems ///@since 2.3 jni.JObject getObjectId() { - return _id_getObjectId(this, const jni.JObjectType(), []); + return _getObjectId(reference.pointer, _id_getObjectId as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_getTypeId = _class.instanceMethodId( @@ -2487,6 +3913,18 @@ class JsonParser extends jni.JObject { r"()Ljava/lang/Object;", ); + static final _getTypeId = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.Object getTypeId() /// The returned object must be released after use, by calling the [release] method. /// @@ -2504,7 +3942,8 @@ class JsonParser extends jni.JObject { /// JsonParseException for decoding problems ///@since 2.3 jni.JObject getTypeId() { - return _id_getTypeId(this, const jni.JObjectType(), []); + return _getTypeId(reference.pointer, _id_getTypeId as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_readValueAs = _class.instanceMethodId( @@ -2512,6 +3951,17 @@ class JsonParser extends jni.JObject { r"(Ljava/lang/Class;)Ljava/lang/Object;", ); + static final _readValueAs = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public T readValueAs(java.lang.Class valueType) /// The returned object must be released after use, by calling the [release] method. /// @@ -2544,7 +3994,9 @@ class JsonParser extends jni.JObject { jni.JObject valueType, { required jni.JObjType<$T> T, }) { - return _id_readValueAs(this, T, [valueType.reference.pointer]); + return _readValueAs(reference.pointer, _id_readValueAs as jni.JMethodIDPtr, + valueType.reference.pointer) + .object(T); } static final _id_readValueAs1 = _class.instanceMethodId( @@ -2552,6 +4004,17 @@ class JsonParser extends jni.JObject { r"(Lcom/fasterxml/jackson/core/type/TypeReference;)Ljava/lang/Object;", ); + static final _readValueAs1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public T readValueAs(com.fasterxml.jackson.core.type.TypeReference valueTypeRef) /// The returned object must be released after use, by calling the [release] method. /// @@ -2581,7 +4044,11 @@ class JsonParser extends jni.JObject { jni.JObject valueTypeRef, { required jni.JObjType<$T> T, }) { - return _id_readValueAs1(this, T, [valueTypeRef.reference.pointer]); + return _readValueAs1( + reference.pointer, + _id_readValueAs1 as jni.JMethodIDPtr, + valueTypeRef.reference.pointer) + .object(T); } static final _id_readValuesAs = _class.instanceMethodId( @@ -2589,6 +4056,17 @@ class JsonParser extends jni.JObject { r"(Ljava/lang/Class;)Ljava/util/Iterator;", ); + static final _readValuesAs = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public java.util.Iterator readValuesAs(java.lang.Class valueType) /// The returned object must be released after use, by calling the [release] method. /// @@ -2604,8 +4082,9 @@ class JsonParser extends jni.JObject { jni.JObject valueType, { required jni.JObjType<$T> T, }) { - return _id_readValuesAs( - this, jni.JIteratorType(T), [valueType.reference.pointer]); + return _readValuesAs(reference.pointer, + _id_readValuesAs as jni.JMethodIDPtr, valueType.reference.pointer) + .object(jni.JIteratorType(T)); } static final _id_readValuesAs1 = _class.instanceMethodId( @@ -2613,6 +4092,17 @@ class JsonParser extends jni.JObject { r"(Lcom/fasterxml/jackson/core/type/TypeReference;)Ljava/util/Iterator;", ); + static final _readValuesAs1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public java.util.Iterator readValuesAs(com.fasterxml.jackson.core.type.TypeReference valueTypeRef) /// The returned object must be released after use, by calling the [release] method. /// @@ -2628,8 +4118,11 @@ class JsonParser extends jni.JObject { jni.JObject valueTypeRef, { required jni.JObjType<$T> T, }) { - return _id_readValuesAs1( - this, jni.JIteratorType(T), [valueTypeRef.reference.pointer]); + return _readValuesAs1( + reference.pointer, + _id_readValuesAs1 as jni.JMethodIDPtr, + valueTypeRef.reference.pointer) + .object(jni.JIteratorType(T)); } static final _id_readValueAsTree = _class.instanceMethodId( @@ -2637,6 +4130,18 @@ class JsonParser extends jni.JObject { r"()Lcom/fasterxml/jackson/core/TreeNode;", ); + static final _readValueAsTree = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public T readValueAsTree() /// The returned object must be released after use, by calling the [release] method. /// @@ -2652,7 +4157,9 @@ class JsonParser extends jni.JObject { $T readValueAsTree<$T extends jni.JObject>({ required jni.JObjType<$T> T, }) { - return _id_readValueAsTree(this, T, []); + return _readValueAsTree( + reference.pointer, _id_readValueAsTree as jni.JMethodIDPtr) + .object(T); } } diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/dart_only/dart_bindings/com/fasterxml/jackson/core/JsonToken.dart b/pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/JsonToken.dart similarity index 54% rename from pkgs/jnigen/test/jackson_core_test/third_party/dart_only/dart_bindings/com/fasterxml/jackson/core/JsonToken.dart rename to pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/JsonToken.dart index ff492c26a0..67d194cbde 100644 --- a/pkgs/jnigen/test/jackson_core_test/third_party/dart_only/dart_bindings/com/fasterxml/jackson/core/JsonToken.dart +++ b/pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/JsonToken.dart @@ -62,10 +62,23 @@ class JsonToken extends jni.JObject { r"()[Lcom/fasterxml/jackson/core/JsonToken;", ); + static final _values = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public com.fasterxml.jackson.core.JsonToken[] values() /// The returned object must be released after use, by calling the [release] method. static jni.JArray values() { - return _id_values(_class, const jni.JArrayType($JsonTokenType()), []); + return _values(_class.reference.pointer, _id_values as jni.JMethodIDPtr) + .object(const jni.JArrayType($JsonTokenType())); } static final _id_valueOf = _class.staticMethodId( @@ -73,13 +86,25 @@ class JsonToken extends jni.JObject { r"(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonToken;", ); + static final _valueOf = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public com.fasterxml.jackson.core.JsonToken valueOf(java.lang.String name) /// The returned object must be released after use, by calling the [release] method. static JsonToken valueOf( jni.JString name, ) { - return _id_valueOf( - _class, const $JsonTokenType(), [name.reference.pointer]); + return _valueOf(_class.reference.pointer, _id_valueOf as jni.JMethodIDPtr, + name.reference.pointer) + .object(const $JsonTokenType()); } static final _id_id = _class.instanceMethodId( @@ -87,9 +112,21 @@ class JsonToken extends jni.JObject { r"()I", ); + static final _id = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public final int id() int id() { - return _id_id(this, const jni.jintType(), []); + return _id(reference.pointer, _id_id as jni.JMethodIDPtr).integer; } static final _id_asString = _class.instanceMethodId( @@ -97,10 +134,23 @@ class JsonToken extends jni.JObject { r"()Ljava/lang/String;", ); + static final _asString = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public final java.lang.String asString() /// The returned object must be released after use, by calling the [release] method. jni.JString asString() { - return _id_asString(this, const jni.JStringType(), []); + return _asString(reference.pointer, _id_asString as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_asCharArray = _class.instanceMethodId( @@ -108,10 +158,23 @@ class JsonToken extends jni.JObject { r"()[C", ); + static final _asCharArray = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public final char[] asCharArray() /// The returned object must be released after use, by calling the [release] method. jni.JArray asCharArray() { - return _id_asCharArray(this, const jni.JArrayType(jni.jcharType()), []); + return _asCharArray(reference.pointer, _id_asCharArray as jni.JMethodIDPtr) + .object(const jni.JArrayType(jni.jcharType())); } static final _id_asByteArray = _class.instanceMethodId( @@ -119,10 +182,23 @@ class JsonToken extends jni.JObject { r"()[B", ); + static final _asByteArray = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public final byte[] asByteArray() /// The returned object must be released after use, by calling the [release] method. jni.JArray asByteArray() { - return _id_asByteArray(this, const jni.JArrayType(jni.jbyteType()), []); + return _asByteArray(reference.pointer, _id_asByteArray as jni.JMethodIDPtr) + .object(const jni.JArrayType(jni.jbyteType())); } static final _id_isNumeric = _class.instanceMethodId( @@ -130,12 +206,25 @@ class JsonToken extends jni.JObject { r"()Z", ); + static final _isNumeric = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public final boolean isNumeric() /// /// @return {@code True} if this token is {@code VALUE_NUMBER_INT} or {@code VALUE_NUMBER_FLOAT}, /// {@code false} otherwise bool isNumeric() { - return _id_isNumeric(this, const jni.jbooleanType(), []); + return _isNumeric(reference.pointer, _id_isNumeric as jni.JMethodIDPtr) + .boolean; } static final _id_isStructStart = _class.instanceMethodId( @@ -143,6 +232,18 @@ class JsonToken extends jni.JObject { r"()Z", ); + static final _isStructStart = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public final boolean isStructStart() /// /// Accessor that is functionally equivalent to: @@ -153,7 +254,9 @@ class JsonToken extends jni.JObject { /// {@code false} otherwise ///@since 2.3 bool isStructStart() { - return _id_isStructStart(this, const jni.jbooleanType(), []); + return _isStructStart( + reference.pointer, _id_isStructStart as jni.JMethodIDPtr) + .boolean; } static final _id_isStructEnd = _class.instanceMethodId( @@ -161,6 +264,18 @@ class JsonToken extends jni.JObject { r"()Z", ); + static final _isStructEnd = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public final boolean isStructEnd() /// /// Accessor that is functionally equivalent to: @@ -171,7 +286,8 @@ class JsonToken extends jni.JObject { /// {@code false} otherwise ///@since 2.3 bool isStructEnd() { - return _id_isStructEnd(this, const jni.jbooleanType(), []); + return _isStructEnd(reference.pointer, _id_isStructEnd as jni.JMethodIDPtr) + .boolean; } static final _id_isScalarValue = _class.instanceMethodId( @@ -179,6 +295,18 @@ class JsonToken extends jni.JObject { r"()Z", ); + static final _isScalarValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public final boolean isScalarValue() /// /// Method that can be used to check whether this token represents @@ -188,7 +316,9 @@ class JsonToken extends jni.JObject { ///@return {@code True} if this token is a scalar value token (one of /// {@code VALUE_xxx} tokens), {@code false} otherwise bool isScalarValue() { - return _id_isScalarValue(this, const jni.jbooleanType(), []); + return _isScalarValue( + reference.pointer, _id_isScalarValue as jni.JMethodIDPtr) + .boolean; } static final _id_isBoolean = _class.instanceMethodId( @@ -196,12 +326,25 @@ class JsonToken extends jni.JObject { r"()Z", ); + static final _isBoolean = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public final boolean isBoolean() /// /// @return {@code True} if this token is {@code VALUE_TRUE} or {@code VALUE_FALSE}, /// {@code false} otherwise bool isBoolean() { - return _id_isBoolean(this, const jni.jbooleanType(), []); + return _isBoolean(reference.pointer, _id_isBoolean as jni.JMethodIDPtr) + .boolean; } } diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/c_based/dart_bindings/com/fasterxml/jackson/core/_package.dart b/pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/_package.dart similarity index 100% rename from pkgs/jnigen/test/jackson_core_test/third_party/c_based/dart_bindings/com/fasterxml/jackson/core/_package.dart rename to pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/_package.dart diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/c_based/c_bindings/.clang-format b/pkgs/jnigen/test/jackson_core_test/third_party/c_based/c_bindings/.clang-format deleted file mode 100644 index a256c2f097..0000000000 --- a/pkgs/jnigen/test/jackson_core_test/third_party/c_based/c_bindings/.clang-format +++ /dev/null @@ -1,15 +0,0 @@ -# From dart SDK: https://github.com/dart-lang/sdk/blob/main/.clang-format - -# Defines the Chromium style for automatic reformatting. -# http://clang.llvm.org/docs/ClangFormatStyleOptions.html -BasedOnStyle: Chromium - -# clang-format doesn't seem to do a good job of this for longer comments. -ReflowComments: 'false' - -# We have lots of these. Though we need to put them all in curly braces, -# clang-format can't do that. -AllowShortIfStatementsOnASingleLine: 'true' - -# Put escaped newlines into the rightmost column. -AlignEscapedNewlinesLeft: false diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/c_based/c_bindings/CMakeLists.txt b/pkgs/jnigen/test/jackson_core_test/third_party/c_based/c_bindings/CMakeLists.txt deleted file mode 100644 index db216f5240..0000000000 --- a/pkgs/jnigen/test/jackson_core_test/third_party/c_based/c_bindings/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -# jni_native_build (Build with jni:setup. Do not delete this line.) - -# The Flutter tooling requires that developers have CMake 3.10 or later -# installed. You should not increase this version, as doing so will cause -# the plugin to fail to compile for some customers of the plugin. -cmake_minimum_required(VERSION 3.10) - -project(jackson_core VERSION 0.0.1 LANGUAGES C) - -add_library(jackson_core SHARED - "./jackson_core.c" -) - -set_target_properties(jackson_core PROPERTIES - OUTPUT_NAME "jackson_core" -) - -target_compile_definitions(jackson_core PUBLIC DART_SHARED_LIB) - -if(WIN32) - set_target_properties(${TARGET_NAME} PROPERTIES - LINK_FLAGS "/DELAYLOAD:jvm.dll") -endif() - -if (ANDROID) - target_link_libraries(jackson_core log) -else() - find_package(Java REQUIRED) - find_package(JNI REQUIRED) - include_directories(${JNI_INCLUDE_DIRS}) - target_link_libraries(jackson_core ${JNI_LIBRARIES}) -endif() diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/c_based/c_bindings/dartjni.h b/pkgs/jnigen/test/jackson_core_test/third_party/c_based/c_bindings/dartjni.h deleted file mode 100644 index f834d1577b..0000000000 --- a/pkgs/jnigen/test/jackson_core_test/third_party/c_based/c_bindings/dartjni.h +++ /dev/null @@ -1,383 +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. - -#pragma once - -// Note: include appropriate system jni.h as found by CMake, not third_party/jni.h. -#include -#include -#include -#include - -#if _WIN32 -#include -#else -#include -#include -#endif - -#if _WIN32 -#define FFI_PLUGIN_EXPORT __declspec(dllexport) -#else -#define FFI_PLUGIN_EXPORT -#endif - -#if defined _WIN32 -#define thread_local __declspec(thread) -#else -#define thread_local __thread -#endif - -#ifdef __ANDROID__ -#include -#endif - -#ifdef __ANDROID__ -#define __ENVP_CAST (JNIEnv**) -#else -#define __ENVP_CAST (void**) -#endif - -/// Locking functions for windows and pthread. - -#if defined _WIN32 -#include - -typedef CRITICAL_SECTION MutexLock; -typedef CONDITION_VARIABLE ConditionVariable; - -static inline void init_lock(MutexLock* lock) { - InitializeCriticalSection(lock); -} - -static inline void acquire_lock(MutexLock* lock) { - EnterCriticalSection(lock); -} - -static inline void release_lock(MutexLock* lock) { - LeaveCriticalSection(lock); -} - -static inline void destroy_lock(MutexLock* lock) { - DeleteCriticalSection(lock); -} - -static inline void init_cond(ConditionVariable* cond) { - InitializeConditionVariable(cond); -} - -static inline void signal_cond(ConditionVariable* cond) { - WakeConditionVariable(cond); -} - -static inline void wait_for(ConditionVariable* cond, MutexLock* lock) { - SleepConditionVariableCS(cond, lock, INFINITE); -} - -static inline void destroy_cond(ConditionVariable* cond) { - // Not available. -} - -static inline void free_mem(void* mem) { - CoTaskMemFree(mem); -} - -#elif defined __APPLE__ || defined __LINUX__ || defined __ANDROID__ || \ - defined __GNUC__ -#include - -typedef pthread_mutex_t MutexLock; -typedef pthread_cond_t ConditionVariable; - -static inline void init_lock(MutexLock* lock) { - pthread_mutex_init(lock, NULL); -} - -static inline void acquire_lock(MutexLock* lock) { - pthread_mutex_lock(lock); -} - -static inline void release_lock(MutexLock* lock) { - pthread_mutex_unlock(lock); -} - -static inline void destroy_lock(MutexLock* lock) { - pthread_mutex_destroy(lock); -} - -static inline void init_cond(ConditionVariable* cond) { - pthread_cond_init(cond, NULL); -} - -static inline void signal_cond(ConditionVariable* cond) { - pthread_cond_signal(cond); -} - -static inline void wait_for(ConditionVariable* cond, MutexLock* lock) { - pthread_cond_wait(cond, lock); -} - -static inline void destroy_cond(ConditionVariable* cond) { - pthread_cond_destroy(cond); -} - -static inline void free_mem(void* mem) { - free(mem); -} - -#else - -#error "No locking/condition variable support; Possibly unsupported platform" - -#endif - -typedef struct CallbackResult { - MutexLock lock; - ConditionVariable cond; - int ready; - jobject object; -} CallbackResult; - -typedef struct JniLocks { - MutexLock classLoadingLock; -} JniLocks; - -/// Represents the error when dart-jni layer has already spawned singleton VM. -#define DART_JNI_SINGLETON_EXISTS (-99); - -/// Stores the global state of the JNI. -typedef struct JniContext { - JavaVM* jvm; - jobject classLoader; - jmethodID loadClassMethod; - jobject currentActivity; - jobject appContext; - JniLocks locks; -} JniContext; - -// jniEnv for this thread, used by inline functions in this header, -// therefore declared as extern. -extern thread_local JNIEnv* jniEnv; - -extern JniContext* jni; - -/// Types used by JNI API to distinguish between primitive types. -enum JniType { - booleanType = 0, - byteType = 1, - shortType = 2, - charType = 3, - intType = 4, - longType = 5, - floatType = 6, - doubleType = 7, - objectType = 8, - voidType = 9, -}; - -/// Result type for use by JNI. -/// -/// If [exception] is null, it means the result is valid. -/// It's assumed that the caller knows the expected type in [result]. -typedef struct JniResult { - jvalue value; - jthrowable exception; -} JniResult; - -/// Similar to [JniResult] but for class lookups. -typedef struct JniClassLookupResult { - jclass value; - jthrowable exception; -} JniClassLookupResult; - -/// Similar to [JniResult] but for method/field ID lookups. -typedef struct JniPointerResult { - const void* value; - jthrowable exception; -} JniPointerResult; - -/// JniExceptionDetails holds 2 jstring objects, one is the result of -/// calling `toString` on exception object, other is stack trace; -typedef struct JniExceptionDetails { - jstring message; - jstring stacktrace; -} JniExceptionDetails; - -/// This struct contains functions which wrap method call / field access conveniently along with -/// exception checking. -/// -/// Flutter embedding checks for pending JNI exceptions before an FFI transition, which requires us -/// to check for and clear the exception before returning to dart code, which requires these functions -/// to return result types. -typedef struct JniAccessorsStruct { - JniClassLookupResult (*getClass)(char* internalName); - JniPointerResult (*getFieldID)(jclass cls, char* fieldName, char* signature); - JniPointerResult (*getStaticFieldID)(jclass cls, - char* fieldName, - char* signature); - JniPointerResult (*getMethodID)(jclass cls, - char* methodName, - char* signature); - JniPointerResult (*getStaticMethodID)(jclass cls, - char* methodName, - char* signature); - JniResult (*newObject)(jclass cls, jmethodID ctor, jvalue* args); - JniResult (*newPrimitiveArray)(jsize length, int type); - JniResult (*newObjectArray)(jsize length, - jclass elementClass, - jobject initialElement); - JniResult (*getArrayElement)(jarray array, int index, int type); - JniResult (*callMethod)(jobject obj, - jmethodID methodID, - int callType, - jvalue* args); - JniResult (*callStaticMethod)(jclass cls, - jmethodID methodID, - int callType, - jvalue* args); - JniResult (*getField)(jobject obj, jfieldID fieldID, int callType); - JniResult (*getStaticField)(jclass cls, jfieldID fieldID, int callType); - JniExceptionDetails (*getExceptionDetails)(jthrowable exception); -} JniAccessorsStruct; - -FFI_PLUGIN_EXPORT JniAccessorsStruct* GetAccessors(); - -FFI_PLUGIN_EXPORT JavaVM* GetJavaVM(void); - -FFI_PLUGIN_EXPORT JNIEnv* GetJniEnv(void); - -/// Spawn a JVM with given arguments. -/// -/// Returns JNI_OK on success, and one of the documented JNI error codes on -/// failure. It returns DART_JNI_SINGLETON_EXISTS if an attempt to spawn multiple -/// JVMs is made, even if the underlying API potentially supports multiple VMs. -FFI_PLUGIN_EXPORT int SpawnJvm(JavaVMInitArgs* args); - -/// Returns Application classLoader (on Android), -/// which can be used to load application and platform classes. -/// -/// On other platforms, NULL is returned. -FFI_PLUGIN_EXPORT jobject GetClassLoader(void); - -/// Returns application context on Android. -/// -/// On other platforms, NULL is returned. -FFI_PLUGIN_EXPORT jobject GetApplicationContext(void); - -/// Returns current activity of the app on Android. -FFI_PLUGIN_EXPORT jobject GetCurrentActivity(void); - -static inline void attach_thread() { - if (jniEnv == NULL) { - (*jni->jvm)->AttachCurrentThread(jni->jvm, __ENVP_CAST & jniEnv, NULL); - } -} - -/// Load class into [cls] using platform specific mechanism -static inline void load_class_platform(jclass* cls, const char* name) { -#ifdef __ANDROID__ - jstring className = (*jniEnv)->NewStringUTF(jniEnv, name); - *cls = (*jniEnv)->CallObjectMethod(jniEnv, jni->classLoader, - jni->loadClassMethod, className); - (*jniEnv)->DeleteLocalRef(jniEnv, className); -#else - *cls = (*jniEnv)->FindClass(jniEnv, name); -#endif -} - -static inline void load_class_global_ref(jclass* cls, const char* name) { - if (*cls == NULL) { - jclass tmp = NULL; - acquire_lock(&jni->locks.classLoadingLock); - if (*cls == NULL) { - load_class_platform(&tmp, name); - if (!(*jniEnv)->ExceptionCheck(jniEnv)) { - *cls = (*jniEnv)->NewGlobalRef(jniEnv, tmp); - (*jniEnv)->DeleteLocalRef(jniEnv, tmp); - } - } - release_lock(&jni->locks.classLoadingLock); - } -} - -static inline void load_method(jclass cls, - jmethodID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetMethodID(jniEnv, cls, name, sig); - } -} - -static inline void load_static_method(jclass cls, - jmethodID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetStaticMethodID(jniEnv, cls, name, sig); - } -} - -static inline void load_field(jclass cls, - jfieldID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetFieldID(jniEnv, cls, name, sig); - } -} - -static inline void load_static_field(jclass cls, - jfieldID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetStaticFieldID(jniEnv, cls, name, sig); - } -} - -static inline jobject to_global_ref(jobject ref) { - jobject g = (*jniEnv)->NewGlobalRef(jniEnv, ref); - (*jniEnv)->DeleteLocalRef(jniEnv, ref); - return g; -} - -// These functions are useful for C+Dart bindings, and not required for pure dart bindings. - -FFI_PLUGIN_EXPORT JniContext* GetJniContextPtr(); - -/// For use by jni_gen's generated code -/// don't use these. - -// these 2 fn ptr vars will be defined by generated code library -extern JniContext* (*context_getter)(void); -extern JNIEnv* (*env_getter)(void); - -// this function will be exported by generated code library -// it will set above 2 variables. -FFI_PLUGIN_EXPORT void setJniGetters(struct JniContext* (*cg)(void), - JNIEnv* (*eg)(void)); - -static inline void load_env() { - if (jniEnv == NULL) { - jni = context_getter(); - jniEnv = env_getter(); - } -} - -static inline jthrowable check_exception() { - jthrowable exception = (*jniEnv)->ExceptionOccurred(jniEnv); - if (exception != NULL) (*jniEnv)->ExceptionClear(jniEnv); - if (exception == NULL) return NULL; - return to_global_ref(exception); -} - -static inline JniResult to_global_ref_result(jobject ref) { - JniResult result; - result.exception = check_exception(); - if (result.exception == NULL) { - result.value.l = to_global_ref(ref); - } - return result; -} diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/c_based/c_bindings/jackson_core.c b/pkgs/jnigen/test/jackson_core_test/third_party/c_based/c_bindings/jackson_core.c deleted file mode 100644 index 5989a3f691..0000000000 --- a/pkgs/jnigen/test/jackson_core_test/third_party/c_based/c_bindings/jackson_core.c +++ /dev/null @@ -1,3744 +0,0 @@ -// Generated from jackson-core which is licensed under the Apache License 2.0. -// The following copyright from the original authors applies. -// See https://github.com/FasterXML/jackson-core/blob/2.14/LICENSE -// -// Copyright (c) 2007 - The Jackson Project Authors -// Licensed under the Apache License, Version 2.0 (the "License") -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Autogenerated by jnigen. DO NOT EDIT! - -#include -#include "dartjni.h" -#include "jni.h" - -thread_local JNIEnv* jniEnv; -JniContext* jni; - -JniContext* (*context_getter)(void); -JNIEnv* (*env_getter)(void); - -void setJniGetters(JniContext* (*cg)(void), JNIEnv* (*eg)(void)) { - context_getter = cg; - env_getter = eg; -} - -// com.fasterxml.jackson.core.JsonFactory$Feature -jclass _c_JsonFactory_Feature = NULL; - -jmethodID _m_JsonFactory_Feature__values = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory_Feature__values() { - load_env(); - load_class_global_ref(&_c_JsonFactory_Feature, - "com/fasterxml/jackson/core/JsonFactory$Feature"); - if (_c_JsonFactory_Feature == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_JsonFactory_Feature, &_m_JsonFactory_Feature__values, - "values", - "()[Lcom/fasterxml/jackson/core/JsonFactory$Feature;"); - if (_m_JsonFactory_Feature__values == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_JsonFactory_Feature, _m_JsonFactory_Feature__values); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory_Feature__valueOf = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory_Feature__valueOf(jobject name) { - load_env(); - load_class_global_ref(&_c_JsonFactory_Feature, - "com/fasterxml/jackson/core/JsonFactory$Feature"); - if (_c_JsonFactory_Feature == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_JsonFactory_Feature, &_m_JsonFactory_Feature__valueOf, "valueOf", - "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonFactory$Feature;"); - if (_m_JsonFactory_Feature__valueOf == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_JsonFactory_Feature, _m_JsonFactory_Feature__valueOf, name); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory_Feature__collectDefaults = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory_Feature__collectDefaults() { - load_env(); - load_class_global_ref(&_c_JsonFactory_Feature, - "com/fasterxml/jackson/core/JsonFactory$Feature"); - if (_c_JsonFactory_Feature == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_JsonFactory_Feature, - &_m_JsonFactory_Feature__collectDefaults, - "collectDefaults", "()I"); - if (_m_JsonFactory_Feature__collectDefaults == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallStaticIntMethod( - jniEnv, _c_JsonFactory_Feature, _m_JsonFactory_Feature__collectDefaults); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonFactory_Feature__enabledByDefault = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory_Feature__enabledByDefault(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory_Feature, - "com/fasterxml/jackson/core/JsonFactory$Feature"); - if (_c_JsonFactory_Feature == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory_Feature, &_m_JsonFactory_Feature__enabledByDefault, - "enabledByDefault", "()Z"); - if (_m_JsonFactory_Feature__enabledByDefault == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_JsonFactory_Feature__enabledByDefault); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonFactory_Feature__enabledIn = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory_Feature__enabledIn(jobject self_, int32_t flags) { - load_env(); - load_class_global_ref(&_c_JsonFactory_Feature, - "com/fasterxml/jackson/core/JsonFactory$Feature"); - if (_c_JsonFactory_Feature == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory_Feature, &_m_JsonFactory_Feature__enabledIn, - "enabledIn", "(I)Z"); - if (_m_JsonFactory_Feature__enabledIn == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_JsonFactory_Feature__enabledIn, flags); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonFactory_Feature__getMask = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory_Feature__getMask(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory_Feature, - "com/fasterxml/jackson/core/JsonFactory$Feature"); - if (_c_JsonFactory_Feature == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory_Feature, &_m_JsonFactory_Feature__getMask, - "getMask", "()I"); - if (_m_JsonFactory_Feature__getMask == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = - (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonFactory_Feature__getMask); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -// com.fasterxml.jackson.core.JsonFactory -jclass _c_JsonFactory = NULL; - -jmethodID _m_JsonFactory__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__new0() { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__new0, "", "()V"); - if (_m_JsonFactory__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_JsonFactory, _m_JsonFactory__new0); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__new1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__new1(jobject oc) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__new1, "", - "(Lcom/fasterxml/jackson/core/ObjectCodec;)V"); - if (_m_JsonFactory__new1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_JsonFactory, _m_JsonFactory__new1, oc); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__new2 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__new2(jobject src, jobject codec) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__new2, "", - "(Lcom/fasterxml/jackson/core/JsonFactory;Lcom/fasterxml/jackson/" - "core/ObjectCodec;)V"); - if (_m_JsonFactory__new2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_JsonFactory, - _m_JsonFactory__new2, src, codec); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__new3 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__new3(jobject b) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__new3, "", - "(Lcom/fasterxml/jackson/core/JsonFactoryBuilder;)V"); - if (_m_JsonFactory__new3 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_JsonFactory, _m_JsonFactory__new3, b); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__new4 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__new4(jobject b, uint8_t bogus) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__new4, "", - "(Lcom/fasterxml/jackson/core/TSFBuilder;Z)V"); - if (_m_JsonFactory__new4 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_JsonFactory, - _m_JsonFactory__new4, b, bogus); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__rebuild = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__rebuild(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__rebuild, "rebuild", - "()Lcom/fasterxml/jackson/core/TSFBuilder;"); - if (_m_JsonFactory__rebuild == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__rebuild); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__builder = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__builder() { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_JsonFactory, &_m_JsonFactory__builder, "builder", - "()Lcom/fasterxml/jackson/core/TSFBuilder;"); - if (_m_JsonFactory__builder == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_JsonFactory, - _m_JsonFactory__builder); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__copy = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__copy(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__copy, "copy", - "()Lcom/fasterxml/jackson/core/JsonFactory;"); - if (_m_JsonFactory__copy == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__copy); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__readResolve = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__readResolve(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__readResolve, "readResolve", - "()Ljava/lang/Object;"); - if (_m_JsonFactory__readResolve == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__readResolve); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__requiresPropertyOrdering = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__requiresPropertyOrdering(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__requiresPropertyOrdering, - "requiresPropertyOrdering", "()Z"); - if (_m_JsonFactory__requiresPropertyOrdering == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_JsonFactory__requiresPropertyOrdering); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonFactory__canHandleBinaryNatively = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__canHandleBinaryNatively(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__canHandleBinaryNatively, - "canHandleBinaryNatively", "()Z"); - if (_m_JsonFactory__canHandleBinaryNatively == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_JsonFactory__canHandleBinaryNatively); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonFactory__canUseCharArrays = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__canUseCharArrays(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__canUseCharArrays, - "canUseCharArrays", "()Z"); - if (_m_JsonFactory__canUseCharArrays == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_JsonFactory__canUseCharArrays); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonFactory__canParseAsync = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__canParseAsync(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__canParseAsync, "canParseAsync", - "()Z"); - if (_m_JsonFactory__canParseAsync == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, - _m_JsonFactory__canParseAsync); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonFactory__getFormatReadFeatureType = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__getFormatReadFeatureType(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__getFormatReadFeatureType, - "getFormatReadFeatureType", "()Ljava/lang/Class;"); - if (_m_JsonFactory__getFormatReadFeatureType == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__getFormatReadFeatureType); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__getFormatWriteFeatureType = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__getFormatWriteFeatureType(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__getFormatWriteFeatureType, - "getFormatWriteFeatureType", "()Ljava/lang/Class;"); - if (_m_JsonFactory__getFormatWriteFeatureType == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__getFormatWriteFeatureType); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__canUseSchema = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__canUseSchema(jobject self_, jobject schema) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__canUseSchema, "canUseSchema", - "(Lcom/fasterxml/jackson/core/FormatSchema;)Z"); - if (_m_JsonFactory__canUseSchema == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_JsonFactory__canUseSchema, schema); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonFactory__getFormatName = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__getFormatName(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__getFormatName, "getFormatName", - "()Ljava/lang/String;"); - if (_m_JsonFactory__getFormatName == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__getFormatName); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__hasFormat = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__hasFormat(jobject self_, jobject acc) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__hasFormat, "hasFormat", - "(Lcom/fasterxml/jackson/core/format/InputAccessor;)Lcom/" - "fasterxml/jackson/core/format/MatchStrength;"); - if (_m_JsonFactory__hasFormat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, - _m_JsonFactory__hasFormat, acc); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__requiresCustomCodec = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__requiresCustomCodec(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__requiresCustomCodec, - "requiresCustomCodec", "()Z"); - if (_m_JsonFactory__requiresCustomCodec == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_JsonFactory__requiresCustomCodec); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonFactory__hasJSONFormat = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__hasJSONFormat(jobject self_, jobject acc) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__hasJSONFormat, "hasJSONFormat", - "(Lcom/fasterxml/jackson/core/format/InputAccessor;)Lcom/" - "fasterxml/jackson/core/format/MatchStrength;"); - if (_m_JsonFactory__hasJSONFormat == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__hasJSONFormat, acc); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__version = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__version(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__version, "version", - "()Lcom/fasterxml/jackson/core/Version;"); - if (_m_JsonFactory__version == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__version); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__configure = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__configure(jobject self_, jobject f, uint8_t state) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__configure, "configure", - "(Lcom/fasterxml/jackson/core/JsonFactory$Feature;Z)Lcom/" - "fasterxml/jackson/core/JsonFactory;"); - if (_m_JsonFactory__configure == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__configure, f, state); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__enable = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__enable(jobject self_, jobject f) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__enable, "enable", - "(Lcom/fasterxml/jackson/core/JsonFactory$Feature;)Lcom/" - "fasterxml/jackson/core/JsonFactory;"); - if (_m_JsonFactory__enable == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__enable, f); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__disable = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__disable(jobject self_, jobject f) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__disable, "disable", - "(Lcom/fasterxml/jackson/core/JsonFactory$Feature;)Lcom/" - "fasterxml/jackson/core/JsonFactory;"); - if (_m_JsonFactory__disable == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__disable, f); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__isEnabled = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__isEnabled(jobject self_, jobject f) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__isEnabled, "isEnabled", - "(Lcom/fasterxml/jackson/core/JsonFactory$Feature;)Z"); - if (_m_JsonFactory__isEnabled == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = - (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonFactory__isEnabled, f); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonFactory__getParserFeatures = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__getParserFeatures(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__getParserFeatures, - "getParserFeatures", "()I"); - if (_m_JsonFactory__getParserFeatures == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, - _m_JsonFactory__getParserFeatures); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonFactory__getGeneratorFeatures = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__getGeneratorFeatures(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__getGeneratorFeatures, - "getGeneratorFeatures", "()I"); - if (_m_JsonFactory__getGeneratorFeatures == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallIntMethod( - jniEnv, self_, _m_JsonFactory__getGeneratorFeatures); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonFactory__getFormatParserFeatures = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__getFormatParserFeatures(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__getFormatParserFeatures, - "getFormatParserFeatures", "()I"); - if (_m_JsonFactory__getFormatParserFeatures == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallIntMethod( - jniEnv, self_, _m_JsonFactory__getFormatParserFeatures); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonFactory__getFormatGeneratorFeatures = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__getFormatGeneratorFeatures(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__getFormatGeneratorFeatures, - "getFormatGeneratorFeatures", "()I"); - if (_m_JsonFactory__getFormatGeneratorFeatures == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallIntMethod( - jniEnv, self_, _m_JsonFactory__getFormatGeneratorFeatures); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonFactory__configure1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__configure1(jobject self_, jobject f, uint8_t state) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__configure1, "configure", - "(Lcom/fasterxml/jackson/core/JsonParser$Feature;Z)Lcom/" - "fasterxml/jackson/core/JsonFactory;"); - if (_m_JsonFactory__configure1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__configure1, f, state); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__enable1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__enable1(jobject self_, jobject f) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__enable1, "enable", - "(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Lcom/fasterxml/" - "jackson/core/JsonFactory;"); - if (_m_JsonFactory__enable1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__enable1, f); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__disable1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__disable1(jobject self_, jobject f) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__disable1, "disable", - "(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Lcom/fasterxml/" - "jackson/core/JsonFactory;"); - if (_m_JsonFactory__disable1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__disable1, f); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__isEnabled1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__isEnabled1(jobject self_, jobject f) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__isEnabled1, "isEnabled", - "(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Z"); - if (_m_JsonFactory__isEnabled1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, - _m_JsonFactory__isEnabled1, f); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonFactory__isEnabled2 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__isEnabled2(jobject self_, jobject f) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__isEnabled2, "isEnabled", - "(Lcom/fasterxml/jackson/core/StreamReadFeature;)Z"); - if (_m_JsonFactory__isEnabled2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, - _m_JsonFactory__isEnabled2, f); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonFactory__getInputDecorator = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__getInputDecorator(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__getInputDecorator, - "getInputDecorator", - "()Lcom/fasterxml/jackson/core/io/InputDecorator;"); - if (_m_JsonFactory__getInputDecorator == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__getInputDecorator); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__setInputDecorator = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__setInputDecorator(jobject self_, jobject d) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__setInputDecorator, - "setInputDecorator", - "(Lcom/fasterxml/jackson/core/io/InputDecorator;)Lcom/fasterxml/" - "jackson/core/JsonFactory;"); - if (_m_JsonFactory__setInputDecorator == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__setInputDecorator, d); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__configure2 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__configure2(jobject self_, jobject f, uint8_t state) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__configure2, "configure", - "(Lcom/fasterxml/jackson/core/JsonGenerator$Feature;Z)Lcom/" - "fasterxml/jackson/core/JsonFactory;"); - if (_m_JsonFactory__configure2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__configure2, f, state); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__enable2 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__enable2(jobject self_, jobject f) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__enable2, "enable", - "(Lcom/fasterxml/jackson/core/JsonGenerator$Feature;)Lcom/" - "fasterxml/jackson/core/JsonFactory;"); - if (_m_JsonFactory__enable2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__enable2, f); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__disable2 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__disable2(jobject self_, jobject f) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__disable2, "disable", - "(Lcom/fasterxml/jackson/core/JsonGenerator$Feature;)Lcom/" - "fasterxml/jackson/core/JsonFactory;"); - if (_m_JsonFactory__disable2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__disable2, f); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__isEnabled3 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__isEnabled3(jobject self_, jobject f) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__isEnabled3, "isEnabled", - "(Lcom/fasterxml/jackson/core/JsonGenerator$Feature;)Z"); - if (_m_JsonFactory__isEnabled3 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, - _m_JsonFactory__isEnabled3, f); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonFactory__isEnabled4 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__isEnabled4(jobject self_, jobject f) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__isEnabled4, "isEnabled", - "(Lcom/fasterxml/jackson/core/StreamWriteFeature;)Z"); - if (_m_JsonFactory__isEnabled4 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, - _m_JsonFactory__isEnabled4, f); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonFactory__getCharacterEscapes = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__getCharacterEscapes(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__getCharacterEscapes, - "getCharacterEscapes", - "()Lcom/fasterxml/jackson/core/io/CharacterEscapes;"); - if (_m_JsonFactory__getCharacterEscapes == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__getCharacterEscapes); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__setCharacterEscapes = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__setCharacterEscapes(jobject self_, jobject esc) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__setCharacterEscapes, - "setCharacterEscapes", - "(Lcom/fasterxml/jackson/core/io/CharacterEscapes;)Lcom/" - "fasterxml/jackson/core/JsonFactory;"); - if (_m_JsonFactory__setCharacterEscapes == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__setCharacterEscapes, esc); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__getOutputDecorator = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__getOutputDecorator(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__getOutputDecorator, - "getOutputDecorator", - "()Lcom/fasterxml/jackson/core/io/OutputDecorator;"); - if (_m_JsonFactory__getOutputDecorator == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__getOutputDecorator); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__setOutputDecorator = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__setOutputDecorator(jobject self_, jobject d) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__setOutputDecorator, - "setOutputDecorator", - "(Lcom/fasterxml/jackson/core/io/OutputDecorator;)Lcom/fasterxml/" - "jackson/core/JsonFactory;"); - if (_m_JsonFactory__setOutputDecorator == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__setOutputDecorator, d); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__setRootValueSeparator = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__setRootValueSeparator(jobject self_, jobject sep) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__setRootValueSeparator, - "setRootValueSeparator", - "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonFactory;"); - if (_m_JsonFactory__setRootValueSeparator == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__setRootValueSeparator, sep); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__getRootValueSeparator = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__getRootValueSeparator(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__getRootValueSeparator, - "getRootValueSeparator", "()Ljava/lang/String;"); - if (_m_JsonFactory__getRootValueSeparator == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__getRootValueSeparator); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__setCodec = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__setCodec(jobject self_, jobject oc) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__setCodec, "setCodec", - "(Lcom/fasterxml/jackson/core/ObjectCodec;)Lcom/fasterxml/" - "jackson/core/JsonFactory;"); - if (_m_JsonFactory__setCodec == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__setCodec, oc); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__getCodec = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__getCodec(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__getCodec, "getCodec", - "()Lcom/fasterxml/jackson/core/ObjectCodec;"); - if (_m_JsonFactory__getCodec == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__getCodec); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createParser = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createParser(jobject self_, jobject f) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createParser, "createParser", - "(Ljava/io/File;)Lcom/fasterxml/jackson/core/JsonParser;"); - if (_m_JsonFactory__createParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createParser, f); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createParser1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createParser1(jobject self_, jobject url) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createParser1, "createParser", - "(Ljava/net/URL;)Lcom/fasterxml/jackson/core/JsonParser;"); - if (_m_JsonFactory__createParser1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createParser1, url); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createParser2 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createParser2(jobject self_, jobject in) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createParser2, "createParser", - "(Ljava/io/InputStream;)Lcom/fasterxml/jackson/core/JsonParser;"); - if (_m_JsonFactory__createParser2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createParser2, in); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createParser3 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createParser3(jobject self_, jobject r) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createParser3, "createParser", - "(Ljava/io/Reader;)Lcom/fasterxml/jackson/core/JsonParser;"); - if (_m_JsonFactory__createParser3 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createParser3, r); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createParser4 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createParser4(jobject self_, jobject data) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createParser4, "createParser", - "([B)Lcom/fasterxml/jackson/core/JsonParser;"); - if (_m_JsonFactory__createParser4 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createParser4, data); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createParser5 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createParser5(jobject self_, - jobject data, - int32_t offset, - int32_t len) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createParser5, "createParser", - "([BII)Lcom/fasterxml/jackson/core/JsonParser;"); - if (_m_JsonFactory__createParser5 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createParser5, data, offset, len); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createParser6 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createParser6(jobject self_, jobject content) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createParser6, "createParser", - "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonParser;"); - if (_m_JsonFactory__createParser6 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createParser6, content); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createParser7 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createParser7(jobject self_, jobject content) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createParser7, "createParser", - "([C)Lcom/fasterxml/jackson/core/JsonParser;"); - if (_m_JsonFactory__createParser7 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createParser7, content); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createParser8 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createParser8(jobject self_, - jobject content, - int32_t offset, - int32_t len) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createParser8, "createParser", - "([CII)Lcom/fasterxml/jackson/core/JsonParser;"); - if (_m_JsonFactory__createParser8 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createParser8, content, offset, len); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createParser9 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createParser9(jobject self_, jobject in) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createParser9, "createParser", - "(Ljava/io/DataInput;)Lcom/fasterxml/jackson/core/JsonParser;"); - if (_m_JsonFactory__createParser9 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createParser9, in); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createNonBlockingByteArrayParser = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createNonBlockingByteArrayParser(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createNonBlockingByteArrayParser, - "createNonBlockingByteArrayParser", - "()Lcom/fasterxml/jackson/core/JsonParser;"); - if (_m_JsonFactory__createNonBlockingByteArrayParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createNonBlockingByteArrayParser); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createGenerator = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createGenerator(jobject self_, - jobject out, - jobject enc) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createGenerator, - "createGenerator", - "(Ljava/io/OutputStream;Lcom/fasterxml/jackson/core/" - "JsonEncoding;)Lcom/fasterxml/jackson/core/JsonGenerator;"); - if (_m_JsonFactory__createGenerator == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createGenerator, out, enc); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createGenerator1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createGenerator1(jobject self_, jobject out) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_JsonFactory, &_m_JsonFactory__createGenerator1, "createGenerator", - "(Ljava/io/OutputStream;)Lcom/fasterxml/jackson/core/JsonGenerator;"); - if (_m_JsonFactory__createGenerator1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createGenerator1, out); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createGenerator2 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createGenerator2(jobject self_, jobject w) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createGenerator2, - "createGenerator", - "(Ljava/io/Writer;)Lcom/fasterxml/jackson/core/JsonGenerator;"); - if (_m_JsonFactory__createGenerator2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createGenerator2, w); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createGenerator3 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createGenerator3(jobject self_, jobject f, jobject enc) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createGenerator3, - "createGenerator", - "(Ljava/io/File;Lcom/fasterxml/jackson/core/JsonEncoding;)Lcom/" - "fasterxml/jackson/core/JsonGenerator;"); - if (_m_JsonFactory__createGenerator3 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createGenerator3, f, enc); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createGenerator4 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createGenerator4(jobject self_, - jobject out, - jobject enc) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createGenerator4, - "createGenerator", - "(Ljava/io/DataOutput;Lcom/fasterxml/jackson/core/" - "JsonEncoding;)Lcom/fasterxml/jackson/core/JsonGenerator;"); - if (_m_JsonFactory__createGenerator4 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createGenerator4, out, enc); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createGenerator5 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createGenerator5(jobject self_, jobject out) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_JsonFactory, &_m_JsonFactory__createGenerator5, "createGenerator", - "(Ljava/io/DataOutput;)Lcom/fasterxml/jackson/core/JsonGenerator;"); - if (_m_JsonFactory__createGenerator5 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createGenerator5, out); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createJsonParser = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createJsonParser(jobject self_, jobject f) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createJsonParser, - "createJsonParser", - "(Ljava/io/File;)Lcom/fasterxml/jackson/core/JsonParser;"); - if (_m_JsonFactory__createJsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createJsonParser, f); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createJsonParser1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createJsonParser1(jobject self_, jobject url) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createJsonParser1, - "createJsonParser", - "(Ljava/net/URL;)Lcom/fasterxml/jackson/core/JsonParser;"); - if (_m_JsonFactory__createJsonParser1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createJsonParser1, url); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createJsonParser2 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createJsonParser2(jobject self_, jobject in) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createJsonParser2, - "createJsonParser", - "(Ljava/io/InputStream;)Lcom/fasterxml/jackson/core/JsonParser;"); - if (_m_JsonFactory__createJsonParser2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createJsonParser2, in); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createJsonParser3 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createJsonParser3(jobject self_, jobject r) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createJsonParser3, - "createJsonParser", - "(Ljava/io/Reader;)Lcom/fasterxml/jackson/core/JsonParser;"); - if (_m_JsonFactory__createJsonParser3 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createJsonParser3, r); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createJsonParser4 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createJsonParser4(jobject self_, jobject data) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createJsonParser4, - "createJsonParser", - "([B)Lcom/fasterxml/jackson/core/JsonParser;"); - if (_m_JsonFactory__createJsonParser4 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createJsonParser4, data); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createJsonParser5 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createJsonParser5(jobject self_, - jobject data, - int32_t offset, - int32_t len) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createJsonParser5, - "createJsonParser", - "([BII)Lcom/fasterxml/jackson/core/JsonParser;"); - if (_m_JsonFactory__createJsonParser5 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createJsonParser5, data, offset, len); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createJsonParser6 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createJsonParser6(jobject self_, jobject content) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createJsonParser6, - "createJsonParser", - "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonParser;"); - if (_m_JsonFactory__createJsonParser6 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createJsonParser6, content); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createJsonGenerator = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createJsonGenerator(jobject self_, - jobject out, - jobject enc) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createJsonGenerator, - "createJsonGenerator", - "(Ljava/io/OutputStream;Lcom/fasterxml/jackson/core/" - "JsonEncoding;)Lcom/fasterxml/jackson/core/JsonGenerator;"); - if (_m_JsonFactory__createJsonGenerator == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createJsonGenerator, out, enc); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createJsonGenerator1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createJsonGenerator1(jobject self_, jobject out) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonFactory, &_m_JsonFactory__createJsonGenerator1, - "createJsonGenerator", - "(Ljava/io/Writer;)Lcom/fasterxml/jackson/core/JsonGenerator;"); - if (_m_JsonFactory__createJsonGenerator1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createJsonGenerator1, out); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonFactory__createJsonGenerator2 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonFactory__createJsonGenerator2(jobject self_, jobject out) { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_JsonFactory, &_m_JsonFactory__createJsonGenerator2, - "createJsonGenerator", - "(Ljava/io/OutputStream;)Lcom/fasterxml/jackson/core/JsonGenerator;"); - if (_m_JsonFactory__createJsonGenerator2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonFactory__createJsonGenerator2, out); - return to_global_ref_result(_result); -} - -jfieldID _f_JsonFactory__FORMAT_NAME_JSON = NULL; -FFI_PLUGIN_EXPORT -JniResult get_JsonFactory__FORMAT_NAME_JSON() { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_JsonFactory, &_f_JsonFactory__FORMAT_NAME_JSON, - "FORMAT_NAME_JSON", "Ljava/lang/String;"); - jobject _result = (*jniEnv)->GetStaticObjectField( - jniEnv, _c_JsonFactory, _f_JsonFactory__FORMAT_NAME_JSON); - return to_global_ref_result(_result); -} - -jfieldID _f_JsonFactory__DEFAULT_FACTORY_FEATURE_FLAGS = NULL; -FFI_PLUGIN_EXPORT -JniResult get_JsonFactory__DEFAULT_FACTORY_FEATURE_FLAGS() { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_JsonFactory, - &_f_JsonFactory__DEFAULT_FACTORY_FEATURE_FLAGS, - "DEFAULT_FACTORY_FEATURE_FLAGS", "I"); - int32_t _result = (*jniEnv)->GetStaticIntField( - jniEnv, _c_JsonFactory, _f_JsonFactory__DEFAULT_FACTORY_FEATURE_FLAGS); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jfieldID _f_JsonFactory__DEFAULT_PARSER_FEATURE_FLAGS = NULL; -FFI_PLUGIN_EXPORT -JniResult get_JsonFactory__DEFAULT_PARSER_FEATURE_FLAGS() { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_JsonFactory, - &_f_JsonFactory__DEFAULT_PARSER_FEATURE_FLAGS, - "DEFAULT_PARSER_FEATURE_FLAGS", "I"); - int32_t _result = (*jniEnv)->GetStaticIntField( - jniEnv, _c_JsonFactory, _f_JsonFactory__DEFAULT_PARSER_FEATURE_FLAGS); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jfieldID _f_JsonFactory__DEFAULT_GENERATOR_FEATURE_FLAGS = NULL; -FFI_PLUGIN_EXPORT -JniResult get_JsonFactory__DEFAULT_GENERATOR_FEATURE_FLAGS() { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_JsonFactory, - &_f_JsonFactory__DEFAULT_GENERATOR_FEATURE_FLAGS, - "DEFAULT_GENERATOR_FEATURE_FLAGS", "I"); - int32_t _result = (*jniEnv)->GetStaticIntField( - jniEnv, _c_JsonFactory, _f_JsonFactory__DEFAULT_GENERATOR_FEATURE_FLAGS); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jfieldID _f_JsonFactory__DEFAULT_ROOT_VALUE_SEPARATOR = NULL; -FFI_PLUGIN_EXPORT -JniResult get_JsonFactory__DEFAULT_ROOT_VALUE_SEPARATOR() { - load_env(); - load_class_global_ref(&_c_JsonFactory, - "com/fasterxml/jackson/core/JsonFactory"); - if (_c_JsonFactory == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_JsonFactory, - &_f_JsonFactory__DEFAULT_ROOT_VALUE_SEPARATOR, - "DEFAULT_ROOT_VALUE_SEPARATOR", - "Lcom/fasterxml/jackson/core/SerializableString;"); - jobject _result = (*jniEnv)->GetStaticObjectField( - jniEnv, _c_JsonFactory, _f_JsonFactory__DEFAULT_ROOT_VALUE_SEPARATOR); - return to_global_ref_result(_result); -} - -// com.fasterxml.jackson.core.JsonParser$Feature -jclass _c_JsonParser_Feature = NULL; - -jmethodID _m_JsonParser_Feature__values = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser_Feature__values() { - load_env(); - load_class_global_ref(&_c_JsonParser_Feature, - "com/fasterxml/jackson/core/JsonParser$Feature"); - if (_c_JsonParser_Feature == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_JsonParser_Feature, &_m_JsonParser_Feature__values, - "values", - "()[Lcom/fasterxml/jackson/core/JsonParser$Feature;"); - if (_m_JsonParser_Feature__values == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_JsonParser_Feature, _m_JsonParser_Feature__values); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser_Feature__valueOf = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser_Feature__valueOf(jobject name) { - load_env(); - load_class_global_ref(&_c_JsonParser_Feature, - "com/fasterxml/jackson/core/JsonParser$Feature"); - if (_c_JsonParser_Feature == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_JsonParser_Feature, &_m_JsonParser_Feature__valueOf, "valueOf", - "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonParser$Feature;"); - if (_m_JsonParser_Feature__valueOf == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_JsonParser_Feature, _m_JsonParser_Feature__valueOf, name); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser_Feature__collectDefaults = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser_Feature__collectDefaults() { - load_env(); - load_class_global_ref(&_c_JsonParser_Feature, - "com/fasterxml/jackson/core/JsonParser$Feature"); - if (_c_JsonParser_Feature == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_JsonParser_Feature, - &_m_JsonParser_Feature__collectDefaults, "collectDefaults", - "()I"); - if (_m_JsonParser_Feature__collectDefaults == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallStaticIntMethod( - jniEnv, _c_JsonParser_Feature, _m_JsonParser_Feature__collectDefaults); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser_Feature__enabledByDefault = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser_Feature__enabledByDefault(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser_Feature, - "com/fasterxml/jackson/core/JsonParser$Feature"); - if (_c_JsonParser_Feature == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser_Feature, &_m_JsonParser_Feature__enabledByDefault, - "enabledByDefault", "()Z"); - if (_m_JsonParser_Feature__enabledByDefault == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_JsonParser_Feature__enabledByDefault); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser_Feature__enabledIn = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser_Feature__enabledIn(jobject self_, int32_t flags) { - load_env(); - load_class_global_ref(&_c_JsonParser_Feature, - "com/fasterxml/jackson/core/JsonParser$Feature"); - if (_c_JsonParser_Feature == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser_Feature, &_m_JsonParser_Feature__enabledIn, - "enabledIn", "(I)Z"); - if (_m_JsonParser_Feature__enabledIn == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_JsonParser_Feature__enabledIn, flags); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser_Feature__getMask = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser_Feature__getMask(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser_Feature, - "com/fasterxml/jackson/core/JsonParser$Feature"); - if (_c_JsonParser_Feature == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser_Feature, &_m_JsonParser_Feature__getMask, "getMask", - "()I"); - if (_m_JsonParser_Feature__getMask == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = - (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonParser_Feature__getMask); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -// com.fasterxml.jackson.core.JsonParser$NumberType -jclass _c_JsonParser_NumberType = NULL; - -jmethodID _m_JsonParser_NumberType__values = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser_NumberType__values() { - load_env(); - load_class_global_ref(&_c_JsonParser_NumberType, - "com/fasterxml/jackson/core/JsonParser$NumberType"); - if (_c_JsonParser_NumberType == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_JsonParser_NumberType, - &_m_JsonParser_NumberType__values, "values", - "()[Lcom/fasterxml/jackson/core/JsonParser$NumberType;"); - if (_m_JsonParser_NumberType__values == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_JsonParser_NumberType, _m_JsonParser_NumberType__values); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser_NumberType__valueOf = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser_NumberType__valueOf(jobject name) { - load_env(); - load_class_global_ref(&_c_JsonParser_NumberType, - "com/fasterxml/jackson/core/JsonParser$NumberType"); - if (_c_JsonParser_NumberType == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_JsonParser_NumberType, &_m_JsonParser_NumberType__valueOf, "valueOf", - "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonParser$NumberType;"); - if (_m_JsonParser_NumberType__valueOf == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_JsonParser_NumberType, _m_JsonParser_NumberType__valueOf, - name); - return to_global_ref_result(_result); -} - -// com.fasterxml.jackson.core.JsonParser -jclass _c_JsonParser = NULL; - -jmethodID _m_JsonParser__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__new0() { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__new0, "", "()V"); - if (_m_JsonParser__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_JsonParser, _m_JsonParser__new0); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__new1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__new1(int32_t features) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__new1, "", "(I)V"); - if (_m_JsonParser__new1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_JsonParser, - _m_JsonParser__new1, features); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__getCodec = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getCodec(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getCodec, "getCodec", - "()Lcom/fasterxml/jackson/core/ObjectCodec;"); - if (_m_JsonParser__getCodec == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__getCodec); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__setCodec = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__setCodec(jobject self_, jobject oc) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__setCodec, "setCodec", - "(Lcom/fasterxml/jackson/core/ObjectCodec;)V"); - if (_m_JsonParser__setCodec == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_JsonParser__setCodec, oc); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getInputSource = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getInputSource(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getInputSource, "getInputSource", - "()Ljava/lang/Object;"); - if (_m_JsonParser__getInputSource == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__getInputSource); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__setRequestPayloadOnError = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__setRequestPayloadOnError(jobject self_, jobject payload) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__setRequestPayloadOnError, - "setRequestPayloadOnError", - "(Lcom/fasterxml/jackson/core/util/RequestPayload;)V"); - if (_m_JsonParser__setRequestPayloadOnError == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_JsonParser__setRequestPayloadOnError, payload); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__setRequestPayloadOnError1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__setRequestPayloadOnError1(jobject self_, - jobject payload, - jobject charset) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__setRequestPayloadOnError1, - "setRequestPayloadOnError", "([BLjava/lang/String;)V"); - if (_m_JsonParser__setRequestPayloadOnError1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_JsonParser__setRequestPayloadOnError1, payload, - charset); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__setRequestPayloadOnError2 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__setRequestPayloadOnError2(jobject self_, - jobject payload) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__setRequestPayloadOnError2, - "setRequestPayloadOnError", "(Ljava/lang/String;)V"); - if (_m_JsonParser__setRequestPayloadOnError2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_JsonParser__setRequestPayloadOnError2, payload); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__setSchema = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__setSchema(jobject self_, jobject schema) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__setSchema, "setSchema", - "(Lcom/fasterxml/jackson/core/FormatSchema;)V"); - if (_m_JsonParser__setSchema == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_JsonParser__setSchema, schema); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getSchema = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getSchema(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getSchema, "getSchema", - "()Lcom/fasterxml/jackson/core/FormatSchema;"); - if (_m_JsonParser__getSchema == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__getSchema); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__canUseSchema = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__canUseSchema(jobject self_, jobject schema) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__canUseSchema, "canUseSchema", - "(Lcom/fasterxml/jackson/core/FormatSchema;)Z"); - if (_m_JsonParser__canUseSchema == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_JsonParser__canUseSchema, schema); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__requiresCustomCodec = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__requiresCustomCodec(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__requiresCustomCodec, - "requiresCustomCodec", "()Z"); - if (_m_JsonParser__requiresCustomCodec == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_JsonParser__requiresCustomCodec); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__canParseAsync = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__canParseAsync(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__canParseAsync, "canParseAsync", - "()Z"); - if (_m_JsonParser__canParseAsync == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = - (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonParser__canParseAsync); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getNonBlockingInputFeeder = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getNonBlockingInputFeeder(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getNonBlockingInputFeeder, - "getNonBlockingInputFeeder", - "()Lcom/fasterxml/jackson/core/async/NonBlockingInputFeeder;"); - if (_m_JsonParser__getNonBlockingInputFeeder == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__getNonBlockingInputFeeder); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__getReadCapabilities = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getReadCapabilities(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getReadCapabilities, - "getReadCapabilities", - "()Lcom/fasterxml/jackson/core/util/JacksonFeatureSet;"); - if (_m_JsonParser__getReadCapabilities == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__getReadCapabilities); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__version = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__version(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__version, "version", - "()Lcom/fasterxml/jackson/core/Version;"); - if (_m_JsonParser__version == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__version); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__close = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__close(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__close, "close", "()V"); - if (_m_JsonParser__close == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_JsonParser__close); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__isClosed = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__isClosed(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__isClosed, "isClosed", "()Z"); - if (_m_JsonParser__isClosed == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = - (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonParser__isClosed); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getParsingContext = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getParsingContext(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getParsingContext, - "getParsingContext", - "()Lcom/fasterxml/jackson/core/JsonStreamContext;"); - if (_m_JsonParser__getParsingContext == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__getParsingContext); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__currentLocation = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__currentLocation(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__currentLocation, "currentLocation", - "()Lcom/fasterxml/jackson/core/JsonLocation;"); - if (_m_JsonParser__currentLocation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, - _m_JsonParser__currentLocation); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__currentTokenLocation = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__currentTokenLocation(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__currentTokenLocation, - "currentTokenLocation", - "()Lcom/fasterxml/jackson/core/JsonLocation;"); - if (_m_JsonParser__currentTokenLocation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__currentTokenLocation); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__getCurrentLocation = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getCurrentLocation(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getCurrentLocation, - "getCurrentLocation", - "()Lcom/fasterxml/jackson/core/JsonLocation;"); - if (_m_JsonParser__getCurrentLocation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__getCurrentLocation); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__getTokenLocation = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getTokenLocation(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getTokenLocation, - "getTokenLocation", - "()Lcom/fasterxml/jackson/core/JsonLocation;"); - if (_m_JsonParser__getTokenLocation == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__getTokenLocation); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__currentValue = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__currentValue(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__currentValue, "currentValue", - "()Ljava/lang/Object;"); - if (_m_JsonParser__currentValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__currentValue); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__assignCurrentValue = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__assignCurrentValue(jobject self_, jobject v) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__assignCurrentValue, - "assignCurrentValue", "(Ljava/lang/Object;)V"); - if (_m_JsonParser__assignCurrentValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_JsonParser__assignCurrentValue, - v); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getCurrentValue = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getCurrentValue(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getCurrentValue, "getCurrentValue", - "()Ljava/lang/Object;"); - if (_m_JsonParser__getCurrentValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, - _m_JsonParser__getCurrentValue); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__setCurrentValue = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__setCurrentValue(jobject self_, jobject v) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__setCurrentValue, "setCurrentValue", - "(Ljava/lang/Object;)V"); - if (_m_JsonParser__setCurrentValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_JsonParser__setCurrentValue, v); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__releaseBuffered = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__releaseBuffered(jobject self_, jobject out) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__releaseBuffered, "releaseBuffered", - "(Ljava/io/OutputStream;)I"); - if (_m_JsonParser__releaseBuffered == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallIntMethod( - jniEnv, self_, _m_JsonParser__releaseBuffered, out); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__releaseBuffered1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__releaseBuffered1(jobject self_, jobject w) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__releaseBuffered1, - "releaseBuffered", "(Ljava/io/Writer;)I"); - if (_m_JsonParser__releaseBuffered1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallIntMethod( - jniEnv, self_, _m_JsonParser__releaseBuffered1, w); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__enable = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__enable(jobject self_, jobject f) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__enable, "enable", - "(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Lcom/fasterxml/" - "jackson/core/JsonParser;"); - if (_m_JsonParser__enable == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__enable, f); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__disable = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__disable(jobject self_, jobject f) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__disable, "disable", - "(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Lcom/fasterxml/" - "jackson/core/JsonParser;"); - if (_m_JsonParser__disable == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__disable, f); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__configure = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__configure(jobject self_, jobject f, uint8_t state) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__configure, "configure", - "(Lcom/fasterxml/jackson/core/JsonParser$Feature;Z)Lcom/" - "fasterxml/jackson/core/JsonParser;"); - if (_m_JsonParser__configure == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__configure, f, state); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__isEnabled = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__isEnabled(jobject self_, jobject f) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__isEnabled, "isEnabled", - "(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Z"); - if (_m_JsonParser__isEnabled == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = - (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonParser__isEnabled, f); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__isEnabled1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__isEnabled1(jobject self_, jobject f) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__isEnabled1, "isEnabled", - "(Lcom/fasterxml/jackson/core/StreamReadFeature;)Z"); - if (_m_JsonParser__isEnabled1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = - (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonParser__isEnabled1, f); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getFeatureMask = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getFeatureMask(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getFeatureMask, "getFeatureMask", - "()I"); - if (_m_JsonParser__getFeatureMask == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = - (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonParser__getFeatureMask); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__setFeatureMask = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__setFeatureMask(jobject self_, int32_t mask) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__setFeatureMask, "setFeatureMask", - "(I)Lcom/fasterxml/jackson/core/JsonParser;"); - if (_m_JsonParser__setFeatureMask == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__setFeatureMask, mask); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__overrideStdFeatures = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__overrideStdFeatures(jobject self_, - int32_t values, - int32_t mask) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__overrideStdFeatures, - "overrideStdFeatures", - "(II)Lcom/fasterxml/jackson/core/JsonParser;"); - if (_m_JsonParser__overrideStdFeatures == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__overrideStdFeatures, values, mask); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__getFormatFeatures = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getFormatFeatures(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getFormatFeatures, - "getFormatFeatures", "()I"); - if (_m_JsonParser__getFormatFeatures == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = - (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonParser__getFormatFeatures); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__overrideFormatFeatures = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__overrideFormatFeatures(jobject self_, - int32_t values, - int32_t mask) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__overrideFormatFeatures, - "overrideFormatFeatures", - "(II)Lcom/fasterxml/jackson/core/JsonParser;"); - if (_m_JsonParser__overrideFormatFeatures == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__overrideFormatFeatures, values, mask); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__nextToken = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__nextToken(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__nextToken, "nextToken", - "()Lcom/fasterxml/jackson/core/JsonToken;"); - if (_m_JsonParser__nextToken == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__nextToken); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__nextValue = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__nextValue(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__nextValue, "nextValue", - "()Lcom/fasterxml/jackson/core/JsonToken;"); - if (_m_JsonParser__nextValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__nextValue); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__nextFieldName = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__nextFieldName(jobject self_, jobject str) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__nextFieldName, "nextFieldName", - "(Lcom/fasterxml/jackson/core/SerializableString;)Z"); - if (_m_JsonParser__nextFieldName == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_JsonParser__nextFieldName, str); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__nextFieldName1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__nextFieldName1(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__nextFieldName1, "nextFieldName", - "()Ljava/lang/String;"); - if (_m_JsonParser__nextFieldName1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__nextFieldName1); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__nextTextValue = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__nextTextValue(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__nextTextValue, "nextTextValue", - "()Ljava/lang/String;"); - if (_m_JsonParser__nextTextValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__nextTextValue); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__nextIntValue = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__nextIntValue(jobject self_, int32_t defaultValue) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__nextIntValue, "nextIntValue", - "(I)I"); - if (_m_JsonParser__nextIntValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallIntMethod( - jniEnv, self_, _m_JsonParser__nextIntValue, defaultValue); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__nextLongValue = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__nextLongValue(jobject self_, int64_t defaultValue) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__nextLongValue, "nextLongValue", - "(J)J"); - if (_m_JsonParser__nextLongValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int64_t _result = (*jniEnv)->CallLongMethod( - jniEnv, self_, _m_JsonParser__nextLongValue, defaultValue); - return (JniResult){.value = {.j = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__nextBooleanValue = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__nextBooleanValue(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__nextBooleanValue, - "nextBooleanValue", "()Ljava/lang/Boolean;"); - if (_m_JsonParser__nextBooleanValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__nextBooleanValue); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__skipChildren = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__skipChildren(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__skipChildren, "skipChildren", - "()Lcom/fasterxml/jackson/core/JsonParser;"); - if (_m_JsonParser__skipChildren == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__skipChildren); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__finishToken = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__finishToken(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__finishToken, "finishToken", "()V"); - if (_m_JsonParser__finishToken == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_JsonParser__finishToken); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__currentToken = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__currentToken(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__currentToken, "currentToken", - "()Lcom/fasterxml/jackson/core/JsonToken;"); - if (_m_JsonParser__currentToken == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__currentToken); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__currentTokenId = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__currentTokenId(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__currentTokenId, "currentTokenId", - "()I"); - if (_m_JsonParser__currentTokenId == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = - (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonParser__currentTokenId); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getCurrentToken = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getCurrentToken(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getCurrentToken, "getCurrentToken", - "()Lcom/fasterxml/jackson/core/JsonToken;"); - if (_m_JsonParser__getCurrentToken == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, - _m_JsonParser__getCurrentToken); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__getCurrentTokenId = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getCurrentTokenId(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getCurrentTokenId, - "getCurrentTokenId", "()I"); - if (_m_JsonParser__getCurrentTokenId == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = - (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonParser__getCurrentTokenId); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__hasCurrentToken = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__hasCurrentToken(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__hasCurrentToken, "hasCurrentToken", - "()Z"); - if (_m_JsonParser__hasCurrentToken == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_JsonParser__hasCurrentToken); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__hasTokenId = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__hasTokenId(jobject self_, int32_t id) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__hasTokenId, "hasTokenId", "(I)Z"); - if (_m_JsonParser__hasTokenId == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, - _m_JsonParser__hasTokenId, id); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__hasToken = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__hasToken(jobject self_, jobject t) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__hasToken, "hasToken", - "(Lcom/fasterxml/jackson/core/JsonToken;)Z"); - if (_m_JsonParser__hasToken == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = - (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonParser__hasToken, t); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__isExpectedStartArrayToken = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__isExpectedStartArrayToken(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__isExpectedStartArrayToken, - "isExpectedStartArrayToken", "()Z"); - if (_m_JsonParser__isExpectedStartArrayToken == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_JsonParser__isExpectedStartArrayToken); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__isExpectedStartObjectToken = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__isExpectedStartObjectToken(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__isExpectedStartObjectToken, - "isExpectedStartObjectToken", "()Z"); - if (_m_JsonParser__isExpectedStartObjectToken == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_JsonParser__isExpectedStartObjectToken); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__isExpectedNumberIntToken = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__isExpectedNumberIntToken(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__isExpectedNumberIntToken, - "isExpectedNumberIntToken", "()Z"); - if (_m_JsonParser__isExpectedNumberIntToken == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_JsonParser__isExpectedNumberIntToken); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__isNaN = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__isNaN(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__isNaN, "isNaN", "()Z"); - if (_m_JsonParser__isNaN == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = - (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonParser__isNaN); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__clearCurrentToken = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__clearCurrentToken(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__clearCurrentToken, - "clearCurrentToken", "()V"); - if (_m_JsonParser__clearCurrentToken == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_JsonParser__clearCurrentToken); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getLastClearedToken = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getLastClearedToken(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getLastClearedToken, - "getLastClearedToken", - "()Lcom/fasterxml/jackson/core/JsonToken;"); - if (_m_JsonParser__getLastClearedToken == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__getLastClearedToken); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__overrideCurrentName = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__overrideCurrentName(jobject self_, jobject name) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__overrideCurrentName, - "overrideCurrentName", "(Ljava/lang/String;)V"); - if (_m_JsonParser__overrideCurrentName == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_JsonParser__overrideCurrentName, - name); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getCurrentName = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getCurrentName(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getCurrentName, "getCurrentName", - "()Ljava/lang/String;"); - if (_m_JsonParser__getCurrentName == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__getCurrentName); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__currentName = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__currentName(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__currentName, "currentName", - "()Ljava/lang/String;"); - if (_m_JsonParser__currentName == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__currentName); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__getText = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getText(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getText, "getText", - "()Ljava/lang/String;"); - if (_m_JsonParser__getText == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__getText); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__getText1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getText1(jobject self_, jobject writer) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getText1, "getText", - "(Ljava/io/Writer;)I"); - if (_m_JsonParser__getText1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = - (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonParser__getText1, writer); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getTextCharacters = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getTextCharacters(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getTextCharacters, - "getTextCharacters", "()[C"); - if (_m_JsonParser__getTextCharacters == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__getTextCharacters); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__getTextLength = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getTextLength(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getTextLength, "getTextLength", - "()I"); - if (_m_JsonParser__getTextLength == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = - (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonParser__getTextLength); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getTextOffset = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getTextOffset(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getTextOffset, "getTextOffset", - "()I"); - if (_m_JsonParser__getTextOffset == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = - (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonParser__getTextOffset); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__hasTextCharacters = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__hasTextCharacters(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__hasTextCharacters, - "hasTextCharacters", "()Z"); - if (_m_JsonParser__hasTextCharacters == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_JsonParser__hasTextCharacters); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getNumberValue = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getNumberValue(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getNumberValue, "getNumberValue", - "()Ljava/lang/Number;"); - if (_m_JsonParser__getNumberValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__getNumberValue); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__getNumberValueExact = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getNumberValueExact(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getNumberValueExact, - "getNumberValueExact", "()Ljava/lang/Number;"); - if (_m_JsonParser__getNumberValueExact == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__getNumberValueExact); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__getNumberType = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getNumberType(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getNumberType, "getNumberType", - "()Lcom/fasterxml/jackson/core/JsonParser$NumberType;"); - if (_m_JsonParser__getNumberType == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__getNumberType); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__getByteValue = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getByteValue(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getByteValue, "getByteValue", - "()B"); - if (_m_JsonParser__getByteValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int8_t _result = - (*jniEnv)->CallByteMethod(jniEnv, self_, _m_JsonParser__getByteValue); - return (JniResult){.value = {.b = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getShortValue = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getShortValue(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getShortValue, "getShortValue", - "()S"); - if (_m_JsonParser__getShortValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int16_t _result = - (*jniEnv)->CallShortMethod(jniEnv, self_, _m_JsonParser__getShortValue); - return (JniResult){.value = {.s = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getIntValue = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getIntValue(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getIntValue, "getIntValue", "()I"); - if (_m_JsonParser__getIntValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = - (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonParser__getIntValue); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getLongValue = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getLongValue(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getLongValue, "getLongValue", - "()J"); - if (_m_JsonParser__getLongValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int64_t _result = - (*jniEnv)->CallLongMethod(jniEnv, self_, _m_JsonParser__getLongValue); - return (JniResult){.value = {.j = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getBigIntegerValue = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getBigIntegerValue(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getBigIntegerValue, - "getBigIntegerValue", "()Ljava/math/BigInteger;"); - if (_m_JsonParser__getBigIntegerValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__getBigIntegerValue); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__getFloatValue = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getFloatValue(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getFloatValue, "getFloatValue", - "()F"); - if (_m_JsonParser__getFloatValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - float _result = - (*jniEnv)->CallFloatMethod(jniEnv, self_, _m_JsonParser__getFloatValue); - return (JniResult){.value = {.f = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getDoubleValue = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getDoubleValue(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getDoubleValue, "getDoubleValue", - "()D"); - if (_m_JsonParser__getDoubleValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - double _result = - (*jniEnv)->CallDoubleMethod(jniEnv, self_, _m_JsonParser__getDoubleValue); - return (JniResult){.value = {.d = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getDecimalValue = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getDecimalValue(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getDecimalValue, "getDecimalValue", - "()Ljava/math/BigDecimal;"); - if (_m_JsonParser__getDecimalValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, - _m_JsonParser__getDecimalValue); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__getBooleanValue = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getBooleanValue(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getBooleanValue, "getBooleanValue", - "()Z"); - if (_m_JsonParser__getBooleanValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_JsonParser__getBooleanValue); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getEmbeddedObject = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getEmbeddedObject(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getEmbeddedObject, - "getEmbeddedObject", "()Ljava/lang/Object;"); - if (_m_JsonParser__getEmbeddedObject == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__getEmbeddedObject); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__getBinaryValue = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getBinaryValue(jobject self_, jobject bv) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getBinaryValue, "getBinaryValue", - "(Lcom/fasterxml/jackson/core/Base64Variant;)[B"); - if (_m_JsonParser__getBinaryValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__getBinaryValue, bv); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__getBinaryValue1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getBinaryValue1(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getBinaryValue1, "getBinaryValue", - "()[B"); - if (_m_JsonParser__getBinaryValue1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, - _m_JsonParser__getBinaryValue1); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__readBinaryValue = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__readBinaryValue(jobject self_, jobject out) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__readBinaryValue, "readBinaryValue", - "(Ljava/io/OutputStream;)I"); - if (_m_JsonParser__readBinaryValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallIntMethod( - jniEnv, self_, _m_JsonParser__readBinaryValue, out); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__readBinaryValue1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__readBinaryValue1(jobject self_, jobject bv, jobject out) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_JsonParser, &_m_JsonParser__readBinaryValue1, "readBinaryValue", - "(Lcom/fasterxml/jackson/core/Base64Variant;Ljava/io/OutputStream;)I"); - if (_m_JsonParser__readBinaryValue1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallIntMethod( - jniEnv, self_, _m_JsonParser__readBinaryValue1, bv, out); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getValueAsInt = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getValueAsInt(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getValueAsInt, "getValueAsInt", - "()I"); - if (_m_JsonParser__getValueAsInt == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = - (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonParser__getValueAsInt); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getValueAsInt1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getValueAsInt1(jobject self_, int32_t def) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getValueAsInt1, "getValueAsInt", - "(I)I"); - if (_m_JsonParser__getValueAsInt1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallIntMethod( - jniEnv, self_, _m_JsonParser__getValueAsInt1, def); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getValueAsLong = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getValueAsLong(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getValueAsLong, "getValueAsLong", - "()J"); - if (_m_JsonParser__getValueAsLong == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int64_t _result = - (*jniEnv)->CallLongMethod(jniEnv, self_, _m_JsonParser__getValueAsLong); - return (JniResult){.value = {.j = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getValueAsLong1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getValueAsLong1(jobject self_, int64_t def) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getValueAsLong1, "getValueAsLong", - "(J)J"); - if (_m_JsonParser__getValueAsLong1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int64_t _result = (*jniEnv)->CallLongMethod( - jniEnv, self_, _m_JsonParser__getValueAsLong1, def); - return (JniResult){.value = {.j = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getValueAsDouble = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getValueAsDouble(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getValueAsDouble, - "getValueAsDouble", "()D"); - if (_m_JsonParser__getValueAsDouble == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - double _result = (*jniEnv)->CallDoubleMethod(jniEnv, self_, - _m_JsonParser__getValueAsDouble); - return (JniResult){.value = {.d = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getValueAsDouble1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getValueAsDouble1(jobject self_, double def) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getValueAsDouble1, - "getValueAsDouble", "(D)D"); - if (_m_JsonParser__getValueAsDouble1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - double _result = (*jniEnv)->CallDoubleMethod( - jniEnv, self_, _m_JsonParser__getValueAsDouble1, def); - return (JniResult){.value = {.d = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getValueAsBoolean = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getValueAsBoolean(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getValueAsBoolean, - "getValueAsBoolean", "()Z"); - if (_m_JsonParser__getValueAsBoolean == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_JsonParser__getValueAsBoolean); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getValueAsBoolean1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getValueAsBoolean1(jobject self_, uint8_t def) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getValueAsBoolean1, - "getValueAsBoolean", "(Z)Z"); - if (_m_JsonParser__getValueAsBoolean1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_JsonParser__getValueAsBoolean1, def); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getValueAsString = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getValueAsString(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getValueAsString, - "getValueAsString", "()Ljava/lang/String;"); - if (_m_JsonParser__getValueAsString == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__getValueAsString); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__getValueAsString1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getValueAsString1(jobject self_, jobject def) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getValueAsString1, - "getValueAsString", "(Ljava/lang/String;)Ljava/lang/String;"); - if (_m_JsonParser__getValueAsString1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__getValueAsString1, def); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__canReadObjectId = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__canReadObjectId(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__canReadObjectId, "canReadObjectId", - "()Z"); - if (_m_JsonParser__canReadObjectId == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = (*jniEnv)->CallBooleanMethod( - jniEnv, self_, _m_JsonParser__canReadObjectId); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__canReadTypeId = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__canReadTypeId(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__canReadTypeId, "canReadTypeId", - "()Z"); - if (_m_JsonParser__canReadTypeId == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = - (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonParser__canReadTypeId); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonParser__getObjectId = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getObjectId(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getObjectId, "getObjectId", - "()Ljava/lang/Object;"); - if (_m_JsonParser__getObjectId == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__getObjectId); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__getTypeId = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__getTypeId(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__getTypeId, "getTypeId", - "()Ljava/lang/Object;"); - if (_m_JsonParser__getTypeId == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__getTypeId); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__readValueAs = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__readValueAs(jobject self_, jobject valueType) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__readValueAs, "readValueAs", - "(Ljava/lang/Class;)Ljava/lang/Object;"); - if (_m_JsonParser__readValueAs == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__readValueAs, valueType); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__readValueAs1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__readValueAs1(jobject self_, jobject valueTypeRef) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_JsonParser, &_m_JsonParser__readValueAs1, "readValueAs", - "(Lcom/fasterxml/jackson/core/type/TypeReference;)Ljava/lang/Object;"); - if (_m_JsonParser__readValueAs1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__readValueAs1, valueTypeRef); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__readValuesAs = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__readValuesAs(jobject self_, jobject valueType) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__readValuesAs, "readValuesAs", - "(Ljava/lang/Class;)Ljava/util/Iterator;"); - if (_m_JsonParser__readValuesAs == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__readValuesAs, valueType); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__readValuesAs1 = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__readValuesAs1(jobject self_, jobject valueTypeRef) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_JsonParser, &_m_JsonParser__readValuesAs1, "readValuesAs", - "(Lcom/fasterxml/jackson/core/type/TypeReference;)Ljava/util/Iterator;"); - if (_m_JsonParser__readValuesAs1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_JsonParser__readValuesAs1, valueTypeRef); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonParser__readValueAsTree = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonParser__readValueAsTree(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonParser, &_m_JsonParser__readValueAsTree, "readValueAsTree", - "()Lcom/fasterxml/jackson/core/TreeNode;"); - if (_m_JsonParser__readValueAsTree == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, - _m_JsonParser__readValueAsTree); - return to_global_ref_result(_result); -} - -jfieldID _f_JsonParser__DEFAULT_READ_CAPABILITIES = NULL; -FFI_PLUGIN_EXPORT -JniResult get_JsonParser__DEFAULT_READ_CAPABILITIES() { - load_env(); - load_class_global_ref(&_c_JsonParser, - "com/fasterxml/jackson/core/JsonParser"); - if (_c_JsonParser == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_JsonParser, &_f_JsonParser__DEFAULT_READ_CAPABILITIES, - "DEFAULT_READ_CAPABILITIES", - "Lcom/fasterxml/jackson/core/util/JacksonFeatureSet;"); - jobject _result = (*jniEnv)->GetStaticObjectField( - jniEnv, _c_JsonParser, _f_JsonParser__DEFAULT_READ_CAPABILITIES); - return to_global_ref_result(_result); -} - -// com.fasterxml.jackson.core.JsonToken -jclass _c_JsonToken = NULL; - -jmethodID _m_JsonToken__values = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonToken__values() { - load_env(); - load_class_global_ref(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken"); - if (_c_JsonToken == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_JsonToken, &_m_JsonToken__values, "values", - "()[Lcom/fasterxml/jackson/core/JsonToken;"); - if (_m_JsonToken__values == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_JsonToken, - _m_JsonToken__values); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonToken__valueOf = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonToken__valueOf(jobject name) { - load_env(); - load_class_global_ref(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken"); - if (_c_JsonToken == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_JsonToken, &_m_JsonToken__valueOf, "valueOf", - "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonToken;"); - if (_m_JsonToken__valueOf == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_JsonToken, _m_JsonToken__valueOf, name); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonToken__id = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonToken__id(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken"); - if (_c_JsonToken == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonToken, &_m_JsonToken__id, "id", "()I"); - if (_m_JsonToken__id == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonToken__id); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonToken__asString = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonToken__asString(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken"); - if (_c_JsonToken == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonToken, &_m_JsonToken__asString, "asString", - "()Ljava/lang/String;"); - if (_m_JsonToken__asString == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonToken__asString); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonToken__asCharArray = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonToken__asCharArray(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken"); - if (_c_JsonToken == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonToken, &_m_JsonToken__asCharArray, "asCharArray", "()[C"); - if (_m_JsonToken__asCharArray == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonToken__asCharArray); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonToken__asByteArray = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonToken__asByteArray(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken"); - if (_c_JsonToken == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonToken, &_m_JsonToken__asByteArray, "asByteArray", "()[B"); - if (_m_JsonToken__asByteArray == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonToken__asByteArray); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonToken__isNumeric = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonToken__isNumeric(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken"); - if (_c_JsonToken == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonToken, &_m_JsonToken__isNumeric, "isNumeric", "()Z"); - if (_m_JsonToken__isNumeric == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = - (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonToken__isNumeric); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonToken__isStructStart = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonToken__isStructStart(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken"); - if (_c_JsonToken == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonToken, &_m_JsonToken__isStructStart, "isStructStart", - "()Z"); - if (_m_JsonToken__isStructStart == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = - (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonToken__isStructStart); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonToken__isStructEnd = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonToken__isStructEnd(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken"); - if (_c_JsonToken == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonToken, &_m_JsonToken__isStructEnd, "isStructEnd", "()Z"); - if (_m_JsonToken__isStructEnd == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = - (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonToken__isStructEnd); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonToken__isScalarValue = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonToken__isScalarValue(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken"); - if (_c_JsonToken == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonToken, &_m_JsonToken__isScalarValue, "isScalarValue", - "()Z"); - if (_m_JsonToken__isScalarValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = - (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonToken__isScalarValue); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_JsonToken__isBoolean = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonToken__isBoolean(jobject self_) { - load_env(); - load_class_global_ref(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken"); - if (_c_JsonToken == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_JsonToken, &_m_JsonToken__isBoolean, "isBoolean", "()Z"); - if (_m_JsonToken__isBoolean == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = - (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonToken__isBoolean); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/c_based/dart_bindings/_init.dart b/pkgs/jnigen/test/jackson_core_test/third_party/c_based/dart_bindings/_init.dart deleted file mode 100644 index 8018e7d3cd..0000000000 --- a/pkgs/jnigen/test/jackson_core_test/third_party/c_based/dart_bindings/_init.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Generated from jackson-core which is licensed under the Apache License 2.0. -// The following copyright from the original authors applies. -// See https://github.com/FasterXML/jackson-core/blob/2.14/LICENSE -// -// Copyright (c) 2007 - The Jackson Project Authors -// Licensed under the Apache License, Version 2.0 (the "License") -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; - -// Auto-generated initialization code. - -final ffi.Pointer Function(String sym) jniLookup = - ProtectedJniExtensions.initGeneratedLibrary("jackson_core"); diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/c_based/dart_bindings/com/fasterxml/jackson/core/JsonFactory.dart b/pkgs/jnigen/test/jackson_core_test/third_party/c_based/dart_bindings/com/fasterxml/jackson/core/JsonFactory.dart deleted file mode 100644 index de3f0e17d6..0000000000 --- a/pkgs/jnigen/test/jackson_core_test/third_party/c_based/dart_bindings/com/fasterxml/jackson/core/JsonFactory.dart +++ /dev/null @@ -1,2013 +0,0 @@ -// Generated from jackson-core which is licensed under the Apache License 2.0. -// The following copyright from the original authors applies. -// See https://github.com/FasterXML/jackson-core/blob/2.14/LICENSE -// -// Copyright (c) 2007 - The Jackson Project Authors -// Licensed under the Apache License, Version 2.0 (the "License") -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Autogenerated by jnigen. DO NOT EDIT! - -// ignore_for_file: annotate_overrides -// ignore_for_file: camel_case_extensions -// ignore_for_file: camel_case_types -// ignore_for_file: constant_identifier_names -// ignore_for_file: doc_directive_unknown -// ignore_for_file: file_names -// ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: no_leading_underscores_for_local_identifiers -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: overridden_fields -// ignore_for_file: unnecessary_cast -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// ignore_for_file: unused_import -// ignore_for_file: unused_local_variable -// ignore_for_file: unused_shown_name -// ignore_for_file: use_super_parameters - -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; - -import "JsonParser.dart" as jsonparser_; -import "../../../../_init.dart"; - -/// from: com.fasterxml.jackson.core.JsonFactory$Feature -/// -/// Enumeration that defines all on/off features that can only be -/// changed for JsonFactory. -class JsonFactory_Feature extends jni.JObject { - @override - late final jni.JObjType $type = type; - - JsonFactory_Feature.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $JsonFactory_FeatureType(); - static final _values = - jniLookup>( - "JsonFactory_Feature__values") - .asFunction(); - - /// from: static public com.fasterxml.jackson.core.JsonFactory.Feature[] values() - /// The returned object must be released after use, by calling the [release] method. - static jni.JArray values() { - return _values().object(const jni.JArrayType($JsonFactory_FeatureType())); - } - - static final _valueOf = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory_Feature__valueOf") - .asFunction)>(); - - /// from: static public com.fasterxml.jackson.core.JsonFactory.Feature valueOf(java.lang.String name) - /// The returned object must be released after use, by calling the [release] method. - static JsonFactory_Feature valueOf( - jni.JString name, - ) { - return _valueOf(name.reference.pointer) - .object(const $JsonFactory_FeatureType()); - } - - static final _collectDefaults = - jniLookup>( - "JsonFactory_Feature__collectDefaults") - .asFunction(); - - /// from: static public int collectDefaults() - /// - /// Method that calculates bit set (flags) of all features that - /// are enabled by default. - ///@return Bit field of features enabled by default - static int collectDefaults() { - return _collectDefaults().integer; - } - - static final _enabledByDefault = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory_Feature__enabledByDefault") - .asFunction)>(); - - /// from: public boolean enabledByDefault() - bool enabledByDefault() { - return _enabledByDefault(reference.pointer).boolean; - } - - static final _enabledIn = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Int32)>>("JsonFactory_Feature__enabledIn") - .asFunction, int)>(); - - /// from: public boolean enabledIn(int flags) - bool enabledIn( - int flags, - ) { - return _enabledIn(reference.pointer, flags).boolean; - } - - static final _getMask = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory_Feature__getMask") - .asFunction)>(); - - /// from: public int getMask() - int getMask() { - return _getMask(reference.pointer).integer; - } -} - -final class $JsonFactory_FeatureType extends jni.JObjType { - const $JsonFactory_FeatureType(); - - @override - String get signature => r"Lcom/fasterxml/jackson/core/JsonFactory$Feature;"; - - @override - JsonFactory_Feature fromReference(jni.JReference reference) => - JsonFactory_Feature.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($JsonFactory_FeatureType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($JsonFactory_FeatureType) && - other is $JsonFactory_FeatureType; - } -} - -/// from: com.fasterxml.jackson.core.JsonFactory -/// -/// The main factory class of Jackson package, used to configure and -/// construct reader (aka parser, JsonParser) -/// and writer (aka generator, JsonGenerator) -/// instances. -/// -/// Factory instances are thread-safe and reusable after configuration -/// (if any). Typically applications and services use only a single -/// globally shared factory instance, unless they need differently -/// configured factories. Factory reuse is important if efficiency matters; -/// most recycling of expensive construct is done on per-factory basis. -/// -/// Creation of a factory instance is a light-weight operation, -/// and since there is no need for pluggable alternative implementations -/// (as there is no "standard" JSON processor API to implement), -/// the default constructor is used for constructing factory -/// instances. -///@author Tatu Saloranta -class JsonFactory extends jni.JObject { - @override - late final jni.JObjType $type = type; - - JsonFactory.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $JsonFactoryType(); - static final _get_FORMAT_NAME_JSON = - jniLookup>( - "get_JsonFactory__FORMAT_NAME_JSON") - .asFunction(); - - /// from: static public final java.lang.String FORMAT_NAME_JSON - /// The returned object must be released after use, by calling the [release] method. - /// - /// Name used to identify JSON format - /// (and returned by \#getFormatName() - static jni.JString get FORMAT_NAME_JSON => - _get_FORMAT_NAME_JSON().object(const jni.JStringType()); - - static final _get_DEFAULT_FACTORY_FEATURE_FLAGS = - jniLookup>( - "get_JsonFactory__DEFAULT_FACTORY_FEATURE_FLAGS") - .asFunction(); - - /// from: static protected final int DEFAULT_FACTORY_FEATURE_FLAGS - /// - /// Bitfield (set of flags) of all factory features that are enabled by default. - static int get DEFAULT_FACTORY_FEATURE_FLAGS => - _get_DEFAULT_FACTORY_FEATURE_FLAGS().integer; - - static final _get_DEFAULT_PARSER_FEATURE_FLAGS = - jniLookup>( - "get_JsonFactory__DEFAULT_PARSER_FEATURE_FLAGS") - .asFunction(); - - /// from: static protected final int DEFAULT_PARSER_FEATURE_FLAGS - /// - /// Bitfield (set of flags) of all parser features that are enabled - /// by default. - static int get DEFAULT_PARSER_FEATURE_FLAGS => - _get_DEFAULT_PARSER_FEATURE_FLAGS().integer; - - static final _get_DEFAULT_GENERATOR_FEATURE_FLAGS = - jniLookup>( - "get_JsonFactory__DEFAULT_GENERATOR_FEATURE_FLAGS") - .asFunction(); - - /// from: static protected final int DEFAULT_GENERATOR_FEATURE_FLAGS - /// - /// Bitfield (set of flags) of all generator features that are enabled - /// by default. - static int get DEFAULT_GENERATOR_FEATURE_FLAGS => - _get_DEFAULT_GENERATOR_FEATURE_FLAGS().integer; - - static final _get_DEFAULT_ROOT_VALUE_SEPARATOR = - jniLookup>( - "get_JsonFactory__DEFAULT_ROOT_VALUE_SEPARATOR") - .asFunction(); - - /// from: static public final com.fasterxml.jackson.core.SerializableString DEFAULT_ROOT_VALUE_SEPARATOR - /// The returned object must be released after use, by calling the [release] method. - static jni.JObject get DEFAULT_ROOT_VALUE_SEPARATOR => - _get_DEFAULT_ROOT_VALUE_SEPARATOR().object(const jni.JObjectType()); - - static final _new0 = jniLookup>( - "JsonFactory__new0") - .asFunction(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - /// - /// Default constructor used to create factory instances. - /// Creation of a factory instance is a light-weight operation, - /// but it is still a good idea to reuse limited number of - /// factory instances (and quite often just a single instance): - /// factories are used as context for storing some reused - /// processing objects (such as symbol tables parsers use) - /// and this reuse only works within context of a single - /// factory instance. - factory JsonFactory() { - return JsonFactory.fromReference(_new0().reference); - } - - static final _new1 = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__new1") - .asFunction)>(); - - /// from: public void (com.fasterxml.jackson.core.ObjectCodec oc) - /// The returned object must be released after use, by calling the [release] method. - factory JsonFactory.new1( - jni.JObject oc, - ) { - return JsonFactory.fromReference(_new1(oc.reference.pointer).reference); - } - - static final _new2 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__new2") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: protected void (com.fasterxml.jackson.core.JsonFactory src, com.fasterxml.jackson.core.ObjectCodec codec) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Constructor used when copy()ing a factory instance. - ///@param src Original factory to copy settings from - ///@param codec Databinding-level codec to use, if any - ///@since 2.2.1 - factory JsonFactory.new2( - JsonFactory src, - jni.JObject codec, - ) { - return JsonFactory.fromReference( - _new2(src.reference.pointer, codec.reference.pointer).reference); - } - - static final _new3 = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__new3") - .asFunction)>(); - - /// from: public void (com.fasterxml.jackson.core.JsonFactoryBuilder b) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Constructor used by JsonFactoryBuilder for instantiation. - ///@param b Builder that contains settings to use - ///@since 2.10 - factory JsonFactory.new3( - jni.JObject b, - ) { - return JsonFactory.fromReference(_new3(b.reference.pointer).reference); - } - - static final _new4 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Uint8)>>("JsonFactory__new4") - .asFunction, int)>(); - - /// from: protected void (com.fasterxml.jackson.core.TSFBuilder b, boolean bogus) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Constructor for subtypes; needed to work around the fact that before 3.0, - /// this factory has cumbersome dual role as generic type as well as actual - /// implementation for json. - ///@param b Builder that contains settings to use - ///@param bogus Argument only needed to separate constructor signature; ignored - factory JsonFactory.new4( - jni.JObject b, - bool bogus, - ) { - return JsonFactory.fromReference( - _new4(b.reference.pointer, bogus ? 1 : 0).reference); - } - - static final _rebuild = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__rebuild") - .asFunction)>(); - - /// from: public com.fasterxml.jackson.core.TSFBuilder rebuild() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method that allows construction of differently configured factory, starting - /// with settings of this factory. - ///@return Builder instance to use - ///@since 2.10 - jni.JObject rebuild() { - return _rebuild(reference.pointer).object(const jni.JObjectType()); - } - - static final _builder = - jniLookup>( - "JsonFactory__builder") - .asFunction(); - - /// from: static public com.fasterxml.jackson.core.TSFBuilder builder() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Main factory method to use for constructing JsonFactory instances with - /// different configuration: creates and returns a builder for collecting configuration - /// settings; instance created by calling {@code build()} after all configuration - /// set. - /// - /// NOTE: signature unfortunately does not expose true implementation type; this - /// will be fixed in 3.0. - ///@return Builder instance to use - static jni.JObject builder() { - return _builder().object(const jni.JObjectType()); - } - - static final _copy = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__copy") - .asFunction)>(); - - /// from: public com.fasterxml.jackson.core.JsonFactory copy() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing a new JsonFactory that has - /// the same settings as this instance, but is otherwise - /// independent (i.e. nothing is actually shared, symbol tables - /// are separate). - /// Note that ObjectCodec reference is not copied but is - /// set to null; caller typically needs to set it after calling - /// this method. Reason for this is that the codec is used for - /// callbacks, and assumption is that there is strict 1-to-1 - /// mapping between codec, factory. Caller has to, then, explicitly - /// set codec after making the copy. - ///@return Copy of this factory instance - ///@since 2.1 - JsonFactory copy() { - return _copy(reference.pointer).object(const $JsonFactoryType()); - } - - static final _readResolve = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__readResolve") - .asFunction)>(); - - /// from: protected java.lang.Object readResolve() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method that we need to override to actually make restoration go - /// through constructors etc: needed to allow JDK serializability of - /// factory instances. - /// - /// Note: must be overridden by sub-classes as well. - ///@return Newly constructed instance - jni.JObject readResolve() { - return _readResolve(reference.pointer).object(const jni.JObjectType()); - } - - static final _requiresPropertyOrdering = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__requiresPropertyOrdering") - .asFunction)>(); - - /// from: public boolean requiresPropertyOrdering() - /// - /// Introspection method that higher-level functionality may call - /// to see whether underlying data format requires a stable ordering - /// of object properties or not. - /// This is usually used for determining - /// whether to force a stable ordering (like alphabetic ordering by name) - /// if no ordering if explicitly specified. - /// - /// Default implementation returns false as JSON does NOT - /// require stable ordering. Formats that require ordering include positional - /// textual formats like CSV, and schema-based binary formats - /// like Avro. - ///@return Whether format supported by this factory - /// requires Object properties to be ordered. - ///@since 2.3 - bool requiresPropertyOrdering() { - return _requiresPropertyOrdering(reference.pointer).boolean; - } - - static final _canHandleBinaryNatively = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__canHandleBinaryNatively") - .asFunction)>(); - - /// from: public boolean canHandleBinaryNatively() - /// - /// Introspection method that higher-level functionality may call - /// to see whether underlying data format can read and write binary - /// data natively; that is, embeded it as-is without using encodings - /// such as Base64. - /// - /// Default implementation returns false as JSON does not - /// support native access: all binary content must use Base64 encoding. - /// Most binary formats (like Smile and Avro) support native binary content. - ///@return Whether format supported by this factory - /// supports native binary content - ///@since 2.3 - bool canHandleBinaryNatively() { - return _canHandleBinaryNatively(reference.pointer).boolean; - } - - static final _canUseCharArrays = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__canUseCharArrays") - .asFunction)>(); - - /// from: public boolean canUseCharArrays() - /// - /// Introspection method that can be used by base factory to check - /// whether access using char[] is something that actual - /// parser implementations can take advantage of, over having to - /// use java.io.Reader. Sub-types are expected to override - /// definition; default implementation (suitable for JSON) alleges - /// that optimization are possible; and thereby is likely to try - /// to access java.lang.String content by first copying it into - /// recyclable intermediate buffer. - ///@return Whether access to decoded textual content can be efficiently - /// accessed using parser method {@code getTextCharacters()}. - ///@since 2.4 - bool canUseCharArrays() { - return _canUseCharArrays(reference.pointer).boolean; - } - - static final _canParseAsync = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__canParseAsync") - .asFunction)>(); - - /// from: public boolean canParseAsync() - /// - /// Introspection method that can be used to check whether this - /// factory can create non-blocking parsers: parsers that do not - /// use blocking I/O abstractions but instead use a - /// com.fasterxml.jackson.core.async.NonBlockingInputFeeder. - ///@return Whether this factory supports non-blocking ("async") parsing or - /// not (and consequently whether {@code createNonBlockingXxx()} method(s) work) - ///@since 2.9 - bool canParseAsync() { - return _canParseAsync(reference.pointer).boolean; - } - - static final _getFormatReadFeatureType = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__getFormatReadFeatureType") - .asFunction)>(); - - /// from: public java.lang.Class getFormatReadFeatureType() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject getFormatReadFeatureType() { - return _getFormatReadFeatureType(reference.pointer) - .object(const jni.JObjectType()); - } - - static final _getFormatWriteFeatureType = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__getFormatWriteFeatureType") - .asFunction)>(); - - /// from: public java.lang.Class getFormatWriteFeatureType() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject getFormatWriteFeatureType() { - return _getFormatWriteFeatureType(reference.pointer) - .object(const jni.JObjectType()); - } - - static final _canUseSchema = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__canUseSchema") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public boolean canUseSchema(com.fasterxml.jackson.core.FormatSchema schema) - /// - /// Method that can be used to quickly check whether given schema - /// is something that parsers and/or generators constructed by this - /// factory could use. Note that this means possible use, at the level - /// of data format (i.e. schema is for same data format as parsers and - /// generators this factory constructs); individual schema instances - /// may have further usage restrictions. - ///@param schema Schema instance to check - ///@return Whether parsers and generators constructed by this factory - /// can use specified format schema instance - bool canUseSchema( - jni.JObject schema, - ) { - return _canUseSchema(reference.pointer, schema.reference.pointer).boolean; - } - - static final _getFormatName = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__getFormatName") - .asFunction)>(); - - /// from: public java.lang.String getFormatName() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method that returns short textual id identifying format - /// this factory supports. - /// - /// Note: sub-classes should override this method; default - /// implementation will return null for all sub-classes - ///@return Name of the format handled by parsers, generators this factory creates - jni.JString getFormatName() { - return _getFormatName(reference.pointer).object(const jni.JStringType()); - } - - static final _hasFormat = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__hasFormat") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.format.MatchStrength hasFormat(com.fasterxml.jackson.core.format.InputAccessor acc) - /// The returned object must be released after use, by calling the [release] method. - jni.JObject hasFormat( - jni.JObject acc, - ) { - return _hasFormat(reference.pointer, acc.reference.pointer) - .object(const jni.JObjectType()); - } - - static final _requiresCustomCodec = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__requiresCustomCodec") - .asFunction)>(); - - /// from: public boolean requiresCustomCodec() - /// - /// Method that can be called to determine if a custom - /// ObjectCodec is needed for binding data parsed - /// using JsonParser constructed by this factory - /// (which typically also implies the same for serialization - /// with JsonGenerator). - ///@return True if custom codec is needed with parsers and - /// generators created by this factory; false if a general - /// ObjectCodec is enough - ///@since 2.1 - bool requiresCustomCodec() { - return _requiresCustomCodec(reference.pointer).boolean; - } - - static final _hasJSONFormat = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__hasJSONFormat") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: protected com.fasterxml.jackson.core.format.MatchStrength hasJSONFormat(com.fasterxml.jackson.core.format.InputAccessor acc) - /// The returned object must be released after use, by calling the [release] method. - jni.JObject hasJSONFormat( - jni.JObject acc, - ) { - return _hasJSONFormat(reference.pointer, acc.reference.pointer) - .object(const jni.JObjectType()); - } - - static final _version = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__version") - .asFunction)>(); - - /// from: public com.fasterxml.jackson.core.Version version() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject version() { - return _version(reference.pointer).object(const jni.JObjectType()); - } - - static final _configure = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer, ffi.Uint8)>>("JsonFactory__configure") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer, int)>(); - - /// from: public final com.fasterxml.jackson.core.JsonFactory configure(com.fasterxml.jackson.core.JsonFactory.Feature f, boolean state) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for enabling or disabling specified parser feature - /// (check JsonParser.Feature for list of features) - ///@param f Feature to enable/disable - ///@param state Whether to enable or disable the feature - ///@return This factory instance (to allow call chaining) - ///@deprecated since 2.10 use JsonFactoryBuilder\#configure(JsonFactory.Feature, boolean) instead - JsonFactory configure( - JsonFactory_Feature f, - bool state, - ) { - return _configure(reference.pointer, f.reference.pointer, state ? 1 : 0) - .object(const $JsonFactoryType()); - } - - static final _enable = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__enable") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonFactory enable(com.fasterxml.jackson.core.JsonFactory.Feature f) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for enabling specified parser feature - /// (check JsonFactory.Feature for list of features) - ///@param f Feature to enable - ///@return This factory instance (to allow call chaining) - ///@deprecated since 2.10 use JsonFactoryBuilder\#configure(JsonFactory.Feature, boolean) instead - JsonFactory enable( - JsonFactory_Feature f, - ) { - return _enable(reference.pointer, f.reference.pointer) - .object(const $JsonFactoryType()); - } - - static final _disable = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__disable") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonFactory disable(com.fasterxml.jackson.core.JsonFactory.Feature f) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for disabling specified parser features - /// (check JsonFactory.Feature for list of features) - ///@param f Feature to disable - ///@return This factory instance (to allow call chaining) - ///@deprecated since 2.10 use JsonFactoryBuilder\#configure(JsonFactory.Feature, boolean) instead - JsonFactory disable( - JsonFactory_Feature f, - ) { - return _disable(reference.pointer, f.reference.pointer) - .object(const $JsonFactoryType()); - } - - static final _isEnabled = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__isEnabled") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final boolean isEnabled(com.fasterxml.jackson.core.JsonFactory.Feature f) - /// - /// Checked whether specified parser feature is enabled. - ///@param f Feature to check - ///@return True if the specified feature is enabled - bool isEnabled( - JsonFactory_Feature f, - ) { - return _isEnabled(reference.pointer, f.reference.pointer).boolean; - } - - static final _getParserFeatures = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__getParserFeatures") - .asFunction)>(); - - /// from: public final int getParserFeatures() - int getParserFeatures() { - return _getParserFeatures(reference.pointer).integer; - } - - static final _getGeneratorFeatures = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__getGeneratorFeatures") - .asFunction)>(); - - /// from: public final int getGeneratorFeatures() - int getGeneratorFeatures() { - return _getGeneratorFeatures(reference.pointer).integer; - } - - static final _getFormatParserFeatures = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__getFormatParserFeatures") - .asFunction)>(); - - /// from: public int getFormatParserFeatures() - int getFormatParserFeatures() { - return _getFormatParserFeatures(reference.pointer).integer; - } - - static final _getFormatGeneratorFeatures = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__getFormatGeneratorFeatures") - .asFunction)>(); - - /// from: public int getFormatGeneratorFeatures() - int getFormatGeneratorFeatures() { - return _getFormatGeneratorFeatures(reference.pointer).integer; - } - - static final _configure1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer, ffi.Uint8)>>("JsonFactory__configure1") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer, int)>(); - - /// from: public final com.fasterxml.jackson.core.JsonFactory configure(com.fasterxml.jackson.core.JsonParser.Feature f, boolean state) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for enabling or disabling specified parser feature - /// (check JsonParser.Feature for list of features) - ///@param f Feature to enable/disable - ///@param state Whether to enable or disable the feature - ///@return This factory instance (to allow call chaining) - JsonFactory configure1( - jsonparser_.JsonParser_Feature f, - bool state, - ) { - return _configure1(reference.pointer, f.reference.pointer, state ? 1 : 0) - .object(const $JsonFactoryType()); - } - - static final _enable1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__enable1") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonFactory enable(com.fasterxml.jackson.core.JsonParser.Feature f) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for enabling specified parser feature - /// (check JsonParser.Feature for list of features) - ///@param f Feature to enable - ///@return This factory instance (to allow call chaining) - JsonFactory enable1( - jsonparser_.JsonParser_Feature f, - ) { - return _enable1(reference.pointer, f.reference.pointer) - .object(const $JsonFactoryType()); - } - - static final _disable1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__disable1") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonFactory disable(com.fasterxml.jackson.core.JsonParser.Feature f) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for disabling specified parser features - /// (check JsonParser.Feature for list of features) - ///@param f Feature to disable - ///@return This factory instance (to allow call chaining) - JsonFactory disable1( - jsonparser_.JsonParser_Feature f, - ) { - return _disable1(reference.pointer, f.reference.pointer) - .object(const $JsonFactoryType()); - } - - static final _isEnabled1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__isEnabled1") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final boolean isEnabled(com.fasterxml.jackson.core.JsonParser.Feature f) - /// - /// Method for checking if the specified parser feature is enabled. - ///@param f Feature to check - ///@return True if specified feature is enabled - bool isEnabled1( - jsonparser_.JsonParser_Feature f, - ) { - return _isEnabled1(reference.pointer, f.reference.pointer).boolean; - } - - static final _isEnabled2 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__isEnabled2") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final boolean isEnabled(com.fasterxml.jackson.core.StreamReadFeature f) - /// - /// Method for checking if the specified stream read feature is enabled. - ///@param f Feature to check - ///@return True if specified feature is enabled - ///@since 2.10 - bool isEnabled2( - jni.JObject f, - ) { - return _isEnabled2(reference.pointer, f.reference.pointer).boolean; - } - - static final _getInputDecorator = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__getInputDecorator") - .asFunction)>(); - - /// from: public com.fasterxml.jackson.core.io.InputDecorator getInputDecorator() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for getting currently configured input decorator (if any; - /// there is no default decorator). - ///@return InputDecorator configured, if any - jni.JObject getInputDecorator() { - return _getInputDecorator(reference.pointer) - .object(const jni.JObjectType()); - } - - static final _setInputDecorator = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__setInputDecorator") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonFactory setInputDecorator(com.fasterxml.jackson.core.io.InputDecorator d) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for overriding currently configured input decorator - ///@param d Decorator to configure for this factory, if any ({@code null} if none) - ///@return This factory instance (to allow call chaining) - ///@deprecated Since 2.10 use JsonFactoryBuilder\#inputDecorator(InputDecorator) instead - JsonFactory setInputDecorator( - jni.JObject d, - ) { - return _setInputDecorator(reference.pointer, d.reference.pointer) - .object(const $JsonFactoryType()); - } - - static final _configure2 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer, ffi.Uint8)>>("JsonFactory__configure2") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer, int)>(); - - /// from: public final com.fasterxml.jackson.core.JsonFactory configure(com.fasterxml.jackson.core.JsonGenerator.Feature f, boolean state) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for enabling or disabling specified generator feature - /// (check JsonGenerator.Feature for list of features) - ///@param f Feature to enable/disable - ///@param state Whether to enable or disable the feature - ///@return This factory instance (to allow call chaining) - JsonFactory configure2( - jni.JObject f, - bool state, - ) { - return _configure2(reference.pointer, f.reference.pointer, state ? 1 : 0) - .object(const $JsonFactoryType()); - } - - static final _enable2 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__enable2") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonFactory enable(com.fasterxml.jackson.core.JsonGenerator.Feature f) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for enabling specified generator features - /// (check JsonGenerator.Feature for list of features) - ///@param f Feature to enable - ///@return This factory instance (to allow call chaining) - JsonFactory enable2( - jni.JObject f, - ) { - return _enable2(reference.pointer, f.reference.pointer) - .object(const $JsonFactoryType()); - } - - static final _disable2 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__disable2") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonFactory disable(com.fasterxml.jackson.core.JsonGenerator.Feature f) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for disabling specified generator feature - /// (check JsonGenerator.Feature for list of features) - ///@param f Feature to disable - ///@return This factory instance (to allow call chaining) - JsonFactory disable2( - jni.JObject f, - ) { - return _disable2(reference.pointer, f.reference.pointer) - .object(const $JsonFactoryType()); - } - - static final _isEnabled3 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__isEnabled3") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final boolean isEnabled(com.fasterxml.jackson.core.JsonGenerator.Feature f) - /// - /// Check whether specified generator feature is enabled. - ///@param f Feature to check - ///@return Whether specified feature is enabled - bool isEnabled3( - jni.JObject f, - ) { - return _isEnabled3(reference.pointer, f.reference.pointer).boolean; - } - - static final _isEnabled4 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__isEnabled4") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final boolean isEnabled(com.fasterxml.jackson.core.StreamWriteFeature f) - /// - /// Check whether specified stream write feature is enabled. - ///@param f Feature to check - ///@return Whether specified feature is enabled - ///@since 2.10 - bool isEnabled4( - jni.JObject f, - ) { - return _isEnabled4(reference.pointer, f.reference.pointer).boolean; - } - - static final _getCharacterEscapes = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__getCharacterEscapes") - .asFunction)>(); - - /// from: public com.fasterxml.jackson.core.io.CharacterEscapes getCharacterEscapes() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for accessing custom escapes factory uses for JsonGenerators - /// it creates. - ///@return Configured {@code CharacterEscapes}, if any; {@code null} if none - jni.JObject getCharacterEscapes() { - return _getCharacterEscapes(reference.pointer) - .object(const jni.JObjectType()); - } - - static final _setCharacterEscapes = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__setCharacterEscapes") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonFactory setCharacterEscapes(com.fasterxml.jackson.core.io.CharacterEscapes esc) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for defining custom escapes factory uses for JsonGenerators - /// it creates. - ///@param esc CharaterEscapes to set (or {@code null} for "none") - ///@return This factory instance (to allow call chaining) - JsonFactory setCharacterEscapes( - jni.JObject esc, - ) { - return _setCharacterEscapes(reference.pointer, esc.reference.pointer) - .object(const $JsonFactoryType()); - } - - static final _getOutputDecorator = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__getOutputDecorator") - .asFunction)>(); - - /// from: public com.fasterxml.jackson.core.io.OutputDecorator getOutputDecorator() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for getting currently configured output decorator (if any; - /// there is no default decorator). - ///@return OutputDecorator configured for generators factory creates, if any; - /// {@code null} if none. - jni.JObject getOutputDecorator() { - return _getOutputDecorator(reference.pointer) - .object(const jni.JObjectType()); - } - - static final _setOutputDecorator = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__setOutputDecorator") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonFactory setOutputDecorator(com.fasterxml.jackson.core.io.OutputDecorator d) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for overriding currently configured output decorator - ///@return This factory instance (to allow call chaining) - ///@param d Output decorator to use, if any - ///@deprecated Since 2.10 use JsonFactoryBuilder\#outputDecorator(OutputDecorator) instead - JsonFactory setOutputDecorator( - jni.JObject d, - ) { - return _setOutputDecorator(reference.pointer, d.reference.pointer) - .object(const $JsonFactoryType()); - } - - static final _setRootValueSeparator = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__setRootValueSeparator") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonFactory setRootValueSeparator(java.lang.String sep) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method that allows overriding String used for separating root-level - /// JSON values (default is single space character) - ///@param sep Separator to use, if any; null means that no separator is - /// automatically added - ///@return This factory instance (to allow call chaining) - JsonFactory setRootValueSeparator( - jni.JString sep, - ) { - return _setRootValueSeparator(reference.pointer, sep.reference.pointer) - .object(const $JsonFactoryType()); - } - - static final _getRootValueSeparator = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__getRootValueSeparator") - .asFunction)>(); - - /// from: public java.lang.String getRootValueSeparator() - /// The returned object must be released after use, by calling the [release] method. - /// - /// @return Root value separator configured, if any - jni.JString getRootValueSeparator() { - return _getRootValueSeparator(reference.pointer) - .object(const jni.JStringType()); - } - - static final _setCodec = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__setCodec") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonFactory setCodec(com.fasterxml.jackson.core.ObjectCodec oc) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for associating a ObjectCodec (typically - /// a com.fasterxml.jackson.databind.ObjectMapper) - /// with this factory (and more importantly, parsers and generators - /// it constructs). This is needed to use data-binding methods - /// of JsonParser and JsonGenerator instances. - ///@param oc Codec to use - ///@return This factory instance (to allow call chaining) - JsonFactory setCodec( - jni.JObject oc, - ) { - return _setCodec(reference.pointer, oc.reference.pointer) - .object(const $JsonFactoryType()); - } - - static final _getCodec = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__getCodec") - .asFunction)>(); - - /// from: public com.fasterxml.jackson.core.ObjectCodec getCodec() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject getCodec() { - return _getCodec(reference.pointer).object(const jni.JObjectType()); - } - - static final _createParser = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createParser") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser createParser(java.io.File f) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing JSON parser instance to parse - /// contents of specified file. - /// - /// - /// Encoding is auto-detected from contents according to JSON - /// specification recommended mechanism. Json specification - /// supports only UTF-8, UTF-16 and UTF-32 as valid encodings, - /// so auto-detection implemented only for this charsets. - /// For other charsets use \#createParser(java.io.Reader). - /// - /// - /// Underlying input stream (needed for reading contents) - /// will be __owned__ (and managed, i.e. closed as need be) by - /// the parser, since caller has no access to it. - ///@param f File that contains JSON content to parse - ///@since 2.1 - jsonparser_.JsonParser createParser( - jni.JObject f, - ) { - return _createParser(reference.pointer, f.reference.pointer) - .object(const jsonparser_.$JsonParserType()); - } - - static final _createParser1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createParser1") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser createParser(java.net.URL url) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing JSON parser instance to parse - /// contents of resource reference by given URL. - /// - /// Encoding is auto-detected from contents according to JSON - /// specification recommended mechanism. Json specification - /// supports only UTF-8, UTF-16 and UTF-32 as valid encodings, - /// so auto-detection implemented only for this charsets. - /// For other charsets use \#createParser(java.io.Reader). - /// - /// Underlying input stream (needed for reading contents) - /// will be __owned__ (and managed, i.e. closed as need be) by - /// the parser, since caller has no access to it. - ///@param url URL pointing to resource that contains JSON content to parse - ///@since 2.1 - jsonparser_.JsonParser createParser1( - jni.JObject url, - ) { - return _createParser1(reference.pointer, url.reference.pointer) - .object(const jsonparser_.$JsonParserType()); - } - - static final _createParser2 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createParser2") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser createParser(java.io.InputStream in) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing JSON parser instance to parse - /// the contents accessed via specified input stream. - /// - /// The input stream will __not be owned__ by - /// the parser, it will still be managed (i.e. closed if - /// end-of-stream is reacher, or parser close method called) - /// if (and only if) com.fasterxml.jackson.core.StreamReadFeature\#AUTO_CLOSE_SOURCE - /// is enabled. - /// - /// - /// Note: no encoding argument is taken since it can always be - /// auto-detected as suggested by JSON RFC. Json specification - /// supports only UTF-8, UTF-16 and UTF-32 as valid encodings, - /// so auto-detection implemented only for this charsets. - /// For other charsets use \#createParser(java.io.Reader). - ///@param in InputStream to use for reading JSON content to parse - ///@since 2.1 - jsonparser_.JsonParser createParser2( - jni.JObject in0, - ) { - return _createParser2(reference.pointer, in0.reference.pointer) - .object(const jsonparser_.$JsonParserType()); - } - - static final _createParser3 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createParser3") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser createParser(java.io.Reader r) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing parser for parsing - /// the contents accessed via specified Reader. - /// - /// The read stream will __not be owned__ by - /// the parser, it will still be managed (i.e. closed if - /// end-of-stream is reacher, or parser close method called) - /// if (and only if) com.fasterxml.jackson.core.StreamReadFeature\#AUTO_CLOSE_SOURCE - /// is enabled. - ///@param r Reader to use for reading JSON content to parse - ///@since 2.1 - jsonparser_.JsonParser createParser3( - jni.JObject r, - ) { - return _createParser3(reference.pointer, r.reference.pointer) - .object(const jsonparser_.$JsonParserType()); - } - - static final _createParser4 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createParser4") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser createParser(byte[] data) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing parser for parsing - /// the contents of given byte array. - ///@since 2.1 - jsonparser_.JsonParser createParser4( - jni.JArray data, - ) { - return _createParser4(reference.pointer, data.reference.pointer) - .object(const jsonparser_.$JsonParserType()); - } - - static final _createParser5 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32)>>("JsonFactory__createParser5") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer, int, int)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser createParser(byte[] data, int offset, int len) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing parser for parsing - /// the contents of given byte array. - ///@param data Buffer that contains data to parse - ///@param offset Offset of the first data byte within buffer - ///@param len Length of contents to parse within buffer - ///@since 2.1 - jsonparser_.JsonParser createParser5( - jni.JArray data, - int offset, - int len, - ) { - return _createParser5( - reference.pointer, data.reference.pointer, offset, len) - .object(const jsonparser_.$JsonParserType()); - } - - static final _createParser6 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createParser6") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser createParser(java.lang.String content) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing parser for parsing - /// contents of given String. - ///@since 2.1 - jsonparser_.JsonParser createParser6( - jni.JString content, - ) { - return _createParser6(reference.pointer, content.reference.pointer) - .object(const jsonparser_.$JsonParserType()); - } - - static final _createParser7 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createParser7") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser createParser(char[] content) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing parser for parsing - /// contents of given char array. - ///@since 2.4 - jsonparser_.JsonParser createParser7( - jni.JArray content, - ) { - return _createParser7(reference.pointer, content.reference.pointer) - .object(const jsonparser_.$JsonParserType()); - } - - static final _createParser8 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32)>>("JsonFactory__createParser8") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer, int, int)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser createParser(char[] content, int offset, int len) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing parser for parsing contents of given char array. - ///@since 2.4 - jsonparser_.JsonParser createParser8( - jni.JArray content, - int offset, - int len, - ) { - return _createParser8( - reference.pointer, content.reference.pointer, offset, len) - .object(const jsonparser_.$JsonParserType()); - } - - static final _createParser9 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createParser9") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser createParser(java.io.DataInput in) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Optional method for constructing parser for reading contents from specified DataInput - /// instance. - /// - /// If this factory does not support DataInput as source, - /// will throw UnsupportedOperationException - ///@since 2.8 - jsonparser_.JsonParser createParser9( - jni.JObject in0, - ) { - return _createParser9(reference.pointer, in0.reference.pointer) - .object(const jsonparser_.$JsonParserType()); - } - - static final _createNonBlockingByteArrayParser = jniLookup< - ffi - .NativeFunction)>>( - "JsonFactory__createNonBlockingByteArrayParser") - .asFunction)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser createNonBlockingByteArrayParser() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Optional method for constructing parser for non-blocking parsing - /// via com.fasterxml.jackson.core.async.ByteArrayFeeder - /// interface (accessed using JsonParser\#getNonBlockingInputFeeder() - /// from constructed instance). - /// - /// If this factory does not support non-blocking parsing (either at all, - /// or from byte array), - /// will throw UnsupportedOperationException. - /// - /// Note that JSON-backed factory only supports parsing of UTF-8 encoded JSON content - /// (and US-ASCII since it is proper subset); other encodings are not supported - /// at this point. - ///@since 2.9 - jsonparser_.JsonParser createNonBlockingByteArrayParser() { - return _createNonBlockingByteArrayParser(reference.pointer) - .object(const jsonparser_.$JsonParserType()); - } - - static final _createGenerator = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createGenerator") - .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonGenerator createGenerator(java.io.OutputStream out, com.fasterxml.jackson.core.JsonEncoding enc) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing JSON generator for writing JSON content - /// using specified output stream. - /// Encoding to use must be specified, and needs to be one of available - /// types (as per JSON specification). - /// - /// Underlying stream __is NOT owned__ by the generator constructed, - /// so that generator will NOT close the output stream when - /// JsonGenerator\#close is called (unless auto-closing - /// feature, - /// com.fasterxml.jackson.core.JsonGenerator.Feature\#AUTO_CLOSE_TARGET - /// is enabled). - /// Using application needs to close it explicitly if this is the case. - /// - /// Note: there are formats that use fixed encoding (like most binary data formats) - /// and that ignore passed in encoding. - ///@param out OutputStream to use for writing JSON content - ///@param enc Character encoding to use - ///@since 2.1 - jni.JObject createGenerator( - jni.JObject out, - jni.JObject enc, - ) { - return _createGenerator( - reference.pointer, out.reference.pointer, enc.reference.pointer) - .object(const jni.JObjectType()); - } - - static final _createGenerator1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createGenerator1") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonGenerator createGenerator(java.io.OutputStream out) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Convenience method for constructing generator that uses default - /// encoding of the format (UTF-8 for JSON and most other data formats). - /// - /// Note: there are formats that use fixed encoding (like most binary data formats). - ///@since 2.1 - jni.JObject createGenerator1( - jni.JObject out, - ) { - return _createGenerator1(reference.pointer, out.reference.pointer) - .object(const jni.JObjectType()); - } - - static final _createGenerator2 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createGenerator2") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonGenerator createGenerator(java.io.Writer w) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing JSON generator for writing JSON content - /// using specified Writer. - /// - /// Underlying stream __is NOT owned__ by the generator constructed, - /// so that generator will NOT close the Reader when - /// JsonGenerator\#close is called (unless auto-closing - /// feature, - /// com.fasterxml.jackson.core.JsonGenerator.Feature\#AUTO_CLOSE_TARGET is enabled). - /// Using application needs to close it explicitly. - ///@since 2.1 - ///@param w Writer to use for writing JSON content - jni.JObject createGenerator2( - jni.JObject w, - ) { - return _createGenerator2(reference.pointer, w.reference.pointer) - .object(const jni.JObjectType()); - } - - static final _createGenerator3 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createGenerator3") - .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonGenerator createGenerator(java.io.File f, com.fasterxml.jackson.core.JsonEncoding enc) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing JSON generator for writing JSON content - /// to specified file, overwriting contents it might have (or creating - /// it if such file does not yet exist). - /// Encoding to use must be specified, and needs to be one of available - /// types (as per JSON specification). - /// - /// Underlying stream __is owned__ by the generator constructed, - /// i.e. generator will handle closing of file when - /// JsonGenerator\#close is called. - ///@param f File to write contents to - ///@param enc Character encoding to use - ///@since 2.1 - jni.JObject createGenerator3( - jni.JObject f, - jni.JObject enc, - ) { - return _createGenerator3( - reference.pointer, f.reference.pointer, enc.reference.pointer) - .object(const jni.JObjectType()); - } - - static final _createGenerator4 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createGenerator4") - .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonGenerator createGenerator(java.io.DataOutput out, com.fasterxml.jackson.core.JsonEncoding enc) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing generator for writing content using specified - /// DataOutput instance. - ///@since 2.8 - jni.JObject createGenerator4( - jni.JObject out, - jni.JObject enc, - ) { - return _createGenerator4( - reference.pointer, out.reference.pointer, enc.reference.pointer) - .object(const jni.JObjectType()); - } - - static final _createGenerator5 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createGenerator5") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonGenerator createGenerator(java.io.DataOutput out) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Convenience method for constructing generator that uses default - /// encoding of the format (UTF-8 for JSON and most other data formats). - /// - /// Note: there are formats that use fixed encoding (like most binary data formats). - ///@since 2.8 - jni.JObject createGenerator5( - jni.JObject out, - ) { - return _createGenerator5(reference.pointer, out.reference.pointer) - .object(const jni.JObjectType()); - } - - static final _createJsonParser = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createJsonParser") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(java.io.File f) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing JSON parser instance to parse - /// contents of specified file. - /// - /// Encoding is auto-detected from contents according to JSON - /// specification recommended mechanism. Json specification - /// supports only UTF-8, UTF-16 and UTF-32 as valid encodings, - /// so auto-detection implemented only for this charsets. - /// For other charsets use \#createParser(java.io.Reader). - /// - /// - /// Underlying input stream (needed for reading contents) - /// will be __owned__ (and managed, i.e. closed as need be) by - /// the parser, since caller has no access to it. - ///@param f File that contains JSON content to parse - ///@return Parser constructed - ///@throws IOException if parser initialization fails due to I/O (read) problem - ///@throws JsonParseException if parser initialization fails due to content decoding problem - ///@deprecated Since 2.2, use \#createParser(File) instead. - jsonparser_.JsonParser createJsonParser( - jni.JObject f, - ) { - return _createJsonParser(reference.pointer, f.reference.pointer) - .object(const jsonparser_.$JsonParserType()); - } - - static final _createJsonParser1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createJsonParser1") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(java.net.URL url) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing JSON parser instance to parse - /// contents of resource reference by given URL. - /// - /// Encoding is auto-detected from contents according to JSON - /// specification recommended mechanism. Json specification - /// supports only UTF-8, UTF-16 and UTF-32 as valid encodings, - /// so auto-detection implemented only for this charsets. - /// For other charsets use \#createParser(java.io.Reader). - /// - /// Underlying input stream (needed for reading contents) - /// will be __owned__ (and managed, i.e. closed as need be) by - /// the parser, since caller has no access to it. - ///@param url URL pointing to resource that contains JSON content to parse - ///@return Parser constructed - ///@throws IOException if parser initialization fails due to I/O (read) problem - ///@throws JsonParseException if parser initialization fails due to content decoding problem - ///@deprecated Since 2.2, use \#createParser(URL) instead. - jsonparser_.JsonParser createJsonParser1( - jni.JObject url, - ) { - return _createJsonParser1(reference.pointer, url.reference.pointer) - .object(const jsonparser_.$JsonParserType()); - } - - static final _createJsonParser2 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createJsonParser2") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(java.io.InputStream in) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing JSON parser instance to parse - /// the contents accessed via specified input stream. - /// - /// The input stream will __not be owned__ by - /// the parser, it will still be managed (i.e. closed if - /// end-of-stream is reacher, or parser close method called) - /// if (and only if) com.fasterxml.jackson.core.JsonParser.Feature\#AUTO_CLOSE_SOURCE - /// is enabled. - /// - /// - /// Note: no encoding argument is taken since it can always be - /// auto-detected as suggested by JSON RFC. Json specification - /// supports only UTF-8, UTF-16 and UTF-32 as valid encodings, - /// so auto-detection implemented only for this charsets. - /// For other charsets use \#createParser(java.io.Reader). - ///@param in InputStream to use for reading JSON content to parse - ///@return Parser constructed - ///@throws IOException if parser initialization fails due to I/O (read) problem - ///@throws JsonParseException if parser initialization fails due to content decoding problem - ///@deprecated Since 2.2, use \#createParser(InputStream) instead. - jsonparser_.JsonParser createJsonParser2( - jni.JObject in0, - ) { - return _createJsonParser2(reference.pointer, in0.reference.pointer) - .object(const jsonparser_.$JsonParserType()); - } - - static final _createJsonParser3 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createJsonParser3") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(java.io.Reader r) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing parser for parsing - /// the contents accessed via specified Reader. - /// - /// The read stream will __not be owned__ by - /// the parser, it will still be managed (i.e. closed if - /// end-of-stream is reacher, or parser close method called) - /// if (and only if) com.fasterxml.jackson.core.JsonParser.Feature\#AUTO_CLOSE_SOURCE - /// is enabled. - ///@param r Reader to use for reading JSON content to parse - ///@return Parser constructed - ///@throws IOException if parser initialization fails due to I/O (read) problem - ///@throws JsonParseException if parser initialization fails due to content decoding problem - ///@deprecated Since 2.2, use \#createParser(Reader) instead. - jsonparser_.JsonParser createJsonParser3( - jni.JObject r, - ) { - return _createJsonParser3(reference.pointer, r.reference.pointer) - .object(const jsonparser_.$JsonParserType()); - } - - static final _createJsonParser4 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createJsonParser4") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(byte[] data) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing parser for parsing the contents of given byte array. - ///@param data Input content to parse - ///@return Parser constructed - ///@throws IOException if parser initialization fails due to I/O (read) problem - ///@throws JsonParseException if parser initialization fails due to content decoding problem - ///@deprecated Since 2.2, use \#createParser(byte[]) instead. - jsonparser_.JsonParser createJsonParser4( - jni.JArray data, - ) { - return _createJsonParser4(reference.pointer, data.reference.pointer) - .object(const jsonparser_.$JsonParserType()); - } - - static final _createJsonParser5 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32)>>("JsonFactory__createJsonParser5") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer, int, int)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(byte[] data, int offset, int len) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing parser for parsing - /// the contents of given byte array. - ///@param data Buffer that contains data to parse - ///@param offset Offset of the first data byte within buffer - ///@param len Length of contents to parse within buffer - ///@return Parser constructed - ///@throws IOException if parser initialization fails due to I/O (read) problem - ///@throws JsonParseException if parser initialization fails due to content decoding problem - ///@deprecated Since 2.2, use \#createParser(byte[],int,int) instead. - jsonparser_.JsonParser createJsonParser5( - jni.JArray data, - int offset, - int len, - ) { - return _createJsonParser5( - reference.pointer, data.reference.pointer, offset, len) - .object(const jsonparser_.$JsonParserType()); - } - - static final _createJsonParser6 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createJsonParser6") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(java.lang.String content) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing parser for parsing - /// contents of given String. - ///@param content Input content to parse - ///@return Parser constructed - ///@throws IOException if parser initialization fails due to I/O (read) problem - ///@throws JsonParseException if parser initialization fails due to content decoding problem - ///@deprecated Since 2.2, use \#createParser(String) instead. - jsonparser_.JsonParser createJsonParser6( - jni.JString content, - ) { - return _createJsonParser6(reference.pointer, content.reference.pointer) - .object(const jsonparser_.$JsonParserType()); - } - - static final _createJsonGenerator = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createJsonGenerator") - .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonGenerator createJsonGenerator(java.io.OutputStream out, com.fasterxml.jackson.core.JsonEncoding enc) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing JSON generator for writing JSON content - /// using specified output stream. - /// Encoding to use must be specified, and needs to be one of available - /// types (as per JSON specification). - /// - /// Underlying stream __is NOT owned__ by the generator constructed, - /// so that generator will NOT close the output stream when - /// JsonGenerator\#close is called (unless auto-closing - /// feature, - /// com.fasterxml.jackson.core.JsonGenerator.Feature\#AUTO_CLOSE_TARGET - /// is enabled). - /// Using application needs to close it explicitly if this is the case. - /// - /// Note: there are formats that use fixed encoding (like most binary data formats) - /// and that ignore passed in encoding. - ///@param out OutputStream to use for writing JSON content - ///@param enc Character encoding to use - ///@return Generator constructed - ///@throws IOException if parser initialization fails due to I/O (write) problem - ///@deprecated Since 2.2, use \#createGenerator(OutputStream, JsonEncoding) instead. - jni.JObject createJsonGenerator( - jni.JObject out, - jni.JObject enc, - ) { - return _createJsonGenerator( - reference.pointer, out.reference.pointer, enc.reference.pointer) - .object(const jni.JObjectType()); - } - - static final _createJsonGenerator1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createJsonGenerator1") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonGenerator createJsonGenerator(java.io.Writer out) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for constructing JSON generator for writing JSON content - /// using specified Writer. - /// - /// Underlying stream __is NOT owned__ by the generator constructed, - /// so that generator will NOT close the Reader when - /// JsonGenerator\#close is called (unless auto-closing - /// feature, - /// com.fasterxml.jackson.core.JsonGenerator.Feature\#AUTO_CLOSE_TARGET is enabled). - /// Using application needs to close it explicitly. - ///@param out Writer to use for writing JSON content - ///@return Generator constructed - ///@throws IOException if parser initialization fails due to I/O (write) problem - ///@deprecated Since 2.2, use \#createGenerator(Writer) instead. - jni.JObject createJsonGenerator1( - jni.JObject out, - ) { - return _createJsonGenerator1(reference.pointer, out.reference.pointer) - .object(const jni.JObjectType()); - } - - static final _createJsonGenerator2 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonFactory__createJsonGenerator2") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonGenerator createJsonGenerator(java.io.OutputStream out) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Convenience method for constructing generator that uses default - /// encoding of the format (UTF-8 for JSON and most other data formats). - /// - /// Note: there are formats that use fixed encoding (like most binary data formats). - ///@param out OutputStream to use for writing JSON content - ///@return Generator constructed - ///@throws IOException if parser initialization fails due to I/O (write) problem - ///@deprecated Since 2.2, use \#createGenerator(OutputStream) instead. - jni.JObject createJsonGenerator2( - jni.JObject out, - ) { - return _createJsonGenerator2(reference.pointer, out.reference.pointer) - .object(const jni.JObjectType()); - } -} - -final class $JsonFactoryType extends jni.JObjType { - const $JsonFactoryType(); - - @override - String get signature => r"Lcom/fasterxml/jackson/core/JsonFactory;"; - - @override - JsonFactory fromReference(jni.JReference reference) => - JsonFactory.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($JsonFactoryType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($JsonFactoryType) && other is $JsonFactoryType; - } -} diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/c_based/dart_bindings/com/fasterxml/jackson/core/JsonParser.dart b/pkgs/jnigen/test/jackson_core_test/third_party/c_based/dart_bindings/com/fasterxml/jackson/core/JsonParser.dart deleted file mode 100644 index 75389bcdd3..0000000000 --- a/pkgs/jnigen/test/jackson_core_test/third_party/c_based/dart_bindings/com/fasterxml/jackson/core/JsonParser.dart +++ /dev/null @@ -1,2853 +0,0 @@ -// Generated from jackson-core which is licensed under the Apache License 2.0. -// The following copyright from the original authors applies. -// See https://github.com/FasterXML/jackson-core/blob/2.14/LICENSE -// -// Copyright (c) 2007 - The Jackson Project Authors -// Licensed under the Apache License, Version 2.0 (the "License") -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Autogenerated by jnigen. DO NOT EDIT! - -// ignore_for_file: annotate_overrides -// ignore_for_file: camel_case_extensions -// ignore_for_file: camel_case_types -// ignore_for_file: constant_identifier_names -// ignore_for_file: doc_directive_unknown -// ignore_for_file: file_names -// ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: no_leading_underscores_for_local_identifiers -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: overridden_fields -// ignore_for_file: unnecessary_cast -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// ignore_for_file: unused_import -// ignore_for_file: unused_local_variable -// ignore_for_file: unused_shown_name -// ignore_for_file: use_super_parameters - -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; - -import "JsonToken.dart" as jsontoken_; -import "../../../../_init.dart"; - -/// from: com.fasterxml.jackson.core.JsonParser$Feature -/// -/// Enumeration that defines all on/off features for parsers. -class JsonParser_Feature extends jni.JObject { - @override - late final jni.JObjType $type = type; - - JsonParser_Feature.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $JsonParser_FeatureType(); - static final _values = - jniLookup>( - "JsonParser_Feature__values") - .asFunction(); - - /// from: static public com.fasterxml.jackson.core.JsonParser.Feature[] values() - /// The returned object must be released after use, by calling the [release] method. - static jni.JArray values() { - return _values().object(const jni.JArrayType($JsonParser_FeatureType())); - } - - static final _valueOf = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser_Feature__valueOf") - .asFunction)>(); - - /// from: static public com.fasterxml.jackson.core.JsonParser.Feature valueOf(java.lang.String name) - /// The returned object must be released after use, by calling the [release] method. - static JsonParser_Feature valueOf( - jni.JString name, - ) { - return _valueOf(name.reference.pointer) - .object(const $JsonParser_FeatureType()); - } - - static final _collectDefaults = - jniLookup>( - "JsonParser_Feature__collectDefaults") - .asFunction(); - - /// from: static public int collectDefaults() - /// - /// Method that calculates bit set (flags) of all features that - /// are enabled by default. - ///@return Bit mask of all features that are enabled by default - static int collectDefaults() { - return _collectDefaults().integer; - } - - static final _enabledByDefault = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser_Feature__enabledByDefault") - .asFunction)>(); - - /// from: public boolean enabledByDefault() - bool enabledByDefault() { - return _enabledByDefault(reference.pointer).boolean; - } - - static final _enabledIn = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Int32)>>("JsonParser_Feature__enabledIn") - .asFunction, int)>(); - - /// from: public boolean enabledIn(int flags) - bool enabledIn( - int flags, - ) { - return _enabledIn(reference.pointer, flags).boolean; - } - - static final _getMask = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser_Feature__getMask") - .asFunction)>(); - - /// from: public int getMask() - int getMask() { - return _getMask(reference.pointer).integer; - } -} - -final class $JsonParser_FeatureType extends jni.JObjType { - const $JsonParser_FeatureType(); - - @override - String get signature => r"Lcom/fasterxml/jackson/core/JsonParser$Feature;"; - - @override - JsonParser_Feature fromReference(jni.JReference reference) => - JsonParser_Feature.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($JsonParser_FeatureType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($JsonParser_FeatureType) && - other is $JsonParser_FeatureType; - } -} - -/// from: com.fasterxml.jackson.core.JsonParser$NumberType -/// -/// Enumeration of possible "native" (optimal) types that can be -/// used for numbers. -class JsonParser_NumberType extends jni.JObject { - @override - late final jni.JObjType $type = type; - - JsonParser_NumberType.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $JsonParser_NumberTypeType(); - static final _values = - jniLookup>( - "JsonParser_NumberType__values") - .asFunction(); - - /// from: static public com.fasterxml.jackson.core.JsonParser.NumberType[] values() - /// The returned object must be released after use, by calling the [release] method. - static jni.JArray values() { - return _values().object(const jni.JArrayType($JsonParser_NumberTypeType())); - } - - static final _valueOf = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser_NumberType__valueOf") - .asFunction)>(); - - /// from: static public com.fasterxml.jackson.core.JsonParser.NumberType valueOf(java.lang.String name) - /// The returned object must be released after use, by calling the [release] method. - static JsonParser_NumberType valueOf( - jni.JString name, - ) { - return _valueOf(name.reference.pointer) - .object(const $JsonParser_NumberTypeType()); - } -} - -final class $JsonParser_NumberTypeType - extends jni.JObjType { - const $JsonParser_NumberTypeType(); - - @override - String get signature => r"Lcom/fasterxml/jackson/core/JsonParser$NumberType;"; - - @override - JsonParser_NumberType fromReference(jni.JReference reference) => - JsonParser_NumberType.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($JsonParser_NumberTypeType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($JsonParser_NumberTypeType) && - other is $JsonParser_NumberTypeType; - } -} - -/// from: com.fasterxml.jackson.core.JsonParser -/// -/// Base class that defines public API for reading JSON content. -/// Instances are created using factory methods of -/// a JsonFactory instance. -///@author Tatu Saloranta -class JsonParser extends jni.JObject { - @override - late final jni.JObjType $type = type; - - JsonParser.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $JsonParserType(); - static final _get_DEFAULT_READ_CAPABILITIES = - jniLookup>( - "get_JsonParser__DEFAULT_READ_CAPABILITIES") - .asFunction(); - - /// from: static protected final com.fasterxml.jackson.core.util.JacksonFeatureSet DEFAULT_READ_CAPABILITIES - /// The returned object must be released after use, by calling the [release] method. - /// - /// Default set of StreamReadCapabilityies that may be used as - /// basis for format-specific readers (or as bogus instance if non-null - /// set needs to be passed). - ///@since 2.12 - static jni.JObject get DEFAULT_READ_CAPABILITIES => - _get_DEFAULT_READ_CAPABILITIES().object(const jni.JObjectType()); - - static final _new0 = jniLookup>( - "JsonParser__new0") - .asFunction(); - - /// from: protected void () - /// The returned object must be released after use, by calling the [release] method. - factory JsonParser() { - return JsonParser.fromReference(_new0().reference); - } - - static final _new1 = - jniLookup>( - "JsonParser__new1") - .asFunction(); - - /// from: protected void (int features) - /// The returned object must be released after use, by calling the [release] method. - factory JsonParser.new1( - int features, - ) { - return JsonParser.fromReference(_new1(features).reference); - } - - static final _getCodec = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getCodec") - .asFunction)>(); - - /// from: public abstract com.fasterxml.jackson.core.ObjectCodec getCodec() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Accessor for ObjectCodec associated with this - /// parser, if any. Codec is used by \#readValueAs(Class) - /// method (and its variants). - ///@return Codec assigned to this parser, if any; {@code null} if none - jni.JObject getCodec() { - return _getCodec(reference.pointer).object(const jni.JObjectType()); - } - - static final _setCodec = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonParser__setCodec") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public abstract void setCodec(com.fasterxml.jackson.core.ObjectCodec oc) - /// - /// Setter that allows defining ObjectCodec associated with this - /// parser, if any. Codec is used by \#readValueAs(Class) - /// method (and its variants). - ///@param oc Codec to assign, if any; {@code null} if none - void setCodec( - jni.JObject oc, - ) { - _setCodec(reference.pointer, oc.reference.pointer).check(); - } - - static final _getInputSource = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getInputSource") - .asFunction)>(); - - /// from: public java.lang.Object getInputSource() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method that can be used to get access to object that is used - /// to access input being parsed; this is usually either - /// InputStream or Reader, depending on what - /// parser was constructed with. - /// Note that returned value may be null in some cases; including - /// case where parser implementation does not want to exposed raw - /// source to caller. - /// In cases where input has been decorated, object returned here - /// is the decorated version; this allows some level of interaction - /// between users of parser and decorator object. - /// - /// In general use of this accessor should be considered as - /// "last effort", i.e. only used if no other mechanism is applicable. - ///@return Input source this parser was configured with - jni.JObject getInputSource() { - return _getInputSource(reference.pointer).object(const jni.JObjectType()); - } - - static final _setRequestPayloadOnError = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "JsonParser__setRequestPayloadOnError") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public void setRequestPayloadOnError(com.fasterxml.jackson.core.util.RequestPayload payload) - /// - /// Sets the payload to be passed if JsonParseException is thrown. - ///@param payload Payload to pass - ///@since 2.8 - void setRequestPayloadOnError( - jni.JObject payload, - ) { - _setRequestPayloadOnError(reference.pointer, payload.reference.pointer) - .check(); - } - - static final _setRequestPayloadOnError1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>( - "JsonParser__setRequestPayloadOnError1") - .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// from: public void setRequestPayloadOnError(byte[] payload, java.lang.String charset) - /// - /// Sets the byte[] request payload and the charset - ///@param payload Payload to pass - ///@param charset Character encoding for (lazily) decoding payload - ///@since 2.8 - void setRequestPayloadOnError1( - jni.JArray payload, - jni.JString charset, - ) { - _setRequestPayloadOnError1(reference.pointer, payload.reference.pointer, - charset.reference.pointer) - .check(); - } - - static final _setRequestPayloadOnError2 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>( - "JsonParser__setRequestPayloadOnError2") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public void setRequestPayloadOnError(java.lang.String payload) - /// - /// Sets the String request payload - ///@param payload Payload to pass - ///@since 2.8 - void setRequestPayloadOnError2( - jni.JString payload, - ) { - _setRequestPayloadOnError2(reference.pointer, payload.reference.pointer) - .check(); - } - - static final _setSchema = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonParser__setSchema") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public void setSchema(com.fasterxml.jackson.core.FormatSchema schema) - /// - /// Method to call to make this parser use specified schema. Method must - /// be called before trying to parse any content, right after parser instance - /// has been created. - /// Note that not all parsers support schemas; and those that do usually only - /// accept specific types of schemas: ones defined for data format parser can read. - /// - /// If parser does not support specified schema, UnsupportedOperationException - /// is thrown. - ///@param schema Schema to use - ///@throws UnsupportedOperationException if parser does not support schema - void setSchema( - jni.JObject schema, - ) { - _setSchema(reference.pointer, schema.reference.pointer).check(); - } - - static final _getSchema = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getSchema") - .asFunction)>(); - - /// from: public com.fasterxml.jackson.core.FormatSchema getSchema() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for accessing Schema that this parser uses, if any. - /// Default implementation returns null. - ///@return Schema in use by this parser, if any; {@code null} if none - ///@since 2.1 - jni.JObject getSchema() { - return _getSchema(reference.pointer).object(const jni.JObjectType()); - } - - static final _canUseSchema = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonParser__canUseSchema") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public boolean canUseSchema(com.fasterxml.jackson.core.FormatSchema schema) - /// - /// Method that can be used to verify that given schema can be used with - /// this parser (using \#setSchema). - ///@param schema Schema to check - ///@return True if this parser can use given schema; false if not - bool canUseSchema( - jni.JObject schema, - ) { - return _canUseSchema(reference.pointer, schema.reference.pointer).boolean; - } - - static final _requiresCustomCodec = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__requiresCustomCodec") - .asFunction)>(); - - /// from: public boolean requiresCustomCodec() - /// - /// Method that can be called to determine if a custom - /// ObjectCodec is needed for binding data parsed - /// using JsonParser constructed by this factory - /// (which typically also implies the same for serialization - /// with JsonGenerator). - ///@return True if format-specific codec is needed with this parser; false if a general - /// ObjectCodec is enough - ///@since 2.1 - bool requiresCustomCodec() { - return _requiresCustomCodec(reference.pointer).boolean; - } - - static final _canParseAsync = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__canParseAsync") - .asFunction)>(); - - /// from: public boolean canParseAsync() - /// - /// Method that can be called to determine if this parser instance - /// uses non-blocking ("asynchronous") input access for decoding or not. - /// Access mode is determined by earlier calls via JsonFactory; - /// it may not be changed after construction. - /// - /// If non-blocking decoding is (@code true}, it is possible to call - /// \#getNonBlockingInputFeeder() to obtain object to use - /// for feeding input; otherwise (false returned) - /// input is read by blocking - ///@return True if this is a non-blocking ("asynchronous") parser - ///@since 2.9 - bool canParseAsync() { - return _canParseAsync(reference.pointer).boolean; - } - - static final _getNonBlockingInputFeeder = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getNonBlockingInputFeeder") - .asFunction)>(); - - /// from: public com.fasterxml.jackson.core.async.NonBlockingInputFeeder getNonBlockingInputFeeder() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method that will either return a feeder instance (if parser uses - /// non-blocking, aka asynchronous access); or null for - /// parsers that use blocking I/O. - ///@return Input feeder to use with non-blocking (async) parsing - ///@since 2.9 - jni.JObject getNonBlockingInputFeeder() { - return _getNonBlockingInputFeeder(reference.pointer) - .object(const jni.JObjectType()); - } - - static final _getReadCapabilities = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getReadCapabilities") - .asFunction)>(); - - /// from: public com.fasterxml.jackson.core.util.JacksonFeatureSet getReadCapabilities() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Accessor for getting metadata on capabilities of this parser, based on - /// underlying data format being read (directly or indirectly). - ///@return Set of read capabilities for content to read via this parser - ///@since 2.12 - jni.JObject getReadCapabilities() { - return _getReadCapabilities(reference.pointer) - .object(const jni.JObjectType()); - } - - static final _version = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__version") - .asFunction)>(); - - /// from: public abstract com.fasterxml.jackson.core.Version version() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Accessor for getting version of the core package, given a parser instance. - /// Left for sub-classes to implement. - ///@return Version of this generator (derived from version declared for - /// {@code jackson-core} jar that contains the class - jni.JObject version() { - return _version(reference.pointer).object(const jni.JObjectType()); - } - - static final _close = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__close") - .asFunction)>(); - - /// from: public abstract void close() - /// - /// Closes the parser so that no further iteration or data access - /// can be made; will also close the underlying input source - /// if parser either __owns__ the input source, or feature - /// Feature\#AUTO_CLOSE_SOURCE is enabled. - /// Whether parser owns the input source depends on factory - /// method that was used to construct instance (so check - /// com.fasterxml.jackson.core.JsonFactory for details, - /// but the general - /// idea is that if caller passes in closable resource (such - /// as InputStream or Reader) parser does NOT - /// own the source; but if it passes a reference (such as - /// java.io.File or java.net.URL and creates - /// stream or reader it does own them. - ///@throws IOException if there is either an underlying I/O problem - void close() { - _close(reference.pointer).check(); - } - - static final _isClosed = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__isClosed") - .asFunction)>(); - - /// from: public abstract boolean isClosed() - /// - /// Method that can be called to determine whether this parser - /// is closed or not. If it is closed, no new tokens can be - /// retrieved by calling \#nextToken (and the underlying - /// stream may be closed). Closing may be due to an explicit - /// call to \#close or because parser has encountered - /// end of input. - ///@return {@code True} if this parser instance has been closed - bool isClosed() { - return _isClosed(reference.pointer).boolean; - } - - static final _getParsingContext = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getParsingContext") - .asFunction)>(); - - /// from: public abstract com.fasterxml.jackson.core.JsonStreamContext getParsingContext() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method that can be used to access current parsing context reader - /// is in. There are 3 different types: root, array and object contexts, - /// with slightly different available information. Contexts are - /// hierarchically nested, and can be used for example for figuring - /// out part of the input document that correspond to specific - /// array or object (for highlighting purposes, or error reporting). - /// Contexts can also be used for simple xpath-like matching of - /// input, if so desired. - ///@return Stream input context (JsonStreamContext) associated with this parser - jni.JObject getParsingContext() { - return _getParsingContext(reference.pointer) - .object(const jni.JObjectType()); - } - - static final _currentLocation = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__currentLocation") - .asFunction)>(); - - /// from: public com.fasterxml.jackson.core.JsonLocation currentLocation() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method that returns location of the last processed input unit (character - /// or byte) from the input; - /// usually for error reporting purposes. - /// - /// Note that the location is not guaranteed to be accurate (although most - /// implementation will try their best): some implementations may only - /// report specific boundary locations (start or end locations of tokens) - /// and others only return JsonLocation\#NA due to not having access - /// to input location information (when delegating actual decoding work - /// to other library) - ///@return Location of the last processed input unit (byte or character) - ///@since 2.13 - jni.JObject currentLocation() { - return _currentLocation(reference.pointer).object(const jni.JObjectType()); - } - - static final _currentTokenLocation = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__currentTokenLocation") - .asFunction)>(); - - /// from: public com.fasterxml.jackson.core.JsonLocation currentTokenLocation() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method that return the __starting__ location of the current - /// (most recently returned) - /// token; that is, the position of the first input unit (character or byte) from input - /// that starts the current token. - /// - /// Note that the location is not guaranteed to be accurate (although most - /// implementation will try their best): some implementations may only - /// return JsonLocation\#NA due to not having access - /// to input location information (when delegating actual decoding work - /// to other library) - ///@return Starting location of the token parser currently points to - ///@since 2.13 (will eventually replace \#getTokenLocation) - jni.JObject currentTokenLocation() { - return _currentTokenLocation(reference.pointer) - .object(const jni.JObjectType()); - } - - static final _getCurrentLocation = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getCurrentLocation") - .asFunction)>(); - - /// from: public abstract com.fasterxml.jackson.core.JsonLocation getCurrentLocation() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Alias for \#currentLocation(), to be deprecated in later - /// Jackson 2.x versions (and removed from Jackson 3.0). - ///@return Location of the last processed input unit (byte or character) - jni.JObject getCurrentLocation() { - return _getCurrentLocation(reference.pointer) - .object(const jni.JObjectType()); - } - - static final _getTokenLocation = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getTokenLocation") - .asFunction)>(); - - /// from: public abstract com.fasterxml.jackson.core.JsonLocation getTokenLocation() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Alias for \#currentTokenLocation(), to be deprecated in later - /// Jackson 2.x versions (and removed from Jackson 3.0). - ///@return Starting location of the token parser currently points to - jni.JObject getTokenLocation() { - return _getTokenLocation(reference.pointer).object(const jni.JObjectType()); - } - - static final _currentValue = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__currentValue") - .asFunction)>(); - - /// from: public java.lang.Object currentValue() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Helper method, usually equivalent to: - /// - /// getParsingContext().getCurrentValue(); - /// - /// - /// Note that "current value" is NOT populated (or used) by Streaming parser; - /// it is only used by higher-level data-binding functionality. - /// The reason it is included here is that it can be stored and accessed hierarchically, - /// and gets passed through data-binding. - ///@return "Current value" associated with the current input context (state) of this parser - ///@since 2.13 (added as replacement for older \#getCurrentValue() - jni.JObject currentValue() { - return _currentValue(reference.pointer).object(const jni.JObjectType()); - } - - static final _assignCurrentValue = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonParser__assignCurrentValue") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public void assignCurrentValue(java.lang.Object v) - /// - /// Helper method, usually equivalent to: - /// - /// getParsingContext().setCurrentValue(v); - /// - ///@param v Current value to assign for the current input context of this parser - ///@since 2.13 (added as replacement for older \#setCurrentValue - void assignCurrentValue( - jni.JObject v, - ) { - _assignCurrentValue(reference.pointer, v.reference.pointer).check(); - } - - static final _getCurrentValue = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getCurrentValue") - .asFunction)>(); - - /// from: public java.lang.Object getCurrentValue() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Alias for \#currentValue(), to be deprecated in later - /// Jackson 2.x versions (and removed from Jackson 3.0). - ///@return Location of the last processed input unit (byte or character) - jni.JObject getCurrentValue() { - return _getCurrentValue(reference.pointer).object(const jni.JObjectType()); - } - - static final _setCurrentValue = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonParser__setCurrentValue") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public void setCurrentValue(java.lang.Object v) - /// - /// Alias for \#assignCurrentValue, to be deprecated in later - /// Jackson 2.x versions (and removed from Jackson 3.0). - ///@param v Current value to assign for the current input context of this parser - void setCurrentValue( - jni.JObject v, - ) { - _setCurrentValue(reference.pointer, v.reference.pointer).check(); - } - - static final _releaseBuffered = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonParser__releaseBuffered") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public int releaseBuffered(java.io.OutputStream out) - /// - /// Method that can be called to push back any content that - /// has been read but not consumed by the parser. This is usually - /// done after reading all content of interest using parser. - /// Content is released by writing it to given stream if possible; - /// if underlying input is byte-based it can released, if not (char-based) - /// it can not. - ///@param out OutputStream to which buffered, undecoded content is written to - ///@return -1 if the underlying content source is not byte based - /// (that is, input can not be sent to OutputStream; - /// otherwise number of bytes released (0 if there was nothing to release) - ///@throws IOException if write to stream threw exception - int releaseBuffered( - jni.JObject out, - ) { - return _releaseBuffered(reference.pointer, out.reference.pointer).integer; - } - - static final _releaseBuffered1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonParser__releaseBuffered1") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public int releaseBuffered(java.io.Writer w) - /// - /// Method that can be called to push back any content that - /// has been read but not consumed by the parser. - /// This is usually - /// done after reading all content of interest using parser. - /// Content is released by writing it to given writer if possible; - /// if underlying input is char-based it can released, if not (byte-based) - /// it can not. - ///@param w Writer to which buffered but unprocessed content is written to - ///@return -1 if the underlying content source is not char-based - /// (that is, input can not be sent to Writer; - /// otherwise number of chars released (0 if there was nothing to release) - ///@throws IOException if write using Writer threw exception - int releaseBuffered1( - jni.JObject w, - ) { - return _releaseBuffered1(reference.pointer, w.reference.pointer).integer; - } - - static final _enable = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonParser__enable") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser enable(com.fasterxml.jackson.core.JsonParser.Feature f) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for enabling specified parser feature - /// (check Feature for list of features) - ///@param f Feature to enable - ///@return This parser, to allow call chaining - JsonParser enable( - JsonParser_Feature f, - ) { - return _enable(reference.pointer, f.reference.pointer) - .object(const $JsonParserType()); - } - - static final _disable = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonParser__disable") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser disable(com.fasterxml.jackson.core.JsonParser.Feature f) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for disabling specified feature - /// (check Feature for list of features) - ///@param f Feature to disable - ///@return This parser, to allow call chaining - JsonParser disable( - JsonParser_Feature f, - ) { - return _disable(reference.pointer, f.reference.pointer) - .object(const $JsonParserType()); - } - - static final _configure = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer, ffi.Uint8)>>("JsonParser__configure") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer, int)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser configure(com.fasterxml.jackson.core.JsonParser.Feature f, boolean state) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for enabling or disabling specified feature - /// (check Feature for list of features) - ///@param f Feature to enable or disable - ///@param state Whether to enable feature ({@code true}) or disable ({@code false}) - ///@return This parser, to allow call chaining - JsonParser configure( - JsonParser_Feature f, - bool state, - ) { - return _configure(reference.pointer, f.reference.pointer, state ? 1 : 0) - .object(const $JsonParserType()); - } - - static final _isEnabled = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonParser__isEnabled") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public boolean isEnabled(com.fasterxml.jackson.core.JsonParser.Feature f) - /// - /// Method for checking whether specified Feature is enabled. - ///@param f Feature to check - ///@return {@code True} if feature is enabled; {@code false} otherwise - bool isEnabled( - JsonParser_Feature f, - ) { - return _isEnabled(reference.pointer, f.reference.pointer).boolean; - } - - static final _isEnabled1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonParser__isEnabled1") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public boolean isEnabled(com.fasterxml.jackson.core.StreamReadFeature f) - /// - /// Method for checking whether specified Feature is enabled. - ///@param f Feature to check - ///@return {@code True} if feature is enabled; {@code false} otherwise - ///@since 2.10 - bool isEnabled1( - jni.JObject f, - ) { - return _isEnabled1(reference.pointer, f.reference.pointer).boolean; - } - - static final _getFeatureMask = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getFeatureMask") - .asFunction)>(); - - /// from: public int getFeatureMask() - /// - /// Bulk access method for getting state of all standard Features. - ///@return Bit mask that defines current states of all standard Features. - ///@since 2.3 - int getFeatureMask() { - return _getFeatureMask(reference.pointer).integer; - } - - static final _setFeatureMask = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Int32)>>("JsonParser__setFeatureMask") - .asFunction, int)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser setFeatureMask(int mask) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Bulk set method for (re)setting states of all standard Features - ///@param mask Bit mask that defines set of features to enable - ///@return This parser, to allow call chaining - ///@since 2.3 - ///@deprecated Since 2.7, use \#overrideStdFeatures(int, int) instead - JsonParser setFeatureMask( - int mask, - ) { - return _setFeatureMask(reference.pointer, mask) - .object(const $JsonParserType()); - } - - static final _overrideStdFeatures = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, ffi.Int32, - ffi.Int32)>>("JsonParser__overrideStdFeatures") - .asFunction, int, int)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser overrideStdFeatures(int values, int mask) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Bulk set method for (re)setting states of features specified by mask. - /// Functionally equivalent to - /// - /// int oldState = getFeatureMask(); - /// int newState = (oldState & ~mask) | (values & mask); - /// setFeatureMask(newState); - /// - /// but preferred as this lets caller more efficiently specify actual changes made. - ///@param values Bit mask of set/clear state for features to change - ///@param mask Bit mask of features to change - ///@return This parser, to allow call chaining - ///@since 2.6 - JsonParser overrideStdFeatures( - int values, - int mask, - ) { - return _overrideStdFeatures(reference.pointer, values, mask) - .object(const $JsonParserType()); - } - - static final _getFormatFeatures = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getFormatFeatures") - .asFunction)>(); - - /// from: public int getFormatFeatures() - /// - /// Bulk access method for getting state of all FormatFeatures, format-specific - /// on/off configuration settings. - ///@return Bit mask that defines current states of all standard FormatFeatures. - ///@since 2.6 - int getFormatFeatures() { - return _getFormatFeatures(reference.pointer).integer; - } - - static final _overrideFormatFeatures = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, ffi.Int32, - ffi.Int32)>>("JsonParser__overrideFormatFeatures") - .asFunction, int, int)>(); - - /// from: public com.fasterxml.jackson.core.JsonParser overrideFormatFeatures(int values, int mask) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Bulk set method for (re)setting states of FormatFeatures, - /// by specifying values (set / clear) along with a mask, to determine - /// which features to change, if any. - /// - /// Default implementation will simply throw an exception to indicate that - /// the parser implementation does not support any FormatFeatures. - ///@param values Bit mask of set/clear state for features to change - ///@param mask Bit mask of features to change - ///@return This parser, to allow call chaining - ///@since 2.6 - JsonParser overrideFormatFeatures( - int values, - int mask, - ) { - return _overrideFormatFeatures(reference.pointer, values, mask) - .object(const $JsonParserType()); - } - - static final _nextToken = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__nextToken") - .asFunction)>(); - - /// from: public abstract com.fasterxml.jackson.core.JsonToken nextToken() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Main iteration method, which will advance stream enough - /// to determine type of the next token, if any. If none - /// remaining (stream has no content other than possible - /// white space before ending), null will be returned. - ///@return Next token from the stream, if any found, or null - /// to indicate end-of-input - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - jsontoken_.JsonToken nextToken() { - return _nextToken(reference.pointer) - .object(const jsontoken_.$JsonTokenType()); - } - - static final _nextValue = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__nextValue") - .asFunction)>(); - - /// from: public abstract com.fasterxml.jackson.core.JsonToken nextValue() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Iteration method that will advance stream enough - /// to determine type of the next token that is a value type - /// (including JSON Array and Object start/end markers). - /// Or put another way, nextToken() will be called once, - /// and if JsonToken\#FIELD_NAME is returned, another - /// time to get the value for the field. - /// Method is most useful for iterating over value entries - /// of JSON objects; field name will still be available - /// by calling \#getCurrentName when parser points to - /// the value. - ///@return Next non-field-name token from the stream, if any found, - /// or null to indicate end-of-input (or, for non-blocking - /// parsers, JsonToken\#NOT_AVAILABLE if no tokens were - /// available yet) - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - jsontoken_.JsonToken nextValue() { - return _nextValue(reference.pointer) - .object(const jsontoken_.$JsonTokenType()); - } - - static final _nextFieldName = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonParser__nextFieldName") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public boolean nextFieldName(com.fasterxml.jackson.core.SerializableString str) - /// - /// Method that fetches next token (as if calling \#nextToken) and - /// verifies whether it is JsonToken\#FIELD_NAME with specified name - /// and returns result of that comparison. - /// It is functionally equivalent to: - ///
-  ///  return (nextToken() == JsonToken.FIELD_NAME) && str.getValue().equals(getCurrentName());
-  ///
- /// but may be faster for parser to verify, and can therefore be used if caller - /// expects to get such a property name from input next. - ///@param str Property name to compare next token to (if next token is - /// JsonToken.FIELD_NAME) - ///@return {@code True} if parser advanced to {@code JsonToken.FIELD_NAME} with - /// specified name; {@code false} otherwise (different token or non-matching name) - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - bool nextFieldName( - jni.JObject str, - ) { - return _nextFieldName(reference.pointer, str.reference.pointer).boolean; - } - - static final _nextFieldName1 = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__nextFieldName1") - .asFunction)>(); - - /// from: public java.lang.String nextFieldName() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method that fetches next token (as if calling \#nextToken) and - /// verifies whether it is JsonToken\#FIELD_NAME; if it is, - /// returns same as \#getCurrentName(), otherwise null. - ///@return Name of the the {@code JsonToken.FIELD_NAME} parser advanced to, if any; - /// {@code null} if next token is of some other type - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - ///@since 2.5 - jni.JString nextFieldName1() { - return _nextFieldName1(reference.pointer).object(const jni.JStringType()); - } - - static final _nextTextValue = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__nextTextValue") - .asFunction)>(); - - /// from: public java.lang.String nextTextValue() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method that fetches next token (as if calling \#nextToken) and - /// if it is JsonToken\#VALUE_STRING returns contained String value; - /// otherwise returns null. - /// It is functionally equivalent to: - ///
-  ///  return (nextToken() == JsonToken.VALUE_STRING) ? getText() : null;
-  ///
- /// but may be faster for parser to process, and can therefore be used if caller - /// expects to get a String value next from input. - ///@return Text value of the {@code JsonToken.VALUE_STRING} token parser advanced - /// to; or {@code null} if next token is of some other type - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - jni.JString nextTextValue() { - return _nextTextValue(reference.pointer).object(const jni.JStringType()); - } - - static final _nextIntValue = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Int32)>>("JsonParser__nextIntValue") - .asFunction, int)>(); - - /// from: public int nextIntValue(int defaultValue) - /// - /// Method that fetches next token (as if calling \#nextToken) and - /// if it is JsonToken\#VALUE_NUMBER_INT returns 32-bit int value; - /// otherwise returns specified default value - /// It is functionally equivalent to: - ///
-  ///  return (nextToken() == JsonToken.VALUE_NUMBER_INT) ? getIntValue() : defaultValue;
-  ///
- /// but may be faster for parser to process, and can therefore be used if caller - /// expects to get an int value next from input. - /// - /// NOTE: value checks are performed similar to \#getIntValue() - ///@param defaultValue Value to return if next token is NOT of type {@code JsonToken.VALUE_NUMBER_INT} - ///@return Integer ({@code int}) value of the {@code JsonToken.VALUE_NUMBER_INT} token parser advanced - /// to; or {@code defaultValue} if next token is of some other type - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - ///@throws InputCoercionException if integer number does not fit in Java {@code int} - int nextIntValue( - int defaultValue, - ) { - return _nextIntValue(reference.pointer, defaultValue).integer; - } - - static final _nextLongValue = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Int64)>>("JsonParser__nextLongValue") - .asFunction, int)>(); - - /// from: public long nextLongValue(long defaultValue) - /// - /// Method that fetches next token (as if calling \#nextToken) and - /// if it is JsonToken\#VALUE_NUMBER_INT returns 64-bit long value; - /// otherwise returns specified default value - /// It is functionally equivalent to: - ///
-  ///  return (nextToken() == JsonToken.VALUE_NUMBER_INT) ? getLongValue() : defaultValue;
-  ///
- /// but may be faster for parser to process, and can therefore be used if caller - /// expects to get a long value next from input. - /// - /// NOTE: value checks are performed similar to \#getLongValue() - ///@param defaultValue Value to return if next token is NOT of type {@code JsonToken.VALUE_NUMBER_INT} - ///@return {@code long} value of the {@code JsonToken.VALUE_NUMBER_INT} token parser advanced - /// to; or {@code defaultValue} if next token is of some other type - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - ///@throws InputCoercionException if integer number does not fit in Java {@code long} - int nextLongValue( - int defaultValue, - ) { - return _nextLongValue(reference.pointer, defaultValue).long; - } - - static final _nextBooleanValue = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__nextBooleanValue") - .asFunction)>(); - - /// from: public java.lang.Boolean nextBooleanValue() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method that fetches next token (as if calling \#nextToken) and - /// if it is JsonToken\#VALUE_TRUE or JsonToken\#VALUE_FALSE - /// returns matching Boolean value; otherwise return null. - /// It is functionally equivalent to: - ///
-  ///  JsonToken t = nextToken();
-  ///  if (t == JsonToken.VALUE_TRUE) return Boolean.TRUE;
-  ///  if (t == JsonToken.VALUE_FALSE) return Boolean.FALSE;
-  ///  return null;
-  ///
- /// but may be faster for parser to process, and can therefore be used if caller - /// expects to get a Boolean value next from input. - ///@return {@code Boolean} value of the {@code JsonToken.VALUE_TRUE} or {@code JsonToken.VALUE_FALSE} - /// token parser advanced to; or {@code null} if next token is of some other type - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - jni.JBoolean nextBooleanValue() { - return _nextBooleanValue(reference.pointer) - .object(const jni.JBooleanType()); - } - - static final _skipChildren = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__skipChildren") - .asFunction)>(); - - /// from: public abstract com.fasterxml.jackson.core.JsonParser skipChildren() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method that will skip all child tokens of an array or - /// object token that the parser currently points to, - /// iff stream points to - /// JsonToken\#START_OBJECT or JsonToken\#START_ARRAY. - /// If not, it will do nothing. - /// After skipping, stream will point to __matching__ - /// JsonToken\#END_OBJECT or JsonToken\#END_ARRAY - /// (possibly skipping nested pairs of START/END OBJECT/ARRAY tokens - /// as well as value tokens). - /// The idea is that after calling this method, application - /// will call \#nextToken to point to the next - /// available token, if any. - ///@return This parser, to allow call chaining - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - JsonParser skipChildren() { - return _skipChildren(reference.pointer).object(const $JsonParserType()); - } - - static final _finishToken = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__finishToken") - .asFunction)>(); - - /// from: public void finishToken() - /// - /// Method that may be used to force full handling of the current token - /// so that even if lazy processing is enabled, the whole contents are - /// read for possible retrieval. This is usually used to ensure that - /// the token end location is available, as well as token contents - /// (similar to what calling, say \#getTextCharacters(), would - /// achieve). - /// - /// Note that for many dataformat implementations this method - /// will not do anything; this is the default implementation unless - /// overridden by sub-classes. - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - ///@since 2.8 - void finishToken() { - _finishToken(reference.pointer).check(); - } - - static final _currentToken = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__currentToken") - .asFunction)>(); - - /// from: public com.fasterxml.jackson.core.JsonToken currentToken() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Accessor to find which token parser currently points to, if any; - /// null will be returned if none. - /// If return value is non-null, data associated with the token - /// is available via other accessor methods. - ///@return Type of the token this parser currently points to, - /// if any: null before any tokens have been read, and - /// after end-of-input has been encountered, as well as - /// if the current token has been explicitly cleared. - ///@since 2.8 - jsontoken_.JsonToken currentToken() { - return _currentToken(reference.pointer) - .object(const jsontoken_.$JsonTokenType()); - } - - static final _currentTokenId = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__currentTokenId") - .asFunction)>(); - - /// from: public int currentTokenId() - /// - /// Method similar to \#getCurrentToken() but that returns an - /// int instead of JsonToken (enum value). - /// - /// Use of int directly is typically more efficient on switch statements, - /// so this method may be useful when building low-overhead codecs. - /// Note, however, that effect may not be big enough to matter: make sure - /// to profile performance before deciding to use this method. - ///@since 2.8 - ///@return {@code int} matching one of constants from JsonTokenId. - int currentTokenId() { - return _currentTokenId(reference.pointer).integer; - } - - static final _getCurrentToken = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getCurrentToken") - .asFunction)>(); - - /// from: public abstract com.fasterxml.jackson.core.JsonToken getCurrentToken() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Alias for \#currentToken(), may be deprecated sometime after - /// Jackson 2.13 (will be removed from 3.0). - ///@return Type of the token this parser currently points to, - /// if any: null before any tokens have been read, and - jsontoken_.JsonToken getCurrentToken() { - return _getCurrentToken(reference.pointer) - .object(const jsontoken_.$JsonTokenType()); - } - - static final _getCurrentTokenId = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getCurrentTokenId") - .asFunction)>(); - - /// from: public abstract int getCurrentTokenId() - /// - /// Deprecated alias for \#currentTokenId(). - ///@return {@code int} matching one of constants from JsonTokenId. - ///@deprecated Since 2.12 use \#currentTokenId instead - int getCurrentTokenId() { - return _getCurrentTokenId(reference.pointer).integer; - } - - static final _hasCurrentToken = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__hasCurrentToken") - .asFunction)>(); - - /// from: public abstract boolean hasCurrentToken() - /// - /// Method for checking whether parser currently points to - /// a token (and data for that token is available). - /// Equivalent to check for parser.getCurrentToken() != null. - ///@return True if the parser just returned a valid - /// token via \#nextToken; false otherwise (parser - /// was just constructed, encountered end-of-input - /// and returned null from \#nextToken, or the token - /// has been consumed) - bool hasCurrentToken() { - return _hasCurrentToken(reference.pointer).boolean; - } - - static final _hasTokenId = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Int32)>>("JsonParser__hasTokenId") - .asFunction, int)>(); - - /// from: public abstract boolean hasTokenId(int id) - /// - /// Method that is functionally equivalent to: - /// - /// return currentTokenId() == id - /// - /// but may be more efficiently implemented. - /// - /// Note that no traversal or conversion is performed; so in some - /// cases calling method like \#isExpectedStartArrayToken() - /// is necessary instead. - ///@param id Token id to match (from (@link JsonTokenId}) - ///@return {@code True} if the parser current points to specified token - ///@since 2.5 - bool hasTokenId( - int id, - ) { - return _hasTokenId(reference.pointer, id).boolean; - } - - static final _hasToken = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonParser__hasToken") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public abstract boolean hasToken(com.fasterxml.jackson.core.JsonToken t) - /// - /// Method that is functionally equivalent to: - /// - /// return currentToken() == t - /// - /// but may be more efficiently implemented. - /// - /// Note that no traversal or conversion is performed; so in some - /// cases calling method like \#isExpectedStartArrayToken() - /// is necessary instead. - ///@param t Token to match - ///@return {@code True} if the parser current points to specified token - ///@since 2.6 - bool hasToken( - jsontoken_.JsonToken t, - ) { - return _hasToken(reference.pointer, t.reference.pointer).boolean; - } - - static final _isExpectedStartArrayToken = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__isExpectedStartArrayToken") - .asFunction)>(); - - /// from: public boolean isExpectedStartArrayToken() - /// - /// Specialized accessor that can be used to verify that the current - /// token indicates start array (usually meaning that current token - /// is JsonToken\#START_ARRAY) when start array is expected. - /// For some specialized parsers this can return true for other cases - /// as well; this is usually done to emulate arrays in cases underlying - /// format is ambiguous (XML, for example, has no format-level difference - /// between Objects and Arrays; it just has elements). - /// - /// Default implementation is equivalent to: - ///
-  ///   currentToken() == JsonToken.START_ARRAY
-  ///
- /// but may be overridden by custom parser implementations. - ///@return True if the current token can be considered as a - /// start-array marker (such JsonToken\#START_ARRAY); - /// {@code false} if not - bool isExpectedStartArrayToken() { - return _isExpectedStartArrayToken(reference.pointer).boolean; - } - - static final _isExpectedStartObjectToken = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__isExpectedStartObjectToken") - .asFunction)>(); - - /// from: public boolean isExpectedStartObjectToken() - /// - /// Similar to \#isExpectedStartArrayToken(), but checks whether stream - /// currently points to JsonToken\#START_OBJECT. - ///@return True if the current token can be considered as a - /// start-array marker (such JsonToken\#START_OBJECT); - /// {@code false} if not - ///@since 2.5 - bool isExpectedStartObjectToken() { - return _isExpectedStartObjectToken(reference.pointer).boolean; - } - - static final _isExpectedNumberIntToken = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__isExpectedNumberIntToken") - .asFunction)>(); - - /// from: public boolean isExpectedNumberIntToken() - /// - /// Similar to \#isExpectedStartArrayToken(), but checks whether stream - /// currently points to JsonToken\#VALUE_NUMBER_INT. - /// - /// The initial use case is for XML backend to efficiently (attempt to) coerce - /// textual content into numbers. - ///@return True if the current token can be considered as a - /// start-array marker (such JsonToken\#VALUE_NUMBER_INT); - /// {@code false} if not - ///@since 2.12 - bool isExpectedNumberIntToken() { - return _isExpectedNumberIntToken(reference.pointer).boolean; - } - - static final _isNaN = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__isNaN") - .asFunction)>(); - - /// from: public boolean isNaN() - /// - /// Access for checking whether current token is a numeric value token, but - /// one that is of "not-a-number" (NaN) variety (including both "NaN" AND - /// positive/negative infinity!): not supported by all formats, - /// but often supported for JsonToken\#VALUE_NUMBER_FLOAT. - /// NOTE: roughly equivalent to calling !Double.isFinite() - /// on value you would get from calling \#getDoubleValue(). - ///@return {@code True} if the current token is of type JsonToken\#VALUE_NUMBER_FLOAT - /// but represents a "Not a Number"; {@code false} for other tokens and regular - /// floating-point numbers - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - ///@since 2.9 - bool isNaN() { - return _isNaN(reference.pointer).boolean; - } - - static final _clearCurrentToken = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__clearCurrentToken") - .asFunction)>(); - - /// from: public abstract void clearCurrentToken() - /// - /// Method called to "consume" the current token by effectively - /// removing it so that \#hasCurrentToken returns false, and - /// \#getCurrentToken null). - /// Cleared token value can still be accessed by calling - /// \#getLastClearedToken (if absolutely needed), but - /// usually isn't. - /// - /// Method was added to be used by the optional data binder, since - /// it has to be able to consume last token used for binding (so that - /// it will not be used again). - void clearCurrentToken() { - _clearCurrentToken(reference.pointer).check(); - } - - static final _getLastClearedToken = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getLastClearedToken") - .asFunction)>(); - - /// from: public abstract com.fasterxml.jackson.core.JsonToken getLastClearedToken() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method that can be called to get the last token that was - /// cleared using \#clearCurrentToken. This is not necessarily - /// the latest token read. - /// Will return null if no tokens have been cleared, - /// or if parser has been closed. - ///@return Last cleared token, if any; {@code null} otherwise - jsontoken_.JsonToken getLastClearedToken() { - return _getLastClearedToken(reference.pointer) - .object(const jsontoken_.$JsonTokenType()); - } - - static final _overrideCurrentName = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonParser__overrideCurrentName") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public abstract void overrideCurrentName(java.lang.String name) - /// - /// Method that can be used to change what is considered to be - /// the current (field) name. - /// May be needed to support non-JSON data formats or unusual binding - /// conventions; not needed for typical processing. - /// - /// Note that use of this method should only be done as sort of last - /// resort, as it is a work-around for regular operation. - ///@param name Name to use as the current name; may be null. - void overrideCurrentName( - jni.JString name, - ) { - _overrideCurrentName(reference.pointer, name.reference.pointer).check(); - } - - static final _getCurrentName = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getCurrentName") - .asFunction)>(); - - /// from: public abstract java.lang.String getCurrentName() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Alias of \#currentName(). - ///@return Name of the current field in the parsing context - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - jni.JString getCurrentName() { - return _getCurrentName(reference.pointer).object(const jni.JStringType()); - } - - static final _currentName = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__currentName") - .asFunction)>(); - - /// from: public java.lang.String currentName() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method that can be called to get the name associated with - /// the current token: for JsonToken\#FIELD_NAMEs it will - /// be the same as what \#getText returns; - /// for field values it will be preceding field name; - /// and for others (array values, root-level values) null. - ///@return Name of the current field in the parsing context - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - ///@since 2.10 - jni.JString currentName() { - return _currentName(reference.pointer).object(const jni.JStringType()); - } - - static final _getText = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getText") - .asFunction)>(); - - /// from: public abstract java.lang.String getText() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for accessing textual representation of the current token; - /// if no current token (before first call to \#nextToken, or - /// after encountering end-of-input), returns null. - /// Method can be called for any token type. - ///@return Textual value associated with the current token (one returned - /// by \#nextToken() or other iteration methods) - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - jni.JString getText() { - return _getText(reference.pointer).object(const jni.JStringType()); - } - - static final _getText1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonParser__getText1") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public int getText(java.io.Writer writer) - /// - /// Method to read the textual representation of the current token in chunks and - /// pass it to the given Writer. - /// Conceptually same as calling: - ///
-  ///  writer.write(parser.getText());
-  ///
- /// but should typically be more efficient as longer content does need to - /// be combined into a single String to return, and write - /// can occur directly from intermediate buffers Jackson uses. - ///@param writer Writer to write textual content to - ///@return The number of characters written to the Writer - ///@throws IOException for low-level read issues or writes using passed - /// {@code writer}, or - /// JsonParseException for decoding problems - ///@since 2.8 - int getText1( - jni.JObject writer, - ) { - return _getText1(reference.pointer, writer.reference.pointer).integer; - } - - static final _getTextCharacters = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getTextCharacters") - .asFunction)>(); - - /// from: public abstract char[] getTextCharacters() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method similar to \#getText, but that will return - /// underlying (unmodifiable) character array that contains - /// textual value, instead of constructing a String object - /// to contain this information. - /// Note, however, that: - ///
    - ///
  • Textual contents are not guaranteed to start at - /// index 0 (rather, call \#getTextOffset) to - /// know the actual offset - ///
  • - ///
  • Length of textual contents may be less than the - /// length of returned buffer: call \#getTextLength - /// for actual length of returned content. - ///
  • - ///
- /// - /// Note that caller __MUST NOT__ modify the returned - /// character array in any way -- doing so may corrupt - /// current parser state and render parser instance useless. - /// - /// The only reason to call this method (over \#getText) - /// is to avoid construction of a String object (which - /// will make a copy of contents). - ///@return Buffer that contains the current textual value (but not necessarily - /// at offset 0, and not necessarily until the end of buffer) - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - jni.JArray getTextCharacters() { - return _getTextCharacters(reference.pointer) - .object(const jni.JArrayType(jni.jcharType())); - } - - static final _getTextLength = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getTextLength") - .asFunction)>(); - - /// from: public abstract int getTextLength() - /// - /// Accessor used with \#getTextCharacters, to know length - /// of String stored in returned buffer. - ///@return Number of characters within buffer returned - /// by \#getTextCharacters that are part of - /// textual content of the current token. - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - int getTextLength() { - return _getTextLength(reference.pointer).integer; - } - - static final _getTextOffset = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getTextOffset") - .asFunction)>(); - - /// from: public abstract int getTextOffset() - /// - /// Accessor used with \#getTextCharacters, to know offset - /// of the first text content character within buffer. - ///@return Offset of the first character within buffer returned - /// by \#getTextCharacters that is part of - /// textual content of the current token. - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - int getTextOffset() { - return _getTextOffset(reference.pointer).integer; - } - - static final _hasTextCharacters = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__hasTextCharacters") - .asFunction)>(); - - /// from: public abstract boolean hasTextCharacters() - /// - /// Method that can be used to determine whether calling of - /// \#getTextCharacters would be the most efficient - /// way to access textual content for the event parser currently - /// points to. - /// - /// Default implementation simply returns false since only actual - /// implementation class has knowledge of its internal buffering - /// state. - /// Implementations are strongly encouraged to properly override - /// this method, to allow efficient copying of content by other - /// code. - ///@return True if parser currently has character array that can - /// be efficiently returned via \#getTextCharacters; false - /// means that it may or may not exist - bool hasTextCharacters() { - return _hasTextCharacters(reference.pointer).boolean; - } - - static final _getNumberValue = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getNumberValue") - .asFunction)>(); - - /// from: public abstract java.lang.Number getNumberValue() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Generic number value accessor method that will work for - /// all kinds of numeric values. It will return the optimal - /// (simplest/smallest possible) wrapper object that can - /// express the numeric value just parsed. - ///@return Numeric value of the current token in its most optimal - /// representation - ///@throws IOException Problem with access: JsonParseException if - /// the current token is not numeric, or if decoding of the value fails - /// (invalid format for numbers); plain IOException if underlying - /// content read fails (possible if values are extracted lazily) - jni.JNumber getNumberValue() { - return _getNumberValue(reference.pointer).object(const jni.JNumberType()); - } - - static final _getNumberValueExact = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getNumberValueExact") - .asFunction)>(); - - /// from: public java.lang.Number getNumberValueExact() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method similar to \#getNumberValue with the difference that - /// for floating-point numbers value returned may be BigDecimal - /// if the underlying format does not store floating-point numbers using - /// native representation: for example, textual formats represent numbers - /// as Strings (which are 10-based), and conversion to java.lang.Double - /// is potentially lossy operation. - /// - /// Default implementation simply returns \#getNumberValue() - ///@return Numeric value of the current token using most accurate representation - ///@throws IOException Problem with access: JsonParseException if - /// the current token is not numeric, or if decoding of the value fails - /// (invalid format for numbers); plain IOException if underlying - /// content read fails (possible if values are extracted lazily) - ///@since 2.12 - jni.JNumber getNumberValueExact() { - return _getNumberValueExact(reference.pointer) - .object(const jni.JNumberType()); - } - - static final _getNumberType = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getNumberType") - .asFunction)>(); - - /// from: public abstract com.fasterxml.jackson.core.JsonParser.NumberType getNumberType() - /// The returned object must be released after use, by calling the [release] method. - /// - /// If current token is of type - /// JsonToken\#VALUE_NUMBER_INT or - /// JsonToken\#VALUE_NUMBER_FLOAT, returns - /// one of NumberType constants; otherwise returns null. - ///@return Type of current number, if parser points to numeric token; {@code null} otherwise - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - JsonParser_NumberType getNumberType() { - return _getNumberType(reference.pointer) - .object(const $JsonParser_NumberTypeType()); - } - - static final _getByteValue = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getByteValue") - .asFunction)>(); - - /// from: public byte getByteValue() - /// - /// Numeric accessor that can be called when the current - /// token is of type JsonToken\#VALUE_NUMBER_INT and - /// it can be expressed as a value of Java byte primitive type. - /// Note that in addition to "natural" input range of {@code [-128, 127]}, - /// this also allows "unsigned 8-bit byte" values {@code [128, 255]}: - /// but for this range value will be translated by truncation, leading - /// to sign change. - /// - /// It can also be called for JsonToken\#VALUE_NUMBER_FLOAT; - /// if so, it is equivalent to calling \#getDoubleValue - /// and then casting; except for possible overflow/underflow - /// exception. - /// - /// Note: if the resulting integer value falls outside range of - /// {@code [-128, 255]}, - /// a InputCoercionException - /// will be thrown to indicate numeric overflow/underflow. - ///@return Current number value as {@code byte} (if numeric token within - /// range of {@code [-128, 255]}); otherwise exception thrown - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - int getByteValue() { - return _getByteValue(reference.pointer).byte; - } - - static final _getShortValue = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getShortValue") - .asFunction)>(); - - /// from: public short getShortValue() - /// - /// Numeric accessor that can be called when the current - /// token is of type JsonToken\#VALUE_NUMBER_INT and - /// it can be expressed as a value of Java short primitive type. - /// It can also be called for JsonToken\#VALUE_NUMBER_FLOAT; - /// if so, it is equivalent to calling \#getDoubleValue - /// and then casting; except for possible overflow/underflow - /// exception. - /// - /// Note: if the resulting integer value falls outside range of - /// Java short, a InputCoercionException - /// will be thrown to indicate numeric overflow/underflow. - ///@return Current number value as {@code short} (if numeric token within - /// Java 16-bit signed {@code short} range); otherwise exception thrown - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - int getShortValue() { - return _getShortValue(reference.pointer).short; - } - - static final _getIntValue = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getIntValue") - .asFunction)>(); - - /// from: public abstract int getIntValue() - /// - /// Numeric accessor that can be called when the current - /// token is of type JsonToken\#VALUE_NUMBER_INT and - /// it can be expressed as a value of Java int primitive type. - /// It can also be called for JsonToken\#VALUE_NUMBER_FLOAT; - /// if so, it is equivalent to calling \#getDoubleValue - /// and then casting; except for possible overflow/underflow - /// exception. - /// - /// Note: if the resulting integer value falls outside range of - /// Java {@code int}, a InputCoercionException - /// may be thrown to indicate numeric overflow/underflow. - ///@return Current number value as {@code int} (if numeric token within - /// Java 32-bit signed {@code int} range); otherwise exception thrown - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - int getIntValue() { - return _getIntValue(reference.pointer).integer; - } - - static final _getLongValue = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getLongValue") - .asFunction)>(); - - /// from: public abstract long getLongValue() - /// - /// Numeric accessor that can be called when the current - /// token is of type JsonToken\#VALUE_NUMBER_INT and - /// it can be expressed as a Java long primitive type. - /// It can also be called for JsonToken\#VALUE_NUMBER_FLOAT; - /// if so, it is equivalent to calling \#getDoubleValue - /// and then casting to int; except for possible overflow/underflow - /// exception. - /// - /// Note: if the token is an integer, but its value falls - /// outside of range of Java long, a InputCoercionException - /// may be thrown to indicate numeric overflow/underflow. - ///@return Current number value as {@code long} (if numeric token within - /// Java 32-bit signed {@code long} range); otherwise exception thrown - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - int getLongValue() { - return _getLongValue(reference.pointer).long; - } - - static final _getBigIntegerValue = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getBigIntegerValue") - .asFunction)>(); - - /// from: public abstract java.math.BigInteger getBigIntegerValue() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Numeric accessor that can be called when the current - /// token is of type JsonToken\#VALUE_NUMBER_INT and - /// it can not be used as a Java long primitive type due to its - /// magnitude. - /// It can also be called for JsonToken\#VALUE_NUMBER_FLOAT; - /// if so, it is equivalent to calling \#getDecimalValue - /// and then constructing a BigInteger from that value. - ///@return Current number value as BigInteger (if numeric token); - /// otherwise exception thrown - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - jni.JObject getBigIntegerValue() { - return _getBigIntegerValue(reference.pointer) - .object(const jni.JObjectType()); - } - - static final _getFloatValue = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getFloatValue") - .asFunction)>(); - - /// from: public abstract float getFloatValue() - /// - /// Numeric accessor that can be called when the current - /// token is of type JsonToken\#VALUE_NUMBER_FLOAT and - /// it can be expressed as a Java float primitive type. - /// It can also be called for JsonToken\#VALUE_NUMBER_INT; - /// if so, it is equivalent to calling \#getLongValue - /// and then casting; except for possible overflow/underflow - /// exception. - /// - /// Note: if the value falls - /// outside of range of Java float, a InputCoercionException - /// will be thrown to indicate numeric overflow/underflow. - ///@return Current number value as {@code float} (if numeric token within - /// Java {@code float} range); otherwise exception thrown - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - double getFloatValue() { - return _getFloatValue(reference.pointer).float; - } - - static final _getDoubleValue = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getDoubleValue") - .asFunction)>(); - - /// from: public abstract double getDoubleValue() - /// - /// Numeric accessor that can be called when the current - /// token is of type JsonToken\#VALUE_NUMBER_FLOAT and - /// it can be expressed as a Java double primitive type. - /// It can also be called for JsonToken\#VALUE_NUMBER_INT; - /// if so, it is equivalent to calling \#getLongValue - /// and then casting; except for possible overflow/underflow - /// exception. - /// - /// Note: if the value falls - /// outside of range of Java double, a InputCoercionException - /// will be thrown to indicate numeric overflow/underflow. - ///@return Current number value as {@code double} (if numeric token within - /// Java {@code double} range); otherwise exception thrown - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - double getDoubleValue() { - return _getDoubleValue(reference.pointer).doubleFloat; - } - - static final _getDecimalValue = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getDecimalValue") - .asFunction)>(); - - /// from: public abstract java.math.BigDecimal getDecimalValue() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Numeric accessor that can be called when the current - /// token is of type JsonToken\#VALUE_NUMBER_FLOAT or - /// JsonToken\#VALUE_NUMBER_INT. No under/overflow exceptions - /// are ever thrown. - ///@return Current number value as BigDecimal (if numeric token); - /// otherwise exception thrown - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - jni.JObject getDecimalValue() { - return _getDecimalValue(reference.pointer).object(const jni.JObjectType()); - } - - static final _getBooleanValue = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getBooleanValue") - .asFunction)>(); - - /// from: public boolean getBooleanValue() - /// - /// Convenience accessor that can be called when the current - /// token is JsonToken\#VALUE_TRUE or - /// JsonToken\#VALUE_FALSE, to return matching {@code boolean} - /// value. - /// If the current token is of some other type, JsonParseException - /// will be thrown - ///@return {@code True} if current token is {@code JsonToken.VALUE_TRUE}, - /// {@code false} if current token is {@code JsonToken.VALUE_FALSE}; - /// otherwise throws JsonParseException - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - bool getBooleanValue() { - return _getBooleanValue(reference.pointer).boolean; - } - - static final _getEmbeddedObject = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getEmbeddedObject") - .asFunction)>(); - - /// from: public java.lang.Object getEmbeddedObject() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Accessor that can be called if (and only if) the current token - /// is JsonToken\#VALUE_EMBEDDED_OBJECT. For other token types, - /// null is returned. - /// - /// Note: only some specialized parser implementations support - /// embedding of objects (usually ones that are facades on top - /// of non-streaming sources, such as object trees). One exception - /// is access to binary content (whether via base64 encoding or not) - /// which typically is accessible using this method, as well as - /// \#getBinaryValue(). - ///@return Embedded value (usually of "native" type supported by format) - /// for the current token, if any; {@code null otherwise} - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - jni.JObject getEmbeddedObject() { - return _getEmbeddedObject(reference.pointer) - .object(const jni.JObjectType()); - } - - static final _getBinaryValue = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonParser__getBinaryValue") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public abstract byte[] getBinaryValue(com.fasterxml.jackson.core.Base64Variant bv) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method that can be used to read (and consume -- results - /// may not be accessible using other methods after the call) - /// base64-encoded binary data - /// included in the current textual JSON value. - /// It works similar to getting String value via \#getText - /// and decoding result (except for decoding part), - /// but should be significantly more performant. - /// - /// Note that non-decoded textual contents of the current token - /// are not guaranteed to be accessible after this method - /// is called. Current implementation, for example, clears up - /// textual content during decoding. - /// Decoded binary content, however, will be retained until - /// parser is advanced to the next event. - ///@param bv Expected variant of base64 encoded - /// content (see Base64Variants for definitions - /// of "standard" variants). - ///@return Decoded binary data - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - jni.JArray getBinaryValue( - jni.JObject bv, - ) { - return _getBinaryValue(reference.pointer, bv.reference.pointer) - .object(const jni.JArrayType(jni.jbyteType())); - } - - static final _getBinaryValue1 = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getBinaryValue1") - .asFunction)>(); - - /// from: public byte[] getBinaryValue() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Convenience alternative to \#getBinaryValue(Base64Variant) - /// that defaults to using - /// Base64Variants\#getDefaultVariant as the default encoding. - ///@return Decoded binary data - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - jni.JArray getBinaryValue1() { - return _getBinaryValue1(reference.pointer) - .object(const jni.JArrayType(jni.jbyteType())); - } - - static final _readBinaryValue = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonParser__readBinaryValue") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public int readBinaryValue(java.io.OutputStream out) - /// - /// Method that can be used as an alternative to \#getBigIntegerValue(), - /// especially when value can be large. The main difference (beyond method - /// of returning content using OutputStream instead of as byte array) - /// is that content will NOT remain accessible after method returns: any content - /// processed will be consumed and is not buffered in any way. If caller needs - /// buffering, it has to implement it. - ///@param out Output stream to use for passing decoded binary data - ///@return Number of bytes that were decoded and written via OutputStream - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - ///@since 2.1 - int readBinaryValue( - jni.JObject out, - ) { - return _readBinaryValue(reference.pointer, out.reference.pointer).integer; - } - - static final _readBinaryValue1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("JsonParser__readBinaryValue1") - .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// from: public int readBinaryValue(com.fasterxml.jackson.core.Base64Variant bv, java.io.OutputStream out) - /// - /// Similar to \#readBinaryValue(OutputStream) but allows explicitly - /// specifying base64 variant to use. - ///@param bv base64 variant to use - ///@param out Output stream to use for passing decoded binary data - ///@return Number of bytes that were decoded and written via OutputStream - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - ///@since 2.1 - int readBinaryValue1( - jni.JObject bv, - jni.JObject out, - ) { - return _readBinaryValue1( - reference.pointer, bv.reference.pointer, out.reference.pointer) - .integer; - } - - static final _getValueAsInt = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getValueAsInt") - .asFunction)>(); - - /// from: public int getValueAsInt() - /// - /// Method that will try to convert value of current token to a - /// Java {@code int} value. - /// Numbers are coerced using default Java rules; booleans convert to 0 (false) - /// and 1 (true), and Strings are parsed using default Java language integer - /// parsing rules. - /// - /// If representation can not be converted to an int (including structured type - /// markers like start/end Object/Array) - /// default value of __0__ will be returned; no exceptions are thrown. - ///@return {@code int} value current token is converted to, if possible; exception thrown - /// otherwise - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - int getValueAsInt() { - return _getValueAsInt(reference.pointer).integer; - } - - static final _getValueAsInt1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Int32)>>("JsonParser__getValueAsInt1") - .asFunction, int)>(); - - /// from: public int getValueAsInt(int def) - /// - /// Method that will try to convert value of current token to a - /// __int__. - /// Numbers are coerced using default Java rules; booleans convert to 0 (false) - /// and 1 (true), and Strings are parsed using default Java language integer - /// parsing rules. - /// - /// If representation can not be converted to an int (including structured type - /// markers like start/end Object/Array) - /// specified __def__ will be returned; no exceptions are thrown. - ///@param def Default value to return if conversion to {@code int} is not possible - ///@return {@code int} value current token is converted to, if possible; {@code def} otherwise - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - int getValueAsInt1( - int def, - ) { - return _getValueAsInt1(reference.pointer, def).integer; - } - - static final _getValueAsLong = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getValueAsLong") - .asFunction)>(); - - /// from: public long getValueAsLong() - /// - /// Method that will try to convert value of current token to a - /// __long__. - /// Numbers are coerced using default Java rules; booleans convert to 0 (false) - /// and 1 (true), and Strings are parsed using default Java language integer - /// parsing rules. - /// - /// If representation can not be converted to a long (including structured type - /// markers like start/end Object/Array) - /// default value of __0L__ will be returned; no exceptions are thrown. - ///@return {@code long} value current token is converted to, if possible; exception thrown - /// otherwise - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - int getValueAsLong() { - return _getValueAsLong(reference.pointer).long; - } - - static final _getValueAsLong1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Int64)>>("JsonParser__getValueAsLong1") - .asFunction, int)>(); - - /// from: public long getValueAsLong(long def) - /// - /// Method that will try to convert value of current token to a - /// __long__. - /// Numbers are coerced using default Java rules; booleans convert to 0 (false) - /// and 1 (true), and Strings are parsed using default Java language integer - /// parsing rules. - /// - /// If representation can not be converted to a long (including structured type - /// markers like start/end Object/Array) - /// specified __def__ will be returned; no exceptions are thrown. - ///@param def Default value to return if conversion to {@code long} is not possible - ///@return {@code long} value current token is converted to, if possible; {@code def} otherwise - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - int getValueAsLong1( - int def, - ) { - return _getValueAsLong1(reference.pointer, def).long; - } - - static final _getValueAsDouble = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getValueAsDouble") - .asFunction)>(); - - /// from: public double getValueAsDouble() - /// - /// Method that will try to convert value of current token to a Java - /// __double__. - /// Numbers are coerced using default Java rules; booleans convert to 0.0 (false) - /// and 1.0 (true), and Strings are parsed using default Java language floating - /// point parsing rules. - /// - /// If representation can not be converted to a double (including structured types - /// like Objects and Arrays), - /// default value of __0.0__ will be returned; no exceptions are thrown. - ///@return {@code double} value current token is converted to, if possible; exception thrown - /// otherwise - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - double getValueAsDouble() { - return _getValueAsDouble(reference.pointer).doubleFloat; - } - - static final _getValueAsDouble1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Double)>>("JsonParser__getValueAsDouble1") - .asFunction, double)>(); - - /// from: public double getValueAsDouble(double def) - /// - /// Method that will try to convert value of current token to a - /// Java __double__. - /// Numbers are coerced using default Java rules; booleans convert to 0.0 (false) - /// and 1.0 (true), and Strings are parsed using default Java language floating - /// point parsing rules. - /// - /// If representation can not be converted to a double (including structured types - /// like Objects and Arrays), - /// specified __def__ will be returned; no exceptions are thrown. - ///@param def Default value to return if conversion to {@code double} is not possible - ///@return {@code double} value current token is converted to, if possible; {@code def} otherwise - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - double getValueAsDouble1( - double def, - ) { - return _getValueAsDouble1(reference.pointer, def).doubleFloat; - } - - static final _getValueAsBoolean = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getValueAsBoolean") - .asFunction)>(); - - /// from: public boolean getValueAsBoolean() - /// - /// Method that will try to convert value of current token to a - /// __boolean__. - /// JSON booleans map naturally; integer numbers other than 0 map to true, and - /// 0 maps to false - /// and Strings 'true' and 'false' map to corresponding values. - /// - /// If representation can not be converted to a boolean value (including structured types - /// like Objects and Arrays), - /// default value of __false__ will be returned; no exceptions are thrown. - ///@return {@code boolean} value current token is converted to, if possible; exception thrown - /// otherwise - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - bool getValueAsBoolean() { - return _getValueAsBoolean(reference.pointer).boolean; - } - - static final _getValueAsBoolean1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Uint8)>>("JsonParser__getValueAsBoolean1") - .asFunction, int)>(); - - /// from: public boolean getValueAsBoolean(boolean def) - /// - /// Method that will try to convert value of current token to a - /// __boolean__. - /// JSON booleans map naturally; integer numbers other than 0 map to true, and - /// 0 maps to false - /// and Strings 'true' and 'false' map to corresponding values. - /// - /// If representation can not be converted to a boolean value (including structured types - /// like Objects and Arrays), - /// specified __def__ will be returned; no exceptions are thrown. - ///@param def Default value to return if conversion to {@code boolean} is not possible - ///@return {@code boolean} value current token is converted to, if possible; {@code def} otherwise - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - bool getValueAsBoolean1( - bool def, - ) { - return _getValueAsBoolean1(reference.pointer, def ? 1 : 0).boolean; - } - - static final _getValueAsString = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getValueAsString") - .asFunction)>(); - - /// from: public java.lang.String getValueAsString() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method that will try to convert value of current token to a - /// java.lang.String. - /// JSON Strings map naturally; scalar values get converted to - /// their textual representation. - /// If representation can not be converted to a String value (including structured types - /// like Objects and Arrays and {@code null} token), default value of - /// __null__ will be returned; no exceptions are thrown. - ///@return String value current token is converted to, if possible; {@code null} otherwise - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - ///@since 2.1 - jni.JString getValueAsString() { - return _getValueAsString(reference.pointer).object(const jni.JStringType()); - } - - static final _getValueAsString1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonParser__getValueAsString1") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public abstract java.lang.String getValueAsString(java.lang.String def) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method that will try to convert value of current token to a - /// java.lang.String. - /// JSON Strings map naturally; scalar values get converted to - /// their textual representation. - /// If representation can not be converted to a String value (including structured types - /// like Objects and Arrays and {@code null} token), specified default value - /// will be returned; no exceptions are thrown. - ///@param def Default value to return if conversion to {@code String} is not possible - ///@return String value current token is converted to, if possible; {@code def} otherwise - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - ///@since 2.1 - jni.JString getValueAsString1( - jni.JString def, - ) { - return _getValueAsString1(reference.pointer, def.reference.pointer) - .object(const jni.JStringType()); - } - - static final _canReadObjectId = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__canReadObjectId") - .asFunction)>(); - - /// from: public boolean canReadObjectId() - /// - /// Introspection method that may be called to see if the underlying - /// data format supports some kind of Object Ids natively (many do not; - /// for example, JSON doesn't). - /// - /// Default implementation returns true; overridden by data formats - /// that do support native Object Ids. Caller is expected to either - /// use a non-native notation (explicit property or such), or fail, - /// in case it can not use native object ids. - ///@return {@code True} if the format being read supports native Object Ids; - /// {@code false} if not - ///@since 2.3 - bool canReadObjectId() { - return _canReadObjectId(reference.pointer).boolean; - } - - static final _canReadTypeId = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__canReadTypeId") - .asFunction)>(); - - /// from: public boolean canReadTypeId() - /// - /// Introspection method that may be called to see if the underlying - /// data format supports some kind of Type Ids natively (many do not; - /// for example, JSON doesn't). - /// - /// Default implementation returns true; overridden by data formats - /// that do support native Type Ids. Caller is expected to either - /// use a non-native notation (explicit property or such), or fail, - /// in case it can not use native type ids. - ///@return {@code True} if the format being read supports native Type Ids; - /// {@code false} if not - ///@since 2.3 - bool canReadTypeId() { - return _canReadTypeId(reference.pointer).boolean; - } - - static final _getObjectId = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getObjectId") - .asFunction)>(); - - /// from: public java.lang.Object getObjectId() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method that can be called to check whether current token - /// (one that was just read) has an associated Object id, and if - /// so, return it. - /// Note that while typically caller should check with \#canReadObjectId - /// first, it is not illegal to call this method even if that method returns - /// true; but if so, it will return null. This may be used to simplify calling - /// code. - /// - /// Default implementation will simply return null. - ///@return Native Object id associated with the current token, if any; {@code null} if none - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - ///@since 2.3 - jni.JObject getObjectId() { - return _getObjectId(reference.pointer).object(const jni.JObjectType()); - } - - static final _getTypeId = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__getTypeId") - .asFunction)>(); - - /// from: public java.lang.Object getTypeId() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method that can be called to check whether current token - /// (one that was just read) has an associated type id, and if - /// so, return it. - /// Note that while typically caller should check with \#canReadTypeId - /// first, it is not illegal to call this method even if that method returns - /// true; but if so, it will return null. This may be used to simplify calling - /// code. - /// - /// Default implementation will simply return null. - ///@return Native Type Id associated with the current token, if any; {@code null} if none - ///@throws IOException for low-level read issues, or - /// JsonParseException for decoding problems - ///@since 2.3 - jni.JObject getTypeId() { - return _getTypeId(reference.pointer).object(const jni.JObjectType()); - } - - static final _readValueAs = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonParser__readValueAs") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public T readValueAs(java.lang.Class valueType) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method to deserialize JSON content into a non-container - /// type (it can be an array type, however): typically a bean, array - /// or a wrapper type (like java.lang.Boolean). - /// __Note__: method can only be called if the parser has - /// an object codec assigned; this is true for parsers constructed - /// by MappingJsonFactory (from "jackson-databind" jar) - /// but not for JsonFactory (unless its setCodec - /// method has been explicitly called). - /// - /// This method may advance the event stream, for structured types - /// the current token will be the closing end marker (END_ARRAY, - /// END_OBJECT) of the bound structure. For non-structured Json types - /// (and for JsonToken\#VALUE_EMBEDDED_OBJECT) - /// stream is not advanced. - /// - /// Note: this method should NOT be used if the result type is a - /// container (java.util.Collection or java.util.Map. - /// The reason is that due to type erasure, key and value types - /// can not be introspected when using this method. - ///@param Nominal type parameter for value type - ///@param valueType Java type to read content as (passed to ObjectCodec that - /// deserializes content) - ///@return Java value read from content - ///@throws IOException if there is either an underlying I/O problem or decoding - /// issue at format layer - $T readValueAs<$T extends jni.JObject>( - jni.JObject valueType, { - required jni.JObjType<$T> T, - }) { - return _readValueAs(reference.pointer, valueType.reference.pointer) - .object(T); - } - - static final _readValueAs1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonParser__readValueAs1") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public T readValueAs(com.fasterxml.jackson.core.type.TypeReference valueTypeRef) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method to deserialize JSON content into a Java type, reference - /// to which is passed as argument. Type is passed using so-called - /// "super type token" - /// and specifically needs to be used if the root type is a - /// parameterized (generic) container type. - /// __Note__: method can only be called if the parser has - /// an object codec assigned; this is true for parsers constructed - /// by MappingJsonFactory (defined in 'jackson-databind' bundle) - /// but not for JsonFactory (unless its setCodec - /// method has been explicitly called). - /// - /// This method may advance the event stream, for structured types - /// the current token will be the closing end marker (END_ARRAY, - /// END_OBJECT) of the bound structure. For non-structured Json types - /// (and for JsonToken\#VALUE_EMBEDDED_OBJECT) - /// stream is not advanced. - ///@param Nominal type parameter for value type - ///@param valueTypeRef Java type to read content as (passed to ObjectCodec that - /// deserializes content) - ///@return Java value read from content - ///@throws IOException if there is either an underlying I/O problem or decoding - /// issue at format layer - $T readValueAs1<$T extends jni.JObject>( - jni.JObject valueTypeRef, { - required jni.JObjType<$T> T, - }) { - return _readValueAs1(reference.pointer, valueTypeRef.reference.pointer) - .object(T); - } - - static final _readValuesAs = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonParser__readValuesAs") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public java.util.Iterator readValuesAs(java.lang.Class valueType) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for reading sequence of Objects from parser stream, - /// all with same specified value type. - ///@param Nominal type parameter for value type - ///@param valueType Java type to read content as (passed to ObjectCodec that - /// deserializes content) - ///@return Iterator for reading multiple Java values from content - ///@throws IOException if there is either an underlying I/O problem or decoding - /// issue at format layer - jni.JIterator<$T> readValuesAs<$T extends jni.JObject>( - jni.JObject valueType, { - required jni.JObjType<$T> T, - }) { - return _readValuesAs(reference.pointer, valueType.reference.pointer) - .object(jni.JIteratorType(T)); - } - - static final _readValuesAs1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("JsonParser__readValuesAs1") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public java.util.Iterator readValuesAs(com.fasterxml.jackson.core.type.TypeReference valueTypeRef) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method for reading sequence of Objects from parser stream, - /// all with same specified value type. - ///@param Nominal type parameter for value type - ///@param valueTypeRef Java type to read content as (passed to ObjectCodec that - /// deserializes content) - ///@return Iterator for reading multiple Java values from content - ///@throws IOException if there is either an underlying I/O problem or decoding - /// issue at format layer - jni.JIterator<$T> readValuesAs1<$T extends jni.JObject>( - jni.JObject valueTypeRef, { - required jni.JObjType<$T> T, - }) { - return _readValuesAs1(reference.pointer, valueTypeRef.reference.pointer) - .object(jni.JIteratorType(T)); - } - - static final _readValueAsTree = jniLookup< - ffi - .NativeFunction)>>( - "JsonParser__readValueAsTree") - .asFunction)>(); - - /// from: public T readValueAsTree() - /// The returned object must be released after use, by calling the [release] method. - /// - /// Method to deserialize JSON content into equivalent "tree model", - /// represented by root TreeNode of resulting model. - /// For JSON Arrays it will an array node (with child nodes), - /// for objects object node (with child nodes), and for other types - /// matching leaf node type. Empty or whitespace documents are null. - ///@param Nominal type parameter for result node type (to reduce need for casting) - ///@return root of the document, or null if empty or whitespace. - ///@throws IOException if there is either an underlying I/O problem or decoding - /// issue at format layer - $T readValueAsTree<$T extends jni.JObject>({ - required jni.JObjType<$T> T, - }) { - return _readValueAsTree(reference.pointer).object(T); - } -} - -final class $JsonParserType extends jni.JObjType { - const $JsonParserType(); - - @override - String get signature => r"Lcom/fasterxml/jackson/core/JsonParser;"; - - @override - JsonParser fromReference(jni.JReference reference) => - JsonParser.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($JsonParserType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($JsonParserType) && other is $JsonParserType; - } -} diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/c_based/dart_bindings/com/fasterxml/jackson/core/JsonToken.dart b/pkgs/jnigen/test/jackson_core_test/third_party/c_based/dart_bindings/com/fasterxml/jackson/core/JsonToken.dart deleted file mode 100644 index ea4122e8c8..0000000000 --- a/pkgs/jnigen/test/jackson_core_test/third_party/c_based/dart_bindings/com/fasterxml/jackson/core/JsonToken.dart +++ /dev/null @@ -1,240 +0,0 @@ -// Generated from jackson-core which is licensed under the Apache License 2.0. -// The following copyright from the original authors applies. -// See https://github.com/FasterXML/jackson-core/blob/2.14/LICENSE -// -// Copyright (c) 2007 - The Jackson Project Authors -// Licensed under the Apache License, Version 2.0 (the "License") -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Autogenerated by jnigen. DO NOT EDIT! - -// ignore_for_file: annotate_overrides -// ignore_for_file: camel_case_extensions -// ignore_for_file: camel_case_types -// ignore_for_file: constant_identifier_names -// ignore_for_file: doc_directive_unknown -// ignore_for_file: file_names -// ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: no_leading_underscores_for_local_identifiers -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: overridden_fields -// ignore_for_file: unnecessary_cast -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// ignore_for_file: unused_import -// ignore_for_file: unused_local_variable -// ignore_for_file: unused_shown_name -// ignore_for_file: use_super_parameters - -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; - -import "../../../../_init.dart"; - -/// from: com.fasterxml.jackson.core.JsonToken -/// -/// Enumeration for basic token types used for returning results -/// of parsing JSON content. -class JsonToken extends jni.JObject { - @override - late final jni.JObjType $type = type; - - JsonToken.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $JsonTokenType(); - static final _values = - jniLookup>( - "JsonToken__values") - .asFunction(); - - /// from: static public com.fasterxml.jackson.core.JsonToken[] values() - /// The returned object must be released after use, by calling the [release] method. - static jni.JArray values() { - return _values().object(const jni.JArrayType($JsonTokenType())); - } - - static final _valueOf = jniLookup< - ffi - .NativeFunction)>>( - "JsonToken__valueOf") - .asFunction)>(); - - /// from: static public com.fasterxml.jackson.core.JsonToken valueOf(java.lang.String name) - /// The returned object must be released after use, by calling the [release] method. - static JsonToken valueOf( - jni.JString name, - ) { - return _valueOf(name.reference.pointer).object(const $JsonTokenType()); - } - - static final _id = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer)>>("JsonToken__id") - .asFunction)>(); - - /// from: public final int id() - int id() { - return _id(reference.pointer).integer; - } - - static final _asString = jniLookup< - ffi - .NativeFunction)>>( - "JsonToken__asString") - .asFunction)>(); - - /// from: public final java.lang.String asString() - /// The returned object must be released after use, by calling the [release] method. - jni.JString asString() { - return _asString(reference.pointer).object(const jni.JStringType()); - } - - static final _asCharArray = jniLookup< - ffi - .NativeFunction)>>( - "JsonToken__asCharArray") - .asFunction)>(); - - /// from: public final char[] asCharArray() - /// The returned object must be released after use, by calling the [release] method. - jni.JArray asCharArray() { - return _asCharArray(reference.pointer) - .object(const jni.JArrayType(jni.jcharType())); - } - - static final _asByteArray = jniLookup< - ffi - .NativeFunction)>>( - "JsonToken__asByteArray") - .asFunction)>(); - - /// from: public final byte[] asByteArray() - /// The returned object must be released after use, by calling the [release] method. - jni.JArray asByteArray() { - return _asByteArray(reference.pointer) - .object(const jni.JArrayType(jni.jbyteType())); - } - - static final _isNumeric = jniLookup< - ffi - .NativeFunction)>>( - "JsonToken__isNumeric") - .asFunction)>(); - - /// from: public final boolean isNumeric() - /// - /// @return {@code True} if this token is {@code VALUE_NUMBER_INT} or {@code VALUE_NUMBER_FLOAT}, - /// {@code false} otherwise - bool isNumeric() { - return _isNumeric(reference.pointer).boolean; - } - - static final _isStructStart = jniLookup< - ffi - .NativeFunction)>>( - "JsonToken__isStructStart") - .asFunction)>(); - - /// from: public final boolean isStructStart() - /// - /// Accessor that is functionally equivalent to: - /// - /// this == JsonToken.START_OBJECT || this == JsonToken.START_ARRAY - /// - ///@return {@code True} if this token is {@code START_OBJECT} or {@code START_ARRAY}, - /// {@code false} otherwise - ///@since 2.3 - bool isStructStart() { - return _isStructStart(reference.pointer).boolean; - } - - static final _isStructEnd = jniLookup< - ffi - .NativeFunction)>>( - "JsonToken__isStructEnd") - .asFunction)>(); - - /// from: public final boolean isStructEnd() - /// - /// Accessor that is functionally equivalent to: - /// - /// this == JsonToken.END_OBJECT || this == JsonToken.END_ARRAY - /// - ///@return {@code True} if this token is {@code END_OBJECT} or {@code END_ARRAY}, - /// {@code false} otherwise - ///@since 2.3 - bool isStructEnd() { - return _isStructEnd(reference.pointer).boolean; - } - - static final _isScalarValue = jniLookup< - ffi - .NativeFunction)>>( - "JsonToken__isScalarValue") - .asFunction)>(); - - /// from: public final boolean isScalarValue() - /// - /// Method that can be used to check whether this token represents - /// a valid non-structured value. This means all {@code VALUE_xxx} tokens; - /// excluding {@code START_xxx} and {@code END_xxx} tokens as well - /// {@code FIELD_NAME}. - ///@return {@code True} if this token is a scalar value token (one of - /// {@code VALUE_xxx} tokens), {@code false} otherwise - bool isScalarValue() { - return _isScalarValue(reference.pointer).boolean; - } - - static final _isBoolean = jniLookup< - ffi - .NativeFunction)>>( - "JsonToken__isBoolean") - .asFunction)>(); - - /// from: public final boolean isBoolean() - /// - /// @return {@code True} if this token is {@code VALUE_TRUE} or {@code VALUE_FALSE}, - /// {@code false} otherwise - bool isBoolean() { - return _isBoolean(reference.pointer).boolean; - } -} - -final class $JsonTokenType extends jni.JObjType { - const $JsonTokenType(); - - @override - String get signature => r"Lcom/fasterxml/jackson/core/JsonToken;"; - - @override - JsonToken fromReference(jni.JReference reference) => - JsonToken.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($JsonTokenType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($JsonTokenType) && other is $JsonTokenType; - } -} diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/dart_only/dart_bindings/com/fasterxml/jackson/core/_package.dart b/pkgs/jnigen/test/jackson_core_test/third_party/dart_only/dart_bindings/com/fasterxml/jackson/core/_package.dart deleted file mode 100644 index cae2a52e60..0000000000 --- a/pkgs/jnigen/test/jackson_core_test/third_party/dart_only/dart_bindings/com/fasterxml/jackson/core/_package.dart +++ /dev/null @@ -1,3 +0,0 @@ -export "JsonFactory.dart"; -export "JsonParser.dart"; -export "JsonToken.dart"; diff --git a/pkgs/jnigen/test/kotlin_test/dart_only/dart_bindings/kotlin.dart b/pkgs/jnigen/test/kotlin_test/bindings/kotlin.dart similarity index 68% rename from pkgs/jnigen/test/kotlin_test/dart_only/dart_bindings/kotlin.dart rename to pkgs/jnigen/test/kotlin_test/bindings/kotlin.dart index 8e3652ae88..2f1099a471 100644 --- a/pkgs/jnigen/test/kotlin_test/dart_only/dart_bindings/kotlin.dart +++ b/pkgs/jnigen/test/kotlin_test/bindings/kotlin.dart @@ -45,10 +45,24 @@ class SuspendFun extends jni.JObject { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory SuspendFun() { - return SuspendFun.fromReference(_id_new0(_class, referenceType, [])); + return SuspendFun.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } static final _id_sayHello = _class.instanceMethodId( @@ -56,13 +70,26 @@ class SuspendFun extends jni.JObject { r"(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", ); + static final _sayHello = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public final java.lang.Object sayHello(kotlin.coroutines.Continuation continuation) /// The returned object must be released after use, by calling the [release] method. Future sayHello() async { final $p = ReceivePort(); final $c = jni.JObject.fromReference( ProtectedJniExtensions.newPortContinuation($p)); - _id_sayHello(this, const jni.JObjectType(), [$c.reference.pointer]); + _sayHello(reference.pointer, _id_sayHello as jni.JMethodIDPtr, + $c.reference.pointer) + .object(const jni.JObjectType()); final $o = jni.JGlobalReference(jni.JObjectPtr.fromAddress(await $p.first)); final $k = const jni.JStringType().jClass.reference.pointer; if (!jni.Jni.env.IsInstanceOf($o.pointer, $k)) { @@ -76,6 +103,20 @@ class SuspendFun extends jni.JObject { r"(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", ); + static final _sayHello1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: public final java.lang.Object sayHello(java.lang.String string, kotlin.coroutines.Continuation continuation) /// The returned object must be released after use, by calling the [release] method. Future sayHello1( @@ -84,8 +125,9 @@ class SuspendFun extends jni.JObject { final $p = ReceivePort(); final $c = jni.JObject.fromReference( ProtectedJniExtensions.newPortContinuation($p)); - _id_sayHello1(this, const jni.JObjectType(), - [string.reference.pointer, $c.reference.pointer]); + _sayHello1(reference.pointer, _id_sayHello1 as jni.JMethodIDPtr, + string.reference.pointer, $c.reference.pointer) + .object(const jni.JObjectType()); final $o = jni.JGlobalReference(jni.JObjectPtr.fromAddress(await $p.first)); final $k = const jni.JStringType().jClass.reference.pointer; if (!jni.Jni.env.IsInstanceOf($o.pointer, $k)) { diff --git a/pkgs/jnigen/test/kotlin_test/c_based/c_bindings/.clang-format b/pkgs/jnigen/test/kotlin_test/c_based/c_bindings/.clang-format deleted file mode 100644 index a256c2f097..0000000000 --- a/pkgs/jnigen/test/kotlin_test/c_based/c_bindings/.clang-format +++ /dev/null @@ -1,15 +0,0 @@ -# From dart SDK: https://github.com/dart-lang/sdk/blob/main/.clang-format - -# Defines the Chromium style for automatic reformatting. -# http://clang.llvm.org/docs/ClangFormatStyleOptions.html -BasedOnStyle: Chromium - -# clang-format doesn't seem to do a good job of this for longer comments. -ReflowComments: 'false' - -# We have lots of these. Though we need to put them all in curly braces, -# clang-format can't do that. -AllowShortIfStatementsOnASingleLine: 'true' - -# Put escaped newlines into the rightmost column. -AlignEscapedNewlinesLeft: false diff --git a/pkgs/jnigen/test/kotlin_test/c_based/c_bindings/CMakeLists.txt b/pkgs/jnigen/test/kotlin_test/c_based/c_bindings/CMakeLists.txt deleted file mode 100644 index 3889f546af..0000000000 --- a/pkgs/jnigen/test/kotlin_test/c_based/c_bindings/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -# jni_native_build (Build with jni:setup. Do not delete this line.) - -# The Flutter tooling requires that developers have CMake 3.10 or later -# installed. You should not increase this version, as doing so will cause -# the plugin to fail to compile for some customers of the plugin. -cmake_minimum_required(VERSION 3.10) - -project(kotlin VERSION 0.0.1 LANGUAGES C) - -add_library(kotlin SHARED - "./kotlin.c" -) - -set_target_properties(kotlin PROPERTIES - OUTPUT_NAME "kotlin" -) - -target_compile_definitions(kotlin PUBLIC DART_SHARED_LIB) - -if(WIN32) - set_target_properties(${TARGET_NAME} PROPERTIES - LINK_FLAGS "/DELAYLOAD:jvm.dll") -endif() - -if (ANDROID) - target_link_libraries(kotlin log) -else() - find_package(Java REQUIRED) - find_package(JNI REQUIRED) - include_directories(${JNI_INCLUDE_DIRS}) - target_link_libraries(kotlin ${JNI_LIBRARIES}) -endif() diff --git a/pkgs/jnigen/test/kotlin_test/c_based/c_bindings/dartjni.h b/pkgs/jnigen/test/kotlin_test/c_based/c_bindings/dartjni.h deleted file mode 100644 index f834d1577b..0000000000 --- a/pkgs/jnigen/test/kotlin_test/c_based/c_bindings/dartjni.h +++ /dev/null @@ -1,383 +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. - -#pragma once - -// Note: include appropriate system jni.h as found by CMake, not third_party/jni.h. -#include -#include -#include -#include - -#if _WIN32 -#include -#else -#include -#include -#endif - -#if _WIN32 -#define FFI_PLUGIN_EXPORT __declspec(dllexport) -#else -#define FFI_PLUGIN_EXPORT -#endif - -#if defined _WIN32 -#define thread_local __declspec(thread) -#else -#define thread_local __thread -#endif - -#ifdef __ANDROID__ -#include -#endif - -#ifdef __ANDROID__ -#define __ENVP_CAST (JNIEnv**) -#else -#define __ENVP_CAST (void**) -#endif - -/// Locking functions for windows and pthread. - -#if defined _WIN32 -#include - -typedef CRITICAL_SECTION MutexLock; -typedef CONDITION_VARIABLE ConditionVariable; - -static inline void init_lock(MutexLock* lock) { - InitializeCriticalSection(lock); -} - -static inline void acquire_lock(MutexLock* lock) { - EnterCriticalSection(lock); -} - -static inline void release_lock(MutexLock* lock) { - LeaveCriticalSection(lock); -} - -static inline void destroy_lock(MutexLock* lock) { - DeleteCriticalSection(lock); -} - -static inline void init_cond(ConditionVariable* cond) { - InitializeConditionVariable(cond); -} - -static inline void signal_cond(ConditionVariable* cond) { - WakeConditionVariable(cond); -} - -static inline void wait_for(ConditionVariable* cond, MutexLock* lock) { - SleepConditionVariableCS(cond, lock, INFINITE); -} - -static inline void destroy_cond(ConditionVariable* cond) { - // Not available. -} - -static inline void free_mem(void* mem) { - CoTaskMemFree(mem); -} - -#elif defined __APPLE__ || defined __LINUX__ || defined __ANDROID__ || \ - defined __GNUC__ -#include - -typedef pthread_mutex_t MutexLock; -typedef pthread_cond_t ConditionVariable; - -static inline void init_lock(MutexLock* lock) { - pthread_mutex_init(lock, NULL); -} - -static inline void acquire_lock(MutexLock* lock) { - pthread_mutex_lock(lock); -} - -static inline void release_lock(MutexLock* lock) { - pthread_mutex_unlock(lock); -} - -static inline void destroy_lock(MutexLock* lock) { - pthread_mutex_destroy(lock); -} - -static inline void init_cond(ConditionVariable* cond) { - pthread_cond_init(cond, NULL); -} - -static inline void signal_cond(ConditionVariable* cond) { - pthread_cond_signal(cond); -} - -static inline void wait_for(ConditionVariable* cond, MutexLock* lock) { - pthread_cond_wait(cond, lock); -} - -static inline void destroy_cond(ConditionVariable* cond) { - pthread_cond_destroy(cond); -} - -static inline void free_mem(void* mem) { - free(mem); -} - -#else - -#error "No locking/condition variable support; Possibly unsupported platform" - -#endif - -typedef struct CallbackResult { - MutexLock lock; - ConditionVariable cond; - int ready; - jobject object; -} CallbackResult; - -typedef struct JniLocks { - MutexLock classLoadingLock; -} JniLocks; - -/// Represents the error when dart-jni layer has already spawned singleton VM. -#define DART_JNI_SINGLETON_EXISTS (-99); - -/// Stores the global state of the JNI. -typedef struct JniContext { - JavaVM* jvm; - jobject classLoader; - jmethodID loadClassMethod; - jobject currentActivity; - jobject appContext; - JniLocks locks; -} JniContext; - -// jniEnv for this thread, used by inline functions in this header, -// therefore declared as extern. -extern thread_local JNIEnv* jniEnv; - -extern JniContext* jni; - -/// Types used by JNI API to distinguish between primitive types. -enum JniType { - booleanType = 0, - byteType = 1, - shortType = 2, - charType = 3, - intType = 4, - longType = 5, - floatType = 6, - doubleType = 7, - objectType = 8, - voidType = 9, -}; - -/// Result type for use by JNI. -/// -/// If [exception] is null, it means the result is valid. -/// It's assumed that the caller knows the expected type in [result]. -typedef struct JniResult { - jvalue value; - jthrowable exception; -} JniResult; - -/// Similar to [JniResult] but for class lookups. -typedef struct JniClassLookupResult { - jclass value; - jthrowable exception; -} JniClassLookupResult; - -/// Similar to [JniResult] but for method/field ID lookups. -typedef struct JniPointerResult { - const void* value; - jthrowable exception; -} JniPointerResult; - -/// JniExceptionDetails holds 2 jstring objects, one is the result of -/// calling `toString` on exception object, other is stack trace; -typedef struct JniExceptionDetails { - jstring message; - jstring stacktrace; -} JniExceptionDetails; - -/// This struct contains functions which wrap method call / field access conveniently along with -/// exception checking. -/// -/// Flutter embedding checks for pending JNI exceptions before an FFI transition, which requires us -/// to check for and clear the exception before returning to dart code, which requires these functions -/// to return result types. -typedef struct JniAccessorsStruct { - JniClassLookupResult (*getClass)(char* internalName); - JniPointerResult (*getFieldID)(jclass cls, char* fieldName, char* signature); - JniPointerResult (*getStaticFieldID)(jclass cls, - char* fieldName, - char* signature); - JniPointerResult (*getMethodID)(jclass cls, - char* methodName, - char* signature); - JniPointerResult (*getStaticMethodID)(jclass cls, - char* methodName, - char* signature); - JniResult (*newObject)(jclass cls, jmethodID ctor, jvalue* args); - JniResult (*newPrimitiveArray)(jsize length, int type); - JniResult (*newObjectArray)(jsize length, - jclass elementClass, - jobject initialElement); - JniResult (*getArrayElement)(jarray array, int index, int type); - JniResult (*callMethod)(jobject obj, - jmethodID methodID, - int callType, - jvalue* args); - JniResult (*callStaticMethod)(jclass cls, - jmethodID methodID, - int callType, - jvalue* args); - JniResult (*getField)(jobject obj, jfieldID fieldID, int callType); - JniResult (*getStaticField)(jclass cls, jfieldID fieldID, int callType); - JniExceptionDetails (*getExceptionDetails)(jthrowable exception); -} JniAccessorsStruct; - -FFI_PLUGIN_EXPORT JniAccessorsStruct* GetAccessors(); - -FFI_PLUGIN_EXPORT JavaVM* GetJavaVM(void); - -FFI_PLUGIN_EXPORT JNIEnv* GetJniEnv(void); - -/// Spawn a JVM with given arguments. -/// -/// Returns JNI_OK on success, and one of the documented JNI error codes on -/// failure. It returns DART_JNI_SINGLETON_EXISTS if an attempt to spawn multiple -/// JVMs is made, even if the underlying API potentially supports multiple VMs. -FFI_PLUGIN_EXPORT int SpawnJvm(JavaVMInitArgs* args); - -/// Returns Application classLoader (on Android), -/// which can be used to load application and platform classes. -/// -/// On other platforms, NULL is returned. -FFI_PLUGIN_EXPORT jobject GetClassLoader(void); - -/// Returns application context on Android. -/// -/// On other platforms, NULL is returned. -FFI_PLUGIN_EXPORT jobject GetApplicationContext(void); - -/// Returns current activity of the app on Android. -FFI_PLUGIN_EXPORT jobject GetCurrentActivity(void); - -static inline void attach_thread() { - if (jniEnv == NULL) { - (*jni->jvm)->AttachCurrentThread(jni->jvm, __ENVP_CAST & jniEnv, NULL); - } -} - -/// Load class into [cls] using platform specific mechanism -static inline void load_class_platform(jclass* cls, const char* name) { -#ifdef __ANDROID__ - jstring className = (*jniEnv)->NewStringUTF(jniEnv, name); - *cls = (*jniEnv)->CallObjectMethod(jniEnv, jni->classLoader, - jni->loadClassMethod, className); - (*jniEnv)->DeleteLocalRef(jniEnv, className); -#else - *cls = (*jniEnv)->FindClass(jniEnv, name); -#endif -} - -static inline void load_class_global_ref(jclass* cls, const char* name) { - if (*cls == NULL) { - jclass tmp = NULL; - acquire_lock(&jni->locks.classLoadingLock); - if (*cls == NULL) { - load_class_platform(&tmp, name); - if (!(*jniEnv)->ExceptionCheck(jniEnv)) { - *cls = (*jniEnv)->NewGlobalRef(jniEnv, tmp); - (*jniEnv)->DeleteLocalRef(jniEnv, tmp); - } - } - release_lock(&jni->locks.classLoadingLock); - } -} - -static inline void load_method(jclass cls, - jmethodID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetMethodID(jniEnv, cls, name, sig); - } -} - -static inline void load_static_method(jclass cls, - jmethodID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetStaticMethodID(jniEnv, cls, name, sig); - } -} - -static inline void load_field(jclass cls, - jfieldID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetFieldID(jniEnv, cls, name, sig); - } -} - -static inline void load_static_field(jclass cls, - jfieldID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetStaticFieldID(jniEnv, cls, name, sig); - } -} - -static inline jobject to_global_ref(jobject ref) { - jobject g = (*jniEnv)->NewGlobalRef(jniEnv, ref); - (*jniEnv)->DeleteLocalRef(jniEnv, ref); - return g; -} - -// These functions are useful for C+Dart bindings, and not required for pure dart bindings. - -FFI_PLUGIN_EXPORT JniContext* GetJniContextPtr(); - -/// For use by jni_gen's generated code -/// don't use these. - -// these 2 fn ptr vars will be defined by generated code library -extern JniContext* (*context_getter)(void); -extern JNIEnv* (*env_getter)(void); - -// this function will be exported by generated code library -// it will set above 2 variables. -FFI_PLUGIN_EXPORT void setJniGetters(struct JniContext* (*cg)(void), - JNIEnv* (*eg)(void)); - -static inline void load_env() { - if (jniEnv == NULL) { - jni = context_getter(); - jniEnv = env_getter(); - } -} - -static inline jthrowable check_exception() { - jthrowable exception = (*jniEnv)->ExceptionOccurred(jniEnv); - if (exception != NULL) (*jniEnv)->ExceptionClear(jniEnv); - if (exception == NULL) return NULL; - return to_global_ref(exception); -} - -static inline JniResult to_global_ref_result(jobject ref) { - JniResult result; - result.exception = check_exception(); - if (result.exception == NULL) { - result.value.l = to_global_ref(ref); - } - return result; -} diff --git a/pkgs/jnigen/test/kotlin_test/c_based/c_bindings/kotlin.c b/pkgs/jnigen/test/kotlin_test/c_based/c_bindings/kotlin.c deleted file mode 100644 index e3c227e6a4..0000000000 --- a/pkgs/jnigen/test/kotlin_test/c_based/c_bindings/kotlin.c +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// Autogenerated by jnigen. DO NOT EDIT! - -#include -#include "dartjni.h" -#include "jni.h" - -thread_local JNIEnv* jniEnv; -JniContext* jni; - -JniContext* (*context_getter)(void); -JNIEnv* (*env_getter)(void); - -void setJniGetters(JniContext* (*cg)(void), JNIEnv* (*eg)(void)) { - context_getter = cg; - env_getter = eg; -} - -// com.github.dart_lang.jnigen.SuspendFun -jclass _c_SuspendFun = NULL; - -jmethodID _m_SuspendFun__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult SuspendFun__new0() { - load_env(); - load_class_global_ref(&_c_SuspendFun, - "com/github/dart_lang/jnigen/SuspendFun"); - if (_c_SuspendFun == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_SuspendFun, &_m_SuspendFun__new0, "", "()V"); - if (_m_SuspendFun__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_SuspendFun, _m_SuspendFun__new0); - return to_global_ref_result(_result); -} - -jmethodID _m_SuspendFun__sayHello = NULL; -FFI_PLUGIN_EXPORT -JniResult SuspendFun__sayHello(jobject self_, jobject continuation) { - load_env(); - load_class_global_ref(&_c_SuspendFun, - "com/github/dart_lang/jnigen/SuspendFun"); - if (_c_SuspendFun == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_SuspendFun, &_m_SuspendFun__sayHello, "sayHello", - "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;"); - if (_m_SuspendFun__sayHello == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_SuspendFun__sayHello, continuation); - return to_global_ref_result(_result); -} - -jmethodID _m_SuspendFun__sayHello1 = NULL; -FFI_PLUGIN_EXPORT -JniResult SuspendFun__sayHello1(jobject self_, - jobject string, - jobject continuation) { - load_env(); - load_class_global_ref(&_c_SuspendFun, - "com/github/dart_lang/jnigen/SuspendFun"); - if (_c_SuspendFun == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_SuspendFun, &_m_SuspendFun__sayHello1, "sayHello", - "(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;"); - if (_m_SuspendFun__sayHello1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_SuspendFun__sayHello1, string, continuation); - return to_global_ref_result(_result); -} diff --git a/pkgs/jnigen/test/kotlin_test/c_based/dart_bindings/kotlin.dart b/pkgs/jnigen/test/kotlin_test/c_based/dart_bindings/kotlin.dart deleted file mode 100644 index e221edbdb6..0000000000 --- a/pkgs/jnigen/test/kotlin_test/c_based/dart_bindings/kotlin.dart +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// Autogenerated by jnigen. DO NOT EDIT! - -// ignore_for_file: annotate_overrides -// ignore_for_file: camel_case_extensions -// ignore_for_file: camel_case_types -// ignore_for_file: constant_identifier_names -// ignore_for_file: doc_directive_unknown -// ignore_for_file: file_names -// ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: no_leading_underscores_for_local_identifiers -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: overridden_fields -// ignore_for_file: unnecessary_cast -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// ignore_for_file: unused_import -// ignore_for_file: unused_local_variable -// ignore_for_file: unused_shown_name -// ignore_for_file: use_super_parameters - -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; - -// Auto-generated initialization code. - -final ffi.Pointer Function(String sym) jniLookup = - ProtectedJniExtensions.initGeneratedLibrary("kotlin"); - -/// from: com.github.dart_lang.jnigen.SuspendFun -class SuspendFun extends jni.JObject { - @override - late final jni.JObjType $type = type; - - SuspendFun.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $SuspendFunType(); - static final _new0 = jniLookup>( - "SuspendFun__new0") - .asFunction(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory SuspendFun() { - return SuspendFun.fromReference(_new0().reference); - } - - static final _sayHello = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("SuspendFun__sayHello") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final java.lang.Object sayHello(kotlin.coroutines.Continuation continuation) - /// The returned object must be released after use, by calling the [release] method. - Future sayHello() async { - final $p = ReceivePort(); - final $c = jni.JObject.fromReference( - ProtectedJniExtensions.newPortContinuation($p)); - _sayHello(reference.pointer, $c.reference.pointer) - .object(const jni.JObjectType()); - final $o = jni.JGlobalReference(jni.JObjectPtr.fromAddress(await $p.first)); - final $k = const jni.JStringType().jClass.reference.pointer; - if (!jni.Jni.env.IsInstanceOf($o.pointer, $k)) { - throw "Failed"; - } - return const jni.JStringType().fromReference($o); - } - - static final _sayHello1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("SuspendFun__sayHello1") - .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// from: public final java.lang.Object sayHello(java.lang.String string, kotlin.coroutines.Continuation continuation) - /// The returned object must be released after use, by calling the [release] method. - Future sayHello1( - jni.JString string, - ) async { - final $p = ReceivePort(); - final $c = jni.JObject.fromReference( - ProtectedJniExtensions.newPortContinuation($p)); - _sayHello1( - reference.pointer, string.reference.pointer, $c.reference.pointer) - .object(const jni.JObjectType()); - final $o = jni.JGlobalReference(jni.JObjectPtr.fromAddress(await $p.first)); - final $k = const jni.JStringType().jClass.reference.pointer; - if (!jni.Jni.env.IsInstanceOf($o.pointer, $k)) { - throw "Failed"; - } - return const jni.JStringType().fromReference($o); - } -} - -final class $SuspendFunType extends jni.JObjType { - const $SuspendFunType(); - - @override - String get signature => r"Lcom/github/dart_lang/jnigen/SuspendFun;"; - - @override - SuspendFun fromReference(jni.JReference reference) => - SuspendFun.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($SuspendFunType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($SuspendFunType) && other is $SuspendFunType; - } -} diff --git a/pkgs/jnigen/test/kotlin_test/generate.dart b/pkgs/jnigen/test/kotlin_test/generate.dart index 61686679aa..f8fc1e1b3b 100644 --- a/pkgs/jnigen/test/kotlin_test/generate.dart +++ b/pkgs/jnigen/test/kotlin_test/generate.dart @@ -35,12 +35,10 @@ void compileKotlinSources(String workingDir) async { } } -Config getConfig([BindingsType bindingsType = BindingsType.cBased]) { +Config getConfig() { compileKotlinSources(kotlinPath); - final typeDir = bindingsType.getConfigString(); - final cWrapperDir = Uri.directory(join(testRoot, typeDir, "c_bindings")); final dartWrappersRoot = Uri.directory( - join(testRoot, typeDir, "dart_bindings"), + join(testRoot, 'bindings'), ); final config = Config( classPath: [Uri.file(jarPath)], @@ -53,11 +51,6 @@ Config getConfig([BindingsType bindingsType = BindingsType.cBased]) { ], logLevel: Level.ALL, outputConfig: OutputConfig( - bindingsType: bindingsType, - cConfig: CCodeOutputConfig( - path: cWrapperDir, - libraryName: 'kotlin', - ), dartConfig: DartCodeOutputConfig( path: dartWrappersRoot.resolve('kotlin.dart'), structure: OutputStructure.singleFile, @@ -70,6 +63,5 @@ Config getConfig([BindingsType bindingsType = BindingsType.cBased]) { } void main() async { - await generateJniBindings(getConfig(BindingsType.cBased)); - await generateJniBindings(getConfig(BindingsType.dartOnly)); + await generateJniBindings(getConfig()); } diff --git a/pkgs/jnigen/test/kotlin_test/generated_files_test.dart b/pkgs/jnigen/test/kotlin_test/generated_files_test.dart index b96c643cae..5c081f323d 100644 --- a/pkgs/jnigen/test/kotlin_test/generated_files_test.dart +++ b/pkgs/jnigen/test/kotlin_test/generated_files_test.dart @@ -2,9 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'package:jnigen/jnigen.dart'; -import 'package:test/test.dart'; - import 'generate.dart'; import '../test_util/test_util.dart'; @@ -12,19 +9,8 @@ void main() async { // This is not run in setupAll, because we want to exit with one line of // error message, not throw a long exception. await checkLocallyBuiltDependencies(); - generateAndCompareBothModes( + generateAndCompare( 'Generate and compare bindings for kotlin_test', - getConfig(BindingsType.cBased), - getConfig(BindingsType.dartOnly), - ); - test( - "Generate and analyze bindings for kotlin_test - pure dart", - () async { - await generateAndAnalyzeBindings( - getConfig(BindingsType.dartOnly), - ); - }, - timeout: const Timeout.factor(1.5), - tags: largeTestTag, + getConfig(), ); } diff --git a/pkgs/jnigen/test/kotlin_test/runtime_test_registrant.dart b/pkgs/jnigen/test/kotlin_test/runtime_test_registrant.dart index 6a9696b6e5..a8f3807a40 100644 --- a/pkgs/jnigen/test/kotlin_test/runtime_test_registrant.dart +++ b/pkgs/jnigen/test/kotlin_test/runtime_test_registrant.dart @@ -7,7 +7,7 @@ import 'package:jni/jni.dart'; import '../test_util/callback_types.dart'; -import 'c_based/dart_bindings/kotlin.dart'; +import 'bindings/kotlin.dart'; void registerTests(String groupName, TestRunnerCallback test) { group(groupName, () { diff --git a/pkgs/jnigen/test/runtime_test.dart b/pkgs/jnigen/test/runtime_test.dart new file mode 100644 index 0000000000..a431809633 --- /dev/null +++ b/pkgs/jnigen/test/runtime_test.dart @@ -0,0 +1,21 @@ +// Generated file. Do not edit or check-in to version control. + +// 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:test/test.dart'; +import 'test_util/bindings_test_setup.dart' as setup; + +import "jackson_core_test/runtime_test_registrant.dart" as jackson_core_test; +import "simple_package_test/runtime_test_registrant.dart" + as simple_package_test; +import "kotlin_test/runtime_test_registrant.dart" as kotlin_test; + +void main() { + setUpAll(setup.bindingsTestSetup); + jackson_core_test.registerTests("jackson_core_test_dart_only", test); + simple_package_test.registerTests("simple_package_test_dart_only", test); + kotlin_test.registerTests("kotlin_test_c_based", test); + tearDownAll(setup.bindingsTestTeardown); +} diff --git a/pkgs/jnigen/test/simple_package_test/dart_only/dart_bindings/simple_package.dart b/pkgs/jnigen/test/simple_package_test/bindings/simple_package.dart similarity index 59% rename from pkgs/jnigen/test/simple_package_test/dart_only/dart_bindings/simple_package.dart rename to pkgs/jnigen/test/simple_package_test/bindings/simple_package.dart index 7287d305e3..21a4f3f31a 100644 --- a/pkgs/jnigen/test/simple_package_test/dart_only/dart_bindings/simple_package.dart +++ b/pkgs/jnigen/test/simple_package_test/bindings/simple_package.dart @@ -57,11 +57,24 @@ class Example_Nested_NestedTwice extends jni.JObject { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory Example_Nested_NestedTwice() { return Example_Nested_NestedTwice.fromReference( - _id_new0(_class, referenceType, [])); + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } } @@ -111,13 +124,22 @@ class Example_Nested extends jni.JObject { r"(Z)V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: public void (boolean value) /// The returned object must be released after use, by calling the [release] method. factory Example_Nested( bool value, ) { - return Example_Nested.fromReference( - _id_new0(_class, referenceType, [value ? 1 : 0])); + return Example_Nested.fromReference(_new0(_class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, value ? 1 : 0) + .reference); } static final _id_usesAnonymousInnerClass = _class.instanceMethodId( @@ -125,9 +147,23 @@ class Example_Nested extends jni.JObject { r"()V", ); + static final _usesAnonymousInnerClass = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void usesAnonymousInnerClass() void usesAnonymousInnerClass() { - _id_usesAnonymousInnerClass(this, const jni.jvoidType(), []); + _usesAnonymousInnerClass( + reference.pointer, _id_usesAnonymousInnerClass as jni.JMethodIDPtr) + .check(); } static final _id_getValue = _class.instanceMethodId( @@ -135,9 +171,22 @@ class Example_Nested extends jni.JObject { r"()Z", ); + static final _getValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public boolean getValue() bool getValue() { - return _id_getValue(this, const jni.jbooleanType(), []); + return _getValue(reference.pointer, _id_getValue as jni.JMethodIDPtr) + .boolean; } static final _id_setValue = _class.instanceMethodId( @@ -145,11 +194,23 @@ class Example_Nested extends jni.JObject { r"(Z)V", ); + static final _setValue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: public void setValue(boolean value) void setValue( bool value, ) { - _id_setValue(this, const jni.jvoidType(), [value ? 1 : 0]); + _setValue( + reference.pointer, _id_setValue as jni.JMethodIDPtr, value ? 1 : 0) + .check(); } } @@ -209,13 +270,25 @@ class Example_NonStaticNested extends jni.JObject { r"(Lcom/github/dart_lang/jnigen/simple_package/Example;)V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public void (com.github.dart_lang.jnigen.simple_package.Example $parent) /// The returned object must be released after use, by calling the [release] method. factory Example_NonStaticNested( Example $parent, ) { - return Example_NonStaticNested.fromReference( - _id_new0(_class, referenceType, [$parent.reference.pointer])); + return Example_NonStaticNested.fromReference(_new0(_class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, $parent.reference.pointer) + .reference); } } @@ -313,9 +386,23 @@ class Example extends jni.JObject { r"()I", ); + static final _getAmount = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public int getAmount() static int getAmount() { - return _id_getAmount(_class, const jni.jintType(), []); + return _getAmount( + _class.reference.pointer, _id_getAmount as jni.JMethodIDPtr) + .integer; } static final _id_getPi = _class.staticMethodId( @@ -323,9 +410,22 @@ class Example extends jni.JObject { r"()D", ); + static final _getPi = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticDoubleMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public double getPi() static double getPi() { - return _id_getPi(_class, const jni.jdoubleType(), []); + return _getPi(_class.reference.pointer, _id_getPi as jni.JMethodIDPtr) + .doubleFloat; } static final _id_getAsterisk = _class.staticMethodId( @@ -333,9 +433,23 @@ class Example extends jni.JObject { r"()C", ); + static final _getAsterisk = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticCharMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public char getAsterisk() static int getAsterisk() { - return _id_getAsterisk(_class, const jni.jcharType(), []); + return _getAsterisk( + _class.reference.pointer, _id_getAsterisk as jni.JMethodIDPtr) + .char; } static final _id_getName = _class.staticMethodId( @@ -343,10 +457,23 @@ class Example extends jni.JObject { r"()Ljava/lang/String;", ); + static final _getName = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public java.lang.String getName() /// The returned object must be released after use, by calling the [release] method. static jni.JString getName() { - return _id_getName(_class, const jni.JStringType(), []); + return _getName(_class.reference.pointer, _id_getName as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_getNestedInstance = _class.staticMethodId( @@ -354,10 +481,24 @@ class Example extends jni.JObject { r"()Lcom/github/dart_lang/jnigen/simple_package/Example$Nested;", ); + static final _getNestedInstance = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public com.github.dart_lang.jnigen.simple_package.Example.Nested getNestedInstance() /// The returned object must be released after use, by calling the [release] method. static Example_Nested getNestedInstance() { - return _id_getNestedInstance(_class, const $Example_NestedType(), []); + return _getNestedInstance( + _class.reference.pointer, _id_getNestedInstance as jni.JMethodIDPtr) + .object(const $Example_NestedType()); } static final _id_setAmount = _class.staticMethodId( @@ -365,11 +506,23 @@ class Example extends jni.JObject { r"(I)V", ); + static final _setAmount = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallStaticVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: static public void setAmount(int newAmount) static void setAmount( int newAmount, ) { - _id_setAmount(_class, const jni.jvoidType(), [jni.JValueInt(newAmount)]); + _setAmount(_class.reference.pointer, _id_setAmount as jni.JMethodIDPtr, + newAmount) + .check(); } static final _id_setName = _class.staticMethodId( @@ -377,11 +530,24 @@ class Example extends jni.JObject { r"(Ljava/lang/String;)V", ); + static final _setName = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public void setName(java.lang.String newName) static void setName( jni.JString newName, ) { - _id_setName(_class, const jni.jvoidType(), [newName.reference.pointer]); + _setName(_class.reference.pointer, _id_setName as jni.JMethodIDPtr, + newName.reference.pointer) + .check(); } static final _id_setNestedInstance = _class.staticMethodId( @@ -389,12 +555,26 @@ class Example extends jni.JObject { r"(Lcom/github/dart_lang/jnigen/simple_package/Example$Nested;)V", ); + static final _setNestedInstance = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public void setNestedInstance(com.github.dart_lang.jnigen.simple_package.Example.Nested newNested) static void setNestedInstance( Example_Nested newNested, ) { - _id_setNestedInstance( - _class, const jni.jvoidType(), [newNested.reference.pointer]); + _setNestedInstance( + _class.reference.pointer, + _id_setNestedInstance as jni.JMethodIDPtr, + newNested.reference.pointer) + .check(); } static final _id_max4 = _class.staticMethodId( @@ -402,6 +582,22 @@ class Example extends jni.JObject { r"(IIII)I", ); + static final _max4 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallStaticIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int, int, int, int)>(); + /// from: static public int max4(int a, int b, int c, int d) static int max4( int a, @@ -409,12 +605,9 @@ class Example extends jni.JObject { int c, int d, ) { - return _id_max4(_class, const jni.jintType(), [ - jni.JValueInt(a), - jni.JValueInt(b), - jni.JValueInt(c), - jni.JValueInt(d) - ]); + return _max4( + _class.reference.pointer, _id_max4 as jni.JMethodIDPtr, a, b, c, d) + .integer; } static final _id_max8 = _class.staticMethodId( @@ -422,6 +615,26 @@ class Example extends jni.JObject { r"(IIIIIIII)I", ); + static final _max8 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallStaticIntMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + int, int, int, int, int, int, int)>(); + /// from: static public int max8(int a, int b, int c, int d, int e, int f, int g, int h) static int max8( int a, @@ -433,16 +646,9 @@ class Example extends jni.JObject { int g, int h, ) { - return _id_max8(_class, const jni.jintType(), [ - jni.JValueInt(a), - jni.JValueInt(b), - jni.JValueInt(c), - jni.JValueInt(d), - jni.JValueInt(e), - jni.JValueInt(f), - jni.JValueInt(g), - jni.JValueInt(h) - ]); + return _max8(_class.reference.pointer, _id_max8 as jni.JMethodIDPtr, a, b, + c, d, e, f, g, h) + .integer; } static final _id_getNumber = _class.instanceMethodId( @@ -450,9 +656,22 @@ class Example extends jni.JObject { r"()I", ); + static final _getNumber = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public int getNumber() int getNumber() { - return _id_getNumber(this, const jni.jintType(), []); + return _getNumber(reference.pointer, _id_getNumber as jni.JMethodIDPtr) + .integer; } static final _id_setNumber = _class.instanceMethodId( @@ -460,11 +679,22 @@ class Example extends jni.JObject { r"(I)V", ); + static final _setNumber = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: public void setNumber(int number) void setNumber( int number, ) { - _id_setNumber(this, const jni.jvoidType(), [jni.JValueInt(number)]); + _setNumber(reference.pointer, _id_setNumber as jni.JMethodIDPtr, number) + .check(); } static final _id_getIsUp = _class.instanceMethodId( @@ -472,9 +702,21 @@ class Example extends jni.JObject { r"()Z", ); + static final _getIsUp = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public boolean getIsUp() bool getIsUp() { - return _id_getIsUp(this, const jni.jbooleanType(), []); + return _getIsUp(reference.pointer, _id_getIsUp as jni.JMethodIDPtr).boolean; } static final _id_setUp = _class.instanceMethodId( @@ -482,11 +724,22 @@ class Example extends jni.JObject { r"(Z)V", ); + static final _setUp = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: public void setUp(boolean isUp) void setUp( bool isUp, ) { - _id_setUp(this, const jni.jvoidType(), [isUp ? 1 : 0]); + _setUp(reference.pointer, _id_setUp as jni.JMethodIDPtr, isUp ? 1 : 0) + .check(); } static final _id_getCodename = _class.instanceMethodId( @@ -494,10 +747,23 @@ class Example extends jni.JObject { r"()Ljava/lang/String;", ); + static final _getCodename = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.String getCodename() /// The returned object must be released after use, by calling the [release] method. jni.JString getCodename() { - return _id_getCodename(this, const jni.JStringType(), []); + return _getCodename(reference.pointer, _id_getCodename as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_setCodename = _class.instanceMethodId( @@ -505,11 +771,24 @@ class Example extends jni.JObject { r"(Ljava/lang/String;)V", ); + static final _setCodename = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public void setCodename(java.lang.String codename) void setCodename( jni.JString codename, ) { - _id_setCodename(this, const jni.jvoidType(), [codename.reference.pointer]); + _setCodename(reference.pointer, _id_setCodename as jni.JMethodIDPtr, + codename.reference.pointer) + .check(); } static final _id_getRandom = _class.instanceMethodId( @@ -517,10 +796,23 @@ class Example extends jni.JObject { r"()Ljava/util/Random;", ); + static final _getRandom = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.util.Random getRandom() /// The returned object must be released after use, by calling the [release] method. jni.JObject getRandom() { - return _id_getRandom(this, const jni.JObjectType(), []); + return _getRandom(reference.pointer, _id_getRandom as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_setRandom = _class.instanceMethodId( @@ -528,11 +820,24 @@ class Example extends jni.JObject { r"(Ljava/util/Random;)V", ); + static final _setRandom = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public void setRandom(java.util.Random random) void setRandom( jni.JObject random, ) { - _id_setRandom(this, const jni.jvoidType(), [random.reference.pointer]); + _setRandom(reference.pointer, _id_setRandom as jni.JMethodIDPtr, + random.reference.pointer) + .check(); } static final _id_getRandomLong = _class.instanceMethodId( @@ -540,9 +845,23 @@ class Example extends jni.JObject { r"()J", ); + static final _getRandomLong = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public long getRandomLong() int getRandomLong() { - return _id_getRandomLong(this, const jni.jlongType(), []); + return _getRandomLong( + reference.pointer, _id_getRandomLong as jni.JMethodIDPtr) + .long; } static final _id_add4Longs = _class.instanceMethodId( @@ -550,6 +869,22 @@ class Example extends jni.JObject { r"(JJJJ)J", ); + static final _add4Longs = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int, int, int, int)>(); + /// from: public long add4Longs(long a, long b, long c, long d) int add4Longs( int a, @@ -557,7 +892,9 @@ class Example extends jni.JObject { int c, int d, ) { - return _id_add4Longs(this, const jni.jlongType(), [a, b, c, d]); + return _add4Longs( + reference.pointer, _id_add4Longs as jni.JMethodIDPtr, a, b, c, d) + .long; } static final _id_add8Longs = _class.instanceMethodId( @@ -565,6 +902,26 @@ class Example extends jni.JObject { r"(JJJJJJJJ)J", ); + static final _add8Longs = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + int, int, int, int, int, int, int)>(); + /// from: public long add8Longs(long a, long b, long c, long d, long e, long f, long g, long h) int add8Longs( int a, @@ -576,7 +933,9 @@ class Example extends jni.JObject { int g, int h, ) { - return _id_add8Longs(this, const jni.jlongType(), [a, b, c, d, e, f, g, h]); + return _add8Longs(reference.pointer, _id_add8Longs as jni.JMethodIDPtr, a, + b, c, d, e, f, g, h) + .long; } static final _id_getRandomNumericString = _class.instanceMethodId( @@ -584,13 +943,27 @@ class Example extends jni.JObject { r"(Ljava/util/Random;)Ljava/lang/String;", ); + static final _getRandomNumericString = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public java.lang.String getRandomNumericString(java.util.Random random) /// The returned object must be released after use, by calling the [release] method. jni.JString getRandomNumericString( jni.JObject random, ) { - return _id_getRandomNumericString( - this, const jni.JStringType(), [random.reference.pointer]); + return _getRandomNumericString( + reference.pointer, + _id_getRandomNumericString as jni.JMethodIDPtr, + random.reference.pointer) + .object(const jni.JStringType()); } static final _id_protectedMethod = _class.instanceMethodId( @@ -598,13 +971,28 @@ class Example extends jni.JObject { r"(Ljava/lang/String;Ljava/lang/String;)V", ); + static final _protectedMethod = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: protected void protectedMethod(java.lang.String a, java.lang.String b) void protectedMethod( jni.JString a, jni.JString b, ) { - _id_protectedMethod(this, const jni.jvoidType(), - [a.reference.pointer, b.reference.pointer]); + _protectedMethod(reference.pointer, _id_protectedMethod as jni.JMethodIDPtr, + a.reference.pointer, b.reference.pointer) + .check(); } static final _id_finalMethod = _class.instanceMethodId( @@ -612,9 +1000,22 @@ class Example extends jni.JObject { r"()V", ); + static final _finalMethod = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public final void finalMethod() void finalMethod() { - _id_finalMethod(this, const jni.jvoidType(), []); + _finalMethod(reference.pointer, _id_finalMethod as jni.JMethodIDPtr) + .check(); } static final _id_getList = _class.instanceMethodId( @@ -622,10 +1023,23 @@ class Example extends jni.JObject { r"()Ljava/util/List;", ); + static final _getList = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.util.List getList() /// The returned object must be released after use, by calling the [release] method. jni.JList getList() { - return _id_getList(this, const jni.JListType(jni.JStringType()), []); + return _getList(reference.pointer, _id_getList as jni.JMethodIDPtr) + .object(const jni.JListType(jni.JStringType())); } static final _id_joinStrings = _class.instanceMethodId( @@ -633,6 +1047,20 @@ class Example extends jni.JObject { r"(Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", ); + static final _joinStrings = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: public java.lang.String joinStrings(java.util.List values, java.lang.String delim) /// The returned object must be released after use, by calling the [release] method. /// @@ -641,8 +1069,9 @@ class Example extends jni.JObject { jni.JList values, jni.JString delim, ) { - return _id_joinStrings(this, const jni.JStringType(), - [values.reference.pointer, delim.reference.pointer]); + return _joinStrings(reference.pointer, _id_joinStrings as jni.JMethodIDPtr, + values.reference.pointer, delim.reference.pointer) + .object(const jni.JStringType()); } static final _id_methodWithSeveralParams = _class.instanceMethodId( @@ -650,6 +1079,31 @@ class Example extends jni.JObject { r"(CLjava/lang/String;[ILjava/lang/CharSequence;Ljava/util/List;Ljava/util/Map;)V", ); + static final _methodWithSeveralParams = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + /// from: public void methodWithSeveralParams(char ch, java.lang.String s, int[] a, T t, java.util.List lt, java.util.Map wm) void methodWithSeveralParams<$T extends jni.JObject>( int ch, @@ -664,57 +1118,106 @@ class Example extends jni.JObject { (lt.$type as jni.JListType).E, t.$type, ]) as jni.JObjType<$T>; - _id_methodWithSeveralParams(this, const jni.jvoidType(), [ - jni.JValueChar(ch), - s.reference.pointer, - a.reference.pointer, - t.reference.pointer, - lt.reference.pointer, - wm.reference.pointer - ]); + _methodWithSeveralParams( + reference.pointer, + _id_methodWithSeveralParams as jni.JMethodIDPtr, + ch, + s.reference.pointer, + a.reference.pointer, + t.reference.pointer, + lt.reference.pointer, + wm.reference.pointer) + .check(); } static final _id_new0 = _class.constructorId( r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory Example() { - return Example.fromReference(_id_new0(_class, referenceType, [])); + return Example.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } static final _id_new1 = _class.constructorId( r"(I)V", ); + static final _new1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: public void (int number) /// The returned object must be released after use, by calling the [release] method. factory Example.new1( int number, ) { return Example.fromReference( - _id_new1(_class, referenceType, [jni.JValueInt(number)])); + _new1(_class.reference.pointer, _id_new1 as jni.JMethodIDPtr, number) + .reference); } static final _id_new2 = _class.constructorId( r"(IZ)V", ); + static final _new2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64, ffi.Int64)>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int, int)>(); + /// from: public void (int number, boolean isUp) /// The returned object must be released after use, by calling the [release] method. factory Example.new2( int number, bool isUp, ) { - return Example.fromReference( - _id_new2(_class, referenceType, [jni.JValueInt(number), isUp ? 1 : 0])); + return Example.fromReference(_new2(_class.reference.pointer, + _id_new2 as jni.JMethodIDPtr, number, isUp ? 1 : 0) + .reference); } static final _id_new3 = _class.constructorId( r"(IZLjava/lang/String;)V", ); + static final _new3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Int64, + ffi.Int64, + ffi.Pointer + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + int, ffi.Pointer)>(); + /// from: public void (int number, boolean isUp, java.lang.String codename) /// The returned object must be released after use, by calling the [release] method. factory Example.new3( @@ -722,14 +1225,39 @@ class Example extends jni.JObject { bool isUp, jni.JString codename, ) { - return Example.fromReference(_id_new3(_class, referenceType, - [jni.JValueInt(number), isUp ? 1 : 0, codename.reference.pointer])); + return Example.fromReference(_new3( + _class.reference.pointer, + _id_new3 as jni.JMethodIDPtr, + number, + isUp ? 1 : 0, + codename.reference.pointer) + .reference); } static final _id_new4 = _class.constructorId( r"(IIIIIIII)V", ); + static final _new4 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + int, int, int, int, int, int, int)>(); + /// from: public void (int a, int b, int c, int d, int e, int f, int g, int h) /// The returned object must be released after use, by calling the [release] method. factory Example.new4( @@ -742,16 +1270,9 @@ class Example extends jni.JObject { int g, int h, ) { - return Example.fromReference(_id_new4(_class, referenceType, [ - jni.JValueInt(a), - jni.JValueInt(b), - jni.JValueInt(c), - jni.JValueInt(d), - jni.JValueInt(e), - jni.JValueInt(f), - jni.JValueInt(g), - jni.JValueInt(h) - ])); + return Example.fromReference(_new4(_class.reference.pointer, + _id_new4 as jni.JMethodIDPtr, a, b, c, d, e, f, g, h) + .reference); } static final _id_whichExample = _class.instanceMethodId( @@ -759,9 +1280,23 @@ class Example extends jni.JObject { r"()I", ); + static final _whichExample = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public int whichExample() int whichExample() { - return _id_whichExample(this, const jni.jintType(), []); + return _whichExample( + reference.pointer, _id_whichExample as jni.JMethodIDPtr) + .integer; } static final _id_addInts = _class.staticMethodId( @@ -769,13 +1304,23 @@ class Example extends jni.JObject { r"(II)I", ); + static final _addInts = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, + jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int64, ffi.Int64)>)>>( + "globalEnv_CallStaticIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int, int)>(); + /// from: static public int addInts(int a, int b) static int addInts( int a, int b, ) { - return _id_addInts( - _class, const jni.jintType(), [jni.JValueInt(a), jni.JValueInt(b)]); + return _addInts( + _class.reference.pointer, _id_addInts as jni.JMethodIDPtr, a, b) + .integer; } static final _id_getArr = _class.staticMethodId( @@ -783,10 +1328,23 @@ class Example extends jni.JObject { r"()[I", ); + static final _getArr = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public int[] getArr() /// The returned object must be released after use, by calling the [release] method. static jni.JArray getArr() { - return _id_getArr(_class, const jni.JArrayType(jni.jintType()), []); + return _getArr(_class.reference.pointer, _id_getArr as jni.JMethodIDPtr) + .object(const jni.JArrayType(jni.jintType())); } static final _id_addAll = _class.staticMethodId( @@ -794,11 +1352,24 @@ class Example extends jni.JObject { r"([I)I", ); + static final _addAll = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticIntMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public int addAll(int[] arr) static int addAll( jni.JArray arr, ) { - return _id_addAll(_class, const jni.jintType(), [arr.reference.pointer]); + return _addAll(_class.reference.pointer, _id_addAll as jni.JMethodIDPtr, + arr.reference.pointer) + .integer; } static final _id_getSelf = _class.instanceMethodId( @@ -806,10 +1377,23 @@ class Example extends jni.JObject { r"()Lcom/github/dart_lang/jnigen/simple_package/Example;", ); + static final _getSelf = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public com.github.dart_lang.jnigen.simple_package.Example getSelf() /// The returned object must be released after use, by calling the [release] method. Example getSelf() { - return _id_getSelf(this, const $ExampleType(), []); + return _getSelf(reference.pointer, _id_getSelf as jni.JMethodIDPtr) + .object(const $ExampleType()); } static final _id_throwException = _class.staticMethodId( @@ -817,9 +1401,23 @@ class Example extends jni.JObject { r"()V", ); + static final _throwException = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public void throwException() static void throwException() { - _id_throwException(_class, const jni.jvoidType(), []); + _throwException( + _class.reference.pointer, _id_throwException as jni.JMethodIDPtr) + .check(); } static final _id_overloaded = _class.instanceMethodId( @@ -827,9 +1425,21 @@ class Example extends jni.JObject { r"()V", ); + static final _overloaded = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void overloaded() void overloaded() { - _id_overloaded(this, const jni.jvoidType(), []); + _overloaded(reference.pointer, _id_overloaded as jni.JMethodIDPtr).check(); } static final _id_overloaded1 = _class.instanceMethodId( @@ -837,13 +1447,25 @@ class Example extends jni.JObject { r"(ILjava/lang/String;)V", ); + static final _overloaded1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + int, ffi.Pointer)>(); + /// from: public void overloaded(int a, java.lang.String b) void overloaded1( int a, jni.JString b, ) { - _id_overloaded1( - this, const jni.jvoidType(), [jni.JValueInt(a), b.reference.pointer]); + _overloaded1(reference.pointer, _id_overloaded1 as jni.JMethodIDPtr, a, + b.reference.pointer) + .check(); } static final _id_overloaded2 = _class.instanceMethodId( @@ -851,11 +1473,22 @@ class Example extends jni.JObject { r"(I)V", ); + static final _overloaded2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: public void overloaded(int a) void overloaded2( int a, ) { - _id_overloaded2(this, const jni.jvoidType(), [jni.JValueInt(a)]); + _overloaded2(reference.pointer, _id_overloaded2 as jni.JMethodIDPtr, a) + .check(); } static final _id_overloaded3 = _class.instanceMethodId( @@ -863,13 +1496,28 @@ class Example extends jni.JObject { r"(Ljava/util/List;Ljava/lang/String;)V", ); + static final _overloaded3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: public void overloaded(java.util.List a, java.lang.String b) void overloaded3( jni.JList a, jni.JString b, ) { - _id_overloaded3(this, const jni.jvoidType(), - [a.reference.pointer, b.reference.pointer]); + _overloaded3(reference.pointer, _id_overloaded3 as jni.JMethodIDPtr, + a.reference.pointer, b.reference.pointer) + .check(); } static final _id_overloaded4 = _class.instanceMethodId( @@ -877,11 +1525,24 @@ class Example extends jni.JObject { r"(Ljava/util/List;)V", ); + static final _overloaded4 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public void overloaded(java.util.List a) void overloaded4( jni.JList a, ) { - _id_overloaded4(this, const jni.jvoidType(), [a.reference.pointer]); + _overloaded4(reference.pointer, _id_overloaded4 as jni.JMethodIDPtr, + a.reference.pointer) + .check(); } } @@ -941,10 +1602,24 @@ class C2 extends jni.JObject { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory C2() { - return C2.fromReference(_id_new0(_class, referenceType, [])); + return C2.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } } @@ -990,10 +1665,24 @@ class Example1 extends jni.JObject { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory Example1() { - return Example1.fromReference(_id_new0(_class, referenceType, [])); + return Example1.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } static final _id_whichExample = _class.instanceMethodId( @@ -1001,9 +1690,23 @@ class Example1 extends jni.JObject { r"()I", ); + static final _whichExample = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public int whichExample() int whichExample() { - return _id_whichExample(this, const jni.jintType(), []); + return _whichExample( + reference.pointer, _id_whichExample as jni.JMethodIDPtr) + .integer; } } @@ -1110,6 +1813,20 @@ class GrandParent_Parent_Child<$T extends jni.JObject, $S extends jni.JObject, r"(Lcom/github/dart_lang/jnigen/generics/GrandParent$Parent;Ljava/lang/Object;)V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: public void (com.github.dart_lang.jnigen.generics.GrandParent$Parent $parent, U newValue) /// The returned object must be released after use, by calling the [release] method. factory GrandParent_Parent_Child( @@ -1132,8 +1849,9 @@ class GrandParent_Parent_Child<$T extends jni.JObject, $S extends jni.JObject, T, S, U, - _id_new0(_class, referenceType, - [$parent.reference.pointer, newValue.reference.pointer])); + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr, + $parent.reference.pointer, newValue.reference.pointer) + .reference); } } @@ -1238,6 +1956,20 @@ class GrandParent_Parent<$T extends jni.JObject, $S extends jni.JObject> r"(Lcom/github/dart_lang/jnigen/generics/GrandParent;Ljava/lang/Object;)V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: public void (com.github.dart_lang.jnigen.generics.GrandParent $parent, S newValue) /// The returned object must be released after use, by calling the [release] method. factory GrandParent_Parent( @@ -1255,8 +1987,9 @@ class GrandParent_Parent<$T extends jni.JObject, $S extends jni.JObject> return GrandParent_Parent.fromReference( T, S, - _id_new0(_class, referenceType, - [$parent.reference.pointer, newValue.reference.pointer])); + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr, + $parent.reference.pointer, newValue.reference.pointer) + .reference); } } @@ -1357,6 +2090,25 @@ class GrandParent_StaticParent_Child<$S extends jni.JObject, r"(Lcom/github/dart_lang/jnigen/generics/GrandParent$StaticParent;Ljava/lang/Object;Ljava/lang/Object;)V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + /// from: public void (com.github.dart_lang.jnigen.generics.GrandParent$StaticParent $parent, S parentValue, U value) /// The returned object must be released after use, by calling the [release] method. factory GrandParent_StaticParent_Child( @@ -1376,11 +2128,13 @@ class GrandParent_StaticParent_Child<$S extends jni.JObject, return GrandParent_StaticParent_Child.fromReference( S, U, - _id_new0(_class, referenceType, [ - $parent.reference.pointer, - parentValue.reference.pointer, - value.reference.pointer - ])); + _new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + $parent.reference.pointer, + parentValue.reference.pointer, + value.reference.pointer) + .reference); } } @@ -1463,6 +2217,17 @@ class GrandParent_StaticParent<$S extends jni.JObject> extends jni.JObject { r"(Ljava/lang/Object;)V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public void (S value) /// The returned object must be released after use, by calling the [release] method. factory GrandParent_StaticParent( @@ -1473,7 +2238,10 @@ class GrandParent_StaticParent<$S extends jni.JObject> extends jni.JObject { value.$type, ]) as jni.JObjType<$S>; return GrandParent_StaticParent.fromReference( - S, _id_new0(_class, referenceType, [value.reference.pointer])); + S, + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr, + value.reference.pointer) + .reference); } } @@ -1551,6 +2319,17 @@ class GrandParent<$T extends jni.JObject> extends jni.JObject { r"(Ljava/lang/Object;)V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public void (T value) /// The returned object must be released after use, by calling the [release] method. factory GrandParent( @@ -1561,7 +2340,10 @@ class GrandParent<$T extends jni.JObject> extends jni.JObject { value.$type, ]) as jni.JObjType<$T>; return GrandParent.fromReference( - T, _id_new0(_class, referenceType, [value.reference.pointer])); + T, + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr, + value.reference.pointer) + .reference); } static final _id_stringParent = _class.instanceMethodId( @@ -1569,13 +2351,25 @@ class GrandParent<$T extends jni.JObject> extends jni.JObject { r"()Lcom/github/dart_lang/jnigen/generics/GrandParent$Parent;", ); + static final _stringParent = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public com.github.dart_lang.jnigen.generics.GrandParent.Parent stringParent() /// The returned object must be released after use, by calling the [release] method. GrandParent_Parent stringParent() { - return _id_stringParent( - this, - const $GrandParent_ParentType(jni.JObjectType(), jni.JStringType()), - []); + return _stringParent( + reference.pointer, _id_stringParent as jni.JMethodIDPtr) + .object(const $GrandParent_ParentType( + jni.JObjectType(), jni.JStringType())); } static final _id_varParent = _class.instanceMethodId( @@ -1583,6 +2377,17 @@ class GrandParent<$T extends jni.JObject> extends jni.JObject { r"(Ljava/lang/Object;)Lcom/github/dart_lang/jnigen/generics/GrandParent$Parent;", ); + static final _varParent = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public com.github.dart_lang.jnigen.generics.GrandParent.Parent varParent(S nestedValue) /// The returned object must be released after use, by calling the [release] method. GrandParent_Parent varParent<$S extends jni.JObject>( @@ -1592,10 +2397,9 @@ class GrandParent<$T extends jni.JObject> extends jni.JObject { S ??= jni.lowestCommonSuperType([ nestedValue.$type, ]) as jni.JObjType<$S>; - return _id_varParent( - this, - $GrandParent_ParentType(const jni.JObjectType(), S), - [nestedValue.reference.pointer]); + return _varParent(reference.pointer, _id_varParent as jni.JMethodIDPtr, + nestedValue.reference.pointer) + .object($GrandParent_ParentType(const jni.JObjectType(), S)); } static final _id_stringStaticParent = _class.staticMethodId( @@ -1603,11 +2407,24 @@ class GrandParent<$T extends jni.JObject> extends jni.JObject { r"()Lcom/github/dart_lang/jnigen/generics/GrandParent$StaticParent;", ); + static final _stringStaticParent = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public com.github.dart_lang.jnigen.generics.GrandParent.StaticParent stringStaticParent() /// The returned object must be released after use, by calling the [release] method. static GrandParent_StaticParent stringStaticParent() { - return _id_stringStaticParent( - _class, const $GrandParent_StaticParentType(jni.JStringType()), []); + return _stringStaticParent(_class.reference.pointer, + _id_stringStaticParent as jni.JMethodIDPtr) + .object(const $GrandParent_StaticParentType(jni.JStringType())); } static final _id_varStaticParent = _class.staticMethodId( @@ -1615,6 +2432,17 @@ class GrandParent<$T extends jni.JObject> extends jni.JObject { r"(Ljava/lang/Object;)Lcom/github/dart_lang/jnigen/generics/GrandParent$StaticParent;", ); + static final _varStaticParent = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public com.github.dart_lang.jnigen.generics.GrandParent.StaticParent varStaticParent(S value) /// The returned object must be released after use, by calling the [release] method. static GrandParent_StaticParent<$S> varStaticParent<$S extends jni.JObject>( @@ -1624,8 +2452,9 @@ class GrandParent<$T extends jni.JObject> extends jni.JObject { S ??= jni.lowestCommonSuperType([ value.$type, ]) as jni.JObjType<$S>; - return _id_varStaticParent( - _class, $GrandParent_StaticParentType(S), [value.reference.pointer]); + return _varStaticParent(_class.reference.pointer, + _id_varStaticParent as jni.JMethodIDPtr, value.reference.pointer) + .object($GrandParent_StaticParentType(S)); } static final _id_staticParentWithSameType = _class.instanceMethodId( @@ -1633,11 +2462,24 @@ class GrandParent<$T extends jni.JObject> extends jni.JObject { r"()Lcom/github/dart_lang/jnigen/generics/GrandParent$StaticParent;", ); + static final _staticParentWithSameType = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public com.github.dart_lang.jnigen.generics.GrandParent.StaticParent staticParentWithSameType() /// The returned object must be released after use, by calling the [release] method. GrandParent_StaticParent<$T> staticParentWithSameType() { - return _id_staticParentWithSameType( - this, $GrandParent_StaticParentType(T), []); + return _staticParentWithSameType( + reference.pointer, _id_staticParentWithSameType as jni.JMethodIDPtr) + .object($GrandParent_StaticParentType(T)); } } @@ -1733,6 +2575,25 @@ class MyMap_MyEntry<$K extends jni.JObject, $V extends jni.JObject> r"(Lcom/github/dart_lang/jnigen/generics/MyMap;Ljava/lang/Object;Ljava/lang/Object;)V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + /// from: public void (com.github.dart_lang.jnigen.generics.MyMap $parent, K key, V value) /// The returned object must be released after use, by calling the [release] method. factory MyMap_MyEntry( @@ -1753,11 +2614,13 @@ class MyMap_MyEntry<$K extends jni.JObject, $V extends jni.JObject> return MyMap_MyEntry.fromReference( K, V, - _id_new0(_class, referenceType, [ - $parent.reference.pointer, - key.reference.pointer, - value.reference.pointer - ])); + _new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + $parent.reference.pointer, + key.reference.pointer, + value.reference.pointer) + .reference); } } @@ -1831,13 +2694,29 @@ class MyMap<$K extends jni.JObject, $V extends jni.JObject> r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory MyMap({ required jni.JObjType<$K> K, required jni.JObjType<$V> V, }) { - return MyMap.fromReference(K, V, _id_new0(_class, referenceType, [])); + return MyMap.fromReference( + K, + V, + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } static final _id_get0 = _class.instanceMethodId( @@ -1845,12 +2724,25 @@ class MyMap<$K extends jni.JObject, $V extends jni.JObject> r"(Ljava/lang/Object;)Ljava/lang/Object;", ); + static final _get0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public V get(K key) /// The returned object must be released after use, by calling the [release] method. $V get0( $K key, ) { - return _id_get0(this, V, [key.reference.pointer]); + return _get0(reference.pointer, _id_get0 as jni.JMethodIDPtr, + key.reference.pointer) + .object(V); } static final _id_put = _class.instanceMethodId( @@ -1858,13 +2750,29 @@ class MyMap<$K extends jni.JObject, $V extends jni.JObject> r"(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", ); + static final _put = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: public V put(K key, V value) /// The returned object must be released after use, by calling the [release] method. $V put( $K key, $V value, ) { - return _id_put(this, V, [key.reference.pointer, value.reference.pointer]); + return _put(reference.pointer, _id_put as jni.JMethodIDPtr, + key.reference.pointer, value.reference.pointer) + .object(V); } static final _id_entryStack = _class.instanceMethodId( @@ -1872,14 +2780,24 @@ class MyMap<$K extends jni.JObject, $V extends jni.JObject> r"()Lcom/github/dart_lang/jnigen/generics/MyStack;", ); + static final _entryStack = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public com.github.dart_lang.jnigen.generics.MyStack.MyEntry> entryStack() /// The returned object must be released after use, by calling the [release] method. MyStack> entryStack() { - return _id_entryStack( - this, - const $MyStackType( - $MyMap_MyEntryType(jni.JObjectType(), jni.JObjectType())), - []); + return _entryStack(reference.pointer, _id_entryStack as jni.JMethodIDPtr) + .object(const $MyStackType( + $MyMap_MyEntryType(jni.JObjectType(), jni.JObjectType()))); } } @@ -1946,12 +2864,27 @@ class MyStack<$T extends jni.JObject> extends jni.JObject { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory MyStack({ required jni.JObjType<$T> T, }) { - return MyStack.fromReference(T, _id_new0(_class, referenceType, [])); + return MyStack.fromReference( + T, + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } static final _id_fromArray = _class.staticMethodId( @@ -1959,6 +2892,17 @@ class MyStack<$T extends jni.JObject> extends jni.JObject { r"([Ljava/lang/Object;)Lcom/github/dart_lang/jnigen/generics/MyStack;", ); + static final _fromArray = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public com.github.dart_lang.jnigen.generics.MyStack fromArray(T[] arr) /// The returned object must be released after use, by calling the [release] method. static MyStack<$T> fromArray<$T extends jni.JObject>( @@ -1968,7 +2912,9 @@ class MyStack<$T extends jni.JObject> extends jni.JObject { T ??= jni.lowestCommonSuperType([ ((arr.$type as jni.JArrayType).elementType as jni.JObjType), ]) as jni.JObjType<$T>; - return _id_fromArray(_class, $MyStackType(T), [arr.reference.pointer]); + return _fromArray(_class.reference.pointer, + _id_fromArray as jni.JMethodIDPtr, arr.reference.pointer) + .object($MyStackType(T)); } static final _id_fromArrayOfArrayOfGrandParents = _class.staticMethodId( @@ -1976,6 +2922,17 @@ class MyStack<$T extends jni.JObject> extends jni.JObject { r"([[Lcom/github/dart_lang/jnigen/generics/GrandParent;)Lcom/github/dart_lang/jnigen/generics/MyStack;", ); + static final _fromArrayOfArrayOfGrandParents = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public com.github.dart_lang.jnigen.generics.MyStack fromArrayOfArrayOfGrandParents(com.github.dart_lang.jnigen.generics.GrandParent[][] arr) /// The returned object must be released after use, by calling the [release] method. static MyStack<$S> fromArrayOfArrayOfGrandParents<$S extends jni.JObject>( @@ -1988,8 +2945,11 @@ class MyStack<$T extends jni.JObject> extends jni.JObject { .elementType as jni.JObjType) as $GrandParentType) .T, ]) as jni.JObjType<$S>; - return _id_fromArrayOfArrayOfGrandParents( - _class, $MyStackType(S), [arr.reference.pointer]); + return _fromArrayOfArrayOfGrandParents( + _class.reference.pointer, + _id_fromArrayOfArrayOfGrandParents as jni.JMethodIDPtr, + arr.reference.pointer) + .object($MyStackType(S)); } static final _id_of = _class.staticMethodId( @@ -1997,12 +2957,25 @@ class MyStack<$T extends jni.JObject> extends jni.JObject { r"()Lcom/github/dart_lang/jnigen/generics/MyStack;", ); + static final _of = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public com.github.dart_lang.jnigen.generics.MyStack of() /// The returned object must be released after use, by calling the [release] method. static MyStack<$T> of<$T extends jni.JObject>({ required jni.JObjType<$T> T, }) { - return _id_of(_class, $MyStackType(T), []); + return _of(_class.reference.pointer, _id_of as jni.JMethodIDPtr) + .object($MyStackType(T)); } static final _id_of1 = _class.staticMethodId( @@ -2010,6 +2983,17 @@ class MyStack<$T extends jni.JObject> extends jni.JObject { r"(Ljava/lang/Object;)Lcom/github/dart_lang/jnigen/generics/MyStack;", ); + static final _of1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public com.github.dart_lang.jnigen.generics.MyStack of(T obj) /// The returned object must be released after use, by calling the [release] method. static MyStack<$T> of1<$T extends jni.JObject>( @@ -2019,7 +3003,9 @@ class MyStack<$T extends jni.JObject> extends jni.JObject { T ??= jni.lowestCommonSuperType([ obj.$type, ]) as jni.JObjType<$T>; - return _id_of1(_class, $MyStackType(T), [obj.reference.pointer]); + return _of1(_class.reference.pointer, _id_of1 as jni.JMethodIDPtr, + obj.reference.pointer) + .object($MyStackType(T)); } static final _id_of2 = _class.staticMethodId( @@ -2027,6 +3013,20 @@ class MyStack<$T extends jni.JObject> extends jni.JObject { r"(Ljava/lang/Object;Ljava/lang/Object;)Lcom/github/dart_lang/jnigen/generics/MyStack;", ); + static final _of2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: static public com.github.dart_lang.jnigen.generics.MyStack of(T obj, T obj2) /// The returned object must be released after use, by calling the [release] method. static MyStack<$T> of2<$T extends jni.JObject>( @@ -2038,8 +3038,9 @@ class MyStack<$T extends jni.JObject> extends jni.JObject { obj2.$type, obj.$type, ]) as jni.JObjType<$T>; - return _id_of2(_class, $MyStackType(T), - [obj.reference.pointer, obj2.reference.pointer]); + return _of2(_class.reference.pointer, _id_of2 as jni.JMethodIDPtr, + obj.reference.pointer, obj2.reference.pointer) + .object($MyStackType(T)); } static final _id_push = _class.instanceMethodId( @@ -2047,11 +3048,24 @@ class MyStack<$T extends jni.JObject> extends jni.JObject { r"(Ljava/lang/Object;)V", ); + static final _push = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public void push(T item) void push( $T item, ) { - _id_push(this, const jni.jvoidType(), [item.reference.pointer]); + _push(reference.pointer, _id_push as jni.JMethodIDPtr, + item.reference.pointer) + .check(); } static final _id_pop = _class.instanceMethodId( @@ -2059,10 +3073,22 @@ class MyStack<$T extends jni.JObject> extends jni.JObject { r"()Ljava/lang/Object;", ); + static final _pop = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public T pop() /// The returned object must be released after use, by calling the [release] method. $T pop() { - return _id_pop(this, T, []); + return _pop(reference.pointer, _id_pop as jni.JMethodIDPtr).object(T); } static final _id_size = _class.instanceMethodId( @@ -2070,9 +3096,21 @@ class MyStack<$T extends jni.JObject> extends jni.JObject { r"()I", ); + static final _size = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public int size() int size() { - return _id_size(this, const jni.jintType(), []); + return _size(reference.pointer, _id_size as jni.JMethodIDPtr).integer; } } @@ -2136,12 +3174,27 @@ class StringKeyedMap<$V extends jni.JObject> extends MyMap { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory StringKeyedMap({ required jni.JObjType<$V> V, }) { - return StringKeyedMap.fromReference(V, _id_new0(_class, referenceType, [])); + return StringKeyedMap.fromReference( + V, + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } } @@ -2196,10 +3249,24 @@ class StringStack extends MyStack { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory StringStack() { - return StringStack.fromReference(_id_new0(_class, referenceType, [])); + return StringStack.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } } @@ -2256,13 +3323,27 @@ class StringValuedMap<$K extends jni.JObject> extends MyMap<$K, jni.JString> { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory StringValuedMap({ required jni.JObjType<$K> K, }) { return StringValuedMap.fromReference( - K, _id_new0(_class, referenceType, [])); + K, + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } } @@ -2328,11 +3409,24 @@ class MyInterface<$T extends jni.JObject> extends jni.JObject { r"(Ljava/lang/String;)V", ); + static final _voidCallback = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public abstract void voidCallback(java.lang.String s) void voidCallback( jni.JString s, ) { - _id_voidCallback(this, const jni.jvoidType(), [s.reference.pointer]); + _voidCallback(reference.pointer, _id_voidCallback as jni.JMethodIDPtr, + s.reference.pointer) + .check(); } static final _id_stringCallback = _class.instanceMethodId( @@ -2340,13 +3434,25 @@ class MyInterface<$T extends jni.JObject> extends jni.JObject { r"(Ljava/lang/String;)Ljava/lang/String;", ); + static final _stringCallback = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public abstract java.lang.String stringCallback(java.lang.String s) /// The returned object must be released after use, by calling the [release] method. jni.JString stringCallback( jni.JString s, ) { - return _id_stringCallback( - this, const jni.JStringType(), [s.reference.pointer]); + return _stringCallback(reference.pointer, + _id_stringCallback as jni.JMethodIDPtr, s.reference.pointer) + .object(const jni.JStringType()); } static final _id_varCallback = _class.instanceMethodId( @@ -2354,12 +3460,25 @@ class MyInterface<$T extends jni.JObject> extends jni.JObject { r"(Ljava/lang/Object;)Ljava/lang/Object;", ); + static final _varCallback = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public abstract T varCallback(T t) /// The returned object must be released after use, by calling the [release] method. $T varCallback( $T t, ) { - return _id_varCallback(this, T, [t.reference.pointer]); + return _varCallback(reference.pointer, _id_varCallback as jni.JMethodIDPtr, + t.reference.pointer) + .object(T); } static final _id_manyPrimitives = _class.instanceMethodId( @@ -2367,6 +3486,22 @@ class MyInterface<$T extends jni.JObject> extends jni.JObject { r"(IZCD)J", ); + static final _manyPrimitives = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Double + )>)>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + int, int, double)>(); + /// from: public abstract long manyPrimitives(int a, boolean b, char c, double d) int manyPrimitives( int a, @@ -2374,8 +3509,9 @@ class MyInterface<$T extends jni.JObject> extends jni.JObject { int c, double d, ) { - return _id_manyPrimitives(this, const jni.jlongType(), - [jni.JValueInt(a), b ? 1 : 0, jni.JValueChar(c), d]); + return _manyPrimitives(reference.pointer, + _id_manyPrimitives as jni.JMethodIDPtr, a, b ? 1 : 0, c, d) + .long; } /// Maps a specific port to the implemented interface. @@ -2592,11 +3728,24 @@ class MyInterfaceConsumer extends jni.JObject { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory MyInterfaceConsumer() { return MyInterfaceConsumer.fromReference( - _id_new0(_class, referenceType, [])); + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } static final _id_consumeOnAnotherThread = _class.staticMethodId( @@ -2604,6 +3753,33 @@ class MyInterfaceConsumer extends jni.JObject { r"(Lcom/github/dart_lang/jnigen/interfaces/MyInterface;Ljava/lang/String;IZCDLjava/lang/Object;)V", ); + static final _consumeOnAnotherThread = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Double, + ffi.Pointer + )>)>>("globalEnv_CallStaticVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + int, + int, + int, + double, + ffi.Pointer)>(); + /// from: static public void consumeOnAnotherThread(com.github.dart_lang.jnigen.interfaces.MyInterface myInterface, java.lang.String s, int a, boolean b, char c, double d, T t) static void consumeOnAnotherThread<$T extends jni.JObject>( MyInterface<$T> myInterface, @@ -2619,15 +3795,17 @@ class MyInterfaceConsumer extends jni.JObject { t.$type, (myInterface.$type as $MyInterfaceType).T, ]) as jni.JObjType<$T>; - _id_consumeOnAnotherThread(_class, const jni.jvoidType(), [ - myInterface.reference.pointer, - s.reference.pointer, - jni.JValueInt(a), - b ? 1 : 0, - jni.JValueChar(c), - d, - t.reference.pointer - ]); + _consumeOnAnotherThread( + _class.reference.pointer, + _id_consumeOnAnotherThread as jni.JMethodIDPtr, + myInterface.reference.pointer, + s.reference.pointer, + a, + b ? 1 : 0, + c, + d, + t.reference.pointer) + .check(); } static final _id_consumeOnSameThread = _class.staticMethodId( @@ -2635,6 +3813,33 @@ class MyInterfaceConsumer extends jni.JObject { r"(Lcom/github/dart_lang/jnigen/interfaces/MyInterface;Ljava/lang/String;IZCDLjava/lang/Object;)V", ); + static final _consumeOnSameThread = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Double, + ffi.Pointer + )>)>>("globalEnv_CallStaticVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + int, + int, + int, + double, + ffi.Pointer)>(); + /// from: static public void consumeOnSameThread(com.github.dart_lang.jnigen.interfaces.MyInterface myInterface, java.lang.String s, int a, boolean b, char c, double d, T t) static void consumeOnSameThread<$T extends jni.JObject>( MyInterface<$T> myInterface, @@ -2650,15 +3855,17 @@ class MyInterfaceConsumer extends jni.JObject { t.$type, (myInterface.$type as $MyInterfaceType).T, ]) as jni.JObjType<$T>; - _id_consumeOnSameThread(_class, const jni.jvoidType(), [ - myInterface.reference.pointer, - s.reference.pointer, - jni.JValueInt(a), - b ? 1 : 0, - jni.JValueChar(c), - d, - t.reference.pointer - ]); + _consumeOnSameThread( + _class.reference.pointer, + _id_consumeOnSameThread as jni.JMethodIDPtr, + myInterface.reference.pointer, + s.reference.pointer, + a, + b ? 1 : 0, + c, + d, + t.reference.pointer) + .check(); } } @@ -2708,9 +3915,21 @@ class MyRunnable extends jni.JObject { r"()V", ); + static final _run = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract void run() void run() { - _id_run(this, const jni.jvoidType(), []); + _run(reference.pointer, _id_run as jni.JMethodIDPtr).check(); } /// Maps a specific port to the implemented interface. @@ -2860,13 +4079,25 @@ class MyRunnableRunner extends jni.JObject { r"(Lcom/github/dart_lang/jnigen/interfaces/MyRunnable;)V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public void (com.github.dart_lang.jnigen.interfaces.MyRunnable runnable) /// The returned object must be released after use, by calling the [release] method. factory MyRunnableRunner( MyRunnable runnable, ) { - return MyRunnableRunner.fromReference( - _id_new0(_class, referenceType, [runnable.reference.pointer])); + return MyRunnableRunner.fromReference(_new0(_class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, runnable.reference.pointer) + .reference); } static final _id_runOnSameThread = _class.instanceMethodId( @@ -2874,9 +4105,22 @@ class MyRunnableRunner extends jni.JObject { r"()V", ); + static final _runOnSameThread = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void runOnSameThread() void runOnSameThread() { - _id_runOnSameThread(this, const jni.jvoidType(), []); + _runOnSameThread(reference.pointer, _id_runOnSameThread as jni.JMethodIDPtr) + .check(); } static final _id_runOnAnotherThread = _class.instanceMethodId( @@ -2884,9 +4128,23 @@ class MyRunnableRunner extends jni.JObject { r"()V", ); + static final _runOnAnotherThread = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void runOnAnotherThread() void runOnAnotherThread() { - _id_runOnAnotherThread(this, const jni.jvoidType(), []); + _runOnAnotherThread( + reference.pointer, _id_runOnAnotherThread as jni.JMethodIDPtr) + .check(); } } @@ -2936,11 +4194,23 @@ class JsonSerializable_Case extends jni.JObject { r"()[Lcom/github/dart_lang/jnigen/annotations/JsonSerializable$Case;", ); + static final _values = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public com.github.dart_lang.jnigen.annotations.JsonSerializable.Case[] values() /// The returned object must be released after use, by calling the [release] method. static jni.JArray values() { - return _id_values( - _class, const jni.JArrayType($JsonSerializable_CaseType()), []); + return _values(_class.reference.pointer, _id_values as jni.JMethodIDPtr) + .object(const jni.JArrayType($JsonSerializable_CaseType())); } static final _id_valueOf = _class.staticMethodId( @@ -2948,13 +4218,25 @@ class JsonSerializable_Case extends jni.JObject { r"(Ljava/lang/String;)Lcom/github/dart_lang/jnigen/annotations/JsonSerializable$Case;", ); + static final _valueOf = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public com.github.dart_lang.jnigen.annotations.JsonSerializable.Case valueOf(java.lang.String name) /// The returned object must be released after use, by calling the [release] method. static JsonSerializable_Case valueOf( jni.JString name, ) { - return _id_valueOf( - _class, const $JsonSerializable_CaseType(), [name.reference.pointer]); + return _valueOf(_class.reference.pointer, _id_valueOf as jni.JMethodIDPtr, + name.reference.pointer) + .object(const $JsonSerializable_CaseType()); } } @@ -3005,10 +4287,23 @@ class JsonSerializable extends jni.JObject { r"()Lcom/github/dart_lang/jnigen/annotations/JsonSerializable$Case;", ); + static final _value = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract com.github.dart_lang.jnigen.annotations.JsonSerializable$Case value() /// The returned object must be released after use, by calling the [release] method. JsonSerializable_Case value() { - return _id_value(this, const $JsonSerializable_CaseType(), []); + return _value(reference.pointer, _id_value as jni.JMethodIDPtr) + .object(const $JsonSerializable_CaseType()); } /// Maps a specific port to the implemented interface. @@ -3149,10 +4444,24 @@ class MyDataClass extends jni.JObject { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory MyDataClass() { - return MyDataClass.fromReference(_id_new0(_class, referenceType, [])); + return MyDataClass.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } } @@ -3201,10 +4510,23 @@ class Color extends jni.JObject { r"()[Lcom/github/dart_lang/jnigen/simple_package/Color;", ); + static final _values = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public com.github.dart_lang.jnigen.simple_package.Color[] values() /// The returned object must be released after use, by calling the [release] method. static jni.JArray values() { - return _id_values(_class, const jni.JArrayType($ColorType()), []); + return _values(_class.reference.pointer, _id_values as jni.JMethodIDPtr) + .object(const jni.JArrayType($ColorType())); } static final _id_valueOf = _class.staticMethodId( @@ -3212,12 +4534,25 @@ class Color extends jni.JObject { r"(Ljava/lang/String;)Lcom/github/dart_lang/jnigen/simple_package/Color;", ); + static final _valueOf = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public com.github.dart_lang.jnigen.simple_package.Color valueOf(java.lang.String name) /// The returned object must be released after use, by calling the [release] method. static Color valueOf( jni.JString name, ) { - return _id_valueOf(_class, const $ColorType(), [name.reference.pointer]); + return _valueOf(_class.reference.pointer, _id_valueOf as jni.JMethodIDPtr, + name.reference.pointer) + .object(const $ColorType()); } } @@ -3264,29 +4599,70 @@ class Exceptions extends jni.JObject { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory Exceptions() { - return Exceptions.fromReference(_id_new0(_class, referenceType, [])); + return Exceptions.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } static final _id_new1 = _class.constructorId( r"(F)V", ); + static final _new1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Double,)>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, double)>(); + /// from: public void (float x) /// The returned object must be released after use, by calling the [release] method. factory Exceptions.new1( double x, ) { return Exceptions.fromReference( - _id_new1(_class, referenceType, [jni.JValueFloat(x)])); + _new1(_class.reference.pointer, _id_new1 as jni.JMethodIDPtr, x) + .reference); } static final _id_new2 = _class.constructorId( r"(IIIIII)V", ); + static final _new2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + int, int, int, int, int)>(); + /// from: public void (int a, int b, int c, int d, int e, int f) /// The returned object must be released after use, by calling the [release] method. factory Exceptions.new2( @@ -3297,14 +4673,9 @@ class Exceptions extends jni.JObject { int e, int f, ) { - return Exceptions.fromReference(_id_new2(_class, referenceType, [ - jni.JValueInt(a), - jni.JValueInt(b), - jni.JValueInt(c), - jni.JValueInt(d), - jni.JValueInt(e), - jni.JValueInt(f) - ])); + return Exceptions.fromReference(_new2(_class.reference.pointer, + _id_new2 as jni.JMethodIDPtr, a, b, c, d, e, f) + .reference); } static final _id_staticObjectMethod = _class.staticMethodId( @@ -3312,10 +4683,24 @@ class Exceptions extends jni.JObject { r"()Ljava/lang/Object;", ); + static final _staticObjectMethod = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public java.lang.Object staticObjectMethod() /// The returned object must be released after use, by calling the [release] method. static jni.JObject staticObjectMethod() { - return _id_staticObjectMethod(_class, const jni.JObjectType(), []); + return _staticObjectMethod(_class.reference.pointer, + _id_staticObjectMethod as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_staticIntMethod = _class.staticMethodId( @@ -3323,9 +4708,23 @@ class Exceptions extends jni.JObject { r"()I", ); + static final _staticIntMethod = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public int staticIntMethod() static int staticIntMethod() { - return _id_staticIntMethod(_class, const jni.jintType(), []); + return _staticIntMethod( + _class.reference.pointer, _id_staticIntMethod as jni.JMethodIDPtr) + .integer; } static final _id_staticObjectArrayMethod = _class.staticMethodId( @@ -3333,11 +4732,24 @@ class Exceptions extends jni.JObject { r"()[Ljava/lang/Object;", ); + static final _staticObjectArrayMethod = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public java.lang.Object[] staticObjectArrayMethod() /// The returned object must be released after use, by calling the [release] method. static jni.JArray staticObjectArrayMethod() { - return _id_staticObjectArrayMethod( - _class, const jni.JArrayType(jni.JObjectType()), []); + return _staticObjectArrayMethod(_class.reference.pointer, + _id_staticObjectArrayMethod as jni.JMethodIDPtr) + .object(const jni.JArrayType(jni.JObjectType())); } static final _id_staticIntArrayMethod = _class.staticMethodId( @@ -3345,11 +4757,24 @@ class Exceptions extends jni.JObject { r"()[I", ); + static final _staticIntArrayMethod = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public int[] staticIntArrayMethod() /// The returned object must be released after use, by calling the [release] method. static jni.JArray staticIntArrayMethod() { - return _id_staticIntArrayMethod( - _class, const jni.JArrayType(jni.jintType()), []); + return _staticIntArrayMethod(_class.reference.pointer, + _id_staticIntArrayMethod as jni.JMethodIDPtr) + .object(const jni.JArrayType(jni.jintType())); } static final _id_objectMethod = _class.instanceMethodId( @@ -3357,10 +4782,24 @@ class Exceptions extends jni.JObject { r"()Ljava/lang/Object;", ); + static final _objectMethod = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.Object objectMethod() /// The returned object must be released after use, by calling the [release] method. jni.JObject objectMethod() { - return _id_objectMethod(this, const jni.JObjectType(), []); + return _objectMethod( + reference.pointer, _id_objectMethod as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_intMethod = _class.instanceMethodId( @@ -3368,9 +4807,22 @@ class Exceptions extends jni.JObject { r"()I", ); + static final _intMethod = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public int intMethod() int intMethod() { - return _id_intMethod(this, const jni.jintType(), []); + return _intMethod(reference.pointer, _id_intMethod as jni.JMethodIDPtr) + .integer; } static final _id_objectArrayMethod = _class.instanceMethodId( @@ -3378,11 +4830,24 @@ class Exceptions extends jni.JObject { r"()[Ljava/lang/Object;", ); + static final _objectArrayMethod = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.Object[] objectArrayMethod() /// The returned object must be released after use, by calling the [release] method. jni.JArray objectArrayMethod() { - return _id_objectArrayMethod( - this, const jni.JArrayType(jni.JObjectType()), []); + return _objectArrayMethod( + reference.pointer, _id_objectArrayMethod as jni.JMethodIDPtr) + .object(const jni.JArrayType(jni.JObjectType())); } static final _id_intArrayMethod = _class.instanceMethodId( @@ -3390,10 +4855,24 @@ class Exceptions extends jni.JObject { r"()[I", ); + static final _intArrayMethod = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public int[] intArrayMethod() /// The returned object must be released after use, by calling the [release] method. jni.JArray intArrayMethod() { - return _id_intArrayMethod(this, const jni.JArrayType(jni.jintType()), []); + return _intArrayMethod( + reference.pointer, _id_intArrayMethod as jni.JMethodIDPtr) + .object(const jni.JArrayType(jni.jintType())); } static final _id_throwNullPointerException = _class.instanceMethodId( @@ -3401,9 +4880,23 @@ class Exceptions extends jni.JObject { r"()I", ); + static final _throwNullPointerException = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public int throwNullPointerException() int throwNullPointerException() { - return _id_throwNullPointerException(this, const jni.jintType(), []); + return _throwNullPointerException(reference.pointer, + _id_throwNullPointerException as jni.JMethodIDPtr) + .integer; } static final _id_throwFileNotFoundException = _class.instanceMethodId( @@ -3411,10 +4904,24 @@ class Exceptions extends jni.JObject { r"()Ljava/io/InputStream;", ); + static final _throwFileNotFoundException = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.io.InputStream throwFileNotFoundException() /// The returned object must be released after use, by calling the [release] method. jni.JObject throwFileNotFoundException() { - return _id_throwFileNotFoundException(this, const jni.JObjectType(), []); + return _throwFileNotFoundException(reference.pointer, + _id_throwFileNotFoundException as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_throwClassCastException = _class.instanceMethodId( @@ -3422,10 +4929,24 @@ class Exceptions extends jni.JObject { r"()Ljava/io/FileInputStream;", ); + static final _throwClassCastException = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.io.FileInputStream throwClassCastException() /// The returned object must be released after use, by calling the [release] method. jni.JObject throwClassCastException() { - return _id_throwClassCastException(this, const jni.JObjectType(), []); + return _throwClassCastException( + reference.pointer, _id_throwClassCastException as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_throwArrayIndexException = _class.instanceMethodId( @@ -3433,9 +4954,23 @@ class Exceptions extends jni.JObject { r"()I", ); + static final _throwArrayIndexException = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public int throwArrayIndexException() int throwArrayIndexException() { - return _id_throwArrayIndexException(this, const jni.jintType(), []); + return _throwArrayIndexException( + reference.pointer, _id_throwArrayIndexException as jni.JMethodIDPtr) + .integer; } static final _id_throwArithmeticException = _class.instanceMethodId( @@ -3443,9 +4978,23 @@ class Exceptions extends jni.JObject { r"()I", ); + static final _throwArithmeticException = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public int throwArithmeticException() int throwArithmeticException() { - return _id_throwArithmeticException(this, const jni.jintType(), []); + return _throwArithmeticException( + reference.pointer, _id_throwArithmeticException as jni.JMethodIDPtr) + .integer; } static final _id_throwLoremIpsum = _class.staticMethodId( @@ -3453,9 +5002,23 @@ class Exceptions extends jni.JObject { r"()V", ); + static final _throwLoremIpsum = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public void throwLoremIpsum() static void throwLoremIpsum() { - _id_throwLoremIpsum(_class, const jni.jvoidType(), []); + _throwLoremIpsum( + _class.reference.pointer, _id_throwLoremIpsum as jni.JMethodIDPtr) + .check(); } } @@ -3633,10 +5196,24 @@ class Fields extends jni.JObject { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory Fields() { - return Fields.fromReference(_id_new0(_class, referenceType, [])); + return Fields.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } } @@ -3710,10 +5287,24 @@ class Fields_Nested extends jni.JObject { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory Fields_Nested() { - return Fields_Nested.fromReference(_id_new0(_class, referenceType, [])); + return Fields_Nested.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } } @@ -3778,6 +5369,18 @@ class GenericTypeParams<$S extends jni.JObject, $K extends jni.JObject> r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory GenericTypeParams({ @@ -3785,7 +5388,10 @@ class GenericTypeParams<$S extends jni.JObject, $K extends jni.JObject> required jni.JObjType<$K> K, }) { return GenericTypeParams.fromReference( - S, K, _id_new0(_class, referenceType, [])); + S, + K, + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } } @@ -3843,10 +5449,24 @@ class StringMap extends StringKeyedMap { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory StringMap() { - return StringMap.fromReference(_id_new0(_class, referenceType, [])); + return StringMap.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } } diff --git a/pkgs/jnigen/test/simple_package_test/c_based/c_bindings/.clang-format b/pkgs/jnigen/test/simple_package_test/c_based/c_bindings/.clang-format deleted file mode 100644 index a256c2f097..0000000000 --- a/pkgs/jnigen/test/simple_package_test/c_based/c_bindings/.clang-format +++ /dev/null @@ -1,15 +0,0 @@ -# From dart SDK: https://github.com/dart-lang/sdk/blob/main/.clang-format - -# Defines the Chromium style for automatic reformatting. -# http://clang.llvm.org/docs/ClangFormatStyleOptions.html -BasedOnStyle: Chromium - -# clang-format doesn't seem to do a good job of this for longer comments. -ReflowComments: 'false' - -# We have lots of these. Though we need to put them all in curly braces, -# clang-format can't do that. -AllowShortIfStatementsOnASingleLine: 'true' - -# Put escaped newlines into the rightmost column. -AlignEscapedNewlinesLeft: false diff --git a/pkgs/jnigen/test/simple_package_test/c_based/c_bindings/CMakeLists.txt b/pkgs/jnigen/test/simple_package_test/c_based/c_bindings/CMakeLists.txt deleted file mode 100644 index eeb352dc0a..0000000000 --- a/pkgs/jnigen/test/simple_package_test/c_based/c_bindings/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -# jni_native_build (Build with jni:setup. Do not delete this line.) - -# The Flutter tooling requires that developers have CMake 3.10 or later -# installed. You should not increase this version, as doing so will cause -# the plugin to fail to compile for some customers of the plugin. -cmake_minimum_required(VERSION 3.10) - -project(simple_package VERSION 0.0.1 LANGUAGES C) - -add_library(simple_package SHARED - "./simple_package.c" -) - -set_target_properties(simple_package PROPERTIES - OUTPUT_NAME "simple_package" -) - -target_compile_definitions(simple_package PUBLIC DART_SHARED_LIB) - -if(WIN32) - set_target_properties(${TARGET_NAME} PROPERTIES - LINK_FLAGS "/DELAYLOAD:jvm.dll") -endif() - -if (ANDROID) - target_link_libraries(simple_package log) -else() - find_package(Java REQUIRED) - find_package(JNI REQUIRED) - include_directories(${JNI_INCLUDE_DIRS}) - target_link_libraries(simple_package ${JNI_LIBRARIES}) -endif() diff --git a/pkgs/jnigen/test/simple_package_test/c_based/c_bindings/dartjni.h b/pkgs/jnigen/test/simple_package_test/c_based/c_bindings/dartjni.h deleted file mode 100644 index f834d1577b..0000000000 --- a/pkgs/jnigen/test/simple_package_test/c_based/c_bindings/dartjni.h +++ /dev/null @@ -1,383 +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. - -#pragma once - -// Note: include appropriate system jni.h as found by CMake, not third_party/jni.h. -#include -#include -#include -#include - -#if _WIN32 -#include -#else -#include -#include -#endif - -#if _WIN32 -#define FFI_PLUGIN_EXPORT __declspec(dllexport) -#else -#define FFI_PLUGIN_EXPORT -#endif - -#if defined _WIN32 -#define thread_local __declspec(thread) -#else -#define thread_local __thread -#endif - -#ifdef __ANDROID__ -#include -#endif - -#ifdef __ANDROID__ -#define __ENVP_CAST (JNIEnv**) -#else -#define __ENVP_CAST (void**) -#endif - -/// Locking functions for windows and pthread. - -#if defined _WIN32 -#include - -typedef CRITICAL_SECTION MutexLock; -typedef CONDITION_VARIABLE ConditionVariable; - -static inline void init_lock(MutexLock* lock) { - InitializeCriticalSection(lock); -} - -static inline void acquire_lock(MutexLock* lock) { - EnterCriticalSection(lock); -} - -static inline void release_lock(MutexLock* lock) { - LeaveCriticalSection(lock); -} - -static inline void destroy_lock(MutexLock* lock) { - DeleteCriticalSection(lock); -} - -static inline void init_cond(ConditionVariable* cond) { - InitializeConditionVariable(cond); -} - -static inline void signal_cond(ConditionVariable* cond) { - WakeConditionVariable(cond); -} - -static inline void wait_for(ConditionVariable* cond, MutexLock* lock) { - SleepConditionVariableCS(cond, lock, INFINITE); -} - -static inline void destroy_cond(ConditionVariable* cond) { - // Not available. -} - -static inline void free_mem(void* mem) { - CoTaskMemFree(mem); -} - -#elif defined __APPLE__ || defined __LINUX__ || defined __ANDROID__ || \ - defined __GNUC__ -#include - -typedef pthread_mutex_t MutexLock; -typedef pthread_cond_t ConditionVariable; - -static inline void init_lock(MutexLock* lock) { - pthread_mutex_init(lock, NULL); -} - -static inline void acquire_lock(MutexLock* lock) { - pthread_mutex_lock(lock); -} - -static inline void release_lock(MutexLock* lock) { - pthread_mutex_unlock(lock); -} - -static inline void destroy_lock(MutexLock* lock) { - pthread_mutex_destroy(lock); -} - -static inline void init_cond(ConditionVariable* cond) { - pthread_cond_init(cond, NULL); -} - -static inline void signal_cond(ConditionVariable* cond) { - pthread_cond_signal(cond); -} - -static inline void wait_for(ConditionVariable* cond, MutexLock* lock) { - pthread_cond_wait(cond, lock); -} - -static inline void destroy_cond(ConditionVariable* cond) { - pthread_cond_destroy(cond); -} - -static inline void free_mem(void* mem) { - free(mem); -} - -#else - -#error "No locking/condition variable support; Possibly unsupported platform" - -#endif - -typedef struct CallbackResult { - MutexLock lock; - ConditionVariable cond; - int ready; - jobject object; -} CallbackResult; - -typedef struct JniLocks { - MutexLock classLoadingLock; -} JniLocks; - -/// Represents the error when dart-jni layer has already spawned singleton VM. -#define DART_JNI_SINGLETON_EXISTS (-99); - -/// Stores the global state of the JNI. -typedef struct JniContext { - JavaVM* jvm; - jobject classLoader; - jmethodID loadClassMethod; - jobject currentActivity; - jobject appContext; - JniLocks locks; -} JniContext; - -// jniEnv for this thread, used by inline functions in this header, -// therefore declared as extern. -extern thread_local JNIEnv* jniEnv; - -extern JniContext* jni; - -/// Types used by JNI API to distinguish between primitive types. -enum JniType { - booleanType = 0, - byteType = 1, - shortType = 2, - charType = 3, - intType = 4, - longType = 5, - floatType = 6, - doubleType = 7, - objectType = 8, - voidType = 9, -}; - -/// Result type for use by JNI. -/// -/// If [exception] is null, it means the result is valid. -/// It's assumed that the caller knows the expected type in [result]. -typedef struct JniResult { - jvalue value; - jthrowable exception; -} JniResult; - -/// Similar to [JniResult] but for class lookups. -typedef struct JniClassLookupResult { - jclass value; - jthrowable exception; -} JniClassLookupResult; - -/// Similar to [JniResult] but for method/field ID lookups. -typedef struct JniPointerResult { - const void* value; - jthrowable exception; -} JniPointerResult; - -/// JniExceptionDetails holds 2 jstring objects, one is the result of -/// calling `toString` on exception object, other is stack trace; -typedef struct JniExceptionDetails { - jstring message; - jstring stacktrace; -} JniExceptionDetails; - -/// This struct contains functions which wrap method call / field access conveniently along with -/// exception checking. -/// -/// Flutter embedding checks for pending JNI exceptions before an FFI transition, which requires us -/// to check for and clear the exception before returning to dart code, which requires these functions -/// to return result types. -typedef struct JniAccessorsStruct { - JniClassLookupResult (*getClass)(char* internalName); - JniPointerResult (*getFieldID)(jclass cls, char* fieldName, char* signature); - JniPointerResult (*getStaticFieldID)(jclass cls, - char* fieldName, - char* signature); - JniPointerResult (*getMethodID)(jclass cls, - char* methodName, - char* signature); - JniPointerResult (*getStaticMethodID)(jclass cls, - char* methodName, - char* signature); - JniResult (*newObject)(jclass cls, jmethodID ctor, jvalue* args); - JniResult (*newPrimitiveArray)(jsize length, int type); - JniResult (*newObjectArray)(jsize length, - jclass elementClass, - jobject initialElement); - JniResult (*getArrayElement)(jarray array, int index, int type); - JniResult (*callMethod)(jobject obj, - jmethodID methodID, - int callType, - jvalue* args); - JniResult (*callStaticMethod)(jclass cls, - jmethodID methodID, - int callType, - jvalue* args); - JniResult (*getField)(jobject obj, jfieldID fieldID, int callType); - JniResult (*getStaticField)(jclass cls, jfieldID fieldID, int callType); - JniExceptionDetails (*getExceptionDetails)(jthrowable exception); -} JniAccessorsStruct; - -FFI_PLUGIN_EXPORT JniAccessorsStruct* GetAccessors(); - -FFI_PLUGIN_EXPORT JavaVM* GetJavaVM(void); - -FFI_PLUGIN_EXPORT JNIEnv* GetJniEnv(void); - -/// Spawn a JVM with given arguments. -/// -/// Returns JNI_OK on success, and one of the documented JNI error codes on -/// failure. It returns DART_JNI_SINGLETON_EXISTS if an attempt to spawn multiple -/// JVMs is made, even if the underlying API potentially supports multiple VMs. -FFI_PLUGIN_EXPORT int SpawnJvm(JavaVMInitArgs* args); - -/// Returns Application classLoader (on Android), -/// which can be used to load application and platform classes. -/// -/// On other platforms, NULL is returned. -FFI_PLUGIN_EXPORT jobject GetClassLoader(void); - -/// Returns application context on Android. -/// -/// On other platforms, NULL is returned. -FFI_PLUGIN_EXPORT jobject GetApplicationContext(void); - -/// Returns current activity of the app on Android. -FFI_PLUGIN_EXPORT jobject GetCurrentActivity(void); - -static inline void attach_thread() { - if (jniEnv == NULL) { - (*jni->jvm)->AttachCurrentThread(jni->jvm, __ENVP_CAST & jniEnv, NULL); - } -} - -/// Load class into [cls] using platform specific mechanism -static inline void load_class_platform(jclass* cls, const char* name) { -#ifdef __ANDROID__ - jstring className = (*jniEnv)->NewStringUTF(jniEnv, name); - *cls = (*jniEnv)->CallObjectMethod(jniEnv, jni->classLoader, - jni->loadClassMethod, className); - (*jniEnv)->DeleteLocalRef(jniEnv, className); -#else - *cls = (*jniEnv)->FindClass(jniEnv, name); -#endif -} - -static inline void load_class_global_ref(jclass* cls, const char* name) { - if (*cls == NULL) { - jclass tmp = NULL; - acquire_lock(&jni->locks.classLoadingLock); - if (*cls == NULL) { - load_class_platform(&tmp, name); - if (!(*jniEnv)->ExceptionCheck(jniEnv)) { - *cls = (*jniEnv)->NewGlobalRef(jniEnv, tmp); - (*jniEnv)->DeleteLocalRef(jniEnv, tmp); - } - } - release_lock(&jni->locks.classLoadingLock); - } -} - -static inline void load_method(jclass cls, - jmethodID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetMethodID(jniEnv, cls, name, sig); - } -} - -static inline void load_static_method(jclass cls, - jmethodID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetStaticMethodID(jniEnv, cls, name, sig); - } -} - -static inline void load_field(jclass cls, - jfieldID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetFieldID(jniEnv, cls, name, sig); - } -} - -static inline void load_static_field(jclass cls, - jfieldID* res, - const char* name, - const char* sig) { - if (*res == NULL) { - *res = (*jniEnv)->GetStaticFieldID(jniEnv, cls, name, sig); - } -} - -static inline jobject to_global_ref(jobject ref) { - jobject g = (*jniEnv)->NewGlobalRef(jniEnv, ref); - (*jniEnv)->DeleteLocalRef(jniEnv, ref); - return g; -} - -// These functions are useful for C+Dart bindings, and not required for pure dart bindings. - -FFI_PLUGIN_EXPORT JniContext* GetJniContextPtr(); - -/// For use by jni_gen's generated code -/// don't use these. - -// these 2 fn ptr vars will be defined by generated code library -extern JniContext* (*context_getter)(void); -extern JNIEnv* (*env_getter)(void); - -// this function will be exported by generated code library -// it will set above 2 variables. -FFI_PLUGIN_EXPORT void setJniGetters(struct JniContext* (*cg)(void), - JNIEnv* (*eg)(void)); - -static inline void load_env() { - if (jniEnv == NULL) { - jni = context_getter(); - jniEnv = env_getter(); - } -} - -static inline jthrowable check_exception() { - jthrowable exception = (*jniEnv)->ExceptionOccurred(jniEnv); - if (exception != NULL) (*jniEnv)->ExceptionClear(jniEnv); - if (exception == NULL) return NULL; - return to_global_ref(exception); -} - -static inline JniResult to_global_ref_result(jobject ref) { - JniResult result; - result.exception = check_exception(); - if (result.exception == NULL) { - result.value.l = to_global_ref(ref); - } - return result; -} diff --git a/pkgs/jnigen/test/simple_package_test/c_based/c_bindings/simple_package.c b/pkgs/jnigen/test/simple_package_test/c_based/c_bindings/simple_package.c deleted file mode 100644 index 54d6b884dd..0000000000 --- a/pkgs/jnigen/test/simple_package_test/c_based/c_bindings/simple_package.c +++ /dev/null @@ -1,2991 +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. - -// Autogenerated by jnigen. DO NOT EDIT! - -#include -#include "dartjni.h" -#include "jni.h" - -thread_local JNIEnv* jniEnv; -JniContext* jni; - -JniContext* (*context_getter)(void); -JNIEnv* (*env_getter)(void); - -void setJniGetters(JniContext* (*cg)(void), JNIEnv* (*eg)(void)) { - context_getter = cg; - env_getter = eg; -} - -// com.github.dart_lang.jnigen.simple_package.Example$Nested$NestedTwice -jclass _c_Example_Nested_NestedTwice = NULL; - -jmethodID _m_Example_Nested_NestedTwice__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult Example_Nested_NestedTwice__new0() { - load_env(); - load_class_global_ref( - &_c_Example_Nested_NestedTwice, - "com/github/dart_lang/jnigen/simple_package/Example$Nested$NestedTwice"); - if (_c_Example_Nested_NestedTwice == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example_Nested_NestedTwice, - &_m_Example_Nested_NestedTwice__new0, "", "()V"); - if (_m_Example_Nested_NestedTwice__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_Example_Nested_NestedTwice, - _m_Example_Nested_NestedTwice__new0); - return to_global_ref_result(_result); -} - -jfieldID _f_Example_Nested_NestedTwice__ZERO = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Example_Nested_NestedTwice__ZERO() { - load_env(); - load_class_global_ref( - &_c_Example_Nested_NestedTwice, - "com/github/dart_lang/jnigen/simple_package/Example$Nested$NestedTwice"); - if (_c_Example_Nested_NestedTwice == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Example_Nested_NestedTwice, - &_f_Example_Nested_NestedTwice__ZERO, "ZERO", "I"); - int32_t _result = - (*jniEnv)->GetStaticIntField(jniEnv, _c_Example_Nested_NestedTwice, - _f_Example_Nested_NestedTwice__ZERO); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -FFI_PLUGIN_EXPORT -JniResult set_Example_Nested_NestedTwice__ZERO(int32_t value) { - load_env(); - load_class_global_ref( - &_c_Example_Nested_NestedTwice, - "com/github/dart_lang/jnigen/simple_package/Example$Nested$NestedTwice"); - if (_c_Example_Nested_NestedTwice == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Example_Nested_NestedTwice, - &_f_Example_Nested_NestedTwice__ZERO, "ZERO", "I"); - (*jniEnv)->SetStaticIntField(jniEnv, _c_Example_Nested_NestedTwice, - _f_Example_Nested_NestedTwice__ZERO, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -// com.github.dart_lang.jnigen.simple_package.Example$Nested -jclass _c_Example_Nested = NULL; - -jmethodID _m_Example_Nested__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult Example_Nested__new0(uint8_t value) { - load_env(); - load_class_global_ref( - &_c_Example_Nested, - "com/github/dart_lang/jnigen/simple_package/Example$Nested"); - if (_c_Example_Nested == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example_Nested, &_m_Example_Nested__new0, "", "(Z)V"); - if (_m_Example_Nested__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_Example_Nested, - _m_Example_Nested__new0, value); - return to_global_ref_result(_result); -} - -jmethodID _m_Example_Nested__usesAnonymousInnerClass = NULL; -FFI_PLUGIN_EXPORT -JniResult Example_Nested__usesAnonymousInnerClass(jobject self_) { - load_env(); - load_class_global_ref( - &_c_Example_Nested, - "com/github/dart_lang/jnigen/simple_package/Example$Nested"); - if (_c_Example_Nested == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example_Nested, &_m_Example_Nested__usesAnonymousInnerClass, - "usesAnonymousInnerClass", "()V"); - if (_m_Example_Nested__usesAnonymousInnerClass == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_Example_Nested__usesAnonymousInnerClass); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_Example_Nested__getValue = NULL; -FFI_PLUGIN_EXPORT -JniResult Example_Nested__getValue(jobject self_) { - load_env(); - load_class_global_ref( - &_c_Example_Nested, - "com/github/dart_lang/jnigen/simple_package/Example$Nested"); - if (_c_Example_Nested == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example_Nested, &_m_Example_Nested__getValue, "getValue", - "()Z"); - if (_m_Example_Nested__getValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = - (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_Example_Nested__getValue); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_Example_Nested__setValue = NULL; -FFI_PLUGIN_EXPORT -JniResult Example_Nested__setValue(jobject self_, uint8_t value) { - load_env(); - load_class_global_ref( - &_c_Example_Nested, - "com/github/dart_lang/jnigen/simple_package/Example$Nested"); - if (_c_Example_Nested == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example_Nested, &_m_Example_Nested__setValue, "setValue", - "(Z)V"); - if (_m_Example_Nested__setValue == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_Example_Nested__setValue, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -// com.github.dart_lang.jnigen.simple_package.Example$NonStaticNested -jclass _c_Example_NonStaticNested = NULL; - -jmethodID _m_Example_NonStaticNested__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult Example_NonStaticNested__new0(jobject _parent) { - load_env(); - load_class_global_ref( - &_c_Example_NonStaticNested, - "com/github/dart_lang/jnigen/simple_package/Example$NonStaticNested"); - if (_c_Example_NonStaticNested == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example_NonStaticNested, &_m_Example_NonStaticNested__new0, - "", - "(Lcom/github/dart_lang/jnigen/simple_package/Example;)V"); - if (_m_Example_NonStaticNested__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_Example_NonStaticNested, - _m_Example_NonStaticNested__new0, _parent); - return to_global_ref_result(_result); -} - -jfieldID _f_Example_NonStaticNested__ok = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Example_NonStaticNested__ok(jobject self_) { - load_env(); - load_class_global_ref( - &_c_Example_NonStaticNested, - "com/github/dart_lang/jnigen/simple_package/Example$NonStaticNested"); - if (_c_Example_NonStaticNested == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_Example_NonStaticNested, &_f_Example_NonStaticNested__ok, "ok", - "Z"); - uint8_t _result = - (*jniEnv)->GetBooleanField(jniEnv, self_, _f_Example_NonStaticNested__ok); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -FFI_PLUGIN_EXPORT -JniResult set_Example_NonStaticNested__ok(jobject self_, uint8_t value) { - load_env(); - load_class_global_ref( - &_c_Example_NonStaticNested, - "com/github/dart_lang/jnigen/simple_package/Example$NonStaticNested"); - if (_c_Example_NonStaticNested == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_Example_NonStaticNested, &_f_Example_NonStaticNested__ok, "ok", - "Z"); - (*jniEnv)->SetBooleanField(jniEnv, self_, _f_Example_NonStaticNested__ok, - value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -// com.github.dart_lang.jnigen.simple_package.Example -jclass _c_Example = NULL; - -jmethodID _m_Example__getAmount = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__getAmount() { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_Example, &_m_Example__getAmount, "getAmount", "()I"); - if (_m_Example__getAmount == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = - (*jniEnv)->CallStaticIntMethod(jniEnv, _c_Example, _m_Example__getAmount); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_Example__getPi = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__getPi() { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_Example, &_m_Example__getPi, "getPi", "()D"); - if (_m_Example__getPi == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - double _result = - (*jniEnv)->CallStaticDoubleMethod(jniEnv, _c_Example, _m_Example__getPi); - return (JniResult){.value = {.d = _result}, .exception = check_exception()}; -} - -jmethodID _m_Example__getAsterisk = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__getAsterisk() { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_Example, &_m_Example__getAsterisk, "getAsterisk", - "()C"); - if (_m_Example__getAsterisk == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint16_t _result = (*jniEnv)->CallStaticCharMethod(jniEnv, _c_Example, - _m_Example__getAsterisk); - return (JniResult){.value = {.c = _result}, .exception = check_exception()}; -} - -jmethodID _m_Example__getName = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__getName() { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_Example, &_m_Example__getName, "getName", - "()Ljava/lang/String;"); - if (_m_Example__getName == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_Example, - _m_Example__getName); - return to_global_ref_result(_result); -} - -jmethodID _m_Example__getNestedInstance = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__getNestedInstance() { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_Example, &_m_Example__getNestedInstance, "getNestedInstance", - "()Lcom/github/dart_lang/jnigen/simple_package/Example$Nested;"); - if (_m_Example__getNestedInstance == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_Example, _m_Example__getNestedInstance); - return to_global_ref_result(_result); -} - -jmethodID _m_Example__setAmount = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__setAmount(int32_t newAmount) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_Example, &_m_Example__setAmount, "setAmount", "(I)V"); - if (_m_Example__setAmount == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallStaticVoidMethod(jniEnv, _c_Example, _m_Example__setAmount, - newAmount); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_Example__setName = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__setName(jobject newName) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_Example, &_m_Example__setName, "setName", - "(Ljava/lang/String;)V"); - if (_m_Example__setName == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallStaticVoidMethod(jniEnv, _c_Example, _m_Example__setName, - newName); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_Example__setNestedInstance = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__setNestedInstance(jobject newNested) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_Example, &_m_Example__setNestedInstance, "setNestedInstance", - "(Lcom/github/dart_lang/jnigen/simple_package/Example$Nested;)V"); - if (_m_Example__setNestedInstance == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallStaticVoidMethod(jniEnv, _c_Example, - _m_Example__setNestedInstance, newNested); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_Example__max4 = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__max4(int32_t a, int32_t b, int32_t c, int32_t d) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_Example, &_m_Example__max4, "max4", "(IIII)I"); - if (_m_Example__max4 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallStaticIntMethod( - jniEnv, _c_Example, _m_Example__max4, a, b, c, d); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_Example__max8 = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__max8(int32_t a, - int32_t b, - int32_t c, - int32_t d, - int32_t e, - int32_t f, - int32_t g, - int32_t h) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_Example, &_m_Example__max8, "max8", "(IIIIIIII)I"); - if (_m_Example__max8 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallStaticIntMethod( - jniEnv, _c_Example, _m_Example__max8, a, b, c, d, e, f, g, h); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_Example__getNumber = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__getNumber(jobject self_) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__getNumber, "getNumber", "()I"); - if (_m_Example__getNumber == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = - (*jniEnv)->CallIntMethod(jniEnv, self_, _m_Example__getNumber); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_Example__setNumber = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__setNumber(jobject self_, int32_t number) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__setNumber, "setNumber", "(I)V"); - if (_m_Example__setNumber == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_Example__setNumber, number); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_Example__getIsUp = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__getIsUp(jobject self_) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__getIsUp, "getIsUp", "()Z"); - if (_m_Example__getIsUp == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - uint8_t _result = - (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_Example__getIsUp); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -jmethodID _m_Example__setUp = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__setUp(jobject self_, uint8_t isUp) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__setUp, "setUp", "(Z)V"); - if (_m_Example__setUp == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_Example__setUp, isUp); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_Example__getCodename = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__getCodename(jobject self_) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__getCodename, "getCodename", - "()Ljava/lang/String;"); - if (_m_Example__getCodename == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_Example__getCodename); - return to_global_ref_result(_result); -} - -jmethodID _m_Example__setCodename = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__setCodename(jobject self_, jobject codename) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__setCodename, "setCodename", - "(Ljava/lang/String;)V"); - if (_m_Example__setCodename == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_Example__setCodename, codename); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_Example__getRandom = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__getRandom(jobject self_) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__getRandom, "getRandom", - "()Ljava/util/Random;"); - if (_m_Example__getRandom == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_Example__getRandom); - return to_global_ref_result(_result); -} - -jmethodID _m_Example__setRandom = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__setRandom(jobject self_, jobject random) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__setRandom, "setRandom", - "(Ljava/util/Random;)V"); - if (_m_Example__setRandom == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_Example__setRandom, random); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_Example__getRandomLong = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__getRandomLong(jobject self_) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__getRandomLong, "getRandomLong", "()J"); - if (_m_Example__getRandomLong == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int64_t _result = - (*jniEnv)->CallLongMethod(jniEnv, self_, _m_Example__getRandomLong); - return (JniResult){.value = {.j = _result}, .exception = check_exception()}; -} - -jmethodID _m_Example__add4Longs = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__add4Longs(jobject self_, - int64_t a, - int64_t b, - int64_t c, - int64_t d) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__add4Longs, "add4Longs", "(JJJJ)J"); - if (_m_Example__add4Longs == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int64_t _result = (*jniEnv)->CallLongMethod( - jniEnv, self_, _m_Example__add4Longs, a, b, c, d); - return (JniResult){.value = {.j = _result}, .exception = check_exception()}; -} - -jmethodID _m_Example__add8Longs = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__add8Longs(jobject self_, - int64_t a, - int64_t b, - int64_t c, - int64_t d, - int64_t e, - int64_t f, - int64_t g, - int64_t h) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__add8Longs, "add8Longs", "(JJJJJJJJ)J"); - if (_m_Example__add8Longs == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int64_t _result = (*jniEnv)->CallLongMethod( - jniEnv, self_, _m_Example__add8Longs, a, b, c, d, e, f, g, h); - return (JniResult){.value = {.j = _result}, .exception = check_exception()}; -} - -jmethodID _m_Example__getRandomNumericString = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__getRandomNumericString(jobject self_, jobject random) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__getRandomNumericString, - "getRandomNumericString", - "(Ljava/util/Random;)Ljava/lang/String;"); - if (_m_Example__getRandomNumericString == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_Example__getRandomNumericString, random); - return to_global_ref_result(_result); -} - -jmethodID _m_Example__protectedMethod = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__protectedMethod(jobject self_, jobject a, jobject b) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__protectedMethod, "protectedMethod", - "(Ljava/lang/String;Ljava/lang/String;)V"); - if (_m_Example__protectedMethod == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_Example__protectedMethod, a, b); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_Example__finalMethod = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__finalMethod(jobject self_) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__finalMethod, "finalMethod", "()V"); - if (_m_Example__finalMethod == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_Example__finalMethod); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_Example__getList = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__getList(jobject self_) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__getList, "getList", - "()Ljava/util/List;"); - if (_m_Example__getList == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_Example__getList); - return to_global_ref_result(_result); -} - -jmethodID _m_Example__joinStrings = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__joinStrings(jobject self_, jobject values, jobject delim) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__joinStrings, "joinStrings", - "(Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;"); - if (_m_Example__joinStrings == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_Example__joinStrings, values, delim); - return to_global_ref_result(_result); -} - -jmethodID _m_Example__methodWithSeveralParams = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__methodWithSeveralParams(jobject self_, - uint16_t ch, - jobject s, - jobject a, - jobject t, - jobject lt, - jobject wm) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__methodWithSeveralParams, - "methodWithSeveralParams", - "(CLjava/lang/String;[ILjava/lang/CharSequence;Ljava/util/" - "List;Ljava/util/Map;)V"); - if (_m_Example__methodWithSeveralParams == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_Example__methodWithSeveralParams, - ch, s, a, t, lt, wm); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_Example__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__new0() { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__new0, "", "()V"); - if (_m_Example__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_Example, _m_Example__new0); - return to_global_ref_result(_result); -} - -jmethodID _m_Example__new1 = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__new1(int32_t number) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__new1, "", "(I)V"); - if (_m_Example__new1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_Example, _m_Example__new1, number); - return to_global_ref_result(_result); -} - -jmethodID _m_Example__new2 = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__new2(int32_t number, uint8_t isUp) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__new2, "", "(IZ)V"); - if (_m_Example__new2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_Example, _m_Example__new2, number, isUp); - return to_global_ref_result(_result); -} - -jmethodID _m_Example__new3 = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__new3(int32_t number, uint8_t isUp, jobject codename) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__new3, "", - "(IZLjava/lang/String;)V"); - if (_m_Example__new3 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_Example, _m_Example__new3, - number, isUp, codename); - return to_global_ref_result(_result); -} - -jmethodID _m_Example__new4 = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__new4(int32_t a, - int32_t b, - int32_t c, - int32_t d, - int32_t e, - int32_t f, - int32_t g, - int32_t h) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__new4, "", "(IIIIIIII)V"); - if (_m_Example__new4 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_Example, _m_Example__new4, - a, b, c, d, e, f, g, h); - return to_global_ref_result(_result); -} - -jmethodID _m_Example__whichExample = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__whichExample(jobject self_) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__whichExample, "whichExample", "()I"); - if (_m_Example__whichExample == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = - (*jniEnv)->CallIntMethod(jniEnv, self_, _m_Example__whichExample); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_Example__addInts = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__addInts(int32_t a, int32_t b) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_Example, &_m_Example__addInts, "addInts", "(II)I"); - if (_m_Example__addInts == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallStaticIntMethod(jniEnv, _c_Example, - _m_Example__addInts, a, b); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_Example__getArr = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__getArr() { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_Example, &_m_Example__getArr, "getArr", "()[I"); - if (_m_Example__getArr == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_Example, _m_Example__getArr); - return to_global_ref_result(_result); -} - -jmethodID _m_Example__addAll = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__addAll(jobject arr) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_Example, &_m_Example__addAll, "addAll", "([I)I"); - if (_m_Example__addAll == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallStaticIntMethod(jniEnv, _c_Example, - _m_Example__addAll, arr); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_Example__getSelf = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__getSelf(jobject self_) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__getSelf, "getSelf", - "()Lcom/github/dart_lang/jnigen/simple_package/Example;"); - if (_m_Example__getSelf == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_Example__getSelf); - return to_global_ref_result(_result); -} - -jmethodID _m_Example__throwException = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__throwException() { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_Example, &_m_Example__throwException, "throwException", - "()V"); - if (_m_Example__throwException == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallStaticVoidMethod(jniEnv, _c_Example, - _m_Example__throwException); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_Example__overloaded = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__overloaded(jobject self_) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__overloaded, "overloaded", "()V"); - if (_m_Example__overloaded == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_Example__overloaded); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_Example__overloaded1 = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__overloaded1(jobject self_, int32_t a, jobject b) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__overloaded1, "overloaded", - "(ILjava/lang/String;)V"); - if (_m_Example__overloaded1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_Example__overloaded1, a, b); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_Example__overloaded2 = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__overloaded2(jobject self_, int32_t a) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__overloaded2, "overloaded", "(I)V"); - if (_m_Example__overloaded2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_Example__overloaded2, a); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_Example__overloaded3 = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__overloaded3(jobject self_, jobject a, jobject b) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__overloaded3, "overloaded", - "(Ljava/util/List;Ljava/lang/String;)V"); - if (_m_Example__overloaded3 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_Example__overloaded3, a, b); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_Example__overloaded4 = NULL; -FFI_PLUGIN_EXPORT -JniResult Example__overloaded4(jobject self_, jobject a) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example, &_m_Example__overloaded4, "overloaded", - "(Ljava/util/List;)V"); - if (_m_Example__overloaded4 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_Example__overloaded4, a); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jfieldID _f_Example__SEMICOLON_STRING = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Example__SEMICOLON_STRING() { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Example, &_f_Example__SEMICOLON_STRING, - "SEMICOLON_STRING", "Ljava/lang/String;"); - jobject _result = (*jniEnv)->GetStaticObjectField( - jniEnv, _c_Example, _f_Example__SEMICOLON_STRING); - return to_global_ref_result(_result); -} - -jfieldID _f_Example__unusedRandom = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Example__unusedRandom() { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Example, &_f_Example__unusedRandom, "unusedRandom", - "Ljava/util/Random;"); - jobject _result = (*jniEnv)->GetStaticObjectField(jniEnv, _c_Example, - _f_Example__unusedRandom); - return to_global_ref_result(_result); -} - -jfieldID _f_Example__protectedField = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Example__protectedField(jobject self_) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_Example, &_f_Example__protectedField, "protectedField", - "Ljava/util/Random;"); - jobject _result = - (*jniEnv)->GetObjectField(jniEnv, self_, _f_Example__protectedField); - return to_global_ref_result(_result); -} - -FFI_PLUGIN_EXPORT -JniResult set_Example__protectedField(jobject self_, jobject value) { - load_env(); - load_class_global_ref(&_c_Example, - "com/github/dart_lang/jnigen/simple_package/Example"); - if (_c_Example == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_Example, &_f_Example__protectedField, "protectedField", - "Ljava/util/Random;"); - (*jniEnv)->SetObjectField(jniEnv, self_, _f_Example__protectedField, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -// com.github.dart_lang.jnigen.pkg2.C2 -jclass _c_C2 = NULL; - -jmethodID _m_C2__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult C2__new0() { - load_env(); - load_class_global_ref(&_c_C2, "com/github/dart_lang/jnigen/pkg2/C2"); - if (_c_C2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_C2, &_m_C2__new0, "", "()V"); - if (_m_C2__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_C2, _m_C2__new0); - return to_global_ref_result(_result); -} - -jfieldID _f_C2__CONSTANT = NULL; -FFI_PLUGIN_EXPORT -JniResult get_C2__CONSTANT() { - load_env(); - load_class_global_ref(&_c_C2, "com/github/dart_lang/jnigen/pkg2/C2"); - if (_c_C2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_C2, &_f_C2__CONSTANT, "CONSTANT", "I"); - int32_t _result = - (*jniEnv)->GetStaticIntField(jniEnv, _c_C2, _f_C2__CONSTANT); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -FFI_PLUGIN_EXPORT -JniResult set_C2__CONSTANT(int32_t value) { - load_env(); - load_class_global_ref(&_c_C2, "com/github/dart_lang/jnigen/pkg2/C2"); - if (_c_C2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_C2, &_f_C2__CONSTANT, "CONSTANT", "I"); - (*jniEnv)->SetStaticIntField(jniEnv, _c_C2, _f_C2__CONSTANT, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -// com.github.dart_lang.jnigen.pkg2.Example -jclass _c_Example1 = NULL; - -jmethodID _m_Example1__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult Example1__new0() { - load_env(); - load_class_global_ref(&_c_Example1, - "com/github/dart_lang/jnigen/pkg2/Example"); - if (_c_Example1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example1, &_m_Example1__new0, "", "()V"); - if (_m_Example1__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_Example1, _m_Example1__new0); - return to_global_ref_result(_result); -} - -jmethodID _m_Example1__whichExample = NULL; -FFI_PLUGIN_EXPORT -JniResult Example1__whichExample(jobject self_) { - load_env(); - load_class_global_ref(&_c_Example1, - "com/github/dart_lang/jnigen/pkg2/Example"); - if (_c_Example1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Example1, &_m_Example1__whichExample, "whichExample", "()I"); - if (_m_Example1__whichExample == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = - (*jniEnv)->CallIntMethod(jniEnv, self_, _m_Example1__whichExample); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -// com.github.dart_lang.jnigen.generics.GrandParent$Parent$Child -jclass _c_GrandParent_Parent_Child = NULL; - -jmethodID _m_GrandParent_Parent_Child__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult GrandParent_Parent_Child__new0(jobject _parent, jobject newValue) { - load_env(); - load_class_global_ref( - &_c_GrandParent_Parent_Child, - "com/github/dart_lang/jnigen/generics/GrandParent$Parent$Child"); - if (_c_GrandParent_Parent_Child == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_GrandParent_Parent_Child, &_m_GrandParent_Parent_Child__new0, - "", - "(Lcom/github/dart_lang/jnigen/generics/GrandParent$Parent;Ljava/" - "lang/Object;)V"); - if (_m_GrandParent_Parent_Child__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_GrandParent_Parent_Child, - _m_GrandParent_Parent_Child__new0, - _parent, newValue); - return to_global_ref_result(_result); -} - -jfieldID _f_GrandParent_Parent_Child__grandParentValue = NULL; -FFI_PLUGIN_EXPORT -JniResult get_GrandParent_Parent_Child__grandParentValue(jobject self_) { - load_env(); - load_class_global_ref( - &_c_GrandParent_Parent_Child, - "com/github/dart_lang/jnigen/generics/GrandParent$Parent$Child"); - if (_c_GrandParent_Parent_Child == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_GrandParent_Parent_Child, - &_f_GrandParent_Parent_Child__grandParentValue, "grandParentValue", - "Ljava/lang/Object;"); - jobject _result = (*jniEnv)->GetObjectField( - jniEnv, self_, _f_GrandParent_Parent_Child__grandParentValue); - return to_global_ref_result(_result); -} - -FFI_PLUGIN_EXPORT -JniResult set_GrandParent_Parent_Child__grandParentValue(jobject self_, - jobject value) { - load_env(); - load_class_global_ref( - &_c_GrandParent_Parent_Child, - "com/github/dart_lang/jnigen/generics/GrandParent$Parent$Child"); - if (_c_GrandParent_Parent_Child == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_GrandParent_Parent_Child, - &_f_GrandParent_Parent_Child__grandParentValue, "grandParentValue", - "Ljava/lang/Object;"); - (*jniEnv)->SetObjectField( - jniEnv, self_, _f_GrandParent_Parent_Child__grandParentValue, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jfieldID _f_GrandParent_Parent_Child__parentValue = NULL; -FFI_PLUGIN_EXPORT -JniResult get_GrandParent_Parent_Child__parentValue(jobject self_) { - load_env(); - load_class_global_ref( - &_c_GrandParent_Parent_Child, - "com/github/dart_lang/jnigen/generics/GrandParent$Parent$Child"); - if (_c_GrandParent_Parent_Child == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_GrandParent_Parent_Child, - &_f_GrandParent_Parent_Child__parentValue, "parentValue", - "Ljava/lang/Object;"); - jobject _result = (*jniEnv)->GetObjectField( - jniEnv, self_, _f_GrandParent_Parent_Child__parentValue); - return to_global_ref_result(_result); -} - -FFI_PLUGIN_EXPORT -JniResult set_GrandParent_Parent_Child__parentValue(jobject self_, - jobject value) { - load_env(); - load_class_global_ref( - &_c_GrandParent_Parent_Child, - "com/github/dart_lang/jnigen/generics/GrandParent$Parent$Child"); - if (_c_GrandParent_Parent_Child == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_GrandParent_Parent_Child, - &_f_GrandParent_Parent_Child__parentValue, "parentValue", - "Ljava/lang/Object;"); - (*jniEnv)->SetObjectField(jniEnv, self_, - _f_GrandParent_Parent_Child__parentValue, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jfieldID _f_GrandParent_Parent_Child__value = NULL; -FFI_PLUGIN_EXPORT -JniResult get_GrandParent_Parent_Child__value(jobject self_) { - load_env(); - load_class_global_ref( - &_c_GrandParent_Parent_Child, - "com/github/dart_lang/jnigen/generics/GrandParent$Parent$Child"); - if (_c_GrandParent_Parent_Child == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_GrandParent_Parent_Child, &_f_GrandParent_Parent_Child__value, - "value", "Ljava/lang/Object;"); - jobject _result = (*jniEnv)->GetObjectField( - jniEnv, self_, _f_GrandParent_Parent_Child__value); - return to_global_ref_result(_result); -} - -FFI_PLUGIN_EXPORT -JniResult set_GrandParent_Parent_Child__value(jobject self_, jobject value) { - load_env(); - load_class_global_ref( - &_c_GrandParent_Parent_Child, - "com/github/dart_lang/jnigen/generics/GrandParent$Parent$Child"); - if (_c_GrandParent_Parent_Child == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_GrandParent_Parent_Child, &_f_GrandParent_Parent_Child__value, - "value", "Ljava/lang/Object;"); - (*jniEnv)->SetObjectField(jniEnv, self_, _f_GrandParent_Parent_Child__value, - value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -// com.github.dart_lang.jnigen.generics.GrandParent$Parent -jclass _c_GrandParent_Parent = NULL; - -jmethodID _m_GrandParent_Parent__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult GrandParent_Parent__new0(jobject _parent, jobject newValue) { - load_env(); - load_class_global_ref( - &_c_GrandParent_Parent, - "com/github/dart_lang/jnigen/generics/GrandParent$Parent"); - if (_c_GrandParent_Parent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_GrandParent_Parent, &_m_GrandParent_Parent__new0, "", - "(Lcom/github/dart_lang/jnigen/generics/GrandParent;Ljava/lang/" - "Object;)V"); - if (_m_GrandParent_Parent__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_GrandParent_Parent, - _m_GrandParent_Parent__new0, _parent, newValue); - return to_global_ref_result(_result); -} - -jfieldID _f_GrandParent_Parent__parentValue = NULL; -FFI_PLUGIN_EXPORT -JniResult get_GrandParent_Parent__parentValue(jobject self_) { - load_env(); - load_class_global_ref( - &_c_GrandParent_Parent, - "com/github/dart_lang/jnigen/generics/GrandParent$Parent"); - if (_c_GrandParent_Parent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_GrandParent_Parent, &_f_GrandParent_Parent__parentValue, - "parentValue", "Ljava/lang/Object;"); - jobject _result = (*jniEnv)->GetObjectField( - jniEnv, self_, _f_GrandParent_Parent__parentValue); - return to_global_ref_result(_result); -} - -FFI_PLUGIN_EXPORT -JniResult set_GrandParent_Parent__parentValue(jobject self_, jobject value) { - load_env(); - load_class_global_ref( - &_c_GrandParent_Parent, - "com/github/dart_lang/jnigen/generics/GrandParent$Parent"); - if (_c_GrandParent_Parent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_GrandParent_Parent, &_f_GrandParent_Parent__parentValue, - "parentValue", "Ljava/lang/Object;"); - (*jniEnv)->SetObjectField(jniEnv, self_, _f_GrandParent_Parent__parentValue, - value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jfieldID _f_GrandParent_Parent__value = NULL; -FFI_PLUGIN_EXPORT -JniResult get_GrandParent_Parent__value(jobject self_) { - load_env(); - load_class_global_ref( - &_c_GrandParent_Parent, - "com/github/dart_lang/jnigen/generics/GrandParent$Parent"); - if (_c_GrandParent_Parent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_GrandParent_Parent, &_f_GrandParent_Parent__value, "value", - "Ljava/lang/Object;"); - jobject _result = - (*jniEnv)->GetObjectField(jniEnv, self_, _f_GrandParent_Parent__value); - return to_global_ref_result(_result); -} - -FFI_PLUGIN_EXPORT -JniResult set_GrandParent_Parent__value(jobject self_, jobject value) { - load_env(); - load_class_global_ref( - &_c_GrandParent_Parent, - "com/github/dart_lang/jnigen/generics/GrandParent$Parent"); - if (_c_GrandParent_Parent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_GrandParent_Parent, &_f_GrandParent_Parent__value, "value", - "Ljava/lang/Object;"); - (*jniEnv)->SetObjectField(jniEnv, self_, _f_GrandParent_Parent__value, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -// com.github.dart_lang.jnigen.generics.GrandParent$StaticParent$Child -jclass _c_GrandParent_StaticParent_Child = NULL; - -jmethodID _m_GrandParent_StaticParent_Child__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult GrandParent_StaticParent_Child__new0(jobject _parent, - jobject parentValue, - jobject value) { - load_env(); - load_class_global_ref( - &_c_GrandParent_StaticParent_Child, - "com/github/dart_lang/jnigen/generics/GrandParent$StaticParent$Child"); - if (_c_GrandParent_StaticParent_Child == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_GrandParent_StaticParent_Child, - &_m_GrandParent_StaticParent_Child__new0, "", - "(Lcom/github/dart_lang/jnigen/generics/GrandParent$StaticParent;Ljava/" - "lang/Object;Ljava/lang/Object;)V"); - if (_m_GrandParent_StaticParent_Child__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject( - jniEnv, _c_GrandParent_StaticParent_Child, - _m_GrandParent_StaticParent_Child__new0, _parent, parentValue, value); - return to_global_ref_result(_result); -} - -jfieldID _f_GrandParent_StaticParent_Child__parentValue = NULL; -FFI_PLUGIN_EXPORT -JniResult get_GrandParent_StaticParent_Child__parentValue(jobject self_) { - load_env(); - load_class_global_ref( - &_c_GrandParent_StaticParent_Child, - "com/github/dart_lang/jnigen/generics/GrandParent$StaticParent$Child"); - if (_c_GrandParent_StaticParent_Child == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_GrandParent_StaticParent_Child, - &_f_GrandParent_StaticParent_Child__parentValue, "parentValue", - "Ljava/lang/Object;"); - jobject _result = (*jniEnv)->GetObjectField( - jniEnv, self_, _f_GrandParent_StaticParent_Child__parentValue); - return to_global_ref_result(_result); -} - -FFI_PLUGIN_EXPORT -JniResult set_GrandParent_StaticParent_Child__parentValue(jobject self_, - jobject value) { - load_env(); - load_class_global_ref( - &_c_GrandParent_StaticParent_Child, - "com/github/dart_lang/jnigen/generics/GrandParent$StaticParent$Child"); - if (_c_GrandParent_StaticParent_Child == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_GrandParent_StaticParent_Child, - &_f_GrandParent_StaticParent_Child__parentValue, "parentValue", - "Ljava/lang/Object;"); - (*jniEnv)->SetObjectField( - jniEnv, self_, _f_GrandParent_StaticParent_Child__parentValue, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jfieldID _f_GrandParent_StaticParent_Child__value = NULL; -FFI_PLUGIN_EXPORT -JniResult get_GrandParent_StaticParent_Child__value(jobject self_) { - load_env(); - load_class_global_ref( - &_c_GrandParent_StaticParent_Child, - "com/github/dart_lang/jnigen/generics/GrandParent$StaticParent$Child"); - if (_c_GrandParent_StaticParent_Child == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_GrandParent_StaticParent_Child, - &_f_GrandParent_StaticParent_Child__value, "value", - "Ljava/lang/Object;"); - jobject _result = (*jniEnv)->GetObjectField( - jniEnv, self_, _f_GrandParent_StaticParent_Child__value); - return to_global_ref_result(_result); -} - -FFI_PLUGIN_EXPORT -JniResult set_GrandParent_StaticParent_Child__value(jobject self_, - jobject value) { - load_env(); - load_class_global_ref( - &_c_GrandParent_StaticParent_Child, - "com/github/dart_lang/jnigen/generics/GrandParent$StaticParent$Child"); - if (_c_GrandParent_StaticParent_Child == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_GrandParent_StaticParent_Child, - &_f_GrandParent_StaticParent_Child__value, "value", - "Ljava/lang/Object;"); - (*jniEnv)->SetObjectField(jniEnv, self_, - _f_GrandParent_StaticParent_Child__value, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -// com.github.dart_lang.jnigen.generics.GrandParent$StaticParent -jclass _c_GrandParent_StaticParent = NULL; - -jmethodID _m_GrandParent_StaticParent__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult GrandParent_StaticParent__new0(jobject value) { - load_env(); - load_class_global_ref( - &_c_GrandParent_StaticParent, - "com/github/dart_lang/jnigen/generics/GrandParent$StaticParent"); - if (_c_GrandParent_StaticParent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_GrandParent_StaticParent, &_m_GrandParent_StaticParent__new0, - "", "(Ljava/lang/Object;)V"); - if (_m_GrandParent_StaticParent__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_GrandParent_StaticParent, - _m_GrandParent_StaticParent__new0, value); - return to_global_ref_result(_result); -} - -jfieldID _f_GrandParent_StaticParent__value = NULL; -FFI_PLUGIN_EXPORT -JniResult get_GrandParent_StaticParent__value(jobject self_) { - load_env(); - load_class_global_ref( - &_c_GrandParent_StaticParent, - "com/github/dart_lang/jnigen/generics/GrandParent$StaticParent"); - if (_c_GrandParent_StaticParent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_GrandParent_StaticParent, &_f_GrandParent_StaticParent__value, - "value", "Ljava/lang/Object;"); - jobject _result = (*jniEnv)->GetObjectField( - jniEnv, self_, _f_GrandParent_StaticParent__value); - return to_global_ref_result(_result); -} - -FFI_PLUGIN_EXPORT -JniResult set_GrandParent_StaticParent__value(jobject self_, jobject value) { - load_env(); - load_class_global_ref( - &_c_GrandParent_StaticParent, - "com/github/dart_lang/jnigen/generics/GrandParent$StaticParent"); - if (_c_GrandParent_StaticParent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_GrandParent_StaticParent, &_f_GrandParent_StaticParent__value, - "value", "Ljava/lang/Object;"); - (*jniEnv)->SetObjectField(jniEnv, self_, _f_GrandParent_StaticParent__value, - value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -// com.github.dart_lang.jnigen.generics.GrandParent -jclass _c_GrandParent = NULL; - -jmethodID _m_GrandParent__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult GrandParent__new0(jobject value) { - load_env(); - load_class_global_ref(&_c_GrandParent, - "com/github/dart_lang/jnigen/generics/GrandParent"); - if (_c_GrandParent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_GrandParent, &_m_GrandParent__new0, "", - "(Ljava/lang/Object;)V"); - if (_m_GrandParent__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_GrandParent, _m_GrandParent__new0, value); - return to_global_ref_result(_result); -} - -jmethodID _m_GrandParent__stringParent = NULL; -FFI_PLUGIN_EXPORT -JniResult GrandParent__stringParent(jobject self_) { - load_env(); - load_class_global_ref(&_c_GrandParent, - "com/github/dart_lang/jnigen/generics/GrandParent"); - if (_c_GrandParent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_GrandParent, &_m_GrandParent__stringParent, "stringParent", - "()Lcom/github/dart_lang/jnigen/generics/GrandParent$Parent;"); - if (_m_GrandParent__stringParent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_GrandParent__stringParent); - return to_global_ref_result(_result); -} - -jmethodID _m_GrandParent__varParent = NULL; -FFI_PLUGIN_EXPORT -JniResult GrandParent__varParent(jobject self_, jobject nestedValue) { - load_env(); - load_class_global_ref(&_c_GrandParent, - "com/github/dart_lang/jnigen/generics/GrandParent"); - if (_c_GrandParent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_GrandParent, &_m_GrandParent__varParent, "varParent", - "(Ljava/lang/Object;)Lcom/github/dart_lang/jnigen/generics/" - "GrandParent$Parent;"); - if (_m_GrandParent__varParent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_GrandParent__varParent, nestedValue); - return to_global_ref_result(_result); -} - -jmethodID _m_GrandParent__stringStaticParent = NULL; -FFI_PLUGIN_EXPORT -JniResult GrandParent__stringStaticParent() { - load_env(); - load_class_global_ref(&_c_GrandParent, - "com/github/dart_lang/jnigen/generics/GrandParent"); - if (_c_GrandParent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_GrandParent, &_m_GrandParent__stringStaticParent, "stringStaticParent", - "()Lcom/github/dart_lang/jnigen/generics/GrandParent$StaticParent;"); - if (_m_GrandParent__stringStaticParent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_GrandParent, _m_GrandParent__stringStaticParent); - return to_global_ref_result(_result); -} - -jmethodID _m_GrandParent__varStaticParent = NULL; -FFI_PLUGIN_EXPORT -JniResult GrandParent__varStaticParent(jobject value) { - load_env(); - load_class_global_ref(&_c_GrandParent, - "com/github/dart_lang/jnigen/generics/GrandParent"); - if (_c_GrandParent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_GrandParent, &_m_GrandParent__varStaticParent, - "varStaticParent", - "(Ljava/lang/Object;)Lcom/github/dart_lang/jnigen/" - "generics/GrandParent$StaticParent;"); - if (_m_GrandParent__varStaticParent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_GrandParent, _m_GrandParent__varStaticParent, value); - return to_global_ref_result(_result); -} - -jmethodID _m_GrandParent__staticParentWithSameType = NULL; -FFI_PLUGIN_EXPORT -JniResult GrandParent__staticParentWithSameType(jobject self_) { - load_env(); - load_class_global_ref(&_c_GrandParent, - "com/github/dart_lang/jnigen/generics/GrandParent"); - if (_c_GrandParent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_GrandParent, &_m_GrandParent__staticParentWithSameType, - "staticParentWithSameType", - "()Lcom/github/dart_lang/jnigen/generics/GrandParent$StaticParent;"); - if (_m_GrandParent__staticParentWithSameType == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_GrandParent__staticParentWithSameType); - return to_global_ref_result(_result); -} - -jfieldID _f_GrandParent__value = NULL; -FFI_PLUGIN_EXPORT -JniResult get_GrandParent__value(jobject self_) { - load_env(); - load_class_global_ref(&_c_GrandParent, - "com/github/dart_lang/jnigen/generics/GrandParent"); - if (_c_GrandParent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_GrandParent, &_f_GrandParent__value, "value", - "Ljava/lang/Object;"); - jobject _result = - (*jniEnv)->GetObjectField(jniEnv, self_, _f_GrandParent__value); - return to_global_ref_result(_result); -} - -FFI_PLUGIN_EXPORT -JniResult set_GrandParent__value(jobject self_, jobject value) { - load_env(); - load_class_global_ref(&_c_GrandParent, - "com/github/dart_lang/jnigen/generics/GrandParent"); - if (_c_GrandParent == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_GrandParent, &_f_GrandParent__value, "value", - "Ljava/lang/Object;"); - (*jniEnv)->SetObjectField(jniEnv, self_, _f_GrandParent__value, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -// com.github.dart_lang.jnigen.generics.MyMap$MyEntry -jclass _c_MyMap_MyEntry = NULL; - -jmethodID _m_MyMap_MyEntry__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult MyMap_MyEntry__new0(jobject _parent, jobject key, jobject value) { - load_env(); - load_class_global_ref(&_c_MyMap_MyEntry, - "com/github/dart_lang/jnigen/generics/MyMap$MyEntry"); - if (_c_MyMap_MyEntry == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_MyMap_MyEntry, &_m_MyMap_MyEntry__new0, "", - "(Lcom/github/dart_lang/jnigen/generics/MyMap;Ljava/lang/" - "Object;Ljava/lang/Object;)V"); - if (_m_MyMap_MyEntry__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject( - jniEnv, _c_MyMap_MyEntry, _m_MyMap_MyEntry__new0, _parent, key, value); - return to_global_ref_result(_result); -} - -jfieldID _f_MyMap_MyEntry__key = NULL; -FFI_PLUGIN_EXPORT -JniResult get_MyMap_MyEntry__key(jobject self_) { - load_env(); - load_class_global_ref(&_c_MyMap_MyEntry, - "com/github/dart_lang/jnigen/generics/MyMap$MyEntry"); - if (_c_MyMap_MyEntry == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_MyMap_MyEntry, &_f_MyMap_MyEntry__key, "key", - "Ljava/lang/Object;"); - jobject _result = - (*jniEnv)->GetObjectField(jniEnv, self_, _f_MyMap_MyEntry__key); - return to_global_ref_result(_result); -} - -FFI_PLUGIN_EXPORT -JniResult set_MyMap_MyEntry__key(jobject self_, jobject value) { - load_env(); - load_class_global_ref(&_c_MyMap_MyEntry, - "com/github/dart_lang/jnigen/generics/MyMap$MyEntry"); - if (_c_MyMap_MyEntry == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_MyMap_MyEntry, &_f_MyMap_MyEntry__key, "key", - "Ljava/lang/Object;"); - (*jniEnv)->SetObjectField(jniEnv, self_, _f_MyMap_MyEntry__key, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jfieldID _f_MyMap_MyEntry__value = NULL; -FFI_PLUGIN_EXPORT -JniResult get_MyMap_MyEntry__value(jobject self_) { - load_env(); - load_class_global_ref(&_c_MyMap_MyEntry, - "com/github/dart_lang/jnigen/generics/MyMap$MyEntry"); - if (_c_MyMap_MyEntry == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_MyMap_MyEntry, &_f_MyMap_MyEntry__value, "value", - "Ljava/lang/Object;"); - jobject _result = - (*jniEnv)->GetObjectField(jniEnv, self_, _f_MyMap_MyEntry__value); - return to_global_ref_result(_result); -} - -FFI_PLUGIN_EXPORT -JniResult set_MyMap_MyEntry__value(jobject self_, jobject value) { - load_env(); - load_class_global_ref(&_c_MyMap_MyEntry, - "com/github/dart_lang/jnigen/generics/MyMap$MyEntry"); - if (_c_MyMap_MyEntry == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_MyMap_MyEntry, &_f_MyMap_MyEntry__value, "value", - "Ljava/lang/Object;"); - (*jniEnv)->SetObjectField(jniEnv, self_, _f_MyMap_MyEntry__value, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -// com.github.dart_lang.jnigen.generics.MyMap -jclass _c_MyMap = NULL; - -jmethodID _m_MyMap__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult MyMap__new0() { - load_env(); - load_class_global_ref(&_c_MyMap, - "com/github/dart_lang/jnigen/generics/MyMap"); - if (_c_MyMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_MyMap, &_m_MyMap__new0, "", "()V"); - if (_m_MyMap__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_MyMap, _m_MyMap__new0); - return to_global_ref_result(_result); -} - -jmethodID _m_MyMap__get0 = NULL; -FFI_PLUGIN_EXPORT -JniResult MyMap__get0(jobject self_, jobject key) { - load_env(); - load_class_global_ref(&_c_MyMap, - "com/github/dart_lang/jnigen/generics/MyMap"); - if (_c_MyMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_MyMap, &_m_MyMap__get0, "get", - "(Ljava/lang/Object;)Ljava/lang/Object;"); - if (_m_MyMap__get0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_MyMap__get0, key); - return to_global_ref_result(_result); -} - -jmethodID _m_MyMap__put = NULL; -FFI_PLUGIN_EXPORT -JniResult MyMap__put(jobject self_, jobject key, jobject value) { - load_env(); - load_class_global_ref(&_c_MyMap, - "com/github/dart_lang/jnigen/generics/MyMap"); - if (_c_MyMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_MyMap, &_m_MyMap__put, "put", - "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"); - if (_m_MyMap__put == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_MyMap__put, key, value); - return to_global_ref_result(_result); -} - -jmethodID _m_MyMap__entryStack = NULL; -FFI_PLUGIN_EXPORT -JniResult MyMap__entryStack(jobject self_) { - load_env(); - load_class_global_ref(&_c_MyMap, - "com/github/dart_lang/jnigen/generics/MyMap"); - if (_c_MyMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_MyMap, &_m_MyMap__entryStack, "entryStack", - "()Lcom/github/dart_lang/jnigen/generics/MyStack;"); - if (_m_MyMap__entryStack == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_MyMap__entryStack); - return to_global_ref_result(_result); -} - -// com.github.dart_lang.jnigen.generics.MyStack -jclass _c_MyStack = NULL; - -jmethodID _m_MyStack__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult MyStack__new0() { - load_env(); - load_class_global_ref(&_c_MyStack, - "com/github/dart_lang/jnigen/generics/MyStack"); - if (_c_MyStack == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_MyStack, &_m_MyStack__new0, "", "()V"); - if (_m_MyStack__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_MyStack, _m_MyStack__new0); - return to_global_ref_result(_result); -} - -jmethodID _m_MyStack__fromArray = NULL; -FFI_PLUGIN_EXPORT -JniResult MyStack__fromArray(jobject arr) { - load_env(); - load_class_global_ref(&_c_MyStack, - "com/github/dart_lang/jnigen/generics/MyStack"); - if (_c_MyStack == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_MyStack, &_m_MyStack__fromArray, "fromArray", - "([Ljava/lang/Object;)Lcom/github/dart_lang/jnigen/generics/MyStack;"); - if (_m_MyStack__fromArray == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_MyStack, _m_MyStack__fromArray, arr); - return to_global_ref_result(_result); -} - -jmethodID _m_MyStack__fromArrayOfArrayOfGrandParents = NULL; -FFI_PLUGIN_EXPORT -JniResult MyStack__fromArrayOfArrayOfGrandParents(jobject arr) { - load_env(); - load_class_global_ref(&_c_MyStack, - "com/github/dart_lang/jnigen/generics/MyStack"); - if (_c_MyStack == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_MyStack, &_m_MyStack__fromArrayOfArrayOfGrandParents, - "fromArrayOfArrayOfGrandParents", - "([[Lcom/github/dart_lang/jnigen/generics/GrandParent;)Lcom/github/" - "dart_lang/jnigen/generics/MyStack;"); - if (_m_MyStack__fromArrayOfArrayOfGrandParents == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_MyStack, _m_MyStack__fromArrayOfArrayOfGrandParents, arr); - return to_global_ref_result(_result); -} - -jmethodID _m_MyStack__of = NULL; -FFI_PLUGIN_EXPORT -JniResult MyStack__of() { - load_env(); - load_class_global_ref(&_c_MyStack, - "com/github/dart_lang/jnigen/generics/MyStack"); - if (_c_MyStack == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_MyStack, &_m_MyStack__of, "of", - "()Lcom/github/dart_lang/jnigen/generics/MyStack;"); - if (_m_MyStack__of == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_MyStack, _m_MyStack__of); - return to_global_ref_result(_result); -} - -jmethodID _m_MyStack__of1 = NULL; -FFI_PLUGIN_EXPORT -JniResult MyStack__of1(jobject obj) { - load_env(); - load_class_global_ref(&_c_MyStack, - "com/github/dart_lang/jnigen/generics/MyStack"); - if (_c_MyStack == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_MyStack, &_m_MyStack__of1, "of", - "(Ljava/lang/Object;)Lcom/github/dart_lang/jnigen/generics/MyStack;"); - if (_m_MyStack__of1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_MyStack, - _m_MyStack__of1, obj); - return to_global_ref_result(_result); -} - -jmethodID _m_MyStack__of2 = NULL; -FFI_PLUGIN_EXPORT -JniResult MyStack__of2(jobject obj, jobject obj2) { - load_env(); - load_class_global_ref(&_c_MyStack, - "com/github/dart_lang/jnigen/generics/MyStack"); - if (_c_MyStack == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_MyStack, &_m_MyStack__of2, "of", - "(Ljava/lang/Object;Ljava/lang/Object;)Lcom/github/" - "dart_lang/jnigen/generics/MyStack;"); - if (_m_MyStack__of2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_MyStack, _m_MyStack__of2, obj, obj2); - return to_global_ref_result(_result); -} - -jmethodID _m_MyStack__push = NULL; -FFI_PLUGIN_EXPORT -JniResult MyStack__push(jobject self_, jobject item) { - load_env(); - load_class_global_ref(&_c_MyStack, - "com/github/dart_lang/jnigen/generics/MyStack"); - if (_c_MyStack == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_MyStack, &_m_MyStack__push, "push", "(Ljava/lang/Object;)V"); - if (_m_MyStack__push == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_MyStack__push, item); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_MyStack__pop = NULL; -FFI_PLUGIN_EXPORT -JniResult MyStack__pop(jobject self_) { - load_env(); - load_class_global_ref(&_c_MyStack, - "com/github/dart_lang/jnigen/generics/MyStack"); - if (_c_MyStack == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_MyStack, &_m_MyStack__pop, "pop", "()Ljava/lang/Object;"); - if (_m_MyStack__pop == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_MyStack__pop); - return to_global_ref_result(_result); -} - -jmethodID _m_MyStack__size = NULL; -FFI_PLUGIN_EXPORT -JniResult MyStack__size(jobject self_) { - load_env(); - load_class_global_ref(&_c_MyStack, - "com/github/dart_lang/jnigen/generics/MyStack"); - if (_c_MyStack == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_MyStack, &_m_MyStack__size, "size", "()I"); - if (_m_MyStack__size == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_MyStack__size); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -// com.github.dart_lang.jnigen.generics.StringKeyedMap -jclass _c_StringKeyedMap = NULL; - -jmethodID _m_StringKeyedMap__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult StringKeyedMap__new0() { - load_env(); - load_class_global_ref(&_c_StringKeyedMap, - "com/github/dart_lang/jnigen/generics/StringKeyedMap"); - if (_c_StringKeyedMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_StringKeyedMap, &_m_StringKeyedMap__new0, "", "()V"); - if (_m_StringKeyedMap__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_StringKeyedMap, _m_StringKeyedMap__new0); - return to_global_ref_result(_result); -} - -// com.github.dart_lang.jnigen.generics.StringStack -jclass _c_StringStack = NULL; - -jmethodID _m_StringStack__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult StringStack__new0() { - load_env(); - load_class_global_ref(&_c_StringStack, - "com/github/dart_lang/jnigen/generics/StringStack"); - if (_c_StringStack == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_StringStack, &_m_StringStack__new0, "", "()V"); - if (_m_StringStack__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_StringStack, _m_StringStack__new0); - return to_global_ref_result(_result); -} - -// com.github.dart_lang.jnigen.generics.StringValuedMap -jclass _c_StringValuedMap = NULL; - -jmethodID _m_StringValuedMap__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult StringValuedMap__new0() { - load_env(); - load_class_global_ref(&_c_StringValuedMap, - "com/github/dart_lang/jnigen/generics/StringValuedMap"); - if (_c_StringValuedMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_StringValuedMap, &_m_StringValuedMap__new0, "", "()V"); - if (_m_StringValuedMap__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_StringValuedMap, - _m_StringValuedMap__new0); - return to_global_ref_result(_result); -} - -// com.github.dart_lang.jnigen.interfaces.MyInterface -jclass _c_MyInterface = NULL; - -jmethodID _m_MyInterface__voidCallback = NULL; -FFI_PLUGIN_EXPORT -JniResult MyInterface__voidCallback(jobject self_, jobject s) { - load_env(); - load_class_global_ref(&_c_MyInterface, - "com/github/dart_lang/jnigen/interfaces/MyInterface"); - if (_c_MyInterface == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_MyInterface, &_m_MyInterface__voidCallback, "voidCallback", - "(Ljava/lang/String;)V"); - if (_m_MyInterface__voidCallback == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_MyInterface__voidCallback, s); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_MyInterface__stringCallback = NULL; -FFI_PLUGIN_EXPORT -JniResult MyInterface__stringCallback(jobject self_, jobject s) { - load_env(); - load_class_global_ref(&_c_MyInterface, - "com/github/dart_lang/jnigen/interfaces/MyInterface"); - if (_c_MyInterface == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_MyInterface, &_m_MyInterface__stringCallback, "stringCallback", - "(Ljava/lang/String;)Ljava/lang/String;"); - if (_m_MyInterface__stringCallback == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_MyInterface__stringCallback, s); - return to_global_ref_result(_result); -} - -jmethodID _m_MyInterface__varCallback = NULL; -FFI_PLUGIN_EXPORT -JniResult MyInterface__varCallback(jobject self_, jobject t) { - load_env(); - load_class_global_ref(&_c_MyInterface, - "com/github/dart_lang/jnigen/interfaces/MyInterface"); - if (_c_MyInterface == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_MyInterface, &_m_MyInterface__varCallback, "varCallback", - "(Ljava/lang/Object;)Ljava/lang/Object;"); - if (_m_MyInterface__varCallback == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, - _m_MyInterface__varCallback, t); - return to_global_ref_result(_result); -} - -jmethodID _m_MyInterface__manyPrimitives = NULL; -FFI_PLUGIN_EXPORT -JniResult MyInterface__manyPrimitives(jobject self_, - int32_t a, - uint8_t b, - uint16_t c, - double d) { - load_env(); - load_class_global_ref(&_c_MyInterface, - "com/github/dart_lang/jnigen/interfaces/MyInterface"); - if (_c_MyInterface == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_MyInterface, &_m_MyInterface__manyPrimitives, "manyPrimitives", - "(IZCD)J"); - if (_m_MyInterface__manyPrimitives == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int64_t _result = (*jniEnv)->CallLongMethod( - jniEnv, self_, _m_MyInterface__manyPrimitives, a, b, c, d); - return (JniResult){.value = {.j = _result}, .exception = check_exception()}; -} - -// com.github.dart_lang.jnigen.interfaces.MyInterfaceConsumer -jclass _c_MyInterfaceConsumer = NULL; - -jmethodID _m_MyInterfaceConsumer__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult MyInterfaceConsumer__new0() { - load_env(); - load_class_global_ref( - &_c_MyInterfaceConsumer, - "com/github/dart_lang/jnigen/interfaces/MyInterfaceConsumer"); - if (_c_MyInterfaceConsumer == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_MyInterfaceConsumer, &_m_MyInterfaceConsumer__new0, "", - "()V"); - if (_m_MyInterfaceConsumer__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_MyInterfaceConsumer, - _m_MyInterfaceConsumer__new0); - return to_global_ref_result(_result); -} - -jmethodID _m_MyInterfaceConsumer__consumeOnAnotherThread = NULL; -FFI_PLUGIN_EXPORT -JniResult MyInterfaceConsumer__consumeOnAnotherThread(jobject myInterface, - jobject s, - int32_t a, - uint8_t b, - uint16_t c, - double d, - jobject t) { - load_env(); - load_class_global_ref( - &_c_MyInterfaceConsumer, - "com/github/dart_lang/jnigen/interfaces/MyInterfaceConsumer"); - if (_c_MyInterfaceConsumer == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_MyInterfaceConsumer, - &_m_MyInterfaceConsumer__consumeOnAnotherThread, - "consumeOnAnotherThread", - "(Lcom/github/dart_lang/jnigen/interfaces/" - "MyInterface;Ljava/lang/String;IZCDLjava/lang/Object;)V"); - if (_m_MyInterfaceConsumer__consumeOnAnotherThread == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallStaticVoidMethod( - jniEnv, _c_MyInterfaceConsumer, - _m_MyInterfaceConsumer__consumeOnAnotherThread, myInterface, s, a, b, c, - d, t); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_MyInterfaceConsumer__consumeOnSameThread = NULL; -FFI_PLUGIN_EXPORT -JniResult MyInterfaceConsumer__consumeOnSameThread(jobject myInterface, - jobject s, - int32_t a, - uint8_t b, - uint16_t c, - double d, - jobject t) { - load_env(); - load_class_global_ref( - &_c_MyInterfaceConsumer, - "com/github/dart_lang/jnigen/interfaces/MyInterfaceConsumer"); - if (_c_MyInterfaceConsumer == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_MyInterfaceConsumer, - &_m_MyInterfaceConsumer__consumeOnSameThread, - "consumeOnSameThread", - "(Lcom/github/dart_lang/jnigen/interfaces/" - "MyInterface;Ljava/lang/String;IZCDLjava/lang/Object;)V"); - if (_m_MyInterfaceConsumer__consumeOnSameThread == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallStaticVoidMethod(jniEnv, _c_MyInterfaceConsumer, - _m_MyInterfaceConsumer__consumeOnSameThread, - myInterface, s, a, b, c, d, t); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -// com.github.dart_lang.jnigen.interfaces.MyRunnable -jclass _c_MyRunnable = NULL; - -jmethodID _m_MyRunnable__run = NULL; -FFI_PLUGIN_EXPORT -JniResult MyRunnable__run(jobject self_) { - load_env(); - load_class_global_ref(&_c_MyRunnable, - "com/github/dart_lang/jnigen/interfaces/MyRunnable"); - if (_c_MyRunnable == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_MyRunnable, &_m_MyRunnable__run, "run", "()V"); - if (_m_MyRunnable__run == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_MyRunnable__run); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -// com.github.dart_lang.jnigen.interfaces.MyRunnableRunner -jclass _c_MyRunnableRunner = NULL; - -jmethodID _m_MyRunnableRunner__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult MyRunnableRunner__new0(jobject runnable) { - load_env(); - load_class_global_ref( - &_c_MyRunnableRunner, - "com/github/dart_lang/jnigen/interfaces/MyRunnableRunner"); - if (_c_MyRunnableRunner == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_MyRunnableRunner, &_m_MyRunnableRunner__new0, "", - "(Lcom/github/dart_lang/jnigen/interfaces/MyRunnable;)V"); - if (_m_MyRunnableRunner__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_MyRunnableRunner, - _m_MyRunnableRunner__new0, runnable); - return to_global_ref_result(_result); -} - -jmethodID _m_MyRunnableRunner__runOnSameThread = NULL; -FFI_PLUGIN_EXPORT -JniResult MyRunnableRunner__runOnSameThread(jobject self_) { - load_env(); - load_class_global_ref( - &_c_MyRunnableRunner, - "com/github/dart_lang/jnigen/interfaces/MyRunnableRunner"); - if (_c_MyRunnableRunner == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_MyRunnableRunner, &_m_MyRunnableRunner__runOnSameThread, - "runOnSameThread", "()V"); - if (_m_MyRunnableRunner__runOnSameThread == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_MyRunnableRunner__runOnSameThread); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jmethodID _m_MyRunnableRunner__runOnAnotherThread = NULL; -FFI_PLUGIN_EXPORT -JniResult MyRunnableRunner__runOnAnotherThread(jobject self_) { - load_env(); - load_class_global_ref( - &_c_MyRunnableRunner, - "com/github/dart_lang/jnigen/interfaces/MyRunnableRunner"); - if (_c_MyRunnableRunner == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_MyRunnableRunner, &_m_MyRunnableRunner__runOnAnotherThread, - "runOnAnotherThread", "()V"); - if (_m_MyRunnableRunner__runOnAnotherThread == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallVoidMethod(jniEnv, self_, - _m_MyRunnableRunner__runOnAnotherThread); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jfieldID _f_MyRunnableRunner__error = NULL; -FFI_PLUGIN_EXPORT -JniResult get_MyRunnableRunner__error(jobject self_) { - load_env(); - load_class_global_ref( - &_c_MyRunnableRunner, - "com/github/dart_lang/jnigen/interfaces/MyRunnableRunner"); - if (_c_MyRunnableRunner == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_MyRunnableRunner, &_f_MyRunnableRunner__error, "error", - "Ljava/lang/Throwable;"); - jobject _result = - (*jniEnv)->GetObjectField(jniEnv, self_, _f_MyRunnableRunner__error); - return to_global_ref_result(_result); -} - -FFI_PLUGIN_EXPORT -JniResult set_MyRunnableRunner__error(jobject self_, jobject value) { - load_env(); - load_class_global_ref( - &_c_MyRunnableRunner, - "com/github/dart_lang/jnigen/interfaces/MyRunnableRunner"); - if (_c_MyRunnableRunner == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_MyRunnableRunner, &_f_MyRunnableRunner__error, "error", - "Ljava/lang/Throwable;"); - (*jniEnv)->SetObjectField(jniEnv, self_, _f_MyRunnableRunner__error, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -// com.github.dart_lang.jnigen.annotations.JsonSerializable$Case -jclass _c_JsonSerializable_Case = NULL; - -jmethodID _m_JsonSerializable_Case__values = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonSerializable_Case__values() { - load_env(); - load_class_global_ref( - &_c_JsonSerializable_Case, - "com/github/dart_lang/jnigen/annotations/JsonSerializable$Case"); - if (_c_JsonSerializable_Case == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_JsonSerializable_Case, &_m_JsonSerializable_Case__values, "values", - "()[Lcom/github/dart_lang/jnigen/annotations/JsonSerializable$Case;"); - if (_m_JsonSerializable_Case__values == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_JsonSerializable_Case, _m_JsonSerializable_Case__values); - return to_global_ref_result(_result); -} - -jmethodID _m_JsonSerializable_Case__valueOf = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonSerializable_Case__valueOf(jobject name) { - load_env(); - load_class_global_ref( - &_c_JsonSerializable_Case, - "com/github/dart_lang/jnigen/annotations/JsonSerializable$Case"); - if (_c_JsonSerializable_Case == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_JsonSerializable_Case, - &_m_JsonSerializable_Case__valueOf, "valueOf", - "(Ljava/lang/String;)Lcom/github/dart_lang/jnigen/" - "annotations/JsonSerializable$Case;"); - if (_m_JsonSerializable_Case__valueOf == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_JsonSerializable_Case, _m_JsonSerializable_Case__valueOf, - name); - return to_global_ref_result(_result); -} - -// com.github.dart_lang.jnigen.annotations.JsonSerializable -jclass _c_JsonSerializable = NULL; - -jmethodID _m_JsonSerializable__value = NULL; -FFI_PLUGIN_EXPORT -JniResult JsonSerializable__value(jobject self_) { - load_env(); - load_class_global_ref( - &_c_JsonSerializable, - "com/github/dart_lang/jnigen/annotations/JsonSerializable"); - if (_c_JsonSerializable == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method( - _c_JsonSerializable, &_m_JsonSerializable__value, "value", - "()Lcom/github/dart_lang/jnigen/annotations/JsonSerializable$Case;"); - if (_m_JsonSerializable__value == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonSerializable__value); - return to_global_ref_result(_result); -} - -// com.github.dart_lang.jnigen.annotations.MyDataClass -jclass _c_MyDataClass = NULL; - -jmethodID _m_MyDataClass__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult MyDataClass__new0() { - load_env(); - load_class_global_ref(&_c_MyDataClass, - "com/github/dart_lang/jnigen/annotations/MyDataClass"); - if (_c_MyDataClass == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_MyDataClass, &_m_MyDataClass__new0, "", "()V"); - if (_m_MyDataClass__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_MyDataClass, _m_MyDataClass__new0); - return to_global_ref_result(_result); -} - -// com.github.dart_lang.jnigen.simple_package.Color -jclass _c_Color = NULL; - -jmethodID _m_Color__values = NULL; -FFI_PLUGIN_EXPORT -JniResult Color__values() { - load_env(); - load_class_global_ref(&_c_Color, - "com/github/dart_lang/jnigen/simple_package/Color"); - if (_c_Color == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_Color, &_m_Color__values, "values", - "()[Lcom/github/dart_lang/jnigen/simple_package/Color;"); - if (_m_Color__values == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_Color, _m_Color__values); - return to_global_ref_result(_result); -} - -jmethodID _m_Color__valueOf = NULL; -FFI_PLUGIN_EXPORT -JniResult Color__valueOf(jobject name) { - load_env(); - load_class_global_ref(&_c_Color, - "com/github/dart_lang/jnigen/simple_package/Color"); - if (_c_Color == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method( - _c_Color, &_m_Color__valueOf, "valueOf", - "(Ljava/lang/String;)Lcom/github/dart_lang/jnigen/simple_package/Color;"); - if (_m_Color__valueOf == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_Color, - _m_Color__valueOf, name); - return to_global_ref_result(_result); -} - -// com.github.dart_lang.jnigen.simple_package.Exceptions -jclass _c_Exceptions = NULL; - -jmethodID _m_Exceptions__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult Exceptions__new0() { - load_env(); - load_class_global_ref( - &_c_Exceptions, "com/github/dart_lang/jnigen/simple_package/Exceptions"); - if (_c_Exceptions == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Exceptions, &_m_Exceptions__new0, "", "()V"); - if (_m_Exceptions__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_Exceptions, _m_Exceptions__new0); - return to_global_ref_result(_result); -} - -jmethodID _m_Exceptions__new1 = NULL; -FFI_PLUGIN_EXPORT -JniResult Exceptions__new1(float x) { - load_env(); - load_class_global_ref( - &_c_Exceptions, "com/github/dart_lang/jnigen/simple_package/Exceptions"); - if (_c_Exceptions == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Exceptions, &_m_Exceptions__new1, "", "(F)V"); - if (_m_Exceptions__new1 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_Exceptions, _m_Exceptions__new1, x); - return to_global_ref_result(_result); -} - -jmethodID _m_Exceptions__new2 = NULL; -FFI_PLUGIN_EXPORT -JniResult Exceptions__new2(int32_t a, - int32_t b, - int32_t c, - int32_t d, - int32_t e, - int32_t f) { - load_env(); - load_class_global_ref( - &_c_Exceptions, "com/github/dart_lang/jnigen/simple_package/Exceptions"); - if (_c_Exceptions == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Exceptions, &_m_Exceptions__new2, "", "(IIIIII)V"); - if (_m_Exceptions__new2 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_Exceptions, - _m_Exceptions__new2, a, b, c, d, e, f); - return to_global_ref_result(_result); -} - -jmethodID _m_Exceptions__staticObjectMethod = NULL; -FFI_PLUGIN_EXPORT -JniResult Exceptions__staticObjectMethod() { - load_env(); - load_class_global_ref( - &_c_Exceptions, "com/github/dart_lang/jnigen/simple_package/Exceptions"); - if (_c_Exceptions == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_Exceptions, &_m_Exceptions__staticObjectMethod, - "staticObjectMethod", "()Ljava/lang/Object;"); - if (_m_Exceptions__staticObjectMethod == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_Exceptions, _m_Exceptions__staticObjectMethod); - return to_global_ref_result(_result); -} - -jmethodID _m_Exceptions__staticIntMethod = NULL; -FFI_PLUGIN_EXPORT -JniResult Exceptions__staticIntMethod() { - load_env(); - load_class_global_ref( - &_c_Exceptions, "com/github/dart_lang/jnigen/simple_package/Exceptions"); - if (_c_Exceptions == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_Exceptions, &_m_Exceptions__staticIntMethod, - "staticIntMethod", "()I"); - if (_m_Exceptions__staticIntMethod == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallStaticIntMethod( - jniEnv, _c_Exceptions, _m_Exceptions__staticIntMethod); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_Exceptions__staticObjectArrayMethod = NULL; -FFI_PLUGIN_EXPORT -JniResult Exceptions__staticObjectArrayMethod() { - load_env(); - load_class_global_ref( - &_c_Exceptions, "com/github/dart_lang/jnigen/simple_package/Exceptions"); - if (_c_Exceptions == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_Exceptions, &_m_Exceptions__staticObjectArrayMethod, - "staticObjectArrayMethod", "()[Ljava/lang/Object;"); - if (_m_Exceptions__staticObjectArrayMethod == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_Exceptions, _m_Exceptions__staticObjectArrayMethod); - return to_global_ref_result(_result); -} - -jmethodID _m_Exceptions__staticIntArrayMethod = NULL; -FFI_PLUGIN_EXPORT -JniResult Exceptions__staticIntArrayMethod() { - load_env(); - load_class_global_ref( - &_c_Exceptions, "com/github/dart_lang/jnigen/simple_package/Exceptions"); - if (_c_Exceptions == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_Exceptions, &_m_Exceptions__staticIntArrayMethod, - "staticIntArrayMethod", "()[I"); - if (_m_Exceptions__staticIntArrayMethod == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallStaticObjectMethod( - jniEnv, _c_Exceptions, _m_Exceptions__staticIntArrayMethod); - return to_global_ref_result(_result); -} - -jmethodID _m_Exceptions__objectMethod = NULL; -FFI_PLUGIN_EXPORT -JniResult Exceptions__objectMethod(jobject self_) { - load_env(); - load_class_global_ref( - &_c_Exceptions, "com/github/dart_lang/jnigen/simple_package/Exceptions"); - if (_c_Exceptions == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Exceptions, &_m_Exceptions__objectMethod, "objectMethod", - "()Ljava/lang/Object;"); - if (_m_Exceptions__objectMethod == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_Exceptions__objectMethod); - return to_global_ref_result(_result); -} - -jmethodID _m_Exceptions__intMethod = NULL; -FFI_PLUGIN_EXPORT -JniResult Exceptions__intMethod(jobject self_) { - load_env(); - load_class_global_ref( - &_c_Exceptions, "com/github/dart_lang/jnigen/simple_package/Exceptions"); - if (_c_Exceptions == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Exceptions, &_m_Exceptions__intMethod, "intMethod", "()I"); - if (_m_Exceptions__intMethod == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = - (*jniEnv)->CallIntMethod(jniEnv, self_, _m_Exceptions__intMethod); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_Exceptions__objectArrayMethod = NULL; -FFI_PLUGIN_EXPORT -JniResult Exceptions__objectArrayMethod(jobject self_) { - load_env(); - load_class_global_ref( - &_c_Exceptions, "com/github/dart_lang/jnigen/simple_package/Exceptions"); - if (_c_Exceptions == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Exceptions, &_m_Exceptions__objectArrayMethod, - "objectArrayMethod", "()[Ljava/lang/Object;"); - if (_m_Exceptions__objectArrayMethod == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_Exceptions__objectArrayMethod); - return to_global_ref_result(_result); -} - -jmethodID _m_Exceptions__intArrayMethod = NULL; -FFI_PLUGIN_EXPORT -JniResult Exceptions__intArrayMethod(jobject self_) { - load_env(); - load_class_global_ref( - &_c_Exceptions, "com/github/dart_lang/jnigen/simple_package/Exceptions"); - if (_c_Exceptions == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Exceptions, &_m_Exceptions__intArrayMethod, "intArrayMethod", - "()[I"); - if (_m_Exceptions__intArrayMethod == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_Exceptions__intArrayMethod); - return to_global_ref_result(_result); -} - -jmethodID _m_Exceptions__throwNullPointerException = NULL; -FFI_PLUGIN_EXPORT -JniResult Exceptions__throwNullPointerException(jobject self_) { - load_env(); - load_class_global_ref( - &_c_Exceptions, "com/github/dart_lang/jnigen/simple_package/Exceptions"); - if (_c_Exceptions == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Exceptions, &_m_Exceptions__throwNullPointerException, - "throwNullPointerException", "()I"); - if (_m_Exceptions__throwNullPointerException == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallIntMethod( - jniEnv, self_, _m_Exceptions__throwNullPointerException); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_Exceptions__throwFileNotFoundException = NULL; -FFI_PLUGIN_EXPORT -JniResult Exceptions__throwFileNotFoundException(jobject self_) { - load_env(); - load_class_global_ref( - &_c_Exceptions, "com/github/dart_lang/jnigen/simple_package/Exceptions"); - if (_c_Exceptions == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Exceptions, &_m_Exceptions__throwFileNotFoundException, - "throwFileNotFoundException", "()Ljava/io/InputStream;"); - if (_m_Exceptions__throwFileNotFoundException == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_Exceptions__throwFileNotFoundException); - return to_global_ref_result(_result); -} - -jmethodID _m_Exceptions__throwClassCastException = NULL; -FFI_PLUGIN_EXPORT -JniResult Exceptions__throwClassCastException(jobject self_) { - load_env(); - load_class_global_ref( - &_c_Exceptions, "com/github/dart_lang/jnigen/simple_package/Exceptions"); - if (_c_Exceptions == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Exceptions, &_m_Exceptions__throwClassCastException, - "throwClassCastException", "()Ljava/io/FileInputStream;"); - if (_m_Exceptions__throwClassCastException == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->CallObjectMethod( - jniEnv, self_, _m_Exceptions__throwClassCastException); - return to_global_ref_result(_result); -} - -jmethodID _m_Exceptions__throwArrayIndexException = NULL; -FFI_PLUGIN_EXPORT -JniResult Exceptions__throwArrayIndexException(jobject self_) { - load_env(); - load_class_global_ref( - &_c_Exceptions, "com/github/dart_lang/jnigen/simple_package/Exceptions"); - if (_c_Exceptions == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Exceptions, &_m_Exceptions__throwArrayIndexException, - "throwArrayIndexException", "()I"); - if (_m_Exceptions__throwArrayIndexException == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallIntMethod( - jniEnv, self_, _m_Exceptions__throwArrayIndexException); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_Exceptions__throwArithmeticException = NULL; -FFI_PLUGIN_EXPORT -JniResult Exceptions__throwArithmeticException(jobject self_) { - load_env(); - load_class_global_ref( - &_c_Exceptions, "com/github/dart_lang/jnigen/simple_package/Exceptions"); - if (_c_Exceptions == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Exceptions, &_m_Exceptions__throwArithmeticException, - "throwArithmeticException", "()I"); - if (_m_Exceptions__throwArithmeticException == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - int32_t _result = (*jniEnv)->CallIntMethod( - jniEnv, self_, _m_Exceptions__throwArithmeticException); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -jmethodID _m_Exceptions__throwLoremIpsum = NULL; -FFI_PLUGIN_EXPORT -JniResult Exceptions__throwLoremIpsum() { - load_env(); - load_class_global_ref( - &_c_Exceptions, "com/github/dart_lang/jnigen/simple_package/Exceptions"); - if (_c_Exceptions == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_method(_c_Exceptions, &_m_Exceptions__throwLoremIpsum, - "throwLoremIpsum", "()V"); - if (_m_Exceptions__throwLoremIpsum == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - (*jniEnv)->CallStaticVoidMethod(jniEnv, _c_Exceptions, - _m_Exceptions__throwLoremIpsum); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -// com.github.dart_lang.jnigen.simple_package.Fields -jclass _c_Fields = NULL; - -jmethodID _m_Fields__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult Fields__new0() { - load_env(); - load_class_global_ref(&_c_Fields, - "com/github/dart_lang/jnigen/simple_package/Fields"); - if (_c_Fields == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Fields, &_m_Fields__new0, "", "()V"); - if (_m_Fields__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_Fields, _m_Fields__new0); - return to_global_ref_result(_result); -} - -jfieldID _f_Fields__amount = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Fields__amount() { - load_env(); - load_class_global_ref(&_c_Fields, - "com/github/dart_lang/jnigen/simple_package/Fields"); - if (_c_Fields == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Fields, &_f_Fields__amount, "amount", "I"); - int32_t _result = - (*jniEnv)->GetStaticIntField(jniEnv, _c_Fields, _f_Fields__amount); - return (JniResult){.value = {.i = _result}, .exception = check_exception()}; -} - -FFI_PLUGIN_EXPORT -JniResult set_Fields__amount(int32_t value) { - load_env(); - load_class_global_ref(&_c_Fields, - "com/github/dart_lang/jnigen/simple_package/Fields"); - if (_c_Fields == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Fields, &_f_Fields__amount, "amount", "I"); - (*jniEnv)->SetStaticIntField(jniEnv, _c_Fields, _f_Fields__amount, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jfieldID _f_Fields__pi = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Fields__pi() { - load_env(); - load_class_global_ref(&_c_Fields, - "com/github/dart_lang/jnigen/simple_package/Fields"); - if (_c_Fields == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Fields, &_f_Fields__pi, "pi", "D"); - double _result = - (*jniEnv)->GetStaticDoubleField(jniEnv, _c_Fields, _f_Fields__pi); - return (JniResult){.value = {.d = _result}, .exception = check_exception()}; -} - -FFI_PLUGIN_EXPORT -JniResult set_Fields__pi(double value) { - load_env(); - load_class_global_ref(&_c_Fields, - "com/github/dart_lang/jnigen/simple_package/Fields"); - if (_c_Fields == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Fields, &_f_Fields__pi, "pi", "D"); - (*jniEnv)->SetStaticDoubleField(jniEnv, _c_Fields, _f_Fields__pi, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jfieldID _f_Fields__asterisk = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Fields__asterisk() { - load_env(); - load_class_global_ref(&_c_Fields, - "com/github/dart_lang/jnigen/simple_package/Fields"); - if (_c_Fields == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Fields, &_f_Fields__asterisk, "asterisk", "C"); - uint16_t _result = - (*jniEnv)->GetStaticCharField(jniEnv, _c_Fields, _f_Fields__asterisk); - return (JniResult){.value = {.c = _result}, .exception = check_exception()}; -} - -FFI_PLUGIN_EXPORT -JniResult set_Fields__asterisk(uint16_t value) { - load_env(); - load_class_global_ref(&_c_Fields, - "com/github/dart_lang/jnigen/simple_package/Fields"); - if (_c_Fields == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Fields, &_f_Fields__asterisk, "asterisk", "C"); - (*jniEnv)->SetStaticCharField(jniEnv, _c_Fields, _f_Fields__asterisk, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jfieldID _f_Fields__name = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Fields__name() { - load_env(); - load_class_global_ref(&_c_Fields, - "com/github/dart_lang/jnigen/simple_package/Fields"); - if (_c_Fields == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Fields, &_f_Fields__name, "name", "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetStaticObjectField(jniEnv, _c_Fields, _f_Fields__name); - return to_global_ref_result(_result); -} - -FFI_PLUGIN_EXPORT -JniResult set_Fields__name(jobject value) { - load_env(); - load_class_global_ref(&_c_Fields, - "com/github/dart_lang/jnigen/simple_package/Fields"); - if (_c_Fields == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Fields, &_f_Fields__name, "name", "Ljava/lang/String;"); - (*jniEnv)->SetStaticObjectField(jniEnv, _c_Fields, _f_Fields__name, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jfieldID _f_Fields__i = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Fields__i(jobject self_) { - load_env(); - load_class_global_ref(&_c_Fields, - "com/github/dart_lang/jnigen/simple_package/Fields"); - if (_c_Fields == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_Fields, &_f_Fields__i, "i", "Ljava/lang/Integer;"); - jobject _result = (*jniEnv)->GetObjectField(jniEnv, self_, _f_Fields__i); - return to_global_ref_result(_result); -} - -FFI_PLUGIN_EXPORT -JniResult set_Fields__i(jobject self_, jobject value) { - load_env(); - load_class_global_ref(&_c_Fields, - "com/github/dart_lang/jnigen/simple_package/Fields"); - if (_c_Fields == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_Fields, &_f_Fields__i, "i", "Ljava/lang/Integer;"); - (*jniEnv)->SetObjectField(jniEnv, self_, _f_Fields__i, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jfieldID _f_Fields__trillion = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Fields__trillion(jobject self_) { - load_env(); - load_class_global_ref(&_c_Fields, - "com/github/dart_lang/jnigen/simple_package/Fields"); - if (_c_Fields == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_Fields, &_f_Fields__trillion, "trillion", "J"); - int64_t _result = (*jniEnv)->GetLongField(jniEnv, self_, _f_Fields__trillion); - return (JniResult){.value = {.j = _result}, .exception = check_exception()}; -} - -FFI_PLUGIN_EXPORT -JniResult set_Fields__trillion(jobject self_, int64_t value) { - load_env(); - load_class_global_ref(&_c_Fields, - "com/github/dart_lang/jnigen/simple_package/Fields"); - if (_c_Fields == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_Fields, &_f_Fields__trillion, "trillion", "J"); - (*jniEnv)->SetLongField(jniEnv, self_, _f_Fields__trillion, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jfieldID _f_Fields__isAchillesDead = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Fields__isAchillesDead(jobject self_) { - load_env(); - load_class_global_ref(&_c_Fields, - "com/github/dart_lang/jnigen/simple_package/Fields"); - if (_c_Fields == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_Fields, &_f_Fields__isAchillesDead, "isAchillesDead", "Z"); - uint8_t _result = - (*jniEnv)->GetBooleanField(jniEnv, self_, _f_Fields__isAchillesDead); - return (JniResult){.value = {.z = _result}, .exception = check_exception()}; -} - -FFI_PLUGIN_EXPORT -JniResult set_Fields__isAchillesDead(jobject self_, uint8_t value) { - load_env(); - load_class_global_ref(&_c_Fields, - "com/github/dart_lang/jnigen/simple_package/Fields"); - if (_c_Fields == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_Fields, &_f_Fields__isAchillesDead, "isAchillesDead", "Z"); - (*jniEnv)->SetBooleanField(jniEnv, self_, _f_Fields__isAchillesDead, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jfieldID _f_Fields__bestFighterInGreece = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Fields__bestFighterInGreece(jobject self_) { - load_env(); - load_class_global_ref(&_c_Fields, - "com/github/dart_lang/jnigen/simple_package/Fields"); - if (_c_Fields == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_Fields, &_f_Fields__bestFighterInGreece, "bestFighterInGreece", - "Ljava/lang/String;"); - jobject _result = - (*jniEnv)->GetObjectField(jniEnv, self_, _f_Fields__bestFighterInGreece); - return to_global_ref_result(_result); -} - -FFI_PLUGIN_EXPORT -JniResult set_Fields__bestFighterInGreece(jobject self_, jobject value) { - load_env(); - load_class_global_ref(&_c_Fields, - "com/github/dart_lang/jnigen/simple_package/Fields"); - if (_c_Fields == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_Fields, &_f_Fields__bestFighterInGreece, "bestFighterInGreece", - "Ljava/lang/String;"); - (*jniEnv)->SetObjectField(jniEnv, self_, _f_Fields__bestFighterInGreece, - value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jfieldID _f_Fields__random = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Fields__random(jobject self_) { - load_env(); - load_class_global_ref(&_c_Fields, - "com/github/dart_lang/jnigen/simple_package/Fields"); - if (_c_Fields == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_Fields, &_f_Fields__random, "random", "Ljava/util/Random;"); - jobject _result = (*jniEnv)->GetObjectField(jniEnv, self_, _f_Fields__random); - return to_global_ref_result(_result); -} - -FFI_PLUGIN_EXPORT -JniResult set_Fields__random(jobject self_, jobject value) { - load_env(); - load_class_global_ref(&_c_Fields, - "com/github/dart_lang/jnigen/simple_package/Fields"); - if (_c_Fields == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_Fields, &_f_Fields__random, "random", "Ljava/util/Random;"); - (*jniEnv)->SetObjectField(jniEnv, self_, _f_Fields__random, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jfieldID _f_Fields__euroSymbol = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Fields__euroSymbol() { - load_env(); - load_class_global_ref(&_c_Fields, - "com/github/dart_lang/jnigen/simple_package/Fields"); - if (_c_Fields == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Fields, &_f_Fields__euroSymbol, "euroSymbol", "C"); - uint16_t _result = - (*jniEnv)->GetStaticCharField(jniEnv, _c_Fields, _f_Fields__euroSymbol); - return (JniResult){.value = {.c = _result}, .exception = check_exception()}; -} - -FFI_PLUGIN_EXPORT -JniResult set_Fields__euroSymbol(uint16_t value) { - load_env(); - load_class_global_ref(&_c_Fields, - "com/github/dart_lang/jnigen/simple_package/Fields"); - if (_c_Fields == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Fields, &_f_Fields__euroSymbol, "euroSymbol", "C"); - (*jniEnv)->SetStaticCharField(jniEnv, _c_Fields, _f_Fields__euroSymbol, - value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -// com.github.dart_lang.jnigen.simple_package.Fields$Nested -jclass _c_Fields_Nested = NULL; - -jmethodID _m_Fields_Nested__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult Fields_Nested__new0() { - load_env(); - load_class_global_ref( - &_c_Fields_Nested, - "com/github/dart_lang/jnigen/simple_package/Fields$Nested"); - if (_c_Fields_Nested == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_Fields_Nested, &_m_Fields_Nested__new0, "", "()V"); - if (_m_Fields_Nested__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_Fields_Nested, _m_Fields_Nested__new0); - return to_global_ref_result(_result); -} - -jfieldID _f_Fields_Nested__hundred = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Fields_Nested__hundred(jobject self_) { - load_env(); - load_class_global_ref( - &_c_Fields_Nested, - "com/github/dart_lang/jnigen/simple_package/Fields$Nested"); - if (_c_Fields_Nested == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_Fields_Nested, &_f_Fields_Nested__hundred, "hundred", "J"); - int64_t _result = - (*jniEnv)->GetLongField(jniEnv, self_, _f_Fields_Nested__hundred); - return (JniResult){.value = {.j = _result}, .exception = check_exception()}; -} - -FFI_PLUGIN_EXPORT -JniResult set_Fields_Nested__hundred(jobject self_, int64_t value) { - load_env(); - load_class_global_ref( - &_c_Fields_Nested, - "com/github/dart_lang/jnigen/simple_package/Fields$Nested"); - if (_c_Fields_Nested == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_field(_c_Fields_Nested, &_f_Fields_Nested__hundred, "hundred", "J"); - (*jniEnv)->SetLongField(jniEnv, self_, _f_Fields_Nested__hundred, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -jfieldID _f_Fields_Nested__BEST_GOD = NULL; -FFI_PLUGIN_EXPORT -JniResult get_Fields_Nested__BEST_GOD() { - load_env(); - load_class_global_ref( - &_c_Fields_Nested, - "com/github/dart_lang/jnigen/simple_package/Fields$Nested"); - if (_c_Fields_Nested == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Fields_Nested, &_f_Fields_Nested__BEST_GOD, "BEST_GOD", - "Ljava/lang/String;"); - jobject _result = (*jniEnv)->GetStaticObjectField(jniEnv, _c_Fields_Nested, - _f_Fields_Nested__BEST_GOD); - return to_global_ref_result(_result); -} - -FFI_PLUGIN_EXPORT -JniResult set_Fields_Nested__BEST_GOD(jobject value) { - load_env(); - load_class_global_ref( - &_c_Fields_Nested, - "com/github/dart_lang/jnigen/simple_package/Fields$Nested"); - if (_c_Fields_Nested == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_static_field(_c_Fields_Nested, &_f_Fields_Nested__BEST_GOD, "BEST_GOD", - "Ljava/lang/String;"); - (*jniEnv)->SetStaticObjectField(jniEnv, _c_Fields_Nested, - _f_Fields_Nested__BEST_GOD, value); - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; -} - -// com.github.dart_lang.jnigen.generics.GenericTypeParams -jclass _c_GenericTypeParams = NULL; - -jmethodID _m_GenericTypeParams__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult GenericTypeParams__new0() { - load_env(); - load_class_global_ref( - &_c_GenericTypeParams, - "com/github/dart_lang/jnigen/generics/GenericTypeParams"); - if (_c_GenericTypeParams == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_GenericTypeParams, &_m_GenericTypeParams__new0, "", - "()V"); - if (_m_GenericTypeParams__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = (*jniEnv)->NewObject(jniEnv, _c_GenericTypeParams, - _m_GenericTypeParams__new0); - return to_global_ref_result(_result); -} - -// com.github.dart_lang.jnigen.generics.StringMap -jclass _c_StringMap = NULL; - -jmethodID _m_StringMap__new0 = NULL; -FFI_PLUGIN_EXPORT -JniResult StringMap__new0() { - load_env(); - load_class_global_ref(&_c_StringMap, - "com/github/dart_lang/jnigen/generics/StringMap"); - if (_c_StringMap == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - load_method(_c_StringMap, &_m_StringMap__new0, "", "()V"); - if (_m_StringMap__new0 == NULL) - return (JniResult){.value = {.j = 0}, .exception = check_exception()}; - jobject _result = - (*jniEnv)->NewObject(jniEnv, _c_StringMap, _m_StringMap__new0); - return to_global_ref_result(_result); -} diff --git a/pkgs/jnigen/test/simple_package_test/c_based/dart_bindings/simple_package.dart b/pkgs/jnigen/test/simple_package_test/c_based/dart_bindings/simple_package.dart deleted file mode 100644 index d832b109d6..0000000000 --- a/pkgs/jnigen/test/simple_package_test/c_based/dart_bindings/simple_package.dart +++ /dev/null @@ -1,4202 +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. - -// Autogenerated by jnigen. DO NOT EDIT! - -// ignore_for_file: annotate_overrides -// ignore_for_file: camel_case_extensions -// ignore_for_file: camel_case_types -// ignore_for_file: constant_identifier_names -// ignore_for_file: doc_directive_unknown -// ignore_for_file: file_names -// ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: no_leading_underscores_for_local_identifiers -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: overridden_fields -// ignore_for_file: unnecessary_cast -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// ignore_for_file: unused_import -// ignore_for_file: unused_local_variable -// ignore_for_file: unused_shown_name -// ignore_for_file: use_super_parameters - -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; - -// Auto-generated initialization code. - -final ffi.Pointer Function(String sym) jniLookup = - ProtectedJniExtensions.initGeneratedLibrary("simple_package"); - -/// from: com.github.dart_lang.jnigen.simple_package.Example$Nested$NestedTwice -class Example_Nested_NestedTwice extends jni.JObject { - @override - late final jni.JObjType $type = type; - - Example_Nested_NestedTwice.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $Example_Nested_NestedTwiceType(); - static final _get_ZERO = - jniLookup>( - "get_Example_Nested_NestedTwice__ZERO") - .asFunction(); - - static final _set_ZERO = - jniLookup>( - "set_Example_Nested_NestedTwice__ZERO") - .asFunction(); - - /// from: static public int ZERO - static int get ZERO => _get_ZERO().integer; - - /// from: static public int ZERO - static set ZERO(int value) => _set_ZERO(value).check(); - - static final _new0 = jniLookup>( - "Example_Nested_NestedTwice__new0") - .asFunction(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory Example_Nested_NestedTwice() { - return Example_Nested_NestedTwice.fromReference(_new0().reference); - } -} - -final class $Example_Nested_NestedTwiceType - extends jni.JObjType { - const $Example_Nested_NestedTwiceType(); - - @override - String get signature => - r"Lcom/github/dart_lang/jnigen/simple_package/Example$Nested$NestedTwice;"; - - @override - Example_Nested_NestedTwice fromReference(jni.JReference reference) => - Example_Nested_NestedTwice.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($Example_Nested_NestedTwiceType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($Example_Nested_NestedTwiceType) && - other is $Example_Nested_NestedTwiceType; - } -} - -/// from: com.github.dart_lang.jnigen.simple_package.Example$Nested -class Example_Nested extends jni.JObject { - @override - late final jni.JObjType $type = type; - - Example_Nested.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $Example_NestedType(); - static final _new0 = - jniLookup>( - "Example_Nested__new0") - .asFunction(); - - /// from: public void (boolean value) - /// The returned object must be released after use, by calling the [release] method. - factory Example_Nested( - bool value, - ) { - return Example_Nested.fromReference(_new0(value ? 1 : 0).reference); - } - - static final _usesAnonymousInnerClass = jniLookup< - ffi - .NativeFunction)>>( - "Example_Nested__usesAnonymousInnerClass") - .asFunction)>(); - - /// from: public void usesAnonymousInnerClass() - void usesAnonymousInnerClass() { - _usesAnonymousInnerClass(reference.pointer).check(); - } - - static final _getValue = jniLookup< - ffi - .NativeFunction)>>( - "Example_Nested__getValue") - .asFunction)>(); - - /// from: public boolean getValue() - bool getValue() { - return _getValue(reference.pointer).boolean; - } - - static final _setValue = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Uint8)>>("Example_Nested__setValue") - .asFunction, int)>(); - - /// from: public void setValue(boolean value) - void setValue( - bool value, - ) { - _setValue(reference.pointer, value ? 1 : 0).check(); - } -} - -final class $Example_NestedType extends jni.JObjType { - const $Example_NestedType(); - - @override - String get signature => - r"Lcom/github/dart_lang/jnigen/simple_package/Example$Nested;"; - - @override - Example_Nested fromReference(jni.JReference reference) => - Example_Nested.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($Example_NestedType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($Example_NestedType) && - other is $Example_NestedType; - } -} - -/// from: com.github.dart_lang.jnigen.simple_package.Example$NonStaticNested -class Example_NonStaticNested extends jni.JObject { - @override - late final jni.JObjType $type = type; - - Example_NonStaticNested.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $Example_NonStaticNestedType(); - static final _get_ok = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_Example_NonStaticNested__ok") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); - - static final _set_ok = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(jni.JObjectPtr, - ffi.Uint8)>>("set_Example_NonStaticNested__ok") - .asFunction(); - - /// from: public boolean ok - bool get ok => _get_ok(reference.pointer).boolean; - - /// from: public boolean ok - set ok(bool value) => _set_ok(reference.pointer, value ? 1 : 0).check(); - - static final _new0 = jniLookup< - ffi - .NativeFunction)>>( - "Example_NonStaticNested__new0") - .asFunction)>(); - - /// from: public void (com.github.dart_lang.jnigen.simple_package.Example $parent) - /// The returned object must be released after use, by calling the [release] method. - factory Example_NonStaticNested( - Example $parent, - ) { - return Example_NonStaticNested.fromReference( - _new0($parent.reference.pointer).reference); - } -} - -final class $Example_NonStaticNestedType - extends jni.JObjType { - const $Example_NonStaticNestedType(); - - @override - String get signature => - r"Lcom/github/dart_lang/jnigen/simple_package/Example$NonStaticNested;"; - - @override - Example_NonStaticNested fromReference(jni.JReference reference) => - Example_NonStaticNested.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($Example_NonStaticNestedType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($Example_NonStaticNestedType) && - other is $Example_NonStaticNestedType; - } -} - -/// from: com.github.dart_lang.jnigen.simple_package.Example -class Example extends jni.JObject { - @override - late final jni.JObjType $type = type; - - Example.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $ExampleType(); - - /// from: static public final int ON - static const ON = 1; - - /// from: static public final int OFF - static const OFF = 0; - - /// from: static public final double PI - static const PI = 3.14159; - - /// from: static public final char SEMICOLON - static const SEMICOLON = 59; - static final _get_SEMICOLON_STRING = - jniLookup>( - "get_Example__SEMICOLON_STRING") - .asFunction(); - - /// from: static public final java.lang.String SEMICOLON_STRING - /// The returned object must be released after use, by calling the [release] method. - static jni.JString get SEMICOLON_STRING => - _get_SEMICOLON_STRING().object(const jni.JStringType()); - - static final _get_unusedRandom = - jniLookup>( - "get_Example__unusedRandom") - .asFunction(); - - /// from: static public final java.util.Random unusedRandom - /// The returned object must be released after use, by calling the [release] method. - static jni.JObject get unusedRandom => - _get_unusedRandom().object(const jni.JObjectType()); - - static final _get_protectedField = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_Example__protectedField") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); - - static final _set_protectedField = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(jni.JObjectPtr, - ffi.Pointer)>>("set_Example__protectedField") - .asFunction< - jni.JniResult Function(jni.JObjectPtr, ffi.Pointer)>(); - - /// from: protected java.util.Random protectedField - /// The returned object must be released after use, by calling the [release] method. - jni.JObject get protectedField => - _get_protectedField(reference.pointer).object(const jni.JObjectType()); - - /// from: protected java.util.Random protectedField - /// The returned object must be released after use, by calling the [release] method. - set protectedField(jni.JObject value) => - _set_protectedField(reference.pointer, value.reference.pointer).check(); - - static final _getAmount = - jniLookup>( - "Example__getAmount") - .asFunction(); - - /// from: static public int getAmount() - static int getAmount() { - return _getAmount().integer; - } - - static final _getPi = - jniLookup>("Example__getPi") - .asFunction(); - - /// from: static public double getPi() - static double getPi() { - return _getPi().doubleFloat; - } - - static final _getAsterisk = - jniLookup>( - "Example__getAsterisk") - .asFunction(); - - /// from: static public char getAsterisk() - static int getAsterisk() { - return _getAsterisk().char; - } - - static final _getName = - jniLookup>( - "Example__getName") - .asFunction(); - - /// from: static public java.lang.String getName() - /// The returned object must be released after use, by calling the [release] method. - static jni.JString getName() { - return _getName().object(const jni.JStringType()); - } - - static final _getNestedInstance = - jniLookup>( - "Example__getNestedInstance") - .asFunction(); - - /// from: static public com.github.dart_lang.jnigen.simple_package.Example.Nested getNestedInstance() - /// The returned object must be released after use, by calling the [release] method. - static Example_Nested getNestedInstance() { - return _getNestedInstance().object(const $Example_NestedType()); - } - - static final _setAmount = - jniLookup>( - "Example__setAmount") - .asFunction(); - - /// from: static public void setAmount(int newAmount) - static void setAmount( - int newAmount, - ) { - _setAmount(newAmount).check(); - } - - static final _setName = jniLookup< - ffi - .NativeFunction)>>( - "Example__setName") - .asFunction)>(); - - /// from: static public void setName(java.lang.String newName) - static void setName( - jni.JString newName, - ) { - _setName(newName.reference.pointer).check(); - } - - static final _setNestedInstance = jniLookup< - ffi - .NativeFunction)>>( - "Example__setNestedInstance") - .asFunction)>(); - - /// from: static public void setNestedInstance(com.github.dart_lang.jnigen.simple_package.Example.Nested newNested) - static void setNestedInstance( - Example_Nested newNested, - ) { - _setNestedInstance(newNested.reference.pointer).check(); - } - - static final _max4 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Int32, ffi.Int32, ffi.Int32, ffi.Int32)>>("Example__max4") - .asFunction(); - - /// from: static public int max4(int a, int b, int c, int d) - static int max4( - int a, - int b, - int c, - int d, - ) { - return _max4(a, b, c, d).integer; - } - - static final _max8 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Int32, ffi.Int32, ffi.Int32, ffi.Int32, - ffi.Int32, ffi.Int32, ffi.Int32, ffi.Int32)>>("Example__max8") - .asFunction< - jni.JniResult Function(int, int, int, int, int, int, int, int)>(); - - /// from: static public int max8(int a, int b, int c, int d, int e, int f, int g, int h) - static int max8( - int a, - int b, - int c, - int d, - int e, - int f, - int g, - int h, - ) { - return _max8(a, b, c, d, e, f, g, h).integer; - } - - static final _getNumber = jniLookup< - ffi - .NativeFunction)>>( - "Example__getNumber") - .asFunction)>(); - - /// from: public int getNumber() - int getNumber() { - return _getNumber(reference.pointer).integer; - } - - static final _setNumber = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Int32)>>("Example__setNumber") - .asFunction, int)>(); - - /// from: public void setNumber(int number) - void setNumber( - int number, - ) { - _setNumber(reference.pointer, number).check(); - } - - static final _getIsUp = jniLookup< - ffi - .NativeFunction)>>( - "Example__getIsUp") - .asFunction)>(); - - /// from: public boolean getIsUp() - bool getIsUp() { - return _getIsUp(reference.pointer).boolean; - } - - static final _setUp = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Uint8)>>("Example__setUp") - .asFunction, int)>(); - - /// from: public void setUp(boolean isUp) - void setUp( - bool isUp, - ) { - _setUp(reference.pointer, isUp ? 1 : 0).check(); - } - - static final _getCodename = jniLookup< - ffi - .NativeFunction)>>( - "Example__getCodename") - .asFunction)>(); - - /// from: public java.lang.String getCodename() - /// The returned object must be released after use, by calling the [release] method. - jni.JString getCodename() { - return _getCodename(reference.pointer).object(const jni.JStringType()); - } - - static final _setCodename = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("Example__setCodename") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public void setCodename(java.lang.String codename) - void setCodename( - jni.JString codename, - ) { - _setCodename(reference.pointer, codename.reference.pointer).check(); - } - - static final _getRandom = jniLookup< - ffi - .NativeFunction)>>( - "Example__getRandom") - .asFunction)>(); - - /// from: public java.util.Random getRandom() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject getRandom() { - return _getRandom(reference.pointer).object(const jni.JObjectType()); - } - - static final _setRandom = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("Example__setRandom") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public void setRandom(java.util.Random random) - void setRandom( - jni.JObject random, - ) { - _setRandom(reference.pointer, random.reference.pointer).check(); - } - - static final _getRandomLong = jniLookup< - ffi - .NativeFunction)>>( - "Example__getRandomLong") - .asFunction)>(); - - /// from: public long getRandomLong() - int getRandomLong() { - return _getRandomLong(reference.pointer).long; - } - - static final _add4Longs = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, ffi.Int64, - ffi.Int64, ffi.Int64, ffi.Int64)>>("Example__add4Longs") - .asFunction< - jni.JniResult Function(ffi.Pointer, int, int, int, int)>(); - - /// from: public long add4Longs(long a, long b, long c, long d) - int add4Longs( - int a, - int b, - int c, - int d, - ) { - return _add4Longs(reference.pointer, a, b, c, d).long; - } - - static final _add8Longs = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Int64, - ffi.Int64, - ffi.Int64, - ffi.Int64, - ffi.Int64, - ffi.Int64, - ffi.Int64, - ffi.Int64)>>("Example__add8Longs") - .asFunction< - jni.JniResult Function( - ffi.Pointer, int, int, int, int, int, int, int, int)>(); - - /// from: public long add8Longs(long a, long b, long c, long d, long e, long f, long g, long h) - int add8Longs( - int a, - int b, - int c, - int d, - int e, - int f, - int g, - int h, - ) { - return _add8Longs(reference.pointer, a, b, c, d, e, f, g, h).long; - } - - static final _getRandomNumericString = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("Example__getRandomNumericString") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public java.lang.String getRandomNumericString(java.util.Random random) - /// The returned object must be released after use, by calling the [release] method. - jni.JString getRandomNumericString( - jni.JObject random, - ) { - return _getRandomNumericString(reference.pointer, random.reference.pointer) - .object(const jni.JStringType()); - } - - static final _protectedMethod = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("Example__protectedMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// from: protected void protectedMethod(java.lang.String a, java.lang.String b) - void protectedMethod( - jni.JString a, - jni.JString b, - ) { - _protectedMethod( - reference.pointer, a.reference.pointer, b.reference.pointer) - .check(); - } - - static final _finalMethod = jniLookup< - ffi - .NativeFunction)>>( - "Example__finalMethod") - .asFunction)>(); - - /// from: public final void finalMethod() - void finalMethod() { - _finalMethod(reference.pointer).check(); - } - - static final _getList = jniLookup< - ffi - .NativeFunction)>>( - "Example__getList") - .asFunction)>(); - - /// from: public java.util.List getList() - /// The returned object must be released after use, by calling the [release] method. - jni.JList getList() { - return _getList(reference.pointer) - .object(const jni.JListType(jni.JStringType())); - } - - static final _joinStrings = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("Example__joinStrings") - .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// from: public java.lang.String joinStrings(java.util.List values, java.lang.String delim) - /// The returned object must be released after use, by calling the [release] method. - /// - /// Joins the strings in the list using the given delimiter. - jni.JString joinStrings( - jni.JList values, - jni.JString delim, - ) { - return _joinStrings(reference.pointer, values.reference.pointer, - delim.reference.pointer) - .object(const jni.JStringType()); - } - - static final _methodWithSeveralParams = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Uint16, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("Example__methodWithSeveralParams") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// from: public void methodWithSeveralParams(char ch, java.lang.String s, int[] a, T t, java.util.List lt, java.util.Map wm) - void methodWithSeveralParams<$T extends jni.JObject>( - int ch, - jni.JString s, - jni.JArray a, - $T t, - jni.JList<$T> lt, - jni.JMap wm, { - jni.JObjType<$T>? T, - }) { - T ??= jni.lowestCommonSuperType([ - (lt.$type as jni.JListType).E, - t.$type, - ]) as jni.JObjType<$T>; - _methodWithSeveralParams( - reference.pointer, - ch, - s.reference.pointer, - a.reference.pointer, - t.reference.pointer, - lt.reference.pointer, - wm.reference.pointer) - .check(); - } - - static final _new0 = - jniLookup>("Example__new0") - .asFunction(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory Example() { - return Example.fromReference(_new0().reference); - } - - static final _new1 = - jniLookup>( - "Example__new1") - .asFunction(); - - /// from: public void (int number) - /// The returned object must be released after use, by calling the [release] method. - factory Example.new1( - int number, - ) { - return Example.fromReference(_new1(number).reference); - } - - static final _new2 = jniLookup< - ffi.NativeFunction>( - "Example__new2") - .asFunction(); - - /// from: public void (int number, boolean isUp) - /// The returned object must be released after use, by calling the [release] method. - factory Example.new2( - int number, - bool isUp, - ) { - return Example.fromReference(_new2(number, isUp ? 1 : 0).reference); - } - - static final _new3 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Int32, ffi.Uint8, - ffi.Pointer)>>("Example__new3") - .asFunction)>(); - - /// from: public void (int number, boolean isUp, java.lang.String codename) - /// The returned object must be released after use, by calling the [release] method. - factory Example.new3( - int number, - bool isUp, - jni.JString codename, - ) { - return Example.fromReference( - _new3(number, isUp ? 1 : 0, codename.reference.pointer).reference); - } - - static final _new4 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Int32, ffi.Int32, ffi.Int32, ffi.Int32, - ffi.Int32, ffi.Int32, ffi.Int32, ffi.Int32)>>("Example__new4") - .asFunction< - jni.JniResult Function(int, int, int, int, int, int, int, int)>(); - - /// from: public void (int a, int b, int c, int d, int e, int f, int g, int h) - /// The returned object must be released after use, by calling the [release] method. - factory Example.new4( - int a, - int b, - int c, - int d, - int e, - int f, - int g, - int h, - ) { - return Example.fromReference(_new4(a, b, c, d, e, f, g, h).reference); - } - - static final _whichExample = jniLookup< - ffi - .NativeFunction)>>( - "Example__whichExample") - .asFunction)>(); - - /// from: public int whichExample() - int whichExample() { - return _whichExample(reference.pointer).integer; - } - - static final _addInts = jniLookup< - ffi.NativeFunction>( - "Example__addInts") - .asFunction(); - - /// from: static public int addInts(int a, int b) - static int addInts( - int a, - int b, - ) { - return _addInts(a, b).integer; - } - - static final _getArr = - jniLookup>("Example__getArr") - .asFunction(); - - /// from: static public int[] getArr() - /// The returned object must be released after use, by calling the [release] method. - static jni.JArray getArr() { - return _getArr().object(const jni.JArrayType(jni.jintType())); - } - - static final _addAll = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer)>>("Example__addAll") - .asFunction)>(); - - /// from: static public int addAll(int[] arr) - static int addAll( - jni.JArray arr, - ) { - return _addAll(arr.reference.pointer).integer; - } - - static final _getSelf = jniLookup< - ffi - .NativeFunction)>>( - "Example__getSelf") - .asFunction)>(); - - /// from: public com.github.dart_lang.jnigen.simple_package.Example getSelf() - /// The returned object must be released after use, by calling the [release] method. - Example getSelf() { - return _getSelf(reference.pointer).object(const $ExampleType()); - } - - static final _throwException = - jniLookup>( - "Example__throwException") - .asFunction(); - - /// from: static public void throwException() - static void throwException() { - _throwException().check(); - } - - static final _overloaded = jniLookup< - ffi - .NativeFunction)>>( - "Example__overloaded") - .asFunction)>(); - - /// from: public void overloaded() - void overloaded() { - _overloaded(reference.pointer).check(); - } - - static final _overloaded1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, ffi.Int32, - ffi.Pointer)>>("Example__overloaded1") - .asFunction< - jni.JniResult Function( - ffi.Pointer, int, ffi.Pointer)>(); - - /// from: public void overloaded(int a, java.lang.String b) - void overloaded1( - int a, - jni.JString b, - ) { - _overloaded1(reference.pointer, a, b.reference.pointer).check(); - } - - static final _overloaded2 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Int32)>>("Example__overloaded2") - .asFunction, int)>(); - - /// from: public void overloaded(int a) - void overloaded2( - int a, - ) { - _overloaded2(reference.pointer, a).check(); - } - - static final _overloaded3 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("Example__overloaded3") - .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// from: public void overloaded(java.util.List a, java.lang.String b) - void overloaded3( - jni.JList a, - jni.JString b, - ) { - _overloaded3(reference.pointer, a.reference.pointer, b.reference.pointer) - .check(); - } - - static final _overloaded4 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("Example__overloaded4") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public void overloaded(java.util.List a) - void overloaded4( - jni.JList a, - ) { - _overloaded4(reference.pointer, a.reference.pointer).check(); - } -} - -final class $ExampleType extends jni.JObjType { - const $ExampleType(); - - @override - String get signature => - r"Lcom/github/dart_lang/jnigen/simple_package/Example;"; - - @override - Example fromReference(jni.JReference reference) => - Example.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($ExampleType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($ExampleType) && other is $ExampleType; - } -} - -/// from: com.github.dart_lang.jnigen.pkg2.C2 -class C2 extends jni.JObject { - @override - late final jni.JObjType $type = type; - - C2.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $C2Type(); - static final _get_CONSTANT = - jniLookup>( - "get_C2__CONSTANT") - .asFunction(); - - static final _set_CONSTANT = - jniLookup>( - "set_C2__CONSTANT") - .asFunction(); - - /// from: static public int CONSTANT - static int get CONSTANT => _get_CONSTANT().integer; - - /// from: static public int CONSTANT - static set CONSTANT(int value) => _set_CONSTANT(value).check(); - - static final _new0 = - jniLookup>("C2__new0") - .asFunction(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory C2() { - return C2.fromReference(_new0().reference); - } -} - -final class $C2Type extends jni.JObjType { - const $C2Type(); - - @override - String get signature => r"Lcom/github/dart_lang/jnigen/pkg2/C2;"; - - @override - C2 fromReference(jni.JReference reference) => C2.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($C2Type).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($C2Type) && other is $C2Type; - } -} - -/// from: com.github.dart_lang.jnigen.pkg2.Example -class Example1 extends jni.JObject { - @override - late final jni.JObjType $type = type; - - Example1.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $Example1Type(); - static final _new0 = - jniLookup>("Example1__new0") - .asFunction(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory Example1() { - return Example1.fromReference(_new0().reference); - } - - static final _whichExample = jniLookup< - ffi - .NativeFunction)>>( - "Example1__whichExample") - .asFunction)>(); - - /// from: public int whichExample() - int whichExample() { - return _whichExample(reference.pointer).integer; - } -} - -final class $Example1Type extends jni.JObjType { - const $Example1Type(); - - @override - String get signature => r"Lcom/github/dart_lang/jnigen/pkg2/Example;"; - - @override - Example1 fromReference(jni.JReference reference) => - Example1.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($Example1Type).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($Example1Type) && other is $Example1Type; - } -} - -/// from: com.github.dart_lang.jnigen.generics.GrandParent$Parent$Child -class GrandParent_Parent_Child<$T extends jni.JObject, $S extends jni.JObject, - $U extends jni.JObject> extends jni.JObject { - @override - late final jni.JObjType> $type = - type(T, S, U); - - final jni.JObjType<$T> T; - final jni.JObjType<$S> S; - final jni.JObjType<$U> U; - - GrandParent_Parent_Child.fromReference( - this.T, - this.S, - this.U, - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static $GrandParent_Parent_ChildType<$T, $S, $U> type<$T extends jni.JObject, - $S extends jni.JObject, $U extends jni.JObject>( - jni.JObjType<$T> T, - jni.JObjType<$S> S, - jni.JObjType<$U> U, - ) { - return $GrandParent_Parent_ChildType( - T, - S, - U, - ); - } - - static final _get_grandParentValue = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_GrandParent_Parent_Child__grandParentValue") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); - - static final _set_grandParentValue = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, ffi.Pointer)>>( - "set_GrandParent_Parent_Child__grandParentValue") - .asFunction< - jni.JniResult Function(jni.JObjectPtr, ffi.Pointer)>(); - - /// from: public T grandParentValue - /// The returned object must be released after use, by calling the [release] method. - $T get grandParentValue => _get_grandParentValue(reference.pointer).object(T); - - /// from: public T grandParentValue - /// The returned object must be released after use, by calling the [release] method. - set grandParentValue($T value) => - _set_grandParentValue(reference.pointer, value.reference.pointer).check(); - - static final _get_parentValue = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_GrandParent_Parent_Child__parentValue") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); - - static final _set_parentValue = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, ffi.Pointer)>>( - "set_GrandParent_Parent_Child__parentValue") - .asFunction< - jni.JniResult Function(jni.JObjectPtr, ffi.Pointer)>(); - - /// from: public S parentValue - /// The returned object must be released after use, by calling the [release] method. - $S get parentValue => _get_parentValue(reference.pointer).object(S); - - /// from: public S parentValue - /// The returned object must be released after use, by calling the [release] method. - set parentValue($S value) => - _set_parentValue(reference.pointer, value.reference.pointer).check(); - - static final _get_value = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_GrandParent_Parent_Child__value") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); - - static final _set_value = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, ffi.Pointer)>>( - "set_GrandParent_Parent_Child__value") - .asFunction< - jni.JniResult Function(jni.JObjectPtr, ffi.Pointer)>(); - - /// from: public U value - /// The returned object must be released after use, by calling the [release] method. - $U get value => _get_value(reference.pointer).object(U); - - /// from: public U value - /// The returned object must be released after use, by calling the [release] method. - set value($U value) => - _set_value(reference.pointer, value.reference.pointer).check(); - - static final _new0 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("GrandParent_Parent_Child__new0") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public void (com.github.dart_lang.jnigen.generics.GrandParent$Parent $parent, U newValue) - /// The returned object must be released after use, by calling the [release] method. - factory GrandParent_Parent_Child( - GrandParent_Parent<$T, $S> $parent, - $U newValue, { - jni.JObjType<$T>? T, - jni.JObjType<$S>? S, - jni.JObjType<$U>? U, - }) { - T ??= jni.lowestCommonSuperType([ - ($parent.$type as $GrandParent_ParentType).T, - ]) as jni.JObjType<$T>; - S ??= jni.lowestCommonSuperType([ - ($parent.$type as $GrandParent_ParentType).S, - ]) as jni.JObjType<$S>; - U ??= jni.lowestCommonSuperType([ - newValue.$type, - ]) as jni.JObjType<$U>; - return GrandParent_Parent_Child.fromReference(T, S, U, - _new0($parent.reference.pointer, newValue.reference.pointer).reference); - } -} - -final class $GrandParent_Parent_ChildType<$T extends jni.JObject, - $S extends jni.JObject, $U extends jni.JObject> - extends jni.JObjType> { - final jni.JObjType<$T> T; - final jni.JObjType<$S> S; - final jni.JObjType<$U> U; - - const $GrandParent_Parent_ChildType( - this.T, - this.S, - this.U, - ); - - @override - String get signature => - r"Lcom/github/dart_lang/jnigen/generics/GrandParent$Parent$Child;"; - - @override - GrandParent_Parent_Child<$T, $S, $U> fromReference( - jni.JReference reference) => - GrandParent_Parent_Child.fromReference(T, S, U, reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => Object.hash($GrandParent_Parent_ChildType, T, S, U); - - @override - bool operator ==(Object other) { - return other.runtimeType == ($GrandParent_Parent_ChildType<$T, $S, $U>) && - other is $GrandParent_Parent_ChildType<$T, $S, $U> && - T == other.T && - S == other.S && - U == other.U; - } -} - -/// from: com.github.dart_lang.jnigen.generics.GrandParent$Parent -class GrandParent_Parent<$T extends jni.JObject, $S extends jni.JObject> - extends jni.JObject { - @override - late final jni.JObjType> $type = type(T, S); - - final jni.JObjType<$T> T; - final jni.JObjType<$S> S; - - GrandParent_Parent.fromReference( - this.T, - this.S, - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static $GrandParent_ParentType<$T, $S> - type<$T extends jni.JObject, $S extends jni.JObject>( - jni.JObjType<$T> T, - jni.JObjType<$S> S, - ) { - return $GrandParent_ParentType( - T, - S, - ); - } - - static final _get_parentValue = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_GrandParent_Parent__parentValue") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); - - static final _set_parentValue = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, ffi.Pointer)>>( - "set_GrandParent_Parent__parentValue") - .asFunction< - jni.JniResult Function(jni.JObjectPtr, ffi.Pointer)>(); - - /// from: public T parentValue - /// The returned object must be released after use, by calling the [release] method. - $T get parentValue => _get_parentValue(reference.pointer).object(T); - - /// from: public T parentValue - /// The returned object must be released after use, by calling the [release] method. - set parentValue($T value) => - _set_parentValue(reference.pointer, value.reference.pointer).check(); - - static final _get_value = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_GrandParent_Parent__value") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); - - static final _set_value = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(jni.JObjectPtr, - ffi.Pointer)>>("set_GrandParent_Parent__value") - .asFunction< - jni.JniResult Function(jni.JObjectPtr, ffi.Pointer)>(); - - /// from: public S value - /// The returned object must be released after use, by calling the [release] method. - $S get value => _get_value(reference.pointer).object(S); - - /// from: public S value - /// The returned object must be released after use, by calling the [release] method. - set value($S value) => - _set_value(reference.pointer, value.reference.pointer).check(); - - static final _new0 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("GrandParent_Parent__new0") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public void (com.github.dart_lang.jnigen.generics.GrandParent $parent, S newValue) - /// The returned object must be released after use, by calling the [release] method. - factory GrandParent_Parent( - GrandParent<$T> $parent, - $S newValue, { - jni.JObjType<$T>? T, - jni.JObjType<$S>? S, - }) { - T ??= jni.lowestCommonSuperType([ - ($parent.$type as $GrandParentType).T, - ]) as jni.JObjType<$T>; - S ??= jni.lowestCommonSuperType([ - newValue.$type, - ]) as jni.JObjType<$S>; - return GrandParent_Parent.fromReference(T, S, - _new0($parent.reference.pointer, newValue.reference.pointer).reference); - } -} - -final class $GrandParent_ParentType<$T extends jni.JObject, - $S extends jni.JObject> extends jni.JObjType> { - final jni.JObjType<$T> T; - final jni.JObjType<$S> S; - - const $GrandParent_ParentType( - this.T, - this.S, - ); - - @override - String get signature => - r"Lcom/github/dart_lang/jnigen/generics/GrandParent$Parent;"; - - @override - GrandParent_Parent<$T, $S> fromReference(jni.JReference reference) => - GrandParent_Parent.fromReference(T, S, reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => Object.hash($GrandParent_ParentType, T, S); - - @override - bool operator ==(Object other) { - return other.runtimeType == ($GrandParent_ParentType<$T, $S>) && - other is $GrandParent_ParentType<$T, $S> && - T == other.T && - S == other.S; - } -} - -/// from: com.github.dart_lang.jnigen.generics.GrandParent$StaticParent$Child -class GrandParent_StaticParent_Child<$S extends jni.JObject, - $U extends jni.JObject> extends jni.JObject { - @override - late final jni.JObjType> $type = - type(S, U); - - final jni.JObjType<$S> S; - final jni.JObjType<$U> U; - - GrandParent_StaticParent_Child.fromReference( - this.S, - this.U, - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static $GrandParent_StaticParent_ChildType<$S, $U> - type<$S extends jni.JObject, $U extends jni.JObject>( - jni.JObjType<$S> S, - jni.JObjType<$U> U, - ) { - return $GrandParent_StaticParent_ChildType( - S, - U, - ); - } - - static final _get_parentValue = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_GrandParent_StaticParent_Child__parentValue") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); - - static final _set_parentValue = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, ffi.Pointer)>>( - "set_GrandParent_StaticParent_Child__parentValue") - .asFunction< - jni.JniResult Function(jni.JObjectPtr, ffi.Pointer)>(); - - /// from: public S parentValue - /// The returned object must be released after use, by calling the [release] method. - $S get parentValue => _get_parentValue(reference.pointer).object(S); - - /// from: public S parentValue - /// The returned object must be released after use, by calling the [release] method. - set parentValue($S value) => - _set_parentValue(reference.pointer, value.reference.pointer).check(); - - static final _get_value = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_GrandParent_StaticParent_Child__value") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); - - static final _set_value = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, ffi.Pointer)>>( - "set_GrandParent_StaticParent_Child__value") - .asFunction< - jni.JniResult Function(jni.JObjectPtr, ffi.Pointer)>(); - - /// from: public U value - /// The returned object must be released after use, by calling the [release] method. - $U get value => _get_value(reference.pointer).object(U); - - /// from: public U value - /// The returned object must be released after use, by calling the [release] method. - set value($U value) => - _set_value(reference.pointer, value.reference.pointer).check(); - - static final _new0 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>( - "GrandParent_StaticParent_Child__new0") - .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// from: public void (com.github.dart_lang.jnigen.generics.GrandParent$StaticParent $parent, S parentValue, U value) - /// The returned object must be released after use, by calling the [release] method. - factory GrandParent_StaticParent_Child( - GrandParent_StaticParent<$S> $parent, - $S parentValue, - $U value, { - jni.JObjType<$S>? S, - jni.JObjType<$U>? U, - }) { - S ??= jni.lowestCommonSuperType([ - parentValue.$type, - ($parent.$type as $GrandParent_StaticParentType).S, - ]) as jni.JObjType<$S>; - U ??= jni.lowestCommonSuperType([ - value.$type, - ]) as jni.JObjType<$U>; - return GrandParent_StaticParent_Child.fromReference( - S, - U, - _new0($parent.reference.pointer, parentValue.reference.pointer, - value.reference.pointer) - .reference); - } -} - -final class $GrandParent_StaticParent_ChildType<$S extends jni.JObject, - $U extends jni.JObject> - extends jni.JObjType> { - final jni.JObjType<$S> S; - final jni.JObjType<$U> U; - - const $GrandParent_StaticParent_ChildType( - this.S, - this.U, - ); - - @override - String get signature => - r"Lcom/github/dart_lang/jnigen/generics/GrandParent$StaticParent$Child;"; - - @override - GrandParent_StaticParent_Child<$S, $U> fromReference( - jni.JReference reference) => - GrandParent_StaticParent_Child.fromReference(S, U, reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => Object.hash($GrandParent_StaticParent_ChildType, S, U); - - @override - bool operator ==(Object other) { - return other.runtimeType == ($GrandParent_StaticParent_ChildType<$S, $U>) && - other is $GrandParent_StaticParent_ChildType<$S, $U> && - S == other.S && - U == other.U; - } -} - -/// from: com.github.dart_lang.jnigen.generics.GrandParent$StaticParent -class GrandParent_StaticParent<$S extends jni.JObject> extends jni.JObject { - @override - late final jni.JObjType> $type = type(S); - - final jni.JObjType<$S> S; - - GrandParent_StaticParent.fromReference( - this.S, - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static $GrandParent_StaticParentType<$S> type<$S extends jni.JObject>( - jni.JObjType<$S> S, - ) { - return $GrandParent_StaticParentType( - S, - ); - } - - static final _get_value = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_GrandParent_StaticParent__value") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); - - static final _set_value = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, ffi.Pointer)>>( - "set_GrandParent_StaticParent__value") - .asFunction< - jni.JniResult Function(jni.JObjectPtr, ffi.Pointer)>(); - - /// from: public S value - /// The returned object must be released after use, by calling the [release] method. - $S get value => _get_value(reference.pointer).object(S); - - /// from: public S value - /// The returned object must be released after use, by calling the [release] method. - set value($S value) => - _set_value(reference.pointer, value.reference.pointer).check(); - - static final _new0 = jniLookup< - ffi - .NativeFunction)>>( - "GrandParent_StaticParent__new0") - .asFunction)>(); - - /// from: public void (S value) - /// The returned object must be released after use, by calling the [release] method. - factory GrandParent_StaticParent( - $S value, { - jni.JObjType<$S>? S, - }) { - S ??= jni.lowestCommonSuperType([ - value.$type, - ]) as jni.JObjType<$S>; - return GrandParent_StaticParent.fromReference( - S, _new0(value.reference.pointer).reference); - } -} - -final class $GrandParent_StaticParentType<$S extends jni.JObject> - extends jni.JObjType> { - final jni.JObjType<$S> S; - - const $GrandParent_StaticParentType( - this.S, - ); - - @override - String get signature => - r"Lcom/github/dart_lang/jnigen/generics/GrandParent$StaticParent;"; - - @override - GrandParent_StaticParent<$S> fromReference(jni.JReference reference) => - GrandParent_StaticParent.fromReference(S, reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => Object.hash($GrandParent_StaticParentType, S); - - @override - bool operator ==(Object other) { - return other.runtimeType == ($GrandParent_StaticParentType<$S>) && - other is $GrandParent_StaticParentType<$S> && - S == other.S; - } -} - -/// from: com.github.dart_lang.jnigen.generics.GrandParent -class GrandParent<$T extends jni.JObject> extends jni.JObject { - @override - late final jni.JObjType> $type = type(T); - - final jni.JObjType<$T> T; - - GrandParent.fromReference( - this.T, - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static $GrandParentType<$T> type<$T extends jni.JObject>( - jni.JObjType<$T> T, - ) { - return $GrandParentType( - T, - ); - } - - static final _get_value = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_GrandParent__value") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); - - static final _set_value = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(jni.JObjectPtr, - ffi.Pointer)>>("set_GrandParent__value") - .asFunction< - jni.JniResult Function(jni.JObjectPtr, ffi.Pointer)>(); - - /// from: public T value - /// The returned object must be released after use, by calling the [release] method. - $T get value => _get_value(reference.pointer).object(T); - - /// from: public T value - /// The returned object must be released after use, by calling the [release] method. - set value($T value) => - _set_value(reference.pointer, value.reference.pointer).check(); - - static final _new0 = jniLookup< - ffi - .NativeFunction)>>( - "GrandParent__new0") - .asFunction)>(); - - /// from: public void (T value) - /// The returned object must be released after use, by calling the [release] method. - factory GrandParent( - $T value, { - jni.JObjType<$T>? T, - }) { - T ??= jni.lowestCommonSuperType([ - value.$type, - ]) as jni.JObjType<$T>; - return GrandParent.fromReference( - T, _new0(value.reference.pointer).reference); - } - - static final _stringParent = jniLookup< - ffi - .NativeFunction)>>( - "GrandParent__stringParent") - .asFunction)>(); - - /// from: public com.github.dart_lang.jnigen.generics.GrandParent.Parent stringParent() - /// The returned object must be released after use, by calling the [release] method. - GrandParent_Parent stringParent() { - return _stringParent(reference.pointer).object( - const $GrandParent_ParentType(jni.JObjectType(), jni.JStringType())); - } - - static final _varParent = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("GrandParent__varParent") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public com.github.dart_lang.jnigen.generics.GrandParent.Parent varParent(S nestedValue) - /// The returned object must be released after use, by calling the [release] method. - GrandParent_Parent varParent<$S extends jni.JObject>( - $S nestedValue, { - jni.JObjType<$S>? S, - }) { - S ??= jni.lowestCommonSuperType([ - nestedValue.$type, - ]) as jni.JObjType<$S>; - return _varParent(reference.pointer, nestedValue.reference.pointer) - .object($GrandParent_ParentType(const jni.JObjectType(), S)); - } - - static final _stringStaticParent = - jniLookup>( - "GrandParent__stringStaticParent") - .asFunction(); - - /// from: static public com.github.dart_lang.jnigen.generics.GrandParent.StaticParent stringStaticParent() - /// The returned object must be released after use, by calling the [release] method. - static GrandParent_StaticParent stringStaticParent() { - return _stringStaticParent() - .object(const $GrandParent_StaticParentType(jni.JStringType())); - } - - static final _varStaticParent = jniLookup< - ffi - .NativeFunction)>>( - "GrandParent__varStaticParent") - .asFunction)>(); - - /// from: static public com.github.dart_lang.jnigen.generics.GrandParent.StaticParent varStaticParent(S value) - /// The returned object must be released after use, by calling the [release] method. - static GrandParent_StaticParent<$S> varStaticParent<$S extends jni.JObject>( - $S value, { - jni.JObjType<$S>? S, - }) { - S ??= jni.lowestCommonSuperType([ - value.$type, - ]) as jni.JObjType<$S>; - return _varStaticParent(value.reference.pointer) - .object($GrandParent_StaticParentType(S)); - } - - static final _staticParentWithSameType = jniLookup< - ffi - .NativeFunction)>>( - "GrandParent__staticParentWithSameType") - .asFunction)>(); - - /// from: public com.github.dart_lang.jnigen.generics.GrandParent.StaticParent staticParentWithSameType() - /// The returned object must be released after use, by calling the [release] method. - GrandParent_StaticParent<$T> staticParentWithSameType() { - return _staticParentWithSameType(reference.pointer) - .object($GrandParent_StaticParentType(T)); - } -} - -final class $GrandParentType<$T extends jni.JObject> - extends jni.JObjType> { - final jni.JObjType<$T> T; - - const $GrandParentType( - this.T, - ); - - @override - String get signature => r"Lcom/github/dart_lang/jnigen/generics/GrandParent;"; - - @override - GrandParent<$T> fromReference(jni.JReference reference) => - GrandParent.fromReference(T, reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => Object.hash($GrandParentType, T); - - @override - bool operator ==(Object other) { - return other.runtimeType == ($GrandParentType<$T>) && - other is $GrandParentType<$T> && - T == other.T; - } -} - -/// from: com.github.dart_lang.jnigen.generics.MyMap$MyEntry -class MyMap_MyEntry<$K extends jni.JObject, $V extends jni.JObject> - extends jni.JObject { - @override - late final jni.JObjType> $type = type(K, V); - - final jni.JObjType<$K> K; - final jni.JObjType<$V> V; - - MyMap_MyEntry.fromReference( - this.K, - this.V, - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static $MyMap_MyEntryType<$K, $V> - type<$K extends jni.JObject, $V extends jni.JObject>( - jni.JObjType<$K> K, - jni.JObjType<$V> V, - ) { - return $MyMap_MyEntryType( - K, - V, - ); - } - - static final _get_key = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_MyMap_MyEntry__key") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); - - static final _set_key = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(jni.JObjectPtr, - ffi.Pointer)>>("set_MyMap_MyEntry__key") - .asFunction< - jni.JniResult Function(jni.JObjectPtr, ffi.Pointer)>(); - - /// from: public K key - /// The returned object must be released after use, by calling the [release] method. - $K get key => _get_key(reference.pointer).object(K); - - /// from: public K key - /// The returned object must be released after use, by calling the [release] method. - set key($K value) => - _set_key(reference.pointer, value.reference.pointer).check(); - - static final _get_value = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_MyMap_MyEntry__value") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); - - static final _set_value = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(jni.JObjectPtr, - ffi.Pointer)>>("set_MyMap_MyEntry__value") - .asFunction< - jni.JniResult Function(jni.JObjectPtr, ffi.Pointer)>(); - - /// from: public V value - /// The returned object must be released after use, by calling the [release] method. - $V get value => _get_value(reference.pointer).object(V); - - /// from: public V value - /// The returned object must be released after use, by calling the [release] method. - set value($V value) => - _set_value(reference.pointer, value.reference.pointer).check(); - - static final _new0 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>("MyMap_MyEntry__new0") - .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// from: public void (com.github.dart_lang.jnigen.generics.MyMap $parent, K key, V value) - /// The returned object must be released after use, by calling the [release] method. - factory MyMap_MyEntry( - MyMap<$K, $V> $parent, - $K key, - $V value, { - jni.JObjType<$K>? K, - jni.JObjType<$V>? V, - }) { - K ??= jni.lowestCommonSuperType([ - key.$type, - ($parent.$type as $MyMapType).K, - ]) as jni.JObjType<$K>; - V ??= jni.lowestCommonSuperType([ - value.$type, - ($parent.$type as $MyMapType).V, - ]) as jni.JObjType<$V>; - return MyMap_MyEntry.fromReference( - K, - V, - _new0($parent.reference.pointer, key.reference.pointer, - value.reference.pointer) - .reference); - } -} - -final class $MyMap_MyEntryType<$K extends jni.JObject, $V extends jni.JObject> - extends jni.JObjType> { - final jni.JObjType<$K> K; - final jni.JObjType<$V> V; - - const $MyMap_MyEntryType( - this.K, - this.V, - ); - - @override - String get signature => - r"Lcom/github/dart_lang/jnigen/generics/MyMap$MyEntry;"; - - @override - MyMap_MyEntry<$K, $V> fromReference(jni.JReference reference) => - MyMap_MyEntry.fromReference(K, V, reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => Object.hash($MyMap_MyEntryType, K, V); - - @override - bool operator ==(Object other) { - return other.runtimeType == ($MyMap_MyEntryType<$K, $V>) && - other is $MyMap_MyEntryType<$K, $V> && - K == other.K && - V == other.V; - } -} - -/// from: com.github.dart_lang.jnigen.generics.MyMap -class MyMap<$K extends jni.JObject, $V extends jni.JObject> - extends jni.JObject { - @override - late final jni.JObjType> $type = type(K, V); - - final jni.JObjType<$K> K; - final jni.JObjType<$V> V; - - MyMap.fromReference( - this.K, - this.V, - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static $MyMapType<$K, $V> - type<$K extends jni.JObject, $V extends jni.JObject>( - jni.JObjType<$K> K, - jni.JObjType<$V> V, - ) { - return $MyMapType( - K, - V, - ); - } - - static final _new0 = - jniLookup>("MyMap__new0") - .asFunction(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory MyMap({ - required jni.JObjType<$K> K, - required jni.JObjType<$V> V, - }) { - return MyMap.fromReference(K, V, _new0().reference); - } - - static final _get0 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>>("MyMap__get0") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public V get(K key) - /// The returned object must be released after use, by calling the [release] method. - $V get0( - $K key, - ) { - return _get0(reference.pointer, key.reference.pointer).object(V); - } - - static final _put = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>("MyMap__put") - .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - /// from: public V put(K key, V value) - /// The returned object must be released after use, by calling the [release] method. - $V put( - $K key, - $V value, - ) { - return _put( - reference.pointer, key.reference.pointer, value.reference.pointer) - .object(V); - } - - static final _entryStack = jniLookup< - ffi - .NativeFunction)>>( - "MyMap__entryStack") - .asFunction)>(); - - /// from: public com.github.dart_lang.jnigen.generics.MyStack.MyEntry> entryStack() - /// The returned object must be released after use, by calling the [release] method. - MyStack> entryStack() { - return _entryStack(reference.pointer).object(const $MyStackType( - $MyMap_MyEntryType(jni.JObjectType(), jni.JObjectType()))); - } -} - -final class $MyMapType<$K extends jni.JObject, $V extends jni.JObject> - extends jni.JObjType> { - final jni.JObjType<$K> K; - final jni.JObjType<$V> V; - - const $MyMapType( - this.K, - this.V, - ); - - @override - String get signature => r"Lcom/github/dart_lang/jnigen/generics/MyMap;"; - - @override - MyMap<$K, $V> fromReference(jni.JReference reference) => - MyMap.fromReference(K, V, reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => Object.hash($MyMapType, K, V); - - @override - bool operator ==(Object other) { - return other.runtimeType == ($MyMapType<$K, $V>) && - other is $MyMapType<$K, $V> && - K == other.K && - V == other.V; - } -} - -/// from: com.github.dart_lang.jnigen.generics.MyStack -class MyStack<$T extends jni.JObject> extends jni.JObject { - @override - late final jni.JObjType> $type = type(T); - - final jni.JObjType<$T> T; - - MyStack.fromReference( - this.T, - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static $MyStackType<$T> type<$T extends jni.JObject>( - jni.JObjType<$T> T, - ) { - return $MyStackType( - T, - ); - } - - static final _new0 = - jniLookup>("MyStack__new0") - .asFunction(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory MyStack({ - required jni.JObjType<$T> T, - }) { - return MyStack.fromReference(T, _new0().reference); - } - - static final _fromArray = jniLookup< - ffi - .NativeFunction)>>( - "MyStack__fromArray") - .asFunction)>(); - - /// from: static public com.github.dart_lang.jnigen.generics.MyStack fromArray(T[] arr) - /// The returned object must be released after use, by calling the [release] method. - static MyStack<$T> fromArray<$T extends jni.JObject>( - jni.JArray<$T> arr, { - jni.JObjType<$T>? T, - }) { - T ??= jni.lowestCommonSuperType([ - ((arr.$type as jni.JArrayType).elementType as jni.JObjType), - ]) as jni.JObjType<$T>; - return _fromArray(arr.reference.pointer).object($MyStackType(T)); - } - - static final _fromArrayOfArrayOfGrandParents = jniLookup< - ffi - .NativeFunction)>>( - "MyStack__fromArrayOfArrayOfGrandParents") - .asFunction)>(); - - /// from: static public com.github.dart_lang.jnigen.generics.MyStack fromArrayOfArrayOfGrandParents(com.github.dart_lang.jnigen.generics.GrandParent[][] arr) - /// The returned object must be released after use, by calling the [release] method. - static MyStack<$S> fromArrayOfArrayOfGrandParents<$S extends jni.JObject>( - jni.JArray>> arr, { - jni.JObjType<$S>? S, - }) { - S ??= jni.lowestCommonSuperType([ - (((((arr.$type as jni.JArrayType).elementType as jni.JObjType) - as jni.JArrayType) - .elementType as jni.JObjType) as $GrandParentType) - .T, - ]) as jni.JObjType<$S>; - return _fromArrayOfArrayOfGrandParents(arr.reference.pointer) - .object($MyStackType(S)); - } - - static final _of = - jniLookup>("MyStack__of") - .asFunction(); - - /// from: static public com.github.dart_lang.jnigen.generics.MyStack of() - /// The returned object must be released after use, by calling the [release] method. - static MyStack<$T> of<$T extends jni.JObject>({ - required jni.JObjType<$T> T, - }) { - return _of().object($MyStackType(T)); - } - - static final _of1 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer)>>("MyStack__of1") - .asFunction)>(); - - /// from: static public com.github.dart_lang.jnigen.generics.MyStack of(T obj) - /// The returned object must be released after use, by calling the [release] method. - static MyStack<$T> of1<$T extends jni.JObject>( - $T obj, { - jni.JObjType<$T>? T, - }) { - T ??= jni.lowestCommonSuperType([ - obj.$type, - ]) as jni.JObjType<$T>; - return _of1(obj.reference.pointer).object($MyStackType(T)); - } - - static final _of2 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("MyStack__of2") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: static public com.github.dart_lang.jnigen.generics.MyStack of(T obj, T obj2) - /// The returned object must be released after use, by calling the [release] method. - static MyStack<$T> of2<$T extends jni.JObject>( - $T obj, - $T obj2, { - jni.JObjType<$T>? T, - }) { - T ??= jni.lowestCommonSuperType([ - obj2.$type, - obj.$type, - ]) as jni.JObjType<$T>; - return _of2(obj.reference.pointer, obj2.reference.pointer) - .object($MyStackType(T)); - } - - static final _push = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("MyStack__push") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public void push(T item) - void push( - $T item, - ) { - _push(reference.pointer, item.reference.pointer).check(); - } - - static final _pop = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer)>>("MyStack__pop") - .asFunction)>(); - - /// from: public T pop() - /// The returned object must be released after use, by calling the [release] method. - $T pop() { - return _pop(reference.pointer).object(T); - } - - static final _size = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer)>>("MyStack__size") - .asFunction)>(); - - /// from: public int size() - int size() { - return _size(reference.pointer).integer; - } -} - -final class $MyStackType<$T extends jni.JObject> - extends jni.JObjType> { - final jni.JObjType<$T> T; - - const $MyStackType( - this.T, - ); - - @override - String get signature => r"Lcom/github/dart_lang/jnigen/generics/MyStack;"; - - @override - MyStack<$T> fromReference(jni.JReference reference) => - MyStack.fromReference(T, reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => Object.hash($MyStackType, T); - - @override - bool operator ==(Object other) { - return other.runtimeType == ($MyStackType<$T>) && - other is $MyStackType<$T> && - T == other.T; - } -} - -/// from: com.github.dart_lang.jnigen.generics.StringKeyedMap -class StringKeyedMap<$V extends jni.JObject> extends MyMap { - @override - late final jni.JObjType> $type = type(V); - - final jni.JObjType<$V> V; - - StringKeyedMap.fromReference( - this.V, - jni.JReference reference, - ) : super.fromReference(const jni.JStringType(), V, reference); - - /// The type which includes information such as the signature of this class. - static $StringKeyedMapType<$V> type<$V extends jni.JObject>( - jni.JObjType<$V> V, - ) { - return $StringKeyedMapType( - V, - ); - } - - static final _new0 = jniLookup>( - "StringKeyedMap__new0") - .asFunction(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory StringKeyedMap({ - required jni.JObjType<$V> V, - }) { - return StringKeyedMap.fromReference(V, _new0().reference); - } -} - -final class $StringKeyedMapType<$V extends jni.JObject> - extends jni.JObjType> { - final jni.JObjType<$V> V; - - const $StringKeyedMapType( - this.V, - ); - - @override - String get signature => - r"Lcom/github/dart_lang/jnigen/generics/StringKeyedMap;"; - - @override - StringKeyedMap<$V> fromReference(jni.JReference reference) => - StringKeyedMap.fromReference(V, reference); - - @override - jni.JObjType get superType => $MyMapType(const jni.JStringType(), V); - - @override - final superCount = 2; - - @override - int get hashCode => Object.hash($StringKeyedMapType, V); - - @override - bool operator ==(Object other) { - return other.runtimeType == ($StringKeyedMapType<$V>) && - other is $StringKeyedMapType<$V> && - V == other.V; - } -} - -/// from: com.github.dart_lang.jnigen.generics.StringStack -class StringStack extends MyStack { - @override - late final jni.JObjType $type = type; - - StringStack.fromReference( - jni.JReference reference, - ) : super.fromReference(const jni.JStringType(), reference); - - /// The type which includes information such as the signature of this class. - static const type = $StringStackType(); - static final _new0 = jniLookup>( - "StringStack__new0") - .asFunction(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory StringStack() { - return StringStack.fromReference(_new0().reference); - } -} - -final class $StringStackType extends jni.JObjType { - const $StringStackType(); - - @override - String get signature => r"Lcom/github/dart_lang/jnigen/generics/StringStack;"; - - @override - StringStack fromReference(jni.JReference reference) => - StringStack.fromReference(reference); - - @override - jni.JObjType get superType => const $MyStackType(jni.JStringType()); - - @override - final superCount = 2; - - @override - int get hashCode => ($StringStackType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($StringStackType) && other is $StringStackType; - } -} - -/// from: com.github.dart_lang.jnigen.generics.StringValuedMap -class StringValuedMap<$K extends jni.JObject> extends MyMap<$K, jni.JString> { - @override - late final jni.JObjType> $type = type(K); - - final jni.JObjType<$K> K; - - StringValuedMap.fromReference( - this.K, - jni.JReference reference, - ) : super.fromReference(K, const jni.JStringType(), reference); - - /// The type which includes information such as the signature of this class. - static $StringValuedMapType<$K> type<$K extends jni.JObject>( - jni.JObjType<$K> K, - ) { - return $StringValuedMapType( - K, - ); - } - - static final _new0 = jniLookup>( - "StringValuedMap__new0") - .asFunction(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory StringValuedMap({ - required jni.JObjType<$K> K, - }) { - return StringValuedMap.fromReference(K, _new0().reference); - } -} - -final class $StringValuedMapType<$K extends jni.JObject> - extends jni.JObjType> { - final jni.JObjType<$K> K; - - const $StringValuedMapType( - this.K, - ); - - @override - String get signature => - r"Lcom/github/dart_lang/jnigen/generics/StringValuedMap;"; - - @override - StringValuedMap<$K> fromReference(jni.JReference reference) => - StringValuedMap.fromReference(K, reference); - - @override - jni.JObjType get superType => $MyMapType(K, const jni.JStringType()); - - @override - final superCount = 2; - - @override - int get hashCode => Object.hash($StringValuedMapType, K); - - @override - bool operator ==(Object other) { - return other.runtimeType == ($StringValuedMapType<$K>) && - other is $StringValuedMapType<$K> && - K == other.K; - } -} - -/// from: com.github.dart_lang.jnigen.interfaces.MyInterface -class MyInterface<$T extends jni.JObject> extends jni.JObject { - @override - late final jni.JObjType> $type = type(T); - - final jni.JObjType<$T> T; - - MyInterface.fromReference( - this.T, - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static $MyInterfaceType<$T> type<$T extends jni.JObject>( - jni.JObjType<$T> T, - ) { - return $MyInterfaceType( - T, - ); - } - - static final _voidCallback = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("MyInterface__voidCallback") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public abstract void voidCallback(java.lang.String s) - void voidCallback( - jni.JString s, - ) { - _voidCallback(reference.pointer, s.reference.pointer).check(); - } - - static final _stringCallback = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("MyInterface__stringCallback") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public abstract java.lang.String stringCallback(java.lang.String s) - /// The returned object must be released after use, by calling the [release] method. - jni.JString stringCallback( - jni.JString s, - ) { - return _stringCallback(reference.pointer, s.reference.pointer) - .object(const jni.JStringType()); - } - - static final _varCallback = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - ffi.Pointer)>>("MyInterface__varCallback") - .asFunction< - jni.JniResult Function( - ffi.Pointer, ffi.Pointer)>(); - - /// from: public abstract T varCallback(T t) - /// The returned object must be released after use, by calling the [release] method. - $T varCallback( - $T t, - ) { - return _varCallback(reference.pointer, t.reference.pointer).object(T); - } - - static final _manyPrimitives = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Int32, - ffi.Uint8, - ffi.Uint16, - ffi.Double)>>("MyInterface__manyPrimitives") - .asFunction< - jni.JniResult Function( - ffi.Pointer, int, int, int, double)>(); - - /// from: public abstract long manyPrimitives(int a, boolean b, char c, double d) - int manyPrimitives( - int a, - bool b, - int c, - double d, - ) { - return _manyPrimitives(reference.pointer, a, b ? 1 : 0, c, d).long; - } - - /// Maps a specific port to the implemented interface. - static final Map _$impls = {}; - ReceivePort? _$p; - - static jni.JObjectPtr _$invoke( - int port, - jni.JObjectPtr descriptor, - jni.JObjectPtr args, - ) { - return _$invokeMethod( - port, - $MethodInvocation.fromAddresses( - 0, - descriptor.address, - args.address, - ), - ); - } - - static final ffi.Pointer< - ffi.NativeFunction< - jni.JObjectPtr Function( - ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> - _$invokePointer = ffi.Pointer.fromFunction(_$invoke); - - static ffi.Pointer _$invokeMethod( - int $p, - $MethodInvocation $i, - ) { - try { - final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); - final $a = $i.args; - if ($d == r"voidCallback(Ljava/lang/String;)V") { - _$impls[$p]!.voidCallback( - $a[0].castTo(const jni.JStringType(), releaseOriginal: true), - ); - return jni.nullptr; - } - if ($d == r"stringCallback(Ljava/lang/String;)Ljava/lang/String;") { - final $r = _$impls[$p]!.stringCallback( - $a[0].castTo(const jni.JStringType(), releaseOriginal: true), - ); - return ($r as jni.JObject) - .castTo(const jni.JObjectType()) - .reference - .toPointer(); - } - if ($d == r"varCallback(Ljava/lang/Object;)Ljava/lang/Object;") { - final $r = _$impls[$p]!.varCallback( - $a[0].castTo(_$impls[$p]!.T, releaseOriginal: true), - ); - return ($r as jni.JObject) - .castTo(const jni.JObjectType()) - .reference - .toPointer(); - } - if ($d == r"manyPrimitives(IZCD)J") { - final $r = _$impls[$p]!.manyPrimitives( - $a[0] - .castTo(const jni.JIntegerType(), releaseOriginal: true) - .intValue(releaseOriginal: true), - $a[1] - .castTo(const jni.JBooleanType(), releaseOriginal: true) - .booleanValue(releaseOriginal: true), - $a[2] - .castTo(const jni.JCharacterType(), releaseOriginal: true) - .charValue(releaseOriginal: true), - $a[3] - .castTo(const jni.JDoubleType(), releaseOriginal: true) - .doubleValue(releaseOriginal: true), - ); - return jni.JLong($r).reference.toPointer(); - } - } catch (e) { - return ProtectedJniExtensions.newDartException(e.toString()); - } - return jni.nullptr; - } - - factory MyInterface.implement( - $MyInterfaceImpl<$T> $impl, - ) { - final $p = ReceivePort(); - final $x = MyInterface.fromReference( - $impl.T, - ProtectedJniExtensions.newPortProxy( - r"com.github.dart_lang.jnigen.interfaces.MyInterface", - $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; - } - static Map get $impls => _$impls; -} - -abstract interface class $MyInterfaceImpl<$T extends jni.JObject> { - factory $MyInterfaceImpl({ - required jni.JObjType<$T> T, - required void Function(jni.JString s) voidCallback, - required jni.JString Function(jni.JString s) stringCallback, - required $T Function($T t) varCallback, - required int Function(int a, bool b, int c, double d) manyPrimitives, - }) = _$MyInterfaceImpl; - - jni.JObjType<$T> get T; - - void voidCallback(jni.JString s); - jni.JString stringCallback(jni.JString s); - $T varCallback($T t); - int manyPrimitives(int a, bool b, int c, double d); -} - -class _$MyInterfaceImpl<$T extends jni.JObject> - implements $MyInterfaceImpl<$T> { - _$MyInterfaceImpl({ - required this.T, - required void Function(jni.JString s) voidCallback, - required jni.JString Function(jni.JString s) stringCallback, - required $T Function($T t) varCallback, - required int Function(int a, bool b, int c, double d) manyPrimitives, - }) : _voidCallback = voidCallback, - _stringCallback = stringCallback, - _varCallback = varCallback, - _manyPrimitives = manyPrimitives; - - @override - final jni.JObjType<$T> T; - - final void Function(jni.JString s) _voidCallback; - final jni.JString Function(jni.JString s) _stringCallback; - final $T Function($T t) _varCallback; - final int Function(int a, bool b, int c, double d) _manyPrimitives; - - void voidCallback(jni.JString s) { - return _voidCallback(s); - } - - jni.JString stringCallback(jni.JString s) { - return _stringCallback(s); - } - - $T varCallback($T t) { - return _varCallback(t); - } - - int manyPrimitives(int a, bool b, int c, double d) { - return _manyPrimitives(a, b, c, d); - } -} - -final class $MyInterfaceType<$T extends jni.JObject> - extends jni.JObjType> { - final jni.JObjType<$T> T; - - const $MyInterfaceType( - this.T, - ); - - @override - String get signature => - r"Lcom/github/dart_lang/jnigen/interfaces/MyInterface;"; - - @override - MyInterface<$T> fromReference(jni.JReference reference) => - MyInterface.fromReference(T, reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => Object.hash($MyInterfaceType, T); - - @override - bool operator ==(Object other) { - return other.runtimeType == ($MyInterfaceType<$T>) && - other is $MyInterfaceType<$T> && - T == other.T; - } -} - -/// from: com.github.dart_lang.jnigen.interfaces.MyInterfaceConsumer -class MyInterfaceConsumer extends jni.JObject { - @override - late final jni.JObjType $type = type; - - MyInterfaceConsumer.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $MyInterfaceConsumerType(); - static final _new0 = jniLookup>( - "MyInterfaceConsumer__new0") - .asFunction(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory MyInterfaceConsumer() { - return MyInterfaceConsumer.fromReference(_new0().reference); - } - - static final _consumeOnAnotherThread = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Uint8, - ffi.Uint16, - ffi.Double, - ffi.Pointer)>>( - "MyInterfaceConsumer__consumeOnAnotherThread") - .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - int, int, int, double, ffi.Pointer)>(); - - /// from: static public void consumeOnAnotherThread(com.github.dart_lang.jnigen.interfaces.MyInterface myInterface, java.lang.String s, int a, boolean b, char c, double d, T t) - static void consumeOnAnotherThread<$T extends jni.JObject>( - MyInterface<$T> myInterface, - jni.JString s, - int a, - bool b, - int c, - double d, - $T t, { - jni.JObjType<$T>? T, - }) { - T ??= jni.lowestCommonSuperType([ - t.$type, - (myInterface.$type as $MyInterfaceType).T, - ]) as jni.JObjType<$T>; - _consumeOnAnotherThread(myInterface.reference.pointer, s.reference.pointer, - a, b ? 1 : 0, c, d, t.reference.pointer) - .check(); - } - - static final _consumeOnSameThread = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Uint8, - ffi.Uint16, - ffi.Double, - ffi.Pointer)>>( - "MyInterfaceConsumer__consumeOnSameThread") - .asFunction< - jni.JniResult Function(ffi.Pointer, ffi.Pointer, - int, int, int, double, ffi.Pointer)>(); - - /// from: static public void consumeOnSameThread(com.github.dart_lang.jnigen.interfaces.MyInterface myInterface, java.lang.String s, int a, boolean b, char c, double d, T t) - static void consumeOnSameThread<$T extends jni.JObject>( - MyInterface<$T> myInterface, - jni.JString s, - int a, - bool b, - int c, - double d, - $T t, { - jni.JObjType<$T>? T, - }) { - T ??= jni.lowestCommonSuperType([ - t.$type, - (myInterface.$type as $MyInterfaceType).T, - ]) as jni.JObjType<$T>; - _consumeOnSameThread(myInterface.reference.pointer, s.reference.pointer, a, - b ? 1 : 0, c, d, t.reference.pointer) - .check(); - } -} - -final class $MyInterfaceConsumerType extends jni.JObjType { - const $MyInterfaceConsumerType(); - - @override - String get signature => - r"Lcom/github/dart_lang/jnigen/interfaces/MyInterfaceConsumer;"; - - @override - MyInterfaceConsumer fromReference(jni.JReference reference) => - MyInterfaceConsumer.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($MyInterfaceConsumerType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($MyInterfaceConsumerType) && - other is $MyInterfaceConsumerType; - } -} - -/// from: com.github.dart_lang.jnigen.interfaces.MyRunnable -class MyRunnable extends jni.JObject { - @override - late final jni.JObjType $type = type; - - MyRunnable.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $MyRunnableType(); - static final _run = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer)>>("MyRunnable__run") - .asFunction)>(); - - /// from: public abstract void run() - void run() { - _run(reference.pointer).check(); - } - - /// Maps a specific port to the implemented interface. - static final Map _$impls = {}; - ReceivePort? _$p; - - static jni.JObjectPtr _$invoke( - int port, - jni.JObjectPtr descriptor, - jni.JObjectPtr args, - ) { - return _$invokeMethod( - port, - $MethodInvocation.fromAddresses( - 0, - descriptor.address, - args.address, - ), - ); - } - - static final ffi.Pointer< - ffi.NativeFunction< - jni.JObjectPtr Function( - ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> - _$invokePointer = ffi.Pointer.fromFunction(_$invoke); - - static ffi.Pointer _$invokeMethod( - int $p, - $MethodInvocation $i, - ) { - try { - final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); - final $a = $i.args; - if ($d == r"run()V") { - _$impls[$p]!.run(); - return jni.nullptr; - } - } catch (e) { - return ProtectedJniExtensions.newDartException(e.toString()); - } - return jni.nullptr; - } - - factory MyRunnable.implement( - $MyRunnableImpl $impl, - ) { - final $p = ReceivePort(); - final $x = MyRunnable.fromReference( - ProtectedJniExtensions.newPortProxy( - r"com.github.dart_lang.jnigen.interfaces.MyRunnable", - $p, - _$invokePointer, - ), - ).._$p = $p; - final $a = $p.sendPort.nativePort; - _$impls[$a] = $impl; - $p.listen(($m) { - if ($m == null) { - _$impls.remove($p.sendPort.nativePort); - $p.close(); - return; - } - final $i = $MethodInvocation.fromMessage($m as List); - final $r = _$invokeMethod($p.sendPort.nativePort, $i); - ProtectedJniExtensions.returnResult($i.result, $r); - }); - return $x; - } -} - -abstract interface class $MyRunnableImpl { - factory $MyRunnableImpl({ - required void Function() run, - }) = _$MyRunnableImpl; - - void run(); -} - -class _$MyRunnableImpl implements $MyRunnableImpl { - _$MyRunnableImpl({ - required void Function() run, - }) : _run = run; - - final void Function() _run; - - void run() { - return _run(); - } -} - -final class $MyRunnableType extends jni.JObjType { - const $MyRunnableType(); - - @override - String get signature => - r"Lcom/github/dart_lang/jnigen/interfaces/MyRunnable;"; - - @override - MyRunnable fromReference(jni.JReference reference) => - MyRunnable.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($MyRunnableType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($MyRunnableType) && other is $MyRunnableType; - } -} - -/// from: com.github.dart_lang.jnigen.interfaces.MyRunnableRunner -class MyRunnableRunner extends jni.JObject { - @override - late final jni.JObjType $type = type; - - MyRunnableRunner.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $MyRunnableRunnerType(); - static final _get_error = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_MyRunnableRunner__error") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); - - static final _set_error = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(jni.JObjectPtr, - ffi.Pointer)>>("set_MyRunnableRunner__error") - .asFunction< - jni.JniResult Function(jni.JObjectPtr, ffi.Pointer)>(); - - /// from: public java.lang.Throwable error - /// The returned object must be released after use, by calling the [release] method. - jni.JObject get error => - _get_error(reference.pointer).object(const jni.JObjectType()); - - /// from: public java.lang.Throwable error - /// The returned object must be released after use, by calling the [release] method. - set error(jni.JObject value) => - _set_error(reference.pointer, value.reference.pointer).check(); - - static final _new0 = jniLookup< - ffi - .NativeFunction)>>( - "MyRunnableRunner__new0") - .asFunction)>(); - - /// from: public void (com.github.dart_lang.jnigen.interfaces.MyRunnable runnable) - /// The returned object must be released after use, by calling the [release] method. - factory MyRunnableRunner( - MyRunnable runnable, - ) { - return MyRunnableRunner.fromReference( - _new0(runnable.reference.pointer).reference); - } - - static final _runOnSameThread = jniLookup< - ffi - .NativeFunction)>>( - "MyRunnableRunner__runOnSameThread") - .asFunction)>(); - - /// from: public void runOnSameThread() - void runOnSameThread() { - _runOnSameThread(reference.pointer).check(); - } - - static final _runOnAnotherThread = jniLookup< - ffi - .NativeFunction)>>( - "MyRunnableRunner__runOnAnotherThread") - .asFunction)>(); - - /// from: public void runOnAnotherThread() - void runOnAnotherThread() { - _runOnAnotherThread(reference.pointer).check(); - } -} - -final class $MyRunnableRunnerType extends jni.JObjType { - const $MyRunnableRunnerType(); - - @override - String get signature => - r"Lcom/github/dart_lang/jnigen/interfaces/MyRunnableRunner;"; - - @override - MyRunnableRunner fromReference(jni.JReference reference) => - MyRunnableRunner.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($MyRunnableRunnerType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($MyRunnableRunnerType) && - other is $MyRunnableRunnerType; - } -} - -/// from: com.github.dart_lang.jnigen.annotations.JsonSerializable$Case -class JsonSerializable_Case extends jni.JObject { - @override - late final jni.JObjType $type = type; - - JsonSerializable_Case.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $JsonSerializable_CaseType(); - static final _values = - jniLookup>( - "JsonSerializable_Case__values") - .asFunction(); - - /// from: static public com.github.dart_lang.jnigen.annotations.JsonSerializable.Case[] values() - /// The returned object must be released after use, by calling the [release] method. - static jni.JArray values() { - return _values().object(const jni.JArrayType($JsonSerializable_CaseType())); - } - - static final _valueOf = jniLookup< - ffi - .NativeFunction)>>( - "JsonSerializable_Case__valueOf") - .asFunction)>(); - - /// from: static public com.github.dart_lang.jnigen.annotations.JsonSerializable.Case valueOf(java.lang.String name) - /// The returned object must be released after use, by calling the [release] method. - static JsonSerializable_Case valueOf( - jni.JString name, - ) { - return _valueOf(name.reference.pointer) - .object(const $JsonSerializable_CaseType()); - } -} - -final class $JsonSerializable_CaseType - extends jni.JObjType { - const $JsonSerializable_CaseType(); - - @override - String get signature => - r"Lcom/github/dart_lang/jnigen/annotations/JsonSerializable$Case;"; - - @override - JsonSerializable_Case fromReference(jni.JReference reference) => - JsonSerializable_Case.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($JsonSerializable_CaseType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($JsonSerializable_CaseType) && - other is $JsonSerializable_CaseType; - } -} - -/// from: com.github.dart_lang.jnigen.annotations.JsonSerializable -class JsonSerializable extends jni.JObject { - @override - late final jni.JObjType $type = type; - - JsonSerializable.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $JsonSerializableType(); - static final _value = jniLookup< - ffi - .NativeFunction)>>( - "JsonSerializable__value") - .asFunction)>(); - - /// from: public abstract com.github.dart_lang.jnigen.annotations.JsonSerializable$Case value() - /// The returned object must be released after use, by calling the [release] method. - JsonSerializable_Case value() { - return _value(reference.pointer).object(const $JsonSerializable_CaseType()); - } - - /// Maps a specific port to the implemented interface. - static final Map _$impls = {}; - ReceivePort? _$p; - - static jni.JObjectPtr _$invoke( - int port, - jni.JObjectPtr descriptor, - jni.JObjectPtr args, - ) { - return _$invokeMethod( - port, - $MethodInvocation.fromAddresses( - 0, - descriptor.address, - args.address, - ), - ); - } - - static final ffi.Pointer< - ffi.NativeFunction< - jni.JObjectPtr Function( - ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> - _$invokePointer = ffi.Pointer.fromFunction(_$invoke); - - static ffi.Pointer _$invokeMethod( - int $p, - $MethodInvocation $i, - ) { - try { - final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); - final $a = $i.args; - if ($d == - r"value()Lcom/github/dart_lang/jnigen/annotations/JsonSerializable$Case;") { - final $r = _$impls[$p]!.value(); - return ($r as jni.JObject) - .castTo(const jni.JObjectType()) - .reference - .toPointer(); - } - } catch (e) { - return ProtectedJniExtensions.newDartException(e.toString()); - } - return jni.nullptr; - } - - factory JsonSerializable.implement( - $JsonSerializableImpl $impl, - ) { - final $p = ReceivePort(); - final $x = JsonSerializable.fromReference( - ProtectedJniExtensions.newPortProxy( - r"com.github.dart_lang.jnigen.annotations.JsonSerializable", - $p, - _$invokePointer, - ), - ).._$p = $p; - final $a = $p.sendPort.nativePort; - _$impls[$a] = $impl; - $p.listen(($m) { - if ($m == null) { - _$impls.remove($p.sendPort.nativePort); - $p.close(); - return; - } - final $i = $MethodInvocation.fromMessage($m as List); - final $r = _$invokeMethod($p.sendPort.nativePort, $i); - ProtectedJniExtensions.returnResult($i.result, $r); - }); - return $x; - } -} - -abstract interface class $JsonSerializableImpl { - factory $JsonSerializableImpl({ - required JsonSerializable_Case Function() value, - }) = _$JsonSerializableImpl; - - JsonSerializable_Case value(); -} - -class _$JsonSerializableImpl implements $JsonSerializableImpl { - _$JsonSerializableImpl({ - required JsonSerializable_Case Function() value, - }) : _value = value; - - final JsonSerializable_Case Function() _value; - - JsonSerializable_Case value() { - return _value(); - } -} - -final class $JsonSerializableType extends jni.JObjType { - const $JsonSerializableType(); - - @override - String get signature => - r"Lcom/github/dart_lang/jnigen/annotations/JsonSerializable;"; - - @override - JsonSerializable fromReference(jni.JReference reference) => - JsonSerializable.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($JsonSerializableType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($JsonSerializableType) && - other is $JsonSerializableType; - } -} - -/// from: com.github.dart_lang.jnigen.annotations.MyDataClass -class MyDataClass extends jni.JObject { - @override - late final jni.JObjType $type = type; - - MyDataClass.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $MyDataClassType(); - static final _new0 = jniLookup>( - "MyDataClass__new0") - .asFunction(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory MyDataClass() { - return MyDataClass.fromReference(_new0().reference); - } -} - -final class $MyDataClassType extends jni.JObjType { - const $MyDataClassType(); - - @override - String get signature => - r"Lcom/github/dart_lang/jnigen/annotations/MyDataClass;"; - - @override - MyDataClass fromReference(jni.JReference reference) => - MyDataClass.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($MyDataClassType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($MyDataClassType) && other is $MyDataClassType; - } -} - -/// from: com.github.dart_lang.jnigen.simple_package.Color -class Color extends jni.JObject { - @override - late final jni.JObjType $type = type; - - Color.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $ColorType(); - static final _values = - jniLookup>("Color__values") - .asFunction(); - - /// from: static public com.github.dart_lang.jnigen.simple_package.Color[] values() - /// The returned object must be released after use, by calling the [release] method. - static jni.JArray values() { - return _values().object(const jni.JArrayType($ColorType())); - } - - static final _valueOf = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer)>>("Color__valueOf") - .asFunction)>(); - - /// from: static public com.github.dart_lang.jnigen.simple_package.Color valueOf(java.lang.String name) - /// The returned object must be released after use, by calling the [release] method. - static Color valueOf( - jni.JString name, - ) { - return _valueOf(name.reference.pointer).object(const $ColorType()); - } -} - -final class $ColorType extends jni.JObjType { - const $ColorType(); - - @override - String get signature => r"Lcom/github/dart_lang/jnigen/simple_package/Color;"; - - @override - Color fromReference(jni.JReference reference) => - Color.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($ColorType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($ColorType) && other is $ColorType; - } -} - -/// from: com.github.dart_lang.jnigen.simple_package.Exceptions -class Exceptions extends jni.JObject { - @override - late final jni.JObjType $type = type; - - Exceptions.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $ExceptionsType(); - static final _new0 = jniLookup>( - "Exceptions__new0") - .asFunction(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory Exceptions() { - return Exceptions.fromReference(_new0().reference); - } - - static final _new1 = - jniLookup>( - "Exceptions__new1") - .asFunction(); - - /// from: public void (float x) - /// The returned object must be released after use, by calling the [release] method. - factory Exceptions.new1( - double x, - ) { - return Exceptions.fromReference(_new1(x).reference); - } - - static final _new2 = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Int32, ffi.Int32, ffi.Int32, ffi.Int32, - ffi.Int32, ffi.Int32)>>("Exceptions__new2") - .asFunction(); - - /// from: public void (int a, int b, int c, int d, int e, int f) - /// The returned object must be released after use, by calling the [release] method. - factory Exceptions.new2( - int a, - int b, - int c, - int d, - int e, - int f, - ) { - return Exceptions.fromReference(_new2(a, b, c, d, e, f).reference); - } - - static final _staticObjectMethod = - jniLookup>( - "Exceptions__staticObjectMethod") - .asFunction(); - - /// from: static public java.lang.Object staticObjectMethod() - /// The returned object must be released after use, by calling the [release] method. - static jni.JObject staticObjectMethod() { - return _staticObjectMethod().object(const jni.JObjectType()); - } - - static final _staticIntMethod = - jniLookup>( - "Exceptions__staticIntMethod") - .asFunction(); - - /// from: static public int staticIntMethod() - static int staticIntMethod() { - return _staticIntMethod().integer; - } - - static final _staticObjectArrayMethod = - jniLookup>( - "Exceptions__staticObjectArrayMethod") - .asFunction(); - - /// from: static public java.lang.Object[] staticObjectArrayMethod() - /// The returned object must be released after use, by calling the [release] method. - static jni.JArray staticObjectArrayMethod() { - return _staticObjectArrayMethod() - .object(const jni.JArrayType(jni.JObjectType())); - } - - static final _staticIntArrayMethod = - jniLookup>( - "Exceptions__staticIntArrayMethod") - .asFunction(); - - /// from: static public int[] staticIntArrayMethod() - /// The returned object must be released after use, by calling the [release] method. - static jni.JArray staticIntArrayMethod() { - return _staticIntArrayMethod().object(const jni.JArrayType(jni.jintType())); - } - - static final _objectMethod = jniLookup< - ffi - .NativeFunction)>>( - "Exceptions__objectMethod") - .asFunction)>(); - - /// from: public java.lang.Object objectMethod() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject objectMethod() { - return _objectMethod(reference.pointer).object(const jni.JObjectType()); - } - - static final _intMethod = jniLookup< - ffi - .NativeFunction)>>( - "Exceptions__intMethod") - .asFunction)>(); - - /// from: public int intMethod() - int intMethod() { - return _intMethod(reference.pointer).integer; - } - - static final _objectArrayMethod = jniLookup< - ffi - .NativeFunction)>>( - "Exceptions__objectArrayMethod") - .asFunction)>(); - - /// from: public java.lang.Object[] objectArrayMethod() - /// The returned object must be released after use, by calling the [release] method. - jni.JArray objectArrayMethod() { - return _objectArrayMethod(reference.pointer) - .object(const jni.JArrayType(jni.JObjectType())); - } - - static final _intArrayMethod = jniLookup< - ffi - .NativeFunction)>>( - "Exceptions__intArrayMethod") - .asFunction)>(); - - /// from: public int[] intArrayMethod() - /// The returned object must be released after use, by calling the [release] method. - jni.JArray intArrayMethod() { - return _intArrayMethod(reference.pointer) - .object(const jni.JArrayType(jni.jintType())); - } - - static final _throwNullPointerException = jniLookup< - ffi - .NativeFunction)>>( - "Exceptions__throwNullPointerException") - .asFunction)>(); - - /// from: public int throwNullPointerException() - int throwNullPointerException() { - return _throwNullPointerException(reference.pointer).integer; - } - - static final _throwFileNotFoundException = jniLookup< - ffi - .NativeFunction)>>( - "Exceptions__throwFileNotFoundException") - .asFunction)>(); - - /// from: public java.io.InputStream throwFileNotFoundException() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject throwFileNotFoundException() { - return _throwFileNotFoundException(reference.pointer) - .object(const jni.JObjectType()); - } - - static final _throwClassCastException = jniLookup< - ffi - .NativeFunction)>>( - "Exceptions__throwClassCastException") - .asFunction)>(); - - /// from: public java.io.FileInputStream throwClassCastException() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject throwClassCastException() { - return _throwClassCastException(reference.pointer) - .object(const jni.JObjectType()); - } - - static final _throwArrayIndexException = jniLookup< - ffi - .NativeFunction)>>( - "Exceptions__throwArrayIndexException") - .asFunction)>(); - - /// from: public int throwArrayIndexException() - int throwArrayIndexException() { - return _throwArrayIndexException(reference.pointer).integer; - } - - static final _throwArithmeticException = jniLookup< - ffi - .NativeFunction)>>( - "Exceptions__throwArithmeticException") - .asFunction)>(); - - /// from: public int throwArithmeticException() - int throwArithmeticException() { - return _throwArithmeticException(reference.pointer).integer; - } - - static final _throwLoremIpsum = - jniLookup>( - "Exceptions__throwLoremIpsum") - .asFunction(); - - /// from: static public void throwLoremIpsum() - static void throwLoremIpsum() { - _throwLoremIpsum().check(); - } -} - -final class $ExceptionsType extends jni.JObjType { - const $ExceptionsType(); - - @override - String get signature => - r"Lcom/github/dart_lang/jnigen/simple_package/Exceptions;"; - - @override - Exceptions fromReference(jni.JReference reference) => - Exceptions.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($ExceptionsType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($ExceptionsType) && other is $ExceptionsType; - } -} - -/// from: com.github.dart_lang.jnigen.simple_package.Fields -class Fields extends jni.JObject { - @override - late final jni.JObjType $type = type; - - Fields.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $FieldsType(); - static final _get_amount = - jniLookup>( - "get_Fields__amount") - .asFunction(); - - static final _set_amount = - jniLookup>( - "set_Fields__amount") - .asFunction(); - - /// from: static public int amount - static int get amount => _get_amount().integer; - - /// from: static public int amount - static set amount(int value) => _set_amount(value).check(); - - static final _get_pi = - jniLookup>("get_Fields__pi") - .asFunction(); - - static final _set_pi = - jniLookup>( - "set_Fields__pi") - .asFunction(); - - /// from: static public double pi - static double get pi => _get_pi().doubleFloat; - - /// from: static public double pi - static set pi(double value) => _set_pi(value).check(); - - static final _get_asterisk = - jniLookup>( - "get_Fields__asterisk") - .asFunction(); - - static final _set_asterisk = - jniLookup>( - "set_Fields__asterisk") - .asFunction(); - - /// from: static public char asterisk - static int get asterisk => _get_asterisk().char; - - /// from: static public char asterisk - static set asterisk(int value) => _set_asterisk(value).check(); - - static final _get_name = - jniLookup>( - "get_Fields__name") - .asFunction(); - - static final _set_name = jniLookup< - ffi - .NativeFunction)>>( - "set_Fields__name") - .asFunction)>(); - - /// from: static public java.lang.String name - /// The returned object must be released after use, by calling the [release] method. - static jni.JString get name => _get_name().object(const jni.JStringType()); - - /// from: static public java.lang.String name - /// The returned object must be released after use, by calling the [release] method. - static set name(jni.JString value) => - _set_name(value.reference.pointer).check(); - - static final _get_i = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_Fields__i") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); - - static final _set_i = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, ffi.Pointer)>>("set_Fields__i") - .asFunction< - jni.JniResult Function(jni.JObjectPtr, ffi.Pointer)>(); - - /// from: public java.lang.Integer i - /// The returned object must be released after use, by calling the [release] method. - jni.JInteger get i => - _get_i(reference.pointer).object(const jni.JIntegerType()); - - /// from: public java.lang.Integer i - /// The returned object must be released after use, by calling the [release] method. - set i(jni.JInteger value) => - _set_i(reference.pointer, value.reference.pointer).check(); - - static final _get_trillion = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_Fields__trillion") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); - - static final _set_trillion = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, ffi.Int64)>>("set_Fields__trillion") - .asFunction(); - - /// from: public long trillion - int get trillion => _get_trillion(reference.pointer).long; - - /// from: public long trillion - set trillion(int value) => _set_trillion(reference.pointer, value).check(); - - static final _get_isAchillesDead = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_Fields__isAchillesDead") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); - - static final _set_isAchillesDead = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, ffi.Uint8)>>("set_Fields__isAchillesDead") - .asFunction(); - - /// from: public boolean isAchillesDead - bool get isAchillesDead => _get_isAchillesDead(reference.pointer).boolean; - - /// from: public boolean isAchillesDead - set isAchillesDead(bool value) => - _set_isAchillesDead(reference.pointer, value ? 1 : 0).check(); - - static final _get_bestFighterInGreece = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_Fields__bestFighterInGreece") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); - - static final _set_bestFighterInGreece = jniLookup< - ffi.NativeFunction< - jni.JniResult Function(jni.JObjectPtr, - ffi.Pointer)>>("set_Fields__bestFighterInGreece") - .asFunction< - jni.JniResult Function(jni.JObjectPtr, ffi.Pointer)>(); - - /// from: public java.lang.String bestFighterInGreece - /// The returned object must be released after use, by calling the [release] method. - jni.JString get bestFighterInGreece => - _get_bestFighterInGreece(reference.pointer) - .object(const jni.JStringType()); - - /// from: public java.lang.String bestFighterInGreece - /// The returned object must be released after use, by calling the [release] method. - set bestFighterInGreece(jni.JString value) => - _set_bestFighterInGreece(reference.pointer, value.reference.pointer) - .check(); - - static final _get_random = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_Fields__random") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); - - static final _set_random = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, ffi.Pointer)>>("set_Fields__random") - .asFunction< - jni.JniResult Function(jni.JObjectPtr, ffi.Pointer)>(); - - /// from: public java.util.Random random - /// The returned object must be released after use, by calling the [release] method. - jni.JObject get random => - _get_random(reference.pointer).object(const jni.JObjectType()); - - /// from: public java.util.Random random - /// The returned object must be released after use, by calling the [release] method. - set random(jni.JObject value) => - _set_random(reference.pointer, value.reference.pointer).check(); - - static final _get_euroSymbol = - jniLookup>( - "get_Fields__euroSymbol") - .asFunction(); - - static final _set_euroSymbol = - jniLookup>( - "set_Fields__euroSymbol") - .asFunction(); - - /// from: static public char euroSymbol - static int get euroSymbol => _get_euroSymbol().char; - - /// from: static public char euroSymbol - static set euroSymbol(int value) => _set_euroSymbol(value).check(); - - static final _new0 = - jniLookup>("Fields__new0") - .asFunction(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory Fields() { - return Fields.fromReference(_new0().reference); - } -} - -final class $FieldsType extends jni.JObjType { - const $FieldsType(); - - @override - String get signature => - r"Lcom/github/dart_lang/jnigen/simple_package/Fields;"; - - @override - Fields fromReference(jni.JReference reference) => - Fields.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($FieldsType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($FieldsType) && other is $FieldsType; - } -} - -/// from: com.github.dart_lang.jnigen.simple_package.Fields$Nested -class Fields_Nested extends jni.JObject { - @override - late final jni.JObjType $type = type; - - Fields_Nested.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static const type = $Fields_NestedType(); - static final _get_hundred = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>>("get_Fields_Nested__hundred") - .asFunction< - jni.JniResult Function( - jni.JObjectPtr, - )>(); - - static final _set_hundred = jniLookup< - ffi.NativeFunction< - jni.JniResult Function( - jni.JObjectPtr, ffi.Int64)>>("set_Fields_Nested__hundred") - .asFunction(); - - /// from: public long hundred - int get hundred => _get_hundred(reference.pointer).long; - - /// from: public long hundred - set hundred(int value) => _set_hundred(reference.pointer, value).check(); - - static final _get_BEST_GOD = - jniLookup>( - "get_Fields_Nested__BEST_GOD") - .asFunction(); - - static final _set_BEST_GOD = jniLookup< - ffi - .NativeFunction)>>( - "set_Fields_Nested__BEST_GOD") - .asFunction)>(); - - /// from: static public java.lang.String BEST_GOD - /// The returned object must be released after use, by calling the [release] method. - static jni.JString get BEST_GOD => - _get_BEST_GOD().object(const jni.JStringType()); - - /// from: static public java.lang.String BEST_GOD - /// The returned object must be released after use, by calling the [release] method. - static set BEST_GOD(jni.JString value) => - _set_BEST_GOD(value.reference.pointer).check(); - - static final _new0 = jniLookup>( - "Fields_Nested__new0") - .asFunction(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory Fields_Nested() { - return Fields_Nested.fromReference(_new0().reference); - } -} - -final class $Fields_NestedType extends jni.JObjType { - const $Fields_NestedType(); - - @override - String get signature => - r"Lcom/github/dart_lang/jnigen/simple_package/Fields$Nested;"; - - @override - Fields_Nested fromReference(jni.JReference reference) => - Fields_Nested.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($Fields_NestedType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($Fields_NestedType) && - other is $Fields_NestedType; - } -} - -/// from: com.github.dart_lang.jnigen.generics.GenericTypeParams -class GenericTypeParams<$S extends jni.JObject, $K extends jni.JObject> - extends jni.JObject { - @override - late final jni.JObjType> $type = type(S, K); - - final jni.JObjType<$S> S; - final jni.JObjType<$K> K; - - GenericTypeParams.fromReference( - this.S, - this.K, - jni.JReference reference, - ) : super.fromReference(reference); - - /// The type which includes information such as the signature of this class. - static $GenericTypeParamsType<$S, $K> - type<$S extends jni.JObject, $K extends jni.JObject>( - jni.JObjType<$S> S, - jni.JObjType<$K> K, - ) { - return $GenericTypeParamsType( - S, - K, - ); - } - - static final _new0 = jniLookup>( - "GenericTypeParams__new0") - .asFunction(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory GenericTypeParams({ - required jni.JObjType<$S> S, - required jni.JObjType<$K> K, - }) { - return GenericTypeParams.fromReference(S, K, _new0().reference); - } -} - -final class $GenericTypeParamsType<$S extends jni.JObject, - $K extends jni.JObject> extends jni.JObjType> { - final jni.JObjType<$S> S; - final jni.JObjType<$K> K; - - const $GenericTypeParamsType( - this.S, - this.K, - ); - - @override - String get signature => - r"Lcom/github/dart_lang/jnigen/generics/GenericTypeParams;"; - - @override - GenericTypeParams<$S, $K> fromReference(jni.JReference reference) => - GenericTypeParams.fromReference(S, K, reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => Object.hash($GenericTypeParamsType, S, K); - - @override - bool operator ==(Object other) { - return other.runtimeType == ($GenericTypeParamsType<$S, $K>) && - other is $GenericTypeParamsType<$S, $K> && - S == other.S && - K == other.K; - } -} - -/// from: com.github.dart_lang.jnigen.generics.StringMap -class StringMap extends StringKeyedMap { - @override - late final jni.JObjType $type = type; - - StringMap.fromReference( - jni.JReference reference, - ) : super.fromReference(const jni.JStringType(), reference); - - /// The type which includes information such as the signature of this class. - static const type = $StringMapType(); - static final _new0 = - jniLookup>("StringMap__new0") - .asFunction(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory StringMap() { - return StringMap.fromReference(_new0().reference); - } -} - -final class $StringMapType extends jni.JObjType { - const $StringMapType(); - - @override - String get signature => r"Lcom/github/dart_lang/jnigen/generics/StringMap;"; - - @override - StringMap fromReference(jni.JReference reference) => - StringMap.fromReference(reference); - - @override - jni.JObjType get superType => const $StringKeyedMapType(jni.JStringType()); - - @override - final superCount = 3; - - @override - int get hashCode => ($StringMapType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($StringMapType) && other is $StringMapType; - } -} diff --git a/pkgs/jnigen/test/simple_package_test/generate.dart b/pkgs/jnigen/test/simple_package_test/generate.dart index 9f59888803..afabf97469 100644 --- a/pkgs/jnigen/test/simple_package_test/generate.dart +++ b/pkgs/jnigen/test/simple_package_test/generate.dart @@ -48,12 +48,10 @@ void compileJavaSources(String workingDir, List files) async { } } -Config getConfig([BindingsType bindingsType = BindingsType.cBased]) { +Config getConfig() { compileJavaSources(javaPath, javaFiles); - final typeDir = bindingsType.getConfigString(); - final cWrapperDir = Uri.directory(join(testRoot, typeDir, "c_bindings")); final dartWrappersRoot = Uri.directory( - join(testRoot, typeDir, "dart_bindings"), + join(testRoot, "bindings"), ); final config = Config( sourcePath: [Uri.directory(javaPath)], @@ -72,11 +70,6 @@ Config getConfig([BindingsType bindingsType = BindingsType.cBased]) { ''' }, outputConfig: OutputConfig( - bindingsType: bindingsType, - cConfig: CCodeOutputConfig( - path: cWrapperDir, - libraryName: 'simple_package', - ), dartConfig: DartCodeOutputConfig( path: dartWrappersRoot.resolve('simple_package.dart'), structure: OutputStructure.singleFile, @@ -89,6 +82,5 @@ Config getConfig([BindingsType bindingsType = BindingsType.cBased]) { } void main() async { - await generateJniBindings(getConfig(BindingsType.cBased)); - await generateJniBindings(getConfig(BindingsType.dartOnly)); + await generateJniBindings(getConfig()); } diff --git a/pkgs/jnigen/test/simple_package_test/generated_files_test.dart b/pkgs/jnigen/test/simple_package_test/generated_files_test.dart index 0f595d2ff4..a0c5b974a0 100644 --- a/pkgs/jnigen/test/simple_package_test/generated_files_test.dart +++ b/pkgs/jnigen/test/simple_package_test/generated_files_test.dart @@ -2,25 +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 'package:jnigen/jnigen.dart'; -import 'package:test/test.dart'; - import 'generate.dart'; import '../test_util/test_util.dart'; void main() async { await checkLocallyBuiltDependencies(); - generateAndCompareBothModes( + generateAndCompare( 'Generate and compare bindings for simple_package java files', - getConfig(BindingsType.cBased), - getConfig(BindingsType.dartOnly), + getConfig(), ); - - test("Generate and analyze bindings for simple_package - pure dart", - () async { - await generateAndAnalyzeBindings( - getConfig(BindingsType.dartOnly), - ); - }); // test if generated file == expected file } diff --git a/pkgs/jnigen/test/simple_package_test/runtime_test_registrant.dart b/pkgs/jnigen/test/simple_package_test/runtime_test_registrant.dart index 9c31e9dfbf..a3386aebc5 100644 --- a/pkgs/jnigen/test/simple_package_test/runtime_test_registrant.dart +++ b/pkgs/jnigen/test/simple_package_test/runtime_test_registrant.dart @@ -10,7 +10,7 @@ import 'package:jni/jni.dart'; import '../test_util/callback_types.dart'; -import 'c_based/dart_bindings/simple_package.dart'; +import 'bindings/simple_package.dart'; const pi = 3.14159; const fpDelta = 0.001; diff --git a/pkgs/jnigen/test/test_util/bindings_test_setup.dart b/pkgs/jnigen/test/test_util/bindings_test_setup.dart index 2800aa1e74..0f1baefdb0 100644 --- a/pkgs/jnigen/test/test_util/bindings_test_setup.dart +++ b/pkgs/jnigen/test/test_util/bindings_test_setup.dart @@ -30,14 +30,6 @@ Future bindingsTestSetup() async { await runCommand('dart', [ 'run', 'jni:setup', - '-p', - 'jni', - '-s', - join(simplePackageTest, 'c_based', 'c_bindings'), - '-s', - join(kotlinTest, 'c_based', 'c_bindings'), - '-s', - join(jacksonCoreTest, 'third_party', 'c_based', 'c_bindings'), ]); tempClassDir = Directory.current.createTempSync("jnigen_runtime_test_classpath_"); diff --git a/pkgs/jnigen/test/test_util/summary_util.dart b/pkgs/jnigen/test/test_util/summary_util.dart index 0d445837c9..9218e91132 100644 --- a/pkgs/jnigen/test/test_util/summary_util.dart +++ b/pkgs/jnigen/test/test_util/summary_util.dart @@ -48,7 +48,6 @@ Config getSummaryGenerationConfig( {List? sourcePath, List? classPath}) { return Config( outputConfig: OutputConfig( - bindingsType: BindingsType.dartOnly, dartConfig: DartCodeOutputConfig( path: Uri.file('unused.dart'), structure: OutputStructure.singleFile, diff --git a/pkgs/jnigen/test/test_util/test_util.dart b/pkgs/jnigen/test/test_util/test_util.dart index 2a52b75c49..85a1cca2a4 100644 --- a/pkgs/jnigen/test/test_util/test_util.dart +++ b/pkgs/jnigen/test/test_util/test_util.dart @@ -100,15 +100,11 @@ void comparePaths(String path1, String path2) { } Future _generateTempBindings(Config config, Directory tempDir) async { - final tempSrc = tempDir.uri.resolve("src/"); final singleFile = config.outputConfig.dartConfig.structure == OutputStructure.singleFile; final tempLib = singleFile ? tempDir.uri.resolve("generated.dart") : tempDir.uri.resolve("lib/"); - if (config.outputConfig.bindingsType == BindingsType.cBased) { - config.outputConfig.cConfig!.path = tempSrc; - } config.outputConfig.dartConfig.path = tempLib; config.logLevel = Level.WARNING; await generateJniBindings(config); @@ -118,16 +114,11 @@ Future _generateTempBindings(Config config, Directory tempDir) async { /// /// [dartReferenceBindings] can be directory or file depending on output /// configuration. -/// -/// If the config generates C code, [cReferenceBindings] must be a non-null -/// directory path. Future generateAndCompareBindings(Config config) async { final dartReferenceBindings = config.outputConfig.dartConfig.path.toFilePath(); - final cReferenceBindings = config.outputConfig.cConfig?.path.toFilePath(); final currentDir = Directory.current; final tempDir = currentDir.createTempSync("jnigen_test_temp"); - final tempSrc = tempDir.uri.resolve("src/"); final singleFile = config.outputConfig.dartConfig.structure == OutputStructure.singleFile; final tempLib = singleFile @@ -136,9 +127,6 @@ Future generateAndCompareBindings(Config config) async { try { await _generateTempBindings(config, tempDir); comparePaths(dartReferenceBindings, tempLib.toFilePath()); - if (config.outputConfig.bindingsType == BindingsType.cBased) { - comparePaths(cReferenceBindings!, tempSrc.toFilePath()); - } } finally { tempDir.deleteSync(recursive: true); } @@ -184,50 +172,19 @@ const bindingTests = [ ]; const registrantName = 'runtime_test_registrant.dart'; -const replicaName = 'runtime_test_registrant_dartonly_generated.dart'; - -void warnIfRuntimeTestsAreOutdated() { - final runtimeTests = join('test', 'generated_runtime_test.dart'); - if (!File(runtimeTests).existsSync()) { - log.fatal('Runtime test files not found. To run binding ' - 'runtime tests, please generate them by running ' - '`dart run tool/generate_runtime_tests.dart`'); - } - const regenInstr = 'Please run `dart run tool/generate_runtime_tests.dart` ' - 'and try again.'; - for (var testName in bindingTests) { - final registrant = File(join('test', testName, registrantName)); - final replica = File(join('test', testName, replicaName)); - if (!replica.existsSync()) { - log.fatal( - 'One or more generated runtime tests do not exist. $regenInstr', - ); - } - if (replica.lastModifiedSync().isBefore(registrant.lastModifiedSync())) { - log.fatal( - 'One or more generated runtime tests are not up-to-date. $regenInstr', - ); - } - } -} /// Verifies if locally built dependencies (currently `ApiSummarizer`) /// are up-to-date. Future checkLocallyBuiltDependencies() async { await failIfSummarizerNotBuilt(); - warnIfRuntimeTestsAreOutdated(); } -void generateAndCompareBothModes( +void generateAndCompare( String description, - Config cBasedConfig, - Config dartOnlyConfig, + Config config, ) { - test('$description (cBased)', () async { - await generateAndCompareBindings(cBasedConfig); - }, timeout: const Timeout(Duration(minutes: 2))); - test('$description (dartOnly)', () async { - await generateAndCompareBindings(dartOnlyConfig); + test(description, () async { + await generateAndCompareBindings(config); }, timeout: const Timeout(Duration(minutes: 2))); } diff --git a/pkgs/jnigen/tool/generate_runtime_tests.dart b/pkgs/jnigen/tool/generate_runtime_tests.dart deleted file mode 100644 index a95e414c16..0000000000 --- a/pkgs/jnigen/tool/generate_runtime_tests.dart +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import 'dart:io'; - -import 'package:path/path.dart'; -import 'package:args/args.dart'; - -import 'package:jnigen/src/logging/logging.dart'; - -final lineBreak = Platform.isWindows ? '\r\n' : '\n'; - -void runCommand(String exec, List args) { - final proc = Process.runSync(exec, args, runInShell: true); - log.info('Execute $exec ${args.join(" ")}'); - if (proc.exitCode != 0) { - exitCode = proc.exitCode; - printError(proc.stdout); - printError(proc.stderr); - throw Exception('Command failed: $exec ${args.join(" ")}'); - } -} - -const testPath = 'test'; -const registrantFileName = 'runtime_test_registrant.dart'; -const dartOnlyRegistrantFileName = - 'runtime_test_registrant_dartonly_generated.dart'; - -// Paths of generated files, should not be checked in. -// If you change this, add the corresponding entry to .gitignore as well. -const replicaSuffix = '_dartonly_generated.dart'; -final runnerFilePath = join(testPath, 'generated_runtime_test.dart'); -final androidRunnerFilePath = - join('android_test_runner', 'integration_test', 'runtime_test.dart'); - -final generatedComment = - '// Generated file. Do not edit or check-in to version control.$lineBreak'; -const copyright = ''' -// 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. -'''; - -const bindingTests = [ - 'jackson_core_test', - 'simple_package_test', - 'kotlin_test', -]; - -const hasThirdPartyDir = {'jackson_core_test'}; - -final _generatedFiles = [ - for (var testName in bindingTests) - join(testPath, testName, dartOnlyRegistrantFileName), - runnerFilePath, - androidRunnerFilePath, -]; - -void generateReplicasAndRunner() { - final imports = {}; - for (var testName in bindingTests) { - final registrant = join(testName, registrantFileName); - final registrantFile = File(join(testPath, registrant)); - final contents = registrantFile - .readAsStringSync() - .replaceAll('c_based/dart_bindings/', 'dart_only/dart_bindings/'); - - final replica = registrant.replaceAll('.dart', replicaSuffix); - final replicaFile = File(join(testPath, replica)); - replicaFile.writeAsStringSync('$generatedComment$lineBreak$contents'); - log.info('Generated $replica'); - imports['${testName}_c_based'] = - Uri.file(registrant).toFilePath(windows: false); - imports['${testName}_dart_only'] = - Uri.file(replica).toFilePath(windows: false); - } - final importStrings = imports.entries - .map((e) => 'import "${e.value}" as ${e.key};') - .join(lineBreak); - final androidImportStrings = imports.entries - .map((e) => 'import "../../test/${e.value}" as ${e.key};') - .join(lineBreak); - final runStrings = imports.keys - .map((name) => '$name.registerTests("$name", test);') - .join('$lineBreak '); - final runnerProgram = ''' -$generatedComment -$copyright -import 'package:test/test.dart'; -import 'test_util/bindings_test_setup.dart' as setup; - -$importStrings - -void main() { - setUpAll(setup.bindingsTestSetup); - $runStrings - tearDownAll(setup.bindingsTestTeardown); -} -'''; - final runnerFile = File(runnerFilePath); - runnerFile.writeAsStringSync(runnerProgram); - log.info('Generated runner $runnerFilePath'); - - final androidRunnerProgram = ''' -$generatedComment -$copyright -import "package:flutter_test/flutter_test.dart"; -import "package:jni/jni.dart"; - -$androidImportStrings - -typedef TestCaseCallback = void Function(); - -void test(String description, TestCaseCallback testCase) { - testWidgets(description, (widgetTester) async => testCase()); -} - -void main() { - $runStrings -} -'''; - File(androidRunnerFilePath).writeAsStringSync(androidRunnerProgram); - log.info('Generated android runner: $androidRunnerFilePath'); - - final cMakePath = - join('android_test_runner', 'android', 'app', 'CMakeLists.txt'); - - final cmakeSubdirs = bindingTests.map((testName) { - final indirect = hasThirdPartyDir.contains(testName) ? '/third_party' : ''; - return 'add_subdirectory' - '(../../../test/$testName$indirect/c_based/c_bindings ' - '${testName}_build)'; - }).join(lineBreak); - final cMakeConfig = ''' -## Parent CMake for Android native build target. This will build -## all C bindings from tests. - -cmake_minimum_required(VERSION 3.10) - -project(simple_package VERSION 0.0.1 LANGUAGES C) - -$cmakeSubdirs -'''; - File(cMakePath).writeAsStringSync(cMakeConfig); - log.info('Wrote Android CMake file: $cMakePath'); -} - -void cleanup() { - for (var path in _generatedFiles) { - File(path).deleteSync(); - log.info('Deleted $path'); - } -} - -void main(List args) async { - final parser = ArgParser() - ..addFlag( - 'help', - abbr: 'h', - help: 'show help', - negatable: false, - ) - ..addFlag( - 'clean', - abbr: 'c', - help: 'clear generated files', - negatable: false, - ); - final argResults = parser.parse(args); - if (argResults['help']) { - stderr.writeln( - 'Generates runtime tests for both Dart-only and C based bindings.'); - stderr.writeln(parser.usage); - return; - } else if (argResults['clean']) { - cleanup(); - } else { - generateReplicasAndRunner(); - runCommand('dart', ['format', ..._generatedFiles]); - } -} diff --git a/pkgs/jnigen/tool/pr_checks.dart b/pkgs/jnigen/tool/pr_checks.dart deleted file mode 100644 index 3e983c2440..0000000000 --- a/pkgs/jnigen/tool/pr_checks.dart +++ /dev/null @@ -1,180 +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. - -// This is a script to run a subset of CI checks on development machine before -// submitting PR. This prevents from accidentally forgetting to format or -// remove an unused import. - -// This is rough around the edges. This script may give false positives such -// as some gitignore'd temporary files failing the comparison. - -// On windows, please install 'diffutils' using your favorite package installer -// for this script to work correctly. Also ensure that clang-format is on your -// PATH. - -import 'dart:async'; -import 'dart:io'; - -import 'package:args/args.dart'; - -import 'command_runner.dart'; - -// Flags -const _clone = 'clone'; - -void main(List arguments) async { - final parser = ArgParser() - ..addFlag( - _clone, - help: 'Run checks in a cloned copy of the project.', - defaultsTo: true, - negatable: true, - ); - final argResults = parser.parse(arguments); - final shouldClone = argResults[_clone] as bool; - final gitRoot = getRepositoryRoot(); - - // change to project root - Directory.current = gitRoot.toFilePath(); - - var tempDir = Directory.current; - if (shouldClone) { - tempDir = Directory.current.createTempSync('jnigen_checks_clone_'); - final gitClone = Runner("Clone jni", Directory.current.uri) - ..chainCommand('git', ['clone', '.', tempDir.path]); - await gitClone.run(); - } - - final jniPath = tempDir.uri.resolve("jni/"); - final jnigenPath = tempDir.uri.resolve("jnigen/"); - final pubGet = Runner("Pub get", tempDir.uri) - ..chainCommand("flutter", ["pub", "get", "--offline"], - workingDirectory: jniPath) - ..chainCommand("dart", ["pub", "get", "--offline"], - workingDirectory: jnigenPath); - await pubGet.run(); - - final jniAnalyze = Runner("Analyze JNI", jniPath); - jniAnalyze - ..chainCommand("dart", ["analyze", "--fatal-infos"]) - ..chainCommand( - "dart", ["format", "--output=none", "--set-exit-if-changed", "."]) - ..chainCommand( - "clang-format", - [ - "--dry-run", - "-Werror", - "dartjni.c", - "dartjni.h", - "third_party/global_jni_env.c", - "third_party/global_jni_env.h", - ], - workingDirectory: jniPath.resolve("src/")); - final jniTest = Runner("Test JNI", jniPath) - ..chainCommand("dart", ["run", "jni:setup"]) - ..chainCommand("dart", ["test", "-j", "1"]); - unawaited(jniAnalyze.run().then((f) => jniTest.run())); - - List getJavaFiles(String relativePath) => - Directory.fromUri(jnigenPath.resolve(relativePath)) - .listSync(recursive: true) - .where((file) => file.path.endsWith(".java")) - .map((file) => file.path) - .toList(); - - final javaFiles = getJavaFiles("java/") + - getJavaFiles("test/simple_package_test") + - getJavaFiles("example/in_app_java") + - getJavaFiles("example/notification_plugin"); - - final checkJavaFormat = Runner("Check java format", jnigenPath) - ..chainCommand( - "google-java-format", ["-n", "--set-exit-if-changed", ...javaFiles]); - - unawaited(checkJavaFormat.run()); - - final ffigenBindingsPath = getRepositoryRoot() - .resolve("jni/lib/src/third_party/jni_bindings_generated.dart"); - final ffigenBindings = File.fromUri(ffigenBindingsPath); - final oldBindingsText = ffigenBindings.readAsStringSync(); - final ffigenCompare = Runner("Generate & Compare FFIGEN bindings", jniPath) - ..chainCommand("dart", ["run", "ffigen", "--config", "ffigen.yaml"]) - ..chainCallback("compare bindings", () async { - final newBindingsText = await ffigenBindings.readAsString(); - if (newBindingsText != oldBindingsText) { - await ffigenBindings.writeAsString(oldBindingsText); - throw "new JNI.h bindings differ from old bindings"; - } - }); - unawaited(ffigenCompare.run()); - - final jnigenAnalyze = Runner("Analyze jnigen", jnigenPath) - ..chainCommand("dart", ["analyze", "--fatal-infos"]) - ..chainCommand( - "dart", ["format", "--output=none", "--set-exit-if-changed", "."]) - ..chainCommand("dart", ["run", "jnigen:setup"]); - - // Tests may need more time when running on systems with less cores. - // So '--timeout 2x' is specified. - final jnigenTest = Runner("Test jnigen", gitRoot.resolve("jnigen/")) - ..chainCommand("dart", ["test", "--timeout", "2x"]); - - // Note: Running in_app_java and notification_plugin checks on source dir - // itself, because running flutter build in cloned dir will take time. - final compareInAppJavaBindings = Runner( - "Generate & compare InAppJava bindings", - gitRoot.resolve("jnigen/example/in_app_java")) - ..chainCommand("dart", [ - "run", - "jnigen", - "--config", - "jnigen.yaml", - "-Doutput.c.path=src_temp/", - "-Doutput.dart.path=_temp.dart", - ]) - ..chainCommand("diff", ["lib/android_utils.dart", "_temp.dart"]) - ..chainCommand("diff", ["-qr", "src/android_utils/", "src_temp/"]) - ..chainCleanupCommand("rm", ["-r", "_temp.dart", "src_temp"]); - - final comparePdfboxBindings = Runner("Generate & compare PdfBox Bindings", - gitRoot.resolve("jnigen/example/pdfbox_plugin")) - ..chainCommand("dart", [ - "run", - "jnigen", - "--config", - "jnigen.yaml", - "-Doutput.c.path=src_temp/", - "-Doutput.dart.path=lib_temp/", - ]) - ..chainCommand("diff", ["-qr", "lib/src/third_party/", "lib_temp/"]) - ..chainCommand("diff", ["-qr", "src/", "src_temp/"]) - ..chainCleanupCommand("rm", ["-r", "lib_temp", "src_temp"]); - - final compareNotificationPluginBindings = Runner( - "Generate & compare NotificationPlugin Bindings", - gitRoot.resolve("jnigen/example/notification_plugin")) - ..chainCommand("dart", [ - "run", - "jnigen", - "--config", - "jnigen.yaml", - "-Doutput.c.path=src_temp/", - "-Doutput.dart.path=_temp.dart", - ]) - ..chainCommand("diff", ["lib/notifications.dart", "_temp.dart"]) - ..chainCommand("diff", ["-qr", "src/", "src_temp/"]) - ..chainCleanupCommand("rm", ["-r", "_temp.dart", "src_temp"]); - - unawaited(jnigenAnalyze.run().then((_) { - final test = jnigenTest.run(); - final inAppJava = compareInAppJavaBindings.run(); - final pdfBox = comparePdfboxBindings.run(); - final notificationPlugin = compareNotificationPluginBindings.run(); - return Future.wait([test, inAppJava, pdfBox, notificationPlugin]); - }).then((_) { - if (shouldClone) { - tempDir.deleteSync(recursive: true); - } - })); -} diff --git a/pkgs/native_assets_builder/test_data/dart_app/bin/dart_app.dart b/pkgs/native_assets_builder/test_data/dart_app/bin/dart_app.dart index 4e9dc84b80..2d19015647 100644 --- a/pkgs/native_assets_builder/test_data/dart_app/bin/dart_app.dart +++ b/pkgs/native_assets_builder/test_data/dart_app/bin/dart_app.dart @@ -13,7 +13,7 @@ void main() { void testNativeAdd() { final answer = add(5, 6); if (answer != 5 + 6) { - throw 'Wrong answer'; + throw Exception('Wrong answer'); } print('add(5, 6) = $answer'); } @@ -21,7 +21,7 @@ void testNativeAdd() { void testNativeSubtract() { final answer = subtract(5, 6); if (answer != 5 - 6) { - throw 'Wrong answer'; + throw Exception('Wrong answer'); } print('subtract(5, 6) = $answer'); } diff --git a/pkgs/objective_c/.gitignore b/pkgs/objective_c/.gitignore new file mode 100644 index 0000000000..17e8ef64a1 --- /dev/null +++ b/pkgs/objective_c/.gitignore @@ -0,0 +1,30 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +*.dylib +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +build/ diff --git a/pkgs/objective_c/.metadata b/pkgs/objective_c/.metadata new file mode 100644 index 0000000000..a41ab896bb --- /dev/null +++ b/pkgs/objective_c/.metadata @@ -0,0 +1,33 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "aedce673f760bc19f13aa0600e2c1df9ae502117" + channel: "master" + +project_type: plugin_ffi + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: aedce673f760bc19f13aa0600e2c1df9ae502117 + base_revision: aedce673f760bc19f13aa0600e2c1df9ae502117 + - platform: ios + create_revision: aedce673f760bc19f13aa0600e2c1df9ae502117 + base_revision: aedce673f760bc19f13aa0600e2c1df9ae502117 + - platform: macos + create_revision: aedce673f760bc19f13aa0600e2c1df9ae502117 + base_revision: aedce673f760bc19f13aa0600e2c1df9ae502117 + + # 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/objective_c/CHANGELOG.md b/pkgs/objective_c/CHANGELOG.md new file mode 100644 index 0000000000..0c2a4a1897 --- /dev/null +++ b/pkgs/objective_c/CHANGELOG.md @@ -0,0 +1,8 @@ +## 0.0.1-wip + +- Move sharable code from ffigen's generated code into this package, including + `ObjCObjectBase`, and `ObjCBlockBase`, as well as the core Objective C runtime + functions (except `objc_msgSend`, which is library specific). +- Move core ObjC classes such as `NSString` into this package. +- Delete Dart functions associated with ObjC closure blocks when the block is + destroyed. Fixes https://github.com/dart-lang/native/issues/204 diff --git a/pkgs/objective_c/LICENSE b/pkgs/objective_c/LICENSE new file mode 100644 index 0000000000..b03a788683 --- /dev/null +++ b/pkgs/objective_c/LICENSE @@ -0,0 +1,27 @@ +Copyright 2024, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pkgs/objective_c/README.md b/pkgs/objective_c/README.md new file mode 100644 index 0000000000..5d3c591a00 --- /dev/null +++ b/pkgs/objective_c/README.md @@ -0,0 +1,4 @@ +# objective_c + +A library to access Objective C from Flutter that acts as a support library for +package:ffigen. diff --git a/pkgs/objective_c/analysis_options.yaml b/pkgs/objective_c/analysis_options.yaml new file mode 100644 index 0000000000..a2ac230693 --- /dev/null +++ b/pkgs/objective_c/analysis_options.yaml @@ -0,0 +1,8 @@ +include: package:flutter_lints/flutter.yaml + +analyzer: + exclude: + - tool/data/extra_methods.dart + language: + strict-casts: true + strict-inference: true diff --git a/pkgs/objective_c/example/.gitignore b/pkgs/objective_c/example/.gitignore new file mode 100644 index 0000000000..29a3a5017f --- /dev/null +++ b/pkgs/objective_c/example/.gitignore @@ -0,0 +1,43 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/pkgs/objective_c/example/README.md b/pkgs/objective_c/example/README.md new file mode 100644 index 0000000000..1690cef718 --- /dev/null +++ b/pkgs/objective_c/example/README.md @@ -0,0 +1,3 @@ +# objective_c example + +Demonstrates how to use the objective_c plugin. diff --git a/pkgs/objective_c/example/analysis_options.yaml b/pkgs/objective_c/example/analysis_options.yaml new file mode 100644 index 0000000000..22c406e139 --- /dev/null +++ b/pkgs/objective_c/example/analysis_options.yaml @@ -0,0 +1,6 @@ +include: package:flutter_lints/flutter.yaml + +analyzer: + language: + strict-casts: true + strict-inference: true diff --git a/pkgs/objective_c/example/ios/.gitignore b/pkgs/objective_c/example/ios/.gitignore new file mode 100644 index 0000000000..7a7f9873ad --- /dev/null +++ b/pkgs/objective_c/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/objective_c/example/ios/Flutter/AppFrameworkInfo.plist b/pkgs/objective_c/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000000..7c56964006 --- /dev/null +++ b/pkgs/objective_c/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 + 12.0 + + diff --git a/pkgs/objective_c/example/ios/Flutter/Debug.xcconfig b/pkgs/objective_c/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000000..ec97fc6f30 --- /dev/null +++ b/pkgs/objective_c/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/pkgs/objective_c/example/ios/Flutter/Release.xcconfig b/pkgs/objective_c/example/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000000..c4855bfe20 --- /dev/null +++ b/pkgs/objective_c/example/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/pkgs/objective_c/example/ios/Podfile b/pkgs/objective_c/example/ios/Podfile new file mode 100644 index 0000000000..d97f17e223 --- /dev/null +++ b/pkgs/objective_c/example/ios/Podfile @@ -0,0 +1,44 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '12.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/pkgs/objective_c/example/ios/Podfile.lock b/pkgs/objective_c/example/ios/Podfile.lock new file mode 100644 index 0000000000..339f20a546 --- /dev/null +++ b/pkgs/objective_c/example/ios/Podfile.lock @@ -0,0 +1,22 @@ +PODS: + - Flutter (1.0.0) + - objective_c (0.0.1): + - Flutter + +DEPENDENCIES: + - Flutter (from `Flutter`) + - objective_c (from `.symlinks/plugins/objective_c/ios`) + +EXTERNAL SOURCES: + Flutter: + :path: Flutter + objective_c: + :path: ".symlinks/plugins/objective_c/ios" + +SPEC CHECKSUMS: + Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + objective_c: 77e887b5ba1827970907e10e832eec1683f3431d + +PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796 + +COCOAPODS: 1.11.2 diff --git a/pkgs/objective_c/example/ios/Runner.xcodeproj/project.pbxproj b/pkgs/objective_c/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..8f49bdf9e3 --- /dev/null +++ b/pkgs/objective_c/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,728 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 0016C0D0D056FCD78A6A33E8 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5349C2B3D454EF3220FB3306 /* Pods_RunnerTests.framework */; }; + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 4D7C7CB911925A31801A2F1E /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0B910B6B0374F2338E70D6AC /* Pods_Runner.framework */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* 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 */ + 0B910B6B0374F2338E70D6AC /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 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 = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 5349C2B3D454EF3220FB3306 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 5898EAFA36C90FEB069D15C8 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 5E623BDE574BD3F02055F373 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + 6F2BCFFFCABF2D8A79F17D26 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 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 = ""; }; + B6F1E5A6A7CC24D81665E0BA /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + F794A460162AE19694C18D43 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + FFB0D24362152330E942673E /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4D7C7CB911925A31801A2F1E /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B209388E6951AC88C18EE569 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0016C0D0D056FCD78A6A33E8 /* Pods_RunnerTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 2961EE994295B641DF59D533 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 0B910B6B0374F2338E70D6AC /* Pods_Runner.framework */, + 5349C2B3D454EF3220FB3306 /* Pods_RunnerTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + 97F4D88CC18AF014179906AC /* Pods */, + 2961EE994295B641DF59D533 /* Frameworks */, + ); + 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 = ""; + }; + 97F4D88CC18AF014179906AC /* Pods */ = { + isa = PBXGroup; + children = ( + FFB0D24362152330E942673E /* Pods-Runner.debug.xcconfig */, + 6F2BCFFFCABF2D8A79F17D26 /* Pods-Runner.release.xcconfig */, + B6F1E5A6A7CC24D81665E0BA /* Pods-Runner.profile.xcconfig */, + 5E623BDE574BD3F02055F373 /* Pods-RunnerTests.debug.xcconfig */, + F794A460162AE19694C18D43 /* Pods-RunnerTests.release.xcconfig */, + 5898EAFA36C90FEB069D15C8 /* Pods-RunnerTests.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 11218719EF64897AFE1F9EE8 /* [CP] Check Pods Manifest.lock */, + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + B209388E6951AC88C18EE569 /* Frameworks */, + ); + 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 = ( + E0D32FA7EF8A23FC0FD30465 /* [CP] Check Pods Manifest.lock */, + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 98CA06E4ED3E0BFB8A3C613F /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + 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 */ + 11218719EF64897AFE1F9EE8 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 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"; + }; + 98CA06E4ED3E0BFB8A3C613F /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + E0D32FA7EF8A23FC0FD30465 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 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; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + 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; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + 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 = 12.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.github.dartlang.objectiveCExample; + 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 = 5E623BDE574BD3F02055F373 /* 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.github.dartlang.objectiveCExample.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 = F794A460162AE19694C18D43 /* 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.github.dartlang.objectiveCExample.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 = 5898EAFA36C90FEB069D15C8 /* 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.github.dartlang.objectiveCExample.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; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + 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; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + 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 = 12.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; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + 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; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + 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 = 12.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.github.dartlang.objectiveCExample; + 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.github.dartlang.objectiveCExample; + 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/objective_c/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/pkgs/objective_c/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/pkgs/objective_c/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/pkgs/objective_c/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/pkgs/objective_c/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/pkgs/objective_c/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/pkgs/objective_c/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/pkgs/objective_c/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000..f9b0d7c5ea --- /dev/null +++ b/pkgs/objective_c/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/pkgs/objective_c/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/pkgs/objective_c/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000000..8e3ca5dfe1 --- /dev/null +++ b/pkgs/objective_c/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pkgs/objective_c/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/pkgs/objective_c/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..21a3cc14c7 --- /dev/null +++ b/pkgs/objective_c/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/pkgs/objective_c/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/pkgs/objective_c/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/pkgs/objective_c/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/pkgs/objective_c/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/pkgs/objective_c/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000..f9b0d7c5ea --- /dev/null +++ b/pkgs/objective_c/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/pkgs/objective_c/example/ios/Runner/AppDelegate.swift b/pkgs/objective_c/example/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000000..9074fee929 --- /dev/null +++ b/pkgs/objective_c/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import Flutter +import UIKit + +@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/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/pkgs/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..d36b1fab2d --- /dev/null +++ b/pkgs/objective_c/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/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/pkgs/objective_c/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/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/pkgs/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/pkgs/objective_c/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/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/pkgs/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/pkgs/objective_c/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/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/pkgs/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/pkgs/objective_c/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/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/pkgs/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/pkgs/objective_c/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/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/pkgs/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/pkgs/objective_c/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/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/pkgs/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/pkgs/objective_c/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/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/pkgs/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/pkgs/objective_c/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/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/pkgs/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/pkgs/objective_c/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/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/pkgs/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/pkgs/objective_c/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/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/pkgs/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/pkgs/objective_c/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/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/pkgs/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/pkgs/objective_c/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/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/pkgs/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/pkgs/objective_c/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/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/pkgs/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/pkgs/objective_c/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/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/pkgs/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/pkgs/objective_c/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/objective_c/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/pkgs/objective_c/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/pkgs/objective_c/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000000..0bedcf2fd4 --- /dev/null +++ b/pkgs/objective_c/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/objective_c/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/pkgs/objective_c/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/pkgs/objective_c/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/pkgs/objective_c/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/pkgs/objective_c/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/pkgs/objective_c/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/pkgs/objective_c/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/pkgs/objective_c/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/pkgs/objective_c/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/pkgs/objective_c/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/pkgs/objective_c/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000000..89c2725b70 --- /dev/null +++ b/pkgs/objective_c/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/objective_c/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/pkgs/objective_c/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000..f2e259c7c9 --- /dev/null +++ b/pkgs/objective_c/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pkgs/objective_c/example/ios/Runner/Base.lproj/Main.storyboard b/pkgs/objective_c/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..f3c28516fb --- /dev/null +++ b/pkgs/objective_c/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pkgs/objective_c/example/ios/Runner/Info.plist b/pkgs/objective_c/example/ios/Runner/Info.plist new file mode 100644 index 0000000000..8bbbc6dc9a --- /dev/null +++ b/pkgs/objective_c/example/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Objective C + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + objective_c_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/objective_c/example/ios/Runner/Runner-Bridging-Header.h b/pkgs/objective_c/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000000..308a2a560b --- /dev/null +++ b/pkgs/objective_c/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/pkgs/objective_c/example/ios/RunnerTests/RunnerTests.swift b/pkgs/objective_c/example/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 0000000000..86a7c3b1b6 --- /dev/null +++ b/pkgs/objective_c/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/objective_c/example/lib/main.dart b/pkgs/objective_c/example/lib/main.dart new file mode 100644 index 0000000000..1c2d1d35bf --- /dev/null +++ b/pkgs/objective_c/example/lib/main.dart @@ -0,0 +1,37 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:flutter/material.dart'; +import 'package:objective_c/objective_c.dart'; + +void main() { + runApp(const MaterialApp(home: MainApp())); +} + +class MainApp extends StatefulWidget { + const MainApp({super.key}); + + @override + State createState() => _MainAppState(); +} + +class _MainAppState extends State { + late final String message; + + @override + void initState() { + super.initState(); + + message = NSString('Hello World!').toString(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: Center( + child: Text(message), + ), + ); + } +} diff --git a/pkgs/objective_c/example/macos/.gitignore b/pkgs/objective_c/example/macos/.gitignore new file mode 100644 index 0000000000..746adbb6b9 --- /dev/null +++ b/pkgs/objective_c/example/macos/.gitignore @@ -0,0 +1,7 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/dgph +**/xcuserdata/ diff --git a/pkgs/objective_c/example/macos/Flutter/Flutter-Debug.xcconfig b/pkgs/objective_c/example/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 0000000000..4b81f9b2d2 --- /dev/null +++ b/pkgs/objective_c/example/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/pkgs/objective_c/example/macos/Flutter/Flutter-Release.xcconfig b/pkgs/objective_c/example/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 0000000000..5caa9d1579 --- /dev/null +++ b/pkgs/objective_c/example/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/pkgs/objective_c/example/macos/Flutter/GeneratedPluginRegistrant.swift b/pkgs/objective_c/example/macos/Flutter/GeneratedPluginRegistrant.swift new file mode 100644 index 0000000000..cccf817a52 --- /dev/null +++ b/pkgs/objective_c/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/objective_c/example/macos/Podfile b/pkgs/objective_c/example/macos/Podfile new file mode 100644 index 0000000000..c795730db8 --- /dev/null +++ b/pkgs/objective_c/example/macos/Podfile @@ -0,0 +1,43 @@ +platform :osx, '10.14' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_macos_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) + end +end diff --git a/pkgs/objective_c/example/macos/Runner.xcodeproj/project.pbxproj b/pkgs/objective_c/example/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..f6e37da45f --- /dev/null +++ b/pkgs/objective_c/example/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,705 @@ +// !$*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 /* objective_c_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "objective_c_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 /* objective_c_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 /* objective_c_example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1510; + 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.github.dartlang.objectiveCExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/objective_c_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/objective_c_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.github.dartlang.objectiveCExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/objective_c_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/objective_c_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.github.dartlang.objectiveCExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/objective_c_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/objective_c_example"; + }; + name = Profile; + }; + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + 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; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + 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; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + 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; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + 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; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + 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; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + 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/objective_c/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/pkgs/objective_c/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/pkgs/objective_c/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/pkgs/objective_c/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/pkgs/objective_c/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000000..c87f478474 --- /dev/null +++ b/pkgs/objective_c/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pkgs/objective_c/example/macos/Runner.xcworkspace/contents.xcworkspacedata b/pkgs/objective_c/example/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..1d526a16ed --- /dev/null +++ b/pkgs/objective_c/example/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/pkgs/objective_c/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/pkgs/objective_c/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/pkgs/objective_c/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/pkgs/objective_c/example/macos/Runner/AppDelegate.swift b/pkgs/objective_c/example/macos/Runner/AppDelegate.swift new file mode 100644 index 0000000000..d53ef64377 --- /dev/null +++ b/pkgs/objective_c/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/objective_c/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/pkgs/objective_c/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..a2ec33f19f --- /dev/null +++ b/pkgs/objective_c/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/objective_c/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/pkgs/objective_c/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/objective_c/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/pkgs/objective_c/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/pkgs/objective_c/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/objective_c/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/pkgs/objective_c/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/pkgs/objective_c/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/objective_c/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/pkgs/objective_c/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/pkgs/objective_c/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/objective_c/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/pkgs/objective_c/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/pkgs/objective_c/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/objective_c/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/pkgs/objective_c/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/pkgs/objective_c/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/objective_c/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/pkgs/objective_c/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/pkgs/objective_c/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/objective_c/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/pkgs/objective_c/example/macos/Runner/Base.lproj/MainMenu.xib b/pkgs/objective_c/example/macos/Runner/Base.lproj/MainMenu.xib new file mode 100644 index 0000000000..80e867a4e0 --- /dev/null +++ b/pkgs/objective_c/example/macos/Runner/Base.lproj/MainMenu.xib @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pkgs/objective_c/example/macos/Runner/Configs/AppInfo.xcconfig b/pkgs/objective_c/example/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 0000000000..50d7b8686b --- /dev/null +++ b/pkgs/objective_c/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 = objective_c_example + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = com.github.dartlang.objectiveCExample + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2024 com.github.dart_lang. All rights reserved. diff --git a/pkgs/objective_c/example/macos/Runner/Configs/Debug.xcconfig b/pkgs/objective_c/example/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 0000000000..36b0fd9464 --- /dev/null +++ b/pkgs/objective_c/example/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/pkgs/objective_c/example/macos/Runner/Configs/Release.xcconfig b/pkgs/objective_c/example/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 0000000000..dff4f49561 --- /dev/null +++ b/pkgs/objective_c/example/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/pkgs/objective_c/example/macos/Runner/Configs/Warnings.xcconfig b/pkgs/objective_c/example/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 0000000000..42bcbf4780 --- /dev/null +++ b/pkgs/objective_c/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/objective_c/example/macos/Runner/DebugProfile.entitlements b/pkgs/objective_c/example/macos/Runner/DebugProfile.entitlements new file mode 100644 index 0000000000..dddb8a30c8 --- /dev/null +++ b/pkgs/objective_c/example/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.server + + + diff --git a/pkgs/objective_c/example/macos/Runner/Info.plist b/pkgs/objective_c/example/macos/Runner/Info.plist new file mode 100644 index 0000000000..4789daa6a4 --- /dev/null +++ b/pkgs/objective_c/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/objective_c/example/macos/Runner/MainFlutterWindow.swift b/pkgs/objective_c/example/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 0000000000..3cc05eb234 --- /dev/null +++ b/pkgs/objective_c/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/objective_c/example/macos/Runner/Release.entitlements b/pkgs/objective_c/example/macos/Runner/Release.entitlements new file mode 100644 index 0000000000..852fa1a472 --- /dev/null +++ b/pkgs/objective_c/example/macos/Runner/Release.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.app-sandbox + + + diff --git a/pkgs/objective_c/example/macos/RunnerTests/RunnerTests.swift b/pkgs/objective_c/example/macos/RunnerTests/RunnerTests.swift new file mode 100644 index 0000000000..61f3bd1fc5 --- /dev/null +++ b/pkgs/objective_c/example/macos/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Cocoa +import FlutterMacOS +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/objective_c/example/pubspec.lock b/pkgs/objective_c/example/pubspec.lock new file mode 100644 index 0000000000..0dce9eae50 --- /dev/null +++ b/pkgs/objective_c/example/pubspec.lock @@ -0,0 +1,236 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + ffi: + dependency: "direct main" + description: + name: ffi + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + url: "https://pub.dev" + source: hosted + version: "3.0.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + url: "https://pub.dev" + source: hosted + version: "0.8.0" + meta: + dependency: transitive + description: + name: meta + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + url: "https://pub.dev" + source: hosted + version: "1.12.0" + objective_c: + dependency: "direct main" + description: + path: ".." + relative: true + source: path + version: "0.0.1-wip" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + url: "https://pub.dev" + source: hosted + version: "0.7.0" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: a2662fb1f114f4296cf3f5a50786a2d888268d7776cf681aa17d660ffa23b246 + url: "https://pub.dev" + source: hosted + version: "14.0.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" +sdks: + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/pkgs/objective_c/example/pubspec.yaml b/pkgs/objective_c/example/pubspec.yaml new file mode 100644 index 0000000000..f5312e8a3d --- /dev/null +++ b/pkgs/objective_c/example/pubspec.yaml @@ -0,0 +1,27 @@ +# Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +# for details. All rights reserved. Use of this source code is governed by a +# BSD-style license that can be found in the LICENSE file. + +name: example +description: "Demonstrates using package:objective_c" +publish_to: 'none' +version: 0.1.0 + +environment: + sdk: '>=3.3.0 <4.0.0' + flutter: '>=3.3.0' + +dependencies: + ffi: ^2.1.0 + flutter: + sdk: flutter + objective_c: + path: .. + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^3.0.0 + +flutter: + uses-material-design: true diff --git a/pkgs/objective_c/ffigen_c.yaml b/pkgs/objective_c/ffigen_c.yaml new file mode 100644 index 0000000000..a95e282937 --- /dev/null +++ b/pkgs/objective_c/ffigen_c.yaml @@ -0,0 +1,54 @@ +# Generate bindings for the C headers. +# Regenerate bindings with `dart run tool/generate_code.dart`. +name: CBindings +output: 'lib/src/c_bindings_generated.dart' +headers: + entry-points: + - 'src/include/dart_api_dl.h' + - 'src/objective_c.h' + - 'src/objective_c_runtime_types.h' + - 'src/objective_c_runtime_functions.h' +ffi-native: + assetId: 'objective_c.framework/objective_c' +exclude-all-by-default: true +generate-for-package-objective-c: true +functions: + include: + - 'objc_.*' + - 'sel_registerName' + - '_Block_.*' + - 'disposeObjCBlockWithClosure' + - 'Dart_InitializeApiDL' + leaf: + include: + - '(?!objc_msgSend).*' + rename: + 'sel_registerName': 'registerName' + 'objc_getClass': 'getClass' + 'objc_retain': 'objectRetain' + 'objc_release': 'objectRelease' + 'objc_msgSend': 'msgSend' + 'objc_msgSend_fpret': 'msgSendFpret' + 'objc_msgSend_stret': 'msgSendStret' + '_Block_copy': 'blockCopy' + '_Block_release': 'blockRelease' +globals: + include: + - _NSConcreteGlobalBlock + rename: + '_(.*)': '$1' +typedefs: + include: + - 'ObjC.*' +preamble: | + // Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file + // for details. All rights reserved. Use of this source code is governed by a + // BSD-style license that can be found in the LICENSE file. + + // Bindings for `src/objective_c.h` and `src/objective_c_runtime.h`. + // Regenerate bindings with `dart run tool/generate_code.dart`. + + // ignore_for_file: always_specify_types + // ignore_for_file: camel_case_types + // ignore_for_file: non_constant_identifier_names + // coverage:ignore-file diff --git a/pkgs/objective_c/ffigen_objc.yaml b/pkgs/objective_c/ffigen_objc.yaml new file mode 100644 index 0000000000..4be46b5502 --- /dev/null +++ b/pkgs/objective_c/ffigen_objc.yaml @@ -0,0 +1,56 @@ +# Generate bindings for the ObjC headers. +# Regenerate bindings with `dart run tool/generate_code.dart`. +name: ObjectiveCBindings +language: objc +output: 'lib/src/objective_c_bindings_generated.dart' +headers: + entry-points: + - 'src/foundation.h' +ffi-native: +exclude-all-by-default: true +generate-for-package-objective-c: true +objc-interfaces: + # Keep in sync with ffigen's ObjCBuiltInFunctions.builtInInterfaces. + include: + - NSArray + - NSCharacterSet + - NSCoder + - NSData + - NSDate + - NSDictionary + - NSEnumerator + - NSError + - NSIndexSet + - NSInvocation + - NSItemProvider + - NSLocale + - NSMethodSignature + - NSMutableArray + - NSMutableData + - NSMutableDictionary + - NSMutableSet + - NSMutableString + - NSNotification + - NSNumber + - NSObject + - NSProgress + - NSSet + - NSString + - NSURL + - NSURLHandle + - NSValue + - Protocol +preamble: | + // Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file + // for details. All rights reserved. Use of this source code is governed by a + // BSD-style license that can be found in the LICENSE file. + + // Bindings for `src/foundation.h`. + // Regenerate bindings with `dart run tool/generate_code.dart`. + + // ignore_for_file: always_specify_types + // ignore_for_file: camel_case_types + // ignore_for_file: non_constant_identifier_names + // coverage:ignore-file + + import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/objective_c/ios/Classes/objective_c.c b/pkgs/objective_c/ios/Classes/objective_c.c new file mode 100644 index 0000000000..83496a45f3 --- /dev/null +++ b/pkgs/objective_c/ios/Classes/objective_c.c @@ -0,0 +1,8 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Relative import to be able to reuse the C sources. +// See the comment in ../{projectName}}.podspec for more information. +#include "../../src/objective_c.c" +#include "../../src/include/dart_api_dl.c" diff --git a/pkgs/objective_c/ios/objective_c.podspec b/pkgs/objective_c/ios/objective_c.podspec new file mode 100644 index 0000000000..e784ccd7c0 --- /dev/null +++ b/pkgs/objective_c/ios/objective_c.podspec @@ -0,0 +1,28 @@ +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. +# Run `pod lib lint objective_c.podspec` to validate before publishing. +# +Pod::Spec.new do |s| + s.name = 'objective_c' + s.version = '0.0.1' + s.summary = 'A library to access Objective C from Flutter that acts as a support library for package:ffigen.' + s.description = <<-DESC +A library to access Objective C from Flutter that acts as a support library for package:ffigen. + DESC + s.homepage = 'http://example.com' + s.license = { :file => '../LICENSE' } + s.author = { 'Your Company' => 'email@example.com' } + + # This will ensure the source files in Classes/ are included in the native + # builds of apps using this FFI plugin. Podspec does not support relative + # paths, so Classes contains a forwarder C file that relatively imports + # `../src/*` so that the C sources can be shared among all target platforms. + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.dependency 'Flutter' + s.platform = :ios, '12.0' + + # Flutter.framework does not contain a i386 slice. + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } + s.swift_version = '5.0' +end diff --git a/pkgs/objective_c/lib/objective_c.dart b/pkgs/objective_c/lib/objective_c.dart new file mode 100644 index 0000000000..41f473af55 --- /dev/null +++ b/pkgs/objective_c/lib/objective_c.dart @@ -0,0 +1,48 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +export 'src/internal.dart' hide blockHasRegisteredClosure; +export 'src/ns_data.dart'; +export 'src/ns_string.dart'; +export 'src/c_bindings_generated.dart' + show + ObjCSelector, + ObjCObject, + ObjCBlock, + objectRetain, + objectRelease, + blockCopy, + blockRelease; + +// Keep in sync with pkgs/objective_c/ffigen_objc.yaml. +export 'src/objective_c_bindings_generated.dart' + show + NSArray, + NSCharacterSet, + NSCoder, + NSData, + NSDate, + NSDictionary, + NSEnumerator, + NSError, + NSIndexSet, + NSInvocation, + NSItemProvider, + NSLocale, + NSMethodSignature, + NSMutableArray, + NSMutableData, + NSMutableDictionary, + NSMutableSet, + NSMutableString, + NSNotification, + NSNumber, + NSObject, + NSProgress, + NSSet, + NSString, + NSURL, + NSURLHandle, + NSValue, + Protocol; diff --git a/pkgs/objective_c/lib/src/c_bindings_generated.dart b/pkgs/objective_c/lib/src/c_bindings_generated.dart new file mode 100644 index 0000000000..5f75847c1d --- /dev/null +++ b/pkgs/objective_c/lib/src/c_bindings_generated.dart @@ -0,0 +1,141 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Bindings for `src/objective_c.h` and `src/objective_c_runtime.h`. +// Regenerate bindings with `dart run tool/generate_code.dart`. + +// ignore_for_file: always_specify_types +// ignore_for_file: camel_case_types +// ignore_for_file: non_constant_identifier_names +// coverage:ignore-file + +// AUTO GENERATED FILE, DO NOT EDIT. +// +// Generated by `package:ffigen`. +// ignore_for_file: type=lint +@ffi.DefaultAsset('objective_c.framework/objective_c') +library; + +import 'dart:ffi' as ffi; + +/// \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`. +/// +/// Returns 0 on success. +@ffi.Native)>(isLeaf: true) +external int Dart_InitializeApiDL( + ffi.Pointer data, +); + +@ffi.Native)>(isLeaf: true) +external void disposeObjCBlockWithClosure( + ffi.Pointer block, +); + +@ffi.Native Function(ffi.Pointer)>( + symbol: "sel_registerName", isLeaf: true) +external ffi.Pointer registerName( + ffi.Pointer name, +); + +@ffi.Native Function(ffi.Pointer)>( + symbol: "objc_getClass", isLeaf: true) +external ffi.Pointer getClass( + ffi.Pointer name, +); + +@ffi.Native Function(ffi.Pointer)>( + symbol: "objc_retain", isLeaf: true) +external ffi.Pointer objectRetain( + ffi.Pointer object, +); + +@ffi.Native)>( + symbol: "objc_release", isLeaf: true) +external void objectRelease( + ffi.Pointer object, +); + +@ffi.Native(symbol: "objc_msgSend") +external void msgSend(); + +@ffi.Native(symbol: "objc_msgSend_fpret") +external void msgSendFpret(); + +@ffi.Native(symbol: "objc_msgSend_stret") +external void msgSendStret(); + +@ffi.Native>(symbol: "_NSConcreteGlobalBlock") +external final ffi.Pointer NSConcreteGlobalBlock; + +@ffi.Native Function(ffi.Pointer)>( + symbol: "_Block_copy", isLeaf: true) +external ffi.Pointer blockCopy( + ffi.Pointer object, +); + +@ffi.Native)>( + symbol: "_Block_release", isLeaf: true) +external void blockRelease( + ffi.Pointer object, +); + +typedef ObjCBlock = _ObjCBlock; + +final class _ObjCBlock extends ffi.Struct { + external ffi.Pointer isa; + + @ffi.Int() + external int flags; + + @ffi.Int() + external int reserved; + + external ffi.Pointer invoke; + + external ffi.Pointer descriptor; + + external ffi.Pointer target; + + @ffi.Int64() + external int dispose_port; +} + +typedef ObjCBlockDesc = _ObjCBlockDesc; + +final class _ObjCBlockDesc extends ffi.Struct { + @ffi.UnsignedLong() + external int reserved; + + @ffi.UnsignedLong() + external int size; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer dst, ffi.Pointer src)>> + copy_helper; + + external ffi + .Pointer src)>> + dispose_helper; + + external ffi.Pointer signature; +} + +typedef ObjCSelector = _ObjCSelector; + +final class _ObjCSelector extends ffi.Opaque {} + +typedef ObjCObject = _ObjCObject; + +final class _ObjCObject extends ffi.Opaque {} diff --git a/pkgs/objective_c/lib/src/internal.dart b/pkgs/objective_c/lib/src/internal.dart new file mode 100644 index 0000000000..1b2b02817f --- /dev/null +++ b/pkgs/objective_c/lib/src/internal.dart @@ -0,0 +1,211 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:ffi'; +import 'dart:isolate'; + +import 'package:ffi/ffi.dart'; + +import 'c_bindings_generated.dart' as c; + +/// Only for use by ffigen bindings. +Pointer registerName(String name) { + final cstr = name.toNativeUtf8(); + final sel = c.registerName(cstr.cast()); + calloc.free(cstr); + return sel; +} + +/// Only for use by ffigen bindings. +Pointer getClass(String name) { + final cstr = name.toNativeUtf8(); + final clazz = c.getClass(cstr.cast()); + calloc.free(cstr); + if (clazz == nullptr) { + throw Exception('Failed to load Objective-C class: $name'); + } + return clazz; +} + +/// Only for use by ffigen bindings. +final msgSendPointer = + Native.addressOf>(c.msgSend); + +/// Only for use by ffigen bindings. +final msgSendFpretPointer = + Native.addressOf>(c.msgSendFpret); + +/// Only for use by ffigen bindings. +final msgSendStretPointer = + Native.addressOf>(c.msgSendStret); + +/// Only for use by ffigen bindings. +final useMsgSendVariants = + Abi.current() == Abi.iosX64 || Abi.current() == Abi.macosX64; + +class _ObjCFinalizable implements Finalizable { + final Pointer _ptr; + bool _pendingRelease; + + _ObjCFinalizable(this._ptr, {required bool retain, required bool release}) + : _pendingRelease = release { + if (retain) { + _retain(_ptr.cast()); + } + if (release) { + _finalizer.attach(this, _ptr.cast(), detach: this); + } + } + + /// Releases the reference to the underlying ObjC object held by this wrapper. + /// Throws a StateError if this wrapper doesn't currently hold a reference. + void release() { + if (_pendingRelease) { + _pendingRelease = false; + _release(_ptr.cast()); + _finalizer.detach(this); + } else { + throw StateError( + 'Released an ObjC object that was unowned or already released.'); + } + } + + @override + bool operator ==(Object other) { + return other is _ObjCFinalizable && _ptr == other._ptr; + } + + @override + int get hashCode => _ptr.hashCode; + + /// Return a pointer to this object. + Pointer get pointer => _ptr; + + /// Retain a reference to this object and then return the pointer. This + /// reference must be released when you are done with it. If you wrap this + /// reference in another object, make sure to release it but not retain it: + /// `castFromPointer(lib, pointer, retain: false, release: true)` + Pointer retainAndReturnPointer() { + _retain(_ptr.cast()); + return _ptr; + } + + NativeFinalizer get _finalizer => throw UnimplementedError(); + void _retain(Pointer ptr) => throw UnimplementedError(); + void _release(Pointer ptr) => throw UnimplementedError(); +} + +/// Only for use by ffigen bindings. +class ObjCObjectBase extends _ObjCFinalizable { + ObjCObjectBase(super.ptr, {required super.retain, required super.release}); + + static final _objectFinalizer = NativeFinalizer( + Native.addressOf)>>( + c.objectRelease) + .cast()); + + @override + NativeFinalizer get _finalizer => _objectFinalizer; + + @override + void _retain(Pointer ptr) => c.objectRetain(ptr); + + @override + void _release(Pointer ptr) => c.objectRelease(ptr); +} + +/// Only for use by ffigen bindings. +class ObjCBlockBase extends _ObjCFinalizable { + ObjCBlockBase(super.ptr, {required super.retain, required super.release}); + + static final _blockFinalizer = NativeFinalizer( + Native.addressOf)>>( + c.blockRelease) + .cast()); + + @override + NativeFinalizer get _finalizer => _blockFinalizer; + + @override + void _retain(Pointer ptr) => c.blockCopy(ptr); + + @override + void _release(Pointer ptr) => c.blockRelease(ptr); +} + +Pointer _newBlockDesc( + Pointer)>> + disposeHelper) { + final desc = calloc.allocate(sizeOf()); + desc.ref.reserved = 0; + desc.ref.size = sizeOf(); + desc.ref.copy_helper = nullptr; + desc.ref.dispose_helper = disposeHelper.cast(); + desc.ref.signature = nullptr; + return desc; +} + +final _pointerBlockDesc = _newBlockDesc(nullptr); +final _closureBlockDesc = _newBlockDesc( + Native.addressOf)>>( + c.disposeObjCBlockWithClosure)); + +Pointer _newBlock(Pointer invoke, Pointer target, + Pointer descriptor, int disposePort, int flags) { + final b = calloc.allocate(sizeOf()); + b.ref.isa = c.NSConcreteGlobalBlock; + b.ref.flags = flags; + b.ref.reserved = 0; + b.ref.invoke = invoke; + b.ref.target = target; + b.ref.dispose_port = disposePort; + b.ref.descriptor = descriptor; + final copy = c.blockCopy(b.cast()).cast(); + calloc.free(b); + return copy; +} + +const int _blockHasCopyDispose = 1 << 25; + +/// Only for use by ffigen bindings. +Pointer newClosureBlock(Pointer invoke, Function fn) => + _newBlock(invoke, _registerBlockClosure(fn), _closureBlockDesc, + _blockClosureDisposer.sendPort.nativePort, _blockHasCopyDispose); + +/// Only for use by ffigen bindings. +Pointer newPointerBlock( + Pointer invoke, Pointer target) => + _newBlock(invoke, target, _pointerBlockDesc, 0, 0); + +final _blockClosureRegistry = {}; + +int _blockClosureRegistryLastId = 0; + +final _blockClosureDisposer = () { + c.Dart_InitializeApiDL(NativeApi.initializeApiDLData); + return RawReceivePort((dynamic msg) { + final id = msg as int; + assert(_blockClosureRegistry.containsKey(id)); + _blockClosureRegistry.remove(id); + }, "ObjCBlockClosureDisposer") + ..keepIsolateAlive = false; +}(); + +Pointer _registerBlockClosure(Function closure) { + ++_blockClosureRegistryLastId; + assert(!_blockClosureRegistry.containsKey(_blockClosureRegistryLastId)); + _blockClosureRegistry[_blockClosureRegistryLastId] = closure; + return Pointer.fromAddress(_blockClosureRegistryLastId); +} + +/// Only for use by ffigen bindings. +Function getBlockClosure(Pointer block) { + int id = block.ref.target.address; + assert(_blockClosureRegistry.containsKey(id)); + return _blockClosureRegistry[id]!; +} + +// Not exported by ../objective_c.dart, because it's only for testing. +bool blockHasRegisteredClosure(Pointer block) => + _blockClosureRegistry.containsKey(block.ref.target.address); diff --git a/pkgs/objective_c/lib/src/ns_data.dart b/pkgs/objective_c/lib/src/ns_data.dart new file mode 100644 index 0000000000..0284d97182 --- /dev/null +++ b/pkgs/objective_c/lib/src/ns_data.dart @@ -0,0 +1,50 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:ffi'; +import 'dart:typed_data'; + +import 'package:ffi/ffi.dart'; + +import 'objective_c_bindings_generated.dart'; + +extension NSDataExtensions on NSData { + /// Return the value of [bytes] at the given index. + /// + /// The returned value will be in the range 0 to 255. + int operator [](int index) { + IndexError.check(index, length, indexable: this); + return bytes.cast()[index]; + } + + /// Return a list containing the contents of the [NSData]. + Uint8List toList() { + if (bytes.address == 0 || length == 0) { + return Uint8List(0); + } else { + return Uint8List.fromList(bytes.cast().asTypedList(length)); + } + } +} + +extension NSDataListExtension on List { + /// Return a [NSData] containing the contents of the [List] interpreted as + /// bytes. + /// + /// The elements of the [List] should be integers in the range 0 to 255. Any + /// integer, which is not in that range, is converted to a byte as if by + /// `value.toUnsigned(8)`. + NSData toNSData() { + if (length == 0) { + return NSData.new1(); + } + final buffer = malloc(length); + buffer.asTypedList(length).setAll(0, this); + + final nsData = NSData.dataWithBytes_length_(buffer.cast(), length); + malloc.free(buffer); + + return nsData; + } +} diff --git a/pkgs/objective_c/lib/src/ns_string.dart b/pkgs/objective_c/lib/src/ns_string.dart new file mode 100644 index 0000000000..7211803161 --- /dev/null +++ b/pkgs/objective_c/lib/src/ns_string.dart @@ -0,0 +1,9 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'objective_c_bindings_generated.dart'; + +extension StringToNSString on String { + NSString toNSString() => NSString(this); +} diff --git a/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart b/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart new file mode 100644 index 0000000000..2654022899 --- /dev/null +++ b/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart @@ -0,0 +1,15706 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Bindings for `src/foundation.h`. +// Regenerate bindings with `dart run tool/generate_code.dart`. + +// ignore_for_file: always_specify_types +// ignore_for_file: camel_case_types +// ignore_for_file: non_constant_identifier_names +// coverage:ignore-file + +import 'package:ffi/ffi.dart' as pkg_ffi; + +// AUTO GENERATED FILE, DO NOT EDIT. +// +// Generated by `package:ffigen`. +// ignore_for_file: type=lint +import 'dart:ffi' as ffi; +import '../objective_c.dart' as objc; + +class NSObject extends objc.ObjCObjectBase { + NSObject._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [NSObject] that points to the same underlying object as [other]. + NSObject.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSObject] that wraps the given raw object pointer. + NSObject.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSObject]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSObject); + } + + static void load() { + _objc_msgSend_1(_class_NSObject, _sel_load); + } + + static void initialize() { + _objc_msgSend_1(_class_NSObject, _sel_initialize); + } + + NSObject init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject new1() { + final _ret = _objc_msgSend_2(_class_NSObject, _sel_new); + return NSObject.castFromPointer(_ret, retain: false, release: true); + } + + static NSObject allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSObject, _sel_allocWithZone_, zone); + return NSObject.castFromPointer(_ret, retain: false, release: true); + } + + static NSObject alloc() { + final _ret = _objc_msgSend_2(_class_NSObject, _sel_alloc); + return NSObject.castFromPointer(_ret, retain: false, release: true); + } + + void dealloc() { + _objc_msgSend_1(this.pointer, _sel_dealloc); + } + + void finalize() { + _objc_msgSend_1(this.pointer, _sel_finalize); + } + + NSObject copy() { + final _ret = _objc_msgSend_2(this.pointer, _sel_copy); + return NSObject.castFromPointer(_ret, retain: false, release: true); + } + + NSObject mutableCopy() { + final _ret = _objc_msgSend_2(this.pointer, _sel_mutableCopy); + return NSObject.castFromPointer(_ret, retain: false, release: true); + } + + static NSObject copyWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSObject, _sel_copyWithZone_, zone); + return NSObject.castFromPointer(_ret, retain: false, release: true); + } + + static NSObject mutableCopyWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_3(_class_NSObject, _sel_mutableCopyWithZone_, zone); + return NSObject.castFromPointer(_ret, retain: false, release: true); + } + + static bool instancesRespondToSelector_( + ffi.Pointer aSelector) { + return _objc_msgSend_4( + _class_NSObject, _sel_instancesRespondToSelector_, aSelector); + } + + static bool conformsToProtocol_(Protocol protocol) { + return _objc_msgSend_5( + _class_NSObject, _sel_conformsToProtocol_, protocol.pointer); + } + + ffi.Pointer> methodForSelector_( + ffi.Pointer aSelector) { + return _objc_msgSend_6(this.pointer, _sel_methodForSelector_, aSelector); + } + + static ffi.Pointer> + instanceMethodForSelector_(ffi.Pointer aSelector) { + return _objc_msgSend_6( + _class_NSObject, _sel_instanceMethodForSelector_, aSelector); + } + + void doesNotRecognizeSelector_(ffi.Pointer aSelector) { + _objc_msgSend_7(this.pointer, _sel_doesNotRecognizeSelector_, aSelector); + } + + NSObject forwardingTargetForSelector_( + ffi.Pointer aSelector) { + final _ret = _objc_msgSend_8( + this.pointer, _sel_forwardingTargetForSelector_, aSelector); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + void forwardInvocation_(NSInvocation anInvocation) { + _objc_msgSend_9( + this.pointer, _sel_forwardInvocation_, anInvocation.pointer); + } + + NSMethodSignature methodSignatureForSelector_( + ffi.Pointer aSelector) { + final _ret = _objc_msgSend_10( + this.pointer, _sel_methodSignatureForSelector_, aSelector); + return NSMethodSignature.castFromPointer(_ret, retain: true, release: true); + } + + static NSMethodSignature instanceMethodSignatureForSelector_( + ffi.Pointer aSelector) { + final _ret = _objc_msgSend_10( + _class_NSObject, _sel_instanceMethodSignatureForSelector_, aSelector); + return NSMethodSignature.castFromPointer(_ret, retain: true, release: true); + } + + bool allowsWeakReference() { + return _objc_msgSend_11(this.pointer, _sel_allowsWeakReference); + } + + bool retainWeakReference() { + return _objc_msgSend_11(this.pointer, _sel_retainWeakReference); + } + + static bool isSubclassOfClass_(NSObject aClass) { + return _objc_msgSend_0( + _class_NSObject, _sel_isSubclassOfClass_, aClass.pointer); + } + + static bool resolveClassMethod_(ffi.Pointer sel) { + return _objc_msgSend_4(_class_NSObject, _sel_resolveClassMethod_, sel); + } + + static bool resolveInstanceMethod_(ffi.Pointer sel) { + return _objc_msgSend_4(_class_NSObject, _sel_resolveInstanceMethod_, sel); + } + + static int hash() { + return _objc_msgSend_12(_class_NSObject, _sel_hash); + } + + static NSObject superclass() { + final _ret = _objc_msgSend_2(_class_NSObject, _sel_superclass); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject class1() { + final _ret = _objc_msgSend_2(_class_NSObject, _sel_class); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSString description() { + final _ret = _objc_msgSend_32(_class_NSObject, _sel_description); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString debugDescription() { + final _ret = _objc_msgSend_32(_class_NSObject, _sel_debugDescription); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + static int version() { + return _objc_msgSend_86(_class_NSObject, _sel_version); + } + + static void setVersion_(int aVersion) { + _objc_msgSend_284(_class_NSObject, _sel_setVersion_, aVersion); + } + + NSObject get classForCoder { + final _ret = _objc_msgSend_2(this.pointer, _sel_classForCoder); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? replacementObjectForCoder_(NSCoder coder) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_replacementObjectForCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? awakeAfterUsingCoder_(NSCoder coder) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_awakeAfterUsingCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: false, release: true); + } + + static void poseAsClass_(NSObject aClass) { + _objc_msgSend_198(_class_NSObject, _sel_poseAsClass_, aClass.pointer); + } + + NSObject get autoContentAccessingProxy { + final _ret = _objc_msgSend_2(this.pointer, _sel_autoContentAccessingProxy); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + void URL_resourceDataDidBecomeAvailable_(NSURL sender, NSData newBytes) { + _objc_msgSend_285(this.pointer, _sel_URL_resourceDataDidBecomeAvailable_, + sender.pointer, newBytes.pointer); + } + + void URLResourceDidFinishLoading_(NSURL sender) { + _objc_msgSend_286( + this.pointer, _sel_URLResourceDidFinishLoading_, sender.pointer); + } + + void URLResourceDidCancelLoading_(NSURL sender) { + _objc_msgSend_286( + this.pointer, _sel_URLResourceDidCancelLoading_, sender.pointer); + } + + void URL_resourceDidFailLoadingWithReason_(NSURL sender, NSString reason) { + _objc_msgSend_287(this.pointer, _sel_URL_resourceDidFailLoadingWithReason_, + sender.pointer, reason.pointer); + } +} + +late final _class_NSObject = objc.getClass("NSObject"); +late final _sel_load = objc.registerName("load"); +final _objc_msgSend_1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initialize = objc.registerName("initialize"); +typedef instancetype = ffi.Pointer; +typedef Dartinstancetype = NSObject; +late final _sel_init = objc.registerName("init"); +final _objc_msgSend_2 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_new = objc.registerName("new"); + +final class _NSZone extends ffi.Opaque {} + +late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); +final _objc_msgSend_3 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_NSZone>)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_NSZone>)>(); +late final _sel_alloc = objc.registerName("alloc"); +late final _sel_dealloc = objc.registerName("dealloc"); +late final _sel_finalize = objc.registerName("finalize"); +late final _sel_copy = objc.registerName("copy"); +late final _sel_mutableCopy = objc.registerName("mutableCopy"); +late final _sel_copyWithZone_ = objc.registerName("copyWithZone:"); +late final _sel_mutableCopyWithZone_ = + objc.registerName("mutableCopyWithZone:"); +late final _sel_instancesRespondToSelector_ = + objc.registerName("instancesRespondToSelector:"); +final _objc_msgSend_4 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class Protocol extends objc.ObjCObjectBase { + Protocol._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [Protocol] that points to the same underlying object as [other]. + Protocol.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [Protocol] that wraps the given raw object pointer. + Protocol.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [Protocol]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_Protocol); + } +} + +late final _class_Protocol = objc.getClass("Protocol"); +final _objc_msgSend_0 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); +late final _sel_conformsToProtocol_ = objc.registerName("conformsToProtocol:"); +final _objc_msgSend_5 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_methodForSelector_ = objc.registerName("methodForSelector:"); +final _objc_msgSend_6 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer> Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer> Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_instanceMethodForSelector_ = + objc.registerName("instanceMethodForSelector:"); +late final _sel_doesNotRecognizeSelector_ = + objc.registerName("doesNotRecognizeSelector:"); +final _objc_msgSend_7 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_forwardingTargetForSelector_ = + objc.registerName("forwardingTargetForSelector:"); +final _objc_msgSend_8 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class NSInvocation extends objc.ObjCObjectBase { + NSInvocation._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [NSInvocation] that points to the same underlying object as [other]. + NSInvocation.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSInvocation] that wraps the given raw object pointer. + NSInvocation.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSInvocation]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSInvocation); + } +} + +late final _class_NSInvocation = objc.getClass("NSInvocation"); +late final _sel_forwardInvocation_ = objc.registerName("forwardInvocation:"); +final _objc_msgSend_9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class NSMethodSignature extends objc.ObjCObjectBase { + NSMethodSignature._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [NSMethodSignature] that points to the same underlying object as [other]. + NSMethodSignature.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSMethodSignature] that wraps the given raw object pointer. + NSMethodSignature.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSMethodSignature]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMethodSignature); + } +} + +late final _class_NSMethodSignature = objc.getClass("NSMethodSignature"); +late final _sel_methodSignatureForSelector_ = + objc.registerName("methodSignatureForSelector:"); +final _objc_msgSend_10 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_instanceMethodSignatureForSelector_ = + objc.registerName("instanceMethodSignatureForSelector:"); +late final _sel_allowsWeakReference = objc.registerName("allowsWeakReference"); +final _objc_msgSend_11 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_retainWeakReference = objc.registerName("retainWeakReference"); +late final _sel_isSubclassOfClass_ = objc.registerName("isSubclassOfClass:"); +late final _sel_resolveClassMethod_ = objc.registerName("resolveClassMethod:"); +late final _sel_resolveInstanceMethod_ = + objc.registerName("resolveInstanceMethod:"); +late final _sel_hash = objc.registerName("hash"); +final _objc_msgSend_12 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_superclass = objc.registerName("superclass"); +late final _sel_class = objc.registerName("class"); + +class NSString extends NSObject { + factory NSString(String str) { + final cstr = str.toNativeUtf16(); + final nsstr = stringWithCharacters_length_(cstr.cast(), str.length); + pkg_ffi.calloc.free(cstr); + return nsstr; + } + + @override + String toString() { + final data = + dataUsingEncoding_(0x94000100 /* NSUTF16LittleEndianStringEncoding */); + return data!.bytes.cast().toDartString(length: length); + } + + NSString._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSString] that points to the same underlying object as [other]. + NSString.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSString] that wraps the given raw object pointer. + NSString.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSString]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSString); + } + + int get length { + return _objc_msgSend_12(this.pointer, _sel_length); + } + + int characterAtIndex_(int index) { + return _objc_msgSend_13(this.pointer, _sel_characterAtIndex_, index); + } + + @override + NSString init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString substringFromIndex_(int from) { + final _ret = _objc_msgSend_15(this.pointer, _sel_substringFromIndex_, from); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString substringToIndex_(int to) { + final _ret = _objc_msgSend_15(this.pointer, _sel_substringToIndex_, to); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString substringWithRange_(_NSRange range) { + final _ret = + _objc_msgSend_16(this.pointer, _sel_substringWithRange_, range); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + void getCharacters_range_( + ffi.Pointer buffer, _NSRange range) { + _objc_msgSend_17(this.pointer, _sel_getCharacters_range_, buffer, range); + } + + int compare_(NSString string) { + return _objc_msgSend_18(this.pointer, _sel_compare_, string.pointer); + } + + int compare_options_(NSString string, int mask) { + return _objc_msgSend_19( + this.pointer, _sel_compare_options_, string.pointer, mask); + } + + int compare_options_range_( + NSString string, int mask, _NSRange rangeOfReceiverToCompare) { + return _objc_msgSend_20(this.pointer, _sel_compare_options_range_, + string.pointer, mask, rangeOfReceiverToCompare); + } + + int compare_options_range_locale_(NSString string, int mask, + _NSRange rangeOfReceiverToCompare, NSObject? locale) { + return _objc_msgSend_21( + this.pointer, + _sel_compare_options_range_locale_, + string.pointer, + mask, + rangeOfReceiverToCompare, + locale?.pointer ?? ffi.nullptr); + } + + int caseInsensitiveCompare_(NSString string) { + return _objc_msgSend_18( + this.pointer, _sel_caseInsensitiveCompare_, string.pointer); + } + + int localizedCompare_(NSString string) { + return _objc_msgSend_18( + this.pointer, _sel_localizedCompare_, string.pointer); + } + + int localizedCaseInsensitiveCompare_(NSString string) { + return _objc_msgSend_18( + this.pointer, _sel_localizedCaseInsensitiveCompare_, string.pointer); + } + + int localizedStandardCompare_(NSString string) { + return _objc_msgSend_18( + this.pointer, _sel_localizedStandardCompare_, string.pointer); + } + + bool isEqualToString_(NSString aString) { + return _objc_msgSend_22( + this.pointer, _sel_isEqualToString_, aString.pointer); + } + + bool hasPrefix_(NSString str) { + return _objc_msgSend_22(this.pointer, _sel_hasPrefix_, str.pointer); + } + + bool hasSuffix_(NSString str) { + return _objc_msgSend_22(this.pointer, _sel_hasSuffix_, str.pointer); + } + + NSString commonPrefixWithString_options_(NSString str, int mask) { + final _ret = _objc_msgSend_23( + this.pointer, _sel_commonPrefixWithString_options_, str.pointer, mask); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + bool containsString_(NSString str) { + return _objc_msgSend_22(this.pointer, _sel_containsString_, str.pointer); + } + + bool localizedCaseInsensitiveContainsString_(NSString str) { + return _objc_msgSend_22(this.pointer, + _sel_localizedCaseInsensitiveContainsString_, str.pointer); + } + + bool localizedStandardContainsString_(NSString str) { + return _objc_msgSend_22( + this.pointer, _sel_localizedStandardContainsString_, str.pointer); + } + + void localizedStandardRangeOfString_( + ffi.Pointer<_NSRange> stret, NSString str) { + objc.useMsgSendVariants + ? _objc_msgSend_24Stret(stret, this.pointer, + _sel_localizedStandardRangeOfString_, str.pointer) + : stret.ref = _objc_msgSend_24( + this.pointer, _sel_localizedStandardRangeOfString_, str.pointer); + } + + void rangeOfString_(ffi.Pointer<_NSRange> stret, NSString searchString) { + objc.useMsgSendVariants + ? _objc_msgSend_24Stret( + stret, this.pointer, _sel_rangeOfString_, searchString.pointer) + : stret.ref = _objc_msgSend_24( + this.pointer, _sel_rangeOfString_, searchString.pointer); + } + + void rangeOfString_options_( + ffi.Pointer<_NSRange> stret, NSString searchString, int mask) { + objc.useMsgSendVariants + ? _objc_msgSend_25Stret(stret, this.pointer, + _sel_rangeOfString_options_, searchString.pointer, mask) + : stret.ref = _objc_msgSend_25(this.pointer, + _sel_rangeOfString_options_, searchString.pointer, mask); + } + + void rangeOfString_options_range_(ffi.Pointer<_NSRange> stret, + NSString searchString, int mask, _NSRange rangeOfReceiverToSearch) { + objc.useMsgSendVariants + ? _objc_msgSend_26Stret( + stret, + this.pointer, + _sel_rangeOfString_options_range_, + searchString.pointer, + mask, + rangeOfReceiverToSearch) + : stret.ref = _objc_msgSend_26( + this.pointer, + _sel_rangeOfString_options_range_, + searchString.pointer, + mask, + rangeOfReceiverToSearch); + } + + void rangeOfString_options_range_locale_( + ffi.Pointer<_NSRange> stret, + NSString searchString, + int mask, + _NSRange rangeOfReceiverToSearch, + NSLocale? locale) { + objc.useMsgSendVariants + ? _objc_msgSend_27Stret( + stret, + this.pointer, + _sel_rangeOfString_options_range_locale_, + searchString.pointer, + mask, + rangeOfReceiverToSearch, + locale?.pointer ?? ffi.nullptr) + : stret.ref = _objc_msgSend_27( + this.pointer, + _sel_rangeOfString_options_range_locale_, + searchString.pointer, + mask, + rangeOfReceiverToSearch, + locale?.pointer ?? ffi.nullptr); + } + + void rangeOfCharacterFromSet_( + ffi.Pointer<_NSRange> stret, NSCharacterSet searchSet) { + objc.useMsgSendVariants + ? _objc_msgSend_229Stret(stret, this.pointer, + _sel_rangeOfCharacterFromSet_, searchSet.pointer) + : stret.ref = _objc_msgSend_229( + this.pointer, _sel_rangeOfCharacterFromSet_, searchSet.pointer); + } + + void rangeOfCharacterFromSet_options_( + ffi.Pointer<_NSRange> stret, NSCharacterSet searchSet, int mask) { + objc.useMsgSendVariants + ? _objc_msgSend_230Stret(stret, this.pointer, + _sel_rangeOfCharacterFromSet_options_, searchSet.pointer, mask) + : stret.ref = _objc_msgSend_230(this.pointer, + _sel_rangeOfCharacterFromSet_options_, searchSet.pointer, mask); + } + + void rangeOfCharacterFromSet_options_range_(ffi.Pointer<_NSRange> stret, + NSCharacterSet searchSet, int mask, _NSRange rangeOfReceiverToSearch) { + objc.useMsgSendVariants + ? _objc_msgSend_231Stret( + stret, + this.pointer, + _sel_rangeOfCharacterFromSet_options_range_, + searchSet.pointer, + mask, + rangeOfReceiverToSearch) + : stret.ref = _objc_msgSend_231( + this.pointer, + _sel_rangeOfCharacterFromSet_options_range_, + searchSet.pointer, + mask, + rangeOfReceiverToSearch); + } + + void rangeOfComposedCharacterSequenceAtIndex_( + ffi.Pointer<_NSRange> stret, int index) { + objc.useMsgSendVariants + ? _objc_msgSend_232Stret(stret, this.pointer, + _sel_rangeOfComposedCharacterSequenceAtIndex_, index) + : stret.ref = _objc_msgSend_232( + this.pointer, _sel_rangeOfComposedCharacterSequenceAtIndex_, index); + } + + void rangeOfComposedCharacterSequencesForRange_( + ffi.Pointer<_NSRange> stret, _NSRange range) { + objc.useMsgSendVariants + ? _objc_msgSend_233Stret(stret, this.pointer, + _sel_rangeOfComposedCharacterSequencesForRange_, range) + : stret.ref = _objc_msgSend_233(this.pointer, + _sel_rangeOfComposedCharacterSequencesForRange_, range); + } + + NSString stringByAppendingString_(NSString aString) { + final _ret = _objc_msgSend_101( + this.pointer, _sel_stringByAppendingString_, aString.pointer); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString stringByAppendingFormat_(NSString format) { + final _ret = _objc_msgSend_101( + this.pointer, _sel_stringByAppendingFormat_, format.pointer); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + double get doubleValue { + return objc.useMsgSendVariants + ? _objc_msgSend_90Fpret(this.pointer, _sel_doubleValue) + : _objc_msgSend_90(this.pointer, _sel_doubleValue); + } + + double get floatValue { + return objc.useMsgSendVariants + ? _objc_msgSend_89Fpret(this.pointer, _sel_floatValue) + : _objc_msgSend_89(this.pointer, _sel_floatValue); + } + + int get intValue { + return _objc_msgSend_84(this.pointer, _sel_intValue); + } + + int get integerValue { + return _objc_msgSend_86(this.pointer, _sel_integerValue); + } + + int get longLongValue { + return _objc_msgSend_87(this.pointer, _sel_longLongValue); + } + + bool get boolValue { + return _objc_msgSend_11(this.pointer, _sel_boolValue); + } + + NSString get uppercaseString { + final _ret = _objc_msgSend_32(this.pointer, _sel_uppercaseString); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString get lowercaseString { + final _ret = _objc_msgSend_32(this.pointer, _sel_lowercaseString); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString get capitalizedString { + final _ret = _objc_msgSend_32(this.pointer, _sel_capitalizedString); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString get localizedUppercaseString { + final _ret = _objc_msgSend_32(this.pointer, _sel_localizedUppercaseString); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString get localizedLowercaseString { + final _ret = _objc_msgSend_32(this.pointer, _sel_localizedLowercaseString); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString get localizedCapitalizedString { + final _ret = + _objc_msgSend_32(this.pointer, _sel_localizedCapitalizedString); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString uppercaseStringWithLocale_(NSLocale? locale) { + final _ret = _objc_msgSend_234(this.pointer, + _sel_uppercaseStringWithLocale_, locale?.pointer ?? ffi.nullptr); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString lowercaseStringWithLocale_(NSLocale? locale) { + final _ret = _objc_msgSend_234(this.pointer, + _sel_lowercaseStringWithLocale_, locale?.pointer ?? ffi.nullptr); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString capitalizedStringWithLocale_(NSLocale? locale) { + final _ret = _objc_msgSend_234(this.pointer, + _sel_capitalizedStringWithLocale_, locale?.pointer ?? ffi.nullptr); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + void getLineStart_end_contentsEnd_forRange_( + ffi.Pointer startPtr, + ffi.Pointer lineEndPtr, + ffi.Pointer contentsEndPtr, + _NSRange range) { + _objc_msgSend_235(this.pointer, _sel_getLineStart_end_contentsEnd_forRange_, + startPtr, lineEndPtr, contentsEndPtr, range); + } + + void lineRangeForRange_(ffi.Pointer<_NSRange> stret, _NSRange range) { + objc.useMsgSendVariants + ? _objc_msgSend_233Stret( + stret, this.pointer, _sel_lineRangeForRange_, range) + : stret.ref = + _objc_msgSend_233(this.pointer, _sel_lineRangeForRange_, range); + } + + void getParagraphStart_end_contentsEnd_forRange_( + ffi.Pointer startPtr, + ffi.Pointer parEndPtr, + ffi.Pointer contentsEndPtr, + _NSRange range) { + _objc_msgSend_235( + this.pointer, + _sel_getParagraphStart_end_contentsEnd_forRange_, + startPtr, + parEndPtr, + contentsEndPtr, + range); + } + + void paragraphRangeForRange_(ffi.Pointer<_NSRange> stret, _NSRange range) { + objc.useMsgSendVariants + ? _objc_msgSend_233Stret( + stret, this.pointer, _sel_paragraphRangeForRange_, range) + : stret.ref = _objc_msgSend_233( + this.pointer, _sel_paragraphRangeForRange_, range); + } + + void enumerateSubstringsInRange_options_usingBlock_(_NSRange range, int opts, + ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool block) { + _objc_msgSend_236( + this.pointer, + _sel_enumerateSubstringsInRange_options_usingBlock_, + range, + opts, + block.pointer); + } + + void enumerateLinesUsingBlock_(ObjCBlock_ffiVoid_NSString_bool block) { + _objc_msgSend_237( + this.pointer, _sel_enumerateLinesUsingBlock_, block.pointer); + } + + ffi.Pointer get UTF8String { + return _objc_msgSend_57(this.pointer, _sel_UTF8String); + } + + int get fastestEncoding { + return _objc_msgSend_12(this.pointer, _sel_fastestEncoding); + } + + int get smallestEncoding { + return _objc_msgSend_12(this.pointer, _sel_smallestEncoding); + } + + NSData? dataUsingEncoding_allowLossyConversion_(int encoding, bool lossy) { + final _ret = _objc_msgSend_238(this.pointer, + _sel_dataUsingEncoding_allowLossyConversion_, encoding, lossy); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData? dataUsingEncoding_(int encoding) { + final _ret = + _objc_msgSend_239(this.pointer, _sel_dataUsingEncoding_, encoding); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + bool canBeConvertedToEncoding_(int encoding) { + return _objc_msgSend_121( + this.pointer, _sel_canBeConvertedToEncoding_, encoding); + } + + ffi.Pointer cStringUsingEncoding_(int encoding) { + return _objc_msgSend_240( + this.pointer, _sel_cStringUsingEncoding_, encoding); + } + + bool getCString_maxLength_encoding_( + ffi.Pointer buffer, int maxBufferCount, int encoding) { + return _objc_msgSend_241(this.pointer, _sel_getCString_maxLength_encoding_, + buffer, maxBufferCount, encoding); + } + + bool getBytes_maxLength_usedLength_encoding_options_range_remainingRange_( + ffi.Pointer buffer, + int maxBufferCount, + ffi.Pointer usedBufferCount, + int encoding, + int options, + _NSRange range, + ffi.Pointer<_NSRange> leftover) { + return _objc_msgSend_242( + this.pointer, + _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_, + buffer, + maxBufferCount, + usedBufferCount, + encoding, + options, + range, + leftover); + } + + int maximumLengthOfBytesUsingEncoding_(int enc) { + return _objc_msgSend_118( + this.pointer, _sel_maximumLengthOfBytesUsingEncoding_, enc); + } + + int lengthOfBytesUsingEncoding_(int enc) { + return _objc_msgSend_118( + this.pointer, _sel_lengthOfBytesUsingEncoding_, enc); + } + + static ffi.Pointer getAvailableStringEncodings() { + return _objc_msgSend_243(_class_NSString, _sel_availableStringEncodings); + } + + static NSString localizedNameOfStringEncoding_(int encoding) { + final _ret = _objc_msgSend_15( + _class_NSString, _sel_localizedNameOfStringEncoding_, encoding); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + static int getDefaultCStringEncoding() { + return _objc_msgSend_12(_class_NSString, _sel_defaultCStringEncoding); + } + + NSString get decomposedStringWithCanonicalMapping { + final _ret = _objc_msgSend_32( + this.pointer, _sel_decomposedStringWithCanonicalMapping); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString get precomposedStringWithCanonicalMapping { + final _ret = _objc_msgSend_32( + this.pointer, _sel_precomposedStringWithCanonicalMapping); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString get decomposedStringWithCompatibilityMapping { + final _ret = _objc_msgSend_32( + this.pointer, _sel_decomposedStringWithCompatibilityMapping); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString get precomposedStringWithCompatibilityMapping { + final _ret = _objc_msgSend_32( + this.pointer, _sel_precomposedStringWithCompatibilityMapping); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSArray componentsSeparatedByString_(NSString separator) { + final _ret = _objc_msgSend_244( + this.pointer, _sel_componentsSeparatedByString_, separator.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray componentsSeparatedByCharactersInSet_(NSCharacterSet separator) { + final _ret = _objc_msgSend_245(this.pointer, + _sel_componentsSeparatedByCharactersInSet_, separator.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSString stringByTrimmingCharactersInSet_(NSCharacterSet set) { + final _ret = _objc_msgSend_246( + this.pointer, _sel_stringByTrimmingCharactersInSet_, set.pointer); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString stringByPaddingToLength_withString_startingAtIndex_( + int newLength, NSString padString, int padIndex) { + final _ret = _objc_msgSend_247( + this.pointer, + _sel_stringByPaddingToLength_withString_startingAtIndex_, + newLength, + padString.pointer, + padIndex); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString stringByFoldingWithOptions_locale_(int options, NSLocale? locale) { + final _ret = _objc_msgSend_248( + this.pointer, + _sel_stringByFoldingWithOptions_locale_, + options, + locale?.pointer ?? ffi.nullptr); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString stringByReplacingOccurrencesOfString_withString_options_range_( + NSString target, + NSString replacement, + int options, + _NSRange searchRange) { + final _ret = _objc_msgSend_249( + this.pointer, + _sel_stringByReplacingOccurrencesOfString_withString_options_range_, + target.pointer, + replacement.pointer, + options, + searchRange); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString stringByReplacingOccurrencesOfString_withString_( + NSString target, NSString replacement) { + final _ret = _objc_msgSend_250( + this.pointer, + _sel_stringByReplacingOccurrencesOfString_withString_, + target.pointer, + replacement.pointer); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString stringByReplacingCharactersInRange_withString_( + _NSRange range, NSString replacement) { + final _ret = _objc_msgSend_251( + this.pointer, + _sel_stringByReplacingCharactersInRange_withString_, + range, + replacement.pointer); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? stringByApplyingTransform_reverse_( + NSString transform, bool reverse) { + final _ret = _objc_msgSend_252(this.pointer, + _sel_stringByApplyingTransform_reverse_, transform.pointer, reverse); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + bool writeToURL_atomically_encoding_error_(NSURL url, bool useAuxiliaryFile, + int enc, ffi.Pointer> error) { + return _objc_msgSend_253( + this.pointer, + _sel_writeToURL_atomically_encoding_error_, + url.pointer, + useAuxiliaryFile, + enc, + error); + } + + bool writeToFile_atomically_encoding_error_( + NSString path, + bool useAuxiliaryFile, + int enc, + ffi.Pointer> error) { + return _objc_msgSend_254( + this.pointer, + _sel_writeToFile_atomically_encoding_error_, + path.pointer, + useAuxiliaryFile, + enc, + error); + } + + NSString get description { + final _ret = _objc_msgSend_32(this.pointer, _sel_description); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + int get hash { + return _objc_msgSend_12(this.pointer, _sel_hash); + } + + NSString initWithCharactersNoCopy_length_freeWhenDone_( + ffi.Pointer characters, int length, bool freeBuffer) { + final _ret = _objc_msgSend_255( + this.pointer, + _sel_initWithCharactersNoCopy_length_freeWhenDone_, + characters, + length, + freeBuffer); + return NSString.castFromPointer(_ret, retain: false, release: true); + } + + NSString initWithCharactersNoCopy_length_deallocator_( + ffi.Pointer chars, + int len, + ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong? deallocator) { + final _ret = _objc_msgSend_256( + this.pointer, + _sel_initWithCharactersNoCopy_length_deallocator_, + chars, + len, + deallocator?.pointer ?? ffi.nullptr); + return NSString.castFromPointer(_ret, retain: false, release: true); + } + + NSString initWithCharacters_length_( + ffi.Pointer characters, int length) { + final _ret = _objc_msgSend_257( + this.pointer, _sel_initWithCharacters_length_, characters, length); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithUTF8String_(ffi.Pointer nullTerminatedCString) { + final _ret = _objc_msgSend_258( + this.pointer, _sel_initWithUTF8String_, nullTerminatedCString); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString initWithString_(NSString aString) { + final _ret = + _objc_msgSend_42(this.pointer, _sel_initWithString_, aString.pointer); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString initWithFormat_(NSString format) { + final _ret = + _objc_msgSend_42(this.pointer, _sel_initWithFormat_, format.pointer); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString initWithFormat_arguments_( + NSString format, ffi.Pointer<__va_list_tag> argList) { + final _ret = _objc_msgSend_259( + this.pointer, _sel_initWithFormat_arguments_, format.pointer, argList); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString initWithFormat_locale_(NSString format, NSObject? locale) { + final _ret = _objc_msgSend_260(this.pointer, _sel_initWithFormat_locale_, + format.pointer, locale?.pointer ?? ffi.nullptr); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString initWithFormat_locale_arguments_( + NSString format, NSObject? locale, ffi.Pointer<__va_list_tag> argList) { + final _ret = _objc_msgSend_261( + this.pointer, + _sel_initWithFormat_locale_arguments_, + format.pointer, + locale?.pointer ?? ffi.nullptr, + argList); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithValidatedFormat_validFormatSpecifiers_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _objc_msgSend_262( + this.pointer, + _sel_initWithValidatedFormat_validFormatSpecifiers_error_, + format.pointer, + validFormatSpecifiers.pointer, + error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( + NSString format, + NSString validFormatSpecifiers, + NSObject? locale, + ffi.Pointer> error) { + final _ret = _objc_msgSend_263( + this.pointer, + _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_, + format.pointer, + validFormatSpecifiers.pointer, + locale?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithValidatedFormat_validFormatSpecifiers_arguments_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer<__va_list_tag> argList, + ffi.Pointer> error) { + final _ret = _objc_msgSend_264( + this.pointer, + _sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_, + format.pointer, + validFormatSpecifiers.pointer, + argList, + error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? + initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( + NSString format, + NSString validFormatSpecifiers, + NSObject? locale, + ffi.Pointer<__va_list_tag> argList, + ffi.Pointer> error) { + final _ret = _objc_msgSend_265( + this.pointer, + _sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_, + format.pointer, + validFormatSpecifiers.pointer, + locale?.pointer ?? ffi.nullptr, + argList, + error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithData_encoding_(NSData data, int encoding) { + final _ret = _objc_msgSend_266( + this.pointer, _sel_initWithData_encoding_, data.pointer, encoding); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithBytes_length_encoding_( + ffi.Pointer bytes, int len, int encoding) { + final _ret = _objc_msgSend_267(this.pointer, + _sel_initWithBytes_length_encoding_, bytes, len, encoding); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithBytesNoCopy_length_encoding_freeWhenDone_( + ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { + final _ret = _objc_msgSend_268( + this.pointer, + _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_, + bytes, + len, + encoding, + freeBuffer); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: false, release: true); + } + + NSString? initWithBytesNoCopy_length_encoding_deallocator_( + ffi.Pointer bytes, + int len, + int encoding, + ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { + final _ret = _objc_msgSend_269( + this.pointer, + _sel_initWithBytesNoCopy_length_encoding_deallocator_, + bytes, + len, + encoding, + deallocator?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: false, release: true); + } + + static NSString string() { + final _ret = _objc_msgSend_2(_class_NSString, _sel_string); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString stringWithString_(NSString string) { + final _ret = _objc_msgSend_42( + _class_NSString, _sel_stringWithString_, string.pointer); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString stringWithCharacters_length_( + ffi.Pointer characters, int length) { + final _ret = _objc_msgSend_257( + _class_NSString, _sel_stringWithCharacters_length_, characters, length); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString? stringWithUTF8String_( + ffi.Pointer nullTerminatedCString) { + final _ret = _objc_msgSend_258( + _class_NSString, _sel_stringWithUTF8String_, nullTerminatedCString); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString stringWithFormat_(NSString format) { + final _ret = _objc_msgSend_42( + _class_NSString, _sel_stringWithFormat_, format.pointer); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString localizedStringWithFormat_(NSString format) { + final _ret = _objc_msgSend_42( + _class_NSString, _sel_localizedStringWithFormat_, format.pointer); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString? stringWithValidatedFormat_validFormatSpecifiers_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _objc_msgSend_262( + _class_NSString, + _sel_stringWithValidatedFormat_validFormatSpecifiers_error_, + format.pointer, + validFormatSpecifiers.pointer, + error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString? + localizedStringWithValidatedFormat_validFormatSpecifiers_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _objc_msgSend_262( + _class_NSString, + _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_, + format.pointer, + validFormatSpecifiers.pointer, + error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithCString_encoding_( + ffi.Pointer nullTerminatedCString, int encoding) { + final _ret = _objc_msgSend_270(this.pointer, _sel_initWithCString_encoding_, + nullTerminatedCString, encoding); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString? stringWithCString_encoding_( + ffi.Pointer cString, int enc) { + final _ret = _objc_msgSend_270( + _class_NSString, _sel_stringWithCString_encoding_, cString, enc); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithContentsOfURL_encoding_error_( + NSURL url, int enc, ffi.Pointer> error) { + final _ret = _objc_msgSend_271(this.pointer, + _sel_initWithContentsOfURL_encoding_error_, url.pointer, enc, error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithContentsOfFile_encoding_error_( + NSString path, int enc, ffi.Pointer> error) { + final _ret = _objc_msgSend_272(this.pointer, + _sel_initWithContentsOfFile_encoding_error_, path.pointer, enc, error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString? stringWithContentsOfURL_encoding_error_( + NSURL url, int enc, ffi.Pointer> error) { + final _ret = _objc_msgSend_271(_class_NSString, + _sel_stringWithContentsOfURL_encoding_error_, url.pointer, enc, error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString? stringWithContentsOfFile_encoding_error_( + NSString path, int enc, ffi.Pointer> error) { + final _ret = _objc_msgSend_272( + _class_NSString, + _sel_stringWithContentsOfFile_encoding_error_, + path.pointer, + enc, + error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithContentsOfURL_usedEncoding_error_( + NSURL url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _objc_msgSend_273( + this.pointer, + _sel_initWithContentsOfURL_usedEncoding_error_, + url.pointer, + enc, + error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithContentsOfFile_usedEncoding_error_( + NSString path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _objc_msgSend_274( + this.pointer, + _sel_initWithContentsOfFile_usedEncoding_error_, + path.pointer, + enc, + error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString? stringWithContentsOfURL_usedEncoding_error_( + NSURL url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _objc_msgSend_273( + _class_NSString, + _sel_stringWithContentsOfURL_usedEncoding_error_, + url.pointer, + enc, + error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString? stringWithContentsOfFile_usedEncoding_error_( + NSString path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _objc_msgSend_274( + _class_NSString, + _sel_stringWithContentsOfFile_usedEncoding_error_, + path.pointer, + enc, + error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + static int + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + NSData data, + NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _objc_msgSend_275( + _class_NSString, + _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_, + data.pointer, + opts?.pointer ?? ffi.nullptr, + string, + usedLossyConversion); + } + + NSObject propertyList() { + final _ret = _objc_msgSend_2(this.pointer, _sel_propertyList); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSDictionary? propertyListFromStringsFileFormat() { + final _ret = + _objc_msgSend_276(this.pointer, _sel_propertyListFromStringsFileFormat); + return _ret.address == 0 + ? null + : NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + ffi.Pointer cString() { + return _objc_msgSend_57(this.pointer, _sel_cString); + } + + ffi.Pointer lossyCString() { + return _objc_msgSend_57(this.pointer, _sel_lossyCString); + } + + int cStringLength() { + return _objc_msgSend_12(this.pointer, _sel_cStringLength); + } + + void getCString_(ffi.Pointer bytes) { + _objc_msgSend_277(this.pointer, _sel_getCString_, bytes); + } + + void getCString_maxLength_(ffi.Pointer bytes, int maxLength) { + _objc_msgSend_278( + this.pointer, _sel_getCString_maxLength_, bytes, maxLength); + } + + void getCString_maxLength_range_remainingRange_(ffi.Pointer bytes, + int maxLength, _NSRange aRange, ffi.Pointer<_NSRange> leftoverRange) { + _objc_msgSend_279( + this.pointer, + _sel_getCString_maxLength_range_remainingRange_, + bytes, + maxLength, + aRange, + leftoverRange); + } + + bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { + return _objc_msgSend_37(this.pointer, _sel_writeToFile_atomically_, + path.pointer, useAuxiliaryFile); + } + + bool writeToURL_atomically_(NSURL url, bool atomically) { + return _objc_msgSend_158( + this.pointer, _sel_writeToURL_atomically_, url.pointer, atomically); + } + + NSObject? initWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_49( + this.pointer, _sel_initWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? initWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_214( + this.pointer, _sel_initWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject? stringWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_49( + _class_NSString, _sel_stringWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject? stringWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_214( + _class_NSString, _sel_stringWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? initWithCStringNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, int length, bool freeBuffer) { + final _ret = _objc_msgSend_280( + this.pointer, + _sel_initWithCStringNoCopy_length_freeWhenDone_, + bytes, + length, + freeBuffer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: false, release: true); + } + + NSObject? initWithCString_length_(ffi.Pointer bytes, int length) { + final _ret = _objc_msgSend_270( + this.pointer, _sel_initWithCString_length_, bytes, length); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? initWithCString_(ffi.Pointer bytes) { + final _ret = _objc_msgSend_258(this.pointer, _sel_initWithCString_, bytes); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject? stringWithCString_length_( + ffi.Pointer bytes, int length) { + final _ret = _objc_msgSend_270( + _class_NSString, _sel_stringWithCString_length_, bytes, length); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject? stringWithCString_(ffi.Pointer bytes) { + final _ret = + _objc_msgSend_258(_class_NSString, _sel_stringWithCString_, bytes); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + void getCharacters_(ffi.Pointer buffer) { + _objc_msgSend_281(this.pointer, _sel_getCharacters_, buffer); + } + + NSString? stringByAddingPercentEncodingWithAllowedCharacters_( + NSCharacterSet allowedCharacters) { + final _ret = _objc_msgSend_282( + this.pointer, + _sel_stringByAddingPercentEncodingWithAllowedCharacters_, + allowedCharacters.pointer); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get stringByRemovingPercentEncoding { + final _ret = + _objc_msgSend_55(this.pointer, _sel_stringByRemovingPercentEncoding); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? stringByAddingPercentEscapesUsingEncoding_(int enc) { + final _ret = _objc_msgSend_283( + this.pointer, _sel_stringByAddingPercentEscapesUsingEncoding_, enc); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? stringByReplacingPercentEscapesUsingEncoding_(int enc) { + final _ret = _objc_msgSend_283( + this.pointer, _sel_stringByReplacingPercentEscapesUsingEncoding_, enc); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString new1() { + final _ret = _objc_msgSend_2(_class_NSString, _sel_new); + return NSString.castFromPointer(_ret, retain: false, release: true); + } + + static NSString allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSString, _sel_allocWithZone_, zone); + return NSString.castFromPointer(_ret, retain: false, release: true); + } + + static NSString alloc() { + final _ret = _objc_msgSend_2(_class_NSString, _sel_alloc); + return NSString.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSString = objc.getClass("NSString"); +late final _sel_length = objc.registerName("length"); +late final _sel_characterAtIndex_ = objc.registerName("characterAtIndex:"); +final _objc_msgSend_13 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedShort Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, int)>(); + +class NSCoder extends objc.ObjCObjectBase { + NSCoder._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [NSCoder] that points to the same underlying object as [other]. + NSCoder.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSCoder] that wraps the given raw object pointer. + NSCoder.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSCoder]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSCoder); + } +} + +late final _class_NSCoder = objc.getClass("NSCoder"); +late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); +final _objc_msgSend_14 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_substringFromIndex_ = objc.registerName("substringFromIndex:"); +final _objc_msgSend_15 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_substringToIndex_ = objc.registerName("substringToIndex:"); + +final class _NSRange extends ffi.Struct { + @ffi.UnsignedLong() + external int location; + + @ffi.UnsignedLong() + external int length; +} + +late final _sel_substringWithRange_ = objc.registerName("substringWithRange:"); +final _objc_msgSend_16 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_getCharacters_range_ = + objc.registerName("getCharacters:range:"); +final _objc_msgSend_17 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); + +abstract class NSComparisonResult { + static const int NSOrderedAscending = -1; + static const int NSOrderedSame = 0; + static const int NSOrderedDescending = 1; +} + +late final _sel_compare_ = objc.registerName("compare:"); +final _objc_msgSend_18 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +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; +} + +late final _sel_compare_options_ = objc.registerName("compare:options:"); +final _objc_msgSend_19 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_compare_options_range_ = + objc.registerName("compare:options:range:"); +final _objc_msgSend_20 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +late final _sel_compare_options_range_locale_ = + objc.registerName("compare:options:range:locale:"); +final _objc_msgSend_21 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange, + ffi.Pointer)>(); +late final _sel_caseInsensitiveCompare_ = + objc.registerName("caseInsensitiveCompare:"); +late final _sel_localizedCompare_ = objc.registerName("localizedCompare:"); +late final _sel_localizedCaseInsensitiveCompare_ = + objc.registerName("localizedCaseInsensitiveCompare:"); +late final _sel_localizedStandardCompare_ = + objc.registerName("localizedStandardCompare:"); +late final _sel_isEqualToString_ = objc.registerName("isEqualToString:"); +final _objc_msgSend_22 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_hasPrefix_ = objc.registerName("hasPrefix:"); +late final _sel_hasSuffix_ = objc.registerName("hasSuffix:"); +late final _sel_commonPrefixWithString_options_ = + objc.registerName("commonPrefixWithString:options:"); +final _objc_msgSend_23 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_containsString_ = objc.registerName("containsString:"); +late final _sel_localizedCaseInsensitiveContainsString_ = + objc.registerName("localizedCaseInsensitiveContainsString:"); +late final _sel_localizedStandardContainsString_ = + objc.registerName("localizedStandardContainsString:"); +late final _sel_localizedStandardRangeOfString_ = + objc.registerName("localizedStandardRangeOfString:"); +final _objc_msgSend_24 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_24Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_rangeOfString_ = objc.registerName("rangeOfString:"); +late final _sel_rangeOfString_options_ = + objc.registerName("rangeOfString:options:"); +final _objc_msgSend_25 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +final _objc_msgSend_25Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_rangeOfString_options_range_ = + objc.registerName("rangeOfString:options:range:"); +final _objc_msgSend_26 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +final _objc_msgSend_26Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); + +class NSLocale extends objc.ObjCObjectBase { + NSLocale._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [NSLocale] that points to the same underlying object as [other]. + NSLocale.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSLocale] that wraps the given raw object pointer. + NSLocale.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSLocale]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSLocale); + } +} + +late final _class_NSLocale = objc.getClass("NSLocale"); +late final _sel_rangeOfString_options_range_locale_ = + objc.registerName("rangeOfString:options:range:locale:"); +final _objc_msgSend_27 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange, + ffi.Pointer)>(); +final _objc_msgSend_27Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange, + ffi.Pointer)>(); + +class NSCharacterSet extends NSObject { + NSCharacterSet._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSCharacterSet] that points to the same underlying object as [other]. + NSCharacterSet.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSCharacterSet] that wraps the given raw object pointer. + NSCharacterSet.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSCharacterSet]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSCharacterSet); + } + + static NSCharacterSet getControlCharacterSet() { + final _ret = + _objc_msgSend_28(_class_NSCharacterSet, _sel_controlCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getWhitespaceCharacterSet() { + final _ret = + _objc_msgSend_28(_class_NSCharacterSet, _sel_whitespaceCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getWhitespaceAndNewlineCharacterSet() { + final _ret = _objc_msgSend_28( + _class_NSCharacterSet, _sel_whitespaceAndNewlineCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getDecimalDigitCharacterSet() { + final _ret = + _objc_msgSend_28(_class_NSCharacterSet, _sel_decimalDigitCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getLetterCharacterSet() { + final _ret = + _objc_msgSend_28(_class_NSCharacterSet, _sel_letterCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getLowercaseLetterCharacterSet() { + final _ret = _objc_msgSend_28( + _class_NSCharacterSet, _sel_lowercaseLetterCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getUppercaseLetterCharacterSet() { + final _ret = _objc_msgSend_28( + _class_NSCharacterSet, _sel_uppercaseLetterCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getNonBaseCharacterSet() { + final _ret = + _objc_msgSend_28(_class_NSCharacterSet, _sel_nonBaseCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getAlphanumericCharacterSet() { + final _ret = + _objc_msgSend_28(_class_NSCharacterSet, _sel_alphanumericCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getDecomposableCharacterSet() { + final _ret = + _objc_msgSend_28(_class_NSCharacterSet, _sel_decomposableCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getIllegalCharacterSet() { + final _ret = + _objc_msgSend_28(_class_NSCharacterSet, _sel_illegalCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getPunctuationCharacterSet() { + final _ret = + _objc_msgSend_28(_class_NSCharacterSet, _sel_punctuationCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getCapitalizedLetterCharacterSet() { + final _ret = _objc_msgSend_28( + _class_NSCharacterSet, _sel_capitalizedLetterCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getSymbolCharacterSet() { + final _ret = + _objc_msgSend_28(_class_NSCharacterSet, _sel_symbolCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getNewlineCharacterSet() { + final _ret = + _objc_msgSend_28(_class_NSCharacterSet, _sel_newlineCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: false, release: true); + } + + static NSCharacterSet characterSetWithRange_(_NSRange aRange) { + final _ret = _objc_msgSend_29( + _class_NSCharacterSet, _sel_characterSetWithRange_, aRange); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet characterSetWithCharactersInString_(NSString aString) { + final _ret = _objc_msgSend_30(_class_NSCharacterSet, + _sel_characterSetWithCharactersInString_, aString.pointer); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet characterSetWithBitmapRepresentation_(NSData data) { + final _ret = _objc_msgSend_222(_class_NSCharacterSet, + _sel_characterSetWithBitmapRepresentation_, data.pointer); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet? characterSetWithContentsOfFile_(NSString fName) { + final _ret = _objc_msgSend_223(_class_NSCharacterSet, + _sel_characterSetWithContentsOfFile_, fName.pointer); + return _ret.address == 0 + ? null + : NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + NSCharacterSet initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_224(this.pointer, _sel_initWithCoder_, coder.pointer); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + bool characterIsMember_(int aCharacter) { + return _objc_msgSend_225(this.pointer, _sel_characterIsMember_, aCharacter); + } + + NSData get bitmapRepresentation { + final _ret = _objc_msgSend_54(this.pointer, _sel_bitmapRepresentation); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSCharacterSet get invertedSet { + final _ret = _objc_msgSend_28(this.pointer, _sel_invertedSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + bool longCharacterIsMember_(int theLongChar) { + return _objc_msgSend_226( + this.pointer, _sel_longCharacterIsMember_, theLongChar); + } + + bool isSupersetOfSet_(NSCharacterSet theOtherSet) { + return _objc_msgSend_227( + this.pointer, _sel_isSupersetOfSet_, theOtherSet.pointer); + } + + bool hasMemberInPlane_(int thePlane) { + return _objc_msgSend_228(this.pointer, _sel_hasMemberInPlane_, thePlane); + } + + static NSCharacterSet getURLUserAllowedCharacterSet() { + final _ret = _objc_msgSend_28( + _class_NSCharacterSet, _sel_URLUserAllowedCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getURLPasswordAllowedCharacterSet() { + final _ret = _objc_msgSend_28( + _class_NSCharacterSet, _sel_URLPasswordAllowedCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getURLHostAllowedCharacterSet() { + final _ret = _objc_msgSend_28( + _class_NSCharacterSet, _sel_URLHostAllowedCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getURLPathAllowedCharacterSet() { + final _ret = _objc_msgSend_28( + _class_NSCharacterSet, _sel_URLPathAllowedCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getURLQueryAllowedCharacterSet() { + final _ret = _objc_msgSend_28( + _class_NSCharacterSet, _sel_URLQueryAllowedCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getURLFragmentAllowedCharacterSet() { + final _ret = _objc_msgSend_28( + _class_NSCharacterSet, _sel_URLFragmentAllowedCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSCharacterSet init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet new1() { + final _ret = _objc_msgSend_2(_class_NSCharacterSet, _sel_new); + return NSCharacterSet.castFromPointer(_ret, retain: false, release: true); + } + + static NSCharacterSet allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_3(_class_NSCharacterSet, _sel_allocWithZone_, zone); + return NSCharacterSet.castFromPointer(_ret, retain: false, release: true); + } + + static NSCharacterSet alloc() { + final _ret = _objc_msgSend_2(_class_NSCharacterSet, _sel_alloc); + return NSCharacterSet.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSCharacterSet = objc.getClass("NSCharacterSet"); +late final _sel_controlCharacterSet = objc.registerName("controlCharacterSet"); +final _objc_msgSend_28 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_whitespaceCharacterSet = + objc.registerName("whitespaceCharacterSet"); +late final _sel_whitespaceAndNewlineCharacterSet = + objc.registerName("whitespaceAndNewlineCharacterSet"); +late final _sel_decimalDigitCharacterSet = + objc.registerName("decimalDigitCharacterSet"); +late final _sel_letterCharacterSet = objc.registerName("letterCharacterSet"); +late final _sel_lowercaseLetterCharacterSet = + objc.registerName("lowercaseLetterCharacterSet"); +late final _sel_uppercaseLetterCharacterSet = + objc.registerName("uppercaseLetterCharacterSet"); +late final _sel_nonBaseCharacterSet = objc.registerName("nonBaseCharacterSet"); +late final _sel_alphanumericCharacterSet = + objc.registerName("alphanumericCharacterSet"); +late final _sel_decomposableCharacterSet = + objc.registerName("decomposableCharacterSet"); +late final _sel_illegalCharacterSet = objc.registerName("illegalCharacterSet"); +late final _sel_punctuationCharacterSet = + objc.registerName("punctuationCharacterSet"); +late final _sel_capitalizedLetterCharacterSet = + objc.registerName("capitalizedLetterCharacterSet"); +late final _sel_symbolCharacterSet = objc.registerName("symbolCharacterSet"); +late final _sel_newlineCharacterSet = objc.registerName("newlineCharacterSet"); +late final _sel_characterSetWithRange_ = + objc.registerName("characterSetWithRange:"); +final _objc_msgSend_29 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_characterSetWithCharactersInString_ = + objc.registerName("characterSetWithCharactersInString:"); +final _objc_msgSend_30 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class NSData extends NSObject { + NSData._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSData] that points to the same underlying object as [other]. + NSData.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSData] that wraps the given raw object pointer. + NSData.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSData]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSData); + } + + int get length { + return _objc_msgSend_12(this.pointer, _sel_length); + } + + ffi.Pointer get bytes { + return _objc_msgSend_31(this.pointer, _sel_bytes); + } + + NSString get description { + final _ret = _objc_msgSend_32(this.pointer, _sel_description); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + void getBytes_length_(ffi.Pointer buffer, int length) { + _objc_msgSend_33(this.pointer, _sel_getBytes_length_, buffer, length); + } + + void getBytes_range_(ffi.Pointer buffer, _NSRange range) { + _objc_msgSend_34(this.pointer, _sel_getBytes_range_, buffer, range); + } + + bool isEqualToData_(NSData other) { + return _objc_msgSend_35(this.pointer, _sel_isEqualToData_, other.pointer); + } + + NSData subdataWithRange_(_NSRange range) { + final _ret = _objc_msgSend_36(this.pointer, _sel_subdataWithRange_, range); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { + return _objc_msgSend_37(this.pointer, _sel_writeToFile_atomically_, + path.pointer, useAuxiliaryFile); + } + + bool writeToURL_atomically_(NSURL url, bool atomically) { + return _objc_msgSend_158( + this.pointer, _sel_writeToURL_atomically_, url.pointer, atomically); + } + + bool writeToFile_options_error_(NSString path, int writeOptionsMask, + ffi.Pointer> errorPtr) { + return _objc_msgSend_206(this.pointer, _sel_writeToFile_options_error_, + path.pointer, writeOptionsMask, errorPtr); + } + + bool writeToURL_options_error_(NSURL url, int writeOptionsMask, + ffi.Pointer> errorPtr) { + return _objc_msgSend_207(this.pointer, _sel_writeToURL_options_error_, + url.pointer, writeOptionsMask, errorPtr); + } + + void rangeOfData_options_range_(ffi.Pointer<_NSRange> stret, + NSData dataToFind, int mask, _NSRange searchRange) { + objc.useMsgSendVariants + ? _objc_msgSend_208Stret( + stret, + this.pointer, + _sel_rangeOfData_options_range_, + dataToFind.pointer, + mask, + searchRange) + : stret.ref = _objc_msgSend_208( + this.pointer, + _sel_rangeOfData_options_range_, + dataToFind.pointer, + mask, + searchRange); + } + + void enumerateByteRangesUsingBlock_( + ObjCBlock_ffiVoid_ffiVoid_NSRange_bool block) { + _objc_msgSend_209( + this.pointer, _sel_enumerateByteRangesUsingBlock_, block.pointer); + } + + static NSData data() { + final _ret = _objc_msgSend_2(_class_NSData, _sel_data); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + static NSData dataWithBytes_length_(ffi.Pointer bytes, int length) { + final _ret = _objc_msgSend_210( + _class_NSData, _sel_dataWithBytes_length_, bytes, length); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + static NSData dataWithBytesNoCopy_length_( + ffi.Pointer bytes, int length) { + final _ret = _objc_msgSend_210( + _class_NSData, _sel_dataWithBytesNoCopy_length_, bytes, length); + return NSData.castFromPointer(_ret, retain: false, release: true); + } + + static NSData dataWithBytesNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, int length, bool b) { + final _ret = _objc_msgSend_211(_class_NSData, + _sel_dataWithBytesNoCopy_length_freeWhenDone_, bytes, length, b); + return NSData.castFromPointer(_ret, retain: false, release: true); + } + + static NSData? dataWithContentsOfFile_options_error_(NSString path, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _objc_msgSend_212( + _class_NSData, + _sel_dataWithContentsOfFile_options_error_, + path.pointer, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + static NSData? dataWithContentsOfURL_options_error_(NSURL url, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _objc_msgSend_213( + _class_NSData, + _sel_dataWithContentsOfURL_options_error_, + url.pointer, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + static NSData? dataWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_49( + _class_NSData, _sel_dataWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + static NSData? dataWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_214( + _class_NSData, _sel_dataWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData initWithBytes_length_(ffi.Pointer bytes, int length) { + final _ret = _objc_msgSend_210( + this.pointer, _sel_initWithBytes_length_, bytes, length); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData initWithBytesNoCopy_length_(ffi.Pointer bytes, int length) { + final _ret = _objc_msgSend_210( + this.pointer, _sel_initWithBytesNoCopy_length_, bytes, length); + return NSData.castFromPointer(_ret, retain: false, release: true); + } + + NSData initWithBytesNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, int length, bool b) { + final _ret = _objc_msgSend_211(this.pointer, + _sel_initWithBytesNoCopy_length_freeWhenDone_, bytes, length, b); + return NSData.castFromPointer(_ret, retain: false, release: true); + } + + NSData initWithBytesNoCopy_length_deallocator_(ffi.Pointer bytes, + int length, ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { + final _ret = _objc_msgSend_215( + this.pointer, + _sel_initWithBytesNoCopy_length_deallocator_, + bytes, + length, + deallocator?.pointer ?? ffi.nullptr); + return NSData.castFromPointer(_ret, retain: false, release: true); + } + + NSData? initWithContentsOfFile_options_error_(NSString path, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _objc_msgSend_212( + this.pointer, + _sel_initWithContentsOfFile_options_error_, + path.pointer, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData? initWithContentsOfURL_options_error_(NSURL url, int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _objc_msgSend_213( + this.pointer, + _sel_initWithContentsOfURL_options_error_, + url.pointer, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData? initWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_49( + this.pointer, _sel_initWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData? initWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_214( + this.pointer, _sel_initWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData initWithData_(NSData data) { + final _ret = + _objc_msgSend_216(this.pointer, _sel_initWithData_, data.pointer); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + static NSData dataWithData_(NSData data) { + final _ret = + _objc_msgSend_216(_class_NSData, _sel_dataWithData_, data.pointer); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData? initWithBase64EncodedString_options_( + NSString base64String, int options) { + final _ret = _objc_msgSend_217( + this.pointer, + _sel_initWithBase64EncodedString_options_, + base64String.pointer, + options); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSString base64EncodedStringWithOptions_(int options) { + final _ret = _objc_msgSend_218( + this.pointer, _sel_base64EncodedStringWithOptions_, options); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSData? initWithBase64EncodedData_options_(NSData base64Data, int options) { + final _ret = _objc_msgSend_219(this.pointer, + _sel_initWithBase64EncodedData_options_, base64Data.pointer, options); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData base64EncodedDataWithOptions_(int options) { + final _ret = _objc_msgSend_220( + this.pointer, _sel_base64EncodedDataWithOptions_, options); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData? decompressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _objc_msgSend_221(this.pointer, + _sel_decompressedDataUsingAlgorithm_error_, algorithm, error); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData? compressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _objc_msgSend_221(this.pointer, + _sel_compressedDataUsingAlgorithm_error_, algorithm, error); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + void getBytes_(ffi.Pointer buffer) { + _objc_msgSend_64(this.pointer, _sel_getBytes_, buffer); + } + + static NSObject? dataWithContentsOfMappedFile_(NSString path) { + final _ret = _objc_msgSend_49( + _class_NSData, _sel_dataWithContentsOfMappedFile_, path.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? initWithContentsOfMappedFile_(NSString path) { + final _ret = _objc_msgSend_49( + this.pointer, _sel_initWithContentsOfMappedFile_, path.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? initWithBase64Encoding_(NSString base64String) { + final _ret = _objc_msgSend_49( + this.pointer, _sel_initWithBase64Encoding_, base64String.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSString base64Encoding() { + final _ret = _objc_msgSend_32(this.pointer, _sel_base64Encoding); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSData init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + static NSData new1() { + final _ret = _objc_msgSend_2(_class_NSData, _sel_new); + return NSData.castFromPointer(_ret, retain: false, release: true); + } + + static NSData allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSData, _sel_allocWithZone_, zone); + return NSData.castFromPointer(_ret, retain: false, release: true); + } + + static NSData alloc() { + final _ret = _objc_msgSend_2(_class_NSData, _sel_alloc); + return NSData.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSData = objc.getClass("NSData"); +late final _sel_bytes = objc.registerName("bytes"); +final _objc_msgSend_31 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_description = objc.registerName("description"); +final _objc_msgSend_32 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_getBytes_length_ = objc.registerName("getBytes:length:"); +final _objc_msgSend_33 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); +late final _sel_getBytes_range_ = objc.registerName("getBytes:range:"); +final _objc_msgSend_34 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, _NSRange)>(); +late final _sel_isEqualToData_ = objc.registerName("isEqualToData:"); +final _objc_msgSend_35 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_subdataWithRange_ = objc.registerName("subdataWithRange:"); +final _objc_msgSend_36 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_writeToFile_atomically_ = + objc.registerName("writeToFile:atomically:"); +final _objc_msgSend_37 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); + +class NSURL extends NSObject { + NSURL._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURL] that points to the same underlying object as [other]. + NSURL.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSURL] that wraps the given raw object pointer. + NSURL.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURL]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSURL); + } + + NSURL? initWithScheme_host_path_( + NSString scheme, NSString? host, NSString path) { + final _ret = _objc_msgSend_38(this.pointer, _sel_initWithScheme_host_path_, + scheme.pointer, host?.pointer ?? ffi.nullptr, path.pointer); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL initFileURLWithPath_isDirectory_relativeToURL_( + NSString path, bool isDir, NSURL? baseURL) { + final _ret = _objc_msgSend_39( + this.pointer, + _sel_initFileURLWithPath_isDirectory_relativeToURL_, + path.pointer, + isDir, + baseURL?.pointer ?? ffi.nullptr); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL initFileURLWithPath_relativeToURL_(NSString path, NSURL? baseURL) { + final _ret = _objc_msgSend_40( + this.pointer, + _sel_initFileURLWithPath_relativeToURL_, + path.pointer, + baseURL?.pointer ?? ffi.nullptr); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL initFileURLWithPath_isDirectory_(NSString path, bool isDir) { + final _ret = _objc_msgSend_41(this.pointer, + _sel_initFileURLWithPath_isDirectory_, path.pointer, isDir); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL initFileURLWithPath_(NSString path) { + final _ret = + _objc_msgSend_42(this.pointer, _sel_initFileURLWithPath_, path.pointer); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL fileURLWithPath_isDirectory_relativeToURL_( + NSString path, bool isDir, NSURL? baseURL) { + final _ret = _objc_msgSend_43( + _class_NSURL, + _sel_fileURLWithPath_isDirectory_relativeToURL_, + path.pointer, + isDir, + baseURL?.pointer ?? ffi.nullptr); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL fileURLWithPath_relativeToURL_(NSString path, NSURL? baseURL) { + final _ret = _objc_msgSend_44( + _class_NSURL, + _sel_fileURLWithPath_relativeToURL_, + path.pointer, + baseURL?.pointer ?? ffi.nullptr); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL fileURLWithPath_isDirectory_(NSString path, bool isDir) { + final _ret = _objc_msgSend_45( + _class_NSURL, _sel_fileURLWithPath_isDirectory_, path.pointer, isDir); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL fileURLWithPath_(NSString path) { + final _ret = + _objc_msgSend_46(_class_NSURL, _sel_fileURLWithPath_, path.pointer); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( + ffi.Pointer path, bool isDir, NSURL? baseURL) { + final _ret = _objc_msgSend_47( + this.pointer, + _sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_, + path, + isDir, + baseURL?.pointer ?? ffi.nullptr); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( + ffi.Pointer path, bool isDir, NSURL? baseURL) { + final _ret = _objc_msgSend_48( + _class_NSURL, + _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_, + path, + isDir, + baseURL?.pointer ?? ffi.nullptr); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? initWithString_(NSString URLString) { + final _ret = + _objc_msgSend_49(this.pointer, _sel_initWithString_, URLString.pointer); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? initWithString_relativeToURL_(NSString URLString, NSURL? baseURL) { + final _ret = _objc_msgSend_50( + this.pointer, + _sel_initWithString_relativeToURL_, + URLString.pointer, + baseURL?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL? URLWithString_(NSString URLString) { + final _ret = + _objc_msgSend_49(_class_NSURL, _sel_URLWithString_, URLString.pointer); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL? URLWithString_relativeToURL_( + NSString URLString, NSURL? baseURL) { + final _ret = _objc_msgSend_50( + _class_NSURL, + _sel_URLWithString_relativeToURL_, + URLString.pointer, + baseURL?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? initWithString_encodingInvalidCharacters_( + NSString URLString, bool encodingInvalidCharacters) { + final _ret = _objc_msgSend_51( + this.pointer, + _sel_initWithString_encodingInvalidCharacters_, + URLString.pointer, + encodingInvalidCharacters); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL? URLWithString_encodingInvalidCharacters_( + NSString URLString, bool encodingInvalidCharacters) { + final _ret = _objc_msgSend_51( + _class_NSURL, + _sel_URLWithString_encodingInvalidCharacters_, + URLString.pointer, + encodingInvalidCharacters); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL initWithDataRepresentation_relativeToURL_(NSData data, NSURL? baseURL) { + final _ret = _objc_msgSend_52( + this.pointer, + _sel_initWithDataRepresentation_relativeToURL_, + data.pointer, + baseURL?.pointer ?? ffi.nullptr); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL URLWithDataRepresentation_relativeToURL_( + NSData data, NSURL? baseURL) { + final _ret = _objc_msgSend_53( + _class_NSURL, + _sel_URLWithDataRepresentation_relativeToURL_, + data.pointer, + baseURL?.pointer ?? ffi.nullptr); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL initAbsoluteURLWithDataRepresentation_relativeToURL_( + NSData data, NSURL? baseURL) { + final _ret = _objc_msgSend_52( + this.pointer, + _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_, + data.pointer, + baseURL?.pointer ?? ffi.nullptr); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL absoluteURLWithDataRepresentation_relativeToURL_( + NSData data, NSURL? baseURL) { + final _ret = _objc_msgSend_53( + _class_NSURL, + _sel_absoluteURLWithDataRepresentation_relativeToURL_, + data.pointer, + baseURL?.pointer ?? ffi.nullptr); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSData get dataRepresentation { + final _ret = _objc_msgSend_54(this.pointer, _sel_dataRepresentation); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get absoluteString { + final _ret = _objc_msgSend_55(this.pointer, _sel_absoluteString); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString get relativeString { + final _ret = _objc_msgSend_32(this.pointer, _sel_relativeString); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? get baseURL { + final _ret = _objc_msgSend_56(this.pointer, _sel_baseURL); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? get absoluteURL { + final _ret = _objc_msgSend_56(this.pointer, _sel_absoluteURL); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get scheme { + final _ret = _objc_msgSend_55(this.pointer, _sel_scheme); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get resourceSpecifier { + final _ret = _objc_msgSend_55(this.pointer, _sel_resourceSpecifier); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get host { + final _ret = _objc_msgSend_55(this.pointer, _sel_host); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber? get port { + final _ret = _objc_msgSend_94(this.pointer, _sel_port); + return _ret.address == 0 + ? null + : NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get user { + final _ret = _objc_msgSend_55(this.pointer, _sel_user); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get password { + final _ret = _objc_msgSend_55(this.pointer, _sel_password); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get path { + final _ret = _objc_msgSend_55(this.pointer, _sel_path); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get fragment { + final _ret = _objc_msgSend_55(this.pointer, _sel_fragment); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get parameterString { + final _ret = _objc_msgSend_55(this.pointer, _sel_parameterString); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get query { + final _ret = _objc_msgSend_55(this.pointer, _sel_query); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get relativePath { + final _ret = _objc_msgSend_55(this.pointer, _sel_relativePath); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + bool get hasDirectoryPath { + return _objc_msgSend_11(this.pointer, _sel_hasDirectoryPath); + } + + bool getFileSystemRepresentation_maxLength_( + ffi.Pointer buffer, int maxBufferLength) { + return _objc_msgSend_95(this.pointer, + _sel_getFileSystemRepresentation_maxLength_, buffer, maxBufferLength); + } + + ffi.Pointer get fileSystemRepresentation { + return _objc_msgSend_57(this.pointer, _sel_fileSystemRepresentation); + } + + bool get fileURL { + return _objc_msgSend_11(this.pointer, _sel_isFileURL); + } + + NSURL? get standardizedURL { + final _ret = _objc_msgSend_56(this.pointer, _sel_standardizedURL); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + bool isFileReferenceURL() { + return _objc_msgSend_11(this.pointer, _sel_isFileReferenceURL); + } + + NSURL? fileReferenceURL() { + final _ret = _objc_msgSend_56(this.pointer, _sel_fileReferenceURL); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? get filePathURL { + final _ret = _objc_msgSend_56(this.pointer, _sel_filePathURL); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + bool getResourceValue_forKey_error_( + ffi.Pointer> value, + NSString key, + ffi.Pointer> error) { + return _objc_msgSend_96(this.pointer, _sel_getResourceValue_forKey_error_, + value, key.pointer, error); + } + + NSObject? resourceValuesForKeys_error_( + NSArray keys, ffi.Pointer> error) { + final _ret = _objc_msgSend_159( + this.pointer, _sel_resourceValuesForKeys_error_, keys.pointer, error); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + bool setResourceValue_forKey_error_(NSObject? value, NSString key, + ffi.Pointer> error) { + return _objc_msgSend_160(this.pointer, _sel_setResourceValue_forKey_error_, + value?.pointer ?? ffi.nullptr, key.pointer, error); + } + + bool setResourceValues_error_( + NSObject keyedValues, ffi.Pointer> error) { + return _objc_msgSend_161(this.pointer, _sel_setResourceValues_error_, + keyedValues.pointer, error); + } + + void removeCachedResourceValueForKey_(NSString key) { + _objc_msgSend_162( + this.pointer, _sel_removeCachedResourceValueForKey_, key.pointer); + } + + void removeAllCachedResourceValues() { + _objc_msgSend_1(this.pointer, _sel_removeAllCachedResourceValues); + } + + void setTemporaryResourceValue_forKey_(NSObject? value, NSString key) { + _objc_msgSend_163(this.pointer, _sel_setTemporaryResourceValue_forKey_, + value?.pointer ?? ffi.nullptr, key.pointer); + } + + NSData? + bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_( + int options, + NSArray? keys, + NSURL? relativeURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_164( + this.pointer, + _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_, + options, + keys?.pointer ?? ffi.nullptr, + relativeURL?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? + initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( + NSData bookmarkData, + int options, + NSURL? relativeURL, + ffi.Pointer isStale, + ffi.Pointer> error) { + final _ret = _objc_msgSend_165( + this.pointer, + _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_, + bookmarkData.pointer, + options, + relativeURL?.pointer ?? ffi.nullptr, + isStale, + error); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL? + URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( + NSData bookmarkData, + int options, + NSURL? relativeURL, + ffi.Pointer isStale, + ffi.Pointer> error) { + final _ret = _objc_msgSend_165( + _class_NSURL, + _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_, + bookmarkData.pointer, + options, + relativeURL?.pointer ?? ffi.nullptr, + isStale, + error); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject? resourceValuesForKeys_fromBookmarkData_( + NSArray keys, NSData bookmarkData) { + final _ret = _objc_msgSend_166( + _class_NSURL, + _sel_resourceValuesForKeys_fromBookmarkData_, + keys.pointer, + bookmarkData.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static bool writeBookmarkData_toURL_options_error_( + NSData bookmarkData, + NSURL bookmarkFileURL, + int options, + ffi.Pointer> error) { + return _objc_msgSend_167( + _class_NSURL, + _sel_writeBookmarkData_toURL_options_error_, + bookmarkData.pointer, + bookmarkFileURL.pointer, + options, + error); + } + + static NSData? bookmarkDataWithContentsOfURL_error_( + NSURL bookmarkFileURL, ffi.Pointer> error) { + final _ret = _objc_msgSend_168( + _class_NSURL, + _sel_bookmarkDataWithContentsOfURL_error_, + bookmarkFileURL.pointer, + error); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL? URLByResolvingAliasFileAtURL_options_error_( + NSURL url, int options, ffi.Pointer> error) { + final _ret = _objc_msgSend_169( + _class_NSURL, + _sel_URLByResolvingAliasFileAtURL_options_error_, + url.pointer, + options, + error); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + bool startAccessingSecurityScopedResource() { + return _objc_msgSend_11( + this.pointer, _sel_startAccessingSecurityScopedResource); + } + + void stopAccessingSecurityScopedResource() { + _objc_msgSend_1(this.pointer, _sel_stopAccessingSecurityScopedResource); + } + + bool getPromisedItemResourceValue_forKey_error_( + ffi.Pointer> value, + NSString key, + ffi.Pointer> error) { + return _objc_msgSend_96( + this.pointer, + _sel_getPromisedItemResourceValue_forKey_error_, + value, + key.pointer, + error); + } + + NSDictionary? promisedItemResourceValuesForKeys_error_( + NSArray keys, ffi.Pointer> error) { + final _ret = _objc_msgSend_189(this.pointer, + _sel_promisedItemResourceValuesForKeys_error_, keys.pointer, error); + return _ret.address == 0 + ? null + : NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + bool checkPromisedItemIsReachableAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_190( + this.pointer, _sel_checkPromisedItemIsReachableAndReturnError_, error); + } + + static NSURL? fileURLWithPathComponents_(NSArray components) { + final _ret = _objc_msgSend_191( + _class_NSURL, _sel_fileURLWithPathComponents_, components.pointer); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSArray? get pathComponents { + final _ret = _objc_msgSend_192(this.pointer, _sel_pathComponents); + return _ret.address == 0 + ? null + : NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get lastPathComponent { + final _ret = _objc_msgSend_55(this.pointer, _sel_lastPathComponent); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get pathExtension { + final _ret = _objc_msgSend_55(this.pointer, _sel_pathExtension); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? URLByAppendingPathComponent_(NSString pathComponent) { + final _ret = _objc_msgSend_193( + this.pointer, _sel_URLByAppendingPathComponent_, pathComponent.pointer); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? URLByAppendingPathComponent_isDirectory_( + NSString pathComponent, bool isDirectory) { + final _ret = _objc_msgSend_194( + this.pointer, + _sel_URLByAppendingPathComponent_isDirectory_, + pathComponent.pointer, + isDirectory); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? get URLByDeletingLastPathComponent { + final _ret = + _objc_msgSend_56(this.pointer, _sel_URLByDeletingLastPathComponent); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? URLByAppendingPathExtension_(NSString pathExtension) { + final _ret = _objc_msgSend_193( + this.pointer, _sel_URLByAppendingPathExtension_, pathExtension.pointer); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? get URLByDeletingPathExtension { + final _ret = + _objc_msgSend_56(this.pointer, _sel_URLByDeletingPathExtension); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + bool checkResourceIsReachableAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_190( + this.pointer, _sel_checkResourceIsReachableAndReturnError_, error); + } + + NSURL? get URLByStandardizingPath { + final _ret = _objc_msgSend_56(this.pointer, _sel_URLByStandardizingPath); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? get URLByResolvingSymlinksInPath { + final _ret = + _objc_msgSend_56(this.pointer, _sel_URLByResolvingSymlinksInPath); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSData? resourceDataUsingCache_(bool shouldUseCache) { + final _ret = _objc_msgSend_195( + this.pointer, _sel_resourceDataUsingCache_, shouldUseCache); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + void loadResourceDataNotifyingClient_usingCache_( + NSObject client, bool shouldUseCache) { + _objc_msgSend_196( + this.pointer, + _sel_loadResourceDataNotifyingClient_usingCache_, + client.pointer, + shouldUseCache); + } + + NSObject? propertyForKey_(NSString propertyKey) { + final _ret = _objc_msgSend_49( + this.pointer, _sel_propertyForKey_, propertyKey.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + bool setResourceData_(NSData data) { + return _objc_msgSend_35(this.pointer, _sel_setResourceData_, data.pointer); + } + + bool setProperty_forKey_(NSObject property, NSString propertyKey) { + return _objc_msgSend_197(this.pointer, _sel_setProperty_forKey_, + property.pointer, propertyKey.pointer); + } + + NSURLHandle? URLHandleUsingCache_(bool shouldUseCache) { + final _ret = _objc_msgSend_205( + this.pointer, _sel_URLHandleUsingCache_, shouldUseCache); + return _ret.address == 0 + ? null + : NSURLHandle.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSURL init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL new1() { + final _ret = _objc_msgSend_2(_class_NSURL, _sel_new); + return NSURL.castFromPointer(_ret, retain: false, release: true); + } + + static NSURL allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSURL, _sel_allocWithZone_, zone); + return NSURL.castFromPointer(_ret, retain: false, release: true); + } + + static NSURL alloc() { + final _ret = _objc_msgSend_2(_class_NSURL, _sel_alloc); + return NSURL.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSURL = objc.getClass("NSURL"); +late final _sel_initWithScheme_host_path_ = + objc.registerName("initWithScheme:host:path:"); +final _objc_msgSend_38 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initFileURLWithPath_isDirectory_relativeToURL_ = + objc.registerName("initFileURLWithPath:isDirectory:relativeToURL:"); +final _objc_msgSend_39 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>(); +late final _sel_initFileURLWithPath_relativeToURL_ = + objc.registerName("initFileURLWithPath:relativeToURL:"); +final _objc_msgSend_40 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initFileURLWithPath_isDirectory_ = + objc.registerName("initFileURLWithPath:isDirectory:"); +final _objc_msgSend_41 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_initFileURLWithPath_ = + objc.registerName("initFileURLWithPath:"); +final _objc_msgSend_42 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_fileURLWithPath_isDirectory_relativeToURL_ = + objc.registerName("fileURLWithPath:isDirectory:relativeToURL:"); +final _objc_msgSend_43 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>(); +late final _sel_fileURLWithPath_relativeToURL_ = + objc.registerName("fileURLWithPath:relativeToURL:"); +final _objc_msgSend_44 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_fileURLWithPath_isDirectory_ = + objc.registerName("fileURLWithPath:isDirectory:"); +final _objc_msgSend_45 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_fileURLWithPath_ = objc.registerName("fileURLWithPath:"); +final _objc_msgSend_46 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_ = + objc.registerName( + "initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); +final _objc_msgSend_47 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>(); +late final _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_ = + objc.registerName( + "fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); +final _objc_msgSend_48 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>(); +late final _sel_initWithString_ = objc.registerName("initWithString:"); +final _objc_msgSend_49 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithString_relativeToURL_ = + objc.registerName("initWithString:relativeToURL:"); +final _objc_msgSend_50 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_URLWithString_ = objc.registerName("URLWithString:"); +late final _sel_URLWithString_relativeToURL_ = + objc.registerName("URLWithString:relativeToURL:"); +late final _sel_initWithString_encodingInvalidCharacters_ = + objc.registerName("initWithString:encodingInvalidCharacters:"); +final _objc_msgSend_51 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_URLWithString_encodingInvalidCharacters_ = + objc.registerName("URLWithString:encodingInvalidCharacters:"); +late final _sel_initWithDataRepresentation_relativeToURL_ = + objc.registerName("initWithDataRepresentation:relativeToURL:"); +final _objc_msgSend_52 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_URLWithDataRepresentation_relativeToURL_ = + objc.registerName("URLWithDataRepresentation:relativeToURL:"); +final _objc_msgSend_53 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_ = + objc.registerName("initAbsoluteURLWithDataRepresentation:relativeToURL:"); +late final _sel_absoluteURLWithDataRepresentation_relativeToURL_ = + objc.registerName("absoluteURLWithDataRepresentation:relativeToURL:"); +late final _sel_dataRepresentation = objc.registerName("dataRepresentation"); +final _objc_msgSend_54 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_absoluteString = objc.registerName("absoluteString"); +final _objc_msgSend_55 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_relativeString = objc.registerName("relativeString"); +late final _sel_baseURL = objc.registerName("baseURL"); +final _objc_msgSend_56 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_absoluteURL = objc.registerName("absoluteURL"); +late final _sel_scheme = objc.registerName("scheme"); +late final _sel_resourceSpecifier = objc.registerName("resourceSpecifier"); +late final _sel_host = objc.registerName("host"); + +class NSNumber extends NSValue { + NSNumber._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSNumber] that points to the same underlying object as [other]. + NSNumber.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSNumber] that wraps the given raw object pointer. + NSNumber.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSNumber]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSNumber); + } + + @override + NSNumber? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithChar_(int value) { + final _ret = _objc_msgSend_67(this.pointer, _sel_initWithChar_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithUnsignedChar_(int value) { + final _ret = + _objc_msgSend_68(this.pointer, _sel_initWithUnsignedChar_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithShort_(int value) { + final _ret = _objc_msgSend_69(this.pointer, _sel_initWithShort_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithUnsignedShort_(int value) { + final _ret = + _objc_msgSend_70(this.pointer, _sel_initWithUnsignedShort_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithInt_(int value) { + final _ret = _objc_msgSend_71(this.pointer, _sel_initWithInt_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithUnsignedInt_(int value) { + final _ret = + _objc_msgSend_72(this.pointer, _sel_initWithUnsignedInt_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithLong_(int value) { + final _ret = _objc_msgSend_73(this.pointer, _sel_initWithLong_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithUnsignedLong_(int value) { + final _ret = + _objc_msgSend_74(this.pointer, _sel_initWithUnsignedLong_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithLongLong_(int value) { + final _ret = _objc_msgSend_75(this.pointer, _sel_initWithLongLong_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithUnsignedLongLong_(int value) { + final _ret = + _objc_msgSend_76(this.pointer, _sel_initWithUnsignedLongLong_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithFloat_(double value) { + final _ret = _objc_msgSend_77(this.pointer, _sel_initWithFloat_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithDouble_(double value) { + final _ret = _objc_msgSend_78(this.pointer, _sel_initWithDouble_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithBool_(bool value) { + final _ret = _objc_msgSend_79(this.pointer, _sel_initWithBool_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithInteger_(int value) { + final _ret = _objc_msgSend_73(this.pointer, _sel_initWithInteger_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithUnsignedInteger_(int value) { + final _ret = + _objc_msgSend_74(this.pointer, _sel_initWithUnsignedInteger_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + int get charValue { + return _objc_msgSend_80(this.pointer, _sel_charValue); + } + + int get unsignedCharValue { + return _objc_msgSend_81(this.pointer, _sel_unsignedCharValue); + } + + int get shortValue { + return _objc_msgSend_82(this.pointer, _sel_shortValue); + } + + int get unsignedShortValue { + return _objc_msgSend_83(this.pointer, _sel_unsignedShortValue); + } + + int get intValue { + return _objc_msgSend_84(this.pointer, _sel_intValue); + } + + int get unsignedIntValue { + return _objc_msgSend_85(this.pointer, _sel_unsignedIntValue); + } + + int get longValue { + return _objc_msgSend_86(this.pointer, _sel_longValue); + } + + int get unsignedLongValue { + return _objc_msgSend_12(this.pointer, _sel_unsignedLongValue); + } + + int get longLongValue { + return _objc_msgSend_87(this.pointer, _sel_longLongValue); + } + + int get unsignedLongLongValue { + return _objc_msgSend_88(this.pointer, _sel_unsignedLongLongValue); + } + + double get floatValue { + return objc.useMsgSendVariants + ? _objc_msgSend_89Fpret(this.pointer, _sel_floatValue) + : _objc_msgSend_89(this.pointer, _sel_floatValue); + } + + double get doubleValue { + return objc.useMsgSendVariants + ? _objc_msgSend_90Fpret(this.pointer, _sel_doubleValue) + : _objc_msgSend_90(this.pointer, _sel_doubleValue); + } + + bool get boolValue { + return _objc_msgSend_11(this.pointer, _sel_boolValue); + } + + int get integerValue { + return _objc_msgSend_86(this.pointer, _sel_integerValue); + } + + int get unsignedIntegerValue { + return _objc_msgSend_12(this.pointer, _sel_unsignedIntegerValue); + } + + NSString get stringValue { + final _ret = _objc_msgSend_32(this.pointer, _sel_stringValue); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + int compare_(NSNumber otherNumber) { + return _objc_msgSend_91(this.pointer, _sel_compare_, otherNumber.pointer); + } + + bool isEqualToNumber_(NSNumber number) { + return _objc_msgSend_92( + this.pointer, _sel_isEqualToNumber_, number.pointer); + } + + NSString descriptionWithLocale_(NSObject? locale) { + final _ret = _objc_msgSend_93(this.pointer, _sel_descriptionWithLocale_, + locale?.pointer ?? ffi.nullptr); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithChar_(int value) { + final _ret = _objc_msgSend_67(_class_NSNumber, _sel_numberWithChar_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithUnsignedChar_(int value) { + final _ret = + _objc_msgSend_68(_class_NSNumber, _sel_numberWithUnsignedChar_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithShort_(int value) { + final _ret = + _objc_msgSend_69(_class_NSNumber, _sel_numberWithShort_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithUnsignedShort_(int value) { + final _ret = + _objc_msgSend_70(_class_NSNumber, _sel_numberWithUnsignedShort_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithInt_(int value) { + final _ret = _objc_msgSend_71(_class_NSNumber, _sel_numberWithInt_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithUnsignedInt_(int value) { + final _ret = + _objc_msgSend_72(_class_NSNumber, _sel_numberWithUnsignedInt_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithLong_(int value) { + final _ret = _objc_msgSend_73(_class_NSNumber, _sel_numberWithLong_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithUnsignedLong_(int value) { + final _ret = + _objc_msgSend_74(_class_NSNumber, _sel_numberWithUnsignedLong_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithLongLong_(int value) { + final _ret = + _objc_msgSend_75(_class_NSNumber, _sel_numberWithLongLong_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithUnsignedLongLong_(int value) { + final _ret = _objc_msgSend_76( + _class_NSNumber, _sel_numberWithUnsignedLongLong_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithFloat_(double value) { + final _ret = + _objc_msgSend_77(_class_NSNumber, _sel_numberWithFloat_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithDouble_(double value) { + final _ret = + _objc_msgSend_78(_class_NSNumber, _sel_numberWithDouble_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithBool_(bool value) { + final _ret = _objc_msgSend_79(_class_NSNumber, _sel_numberWithBool_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithInteger_(int value) { + final _ret = + _objc_msgSend_73(_class_NSNumber, _sel_numberWithInteger_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithUnsignedInteger_(int value) { + final _ret = _objc_msgSend_74( + _class_NSNumber, _sel_numberWithUnsignedInteger_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSNumber initWithBytes_objCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _objc_msgSend_58( + this.pointer, _sel_initWithBytes_objCType_, value, type); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSValue valueWithBytes_objCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _objc_msgSend_59( + _class_NSNumber, _sel_valueWithBytes_objCType_, value, type); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + static NSValue value_withObjCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _objc_msgSend_59( + _class_NSNumber, _sel_value_withObjCType_, value, type); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + static NSValue valueWithNonretainedObject_(NSObject? anObject) { + final _ret = _objc_msgSend_60(_class_NSNumber, + _sel_valueWithNonretainedObject_, anObject?.pointer ?? ffi.nullptr); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + static NSValue valueWithPointer_(ffi.Pointer pointer) { + final _ret = + _objc_msgSend_62(_class_NSNumber, _sel_valueWithPointer_, pointer); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + static NSValue valueWithRange_(_NSRange range) { + final _ret = _objc_msgSend_65(_class_NSNumber, _sel_valueWithRange_, range); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSNumber init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber new1() { + final _ret = _objc_msgSend_2(_class_NSNumber, _sel_new); + return NSNumber.castFromPointer(_ret, retain: false, release: true); + } + + static NSNumber allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSNumber, _sel_allocWithZone_, zone); + return NSNumber.castFromPointer(_ret, retain: false, release: true); + } + + static NSNumber alloc() { + final _ret = _objc_msgSend_2(_class_NSNumber, _sel_alloc); + return NSNumber.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSNumber = objc.getClass("NSNumber"); + +class NSValue extends NSObject { + NSValue._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSValue] that points to the same underlying object as [other]. + NSValue.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSValue] that wraps the given raw object pointer. + NSValue.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSValue]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSValue); + } + + void getValue_size_(ffi.Pointer value, int size) { + _objc_msgSend_33(this.pointer, _sel_getValue_size_, value, size); + } + + ffi.Pointer get objCType { + return _objc_msgSend_57(this.pointer, _sel_objCType); + } + + NSValue initWithBytes_objCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _objc_msgSend_58( + this.pointer, _sel_initWithBytes_objCType_, value, type); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + NSValue? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSValue.castFromPointer(_ret, retain: true, release: true); + } + + static NSValue valueWithBytes_objCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _objc_msgSend_59( + _class_NSValue, _sel_valueWithBytes_objCType_, value, type); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + static NSValue value_withObjCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = + _objc_msgSend_59(_class_NSValue, _sel_value_withObjCType_, value, type); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + static NSValue valueWithNonretainedObject_(NSObject? anObject) { + final _ret = _objc_msgSend_60(_class_NSValue, + _sel_valueWithNonretainedObject_, anObject?.pointer ?? ffi.nullptr); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? get nonretainedObjectValue { + final _ret = _objc_msgSend_61(this.pointer, _sel_nonretainedObjectValue); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSValue valueWithPointer_(ffi.Pointer pointer) { + final _ret = + _objc_msgSend_62(_class_NSValue, _sel_valueWithPointer_, pointer); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + ffi.Pointer get pointerValue { + return _objc_msgSend_31(this.pointer, _sel_pointerValue); + } + + bool isEqualToValue_(NSValue value) { + return _objc_msgSend_63(this.pointer, _sel_isEqualToValue_, value.pointer); + } + + void getValue_(ffi.Pointer value) { + _objc_msgSend_64(this.pointer, _sel_getValue_, value); + } + + static NSValue valueWithRange_(_NSRange range) { + final _ret = _objc_msgSend_65(_class_NSValue, _sel_valueWithRange_, range); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + void getRangeValue(ffi.Pointer<_NSRange> stret) { + objc.useMsgSendVariants + ? _objc_msgSend_66Stret(stret, this.pointer, _sel_rangeValue) + : stret.ref = _objc_msgSend_66(this.pointer, _sel_rangeValue); + } + + @override + NSValue init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + static NSValue new1() { + final _ret = _objc_msgSend_2(_class_NSValue, _sel_new); + return NSValue.castFromPointer(_ret, retain: false, release: true); + } + + static NSValue allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSValue, _sel_allocWithZone_, zone); + return NSValue.castFromPointer(_ret, retain: false, release: true); + } + + static NSValue alloc() { + final _ret = _objc_msgSend_2(_class_NSValue, _sel_alloc); + return NSValue.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSValue = objc.getClass("NSValue"); +late final _sel_getValue_size_ = objc.registerName("getValue:size:"); +late final _sel_objCType = objc.registerName("objCType"); +final _objc_msgSend_57 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithBytes_objCType_ = + objc.registerName("initWithBytes:objCType:"); +final _objc_msgSend_58 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_valueWithBytes_objCType_ = + objc.registerName("valueWithBytes:objCType:"); +final _objc_msgSend_59 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_value_withObjCType_ = objc.registerName("value:withObjCType:"); +late final _sel_valueWithNonretainedObject_ = + objc.registerName("valueWithNonretainedObject:"); +final _objc_msgSend_60 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_nonretainedObjectValue = + objc.registerName("nonretainedObjectValue"); +final _objc_msgSend_61 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_valueWithPointer_ = objc.registerName("valueWithPointer:"); +final _objc_msgSend_62 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_pointerValue = objc.registerName("pointerValue"); +late final _sel_isEqualToValue_ = objc.registerName("isEqualToValue:"); +final _objc_msgSend_63 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_getValue_ = objc.registerName("getValue:"); +final _objc_msgSend_64 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_valueWithRange_ = objc.registerName("valueWithRange:"); +final _objc_msgSend_65 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_rangeValue = objc.registerName("rangeValue"); +final _objc_msgSend_66 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_66Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithChar_ = objc.registerName("initWithChar:"); +final _objc_msgSend_67 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Char)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_initWithUnsignedChar_ = + objc.registerName("initWithUnsignedChar:"); +final _objc_msgSend_68 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedChar)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_initWithShort_ = objc.registerName("initWithShort:"); +final _objc_msgSend_69 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Short)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_initWithUnsignedShort_ = + objc.registerName("initWithUnsignedShort:"); +final _objc_msgSend_70 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedShort)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_initWithInt_ = objc.registerName("initWithInt:"); +final _objc_msgSend_71 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_initWithUnsignedInt_ = + objc.registerName("initWithUnsignedInt:"); +final _objc_msgSend_72 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_initWithLong_ = objc.registerName("initWithLong:"); +final _objc_msgSend_73 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_initWithUnsignedLong_ = + objc.registerName("initWithUnsignedLong:"); +final _objc_msgSend_74 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_initWithLongLong_ = objc.registerName("initWithLongLong:"); +final _objc_msgSend_75 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.LongLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_initWithUnsignedLongLong_ = + objc.registerName("initWithUnsignedLongLong:"); +final _objc_msgSend_76 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLongLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_initWithFloat_ = objc.registerName("initWithFloat:"); +final _objc_msgSend_77 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Float)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, double)>(); +late final _sel_initWithDouble_ = objc.registerName("initWithDouble:"); +final _objc_msgSend_78 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, double)>(); +late final _sel_initWithBool_ = objc.registerName("initWithBool:"); +final _objc_msgSend_79 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, bool)>(); +late final _sel_initWithInteger_ = objc.registerName("initWithInteger:"); +late final _sel_initWithUnsignedInteger_ = + objc.registerName("initWithUnsignedInteger:"); +late final _sel_charValue = objc.registerName("charValue"); +final _objc_msgSend_80 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Char Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_unsignedCharValue = objc.registerName("unsignedCharValue"); +final _objc_msgSend_81 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedChar Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_shortValue = objc.registerName("shortValue"); +final _objc_msgSend_82 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Short Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_unsignedShortValue = objc.registerName("unsignedShortValue"); +final _objc_msgSend_83 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedShort Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_intValue = objc.registerName("intValue"); +final _objc_msgSend_84 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_unsignedIntValue = objc.registerName("unsignedIntValue"); +final _objc_msgSend_85 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedInt Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_longValue = objc.registerName("longValue"); +final _objc_msgSend_86 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_unsignedLongValue = objc.registerName("unsignedLongValue"); +late final _sel_longLongValue = objc.registerName("longLongValue"); +final _objc_msgSend_87 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.LongLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_unsignedLongLongValue = + objc.registerName("unsignedLongLongValue"); +final _objc_msgSend_88 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLongLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_floatValue = objc.registerName("floatValue"); +final _objc_msgSend_89 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_89Fpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_doubleValue = objc.registerName("doubleValue"); +final _objc_msgSend_90 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_90Fpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_boolValue = objc.registerName("boolValue"); +late final _sel_integerValue = objc.registerName("integerValue"); +late final _sel_unsignedIntegerValue = + objc.registerName("unsignedIntegerValue"); +late final _sel_stringValue = objc.registerName("stringValue"); +final _objc_msgSend_91 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isEqualToNumber_ = objc.registerName("isEqualToNumber:"); +final _objc_msgSend_92 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_descriptionWithLocale_ = + objc.registerName("descriptionWithLocale:"); +final _objc_msgSend_93 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_numberWithChar_ = objc.registerName("numberWithChar:"); +late final _sel_numberWithUnsignedChar_ = + objc.registerName("numberWithUnsignedChar:"); +late final _sel_numberWithShort_ = objc.registerName("numberWithShort:"); +late final _sel_numberWithUnsignedShort_ = + objc.registerName("numberWithUnsignedShort:"); +late final _sel_numberWithInt_ = objc.registerName("numberWithInt:"); +late final _sel_numberWithUnsignedInt_ = + objc.registerName("numberWithUnsignedInt:"); +late final _sel_numberWithLong_ = objc.registerName("numberWithLong:"); +late final _sel_numberWithUnsignedLong_ = + objc.registerName("numberWithUnsignedLong:"); +late final _sel_numberWithLongLong_ = objc.registerName("numberWithLongLong:"); +late final _sel_numberWithUnsignedLongLong_ = + objc.registerName("numberWithUnsignedLongLong:"); +late final _sel_numberWithFloat_ = objc.registerName("numberWithFloat:"); +late final _sel_numberWithDouble_ = objc.registerName("numberWithDouble:"); +late final _sel_numberWithBool_ = objc.registerName("numberWithBool:"); +late final _sel_numberWithInteger_ = objc.registerName("numberWithInteger:"); +late final _sel_numberWithUnsignedInteger_ = + objc.registerName("numberWithUnsignedInteger:"); +late final _sel_port = objc.registerName("port"); +final _objc_msgSend_94 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_user = objc.registerName("user"); +late final _sel_password = objc.registerName("password"); +late final _sel_path = objc.registerName("path"); +late final _sel_fragment = objc.registerName("fragment"); +late final _sel_parameterString = objc.registerName("parameterString"); +late final _sel_query = objc.registerName("query"); +late final _sel_relativePath = objc.registerName("relativePath"); +late final _sel_hasDirectoryPath = objc.registerName("hasDirectoryPath"); +late final _sel_getFileSystemRepresentation_maxLength_ = + objc.registerName("getFileSystemRepresentation:maxLength:"); +final _objc_msgSend_95 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); +late final _sel_fileSystemRepresentation = + objc.registerName("fileSystemRepresentation"); +late final _sel_isFileURL = objc.registerName("isFileURL"); +late final _sel_standardizedURL = objc.registerName("standardizedURL"); +late final _sel_isFileReferenceURL = objc.registerName("isFileReferenceURL"); +late final _sel_fileReferenceURL = objc.registerName("fileReferenceURL"); +late final _sel_filePathURL = objc.registerName("filePathURL"); + +class NSError extends objc.ObjCObjectBase { + NSError._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [NSError] that points to the same underlying object as [other]. + NSError.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSError] that wraps the given raw object pointer. + NSError.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSError]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSError); + } +} + +late final _class_NSError = objc.getClass("NSError"); +late final _sel_getResourceValue_forKey_error_ = + objc.registerName("getResourceValue:forKey:error:"); +final _objc_msgSend_96 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>)>(); + +class NSArray extends NSObject { + NSArray._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSArray] that points to the same underlying object as [other]. + NSArray.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSArray] that wraps the given raw object pointer. + NSArray.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSArray]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSArray); + } + + int get count { + return _objc_msgSend_12(this.pointer, _sel_count); + } + + NSObject objectAtIndex_(int index) { + final _ret = _objc_msgSend_97(this.pointer, _sel_objectAtIndex_, index); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSArray init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_98( + this.pointer, _sel_initWithObjects_count_, objects, cnt); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray arrayByAddingObject_(NSObject anObject) { + final _ret = _objc_msgSend_99( + this.pointer, _sel_arrayByAddingObject_, anObject.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray arrayByAddingObjectsFromArray_(NSArray otherArray) { + final _ret = _objc_msgSend_100( + this.pointer, _sel_arrayByAddingObjectsFromArray_, otherArray.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSString componentsJoinedByString_(NSString separator) { + final _ret = _objc_msgSend_101( + this.pointer, _sel_componentsJoinedByString_, separator.pointer); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + bool containsObject_(NSObject anObject) { + return _objc_msgSend_0( + this.pointer, _sel_containsObject_, anObject.pointer); + } + + NSString get description { + final _ret = _objc_msgSend_32(this.pointer, _sel_description); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString descriptionWithLocale_(NSObject? locale) { + final _ret = _objc_msgSend_93(this.pointer, _sel_descriptionWithLocale_, + locale?.pointer ?? ffi.nullptr); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString descriptionWithLocale_indent_(NSObject? locale, int level) { + final _ret = _objc_msgSend_102( + this.pointer, + _sel_descriptionWithLocale_indent_, + locale?.pointer ?? ffi.nullptr, + level); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? firstObjectCommonWithArray_(NSArray otherArray) { + final _ret = _objc_msgSend_103( + this.pointer, _sel_firstObjectCommonWithArray_, otherArray.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + void getObjects_range_( + ffi.Pointer> objects, _NSRange range) { + _objc_msgSend_104(this.pointer, _sel_getObjects_range_, objects, range); + } + + int indexOfObject_(NSObject anObject) { + return _objc_msgSend_105( + this.pointer, _sel_indexOfObject_, anObject.pointer); + } + + int indexOfObject_inRange_(NSObject anObject, _NSRange range) { + return _objc_msgSend_106( + this.pointer, _sel_indexOfObject_inRange_, anObject.pointer, range); + } + + int indexOfObjectIdenticalTo_(NSObject anObject) { + return _objc_msgSend_105( + this.pointer, _sel_indexOfObjectIdenticalTo_, anObject.pointer); + } + + int indexOfObjectIdenticalTo_inRange_(NSObject anObject, _NSRange range) { + return _objc_msgSend_106(this.pointer, + _sel_indexOfObjectIdenticalTo_inRange_, anObject.pointer, range); + } + + bool isEqualToArray_(NSArray otherArray) { + return _objc_msgSend_107( + this.pointer, _sel_isEqualToArray_, otherArray.pointer); + } + + NSObject? get firstObject { + final _ret = _objc_msgSend_61(this.pointer, _sel_firstObject); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? get lastObject { + final _ret = _objc_msgSend_61(this.pointer, _sel_lastObject); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSEnumerator objectEnumerator() { + final _ret = _objc_msgSend_108(this.pointer, _sel_objectEnumerator); + return NSEnumerator.castFromPointer(_ret, retain: true, release: true); + } + + NSEnumerator reverseObjectEnumerator() { + final _ret = _objc_msgSend_108(this.pointer, _sel_reverseObjectEnumerator); + return NSEnumerator.castFromPointer(_ret, retain: true, release: true); + } + + NSData get sortedArrayHint { + final _ret = _objc_msgSend_54(this.pointer, _sel_sortedArrayHint); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSArray sortedArrayUsingFunction_context_( + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context) { + final _ret = _objc_msgSend_109(this.pointer, + _sel_sortedArrayUsingFunction_context_, comparator, context); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray sortedArrayUsingFunction_context_hint_( + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context, + NSData? hint) { + final _ret = _objc_msgSend_110( + this.pointer, + _sel_sortedArrayUsingFunction_context_hint_, + comparator, + context, + hint?.pointer ?? ffi.nullptr); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray sortedArrayUsingSelector_(ffi.Pointer comparator) { + final _ret = _objc_msgSend_111( + this.pointer, _sel_sortedArrayUsingSelector_, comparator); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray subarrayWithRange_(_NSRange range) { + final _ret = + _objc_msgSend_112(this.pointer, _sel_subarrayWithRange_, range); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + bool writeToURL_error_( + NSURL url, ffi.Pointer> error) { + return _objc_msgSend_113( + this.pointer, _sel_writeToURL_error_, url.pointer, error); + } + + void makeObjectsPerformSelector_(ffi.Pointer aSelector) { + _objc_msgSend_7(this.pointer, _sel_makeObjectsPerformSelector_, aSelector); + } + + void makeObjectsPerformSelector_withObject_( + ffi.Pointer aSelector, NSObject? argument) { + _objc_msgSend_114(this.pointer, _sel_makeObjectsPerformSelector_withObject_, + aSelector, argument?.pointer ?? ffi.nullptr); + } + + NSArray objectsAtIndexes_(NSIndexSet indexes) { + final _ret = _objc_msgSend_135( + this.pointer, _sel_objectsAtIndexes_, indexes.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSObject objectAtIndexedSubscript_(int idx) { + final _ret = + _objc_msgSend_97(this.pointer, _sel_objectAtIndexedSubscript_, idx); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + void enumerateObjectsUsingBlock_( + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { + _objc_msgSend_136( + this.pointer, _sel_enumerateObjectsUsingBlock_, block.pointer); + } + + void enumerateObjectsWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { + _objc_msgSend_137(this.pointer, + _sel_enumerateObjectsWithOptions_usingBlock_, opts, block.pointer); + } + + void enumerateObjectsAtIndexes_options_usingBlock_(NSIndexSet s, int opts, + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { + _objc_msgSend_138( + this.pointer, + _sel_enumerateObjectsAtIndexes_options_usingBlock_, + s.pointer, + opts, + block.pointer); + } + + int indexOfObjectPassingTest_( + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_139( + this.pointer, _sel_indexOfObjectPassingTest_, predicate.pointer); + } + + int indexOfObjectWithOptions_passingTest_( + int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_140(this.pointer, + _sel_indexOfObjectWithOptions_passingTest_, opts, predicate.pointer); + } + + int indexOfObjectAtIndexes_options_passingTest_(NSIndexSet s, int opts, + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_141( + this.pointer, + _sel_indexOfObjectAtIndexes_options_passingTest_, + s.pointer, + opts, + predicate.pointer); + } + + NSIndexSet indexesOfObjectsPassingTest_( + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_142( + this.pointer, _sel_indexesOfObjectsPassingTest_, predicate.pointer); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + NSIndexSet indexesOfObjectsWithOptions_passingTest_( + int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_143(this.pointer, + _sel_indexesOfObjectsWithOptions_passingTest_, opts, predicate.pointer); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_(NSIndexSet s, + int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_144( + this.pointer, + _sel_indexesOfObjectsAtIndexes_options_passingTest_, + s.pointer, + opts, + predicate.pointer); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + NSArray sortedArrayUsingComparator_( + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + final _ret = _objc_msgSend_145( + this.pointer, _sel_sortedArrayUsingComparator_, cmptr.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray sortedArrayWithOptions_usingComparator_(int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + final _ret = _objc_msgSend_146(this.pointer, + _sel_sortedArrayWithOptions_usingComparator_, opts, cmptr.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + int indexOfObject_inSortedRange_options_usingComparator_( + NSObject obj, + _NSRange r, + int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmp) { + return _objc_msgSend_147( + this.pointer, + _sel_indexOfObject_inSortedRange_options_usingComparator_, + obj.pointer, + r, + opts, + cmp.pointer); + } + + static NSArray array() { + final _ret = _objc_msgSend_2(_class_NSArray, _sel_array); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSArray arrayWithObject_(NSObject anObject) { + final _ret = _objc_msgSend_148( + _class_NSArray, _sel_arrayWithObject_, anObject.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSArray arrayWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_98( + _class_NSArray, _sel_arrayWithObjects_count_, objects, cnt); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSArray arrayWithObjects_(NSObject firstObj) { + final _ret = _objc_msgSend_148( + _class_NSArray, _sel_arrayWithObjects_, firstObj.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSArray arrayWithArray_(NSArray array) { + final _ret = + _objc_msgSend_149(_class_NSArray, _sel_arrayWithArray_, array.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray initWithObjects_(NSObject firstObj) { + final _ret = _objc_msgSend_148( + this.pointer, _sel_initWithObjects_, firstObj.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray initWithArray_(NSArray array) { + final _ret = + _objc_msgSend_149(this.pointer, _sel_initWithArray_, array.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray initWithArray_copyItems_(NSArray array, bool flag) { + final _ret = _objc_msgSend_150( + this.pointer, _sel_initWithArray_copyItems_, array.pointer, flag); + return NSArray.castFromPointer(_ret, retain: false, release: true); + } + + NSArray? initWithContentsOfURL_error_( + NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_151( + this.pointer, _sel_initWithContentsOfURL_error_, url.pointer, error); + return _ret.address == 0 + ? null + : NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSArray? arrayWithContentsOfURL_error_( + NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_151( + _class_NSArray, _sel_arrayWithContentsOfURL_error_, url.pointer, error); + return _ret.address == 0 + ? null + : NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSObject differenceFromArray_withOptions_usingEquivalenceTest_(NSArray other, + int options, ObjCBlock_bool_objcObjCObject_objcObjCObject block) { + final _ret = _objc_msgSend_152( + this.pointer, + _sel_differenceFromArray_withOptions_usingEquivalenceTest_, + other.pointer, + options, + block.pointer); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject differenceFromArray_withOptions_(NSArray other, int options) { + final _ret = _objc_msgSend_153(this.pointer, + _sel_differenceFromArray_withOptions_, other.pointer, options); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject differenceFromArray_(NSArray other) { + final _ret = _objc_msgSend_149( + this.pointer, _sel_differenceFromArray_, other.pointer); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSArray? arrayByApplyingDifference_(NSObject difference) { + final _ret = _objc_msgSend_154( + this.pointer, _sel_arrayByApplyingDifference_, difference.pointer); + return _ret.address == 0 + ? null + : NSArray.castFromPointer(_ret, retain: true, release: true); + } + + void getObjects_(ffi.Pointer> objects) { + _objc_msgSend_155(this.pointer, _sel_getObjects_, objects); + } + + static NSArray? arrayWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_156( + _class_NSArray, _sel_arrayWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSArray? arrayWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_157( + _class_NSArray, _sel_arrayWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray? initWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_156( + this.pointer, _sel_initWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray? initWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_157( + this.pointer, _sel_initWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSArray.castFromPointer(_ret, retain: true, release: true); + } + + bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { + return _objc_msgSend_37(this.pointer, _sel_writeToFile_atomically_, + path.pointer, useAuxiliaryFile); + } + + bool writeToURL_atomically_(NSURL url, bool atomically) { + return _objc_msgSend_158( + this.pointer, _sel_writeToURL_atomically_, url.pointer, atomically); + } + + static NSArray new1() { + final _ret = _objc_msgSend_2(_class_NSArray, _sel_new); + return NSArray.castFromPointer(_ret, retain: false, release: true); + } + + static NSArray allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSArray, _sel_allocWithZone_, zone); + return NSArray.castFromPointer(_ret, retain: false, release: true); + } + + static NSArray alloc() { + final _ret = _objc_msgSend_2(_class_NSArray, _sel_alloc); + return NSArray.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSArray = objc.getClass("NSArray"); +late final _sel_count = objc.registerName("count"); +late final _sel_objectAtIndex_ = objc.registerName("objectAtIndex:"); +final _objc_msgSend_97 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_initWithObjects_count_ = + objc.registerName("initWithObjects:count:"); +final _objc_msgSend_98 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>(); +late final _sel_arrayByAddingObject_ = + objc.registerName("arrayByAddingObject:"); +final _objc_msgSend_99 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_arrayByAddingObjectsFromArray_ = + objc.registerName("arrayByAddingObjectsFromArray:"); +final _objc_msgSend_100 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_componentsJoinedByString_ = + objc.registerName("componentsJoinedByString:"); +final _objc_msgSend_101 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_containsObject_ = objc.registerName("containsObject:"); +late final _sel_descriptionWithLocale_indent_ = + objc.registerName("descriptionWithLocale:indent:"); +final _objc_msgSend_102 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_firstObjectCommonWithArray_ = + objc.registerName("firstObjectCommonWithArray:"); +final _objc_msgSend_103 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_getObjects_range_ = objc.registerName("getObjects:range:"); +final _objc_msgSend_104 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + _NSRange)>(); +late final _sel_indexOfObject_ = objc.registerName("indexOfObject:"); +final _objc_msgSend_105 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_indexOfObject_inRange_ = + objc.registerName("indexOfObject:inRange:"); +final _objc_msgSend_106 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); +late final _sel_indexOfObjectIdenticalTo_ = + objc.registerName("indexOfObjectIdenticalTo:"); +late final _sel_indexOfObjectIdenticalTo_inRange_ = + objc.registerName("indexOfObjectIdenticalTo:inRange:"); +late final _sel_isEqualToArray_ = objc.registerName("isEqualToArray:"); +final _objc_msgSend_107 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_firstObject = objc.registerName("firstObject"); +late final _sel_lastObject = objc.registerName("lastObject"); + +class NSEnumerator extends NSObject { + NSEnumerator._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSEnumerator] that points to the same underlying object as [other]. + NSEnumerator.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSEnumerator] that wraps the given raw object pointer. + NSEnumerator.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSEnumerator]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSEnumerator); + } + + NSObject? nextObject() { + final _ret = _objc_msgSend_61(this.pointer, _sel_nextObject); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject get allObjects { + final _ret = _objc_msgSend_2(this.pointer, _sel_allObjects); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSEnumerator init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSEnumerator.castFromPointer(_ret, retain: true, release: true); + } + + static NSEnumerator new1() { + final _ret = _objc_msgSend_2(_class_NSEnumerator, _sel_new); + return NSEnumerator.castFromPointer(_ret, retain: false, release: true); + } + + static NSEnumerator allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_3(_class_NSEnumerator, _sel_allocWithZone_, zone); + return NSEnumerator.castFromPointer(_ret, retain: false, release: true); + } + + static NSEnumerator alloc() { + final _ret = _objc_msgSend_2(_class_NSEnumerator, _sel_alloc); + return NSEnumerator.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSEnumerator = objc.getClass("NSEnumerator"); +late final _sel_nextObject = objc.registerName("nextObject"); +late final _sel_allObjects = objc.registerName("allObjects"); +late final _sel_objectEnumerator = objc.registerName("objectEnumerator"); +final _objc_msgSend_108 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_reverseObjectEnumerator = + objc.registerName("reverseObjectEnumerator"); +late final _sel_sortedArrayHint = objc.registerName("sortedArrayHint"); +late final _sel_sortedArrayUsingFunction_context_ = + objc.registerName("sortedArrayUsingFunction:context:"); +final _objc_msgSend_109 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>(); +late final _sel_sortedArrayUsingFunction_context_hint_ = + objc.registerName("sortedArrayUsingFunction:context:hint:"); +final _objc_msgSend_110 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_sortedArrayUsingSelector_ = + objc.registerName("sortedArrayUsingSelector:"); +final _objc_msgSend_111 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_subarrayWithRange_ = objc.registerName("subarrayWithRange:"); +final _objc_msgSend_112 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_writeToURL_error_ = objc.registerName("writeToURL:error:"); +final _objc_msgSend_113 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_makeObjectsPerformSelector_ = + objc.registerName("makeObjectsPerformSelector:"); +late final _sel_makeObjectsPerformSelector_withObject_ = + objc.registerName("makeObjectsPerformSelector:withObject:"); +final _objc_msgSend_114 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +class NSIndexSet extends NSObject { + NSIndexSet._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSIndexSet] that points to the same underlying object as [other]. + NSIndexSet.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSIndexSet] that wraps the given raw object pointer. + NSIndexSet.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSIndexSet]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSIndexSet); + } + + static NSIndexSet indexSet() { + final _ret = _objc_msgSend_2(_class_NSIndexSet, _sel_indexSet); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSIndexSet indexSetWithIndex_(int value) { + final _ret = + _objc_msgSend_97(_class_NSIndexSet, _sel_indexSetWithIndex_, value); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSIndexSet indexSetWithIndexesInRange_(_NSRange range) { + final _ret = _objc_msgSend_115( + _class_NSIndexSet, _sel_indexSetWithIndexesInRange_, range); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + NSIndexSet initWithIndexesInRange_(_NSRange range) { + final _ret = + _objc_msgSend_115(this.pointer, _sel_initWithIndexesInRange_, range); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + NSIndexSet initWithIndexSet_(NSIndexSet indexSet) { + final _ret = _objc_msgSend_116( + this.pointer, _sel_initWithIndexSet_, indexSet.pointer); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + NSIndexSet initWithIndex_(int value) { + final _ret = _objc_msgSend_97(this.pointer, _sel_initWithIndex_, value); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + bool isEqualToIndexSet_(NSIndexSet indexSet) { + return _objc_msgSend_117( + this.pointer, _sel_isEqualToIndexSet_, indexSet.pointer); + } + + int get count { + return _objc_msgSend_12(this.pointer, _sel_count); + } + + int get firstIndex { + return _objc_msgSend_12(this.pointer, _sel_firstIndex); + } + + int get lastIndex { + return _objc_msgSend_12(this.pointer, _sel_lastIndex); + } + + int indexGreaterThanIndex_(int value) { + return _objc_msgSend_118(this.pointer, _sel_indexGreaterThanIndex_, value); + } + + int indexLessThanIndex_(int value) { + return _objc_msgSend_118(this.pointer, _sel_indexLessThanIndex_, value); + } + + int indexGreaterThanOrEqualToIndex_(int value) { + return _objc_msgSend_118( + this.pointer, _sel_indexGreaterThanOrEqualToIndex_, value); + } + + int indexLessThanOrEqualToIndex_(int value) { + return _objc_msgSend_118( + this.pointer, _sel_indexLessThanOrEqualToIndex_, value); + } + + int getIndexes_maxCount_inIndexRange_( + ffi.Pointer indexBuffer, + int bufferSize, + ffi.Pointer<_NSRange> range) { + return _objc_msgSend_119(this.pointer, + _sel_getIndexes_maxCount_inIndexRange_, indexBuffer, bufferSize, range); + } + + int countOfIndexesInRange_(_NSRange range) { + return _objc_msgSend_120(this.pointer, _sel_countOfIndexesInRange_, range); + } + + bool containsIndex_(int value) { + return _objc_msgSend_121(this.pointer, _sel_containsIndex_, value); + } + + bool containsIndexesInRange_(_NSRange range) { + return _objc_msgSend_122(this.pointer, _sel_containsIndexesInRange_, range); + } + + bool containsIndexes_(NSIndexSet indexSet) { + return _objc_msgSend_117( + this.pointer, _sel_containsIndexes_, indexSet.pointer); + } + + bool intersectsIndexesInRange_(_NSRange range) { + return _objc_msgSend_122( + this.pointer, _sel_intersectsIndexesInRange_, range); + } + + void enumerateIndexesUsingBlock_( + ObjCBlock_ffiVoid_ffiUnsignedLong_bool block) { + _objc_msgSend_123( + this.pointer, _sel_enumerateIndexesUsingBlock_, block.pointer); + } + + void enumerateIndexesWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_ffiUnsignedLong_bool block) { + _objc_msgSend_124(this.pointer, + _sel_enumerateIndexesWithOptions_usingBlock_, opts, block.pointer); + } + + void enumerateIndexesInRange_options_usingBlock_( + _NSRange range, int opts, ObjCBlock_ffiVoid_ffiUnsignedLong_bool block) { + _objc_msgSend_125( + this.pointer, + _sel_enumerateIndexesInRange_options_usingBlock_, + range, + opts, + block.pointer); + } + + int indexPassingTest_(ObjCBlock_bool_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_126( + this.pointer, _sel_indexPassingTest_, predicate.pointer); + } + + int indexWithOptions_passingTest_( + int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_127(this.pointer, _sel_indexWithOptions_passingTest_, + opts, predicate.pointer); + } + + int indexInRange_options_passingTest_( + _NSRange range, int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_128(this.pointer, + _sel_indexInRange_options_passingTest_, range, opts, predicate.pointer); + } + + NSIndexSet indexesPassingTest_( + ObjCBlock_bool_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_129( + this.pointer, _sel_indexesPassingTest_, predicate.pointer); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + NSIndexSet indexesWithOptions_passingTest_( + int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_130(this.pointer, + _sel_indexesWithOptions_passingTest_, opts, predicate.pointer); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + NSIndexSet indexesInRange_options_passingTest_( + _NSRange range, int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_131( + this.pointer, + _sel_indexesInRange_options_passingTest_, + range, + opts, + predicate.pointer); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + void enumerateRangesUsingBlock_(ObjCBlock_ffiVoid_NSRange_bool block) { + _objc_msgSend_132( + this.pointer, _sel_enumerateRangesUsingBlock_, block.pointer); + } + + void enumerateRangesWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_NSRange_bool block) { + _objc_msgSend_133(this.pointer, _sel_enumerateRangesWithOptions_usingBlock_, + opts, block.pointer); + } + + void enumerateRangesInRange_options_usingBlock_( + _NSRange range, int opts, ObjCBlock_ffiVoid_NSRange_bool block) { + _objc_msgSend_134( + this.pointer, + _sel_enumerateRangesInRange_options_usingBlock_, + range, + opts, + block.pointer); + } + + @override + NSIndexSet init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSIndexSet new1() { + final _ret = _objc_msgSend_2(_class_NSIndexSet, _sel_new); + return NSIndexSet.castFromPointer(_ret, retain: false, release: true); + } + + static NSIndexSet allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSIndexSet, _sel_allocWithZone_, zone); + return NSIndexSet.castFromPointer(_ret, retain: false, release: true); + } + + static NSIndexSet alloc() { + final _ret = _objc_msgSend_2(_class_NSIndexSet, _sel_alloc); + return NSIndexSet.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSIndexSet = objc.getClass("NSIndexSet"); +late final _sel_indexSet = objc.registerName("indexSet"); +late final _sel_indexSetWithIndex_ = objc.registerName("indexSetWithIndex:"); +late final _sel_indexSetWithIndexesInRange_ = + objc.registerName("indexSetWithIndexesInRange:"); +final _objc_msgSend_115 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_initWithIndexesInRange_ = + objc.registerName("initWithIndexesInRange:"); +late final _sel_initWithIndexSet_ = objc.registerName("initWithIndexSet:"); +final _objc_msgSend_116 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithIndex_ = objc.registerName("initWithIndex:"); +late final _sel_isEqualToIndexSet_ = objc.registerName("isEqualToIndexSet:"); +final _objc_msgSend_117 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_firstIndex = objc.registerName("firstIndex"); +late final _sel_lastIndex = objc.registerName("lastIndex"); +late final _sel_indexGreaterThanIndex_ = + objc.registerName("indexGreaterThanIndex:"); +final _objc_msgSend_118 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_indexLessThanIndex_ = objc.registerName("indexLessThanIndex:"); +late final _sel_indexGreaterThanOrEqualToIndex_ = + objc.registerName("indexGreaterThanOrEqualToIndex:"); +late final _sel_indexLessThanOrEqualToIndex_ = + objc.registerName("indexLessThanOrEqualToIndex:"); +late final _sel_getIndexes_maxCount_inIndexRange_ = + objc.registerName("getIndexes:maxCount:inIndexRange:"); +final _objc_msgSend_119 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer<_NSRange>)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_NSRange>)>(); +late final _sel_countOfIndexesInRange_ = + objc.registerName("countOfIndexesInRange:"); +final _objc_msgSend_120 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_containsIndex_ = objc.registerName("containsIndex:"); +final _objc_msgSend_121 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_containsIndexesInRange_ = + objc.registerName("containsIndexesInRange:"); +final _objc_msgSend_122 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_containsIndexes_ = objc.registerName("containsIndexes:"); +late final _sel_intersectsIndexesInRange_ = + objc.registerName("intersectsIndexesInRange:"); +void _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_fnPtrTrampoline( + ffi.Pointer block, + int arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() + .asFunction)>()(arg0, arg1); +void _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureTrampoline( + ffi.Pointer block, + int arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function(int, ffi.Pointer))( + arg0, arg1); + +class ObjCBlock_ffiVoid_ffiUnsignedLong_bool extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_ffiUnsignedLong_bool._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_ffiUnsignedLong_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_ffiUnsignedLong_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiUnsignedLong_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.UnsignedLong arg0, ffi.Pointer arg1)>> + ptr) + : this._(objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiUnsignedLong_bool.fromFunction( + void Function(int, ffi.Pointer) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureTrampoline) + .cast(), + (int arg0, ffi.Pointer arg1) => fn(arg0, arg1))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ffiUnsignedLong_bool.listener( + void Function(int, ffi.Pointer) fn) + : this._(objc.newClosureBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + (int arg0, ffi.Pointer arg1) => fn(arg0, arg1))); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(int arg0, ffi.Pointer arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, int, + ffi.Pointer)>()(pointer, arg0, arg1); +} + +late final _sel_enumerateIndexesUsingBlock_ = + objc.registerName("enumerateIndexesUsingBlock:"); +final _objc_msgSend_123 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSEnumerationOptions { + static const int NSEnumerationConcurrent = 1; + static const int NSEnumerationReverse = 2; +} + +late final _sel_enumerateIndexesWithOptions_usingBlock_ = + objc.registerName("enumerateIndexesWithOptions:usingBlock:"); +final _objc_msgSend_124 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_enumerateIndexesInRange_options_usingBlock_ = + objc.registerName("enumerateIndexesInRange:options:usingBlock:"); +final _objc_msgSend_125 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); +bool _ObjCBlock_bool_ffiUnsignedLong_bool_fnPtrTrampoline( + ffi.Pointer block, + int arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() + .asFunction)>()(arg0, arg1); +bool _ObjCBlock_bool_ffiUnsignedLong_bool_closureTrampoline( + ffi.Pointer block, + int arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as bool Function(int, ffi.Pointer))( + arg0, arg1); + +class ObjCBlock_bool_ffiUnsignedLong_bool extends objc.ObjCBlockBase { + ObjCBlock_bool_ffiUnsignedLong_bool._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_bool_ffiUnsignedLong_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_bool_ffiUnsignedLong_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_ffiUnsignedLong_bool.fromFunctionPointer( + ffi.Pointer< + ffi + .NativeFunction< + ffi.Bool Function( + ffi.UnsignedLong arg0, ffi.Pointer arg1)>> + ptr) + : this._(objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>( + _ObjCBlock_bool_ffiUnsignedLong_bool_fnPtrTrampoline, false) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_ffiUnsignedLong_bool.fromFunction( + bool Function(int, ffi.Pointer) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>( + _ObjCBlock_bool_ffiUnsignedLong_bool_closureTrampoline, + false) + .cast(), + (int arg0, ffi.Pointer arg1) => fn(arg0, arg1))); + static ffi.Pointer? _dartFuncTrampoline; + + bool call(int arg0, ffi.Pointer arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer block, + ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer, int, + ffi.Pointer)>()(pointer, arg0, arg1); +} + +late final _sel_indexPassingTest_ = objc.registerName("indexPassingTest:"); +final _objc_msgSend_126 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_indexWithOptions_passingTest_ = + objc.registerName("indexWithOptions:passingTest:"); +final _objc_msgSend_127 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_indexInRange_options_passingTest_ = + objc.registerName("indexInRange:options:passingTest:"); +final _objc_msgSend_128 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); +late final _sel_indexesPassingTest_ = objc.registerName("indexesPassingTest:"); +final _objc_msgSend_129 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_indexesWithOptions_passingTest_ = + objc.registerName("indexesWithOptions:passingTest:"); +final _objc_msgSend_130 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_indexesInRange_options_passingTest_ = + objc.registerName("indexesInRange:options:passingTest:"); +final _objc_msgSend_131 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSRange_bool_fnPtrTrampoline( + ffi.Pointer block, + _NSRange arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(_NSRange arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(_NSRange, ffi.Pointer)>()(arg0, arg1); +void _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline( + ffi.Pointer block, + _NSRange arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function( + _NSRange, ffi.Pointer))(arg0, arg1); + +class ObjCBlock_ffiVoid_NSRange_bool extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSRange_bool._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSRange_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSRange_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSRange_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(_NSRange arg0, ffi.Pointer arg1)>> + ptr) + : this._(objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSRange_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSRange_bool.fromFunction( + void Function(_NSRange, ffi.Pointer) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline) + .cast(), + (_NSRange arg0, ffi.Pointer arg1) => fn(arg0, arg1))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSRange_bool.listener( + void Function(_NSRange, ffi.Pointer) fn) + : this._(objc.newClosureBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, _NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + (_NSRange arg0, ffi.Pointer arg1) => fn(arg0, arg1))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, _NSRange, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(_NSRange arg0, ffi.Pointer arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + _NSRange arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, _NSRange, + ffi.Pointer)>()(pointer, arg0, arg1); +} + +late final _sel_enumerateRangesUsingBlock_ = + objc.registerName("enumerateRangesUsingBlock:"); +final _objc_msgSend_132 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_enumerateRangesWithOptions_usingBlock_ = + objc.registerName("enumerateRangesWithOptions:usingBlock:"); +final _objc_msgSend_133 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_enumerateRangesInRange_options_usingBlock_ = + objc.registerName("enumerateRangesInRange:options:usingBlock:"); +final _objc_msgSend_134 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); +late final _sel_objectsAtIndexes_ = objc.registerName("objectsAtIndexes:"); +final _objc_msgSend_135 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_objectAtIndexedSubscript_ = + objc.registerName("objectAtIndexedSubscript:"); +void _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, int, + ffi.Pointer)>()(arg0, arg1, arg2); +void _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + int, ffi.Pointer))(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.fromFunction( + void Function(NSObject, int, ffi.Pointer) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline) + .cast(), + (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => + fn(NSObject.castFromPointer(arg0, retain: true, release: true), + arg1, arg2))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.listener( + void Function(NSObject, int, ffi.Pointer) fn) + : this._(objc.newClosureBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(NSObject.castFromPointer(arg0, retain: true, release: true), + arg1, arg2))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSObject arg0, int arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.UnsignedLong arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>()(pointer, arg0.pointer, arg1, arg2); +} + +late final _sel_enumerateObjectsUsingBlock_ = + objc.registerName("enumerateObjectsUsingBlock:"); +final _objc_msgSend_136 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_enumerateObjectsWithOptions_usingBlock_ = + objc.registerName("enumerateObjectsWithOptions:usingBlock:"); +final _objc_msgSend_137 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_enumerateObjectsAtIndexes_options_usingBlock_ = + objc.registerName("enumerateObjectsAtIndexes:options:usingBlock:"); +final _objc_msgSend_138 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +bool _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>>() + .asFunction< + bool Function(ffi.Pointer, int, + ffi.Pointer)>()(arg0, arg1, arg2); +bool _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as bool Function(ffi.Pointer, + int, ffi.Pointer))(arg0, arg1, arg2); + +class ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool + extends objc.ObjCBlockBase { + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline, + false) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool.fromFunction( + bool Function(NSObject, int, ffi.Pointer) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline, + false) + .cast(), + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2))); + static ffi.Pointer? _dartFuncTrampoline; + + bool call(NSObject arg0, int arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.UnsignedLong arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>()(pointer, arg0.pointer, arg1, arg2); +} + +late final _sel_indexOfObjectPassingTest_ = + objc.registerName("indexOfObjectPassingTest:"); +final _objc_msgSend_139 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_indexOfObjectWithOptions_passingTest_ = + objc.registerName("indexOfObjectWithOptions:passingTest:"); +final _objc_msgSend_140 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_indexOfObjectAtIndexes_options_passingTest_ = + objc.registerName("indexOfObjectAtIndexes:options:passingTest:"); +final _objc_msgSend_141 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_indexesOfObjectsPassingTest_ = + objc.registerName("indexesOfObjectsPassingTest:"); +final _objc_msgSend_142 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_indexesOfObjectsWithOptions_passingTest_ = + objc.registerName("indexesOfObjectsWithOptions:passingTest:"); +final _objc_msgSend_143 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_indexesOfObjectsAtIndexes_options_passingTest_ = + objc.registerName("indexesOfObjectsAtIndexes:options:passingTest:"); +final _objc_msgSend_144 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as int Function(ffi.Pointer, + ffi.Pointer))(arg0, arg1); + +class ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject + extends objc.ObjCBlockBase { + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) { + return ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_fnPtrTrampoline, + 0) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject.fromFunction( + int Function(NSObject, NSObject) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureTrampoline, 0) + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + NSObject.castFromPointer(arg0, retain: true, release: true), + NSObject.castFromPointer(arg1, retain: true, release: true)))); + static ffi.Pointer? _dartFuncTrampoline; + + int call(NSObject arg0, NSObject arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1.pointer); +} + +late final _sel_sortedArrayUsingComparator_ = + objc.registerName("sortedArrayUsingComparator:"); +final _objc_msgSend_145 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSSortOptions { + static const int NSSortConcurrent = 1; + static const int NSSortStable = 16; +} + +late final _sel_sortedArrayWithOptions_usingComparator_ = + objc.registerName("sortedArrayWithOptions:usingComparator:"); +final _objc_msgSend_146 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + +abstract class NSBinarySearchingOptions { + static const int NSBinarySearchingFirstEqual = 256; + static const int NSBinarySearchingLastEqual = 512; + static const int NSBinarySearchingInsertionIndex = 1024; +} + +late final _sel_indexOfObject_inSortedRange_options_usingComparator_ = + objc.registerName("indexOfObject:inSortedRange:options:usingComparator:"); +final _objc_msgSend_147 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); +late final _sel_array = objc.registerName("array"); +late final _sel_arrayWithObject_ = objc.registerName("arrayWithObject:"); +final _objc_msgSend_148 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_arrayWithObjects_count_ = + objc.registerName("arrayWithObjects:count:"); +late final _sel_arrayWithObjects_ = objc.registerName("arrayWithObjects:"); +late final _sel_arrayWithArray_ = objc.registerName("arrayWithArray:"); +final _objc_msgSend_149 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithObjects_ = objc.registerName("initWithObjects:"); +late final _sel_initWithArray_ = objc.registerName("initWithArray:"); +late final _sel_initWithArray_copyItems_ = + objc.registerName("initWithArray:copyItems:"); +final _objc_msgSend_150 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_initWithContentsOfURL_error_ = + objc.registerName("initWithContentsOfURL:error:"); +final _objc_msgSend_151 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_arrayWithContentsOfURL_error_ = + objc.registerName("arrayWithContentsOfURL:error:"); + +abstract class NSOrderedCollectionDifferenceCalculationOptions { + static const int NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = + 1; + static const int NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = + 2; + static const int NSOrderedCollectionDifferenceCalculationInferMoves = 4; +} + +bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as bool Function(ffi.Pointer, + ffi.Pointer))(arg0, arg1); + +class ObjCBlock_bool_objcObjCObject_objcObjCObject extends objc.ObjCBlockBase { + ObjCBlock_bool_objcObjCObject_objcObjCObject._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_bool_objcObjCObject_objcObjCObject castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_bool_objcObjCObject_objcObjCObject._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_objcObjCObject.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_objcObjCObject_fnPtrTrampoline, + false) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_objcObjCObject.fromFunction( + bool Function(NSObject, NSObject) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureTrampoline, false) + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + NSObject.castFromPointer(arg0, retain: true, release: true), + NSObject.castFromPointer(arg1, retain: true, release: true)))); + static ffi.Pointer? _dartFuncTrampoline; + + bool call(NSObject arg0, NSObject arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1.pointer); +} + +late final _sel_differenceFromArray_withOptions_usingEquivalenceTest_ = + objc.registerName("differenceFromArray:withOptions:usingEquivalenceTest:"); +final _objc_msgSend_152 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_differenceFromArray_withOptions_ = + objc.registerName("differenceFromArray:withOptions:"); +final _objc_msgSend_153 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_differenceFromArray_ = + objc.registerName("differenceFromArray:"); +late final _sel_arrayByApplyingDifference_ = + objc.registerName("arrayByApplyingDifference:"); +final _objc_msgSend_154 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_getObjects_ = objc.registerName("getObjects:"); +final _objc_msgSend_155 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_arrayWithContentsOfFile_ = + objc.registerName("arrayWithContentsOfFile:"); +final _objc_msgSend_156 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_arrayWithContentsOfURL_ = + objc.registerName("arrayWithContentsOfURL:"); +final _objc_msgSend_157 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithContentsOfFile_ = + objc.registerName("initWithContentsOfFile:"); +late final _sel_initWithContentsOfURL_ = + objc.registerName("initWithContentsOfURL:"); +late final _sel_writeToURL_atomically_ = + objc.registerName("writeToURL:atomically:"); +final _objc_msgSend_158 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_resourceValuesForKeys_error_ = + objc.registerName("resourceValuesForKeys:error:"); +final _objc_msgSend_159 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_setResourceValue_forKey_error_ = + objc.registerName("setResourceValue:forKey:error:"); +final _objc_msgSend_160 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_setResourceValues_error_ = + objc.registerName("setResourceValues:error:"); +final _objc_msgSend_161 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_removeCachedResourceValueForKey_ = + objc.registerName("removeCachedResourceValueForKey:"); +final _objc_msgSend_162 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_removeAllCachedResourceValues = + objc.registerName("removeAllCachedResourceValues"); +late final _sel_setTemporaryResourceValue_forKey_ = + objc.registerName("setTemporaryResourceValue:forKey:"); +final _objc_msgSend_163 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +abstract class NSURLBookmarkCreationOptions { + static const int NSURLBookmarkCreationPreferFileIDResolution = 256; + static const int NSURLBookmarkCreationMinimalBookmark = 512; + static const int NSURLBookmarkCreationSuitableForBookmarkFile = 1024; + static const int NSURLBookmarkCreationWithSecurityScope = 2048; + static const int NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; + static const int NSURLBookmarkCreationWithoutImplicitSecurityScope = + 536870912; +} + +late final _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_ = + objc.registerName( + "bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:"); +final _objc_msgSend_164 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + +abstract class NSURLBookmarkResolutionOptions { + static const int NSURLBookmarkResolutionWithoutUI = 256; + static const int NSURLBookmarkResolutionWithoutMounting = 512; + static const int NSURLBookmarkResolutionWithSecurityScope = 1024; + static const int NSURLBookmarkResolutionWithoutImplicitStartAccessing = 32768; +} + +late final _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_ = + objc.registerName( + "initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); +final _objc_msgSend_165 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_ = + objc.registerName( + "URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); +late final _sel_resourceValuesForKeys_fromBookmarkData_ = + objc.registerName("resourceValuesForKeys:fromBookmarkData:"); +final _objc_msgSend_166 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_writeBookmarkData_toURL_options_error_ = + objc.registerName("writeBookmarkData:toURL:options:error:"); +final _objc_msgSend_167 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_bookmarkDataWithContentsOfURL_error_ = + objc.registerName("bookmarkDataWithContentsOfURL:error:"); +final _objc_msgSend_168 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_URLByResolvingAliasFileAtURL_options_error_ = + objc.registerName("URLByResolvingAliasFileAtURL:options:error:"); +final _objc_msgSend_169 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_startAccessingSecurityScopedResource = + objc.registerName("startAccessingSecurityScopedResource"); +late final _sel_stopAccessingSecurityScopedResource = + objc.registerName("stopAccessingSecurityScopedResource"); +late final _sel_getPromisedItemResourceValue_forKey_error_ = + objc.registerName("getPromisedItemResourceValue:forKey:error:"); + +class NSDictionary extends NSObject { + NSDictionary._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSDictionary] that points to the same underlying object as [other]. + NSDictionary.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSDictionary] that wraps the given raw object pointer. + NSDictionary.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSDictionary]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSDictionary); + } + + int get count { + return _objc_msgSend_12(this.pointer, _sel_count); + } + + NSObject? objectForKey_(NSObject aKey) { + final _ret = + _objc_msgSend_170(this.pointer, _sel_objectForKey_, aKey.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSEnumerator keyEnumerator() { + final _ret = _objc_msgSend_108(this.pointer, _sel_keyEnumerator); + return NSEnumerator.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSDictionary init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + NSDictionary initWithObjects_forKeys_count_( + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _objc_msgSend_171( + this.pointer, _sel_initWithObjects_forKeys_count_, objects, keys, cnt); + return NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + NSDictionary? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + NSArray get allKeys { + final _ret = _objc_msgSend_172(this.pointer, _sel_allKeys); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray allKeysForObject_(NSObject anObject) { + final _ret = _objc_msgSend_99( + this.pointer, _sel_allKeysForObject_, anObject.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray get allValues { + final _ret = _objc_msgSend_172(this.pointer, _sel_allValues); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSString get description { + final _ret = _objc_msgSend_32(this.pointer, _sel_description); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString get descriptionInStringsFileFormat { + final _ret = + _objc_msgSend_32(this.pointer, _sel_descriptionInStringsFileFormat); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString descriptionWithLocale_(NSObject? locale) { + final _ret = _objc_msgSend_93(this.pointer, _sel_descriptionWithLocale_, + locale?.pointer ?? ffi.nullptr); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString descriptionWithLocale_indent_(NSObject? locale, int level) { + final _ret = _objc_msgSend_102( + this.pointer, + _sel_descriptionWithLocale_indent_, + locale?.pointer ?? ffi.nullptr, + level); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + bool isEqualToDictionary_(NSDictionary otherDictionary) { + return _objc_msgSend_173( + this.pointer, _sel_isEqualToDictionary_, otherDictionary.pointer); + } + + NSEnumerator objectEnumerator() { + final _ret = _objc_msgSend_108(this.pointer, _sel_objectEnumerator); + return NSEnumerator.castFromPointer(_ret, retain: true, release: true); + } + + NSArray objectsForKeys_notFoundMarker_(NSArray keys, NSObject marker) { + final _ret = _objc_msgSend_174(this.pointer, + _sel_objectsForKeys_notFoundMarker_, keys.pointer, marker.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + bool writeToURL_error_( + NSURL url, ffi.Pointer> error) { + return _objc_msgSend_113( + this.pointer, _sel_writeToURL_error_, url.pointer, error); + } + + NSArray keysSortedByValueUsingSelector_( + ffi.Pointer comparator) { + final _ret = _objc_msgSend_111( + this.pointer, _sel_keysSortedByValueUsingSelector_, comparator); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + void getObjects_andKeys_count_( + ffi.Pointer> objects, + ffi.Pointer> keys, + int count) { + _objc_msgSend_175( + this.pointer, _sel_getObjects_andKeys_count_, objects, keys, count); + } + + NSObject? objectForKeyedSubscript_(NSObject key) { + final _ret = _objc_msgSend_170( + this.pointer, _sel_objectForKeyedSubscript_, key.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + void enumerateKeysAndObjectsUsingBlock_( + ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool block) { + _objc_msgSend_176( + this.pointer, _sel_enumerateKeysAndObjectsUsingBlock_, block.pointer); + } + + void enumerateKeysAndObjectsWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool block) { + _objc_msgSend_177( + this.pointer, + _sel_enumerateKeysAndObjectsWithOptions_usingBlock_, + opts, + block.pointer); + } + + NSArray keysSortedByValueUsingComparator_( + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + final _ret = _objc_msgSend_145( + this.pointer, _sel_keysSortedByValueUsingComparator_, cmptr.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray keysSortedByValueWithOptions_usingComparator_(int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + final _ret = _objc_msgSend_146( + this.pointer, + _sel_keysSortedByValueWithOptions_usingComparator_, + opts, + cmptr.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSObject keysOfEntriesPassingTest_( + ObjCBlock_bool_objcObjCObject_objcObjCObject_bool predicate) { + final _ret = _objc_msgSend_178( + this.pointer, _sel_keysOfEntriesPassingTest_, predicate.pointer); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject keysOfEntriesWithOptions_passingTest_( + int opts, ObjCBlock_bool_objcObjCObject_objcObjCObject_bool predicate) { + final _ret = _objc_msgSend_179(this.pointer, + _sel_keysOfEntriesWithOptions_passingTest_, opts, predicate.pointer); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + void getObjects_andKeys_(ffi.Pointer> objects, + ffi.Pointer> keys) { + _objc_msgSend_180(this.pointer, _sel_getObjects_andKeys_, objects, keys); + } + + static NSDictionary? dictionaryWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_181( + _class_NSDictionary, _sel_dictionaryWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + static NSDictionary? dictionaryWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_182( + _class_NSDictionary, _sel_dictionaryWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + NSDictionary? initWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_181( + this.pointer, _sel_initWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + NSDictionary? initWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_182( + this.pointer, _sel_initWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { + return _objc_msgSend_37(this.pointer, _sel_writeToFile_atomically_, + path.pointer, useAuxiliaryFile); + } + + bool writeToURL_atomically_(NSURL url, bool atomically) { + return _objc_msgSend_158( + this.pointer, _sel_writeToURL_atomically_, url.pointer, atomically); + } + + static NSDictionary dictionary() { + final _ret = _objc_msgSend_2(_class_NSDictionary, _sel_dictionary); + return NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + static NSDictionary dictionaryWithObject_forKey_( + NSObject object, NSObject key) { + final _ret = _objc_msgSend_183(_class_NSDictionary, + _sel_dictionaryWithObject_forKey_, object.pointer, key.pointer); + return NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + static NSDictionary dictionaryWithObjects_forKeys_count_( + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _objc_msgSend_171(_class_NSDictionary, + _sel_dictionaryWithObjects_forKeys_count_, objects, keys, cnt); + return NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + static NSDictionary dictionaryWithObjectsAndKeys_(NSObject firstObject) { + final _ret = _objc_msgSend_148(_class_NSDictionary, + _sel_dictionaryWithObjectsAndKeys_, firstObject.pointer); + return NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + static NSDictionary dictionaryWithDictionary_(NSDictionary dict) { + final _ret = _objc_msgSend_184( + _class_NSDictionary, _sel_dictionaryWithDictionary_, dict.pointer); + return NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + static NSDictionary dictionaryWithObjects_forKeys_( + NSArray objects, NSArray keys) { + final _ret = _objc_msgSend_185(_class_NSDictionary, + _sel_dictionaryWithObjects_forKeys_, objects.pointer, keys.pointer); + return NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + NSDictionary initWithObjectsAndKeys_(NSObject firstObject) { + final _ret = _objc_msgSend_148( + this.pointer, _sel_initWithObjectsAndKeys_, firstObject.pointer); + return NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + NSDictionary initWithDictionary_(NSDictionary otherDictionary) { + final _ret = _objc_msgSend_184( + this.pointer, _sel_initWithDictionary_, otherDictionary.pointer); + return NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + NSDictionary initWithDictionary_copyItems_( + NSDictionary otherDictionary, bool flag) { + final _ret = _objc_msgSend_186(this.pointer, + _sel_initWithDictionary_copyItems_, otherDictionary.pointer, flag); + return NSDictionary.castFromPointer(_ret, retain: false, release: true); + } + + NSDictionary initWithObjects_forKeys_(NSArray objects, NSArray keys) { + final _ret = _objc_msgSend_185(this.pointer, _sel_initWithObjects_forKeys_, + objects.pointer, keys.pointer); + return NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + NSDictionary? initWithContentsOfURL_error_( + NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_187( + this.pointer, _sel_initWithContentsOfURL_error_, url.pointer, error); + return _ret.address == 0 + ? null + : NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + static NSDictionary? dictionaryWithContentsOfURL_error_( + NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_187(_class_NSDictionary, + _sel_dictionaryWithContentsOfURL_error_, url.pointer, error); + return _ret.address == 0 + ? null + : NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject sharedKeySetForKeys_(NSArray keys) { + final _ret = _objc_msgSend_149( + _class_NSDictionary, _sel_sharedKeySetForKeys_, keys.pointer); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + int countByEnumeratingWithState_objects_count_( + ffi.Pointer state, + ffi.Pointer> buffer, + int len) { + return _objc_msgSend_188(this.pointer, + _sel_countByEnumeratingWithState_objects_count_, state, buffer, len); + } + + static NSDictionary new1() { + final _ret = _objc_msgSend_2(_class_NSDictionary, _sel_new); + return NSDictionary.castFromPointer(_ret, retain: false, release: true); + } + + static NSDictionary allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_3(_class_NSDictionary, _sel_allocWithZone_, zone); + return NSDictionary.castFromPointer(_ret, retain: false, release: true); + } + + static NSDictionary alloc() { + final _ret = _objc_msgSend_2(_class_NSDictionary, _sel_alloc); + return NSDictionary.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSDictionary = objc.getClass("NSDictionary"); +late final _sel_objectForKey_ = objc.registerName("objectForKey:"); +final _objc_msgSend_170 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_keyEnumerator = objc.registerName("keyEnumerator"); +late final _sel_initWithObjects_forKeys_count_ = + objc.registerName("initWithObjects:forKeys:count:"); +final _objc_msgSend_171 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + ffi.UnsignedLong)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + int)>(); +late final _sel_allKeys = objc.registerName("allKeys"); +final _objc_msgSend_172 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_allKeysForObject_ = objc.registerName("allKeysForObject:"); +late final _sel_allValues = objc.registerName("allValues"); +late final _sel_descriptionInStringsFileFormat = + objc.registerName("descriptionInStringsFileFormat"); +late final _sel_isEqualToDictionary_ = + objc.registerName("isEqualToDictionary:"); +final _objc_msgSend_173 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_objectsForKeys_notFoundMarker_ = + objc.registerName("objectsForKeys:notFoundMarker:"); +final _objc_msgSend_174 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_keysSortedByValueUsingSelector_ = + objc.registerName("keysSortedByValueUsingSelector:"); +late final _sel_getObjects_andKeys_count_ = + objc.registerName("getObjects:andKeys:count:"); +final _objc_msgSend_175 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + int)>(); +late final _sel_objectForKeyedSubscript_ = + objc.registerName("objectForKeyedSubscript:"); +void _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +void _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer))(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._(objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool.fromFunction( + void Function(NSObject, NSObject, ffi.Pointer) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureTrampoline) + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => + fn( + NSObject.castFromPointer(arg0, retain: true, release: true), + NSObject.castFromPointer(arg1, retain: true, release: true), + arg2))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool.listener( + void Function(NSObject, NSObject, ffi.Pointer) fn) + : this._(objc.newClosureBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => + fn( + NSObject.castFromPointer(arg0, retain: true, release: true), + NSObject.castFromPointer(arg1, retain: true, release: true), + arg2))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSObject arg0, NSObject arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1.pointer, arg2); +} + +late final _sel_enumerateKeysAndObjectsUsingBlock_ = + objc.registerName("enumerateKeysAndObjectsUsingBlock:"); +final _objc_msgSend_176 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_enumerateKeysAndObjectsWithOptions_usingBlock_ = + objc.registerName("enumerateKeysAndObjectsWithOptions:usingBlock:"); +final _objc_msgSend_177 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_keysSortedByValueUsingComparator_ = + objc.registerName("keysSortedByValueUsingComparator:"); +late final _sel_keysSortedByValueWithOptions_usingComparator_ = + objc.registerName("keysSortedByValueWithOptions:usingComparator:"); +bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer))(arg0, arg1, arg2); + +class ObjCBlock_bool_objcObjCObject_objcObjCObject_bool + extends objc.ObjCBlockBase { + ObjCBlock_bool_objcObjCObject_objcObjCObject_bool._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_bool_objcObjCObject_objcObjCObject_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_bool_objcObjCObject_objcObjCObject_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_objcObjCObject_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._(objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_fnPtrTrampoline, + false) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_objcObjCObject_bool.fromFunction( + bool Function(NSObject, NSObject, ffi.Pointer) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureTrampoline, false) + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( + NSObject.castFromPointer(arg0, retain: true, release: true), + NSObject.castFromPointer(arg1, retain: true, release: true), + arg2))); + static ffi.Pointer? _dartFuncTrampoline; + + bool call(NSObject arg0, NSObject arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1.pointer, arg2); +} + +late final _sel_keysOfEntriesPassingTest_ = + objc.registerName("keysOfEntriesPassingTest:"); +final _objc_msgSend_178 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_keysOfEntriesWithOptions_passingTest_ = + objc.registerName("keysOfEntriesWithOptions:passingTest:"); +final _objc_msgSend_179 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_getObjects_andKeys_ = objc.registerName("getObjects:andKeys:"); +final _objc_msgSend_180 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); +late final _sel_dictionaryWithContentsOfFile_ = + objc.registerName("dictionaryWithContentsOfFile:"); +final _objc_msgSend_181 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dictionaryWithContentsOfURL_ = + objc.registerName("dictionaryWithContentsOfURL:"); +final _objc_msgSend_182 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dictionary = objc.registerName("dictionary"); +late final _sel_dictionaryWithObject_forKey_ = + objc.registerName("dictionaryWithObject:forKey:"); +final _objc_msgSend_183 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_dictionaryWithObjects_forKeys_count_ = + objc.registerName("dictionaryWithObjects:forKeys:count:"); +late final _sel_dictionaryWithObjectsAndKeys_ = + objc.registerName("dictionaryWithObjectsAndKeys:"); +late final _sel_dictionaryWithDictionary_ = + objc.registerName("dictionaryWithDictionary:"); +final _objc_msgSend_184 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dictionaryWithObjects_forKeys_ = + objc.registerName("dictionaryWithObjects:forKeys:"); +final _objc_msgSend_185 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithObjectsAndKeys_ = + objc.registerName("initWithObjectsAndKeys:"); +late final _sel_initWithDictionary_ = objc.registerName("initWithDictionary:"); +late final _sel_initWithDictionary_copyItems_ = + objc.registerName("initWithDictionary:copyItems:"); +final _objc_msgSend_186 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_initWithObjects_forKeys_ = + objc.registerName("initWithObjects:forKeys:"); +final _objc_msgSend_187 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_dictionaryWithContentsOfURL_error_ = + objc.registerName("dictionaryWithContentsOfURL:error:"); +late final _sel_sharedKeySetForKeys_ = + objc.registerName("sharedKeySetForKeys:"); + +final class NSFastEnumerationState extends ffi.Struct { + @ffi.UnsignedLong() + external int state; + + external ffi.Pointer> itemsPtr; + + external ffi.Pointer mutationsPtr; + + @ffi.Array.multi([5]) + external ffi.Array extra; +} + +late final _sel_countByEnumeratingWithState_objects_count_ = + objc.registerName("countByEnumeratingWithState:objects:count:"); +final _objc_msgSend_188 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>(); +late final _sel_promisedItemResourceValuesForKeys_error_ = + objc.registerName("promisedItemResourceValuesForKeys:error:"); +final _objc_msgSend_189 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_checkPromisedItemIsReachableAndReturnError_ = + objc.registerName("checkPromisedItemIsReachableAndReturnError:"); +final _objc_msgSend_190 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_fileURLWithPathComponents_ = + objc.registerName("fileURLWithPathComponents:"); +final _objc_msgSend_191 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_pathComponents = objc.registerName("pathComponents"); +final _objc_msgSend_192 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_lastPathComponent = objc.registerName("lastPathComponent"); +late final _sel_pathExtension = objc.registerName("pathExtension"); +late final _sel_URLByAppendingPathComponent_ = + objc.registerName("URLByAppendingPathComponent:"); +final _objc_msgSend_193 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_URLByAppendingPathComponent_isDirectory_ = + objc.registerName("URLByAppendingPathComponent:isDirectory:"); +final _objc_msgSend_194 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_URLByDeletingLastPathComponent = + objc.registerName("URLByDeletingLastPathComponent"); +late final _sel_URLByAppendingPathExtension_ = + objc.registerName("URLByAppendingPathExtension:"); +late final _sel_URLByDeletingPathExtension = + objc.registerName("URLByDeletingPathExtension"); +late final _sel_checkResourceIsReachableAndReturnError_ = + objc.registerName("checkResourceIsReachableAndReturnError:"); +late final _sel_URLByStandardizingPath = + objc.registerName("URLByStandardizingPath"); +late final _sel_URLByResolvingSymlinksInPath = + objc.registerName("URLByResolvingSymlinksInPath"); +late final _sel_resourceDataUsingCache_ = + objc.registerName("resourceDataUsingCache:"); +final _objc_msgSend_195 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, bool)>(); +late final _sel_loadResourceDataNotifyingClient_usingCache_ = + objc.registerName("loadResourceDataNotifyingClient:usingCache:"); +final _objc_msgSend_196 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_propertyForKey_ = objc.registerName("propertyForKey:"); +late final _sel_setResourceData_ = objc.registerName("setResourceData:"); +late final _sel_setProperty_forKey_ = objc.registerName("setProperty:forKey:"); +final _objc_msgSend_197 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +class NSURLHandle extends NSObject { + NSURLHandle._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLHandle] that points to the same underlying object as [other]. + NSURLHandle.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSURLHandle] that wraps the given raw object pointer. + NSURLHandle.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLHandle]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLHandle); + } + + static void registerURLHandleClass_(NSObject anURLHandleSubclass) { + _objc_msgSend_198(_class_NSURLHandle, _sel_registerURLHandleClass_, + anURLHandleSubclass.pointer); + } + + static NSObject URLHandleClassForURL_(NSURL anURL) { + final _ret = _objc_msgSend_199( + _class_NSURLHandle, _sel_URLHandleClassForURL_, anURL.pointer); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + int status() { + return _objc_msgSend_200(this.pointer, _sel_status); + } + + NSString failureReason() { + final _ret = _objc_msgSend_32(this.pointer, _sel_failureReason); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + void addClient_(NSObject client) { + _objc_msgSend_198(this.pointer, _sel_addClient_, client.pointer); + } + + void removeClient_(NSObject client) { + _objc_msgSend_198(this.pointer, _sel_removeClient_, client.pointer); + } + + void loadInBackground() { + _objc_msgSend_1(this.pointer, _sel_loadInBackground); + } + + void cancelLoadInBackground() { + _objc_msgSend_1(this.pointer, _sel_cancelLoadInBackground); + } + + NSData resourceData() { + final _ret = _objc_msgSend_54(this.pointer, _sel_resourceData); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData availableResourceData() { + final _ret = _objc_msgSend_54(this.pointer, _sel_availableResourceData); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + int expectedResourceDataSize() { + return _objc_msgSend_87(this.pointer, _sel_expectedResourceDataSize); + } + + void flushCachedData() { + _objc_msgSend_1(this.pointer, _sel_flushCachedData); + } + + void backgroundLoadDidFailWithReason_(NSString reason) { + _objc_msgSend_162( + this.pointer, _sel_backgroundLoadDidFailWithReason_, reason.pointer); + } + + void didLoadBytes_loadComplete_(NSData newBytes, bool yorn) { + _objc_msgSend_201( + this.pointer, _sel_didLoadBytes_loadComplete_, newBytes.pointer, yorn); + } + + static bool canInitWithURL_(NSURL anURL) { + return _objc_msgSend_202( + _class_NSURLHandle, _sel_canInitWithURL_, anURL.pointer); + } + + static NSURLHandle cachedHandleForURL_(NSURL anURL) { + final _ret = _objc_msgSend_203( + _class_NSURLHandle, _sel_cachedHandleForURL_, anURL.pointer); + return NSURLHandle.castFromPointer(_ret, retain: true, release: true); + } + + NSObject initWithURL_cached_(NSURL anURL, bool willCache) { + final _ret = _objc_msgSend_204( + this.pointer, _sel_initWithURL_cached_, anURL.pointer, willCache); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject propertyForKey_(NSString propertyKey) { + final _ret = _objc_msgSend_42( + this.pointer, _sel_propertyForKey_, propertyKey.pointer); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject propertyForKeyIfAvailable_(NSString propertyKey) { + final _ret = _objc_msgSend_42( + this.pointer, _sel_propertyForKeyIfAvailable_, propertyKey.pointer); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + bool writeProperty_forKey_(NSObject propertyValue, NSString propertyKey) { + return _objc_msgSend_197(this.pointer, _sel_writeProperty_forKey_, + propertyValue.pointer, propertyKey.pointer); + } + + bool writeData_(NSData data) { + return _objc_msgSend_35(this.pointer, _sel_writeData_, data.pointer); + } + + NSData loadInForeground() { + final _ret = _objc_msgSend_54(this.pointer, _sel_loadInForeground); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + void beginLoadInBackground() { + _objc_msgSend_1(this.pointer, _sel_beginLoadInBackground); + } + + void endLoadInBackground() { + _objc_msgSend_1(this.pointer, _sel_endLoadInBackground); + } + + @override + NSURLHandle init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSURLHandle.castFromPointer(_ret, retain: true, release: true); + } + + static NSURLHandle new1() { + final _ret = _objc_msgSend_2(_class_NSURLHandle, _sel_new); + return NSURLHandle.castFromPointer(_ret, retain: false, release: true); + } + + static NSURLHandle allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSURLHandle, _sel_allocWithZone_, zone); + return NSURLHandle.castFromPointer(_ret, retain: false, release: true); + } + + static NSURLHandle alloc() { + final _ret = _objc_msgSend_2(_class_NSURLHandle, _sel_alloc); + return NSURLHandle.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSURLHandle = objc.getClass("NSURLHandle"); +late final _sel_registerURLHandleClass_ = + objc.registerName("registerURLHandleClass:"); +final _objc_msgSend_198 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_URLHandleClassForURL_ = + objc.registerName("URLHandleClassForURL:"); +final _objc_msgSend_199 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSURLHandleStatus { + static const int NSURLHandleNotLoaded = 0; + static const int NSURLHandleLoadSucceeded = 1; + static const int NSURLHandleLoadInProgress = 2; + static const int NSURLHandleLoadFailed = 3; +} + +late final _sel_status = objc.registerName("status"); +final _objc_msgSend_200 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_failureReason = objc.registerName("failureReason"); +late final _sel_addClient_ = objc.registerName("addClient:"); +late final _sel_removeClient_ = objc.registerName("removeClient:"); +late final _sel_loadInBackground = objc.registerName("loadInBackground"); +late final _sel_cancelLoadInBackground = + objc.registerName("cancelLoadInBackground"); +late final _sel_resourceData = objc.registerName("resourceData"); +late final _sel_availableResourceData = + objc.registerName("availableResourceData"); +late final _sel_expectedResourceDataSize = + objc.registerName("expectedResourceDataSize"); +late final _sel_flushCachedData = objc.registerName("flushCachedData"); +late final _sel_backgroundLoadDidFailWithReason_ = + objc.registerName("backgroundLoadDidFailWithReason:"); +late final _sel_didLoadBytes_loadComplete_ = + objc.registerName("didLoadBytes:loadComplete:"); +final _objc_msgSend_201 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_canInitWithURL_ = objc.registerName("canInitWithURL:"); +final _objc_msgSend_202 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_cachedHandleForURL_ = objc.registerName("cachedHandleForURL:"); +final _objc_msgSend_203 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithURL_cached_ = objc.registerName("initWithURL:cached:"); +final _objc_msgSend_204 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_propertyForKeyIfAvailable_ = + objc.registerName("propertyForKeyIfAvailable:"); +late final _sel_writeProperty_forKey_ = + objc.registerName("writeProperty:forKey:"); +late final _sel_writeData_ = objc.registerName("writeData:"); +late final _sel_loadInForeground = objc.registerName("loadInForeground"); +late final _sel_beginLoadInBackground = + objc.registerName("beginLoadInBackground"); +late final _sel_endLoadInBackground = objc.registerName("endLoadInBackground"); +late final _sel_URLHandleUsingCache_ = + objc.registerName("URLHandleUsingCache:"); +final _objc_msgSend_205 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, bool)>(); + +abstract class NSDataWritingOptions { + static const int NSDataWritingAtomic = 1; + static const int NSDataWritingWithoutOverwriting = 2; + static const int NSDataWritingFileProtectionNone = 268435456; + static const int NSDataWritingFileProtectionComplete = 536870912; + static const int NSDataWritingFileProtectionCompleteUnlessOpen = 805306368; + static const int + NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication = + 1073741824; + static const int NSDataWritingFileProtectionCompleteWhenUserInactive = + 1342177280; + static const int NSDataWritingFileProtectionMask = 4026531840; + static const int NSAtomicWrite = 1; +} + +late final _sel_writeToFile_options_error_ = + objc.registerName("writeToFile:options:error:"); +final _objc_msgSend_206 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_writeToURL_options_error_ = + objc.registerName("writeToURL:options:error:"); +final _objc_msgSend_207 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + +abstract class NSDataSearchOptions { + static const int NSDataSearchBackwards = 1; + static const int NSDataSearchAnchored = 2; +} + +late final _sel_rangeOfData_options_range_ = + objc.registerName("rangeOfData:options:range:"); +final _objc_msgSend_208 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +final _objc_msgSend_208Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +void _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, _NSRange, + ffi.Pointer)>()(arg0, arg1, arg2); +void _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + _NSRange, ffi.Pointer))(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_ffiVoid_NSRange_bool._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_ffiVoid_NSRange_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_ffiVoid_NSRange_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2)>> + ptr) + : this._(objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.fromFunction( + void Function(ffi.Pointer, _NSRange, ffi.Pointer) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline) + .cast(), + (ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + fn(arg0, arg1, arg2))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.listener( + void Function(ffi.Pointer, _NSRange, ffi.Pointer) fn) + : this._(objc.newClosureBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + (ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + fn(arg0, arg1, arg2))); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + _NSRange, ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>()(pointer, arg0, arg1, arg2); +} + +late final _sel_enumerateByteRangesUsingBlock_ = + objc.registerName("enumerateByteRangesUsingBlock:"); +final _objc_msgSend_209 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_data = objc.registerName("data"); +late final _sel_dataWithBytes_length_ = + objc.registerName("dataWithBytes:length:"); +final _objc_msgSend_210 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); +late final _sel_dataWithBytesNoCopy_length_ = + objc.registerName("dataWithBytesNoCopy:length:"); +late final _sel_dataWithBytesNoCopy_length_freeWhenDone_ = + objc.registerName("dataWithBytesNoCopy:length:freeWhenDone:"); +final _objc_msgSend_211 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + bool)>(); + +abstract class NSDataReadingOptions { + static const int NSDataReadingMappedIfSafe = 1; + static const int NSDataReadingUncached = 2; + static const int NSDataReadingMappedAlways = 8; + static const int NSDataReadingMapped = 1; + static const int NSMappedRead = 1; + static const int NSUncachedRead = 2; +} + +late final _sel_dataWithContentsOfFile_options_error_ = + objc.registerName("dataWithContentsOfFile:options:error:"); +final _objc_msgSend_212 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_dataWithContentsOfURL_options_error_ = + objc.registerName("dataWithContentsOfURL:options:error:"); +final _objc_msgSend_213 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_dataWithContentsOfFile_ = + objc.registerName("dataWithContentsOfFile:"); +late final _sel_dataWithContentsOfURL_ = + objc.registerName("dataWithContentsOfURL:"); +final _objc_msgSend_214 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithBytes_length_ = + objc.registerName("initWithBytes:length:"); +late final _sel_initWithBytesNoCopy_length_ = + objc.registerName("initWithBytesNoCopy:length:"); +late final _sel_initWithBytesNoCopy_length_freeWhenDone_ = + objc.registerName("initWithBytesNoCopy:length:freeWhenDone:"); +void _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, ffi.UnsignedLong arg1)>>() + .asFunction, int)>()(arg0, arg1); +void _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, int))( + arg0, arg1); + +class ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, ffi.UnsignedLong arg1)>> + ptr) + : this._(objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>( + _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong.fromFunction( + void Function(ffi.Pointer, int) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>( + _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureTrampoline) + .cast(), + (ffi.Pointer arg0, int arg1) => fn(arg0, arg1))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong.listener( + void Function(ffi.Pointer, int) fn) + : this._(objc.newClosureBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + (ffi.Pointer arg0, int arg1) => fn(arg0, arg1))); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong)>? _dartFuncListenerTrampoline; + + void call(ffi.Pointer arg0, int arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0, ffi.UnsignedLong arg1)>>() + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, + int)>()(pointer, arg0, arg1); +} + +late final _sel_initWithBytesNoCopy_length_deallocator_ = + objc.registerName("initWithBytesNoCopy:length:deallocator:"); +final _objc_msgSend_215 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_initWithContentsOfFile_options_error_ = + objc.registerName("initWithContentsOfFile:options:error:"); +late final _sel_initWithContentsOfURL_options_error_ = + objc.registerName("initWithContentsOfURL:options:error:"); +late final _sel_initWithData_ = objc.registerName("initWithData:"); +final _objc_msgSend_216 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dataWithData_ = objc.registerName("dataWithData:"); + +abstract class NSDataBase64DecodingOptions { + static const int NSDataBase64DecodingIgnoreUnknownCharacters = 1; +} + +late final _sel_initWithBase64EncodedString_options_ = + objc.registerName("initWithBase64EncodedString:options:"); +final _objc_msgSend_217 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); + +abstract class NSDataBase64EncodingOptions { + static const int NSDataBase64Encoding64CharacterLineLength = 1; + static const int NSDataBase64Encoding76CharacterLineLength = 2; + static const int NSDataBase64EncodingEndLineWithCarriageReturn = 16; + static const int NSDataBase64EncodingEndLineWithLineFeed = 32; +} + +late final _sel_base64EncodedStringWithOptions_ = + objc.registerName("base64EncodedStringWithOptions:"); +final _objc_msgSend_218 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_initWithBase64EncodedData_options_ = + objc.registerName("initWithBase64EncodedData:options:"); +final _objc_msgSend_219 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_base64EncodedDataWithOptions_ = + objc.registerName("base64EncodedDataWithOptions:"); +final _objc_msgSend_220 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); + +abstract class NSDataCompressionAlgorithm { + static const int NSDataCompressionAlgorithmLZFSE = 0; + static const int NSDataCompressionAlgorithmLZ4 = 1; + static const int NSDataCompressionAlgorithmLZMA = 2; + static const int NSDataCompressionAlgorithmZlib = 3; +} + +late final _sel_decompressedDataUsingAlgorithm_error_ = + objc.registerName("decompressedDataUsingAlgorithm:error:"); +final _objc_msgSend_221 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_compressedDataUsingAlgorithm_error_ = + objc.registerName("compressedDataUsingAlgorithm:error:"); +late final _sel_getBytes_ = objc.registerName("getBytes:"); +late final _sel_dataWithContentsOfMappedFile_ = + objc.registerName("dataWithContentsOfMappedFile:"); +late final _sel_initWithContentsOfMappedFile_ = + objc.registerName("initWithContentsOfMappedFile:"); +late final _sel_initWithBase64Encoding_ = + objc.registerName("initWithBase64Encoding:"); +late final _sel_base64Encoding = objc.registerName("base64Encoding"); +late final _sel_characterSetWithBitmapRepresentation_ = + objc.registerName("characterSetWithBitmapRepresentation:"); +final _objc_msgSend_222 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_characterSetWithContentsOfFile_ = + objc.registerName("characterSetWithContentsOfFile:"); +final _objc_msgSend_223 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_224 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_characterIsMember_ = objc.registerName("characterIsMember:"); +final _objc_msgSend_225 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedShort)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_bitmapRepresentation = + objc.registerName("bitmapRepresentation"); +late final _sel_invertedSet = objc.registerName("invertedSet"); +late final _sel_longCharacterIsMember_ = + objc.registerName("longCharacterIsMember:"); +final _objc_msgSend_226 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_isSupersetOfSet_ = objc.registerName("isSupersetOfSet:"); +final _objc_msgSend_227 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_hasMemberInPlane_ = objc.registerName("hasMemberInPlane:"); +final _objc_msgSend_228 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Uint8)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_URLUserAllowedCharacterSet = + objc.registerName("URLUserAllowedCharacterSet"); +late final _sel_URLPasswordAllowedCharacterSet = + objc.registerName("URLPasswordAllowedCharacterSet"); +late final _sel_URLHostAllowedCharacterSet = + objc.registerName("URLHostAllowedCharacterSet"); +late final _sel_URLPathAllowedCharacterSet = + objc.registerName("URLPathAllowedCharacterSet"); +late final _sel_URLQueryAllowedCharacterSet = + objc.registerName("URLQueryAllowedCharacterSet"); +late final _sel_URLFragmentAllowedCharacterSet = + objc.registerName("URLFragmentAllowedCharacterSet"); +late final _sel_rangeOfCharacterFromSet_ = + objc.registerName("rangeOfCharacterFromSet:"); +final _objc_msgSend_229 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_229Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_rangeOfCharacterFromSet_options_ = + objc.registerName("rangeOfCharacterFromSet:options:"); +final _objc_msgSend_230 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +final _objc_msgSend_230Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_rangeOfCharacterFromSet_options_range_ = + objc.registerName("rangeOfCharacterFromSet:options:range:"); +final _objc_msgSend_231 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +final _objc_msgSend_231Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +late final _sel_rangeOfComposedCharacterSequenceAtIndex_ = + objc.registerName("rangeOfComposedCharacterSequenceAtIndex:"); +final _objc_msgSend_232 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_232Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_rangeOfComposedCharacterSequencesForRange_ = + objc.registerName("rangeOfComposedCharacterSequencesForRange:"); +final _objc_msgSend_233 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +final _objc_msgSend_233Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_stringByAppendingString_ = + objc.registerName("stringByAppendingString:"); +late final _sel_stringByAppendingFormat_ = + objc.registerName("stringByAppendingFormat:"); +late final _sel_uppercaseString = objc.registerName("uppercaseString"); +late final _sel_lowercaseString = objc.registerName("lowercaseString"); +late final _sel_capitalizedString = objc.registerName("capitalizedString"); +late final _sel_localizedUppercaseString = + objc.registerName("localizedUppercaseString"); +late final _sel_localizedLowercaseString = + objc.registerName("localizedLowercaseString"); +late final _sel_localizedCapitalizedString = + objc.registerName("localizedCapitalizedString"); +late final _sel_uppercaseStringWithLocale_ = + objc.registerName("uppercaseStringWithLocale:"); +final _objc_msgSend_234 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_lowercaseStringWithLocale_ = + objc.registerName("lowercaseStringWithLocale:"); +late final _sel_capitalizedStringWithLocale_ = + objc.registerName("capitalizedStringWithLocale:"); +late final _sel_getLineStart_end_contentsEnd_forRange_ = + objc.registerName("getLineStart:end:contentsEnd:forRange:"); +final _objc_msgSend_235 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); +late final _sel_lineRangeForRange_ = objc.registerName("lineRangeForRange:"); +late final _sel_getParagraphStart_end_contentsEnd_forRange_ = + objc.registerName("getParagraphStart:end:contentsEnd:forRange:"); +late final _sel_paragraphRangeForRange_ = + objc.registerName("paragraphRangeForRange:"); + +abstract class NSStringEnumerationOptions { + static const int NSStringEnumerationByLines = 0; + static const int NSStringEnumerationByParagraphs = 1; + static const int NSStringEnumerationByComposedCharacterSequences = 2; + static const int NSStringEnumerationByWords = 3; + static const int NSStringEnumerationBySentences = 4; + static const int NSStringEnumerationByCaretPositions = 5; + static const int NSStringEnumerationByDeletionClusters = 6; + static const int NSStringEnumerationReverse = 256; + static const int NSStringEnumerationSubstringNotRequired = 512; + static const int NSStringEnumerationLocalized = 1024; +} + +void _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + _NSRange arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + _NSRange arg1, + _NSRange arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function(ffi.Pointer, _NSRange, _NSRange, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +void _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + _NSRange arg2, + ffi.Pointer arg3) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + _NSRange, _NSRange, ffi.Pointer))(arg0, arg1, arg2, arg3); + +class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + _NSRange arg1, + _NSRange arg2, + ffi.Pointer arg3)>> + ptr) + : this._(objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.fromFunction( + void Function(NSString?, _NSRange, _NSRange, ffi.Pointer) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline) + .cast(), + (ffi.Pointer arg0, _NSRange arg1, _NSRange arg2, + ffi.Pointer arg3) => + fn(arg0.address == 0 ? null : NSString.castFromPointer(arg0, retain: true, release: true), arg1, arg2, arg3))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.listener( + void Function(NSString?, _NSRange, _NSRange, ffi.Pointer) fn) + : this._(objc.newClosureBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + _NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + (ffi.Pointer arg0, _NSRange arg1, _NSRange arg2, + ffi.Pointer arg3) => + fn(arg0.address == 0 ? null : NSString.castFromPointer(arg0, retain: true, release: true), arg1, arg2, arg3))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + _NSRange, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSString? arg0, _NSRange arg1, _NSRange arg2, + ffi.Pointer arg3) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + _NSRange arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + _NSRange, + ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr, arg1, arg2, arg3); +} + +late final _sel_enumerateSubstringsInRange_options_usingBlock_ = + objc.registerName("enumerateSubstringsInRange:options:usingBlock:"); +final _objc_msgSend_236 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSString_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +void _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); + +class ObjCBlock_ffiVoid_NSString_bool extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSString_bool._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSString_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSString_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSString_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + objc + .newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSString_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSString_bool.fromFunction( + void Function(NSString, ffi.Pointer) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline) + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(NSString.castFromPointer(arg0, retain: true, release: true), + arg1))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSString_bool.listener( + void Function(NSString, ffi.Pointer) fn) + : this._(objc.newClosureBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(NSString.castFromPointer(arg0, retain: true, release: true), + arg1))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSString arg0, ffi.Pointer arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(pointer, arg0.pointer, arg1); +} + +late final _sel_enumerateLinesUsingBlock_ = + objc.registerName("enumerateLinesUsingBlock:"); +final _objc_msgSend_237 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_UTF8String = objc.registerName("UTF8String"); +late final _sel_fastestEncoding = objc.registerName("fastestEncoding"); +late final _sel_smallestEncoding = objc.registerName("smallestEncoding"); +late final _sel_dataUsingEncoding_allowLossyConversion_ = + objc.registerName("dataUsingEncoding:allowLossyConversion:"); +final _objc_msgSend_238 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong, ffi.Bool)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, bool)>(); +late final _sel_dataUsingEncoding_ = objc.registerName("dataUsingEncoding:"); +final _objc_msgSend_239 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_canBeConvertedToEncoding_ = + objc.registerName("canBeConvertedToEncoding:"); +late final _sel_cStringUsingEncoding_ = + objc.registerName("cStringUsingEncoding:"); +final _objc_msgSend_240 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_getCString_maxLength_encoding_ = + objc.registerName("getCString:maxLength:encoding:"); +final _objc_msgSend_241 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, int)>(); + +abstract class NSStringEncodingConversionOptions { + static const int NSStringEncodingConversionAllowLossy = 1; + static const int NSStringEncodingConversionExternalRepresentation = 2; +} + +late final _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_ = + objc.registerName( + "getBytes:maxLength:usedLength:encoding:options:range:remainingRange:"); +final _objc_msgSend_242 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Int32, + _NSRange, + ffi.Pointer<_NSRange>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + int, + int, + _NSRange, + ffi.Pointer<_NSRange>)>(); +late final _sel_maximumLengthOfBytesUsingEncoding_ = + objc.registerName("maximumLengthOfBytesUsingEncoding:"); +late final _sel_lengthOfBytesUsingEncoding_ = + objc.registerName("lengthOfBytesUsingEncoding:"); +late final _sel_availableStringEncodings = + objc.registerName("availableStringEncodings"); +final _objc_msgSend_243 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_localizedNameOfStringEncoding_ = + objc.registerName("localizedNameOfStringEncoding:"); +late final _sel_defaultCStringEncoding = + objc.registerName("defaultCStringEncoding"); +late final _sel_decomposedStringWithCanonicalMapping = + objc.registerName("decomposedStringWithCanonicalMapping"); +late final _sel_precomposedStringWithCanonicalMapping = + objc.registerName("precomposedStringWithCanonicalMapping"); +late final _sel_decomposedStringWithCompatibilityMapping = + objc.registerName("decomposedStringWithCompatibilityMapping"); +late final _sel_precomposedStringWithCompatibilityMapping = + objc.registerName("precomposedStringWithCompatibilityMapping"); +late final _sel_componentsSeparatedByString_ = + objc.registerName("componentsSeparatedByString:"); +final _objc_msgSend_244 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_componentsSeparatedByCharactersInSet_ = + objc.registerName("componentsSeparatedByCharactersInSet:"); +final _objc_msgSend_245 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_stringByTrimmingCharactersInSet_ = + objc.registerName("stringByTrimmingCharactersInSet:"); +final _objc_msgSend_246 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_stringByPaddingToLength_withString_startingAtIndex_ = + objc.registerName("stringByPaddingToLength:withString:startingAtIndex:"); +final _objc_msgSend_247 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + int)>(); +late final _sel_stringByFoldingWithOptions_locale_ = + objc.registerName("stringByFoldingWithOptions:locale:"); +final _objc_msgSend_248 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_stringByReplacingOccurrencesOfString_withString_options_range_ = + objc.registerName( + "stringByReplacingOccurrencesOfString:withString:options:range:"); +final _objc_msgSend_249 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +late final _sel_stringByReplacingOccurrencesOfString_withString_ = + objc.registerName("stringByReplacingOccurrencesOfString:withString:"); +final _objc_msgSend_250 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_stringByReplacingCharactersInRange_withString_ = + objc.registerName("stringByReplacingCharactersInRange:withString:"); +final _objc_msgSend_251 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_stringByApplyingTransform_reverse_ = + objc.registerName("stringByApplyingTransform:reverse:"); +final _objc_msgSend_252 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_writeToURL_atomically_encoding_error_ = + objc.registerName("writeToURL:atomically:encoding:error:"); +final _objc_msgSend_253 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.UnsignedLong, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + int, + ffi.Pointer>)>(); +late final _sel_writeToFile_atomically_encoding_error_ = + objc.registerName("writeToFile:atomically:encoding:error:"); +final _objc_msgSend_254 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.UnsignedLong, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + int, + ffi.Pointer>)>(); +late final _sel_initWithCharactersNoCopy_length_freeWhenDone_ = + objc.registerName("initWithCharactersNoCopy:length:freeWhenDone:"); +final _objc_msgSend_255 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + bool)>(); +void _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1)>>() + .asFunction, int)>()( + arg0, arg1); +void _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, int))(arg0, arg1); + +class ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong.fromFunctionPointer( + ffi + .Pointer< + ffi + .NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1)>> + ptr) + : this._(objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>( + _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong.fromFunction( + void Function(ffi.Pointer, int) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>( + _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureTrampoline) + .cast(), + (ffi.Pointer arg0, int arg1) => fn(arg0, arg1))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong.listener( + void Function(ffi.Pointer, int) fn) + : this._(objc.newClosureBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>.listener( + _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + (ffi.Pointer arg0, int arg1) => fn(arg0, arg1))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>? _dartFuncListenerTrampoline; + + void call(ffi.Pointer arg0, int arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.UnsignedLong arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>()(pointer, arg0, arg1); +} + +late final _sel_initWithCharactersNoCopy_length_deallocator_ = + objc.registerName("initWithCharactersNoCopy:length:deallocator:"); +final _objc_msgSend_256 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_initWithCharacters_length_ = + objc.registerName("initWithCharacters:length:"); +final _objc_msgSend_257 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_initWithUTF8String_ = objc.registerName("initWithUTF8String:"); +final _objc_msgSend_258 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithFormat_ = objc.registerName("initWithFormat:"); + +final class __va_list_tag extends ffi.Struct { + @ffi.UnsignedInt() + external int gp_offset; + + @ffi.UnsignedInt() + external int fp_offset; + + external ffi.Pointer overflow_arg_area; + + external ffi.Pointer reg_save_area; +} + +late final _sel_initWithFormat_arguments_ = + objc.registerName("initWithFormat:arguments:"); +final _objc_msgSend_259 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>(); +late final _sel_initWithFormat_locale_ = + objc.registerName("initWithFormat:locale:"); +final _objc_msgSend_260 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithFormat_locale_arguments_ = + objc.registerName("initWithFormat:locale:arguments:"); +final _objc_msgSend_261 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>(); +late final _sel_initWithValidatedFormat_validFormatSpecifiers_error_ = + objc.registerName("initWithValidatedFormat:validFormatSpecifiers:error:"); +final _objc_msgSend_262 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_ = + objc.registerName( + "initWithValidatedFormat:validFormatSpecifiers:locale:error:"); +final _objc_msgSend_263 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_ = + objc.registerName( + "initWithValidatedFormat:validFormatSpecifiers:arguments:error:"); +final _objc_msgSend_264 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>, + ffi.Pointer>)>(); +late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_ = + objc.registerName( + "initWithValidatedFormat:validFormatSpecifiers:locale:arguments:error:"); +final _objc_msgSend_265 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>, + ffi.Pointer>)>(); +late final _sel_initWithData_encoding_ = + objc.registerName("initWithData:encoding:"); +final _objc_msgSend_266 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_initWithBytes_length_encoding_ = + objc.registerName("initWithBytes:length:encoding:"); +final _objc_msgSend_267 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, int)>(); +late final _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_ = + objc.registerName("initWithBytesNoCopy:length:encoding:freeWhenDone:"); +final _objc_msgSend_268 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + bool)>(); +late final _sel_initWithBytesNoCopy_length_encoding_deallocator_ = + objc.registerName("initWithBytesNoCopy:length:encoding:deallocator:"); +final _objc_msgSend_269 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); +late final _sel_string = objc.registerName("string"); +late final _sel_stringWithString_ = objc.registerName("stringWithString:"); +late final _sel_stringWithCharacters_length_ = + objc.registerName("stringWithCharacters:length:"); +late final _sel_stringWithUTF8String_ = + objc.registerName("stringWithUTF8String:"); +late final _sel_stringWithFormat_ = objc.registerName("stringWithFormat:"); +late final _sel_localizedStringWithFormat_ = + objc.registerName("localizedStringWithFormat:"); +late final _sel_stringWithValidatedFormat_validFormatSpecifiers_error_ = + objc.registerName("stringWithValidatedFormat:validFormatSpecifiers:error:"); +late final _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_ = + objc.registerName( + "localizedStringWithValidatedFormat:validFormatSpecifiers:error:"); +late final _sel_initWithCString_encoding_ = + objc.registerName("initWithCString:encoding:"); +final _objc_msgSend_270 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); +late final _sel_stringWithCString_encoding_ = + objc.registerName("stringWithCString:encoding:"); +late final _sel_initWithContentsOfURL_encoding_error_ = + objc.registerName("initWithContentsOfURL:encoding:error:"); +final _objc_msgSend_271 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_initWithContentsOfFile_encoding_error_ = + objc.registerName("initWithContentsOfFile:encoding:error:"); +final _objc_msgSend_272 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_stringWithContentsOfURL_encoding_error_ = + objc.registerName("stringWithContentsOfURL:encoding:error:"); +late final _sel_stringWithContentsOfFile_encoding_error_ = + objc.registerName("stringWithContentsOfFile:encoding:error:"); +late final _sel_initWithContentsOfURL_usedEncoding_error_ = + objc.registerName("initWithContentsOfURL:usedEncoding:error:"); +final _objc_msgSend_273 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_initWithContentsOfFile_usedEncoding_error_ = + objc.registerName("initWithContentsOfFile:usedEncoding:error:"); +final _objc_msgSend_274 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_stringWithContentsOfURL_usedEncoding_error_ = + objc.registerName("stringWithContentsOfURL:usedEncoding:error:"); +late final _sel_stringWithContentsOfFile_usedEncoding_error_ = + objc.registerName("stringWithContentsOfFile:usedEncoding:error:"); +late final _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_ = + objc.registerName( + "stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:"); +final _objc_msgSend_275 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>(); +late final _sel_propertyList = objc.registerName("propertyList"); +late final _sel_propertyListFromStringsFileFormat = + objc.registerName("propertyListFromStringsFileFormat"); +final _objc_msgSend_276 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_cString = objc.registerName("cString"); +late final _sel_lossyCString = objc.registerName("lossyCString"); +late final _sel_cStringLength = objc.registerName("cStringLength"); +late final _sel_getCString_ = objc.registerName("getCString:"); +final _objc_msgSend_277 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_getCString_maxLength_ = + objc.registerName("getCString:maxLength:"); +final _objc_msgSend_278 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); +late final _sel_getCString_maxLength_range_remainingRange_ = + objc.registerName("getCString:maxLength:range:remainingRange:"); +final _objc_msgSend_279 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + _NSRange, + ffi.Pointer<_NSRange>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange, + ffi.Pointer<_NSRange>)>(); +late final _sel_stringWithContentsOfFile_ = + objc.registerName("stringWithContentsOfFile:"); +late final _sel_stringWithContentsOfURL_ = + objc.registerName("stringWithContentsOfURL:"); +late final _sel_initWithCStringNoCopy_length_freeWhenDone_ = + objc.registerName("initWithCStringNoCopy:length:freeWhenDone:"); +final _objc_msgSend_280 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Bool)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + bool)>(); +late final _sel_initWithCString_length_ = + objc.registerName("initWithCString:length:"); +late final _sel_initWithCString_ = objc.registerName("initWithCString:"); +late final _sel_stringWithCString_length_ = + objc.registerName("stringWithCString:length:"); +late final _sel_stringWithCString_ = objc.registerName("stringWithCString:"); +late final _sel_getCharacters_ = objc.registerName("getCharacters:"); +final _objc_msgSend_281 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_stringByAddingPercentEncodingWithAllowedCharacters_ = + objc.registerName("stringByAddingPercentEncodingWithAllowedCharacters:"); +final _objc_msgSend_282 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_stringByRemovingPercentEncoding = + objc.registerName("stringByRemovingPercentEncoding"); +late final _sel_stringByAddingPercentEscapesUsingEncoding_ = + objc.registerName("stringByAddingPercentEscapesUsingEncoding:"); +final _objc_msgSend_283 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_stringByReplacingPercentEscapesUsingEncoding_ = + objc.registerName("stringByReplacingPercentEscapesUsingEncoding:"); +late final _sel_debugDescription = objc.registerName("debugDescription"); +late final _sel_version = objc.registerName("version"); +late final _sel_setVersion_ = objc.registerName("setVersion:"); +final _objc_msgSend_284 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_classForCoder = objc.registerName("classForCoder"); +late final _sel_replacementObjectForCoder_ = + objc.registerName("replacementObjectForCoder:"); +late final _sel_awakeAfterUsingCoder_ = + objc.registerName("awakeAfterUsingCoder:"); +late final _sel_poseAsClass_ = objc.registerName("poseAsClass:"); +late final _sel_autoContentAccessingProxy = + objc.registerName("autoContentAccessingProxy"); +late final _sel_URL_resourceDataDidBecomeAvailable_ = + objc.registerName("URL:resourceDataDidBecomeAvailable:"); +final _objc_msgSend_285 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_URLResourceDidFinishLoading_ = + objc.registerName("URLResourceDidFinishLoading:"); +final _objc_msgSend_286 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_URLResourceDidCancelLoading_ = + objc.registerName("URLResourceDidCancelLoading:"); +late final _sel_URL_resourceDidFailLoadingWithReason_ = + objc.registerName("URL:resourceDidFailLoadingWithReason:"); +final _objc_msgSend_287 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +class NSMutableArray extends NSArray { + NSMutableArray._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSMutableArray] that points to the same underlying object as [other]. + NSMutableArray.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSMutableArray] that wraps the given raw object pointer. + NSMutableArray.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSMutableArray]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMutableArray); + } + + void addObject_(NSObject anObject) { + _objc_msgSend_198(this.pointer, _sel_addObject_, anObject.pointer); + } + + void insertObject_atIndex_(NSObject anObject, int index) { + _objc_msgSend_288( + this.pointer, _sel_insertObject_atIndex_, anObject.pointer, index); + } + + void removeLastObject() { + _objc_msgSend_1(this.pointer, _sel_removeLastObject); + } + + void removeObjectAtIndex_(int index) { + _objc_msgSend_289(this.pointer, _sel_removeObjectAtIndex_, index); + } + + void replaceObjectAtIndex_withObject_(int index, NSObject anObject) { + _objc_msgSend_290(this.pointer, _sel_replaceObjectAtIndex_withObject_, + index, anObject.pointer); + } + + @override + NSMutableArray init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + NSMutableArray initWithCapacity_(int numItems) { + final _ret = + _objc_msgSend_97(this.pointer, _sel_initWithCapacity_, numItems); + return NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableArray? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + void addObjectsFromArray_(NSArray otherArray) { + _objc_msgSend_291( + this.pointer, _sel_addObjectsFromArray_, otherArray.pointer); + } + + void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { + _objc_msgSend_292(this.pointer, + _sel_exchangeObjectAtIndex_withObjectAtIndex_, idx1, idx2); + } + + void removeAllObjects() { + _objc_msgSend_1(this.pointer, _sel_removeAllObjects); + } + + void removeObject_inRange_(NSObject anObject, _NSRange range) { + _objc_msgSend_293( + this.pointer, _sel_removeObject_inRange_, anObject.pointer, range); + } + + void removeObject_(NSObject anObject) { + _objc_msgSend_198(this.pointer, _sel_removeObject_, anObject.pointer); + } + + void removeObjectIdenticalTo_inRange_(NSObject anObject, _NSRange range) { + _objc_msgSend_293(this.pointer, _sel_removeObjectIdenticalTo_inRange_, + anObject.pointer, range); + } + + void removeObjectIdenticalTo_(NSObject anObject) { + _objc_msgSend_198( + this.pointer, _sel_removeObjectIdenticalTo_, anObject.pointer); + } + + void removeObjectsFromIndices_numIndices_( + ffi.Pointer indices, int cnt) { + _objc_msgSend_294( + this.pointer, _sel_removeObjectsFromIndices_numIndices_, indices, cnt); + } + + void removeObjectsInArray_(NSArray otherArray) { + _objc_msgSend_291( + this.pointer, _sel_removeObjectsInArray_, otherArray.pointer); + } + + void removeObjectsInRange_(_NSRange range) { + _objc_msgSend_295(this.pointer, _sel_removeObjectsInRange_, range); + } + + void replaceObjectsInRange_withObjectsFromArray_range_( + _NSRange range, NSArray otherArray, _NSRange otherRange) { + _objc_msgSend_296( + this.pointer, + _sel_replaceObjectsInRange_withObjectsFromArray_range_, + range, + otherArray.pointer, + otherRange); + } + + void replaceObjectsInRange_withObjectsFromArray_( + _NSRange range, NSArray otherArray) { + _objc_msgSend_297( + this.pointer, + _sel_replaceObjectsInRange_withObjectsFromArray_, + range, + otherArray.pointer); + } + + void setArray_(NSArray otherArray) { + _objc_msgSend_291(this.pointer, _sel_setArray_, otherArray.pointer); + } + + void sortUsingFunction_context_( + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + compare, + ffi.Pointer context) { + _objc_msgSend_298( + this.pointer, _sel_sortUsingFunction_context_, compare, context); + } + + void sortUsingSelector_(ffi.Pointer comparator) { + _objc_msgSend_7(this.pointer, _sel_sortUsingSelector_, comparator); + } + + void insertObjects_atIndexes_(NSArray objects, NSIndexSet indexes) { + _objc_msgSend_299(this.pointer, _sel_insertObjects_atIndexes_, + objects.pointer, indexes.pointer); + } + + void removeObjectsAtIndexes_(NSIndexSet indexes) { + _objc_msgSend_300( + this.pointer, _sel_removeObjectsAtIndexes_, indexes.pointer); + } + + void replaceObjectsAtIndexes_withObjects_( + NSIndexSet indexes, NSArray objects) { + _objc_msgSend_301(this.pointer, _sel_replaceObjectsAtIndexes_withObjects_, + indexes.pointer, objects.pointer); + } + + void setObject_atIndexedSubscript_(NSObject obj, int idx) { + _objc_msgSend_288( + this.pointer, _sel_setObject_atIndexedSubscript_, obj.pointer, idx); + } + + void sortUsingComparator_( + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + _objc_msgSend_302(this.pointer, _sel_sortUsingComparator_, cmptr.pointer); + } + + void sortWithOptions_usingComparator_(int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + _objc_msgSend_303(this.pointer, _sel_sortWithOptions_usingComparator_, opts, + cmptr.pointer); + } + + static NSMutableArray arrayWithCapacity_(int numItems) { + final _ret = _objc_msgSend_97( + _class_NSMutableArray, _sel_arrayWithCapacity_, numItems); + return NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableArray? arrayWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_304( + _class_NSMutableArray, _sel_arrayWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableArray? arrayWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_305( + _class_NSMutableArray, _sel_arrayWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + NSMutableArray? initWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_304( + this.pointer, _sel_initWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + NSMutableArray? initWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_305( + this.pointer, _sel_initWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + void applyDifference_(NSObject difference) { + _objc_msgSend_198(this.pointer, _sel_applyDifference_, difference.pointer); + } + + @override + NSMutableArray initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_98( + this.pointer, _sel_initWithObjects_count_, objects, cnt); + return NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableArray array() { + final _ret = _objc_msgSend_2(_class_NSMutableArray, _sel_array); + return NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableArray arrayWithObject_(NSObject anObject) { + final _ret = _objc_msgSend_148( + _class_NSMutableArray, _sel_arrayWithObject_, anObject.pointer); + return NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableArray arrayWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_98( + _class_NSMutableArray, _sel_arrayWithObjects_count_, objects, cnt); + return NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableArray arrayWithObjects_(NSObject firstObj) { + final _ret = _objc_msgSend_148( + _class_NSMutableArray, _sel_arrayWithObjects_, firstObj.pointer); + return NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableArray arrayWithArray_(NSArray array) { + final _ret = _objc_msgSend_149( + _class_NSMutableArray, _sel_arrayWithArray_, array.pointer); + return NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableArray initWithObjects_(NSObject firstObj) { + final _ret = _objc_msgSend_148( + this.pointer, _sel_initWithObjects_, firstObj.pointer); + return NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableArray initWithArray_(NSArray array) { + final _ret = + _objc_msgSend_149(this.pointer, _sel_initWithArray_, array.pointer); + return NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableArray initWithArray_copyItems_(NSArray array, bool flag) { + final _ret = _objc_msgSend_150( + this.pointer, _sel_initWithArray_copyItems_, array.pointer, flag); + return NSMutableArray.castFromPointer(_ret, retain: false, release: true); + } + + static NSArray? arrayWithContentsOfURL_error_( + NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_151(_class_NSMutableArray, + _sel_arrayWithContentsOfURL_error_, url.pointer, error); + return _ret.address == 0 + ? null + : NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableArray new1() { + final _ret = _objc_msgSend_2(_class_NSMutableArray, _sel_new); + return NSMutableArray.castFromPointer(_ret, retain: false, release: true); + } + + static NSMutableArray allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_3(_class_NSMutableArray, _sel_allocWithZone_, zone); + return NSMutableArray.castFromPointer(_ret, retain: false, release: true); + } + + static NSMutableArray alloc() { + final _ret = _objc_msgSend_2(_class_NSMutableArray, _sel_alloc); + return NSMutableArray.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSMutableArray = objc.getClass("NSMutableArray"); +late final _sel_addObject_ = objc.registerName("addObject:"); +late final _sel_insertObject_atIndex_ = + objc.registerName("insertObject:atIndex:"); +final _objc_msgSend_288 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_removeLastObject = objc.registerName("removeLastObject"); +late final _sel_removeObjectAtIndex_ = + objc.registerName("removeObjectAtIndex:"); +final _objc_msgSend_289 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_replaceObjectAtIndex_withObject_ = + objc.registerName("replaceObjectAtIndex:withObject:"); +final _objc_msgSend_290 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_initWithCapacity_ = objc.registerName("initWithCapacity:"); +late final _sel_addObjectsFromArray_ = + objc.registerName("addObjectsFromArray:"); +final _objc_msgSend_291 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_exchangeObjectAtIndex_withObjectAtIndex_ = + objc.registerName("exchangeObjectAtIndex:withObjectAtIndex:"); +final _objc_msgSend_292 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int, int)>(); +late final _sel_removeAllObjects = objc.registerName("removeAllObjects"); +late final _sel_removeObject_inRange_ = + objc.registerName("removeObject:inRange:"); +final _objc_msgSend_293 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); +late final _sel_removeObject_ = objc.registerName("removeObject:"); +late final _sel_removeObjectIdenticalTo_inRange_ = + objc.registerName("removeObjectIdenticalTo:inRange:"); +late final _sel_removeObjectIdenticalTo_ = + objc.registerName("removeObjectIdenticalTo:"); +late final _sel_removeObjectsFromIndices_numIndices_ = + objc.registerName("removeObjectsFromIndices:numIndices:"); +final _objc_msgSend_294 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_removeObjectsInArray_ = + objc.registerName("removeObjectsInArray:"); +late final _sel_removeObjectsInRange_ = + objc.registerName("removeObjectsInRange:"); +final _objc_msgSend_295 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_replaceObjectsInRange_withObjectsFromArray_range_ = + objc.registerName("replaceObjectsInRange:withObjectsFromArray:range:"); +final _objc_msgSend_296 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + _NSRange)>(); +late final _sel_replaceObjectsInRange_withObjectsFromArray_ = + objc.registerName("replaceObjectsInRange:withObjectsFromArray:"); +final _objc_msgSend_297 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_setArray_ = objc.registerName("setArray:"); +late final _sel_sortUsingFunction_context_ = + objc.registerName("sortUsingFunction:context:"); +final _objc_msgSend_298 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>(); +late final _sel_sortUsingSelector_ = objc.registerName("sortUsingSelector:"); +late final _sel_insertObjects_atIndexes_ = + objc.registerName("insertObjects:atIndexes:"); +final _objc_msgSend_299 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeObjectsAtIndexes_ = + objc.registerName("removeObjectsAtIndexes:"); +final _objc_msgSend_300 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_replaceObjectsAtIndexes_withObjects_ = + objc.registerName("replaceObjectsAtIndexes:withObjects:"); +final _objc_msgSend_301 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_setObject_atIndexedSubscript_ = + objc.registerName("setObject:atIndexedSubscript:"); +late final _sel_sortUsingComparator_ = + objc.registerName("sortUsingComparator:"); +final _objc_msgSend_302 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_sortWithOptions_usingComparator_ = + objc.registerName("sortWithOptions:usingComparator:"); +final _objc_msgSend_303 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_arrayWithCapacity_ = objc.registerName("arrayWithCapacity:"); +final _objc_msgSend_304 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_305 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_applyDifference_ = objc.registerName("applyDifference:"); + +class NSMutableData extends NSData { + NSMutableData._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSMutableData] that points to the same underlying object as [other]. + NSMutableData.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSMutableData] that wraps the given raw object pointer. + NSMutableData.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSMutableData]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMutableData); + } + + ffi.Pointer get mutableBytes { + return _objc_msgSend_31(this.pointer, _sel_mutableBytes); + } + + @override + int get length { + return _objc_msgSend_12(this.pointer, _sel_length); + } + + set length(int value) { + return _objc_msgSend_306(this.pointer, _sel_setLength_, value); + } + + void appendBytes_length_(ffi.Pointer bytes, int length) { + _objc_msgSend_33(this.pointer, _sel_appendBytes_length_, bytes, length); + } + + void appendData_(NSData other) { + _objc_msgSend_307(this.pointer, _sel_appendData_, other.pointer); + } + + void increaseLengthBy_(int extraLength) { + _objc_msgSend_289(this.pointer, _sel_increaseLengthBy_, extraLength); + } + + void replaceBytesInRange_withBytes_( + _NSRange range, ffi.Pointer bytes) { + _objc_msgSend_308( + this.pointer, _sel_replaceBytesInRange_withBytes_, range, bytes); + } + + void resetBytesInRange_(_NSRange range) { + _objc_msgSend_295(this.pointer, _sel_resetBytesInRange_, range); + } + + void setData_(NSData data) { + _objc_msgSend_307(this.pointer, _sel_setData_, data.pointer); + } + + void replaceBytesInRange_withBytes_length_(_NSRange range, + ffi.Pointer replacementBytes, int replacementLength) { + _objc_msgSend_309(this.pointer, _sel_replaceBytesInRange_withBytes_length_, + range, replacementBytes, replacementLength); + } + + static NSMutableData? dataWithCapacity_(int aNumItems) { + final _ret = _objc_msgSend_310( + _class_NSMutableData, _sel_dataWithCapacity_, aNumItems); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableData? dataWithLength_(int length) { + final _ret = + _objc_msgSend_310(_class_NSMutableData, _sel_dataWithLength_, length); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + NSMutableData? initWithCapacity_(int capacity) { + final _ret = + _objc_msgSend_310(this.pointer, _sel_initWithCapacity_, capacity); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + NSMutableData? initWithLength_(int length) { + final _ret = _objc_msgSend_310(this.pointer, _sel_initWithLength_, length); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + bool decompressUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + return _objc_msgSend_311( + this.pointer, _sel_decompressUsingAlgorithm_error_, algorithm, error); + } + + bool compressUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + return _objc_msgSend_311( + this.pointer, _sel_compressUsingAlgorithm_error_, algorithm, error); + } + + static NSMutableData data() { + final _ret = _objc_msgSend_2(_class_NSMutableData, _sel_data); + return NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableData dataWithBytes_length_( + ffi.Pointer bytes, int length) { + final _ret = _objc_msgSend_210( + _class_NSMutableData, _sel_dataWithBytes_length_, bytes, length); + return NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableData dataWithBytesNoCopy_length_( + ffi.Pointer bytes, int length) { + final _ret = _objc_msgSend_210( + _class_NSMutableData, _sel_dataWithBytesNoCopy_length_, bytes, length); + return NSMutableData.castFromPointer(_ret, retain: false, release: true); + } + + static NSMutableData dataWithBytesNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, int length, bool b) { + final _ret = _objc_msgSend_211(_class_NSMutableData, + _sel_dataWithBytesNoCopy_length_freeWhenDone_, bytes, length, b); + return NSMutableData.castFromPointer(_ret, retain: false, release: true); + } + + static NSMutableData? dataWithContentsOfFile_options_error_(NSString path, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _objc_msgSend_212( + _class_NSMutableData, + _sel_dataWithContentsOfFile_options_error_, + path.pointer, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableData? dataWithContentsOfURL_options_error_(NSURL url, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _objc_msgSend_213( + _class_NSMutableData, + _sel_dataWithContentsOfURL_options_error_, + url.pointer, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableData? dataWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_49( + _class_NSMutableData, _sel_dataWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableData? dataWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_214( + _class_NSMutableData, _sel_dataWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableData initWithBytes_length_(ffi.Pointer bytes, int length) { + final _ret = _objc_msgSend_210( + this.pointer, _sel_initWithBytes_length_, bytes, length); + return NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableData initWithBytesNoCopy_length_( + ffi.Pointer bytes, int length) { + final _ret = _objc_msgSend_210( + this.pointer, _sel_initWithBytesNoCopy_length_, bytes, length); + return NSMutableData.castFromPointer(_ret, retain: false, release: true); + } + + @override + NSMutableData initWithBytesNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, int length, bool b) { + final _ret = _objc_msgSend_211(this.pointer, + _sel_initWithBytesNoCopy_length_freeWhenDone_, bytes, length, b); + return NSMutableData.castFromPointer(_ret, retain: false, release: true); + } + + @override + NSMutableData initWithBytesNoCopy_length_deallocator_( + ffi.Pointer bytes, + int length, + ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { + final _ret = _objc_msgSend_215( + this.pointer, + _sel_initWithBytesNoCopy_length_deallocator_, + bytes, + length, + deallocator?.pointer ?? ffi.nullptr); + return NSMutableData.castFromPointer(_ret, retain: false, release: true); + } + + @override + NSMutableData? initWithContentsOfFile_options_error_(NSString path, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _objc_msgSend_212( + this.pointer, + _sel_initWithContentsOfFile_options_error_, + path.pointer, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableData? initWithContentsOfURL_options_error_(NSURL url, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _objc_msgSend_213( + this.pointer, + _sel_initWithContentsOfURL_options_error_, + url.pointer, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableData? initWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_49( + this.pointer, _sel_initWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableData? initWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_214( + this.pointer, _sel_initWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableData initWithData_(NSData data) { + final _ret = + _objc_msgSend_216(this.pointer, _sel_initWithData_, data.pointer); + return NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableData dataWithData_(NSData data) { + final _ret = _objc_msgSend_216( + _class_NSMutableData, _sel_dataWithData_, data.pointer); + return NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableData? initWithBase64EncodedString_options_( + NSString base64String, int options) { + final _ret = _objc_msgSend_217( + this.pointer, + _sel_initWithBase64EncodedString_options_, + base64String.pointer, + options); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableData? initWithBase64EncodedData_options_( + NSData base64Data, int options) { + final _ret = _objc_msgSend_219(this.pointer, + _sel_initWithBase64EncodedData_options_, base64Data.pointer, options); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableData? decompressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _objc_msgSend_221(this.pointer, + _sel_decompressedDataUsingAlgorithm_error_, algorithm, error); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableData? compressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _objc_msgSend_221(this.pointer, + _sel_compressedDataUsingAlgorithm_error_, algorithm, error); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject? dataWithContentsOfMappedFile_(NSString path) { + final _ret = _objc_msgSend_49( + _class_NSMutableData, _sel_dataWithContentsOfMappedFile_, path.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableData init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableData new1() { + final _ret = _objc_msgSend_2(_class_NSMutableData, _sel_new); + return NSMutableData.castFromPointer(_ret, retain: false, release: true); + } + + static NSMutableData allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_3(_class_NSMutableData, _sel_allocWithZone_, zone); + return NSMutableData.castFromPointer(_ret, retain: false, release: true); + } + + static NSMutableData alloc() { + final _ret = _objc_msgSend_2(_class_NSMutableData, _sel_alloc); + return NSMutableData.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSMutableData = objc.getClass("NSMutableData"); +late final _sel_mutableBytes = objc.registerName("mutableBytes"); +late final _sel_setLength_ = objc.registerName("setLength:"); +final _objc_msgSend_306 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_appendBytes_length_ = objc.registerName("appendBytes:length:"); +late final _sel_appendData_ = objc.registerName("appendData:"); +final _objc_msgSend_307 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_increaseLengthBy_ = objc.registerName("increaseLengthBy:"); +late final _sel_replaceBytesInRange_withBytes_ = + objc.registerName("replaceBytesInRange:withBytes:"); +final _objc_msgSend_308 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, _NSRange, ffi.Pointer)>(); +late final _sel_resetBytesInRange_ = objc.registerName("resetBytesInRange:"); +late final _sel_setData_ = objc.registerName("setData:"); +late final _sel_replaceBytesInRange_withBytes_length_ = + objc.registerName("replaceBytesInRange:withBytes:length:"); +final _objc_msgSend_309 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + int)>(); +late final _sel_dataWithCapacity_ = objc.registerName("dataWithCapacity:"); +final _objc_msgSend_310 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_dataWithLength_ = objc.registerName("dataWithLength:"); +late final _sel_initWithLength_ = objc.registerName("initWithLength:"); +late final _sel_decompressUsingAlgorithm_error_ = + objc.registerName("decompressUsingAlgorithm:error:"); +final _objc_msgSend_311 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_compressUsingAlgorithm_error_ = + objc.registerName("compressUsingAlgorithm:error:"); + +class NSNotification extends NSObject { + NSNotification._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSNotification] that points to the same underlying object as [other]. + NSNotification.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSNotification] that wraps the given raw object pointer. + NSNotification.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSNotification]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSNotification); + } + + NSString get name { + final _ret = _objc_msgSend_32(this.pointer, _sel_name); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? get object { + final _ret = _objc_msgSend_61(this.pointer, _sel_object); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSDictionary? get userInfo { + final _ret = _objc_msgSend_276(this.pointer, _sel_userInfo); + return _ret.address == 0 + ? null + : NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + NSNotification initWithName_object_userInfo_( + NSString name, NSObject? object, NSDictionary? userInfo) { + final _ret = _objc_msgSend_312( + this.pointer, + _sel_initWithName_object_userInfo_, + name.pointer, + object?.pointer ?? ffi.nullptr, + userInfo?.pointer ?? ffi.nullptr); + return NSNotification.castFromPointer(_ret, retain: true, release: true); + } + + NSNotification? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSNotification.castFromPointer(_ret, retain: true, release: true); + } + + static NSNotification notificationWithName_object_( + NSString aName, NSObject? anObject) { + final _ret = _objc_msgSend_260( + _class_NSNotification, + _sel_notificationWithName_object_, + aName.pointer, + anObject?.pointer ?? ffi.nullptr); + return NSNotification.castFromPointer(_ret, retain: true, release: true); + } + + static NSNotification notificationWithName_object_userInfo_( + NSString aName, NSObject? anObject, NSDictionary? aUserInfo) { + final _ret = _objc_msgSend_312( + _class_NSNotification, + _sel_notificationWithName_object_userInfo_, + aName.pointer, + anObject?.pointer ?? ffi.nullptr, + aUserInfo?.pointer ?? ffi.nullptr); + return NSNotification.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSNotification init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSNotification.castFromPointer(_ret, retain: true, release: true); + } + + static NSNotification new1() { + final _ret = _objc_msgSend_2(_class_NSNotification, _sel_new); + return NSNotification.castFromPointer(_ret, retain: false, release: true); + } + + static NSNotification allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_3(_class_NSNotification, _sel_allocWithZone_, zone); + return NSNotification.castFromPointer(_ret, retain: false, release: true); + } + + static NSNotification alloc() { + final _ret = _objc_msgSend_2(_class_NSNotification, _sel_alloc); + return NSNotification.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSNotification = objc.getClass("NSNotification"); +late final _sel_name = objc.registerName("name"); +late final _sel_object = objc.registerName("object"); +late final _sel_userInfo = objc.registerName("userInfo"); +late final _sel_initWithName_object_userInfo_ = + objc.registerName("initWithName:object:userInfo:"); +final _objc_msgSend_312 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_notificationWithName_object_ = + objc.registerName("notificationWithName:object:"); +late final _sel_notificationWithName_object_userInfo_ = + objc.registerName("notificationWithName:object:userInfo:"); + +class NSDate extends NSObject { + NSDate._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSDate] that points to the same underlying object as [other]. + NSDate.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSDate] that wraps the given raw object pointer. + NSDate.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSDate]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSDate); + } + + double get timeIntervalSinceReferenceDate { + return objc.useMsgSendVariants + ? _objc_msgSend_90Fpret( + this.pointer, _sel_timeIntervalSinceReferenceDate) + : _objc_msgSend_90(this.pointer, _sel_timeIntervalSinceReferenceDate); + } + + @override + NSDate init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + NSDate initWithTimeIntervalSinceReferenceDate_(double ti) { + final _ret = _objc_msgSend_313( + this.pointer, _sel_initWithTimeIntervalSinceReferenceDate_, ti); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + NSDate? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSDate.castFromPointer(_ret, retain: true, release: true); + } + + double timeIntervalSinceDate_(NSDate anotherDate) { + return objc.useMsgSendVariants + ? _objc_msgSend_314Fpret( + this.pointer, _sel_timeIntervalSinceDate_, anotherDate.pointer) + : _objc_msgSend_314( + this.pointer, _sel_timeIntervalSinceDate_, anotherDate.pointer); + } + + double get timeIntervalSinceNow { + return objc.useMsgSendVariants + ? _objc_msgSend_90Fpret(this.pointer, _sel_timeIntervalSinceNow) + : _objc_msgSend_90(this.pointer, _sel_timeIntervalSinceNow); + } + + double get timeIntervalSince1970 { + return objc.useMsgSendVariants + ? _objc_msgSend_90Fpret(this.pointer, _sel_timeIntervalSince1970) + : _objc_msgSend_90(this.pointer, _sel_timeIntervalSince1970); + } + + NSObject addTimeInterval_(double seconds) { + final _ret = + _objc_msgSend_313(this.pointer, _sel_addTimeInterval_, seconds); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSDate dateByAddingTimeInterval_(double ti) { + final _ret = + _objc_msgSend_313(this.pointer, _sel_dateByAddingTimeInterval_, ti); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + NSDate earlierDate_(NSDate anotherDate) { + final _ret = + _objc_msgSend_315(this.pointer, _sel_earlierDate_, anotherDate.pointer); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + NSDate laterDate_(NSDate anotherDate) { + final _ret = + _objc_msgSend_315(this.pointer, _sel_laterDate_, anotherDate.pointer); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + int compare_(NSDate other) { + return _objc_msgSend_316(this.pointer, _sel_compare_, other.pointer); + } + + bool isEqualToDate_(NSDate otherDate) { + return _objc_msgSend_317( + this.pointer, _sel_isEqualToDate_, otherDate.pointer); + } + + NSString get description { + final _ret = _objc_msgSend_32(this.pointer, _sel_description); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString descriptionWithLocale_(NSObject? locale) { + final _ret = _objc_msgSend_93(this.pointer, _sel_descriptionWithLocale_, + locale?.pointer ?? ffi.nullptr); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSDate date() { + final _ret = _objc_msgSend_2(_class_NSDate, _sel_date); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + static NSDate dateWithTimeIntervalSinceNow_(double secs) { + final _ret = _objc_msgSend_313( + _class_NSDate, _sel_dateWithTimeIntervalSinceNow_, secs); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + static NSDate dateWithTimeIntervalSinceReferenceDate_(double ti) { + final _ret = _objc_msgSend_313( + _class_NSDate, _sel_dateWithTimeIntervalSinceReferenceDate_, ti); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + static NSDate dateWithTimeIntervalSince1970_(double secs) { + final _ret = _objc_msgSend_313( + _class_NSDate, _sel_dateWithTimeIntervalSince1970_, secs); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + static NSDate dateWithTimeInterval_sinceDate_( + double secsToBeAdded, NSDate date) { + final _ret = _objc_msgSend_318(_class_NSDate, + _sel_dateWithTimeInterval_sinceDate_, secsToBeAdded, date.pointer); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + static NSDate getDistantFuture() { + final _ret = _objc_msgSend_319(_class_NSDate, _sel_distantFuture); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + static NSDate getDistantPast() { + final _ret = _objc_msgSend_319(_class_NSDate, _sel_distantPast); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + static NSDate getNow() { + final _ret = _objc_msgSend_319(_class_NSDate, _sel_now); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + NSDate initWithTimeIntervalSinceNow_(double secs) { + final _ret = _objc_msgSend_313( + this.pointer, _sel_initWithTimeIntervalSinceNow_, secs); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + NSDate initWithTimeIntervalSince1970_(double secs) { + final _ret = _objc_msgSend_313( + this.pointer, _sel_initWithTimeIntervalSince1970_, secs); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + NSDate initWithTimeInterval_sinceDate_(double secsToBeAdded, NSDate date) { + final _ret = _objc_msgSend_318(this.pointer, + _sel_initWithTimeInterval_sinceDate_, secsToBeAdded, date.pointer); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + static NSDate new1() { + final _ret = _objc_msgSend_2(_class_NSDate, _sel_new); + return NSDate.castFromPointer(_ret, retain: false, release: true); + } + + static NSDate allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSDate, _sel_allocWithZone_, zone); + return NSDate.castFromPointer(_ret, retain: false, release: true); + } + + static NSDate alloc() { + final _ret = _objc_msgSend_2(_class_NSDate, _sel_alloc); + return NSDate.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSDate = objc.getClass("NSDate"); +late final _sel_timeIntervalSinceReferenceDate = + objc.registerName("timeIntervalSinceReferenceDate"); +late final _sel_initWithTimeIntervalSinceReferenceDate_ = + objc.registerName("initWithTimeIntervalSinceReferenceDate:"); +final _objc_msgSend_313 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, double)>(); +late final _sel_timeIntervalSinceDate_ = + objc.registerName("timeIntervalSinceDate:"); +final _objc_msgSend_314 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_314Fpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_timeIntervalSinceNow = + objc.registerName("timeIntervalSinceNow"); +late final _sel_timeIntervalSince1970 = + objc.registerName("timeIntervalSince1970"); +late final _sel_addTimeInterval_ = objc.registerName("addTimeInterval:"); +late final _sel_dateByAddingTimeInterval_ = + objc.registerName("dateByAddingTimeInterval:"); +late final _sel_earlierDate_ = objc.registerName("earlierDate:"); +final _objc_msgSend_315 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_laterDate_ = objc.registerName("laterDate:"); +final _objc_msgSend_316 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isEqualToDate_ = objc.registerName("isEqualToDate:"); +final _objc_msgSend_317 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_date = objc.registerName("date"); +late final _sel_dateWithTimeIntervalSinceNow_ = + objc.registerName("dateWithTimeIntervalSinceNow:"); +late final _sel_dateWithTimeIntervalSinceReferenceDate_ = + objc.registerName("dateWithTimeIntervalSinceReferenceDate:"); +late final _sel_dateWithTimeIntervalSince1970_ = + objc.registerName("dateWithTimeIntervalSince1970:"); +late final _sel_dateWithTimeInterval_sinceDate_ = + objc.registerName("dateWithTimeInterval:sinceDate:"); +final _objc_msgSend_318 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer)>(); +late final _sel_distantFuture = objc.registerName("distantFuture"); +final _objc_msgSend_319 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_distantPast = objc.registerName("distantPast"); +late final _sel_now = objc.registerName("now"); +late final _sel_initWithTimeIntervalSinceNow_ = + objc.registerName("initWithTimeIntervalSinceNow:"); +late final _sel_initWithTimeIntervalSince1970_ = + objc.registerName("initWithTimeIntervalSince1970:"); +late final _sel_initWithTimeInterval_sinceDate_ = + objc.registerName("initWithTimeInterval:sinceDate:"); + +class NSMutableDictionary extends NSDictionary { + NSMutableDictionary._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSMutableDictionary] that points to the same underlying object as [other]. + NSMutableDictionary.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSMutableDictionary] that wraps the given raw object pointer. + NSMutableDictionary.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSMutableDictionary]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMutableDictionary); + } + + void removeObjectForKey_(NSObject aKey) { + _objc_msgSend_198(this.pointer, _sel_removeObjectForKey_, aKey.pointer); + } + + void setObject_forKey_(NSObject anObject, NSObject aKey) { + _objc_msgSend_320( + this.pointer, _sel_setObject_forKey_, anObject.pointer, aKey.pointer); + } + + @override + NSMutableDictionary init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + NSMutableDictionary initWithCapacity_(int numItems) { + final _ret = + _objc_msgSend_97(this.pointer, _sel_initWithCapacity_, numItems); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + @override + NSMutableDictionary? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + void addEntriesFromDictionary_(NSDictionary otherDictionary) { + _objc_msgSend_321( + this.pointer, _sel_addEntriesFromDictionary_, otherDictionary.pointer); + } + + void removeAllObjects() { + _objc_msgSend_1(this.pointer, _sel_removeAllObjects); + } + + void removeObjectsForKeys_(NSArray keyArray) { + _objc_msgSend_291( + this.pointer, _sel_removeObjectsForKeys_, keyArray.pointer); + } + + void setDictionary_(NSDictionary otherDictionary) { + _objc_msgSend_321( + this.pointer, _sel_setDictionary_, otherDictionary.pointer); + } + + void setObject_forKeyedSubscript_(NSObject? obj, NSObject key) { + _objc_msgSend_322(this.pointer, _sel_setObject_forKeyedSubscript_, + obj?.pointer ?? ffi.nullptr, key.pointer); + } + + static NSMutableDictionary dictionaryWithCapacity_(int numItems) { + final _ret = _objc_msgSend_97( + _class_NSMutableDictionary, _sel_dictionaryWithCapacity_, numItems); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + static NSMutableDictionary? dictionaryWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_323(_class_NSMutableDictionary, + _sel_dictionaryWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + static NSMutableDictionary? dictionaryWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_324(_class_NSMutableDictionary, + _sel_dictionaryWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + NSMutableDictionary? initWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_323( + this.pointer, _sel_initWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + NSMutableDictionary? initWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_324( + this.pointer, _sel_initWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithSharedKeySet_(NSObject keyset) { + final _ret = _objc_msgSend_325(_class_NSMutableDictionary, + _sel_dictionaryWithSharedKeySet_, keyset.pointer); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + @override + NSMutableDictionary initWithObjects_forKeys_count_( + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _objc_msgSend_171( + this.pointer, _sel_initWithObjects_forKeys_count_, objects, keys, cnt); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + static NSMutableDictionary dictionary() { + final _ret = _objc_msgSend_2(_class_NSMutableDictionary, _sel_dictionary); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithObject_forKey_( + NSObject object, NSObject key) { + final _ret = _objc_msgSend_183(_class_NSMutableDictionary, + _sel_dictionaryWithObject_forKey_, object.pointer, key.pointer); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithObjects_forKeys_count_( + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _objc_msgSend_171(_class_NSMutableDictionary, + _sel_dictionaryWithObjects_forKeys_count_, objects, keys, cnt); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithObjectsAndKeys_( + NSObject firstObject) { + final _ret = _objc_msgSend_148(_class_NSMutableDictionary, + _sel_dictionaryWithObjectsAndKeys_, firstObject.pointer); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithDictionary_(NSDictionary dict) { + final _ret = _objc_msgSend_184(_class_NSMutableDictionary, + _sel_dictionaryWithDictionary_, dict.pointer); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithObjects_forKeys_( + NSArray objects, NSArray keys) { + final _ret = _objc_msgSend_185(_class_NSMutableDictionary, + _sel_dictionaryWithObjects_forKeys_, objects.pointer, keys.pointer); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + @override + NSMutableDictionary initWithObjectsAndKeys_(NSObject firstObject) { + final _ret = _objc_msgSend_148( + this.pointer, _sel_initWithObjectsAndKeys_, firstObject.pointer); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + @override + NSMutableDictionary initWithDictionary_(NSDictionary otherDictionary) { + final _ret = _objc_msgSend_184( + this.pointer, _sel_initWithDictionary_, otherDictionary.pointer); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + @override + NSMutableDictionary initWithDictionary_copyItems_( + NSDictionary otherDictionary, bool flag) { + final _ret = _objc_msgSend_186(this.pointer, + _sel_initWithDictionary_copyItems_, otherDictionary.pointer, flag); + return NSMutableDictionary.castFromPointer(_ret, + retain: false, release: true); + } + + @override + NSMutableDictionary initWithObjects_forKeys_(NSArray objects, NSArray keys) { + final _ret = _objc_msgSend_185(this.pointer, _sel_initWithObjects_forKeys_, + objects.pointer, keys.pointer); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + static NSDictionary? dictionaryWithContentsOfURL_error_( + NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_187(_class_NSMutableDictionary, + _sel_dictionaryWithContentsOfURL_error_, url.pointer, error); + return _ret.address == 0 + ? null + : NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject sharedKeySetForKeys_(NSArray keys) { + final _ret = _objc_msgSend_149( + _class_NSMutableDictionary, _sel_sharedKeySetForKeys_, keys.pointer); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableDictionary new1() { + final _ret = _objc_msgSend_2(_class_NSMutableDictionary, _sel_new); + return NSMutableDictionary.castFromPointer(_ret, + retain: false, release: true); + } + + static NSMutableDictionary allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_3(_class_NSMutableDictionary, _sel_allocWithZone_, zone); + return NSMutableDictionary.castFromPointer(_ret, + retain: false, release: true); + } + + static NSMutableDictionary alloc() { + final _ret = _objc_msgSend_2(_class_NSMutableDictionary, _sel_alloc); + return NSMutableDictionary.castFromPointer(_ret, + retain: false, release: true); + } +} + +late final _class_NSMutableDictionary = objc.getClass("NSMutableDictionary"); +late final _sel_removeObjectForKey_ = objc.registerName("removeObjectForKey:"); +late final _sel_setObject_forKey_ = objc.registerName("setObject:forKey:"); +final _objc_msgSend_320 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_addEntriesFromDictionary_ = + objc.registerName("addEntriesFromDictionary:"); +final _objc_msgSend_321 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_removeObjectsForKeys_ = + objc.registerName("removeObjectsForKeys:"); +late final _sel_setDictionary_ = objc.registerName("setDictionary:"); +late final _sel_setObject_forKeyedSubscript_ = + objc.registerName("setObject:forKeyedSubscript:"); +final _objc_msgSend_322 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_dictionaryWithCapacity_ = + objc.registerName("dictionaryWithCapacity:"); +final _objc_msgSend_323 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_324 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dictionaryWithSharedKeySet_ = + objc.registerName("dictionaryWithSharedKeySet:"); +final _objc_msgSend_325 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class NSSet extends NSObject { + NSSet._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSSet] that points to the same underlying object as [other]. + NSSet.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSSet] that wraps the given raw object pointer. + NSSet.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSSet]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSSet); + } + + int get count { + return _objc_msgSend_12(this.pointer, _sel_count); + } + + NSObject? member_(NSObject object) { + final _ret = _objc_msgSend_170(this.pointer, _sel_member_, object.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSEnumerator objectEnumerator() { + final _ret = _objc_msgSend_108(this.pointer, _sel_objectEnumerator); + return NSEnumerator.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSSet init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + NSSet initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_98( + this.pointer, _sel_initWithObjects_count_, objects, cnt); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + NSSet? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSSet.castFromPointer(_ret, retain: true, release: true); + } + + NSArray get allObjects { + final _ret = _objc_msgSend_172(this.pointer, _sel_allObjects); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? anyObject() { + final _ret = _objc_msgSend_61(this.pointer, _sel_anyObject); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + bool containsObject_(NSObject anObject) { + return _objc_msgSend_0( + this.pointer, _sel_containsObject_, anObject.pointer); + } + + NSString get description { + final _ret = _objc_msgSend_32(this.pointer, _sel_description); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString descriptionWithLocale_(NSObject? locale) { + final _ret = _objc_msgSend_93(this.pointer, _sel_descriptionWithLocale_, + locale?.pointer ?? ffi.nullptr); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + bool intersectsSet_(NSSet otherSet) { + return _objc_msgSend_326( + this.pointer, _sel_intersectsSet_, otherSet.pointer); + } + + bool isEqualToSet_(NSSet otherSet) { + return _objc_msgSend_326( + this.pointer, _sel_isEqualToSet_, otherSet.pointer); + } + + bool isSubsetOfSet_(NSSet otherSet) { + return _objc_msgSend_326( + this.pointer, _sel_isSubsetOfSet_, otherSet.pointer); + } + + void makeObjectsPerformSelector_(ffi.Pointer aSelector) { + _objc_msgSend_7(this.pointer, _sel_makeObjectsPerformSelector_, aSelector); + } + + void makeObjectsPerformSelector_withObject_( + ffi.Pointer aSelector, NSObject? argument) { + _objc_msgSend_114(this.pointer, _sel_makeObjectsPerformSelector_withObject_, + aSelector, argument?.pointer ?? ffi.nullptr); + } + + NSSet setByAddingObject_(NSObject anObject) { + final _ret = _objc_msgSend_327( + this.pointer, _sel_setByAddingObject_, anObject.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + NSSet setByAddingObjectsFromSet_(NSSet other) { + final _ret = _objc_msgSend_328( + this.pointer, _sel_setByAddingObjectsFromSet_, other.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + NSSet setByAddingObjectsFromArray_(NSArray other) { + final _ret = _objc_msgSend_329( + this.pointer, _sel_setByAddingObjectsFromArray_, other.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + void enumerateObjectsUsingBlock_( + ObjCBlock_ffiVoid_objcObjCObject_bool block) { + _objc_msgSend_330( + this.pointer, _sel_enumerateObjectsUsingBlock_, block.pointer); + } + + void enumerateObjectsWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_objcObjCObject_bool block) { + _objc_msgSend_331(this.pointer, + _sel_enumerateObjectsWithOptions_usingBlock_, opts, block.pointer); + } + + NSSet objectsPassingTest_(ObjCBlock_bool_objcObjCObject_bool predicate) { + final _ret = _objc_msgSend_332( + this.pointer, _sel_objectsPassingTest_, predicate.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + NSSet objectsWithOptions_passingTest_( + int opts, ObjCBlock_bool_objcObjCObject_bool predicate) { + final _ret = _objc_msgSend_333(this.pointer, + _sel_objectsWithOptions_passingTest_, opts, predicate.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSSet set1() { + final _ret = _objc_msgSend_2(_class_NSSet, _sel_set); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSSet setWithObject_(NSObject object) { + final _ret = + _objc_msgSend_148(_class_NSSet, _sel_setWithObject_, object.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSSet setWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_98( + _class_NSSet, _sel_setWithObjects_count_, objects, cnt); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSSet setWithObjects_(NSObject firstObj) { + final _ret = + _objc_msgSend_148(_class_NSSet, _sel_setWithObjects_, firstObj.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSSet setWithSet_(NSSet set) { + final _ret = _objc_msgSend_334(_class_NSSet, _sel_setWithSet_, set.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSSet setWithArray_(NSArray array) { + final _ret = + _objc_msgSend_149(_class_NSSet, _sel_setWithArray_, array.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + NSSet initWithObjects_(NSObject firstObj) { + final _ret = _objc_msgSend_148( + this.pointer, _sel_initWithObjects_, firstObj.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + NSSet initWithSet_(NSSet set) { + final _ret = + _objc_msgSend_334(this.pointer, _sel_initWithSet_, set.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + NSSet initWithSet_copyItems_(NSSet set, bool flag) { + final _ret = _objc_msgSend_335( + this.pointer, _sel_initWithSet_copyItems_, set.pointer, flag); + return NSSet.castFromPointer(_ret, retain: false, release: true); + } + + NSSet initWithArray_(NSArray array) { + final _ret = + _objc_msgSend_149(this.pointer, _sel_initWithArray_, array.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSSet new1() { + final _ret = _objc_msgSend_2(_class_NSSet, _sel_new); + return NSSet.castFromPointer(_ret, retain: false, release: true); + } + + static NSSet allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSSet, _sel_allocWithZone_, zone); + return NSSet.castFromPointer(_ret, retain: false, release: true); + } + + static NSSet alloc() { + final _ret = _objc_msgSend_2(_class_NSSet, _sel_alloc); + return NSSet.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSSet = objc.getClass("NSSet"); +late final _sel_member_ = objc.registerName("member:"); +late final _sel_anyObject = objc.registerName("anyObject"); +late final _sel_intersectsSet_ = objc.registerName("intersectsSet:"); +final _objc_msgSend_326 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isEqualToSet_ = objc.registerName("isEqualToSet:"); +late final _sel_isSubsetOfSet_ = objc.registerName("isSubsetOfSet:"); +late final _sel_setByAddingObject_ = objc.registerName("setByAddingObject:"); +final _objc_msgSend_327 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setByAddingObjectsFromSet_ = + objc.registerName("setByAddingObjectsFromSet:"); +final _objc_msgSend_328 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setByAddingObjectsFromArray_ = + objc.registerName("setByAddingObjectsFromArray:"); +final _objc_msgSend_329 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_objcObjCObject_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +void _ObjCBlock_ffiVoid_objcObjCObject_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); + +class ObjCBlock_ffiVoid_objcObjCObject_bool extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_objcObjCObject_bool._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_objcObjCObject_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_objcObjCObject_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_bool.fromFunction( + void Function(NSObject, ffi.Pointer) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_bool_closureTrampoline) + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(NSObject.castFromPointer(arg0, retain: true, release: true), + arg1))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_objcObjCObject_bool.listener( + void Function(NSObject, ffi.Pointer) fn) + : this._(objc.newClosureBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(NSObject.castFromPointer(arg0, retain: true, release: true), + arg1))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSObject arg0, ffi.Pointer arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(pointer, arg0.pointer, arg1); +} + +final _objc_msgSend_330 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_331 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +bool _ObjCBlock_bool_objcObjCObject_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +bool _ObjCBlock_bool_objcObjCObject_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as bool Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); + +class ObjCBlock_bool_objcObjCObject_bool extends objc.ObjCBlockBase { + ObjCBlock_bool_objcObjCObject_bool._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_bool_objcObjCObject_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_bool_objcObjCObject_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_bool_fnPtrTrampoline, false) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_bool.fromFunction( + bool Function(NSObject, ffi.Pointer) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_bool_closureTrampoline, false) + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(NSObject.castFromPointer(arg0, retain: true, release: true), + arg1))); + static ffi.Pointer? _dartFuncTrampoline; + + bool call(NSObject arg0, ffi.Pointer arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(pointer, arg0.pointer, arg1); +} + +late final _sel_objectsPassingTest_ = objc.registerName("objectsPassingTest:"); +final _objc_msgSend_332 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_objectsWithOptions_passingTest_ = + objc.registerName("objectsWithOptions:passingTest:"); +final _objc_msgSend_333 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_set = objc.registerName("set"); +late final _sel_setWithObject_ = objc.registerName("setWithObject:"); +late final _sel_setWithObjects_count_ = + objc.registerName("setWithObjects:count:"); +late final _sel_setWithObjects_ = objc.registerName("setWithObjects:"); +late final _sel_setWithSet_ = objc.registerName("setWithSet:"); +final _objc_msgSend_334 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setWithArray_ = objc.registerName("setWithArray:"); +late final _sel_initWithSet_ = objc.registerName("initWithSet:"); +late final _sel_initWithSet_copyItems_ = + objc.registerName("initWithSet:copyItems:"); +final _objc_msgSend_335 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); + +class NSMutableSet extends NSSet { + NSMutableSet._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSMutableSet] that points to the same underlying object as [other]. + NSMutableSet.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSMutableSet] that wraps the given raw object pointer. + NSMutableSet.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSMutableSet]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMutableSet); + } + + void addObject_(NSObject object) { + _objc_msgSend_198(this.pointer, _sel_addObject_, object.pointer); + } + + void removeObject_(NSObject object) { + _objc_msgSend_198(this.pointer, _sel_removeObject_, object.pointer); + } + + @override + NSMutableSet? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableSet init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + NSMutableSet initWithCapacity_(int numItems) { + final _ret = + _objc_msgSend_97(this.pointer, _sel_initWithCapacity_, numItems); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + void addObjectsFromArray_(NSArray array) { + _objc_msgSend_291(this.pointer, _sel_addObjectsFromArray_, array.pointer); + } + + void intersectSet_(NSSet otherSet) { + _objc_msgSend_336(this.pointer, _sel_intersectSet_, otherSet.pointer); + } + + void minusSet_(NSSet otherSet) { + _objc_msgSend_336(this.pointer, _sel_minusSet_, otherSet.pointer); + } + + void removeAllObjects() { + _objc_msgSend_1(this.pointer, _sel_removeAllObjects); + } + + void unionSet_(NSSet otherSet) { + _objc_msgSend_336(this.pointer, _sel_unionSet_, otherSet.pointer); + } + + void setSet_(NSSet otherSet) { + _objc_msgSend_336(this.pointer, _sel_setSet_, otherSet.pointer); + } + + static NSMutableSet setWithCapacity_(int numItems) { + final _ret = + _objc_msgSend_97(_class_NSMutableSet, _sel_setWithCapacity_, numItems); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableSet initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_98( + this.pointer, _sel_initWithObjects_count_, objects, cnt); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableSet set1() { + final _ret = _objc_msgSend_2(_class_NSMutableSet, _sel_set); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableSet setWithObject_(NSObject object) { + final _ret = _objc_msgSend_148( + _class_NSMutableSet, _sel_setWithObject_, object.pointer); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableSet setWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_98( + _class_NSMutableSet, _sel_setWithObjects_count_, objects, cnt); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableSet setWithObjects_(NSObject firstObj) { + final _ret = _objc_msgSend_148( + _class_NSMutableSet, _sel_setWithObjects_, firstObj.pointer); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableSet setWithSet_(NSSet set) { + final _ret = + _objc_msgSend_334(_class_NSMutableSet, _sel_setWithSet_, set.pointer); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableSet setWithArray_(NSArray array) { + final _ret = _objc_msgSend_149( + _class_NSMutableSet, _sel_setWithArray_, array.pointer); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableSet initWithObjects_(NSObject firstObj) { + final _ret = _objc_msgSend_148( + this.pointer, _sel_initWithObjects_, firstObj.pointer); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableSet initWithSet_(NSSet set) { + final _ret = + _objc_msgSend_334(this.pointer, _sel_initWithSet_, set.pointer); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableSet initWithSet_copyItems_(NSSet set, bool flag) { + final _ret = _objc_msgSend_335( + this.pointer, _sel_initWithSet_copyItems_, set.pointer, flag); + return NSMutableSet.castFromPointer(_ret, retain: false, release: true); + } + + @override + NSMutableSet initWithArray_(NSArray array) { + final _ret = + _objc_msgSend_149(this.pointer, _sel_initWithArray_, array.pointer); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableSet new1() { + final _ret = _objc_msgSend_2(_class_NSMutableSet, _sel_new); + return NSMutableSet.castFromPointer(_ret, retain: false, release: true); + } + + static NSMutableSet allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_3(_class_NSMutableSet, _sel_allocWithZone_, zone); + return NSMutableSet.castFromPointer(_ret, retain: false, release: true); + } + + static NSMutableSet alloc() { + final _ret = _objc_msgSend_2(_class_NSMutableSet, _sel_alloc); + return NSMutableSet.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSMutableSet = objc.getClass("NSMutableSet"); +late final _sel_intersectSet_ = objc.registerName("intersectSet:"); +final _objc_msgSend_336 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_minusSet_ = objc.registerName("minusSet:"); +late final _sel_unionSet_ = objc.registerName("unionSet:"); +late final _sel_setSet_ = objc.registerName("setSet:"); +late final _sel_setWithCapacity_ = objc.registerName("setWithCapacity:"); + +class NSItemProvider extends NSObject { + NSItemProvider._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSItemProvider] that points to the same underlying object as [other]. + NSItemProvider.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSItemProvider] that wraps the given raw object pointer. + NSItemProvider.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSItemProvider]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSItemProvider); + } + + @override + NSItemProvider init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSItemProvider.castFromPointer(_ret, retain: true, release: true); + } + + void registerDataRepresentationForTypeIdentifier_visibility_loadHandler_( + NSString typeIdentifier, + int visibility, + ObjCBlock_NSProgress_ffiVoidNSDataNSError loadHandler) { + _objc_msgSend_337( + this.pointer, + _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_, + typeIdentifier.pointer, + visibility, + loadHandler.pointer); + } + + void + registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_( + NSString typeIdentifier, + int fileOptions, + int visibility, + ObjCBlock_NSProgress_ffiVoidNSURLboolNSError loadHandler) { + _objc_msgSend_338( + this.pointer, + _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_, + typeIdentifier.pointer, + fileOptions, + visibility, + loadHandler.pointer); + } + + NSArray get registeredTypeIdentifiers { + final _ret = + _objc_msgSend_172(this.pointer, _sel_registeredTypeIdentifiers); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray registeredTypeIdentifiersWithFileOptions_(int fileOptions) { + final _ret = _objc_msgSend_339(this.pointer, + _sel_registeredTypeIdentifiersWithFileOptions_, fileOptions); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + bool hasItemConformingToTypeIdentifier_(NSString typeIdentifier) { + return _objc_msgSend_22(this.pointer, + _sel_hasItemConformingToTypeIdentifier_, typeIdentifier.pointer); + } + + bool hasRepresentationConformingToTypeIdentifier_fileOptions_( + NSString typeIdentifier, int fileOptions) { + return _objc_msgSend_340( + this.pointer, + _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_, + typeIdentifier.pointer, + fileOptions); + } + + NSProgress loadDataRepresentationForTypeIdentifier_completionHandler_( + NSString typeIdentifier, + ObjCBlock_ffiVoid_NSData_NSError completionHandler) { + final _ret = _objc_msgSend_341( + this.pointer, + _sel_loadDataRepresentationForTypeIdentifier_completionHandler_, + typeIdentifier.pointer, + completionHandler.pointer); + return NSProgress.castFromPointer(_ret, retain: true, release: true); + } + + NSProgress loadFileRepresentationForTypeIdentifier_completionHandler_( + NSString typeIdentifier, + ObjCBlock_ffiVoid_NSURL_NSError completionHandler) { + final _ret = _objc_msgSend_342( + this.pointer, + _sel_loadFileRepresentationForTypeIdentifier_completionHandler_, + typeIdentifier.pointer, + completionHandler.pointer); + return NSProgress.castFromPointer(_ret, retain: true, release: true); + } + + NSProgress loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_( + NSString typeIdentifier, + ObjCBlock_ffiVoid_NSURL_bool_NSError completionHandler) { + final _ret = _objc_msgSend_343( + this.pointer, + _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_, + typeIdentifier.pointer, + completionHandler.pointer); + return NSProgress.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get suggestedName { + final _ret = _objc_msgSend_55(this.pointer, _sel_suggestedName); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + set suggestedName(NSString? value) { + return _objc_msgSend_344( + this.pointer, _sel_setSuggestedName_, value?.pointer ?? ffi.nullptr); + } + + NSItemProvider initWithObject_(NSObject object) { + final _ret = + _objc_msgSend_148(this.pointer, _sel_initWithObject_, object.pointer); + return NSItemProvider.castFromPointer(_ret, retain: true, release: true); + } + + void registerObject_visibility_(NSObject object, int visibility) { + _objc_msgSend_345(this.pointer, _sel_registerObject_visibility_, + object.pointer, visibility); + } + + void registerObjectOfClass_visibility_loadHandler_( + NSObject aClass, + int visibility, + ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError loadHandler) { + _objc_msgSend_346( + this.pointer, + _sel_registerObjectOfClass_visibility_loadHandler_, + aClass.pointer, + visibility, + loadHandler.pointer); + } + + bool canLoadObjectOfClass_(NSObject aClass) { + return _objc_msgSend_0( + this.pointer, _sel_canLoadObjectOfClass_, aClass.pointer); + } + + NSProgress loadObjectOfClass_completionHandler_(NSObject aClass, + ObjCBlock_ffiVoid_objcObjCObject_NSError completionHandler) { + final _ret = _objc_msgSend_347( + this.pointer, + _sel_loadObjectOfClass_completionHandler_, + aClass.pointer, + completionHandler.pointer); + return NSProgress.castFromPointer(_ret, retain: true, release: true); + } + + NSItemProvider initWithItem_typeIdentifier_( + NSObject? item, NSString? typeIdentifier) { + final _ret = _objc_msgSend_348( + this.pointer, + _sel_initWithItem_typeIdentifier_, + item?.pointer ?? ffi.nullptr, + typeIdentifier?.pointer ?? ffi.nullptr); + return NSItemProvider.castFromPointer(_ret, retain: true, release: true); + } + + NSItemProvider? initWithContentsOfURL_(NSURL fileURL) { + final _ret = _objc_msgSend_214( + this.pointer, _sel_initWithContentsOfURL_, fileURL.pointer); + return _ret.address == 0 + ? null + : NSItemProvider.castFromPointer(_ret, retain: true, release: true); + } + + void registerItemForTypeIdentifier_loadHandler_( + NSString typeIdentifier, + ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary + loadHandler) { + _objc_msgSend_349( + this.pointer, + _sel_registerItemForTypeIdentifier_loadHandler_, + typeIdentifier.pointer, + loadHandler.pointer); + } + + void loadItemForTypeIdentifier_options_completionHandler_( + NSString typeIdentifier, + NSDictionary? options, + ObjCBlock_ffiVoid_objcObjCObject_NSError1? completionHandler) { + _objc_msgSend_350( + this.pointer, + _sel_loadItemForTypeIdentifier_options_completionHandler_, + typeIdentifier.pointer, + options?.pointer ?? ffi.nullptr, + completionHandler?.pointer ?? ffi.nullptr); + } + + ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary? + get previewImageHandler { + final _ret = _objc_msgSend_351(this.pointer, _sel_previewImageHandler); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary + .castFromPointer(_ret, retain: true, release: true); + } + + set previewImageHandler( + ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary? + value) { + return _objc_msgSend_352(this.pointer, _sel_setPreviewImageHandler_, + value?.pointer ?? ffi.nullptr); + } + + void loadPreviewImageWithOptions_completionHandler_(NSDictionary options, + ObjCBlock_ffiVoid_objcObjCObject_NSError1 completionHandler) { + _objc_msgSend_353( + this.pointer, + _sel_loadPreviewImageWithOptions_completionHandler_, + options.pointer, + completionHandler.pointer); + } + + static NSItemProvider new1() { + final _ret = _objc_msgSend_2(_class_NSItemProvider, _sel_new); + return NSItemProvider.castFromPointer(_ret, retain: false, release: true); + } + + static NSItemProvider allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_3(_class_NSItemProvider, _sel_allocWithZone_, zone); + return NSItemProvider.castFromPointer(_ret, retain: false, release: true); + } + + static NSItemProvider alloc() { + final _ret = _objc_msgSend_2(_class_NSItemProvider, _sel_alloc); + return NSItemProvider.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSItemProvider = objc.getClass("NSItemProvider"); + +abstract class NSItemProviderRepresentationVisibility { + static const int NSItemProviderRepresentationVisibilityAll = 0; + static const int NSItemProviderRepresentationVisibilityTeam = 1; + static const int NSItemProviderRepresentationVisibilityGroup = 2; + static const int NSItemProviderRepresentationVisibilityOwnProcess = 3; +} + +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + block.ref.target + .cast< + ffi + .NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer)>()(arg0); +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer))(arg0); + +class ObjCBlock_NSProgress_ffiVoidNSDataNSError extends objc.ObjCBlockBase { + ObjCBlock_NSProgress_ffiVoidNSDataNSError._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_NSProgress_ffiVoidNSDataNSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_NSProgress_ffiVoidNSDataNSError._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSProgress_ffiVoidNSDataNSError.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) + : this._(objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSProgress_ffiVoidNSDataNSError.fromFunction( + NSProgress? Function(ObjCBlock_ffiVoid_NSData_NSError) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureTrampoline) + .cast(), + (ffi.Pointer arg0) => + fn(ObjCBlock_ffiVoid_NSData_NSError.castFromPointer(arg0, + retain: true, release: true)) + ?.retainAndReturnPointer() ?? + ffi.nullptr)); + static ffi.Pointer? _dartFuncTrampoline; + + NSProgress? call(ObjCBlock_ffiVoid_NSData_NSError arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction Function(ffi.Pointer, ffi.Pointer)>() + (pointer, arg0.pointer) + .address == + 0 + ? null + : NSProgress.castFromPointer( + pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0)>>().asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>()(pointer, arg0.pointer), + retain: false, + release: true); +} + +class NSProgress extends objc.ObjCObjectBase { + NSProgress._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [NSProgress] that points to the same underlying object as [other]. + NSProgress.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSProgress] that wraps the given raw object pointer. + NSProgress.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSProgress]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSProgress); + } +} + +late final _class_NSProgress = objc.getClass("NSProgress"); +void _ObjCBlock_ffiVoid_NSData_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +void _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + ffi.Pointer))(arg0, arg1); + +class ObjCBlock_ffiVoid_NSData_NSError extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSData_NSError._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSData_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSData_NSError._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData_NSError.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSError_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData_NSError.fromFunction(void Function(NSData?, NSError?) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline) + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSData.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 + ? null + : NSError.castFromPointer(arg1, retain: true, release: true)))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSData_NSError.listener(void Function(NSData?, NSError?) fn) + : this._(objc.newClosureBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSData.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 + ? null + : NSError.castFromPointer(arg1, retain: true, release: true)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSData? arg0, NSError? arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr, arg1?.pointer ?? ffi.nullptr); +} + +late final _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_ = + objc.registerName( + "registerDataRepresentationForTypeIdentifier:visibility:loadHandler:"); +final _objc_msgSend_337 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + +abstract class NSItemProviderFileOptions { + static const int NSItemProviderFileOptionOpenInPlace = 1; +} + +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer)>()(arg0); +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer))(arg0); + +class ObjCBlock_NSProgress_ffiVoidNSURLboolNSError extends objc.ObjCBlockBase { + ObjCBlock_NSProgress_ffiVoidNSURLboolNSError._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_NSProgress_ffiVoidNSURLboolNSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_NSProgress_ffiVoidNSURLboolNSError._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSProgress_ffiVoidNSURLboolNSError.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) + : this._(objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSProgress_ffiVoidNSURLboolNSError.fromFunction( + NSProgress? Function(ObjCBlock_ffiVoid_NSURL_bool_NSError) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureTrampoline) + .cast(), + (ffi.Pointer arg0) => + fn(ObjCBlock_ffiVoid_NSURL_bool_NSError.castFromPointer(arg0, retain: true, release: true)) + ?.retainAndReturnPointer() ?? + ffi.nullptr)); + static ffi.Pointer? _dartFuncTrampoline; + + NSProgress? call(ObjCBlock_ffiVoid_NSURL_bool_NSError arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction Function(ffi.Pointer, ffi.Pointer)>() + (pointer, arg0.pointer) + .address == + 0 + ? null + : NSProgress.castFromPointer( + pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0)>>().asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>()(pointer, arg0.pointer), + retain: false, + release: true); +} + +void _ObjCBlock_ffiVoid_NSURL_bool_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Bool arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, bool, + ffi.Pointer)>()(arg0, arg1, arg2); +void _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + bool, ffi.Pointer))(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_NSURL_bool_NSError extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSURL_bool_NSError._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSURL_bool_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSURL_bool_NSError._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURL_bool_NSError.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Bool arg1, ffi.Pointer arg2)>> + ptr) + : this._( + objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_bool_NSError_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURL_bool_NSError.fromFunction(void Function(NSURL?, bool, NSError?) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline) + .cast(), + (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn( + arg0.address == 0 + ? null + : NSURL.castFromPointer(arg0, retain: true, release: true), + arg1, + arg2.address == 0 ? null : NSError.castFromPointer(arg2, retain: true, release: true)))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSURL_bool_NSError.listener( + void Function(NSURL?, bool, NSError?) fn) + : this._(objc.newClosureBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn( + arg0.address == 0 ? null : NSURL.castFromPointer(arg0, retain: true, release: true), + arg1, + arg2.address == 0 ? null : NSError.castFromPointer(arg2, retain: true, release: true)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSURL? arg0, bool arg1, NSError? arg2) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>()(pointer, + arg0?.pointer ?? ffi.nullptr, arg1, arg2?.pointer ?? ffi.nullptr); +} + +late final _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_ = + objc.registerName( + "registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:"); +final _objc_msgSend_338 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); +late final _sel_registeredTypeIdentifiers = + objc.registerName("registeredTypeIdentifiers"); +late final _sel_registeredTypeIdentifiersWithFileOptions_ = + objc.registerName("registeredTypeIdentifiersWithFileOptions:"); +final _objc_msgSend_339 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_hasItemConformingToTypeIdentifier_ = + objc.registerName("hasItemConformingToTypeIdentifier:"); +late final _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_ = objc + .registerName("hasRepresentationConformingToTypeIdentifier:fileOptions:"); +final _objc_msgSend_340 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_loadDataRepresentationForTypeIdentifier_completionHandler_ = + objc.registerName( + "loadDataRepresentationForTypeIdentifier:completionHandler:"); +final _objc_msgSend_341 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSURL_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +void _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + ffi.Pointer))(arg0, arg1); + +class ObjCBlock_ffiVoid_NSURL_NSError extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSURL_NSError._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSURL_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSURL_NSError._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURL_NSError.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSError_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURL_NSError.fromFunction( + void Function(NSURL?, NSError?) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline) + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSURL.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : NSError.castFromPointer(arg1, retain: true, release: true)))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSURL_NSError.listener(void Function(NSURL?, NSError?) fn) + : this._(objc.newClosureBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSURL.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 + ? null + : NSError.castFromPointer(arg1, retain: true, release: true)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSURL? arg0, NSError? arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr, arg1?.pointer ?? ffi.nullptr); +} + +late final _sel_loadFileRepresentationForTypeIdentifier_completionHandler_ = + objc.registerName( + "loadFileRepresentationForTypeIdentifier:completionHandler:"); +final _objc_msgSend_342 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_ = + objc.registerName( + "loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:"); +final _objc_msgSend_343 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_suggestedName = objc.registerName("suggestedName"); +late final _sel_setSuggestedName_ = objc.registerName("setSuggestedName:"); +final _objc_msgSend_344 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithObject_ = objc.registerName("initWithObject:"); +late final _sel_registerObject_visibility_ = + objc.registerName("registerObject:visibility:"); +final _objc_msgSend_345 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer)>()(arg0); +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer))(arg0); + +class ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError + extends objc.ObjCBlockBase { + ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) + : this._(objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError.fromFunction( + NSProgress? Function(ObjCBlock_ffiVoid_objcObjCObject_NSError) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureTrampoline) + .cast(), + (ffi.Pointer arg0) => + fn(ObjCBlock_ffiVoid_objcObjCObject_NSError.castFromPointer(arg0, retain: true, release: true)) + ?.retainAndReturnPointer() ?? + ffi.nullptr)); + static ffi.Pointer? _dartFuncTrampoline; + + NSProgress? call(ObjCBlock_ffiVoid_objcObjCObject_NSError arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction Function(ffi.Pointer, ffi.Pointer)>() + (pointer, arg0.pointer) + .address == + 0 + ? null + : NSProgress.castFromPointer( + pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0)>>().asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>()(pointer, arg0.pointer), + retain: false, + release: true); +} + +void _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +void _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + ffi.Pointer))(arg0, arg1); + +class ObjCBlock_ffiVoid_objcObjCObject_NSError extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_objcObjCObject_NSError._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_objcObjCObject_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_objcObjCObject_NSError._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_NSError.fromFunctionPointer( + ffi + .Pointer< + ffi + .NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_NSError.fromFunction( + void Function(NSObject?, NSError?) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline) + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSObject.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : NSError.castFromPointer(arg1, retain: true, release: true)))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_objcObjCObject_NSError.listener(void Function(NSObject?, NSError?) fn) + : this._(objc.newClosureBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSObject.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : NSError.castFromPointer(arg1, retain: true, release: true)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSObject? arg0, NSError? arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr, arg1?.pointer ?? ffi.nullptr); +} + +late final _sel_registerObjectOfClass_visibility_loadHandler_ = + objc.registerName("registerObjectOfClass:visibility:loadHandler:"); +final _objc_msgSend_346 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_canLoadObjectOfClass_ = + objc.registerName("canLoadObjectOfClass:"); +late final _sel_loadObjectOfClass_completionHandler_ = + objc.registerName("loadObjectOfClass:completionHandler:"); +final _objc_msgSend_347 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithItem_typeIdentifier_ = + objc.registerName("initWithItem:typeIdentifier:"); +final _objc_msgSend_348 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +void + _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +void + _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) { + return ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary + ._(pointer, retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._(objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary.fromFunction(void Function(ObjCBlock_ffiVoid_objcObjCObject_NSError1, NSObject, NSDictionary) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureTrampoline) + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( + ObjCBlock_ffiVoid_objcObjCObject_NSError1.castFromPointer(arg0, retain: true, release: true), + NSObject.castFromPointer(arg1, retain: true, release: true), + NSDictionary.castFromPointer(arg2, retain: true, release: true)))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary.listener( + void Function(ObjCBlock_ffiVoid_objcObjCObject_NSError1, NSObject, NSDictionary) + fn) + : this._(objc.newClosureBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + ObjCBlock_ffiVoid_objcObjCObject_NSError1.castFromPointer(arg0, retain: true, release: true), + NSObject.castFromPointer(arg1, retain: true, release: true), + NSDictionary.castFromPointer(arg2, retain: true, release: true)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(ObjCBlock_ffiVoid_objcObjCObject_NSError1 arg0, NSObject arg1, + NSDictionary arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1.pointer, arg2.pointer); +} + +void _ObjCBlock_ffiVoid_objcObjCObject_NSError1_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +void _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + ffi.Pointer))(arg0, arg1); + +class ObjCBlock_ffiVoid_objcObjCObject_NSError1 extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_objcObjCObject_NSError1._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_objcObjCObject_NSError1 castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_objcObjCObject_NSError1._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_NSError1.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newPointerBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSError1_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_NSError1.fromFunction( + void Function(NSObject?, NSError) fn) + : this._(objc.newClosureBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureTrampoline) + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSObject.castFromPointer(arg0, retain: true, release: true), + NSError.castFromPointer(arg1, retain: true, release: true)))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_objcObjCObject_NSError1.listener(void Function(NSObject?, NSError) fn) + : this._(objc.newClosureBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSObject.castFromPointer(arg0, retain: true, release: true), + NSError.castFromPointer(arg1, retain: true, release: true)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSObject? arg0, NSError arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr, arg1.pointer); +} + +late final _sel_registerItemForTypeIdentifier_loadHandler_ = + objc.registerName("registerItemForTypeIdentifier:loadHandler:"); +final _objc_msgSend_349 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_loadItemForTypeIdentifier_options_completionHandler_ = + objc.registerName("loadItemForTypeIdentifier:options:completionHandler:"); +final _objc_msgSend_350 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_previewImageHandler = objc.registerName("previewImageHandler"); +final _objc_msgSend_351 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setPreviewImageHandler_ = + objc.registerName("setPreviewImageHandler:"); +final _objc_msgSend_352 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_loadPreviewImageWithOptions_completionHandler_ = + objc.registerName("loadPreviewImageWithOptions:completionHandler:"); +final _objc_msgSend_353 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +class NSMutableString extends NSString { + NSMutableString._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSMutableString] that points to the same underlying object as [other]. + NSMutableString.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSMutableString] that wraps the given raw object pointer. + NSMutableString.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSMutableString]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMutableString); + } + + void replaceCharactersInRange_withString_(_NSRange range, NSString aString) { + _objc_msgSend_354(this.pointer, _sel_replaceCharactersInRange_withString_, + range, aString.pointer); + } + + void insertString_atIndex_(NSString aString, int loc) { + _objc_msgSend_355( + this.pointer, _sel_insertString_atIndex_, aString.pointer, loc); + } + + void deleteCharactersInRange_(_NSRange range) { + _objc_msgSend_295(this.pointer, _sel_deleteCharactersInRange_, range); + } + + void appendString_(NSString aString) { + _objc_msgSend_162(this.pointer, _sel_appendString_, aString.pointer); + } + + void appendFormat_(NSString format) { + _objc_msgSend_162(this.pointer, _sel_appendFormat_, format.pointer); + } + + void setString_(NSString aString) { + _objc_msgSend_162(this.pointer, _sel_setString_, aString.pointer); + } + + int replaceOccurrencesOfString_withString_options_range_(NSString target, + NSString replacement, int options, _NSRange searchRange) { + return _objc_msgSend_356( + this.pointer, + _sel_replaceOccurrencesOfString_withString_options_range_, + target.pointer, + replacement.pointer, + options, + searchRange); + } + + bool applyTransform_reverse_range_updatedRange_(NSString transform, + bool reverse, _NSRange range, ffi.Pointer<_NSRange> resultingRange) { + return _objc_msgSend_357( + this.pointer, + _sel_applyTransform_reverse_range_updatedRange_, + transform.pointer, + reverse, + range, + resultingRange); + } + + NSMutableString initWithCapacity_(int capacity) { + final _ret = + _objc_msgSend_358(this.pointer, _sel_initWithCapacity_, capacity); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString stringWithCapacity_(int capacity) { + final _ret = _objc_msgSend_358( + _class_NSMutableString, _sel_stringWithCapacity_, capacity); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static ffi.Pointer getAvailableStringEncodings() { + return _objc_msgSend_243( + _class_NSMutableString, _sel_availableStringEncodings); + } + + static NSString localizedNameOfStringEncoding_(int encoding) { + final _ret = _objc_msgSend_15( + _class_NSMutableString, _sel_localizedNameOfStringEncoding_, encoding); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + static int getDefaultCStringEncoding() { + return _objc_msgSend_12( + _class_NSMutableString, _sel_defaultCStringEncoding); + } + + @override + NSMutableString initWithCharactersNoCopy_length_freeWhenDone_( + ffi.Pointer characters, int length, bool freeBuffer) { + final _ret = _objc_msgSend_255( + this.pointer, + _sel_initWithCharactersNoCopy_length_freeWhenDone_, + characters, + length, + freeBuffer); + return NSMutableString.castFromPointer(_ret, retain: false, release: true); + } + + @override + NSMutableString initWithCharactersNoCopy_length_deallocator_( + ffi.Pointer chars, + int len, + ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong? deallocator) { + final _ret = _objc_msgSend_256( + this.pointer, + _sel_initWithCharactersNoCopy_length_deallocator_, + chars, + len, + deallocator?.pointer ?? ffi.nullptr); + return NSMutableString.castFromPointer(_ret, retain: false, release: true); + } + + @override + NSMutableString initWithCharacters_length_( + ffi.Pointer characters, int length) { + final _ret = _objc_msgSend_257( + this.pointer, _sel_initWithCharacters_length_, characters, length); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithUTF8String_( + ffi.Pointer nullTerminatedCString) { + final _ret = _objc_msgSend_258( + this.pointer, _sel_initWithUTF8String_, nullTerminatedCString); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString initWithString_(NSString aString) { + final _ret = + _objc_msgSend_42(this.pointer, _sel_initWithString_, aString.pointer); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString initWithFormat_(NSString format) { + final _ret = + _objc_msgSend_42(this.pointer, _sel_initWithFormat_, format.pointer); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString initWithFormat_arguments_( + NSString format, ffi.Pointer<__va_list_tag> argList) { + final _ret = _objc_msgSend_259( + this.pointer, _sel_initWithFormat_arguments_, format.pointer, argList); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString initWithFormat_locale_(NSString format, NSObject? locale) { + final _ret = _objc_msgSend_260(this.pointer, _sel_initWithFormat_locale_, + format.pointer, locale?.pointer ?? ffi.nullptr); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString initWithFormat_locale_arguments_( + NSString format, NSObject? locale, ffi.Pointer<__va_list_tag> argList) { + final _ret = _objc_msgSend_261( + this.pointer, + _sel_initWithFormat_locale_arguments_, + format.pointer, + locale?.pointer ?? ffi.nullptr, + argList); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithValidatedFormat_validFormatSpecifiers_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _objc_msgSend_262( + this.pointer, + _sel_initWithValidatedFormat_validFormatSpecifiers_error_, + format.pointer, + validFormatSpecifiers.pointer, + error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( + NSString format, + NSString validFormatSpecifiers, + NSObject? locale, + ffi.Pointer> error) { + final _ret = _objc_msgSend_263( + this.pointer, + _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_, + format.pointer, + validFormatSpecifiers.pointer, + locale?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? + initWithValidatedFormat_validFormatSpecifiers_arguments_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer<__va_list_tag> argList, + ffi.Pointer> error) { + final _ret = _objc_msgSend_264( + this.pointer, + _sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_, + format.pointer, + validFormatSpecifiers.pointer, + argList, + error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? + initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( + NSString format, + NSString validFormatSpecifiers, + NSObject? locale, + ffi.Pointer<__va_list_tag> argList, + ffi.Pointer> error) { + final _ret = _objc_msgSend_265( + this.pointer, + _sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_, + format.pointer, + validFormatSpecifiers.pointer, + locale?.pointer ?? ffi.nullptr, + argList, + error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithData_encoding_(NSData data, int encoding) { + final _ret = _objc_msgSend_266( + this.pointer, _sel_initWithData_encoding_, data.pointer, encoding); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithBytes_length_encoding_( + ffi.Pointer bytes, int len, int encoding) { + final _ret = _objc_msgSend_267(this.pointer, + _sel_initWithBytes_length_encoding_, bytes, len, encoding); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithBytesNoCopy_length_encoding_freeWhenDone_( + ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { + final _ret = _objc_msgSend_268( + this.pointer, + _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_, + bytes, + len, + encoding, + freeBuffer); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: false, release: true); + } + + @override + NSMutableString? initWithBytesNoCopy_length_encoding_deallocator_( + ffi.Pointer bytes, + int len, + int encoding, + ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { + final _ret = _objc_msgSend_269( + this.pointer, + _sel_initWithBytesNoCopy_length_encoding_deallocator_, + bytes, + len, + encoding, + deallocator?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: false, release: true); + } + + static NSMutableString string() { + final _ret = _objc_msgSend_2(_class_NSMutableString, _sel_string); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString stringWithString_(NSString string) { + final _ret = _objc_msgSend_42( + _class_NSMutableString, _sel_stringWithString_, string.pointer); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString stringWithCharacters_length_( + ffi.Pointer characters, int length) { + final _ret = _objc_msgSend_257(_class_NSMutableString, + _sel_stringWithCharacters_length_, characters, length); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString? stringWithUTF8String_( + ffi.Pointer nullTerminatedCString) { + final _ret = _objc_msgSend_258(_class_NSMutableString, + _sel_stringWithUTF8String_, nullTerminatedCString); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString stringWithFormat_(NSString format) { + final _ret = _objc_msgSend_42( + _class_NSMutableString, _sel_stringWithFormat_, format.pointer); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString localizedStringWithFormat_(NSString format) { + final _ret = _objc_msgSend_42(_class_NSMutableString, + _sel_localizedStringWithFormat_, format.pointer); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString? + stringWithValidatedFormat_validFormatSpecifiers_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _objc_msgSend_262( + _class_NSMutableString, + _sel_stringWithValidatedFormat_validFormatSpecifiers_error_, + format.pointer, + validFormatSpecifiers.pointer, + error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString? + localizedStringWithValidatedFormat_validFormatSpecifiers_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _objc_msgSend_262( + _class_NSMutableString, + _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_, + format.pointer, + validFormatSpecifiers.pointer, + error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithCString_encoding_( + ffi.Pointer nullTerminatedCString, int encoding) { + final _ret = _objc_msgSend_270(this.pointer, _sel_initWithCString_encoding_, + nullTerminatedCString, encoding); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString? stringWithCString_encoding_( + ffi.Pointer cString, int enc) { + final _ret = _objc_msgSend_270( + _class_NSMutableString, _sel_stringWithCString_encoding_, cString, enc); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithContentsOfURL_encoding_error_( + NSURL url, int enc, ffi.Pointer> error) { + final _ret = _objc_msgSend_271(this.pointer, + _sel_initWithContentsOfURL_encoding_error_, url.pointer, enc, error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithContentsOfFile_encoding_error_( + NSString path, int enc, ffi.Pointer> error) { + final _ret = _objc_msgSend_272(this.pointer, + _sel_initWithContentsOfFile_encoding_error_, path.pointer, enc, error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString? stringWithContentsOfURL_encoding_error_( + NSURL url, int enc, ffi.Pointer> error) { + final _ret = _objc_msgSend_271(_class_NSMutableString, + _sel_stringWithContentsOfURL_encoding_error_, url.pointer, enc, error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString? stringWithContentsOfFile_encoding_error_( + NSString path, int enc, ffi.Pointer> error) { + final _ret = _objc_msgSend_272( + _class_NSMutableString, + _sel_stringWithContentsOfFile_encoding_error_, + path.pointer, + enc, + error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithContentsOfURL_usedEncoding_error_( + NSURL url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _objc_msgSend_273( + this.pointer, + _sel_initWithContentsOfURL_usedEncoding_error_, + url.pointer, + enc, + error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithContentsOfFile_usedEncoding_error_( + NSString path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _objc_msgSend_274( + this.pointer, + _sel_initWithContentsOfFile_usedEncoding_error_, + path.pointer, + enc, + error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString? stringWithContentsOfURL_usedEncoding_error_( + NSURL url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _objc_msgSend_273( + _class_NSMutableString, + _sel_stringWithContentsOfURL_usedEncoding_error_, + url.pointer, + enc, + error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString? stringWithContentsOfFile_usedEncoding_error_( + NSString path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _objc_msgSend_274( + _class_NSMutableString, + _sel_stringWithContentsOfFile_usedEncoding_error_, + path.pointer, + enc, + error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static int + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + NSData data, + NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _objc_msgSend_275( + _class_NSMutableString, + _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_, + data.pointer, + opts?.pointer ?? ffi.nullptr, + string, + usedLossyConversion); + } + + static NSObject? stringWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_49( + _class_NSMutableString, _sel_stringWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject? stringWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_214( + _class_NSMutableString, _sel_stringWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject? stringWithCString_length_( + ffi.Pointer bytes, int length) { + final _ret = _objc_msgSend_270( + _class_NSMutableString, _sel_stringWithCString_length_, bytes, length); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject? stringWithCString_(ffi.Pointer bytes) { + final _ret = _objc_msgSend_258( + _class_NSMutableString, _sel_stringWithCString_, bytes); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString new1() { + final _ret = _objc_msgSend_2(_class_NSMutableString, _sel_new); + return NSMutableString.castFromPointer(_ret, retain: false, release: true); + } + + static NSMutableString allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_3(_class_NSMutableString, _sel_allocWithZone_, zone); + return NSMutableString.castFromPointer(_ret, retain: false, release: true); + } + + static NSMutableString alloc() { + final _ret = _objc_msgSend_2(_class_NSMutableString, _sel_alloc); + return NSMutableString.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSMutableString = objc.getClass("NSMutableString"); +late final _sel_replaceCharactersInRange_withString_ = + objc.registerName("replaceCharactersInRange:withString:"); +final _objc_msgSend_354 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_insertString_atIndex_ = + objc.registerName("insertString:atIndex:"); +final _objc_msgSend_355 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_deleteCharactersInRange_ = + objc.registerName("deleteCharactersInRange:"); +late final _sel_appendString_ = objc.registerName("appendString:"); +late final _sel_appendFormat_ = objc.registerName("appendFormat:"); +late final _sel_setString_ = objc.registerName("setString:"); +late final _sel_replaceOccurrencesOfString_withString_options_range_ = + objc.registerName("replaceOccurrencesOfString:withString:options:range:"); +final _objc_msgSend_356 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +late final _sel_applyTransform_reverse_range_updatedRange_ = + objc.registerName("applyTransform:reverse:range:updatedRange:"); +final _objc_msgSend_357 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + _NSRange, + ffi.Pointer<_NSRange>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + _NSRange, + ffi.Pointer<_NSRange>)>(); +final _objc_msgSend_358 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_stringWithCapacity_ = objc.registerName("stringWithCapacity:"); diff --git a/pkgs/objective_c/macos/Classes/objective_c.c b/pkgs/objective_c/macos/Classes/objective_c.c new file mode 100644 index 0000000000..83496a45f3 --- /dev/null +++ b/pkgs/objective_c/macos/Classes/objective_c.c @@ -0,0 +1,8 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Relative import to be able to reuse the C sources. +// See the comment in ../{projectName}}.podspec for more information. +#include "../../src/objective_c.c" +#include "../../src/include/dart_api_dl.c" diff --git a/pkgs/objective_c/macos/objective_c.podspec b/pkgs/objective_c/macos/objective_c.podspec new file mode 100644 index 0000000000..f3ae43b6b3 --- /dev/null +++ b/pkgs/objective_c/macos/objective_c.podspec @@ -0,0 +1,27 @@ +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. +# Run `pod lib lint objective_c.podspec` to validate before publishing. +# +Pod::Spec.new do |s| + s.name = 'objective_c' + s.version = '0.0.1' + s.summary = 'A library to access Objective C from Flutter that acts as a support library for package:ffigen.' + s.description = <<-DESC +A library to access Objective C from Flutter that acts as a support library for package:ffigen. + DESC + s.homepage = 'http://example.com' + s.license = { :file => '../LICENSE' } + s.author = { 'Your Company' => 'email@example.com' } + + # This will ensure the source files in Classes/ are included in the native + # builds of apps using this FFI plugin. Podspec does not support relative + # paths, so Classes contains a forwarder C file that relatively imports + # `../src/*` so that the C sources can be shared among all target platforms. + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.dependency 'FlutterMacOS' + + s.platform = :osx, '10.11' + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } + s.swift_version = '5.0' +end diff --git a/pkgs/objective_c/pubspec.yaml b/pkgs/objective_c/pubspec.yaml new file mode 100644 index 0000000000..5e2ab89d17 --- /dev/null +++ b/pkgs/objective_c/pubspec.yaml @@ -0,0 +1,44 @@ +# Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +# for details. All rights reserved. Use of this source code is governed by a +# BSD-style license that can be found in the LICENSE file. + +name: objective_c +description: "A library to access Objective C from Flutter that acts as a support library for package:ffigen." +version: 0.0.1-wip +repository: https://github.com/dart-lang/native/tree/main/pkgs/objective_c + +topics: + - interop + - ffi + - objective_c + - codegen + +environment: + sdk: '>=3.3.0 <4.0.0' + flutter: '>=3.3.0' + +dependencies: + flutter: + sdk: flutter + ffi: ^2.1.0 + plugin_platform_interface: ^2.0.2 + yaml: ^3.1.0 + +dev_dependencies: + ffigen: ^11.0.0 + flutter_test: + sdk: flutter + flutter_lints: ^3.0.0 + test: ^1.21.1 + +dependency_overrides: + ffigen: + path: ../ffigen/ + +flutter: + plugin: + platforms: + ios: + ffiPlugin: true + macos: + ffiPlugin: true diff --git a/pkgs/objective_c/src/CMakeLists.txt b/pkgs/objective_c/src/CMakeLists.txt new file mode 100644 index 0000000000..5988f69f17 --- /dev/null +++ b/pkgs/objective_c/src/CMakeLists.txt @@ -0,0 +1,20 @@ +# The Flutter tooling requires that developers have CMake 3.10 or later +# installed. You should not increase this version, as doing so will cause +# the plugin to fail to compile for some customers of the plugin. +cmake_minimum_required(VERSION 3.10) + +project(objective_c_library VERSION 0.0.1 LANGUAGES C) + +add_library(objective_c SHARED + "objective_c.c" + "include/dart_api_dl.c" +) + +target_link_options(objective_c PRIVATE "-undefined dynamic_lookup") + +set_target_properties(objective_c PROPERTIES + PUBLIC_HEADER objective_c.h + OUTPUT_NAME "objective_c" +) + +target_compile_definitions(objective_c PUBLIC DART_SHARED_LIB) diff --git a/pkgs/objective_c/src/foundation.h b/pkgs/objective_c/src/foundation.h new file mode 100644 index 0000000000..05eb71f55c --- /dev/null +++ b/pkgs/objective_c/src/foundation.h @@ -0,0 +1,19 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +#ifndef OBJECTIVE_C_SRC_FOUNDATION_H_ +#define OBJECTIVE_C_SRC_FOUNDATION_H_ + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#endif // OBJECTIVE_C_SRC_FOUNDATION_H_ diff --git a/pkgs/objective_c/src/include/BUILD.gn b/pkgs/objective_c/src/include/BUILD.gn new file mode 100644 index 0000000000..2b10262f8b --- /dev/null +++ b/pkgs/objective_c/src/include/BUILD.gn @@ -0,0 +1,23 @@ +# Copyright (c) 2021, 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("../../sdk_args.gni") + +# This rule copies header files to include/ +copy("copy_headers") { + visibility = [ "../../sdk:copy_headers" ] + + sources = [ + "dart_api.h", + "dart_api_dl.c", + "dart_api_dl.h", + "dart_native_api.h", + "dart_tools_api.h", + "dart_version.h", + "internal/dart_api_dl_impl.h", + ] + + outputs = + [ "$root_out_dir/$dart_sdk_output/include/{{source_target_relative}}" ] +} diff --git a/pkgs/objective_c/src/include/analyze_snapshot_api.h b/pkgs/objective_c/src/include/analyze_snapshot_api.h new file mode 100644 index 0000000000..38b58e0b34 --- /dev/null +++ b/pkgs/objective_c/src/include/analyze_snapshot_api.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file + * for details. All rights reserved. Use of this source code is governed by a + * BSD-style license that can be found in the LICENSE file. + */ + +#ifndef RUNTIME_INCLUDE_ANALYZE_SNAPSHOT_API_H_ +#define RUNTIME_INCLUDE_ANALYZE_SNAPSHOT_API_H_ + +#include +#include + +namespace dart { +namespace snapshot_analyzer { +typedef struct { + const uint8_t* vm_snapshot_data; + const uint8_t* vm_snapshot_instructions; + const uint8_t* vm_isolate_data; + const uint8_t* vm_isolate_instructions; +} Dart_SnapshotAnalyzerInformation; + +void Dart_DumpSnapshotInformationAsJson( + const Dart_SnapshotAnalyzerInformation& info, + char** buffer, + intptr_t* buffer_length); + +} // namespace snapshot_analyzer +} // namespace dart + +#endif // RUNTIME_INCLUDE_ANALYZE_SNAPSHOT_API_H_ diff --git a/pkgs/objective_c/src/include/bin/dart_io_api.h b/pkgs/objective_c/src/include/bin/dart_io_api.h new file mode 100644 index 0000000000..e863d8b9f0 --- /dev/null +++ b/pkgs/objective_c/src/include/bin/dart_io_api.h @@ -0,0 +1,69 @@ +// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +#ifndef RUNTIME_INCLUDE_BIN_DART_IO_API_H_ +#define RUNTIME_INCLUDE_BIN_DART_IO_API_H_ + +#include "../dart_tools_api.h" + +namespace dart { +namespace bin { + +// Bootstraps 'dart:io'. +void BootstrapDartIo(); + +// Cleans up 'dart:io'. +void CleanupDartIo(); + +// Lets dart:io know where the system temporary directory is located. +// Currently only wired up on Android. +void SetSystemTempDirectory(const char* system_temp); + +// Tells the system whether to capture Stdout events. +void SetCaptureStdout(bool value); + +// Tells the system whether to capture Stderr events. +void SetCaptureStderr(bool value); + +// Should Stdout events be captured? +bool ShouldCaptureStdout(); + +// Should Stderr events be captured? +bool ShouldCaptureStderr(); + +// Set the executable name used by Platform.executable. +void SetExecutableName(const char* executable_name); + +// Set the arguments used by Platform.executableArguments. +void SetExecutableArguments(int script_index, char** argv); + +// Set dart:io implementation specific fields of Dart_EmbedderInformation. +void GetIOEmbedderInformation(Dart_EmbedderInformation* info); + +// Appropriate to assign to Dart_InitializeParams.file_open/read/write/close. +void* OpenFile(const char* name, bool write); +void ReadFile(uint8_t** data, intptr_t* file_len, void* stream); +void WriteFile(const void* buffer, intptr_t num_bytes, void* stream); +void CloseFile(void* stream); + +// Generates 'length' random bytes into 'buffer'. Returns true on success +// and false on failure. This is appropriate to assign to +// Dart_InitializeParams.entropy_source. +bool GetEntropy(uint8_t* buffer, intptr_t length); + +// Performs a lookup of the I/O Dart_NativeFunction with a specified 'name' and +// 'argument_count'. Returns NULL if no I/O native function with a matching +// name and parameter count is found. +Dart_NativeFunction LookupIONative(Dart_Handle name, + int argument_count, + bool* auto_setup_scope); + +// Returns the symbol for I/O native function 'nf'. Returns NULL if 'nf' is not +// a valid I/O native function. +const uint8_t* LookupIONativeSymbol(Dart_NativeFunction nf); + +} // namespace bin +} // namespace dart + +#endif // RUNTIME_INCLUDE_BIN_DART_IO_API_H_ diff --git a/pkgs/objective_c/src/include/dart_api.h b/pkgs/objective_c/src/include/dart_api.h new file mode 100644 index 0000000000..6abe8c35de --- /dev/null +++ b/pkgs/objective_c/src/include/dart_api.h @@ -0,0 +1,4097 @@ +/* + * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file + * for details. All rights reserved. Use of this source code is governed by a + * BSD-style license that can be found in the LICENSE file. + */ + +#ifndef RUNTIME_INCLUDE_DART_API_H_ +#define RUNTIME_INCLUDE_DART_API_H_ + +/** \mainpage Dart Embedding API Reference + * + * This reference describes the Dart Embedding API, which is used to embed the + * Dart Virtual Machine within C/C++ applications. + * + * This reference is generated from the header include/dart_api.h. + */ + +/* __STDC_FORMAT_MACROS has to be defined before including to + * enable platform independent printf format specifiers. */ +#ifndef __STDC_FORMAT_MACROS +#define __STDC_FORMAT_MACROS +#endif + +#include +#include +#include + +#if defined(__Fuchsia__) +#include +#endif + +#ifdef __cplusplus +#define DART_EXTERN_C extern "C" +#else +#define DART_EXTERN_C extern +#endif + +#if defined(__CYGWIN__) +#error Tool chain and platform not supported. +#elif defined(_WIN32) +#if defined(DART_SHARED_LIB) +#define DART_EXPORT DART_EXTERN_C __declspec(dllexport) +#else +#define DART_EXPORT DART_EXTERN_C +#endif +#else +#if __GNUC__ >= 4 +#if defined(DART_SHARED_LIB) +#define DART_EXPORT \ + DART_EXTERN_C __attribute__((visibility("default"))) __attribute((used)) +#else +#define DART_EXPORT DART_EXTERN_C +#endif +#else +#error Tool chain not supported. +#endif +#endif + +#if __GNUC__ +#define DART_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#define DART_DEPRECATED(msg) __attribute__((deprecated(msg))) +#elif _MSC_VER +#define DART_WARN_UNUSED_RESULT _Check_return_ +#define DART_DEPRECATED(msg) __declspec(deprecated(msg)) +#else +#define DART_WARN_UNUSED_RESULT +#define DART_DEPRECATED(msg) +#endif + +/* + * ======= + * Handles + * ======= + */ + +/** + * An isolate is the unit of concurrency in Dart. Each isolate has + * its own memory and thread of control. No state is shared between + * isolates. Instead, isolates communicate by message passing. + * + * Each thread keeps track of its current isolate, which is the + * isolate which is ready to execute on the current thread. The + * current isolate may be NULL, in which case no isolate is ready to + * execute. Most of the Dart apis require there to be a current + * isolate in order to function without error. The current isolate is + * set by any call to Dart_CreateIsolateGroup or Dart_EnterIsolate. + */ +typedef struct _Dart_Isolate* Dart_Isolate; +typedef struct _Dart_IsolateGroup* Dart_IsolateGroup; + +/** + * An object reference managed by the Dart VM garbage collector. + * + * Because the garbage collector may move objects, it is unsafe to + * refer to objects directly. Instead, we refer to objects through + * handles, which are known to the garbage collector and updated + * automatically when the object is moved. Handles should be passed + * by value (except in cases like out-parameters) and should never be + * allocated on the heap. + * + * Most functions in the Dart Embedding API return a handle. When a + * function completes normally, this will be a valid handle to an + * object in the Dart VM heap. This handle may represent the result of + * the operation or it may be a special valid handle used merely to + * indicate successful completion. Note that a valid handle may in + * some cases refer to the null object. + * + * --- Error handles --- + * + * When a function encounters a problem that prevents it from + * completing normally, it returns an error handle (See Dart_IsError). + * An error handle has an associated error message that gives more + * details about the problem (See Dart_GetError). + * + * There are four kinds of error handles that can be produced, + * depending on what goes wrong: + * + * - Api error handles are produced when an api function is misused. + * This happens when a Dart embedding api function is called with + * invalid arguments or in an invalid context. + * + * - Unhandled exception error handles are produced when, during the + * execution of Dart code, an exception is thrown but not caught. + * Prototypically this would occur during a call to Dart_Invoke, but + * it can occur in any function which triggers the execution of Dart + * code (for example, Dart_ToString). + * + * An unhandled exception error provides access to an exception and + * stacktrace via the functions Dart_ErrorGetException and + * Dart_ErrorGetStackTrace. + * + * - Compilation error handles are produced when, during the execution + * of Dart code, a compile-time error occurs. As above, this can + * occur in any function which triggers the execution of Dart code. + * + * - Fatal error handles are produced when the system wants to shut + * down the current isolate. + * + * --- Propagating errors --- + * + * When an error handle is returned from the top level invocation of + * Dart code in a program, the embedder must handle the error as they + * see fit. Often, the embedder will print the error message produced + * by Dart_Error and exit the program. + * + * When an error is returned while in the body of a native function, + * it can be propagated up the call stack by calling + * Dart_PropagateError, Dart_SetReturnValue, or Dart_ThrowException. + * Errors should be propagated unless there is a specific reason not + * to. If an error is not propagated then it is ignored. For + * example, if an unhandled exception error is ignored, that + * effectively "catches" the unhandled exception. Fatal errors must + * always be propagated. + * + * When an error is propagated, any current scopes created by + * Dart_EnterScope will be exited. + * + * Using Dart_SetReturnValue to propagate an exception is somewhat + * more convenient than using Dart_PropagateError, and should be + * preferred for reasons discussed below. + * + * Dart_PropagateError and Dart_ThrowException do not return. Instead + * they transfer control non-locally using a setjmp-like mechanism. + * This can be inconvenient if you have resources that you need to + * clean up before propagating the error. + * + * When relying on Dart_PropagateError, we often return error handles + * rather than propagating them from helper functions. Consider the + * following contrived example: + * + * 1 Dart_Handle isLongStringHelper(Dart_Handle arg) { + * 2 intptr_t* length = 0; + * 3 result = Dart_StringLength(arg, &length); + * 4 if (Dart_IsError(result)) { + * 5 return result; + * 6 } + * 7 return Dart_NewBoolean(length > 100); + * 8 } + * 9 + * 10 void NativeFunction_isLongString(Dart_NativeArguments args) { + * 11 Dart_EnterScope(); + * 12 AllocateMyResource(); + * 13 Dart_Handle arg = Dart_GetNativeArgument(args, 0); + * 14 Dart_Handle result = isLongStringHelper(arg); + * 15 if (Dart_IsError(result)) { + * 16 FreeMyResource(); + * 17 Dart_PropagateError(result); + * 18 abort(); // will not reach here + * 19 } + * 20 Dart_SetReturnValue(result); + * 21 FreeMyResource(); + * 22 Dart_ExitScope(); + * 23 } + * + * In this example, we have a native function which calls a helper + * function to do its work. On line 5, the helper function could call + * Dart_PropagateError, but that would not give the native function a + * chance to call FreeMyResource(), causing a leak. Instead, the + * helper function returns the error handle to the caller, giving the + * caller a chance to clean up before propagating the error handle. + * + * When an error is propagated by calling Dart_SetReturnValue, the + * native function will be allowed to complete normally and then the + * exception will be propagated only once the native call + * returns. This can be convenient, as it allows the C code to clean + * up normally. + * + * The example can be written more simply using Dart_SetReturnValue to + * propagate the error. + * + * 1 Dart_Handle isLongStringHelper(Dart_Handle arg) { + * 2 intptr_t* length = 0; + * 3 result = Dart_StringLength(arg, &length); + * 4 if (Dart_IsError(result)) { + * 5 return result + * 6 } + * 7 return Dart_NewBoolean(length > 100); + * 8 } + * 9 + * 10 void NativeFunction_isLongString(Dart_NativeArguments args) { + * 11 Dart_EnterScope(); + * 12 AllocateMyResource(); + * 13 Dart_Handle arg = Dart_GetNativeArgument(args, 0); + * 14 Dart_SetReturnValue(isLongStringHelper(arg)); + * 15 FreeMyResource(); + * 16 Dart_ExitScope(); + * 17 } + * + * In this example, the call to Dart_SetReturnValue on line 14 will + * either return the normal return value or the error (potentially + * generated on line 3). The call to FreeMyResource on line 15 will + * execute in either case. + * + * --- Local and persistent handles --- + * + * Local handles are allocated within the current scope (see + * Dart_EnterScope) and go away when the current scope exits. Unless + * otherwise indicated, callers should assume that all functions in + * the Dart embedding api return local handles. + * + * Persistent handles are allocated within the current isolate. They + * can be used to store objects across scopes. Persistent handles have + * the lifetime of the current isolate unless they are explicitly + * deallocated (see Dart_DeletePersistentHandle). + * The type Dart_Handle represents a handle (both local and persistent). + * The type Dart_PersistentHandle is a Dart_Handle and it is used to + * document that a persistent handle is expected as a parameter to a call + * or the return value from a call is a persistent handle. + * + * FinalizableHandles are persistent handles which are auto deleted when + * the object is garbage collected. It is never safe to use these handles + * unless you know the object is still reachable. + * + * WeakPersistentHandles are persistent handles which are automatically set + * to point Dart_Null when the object is garbage collected. They are not auto + * deleted, so it is safe to use them after the object has become unreachable. + */ +typedef struct _Dart_Handle* Dart_Handle; +typedef Dart_Handle Dart_PersistentHandle; +typedef struct _Dart_WeakPersistentHandle* Dart_WeakPersistentHandle; +typedef struct _Dart_FinalizableHandle* Dart_FinalizableHandle; +// These structs are versioned by DART_API_DL_MAJOR_VERSION, bump the +// version when changing this struct. + +typedef void (*Dart_HandleFinalizer)(void* isolate_callback_data, void* peer); + +/** + * Is this an error handle? + * + * Requires there to be a current isolate. + */ +DART_EXPORT bool Dart_IsError(Dart_Handle handle); + +/** + * Is this an api error handle? + * + * Api error handles are produced when an api function is misused. + * This happens when a Dart embedding api function is called with + * invalid arguments or in an invalid context. + * + * Requires there to be a current isolate. + */ +DART_EXPORT bool Dart_IsApiError(Dart_Handle handle); + +/** + * Is this an unhandled exception error handle? + * + * Unhandled exception error handles are produced when, during the + * execution of Dart code, an exception is thrown but not caught. + * This can occur in any function which triggers the execution of Dart + * code. + * + * See Dart_ErrorGetException and Dart_ErrorGetStackTrace. + * + * Requires there to be a current isolate. + */ +DART_EXPORT bool Dart_IsUnhandledExceptionError(Dart_Handle handle); + +/** + * Is this a compilation error handle? + * + * Compilation error handles are produced when, during the execution + * of Dart code, a compile-time error occurs. This can occur in any + * function which triggers the execution of Dart code. + * + * Requires there to be a current isolate. + */ +DART_EXPORT bool Dart_IsCompilationError(Dart_Handle handle); + +/** + * Is this a fatal error handle? + * + * Fatal error handles are produced when the system wants to shut down + * the current isolate. + * + * Requires there to be a current isolate. + */ +DART_EXPORT bool Dart_IsFatalError(Dart_Handle handle); + +/** + * Gets the error message from an error handle. + * + * Requires there to be a current isolate. + * + * \return A C string containing an error message if the handle is + * error. An empty C string ("") if the handle is valid. This C + * String is scope allocated and is only valid until the next call + * to Dart_ExitScope. +*/ +DART_EXPORT const char* Dart_GetError(Dart_Handle handle); + +/** + * Is this an error handle for an unhandled exception? + */ +DART_EXPORT bool Dart_ErrorHasException(Dart_Handle handle); + +/** + * Gets the exception Object from an unhandled exception error handle. + */ +DART_EXPORT Dart_Handle Dart_ErrorGetException(Dart_Handle handle); + +/** + * Gets the stack trace Object from an unhandled exception error handle. + */ +DART_EXPORT Dart_Handle Dart_ErrorGetStackTrace(Dart_Handle handle); + +/** + * Produces an api error handle with the provided error message. + * + * Requires there to be a current isolate. + * + * \param error the error message. + */ +DART_EXPORT Dart_Handle Dart_NewApiError(const char* error); +DART_EXPORT Dart_Handle Dart_NewCompilationError(const char* error); + +/** + * Produces a new unhandled exception error handle. + * + * Requires there to be a current isolate. + * + * \param exception An instance of a Dart object to be thrown or + * an ApiError or CompilationError handle. + * When an ApiError or CompilationError handle is passed in + * a string object of the error message is created and it becomes + * the Dart object to be thrown. + */ +DART_EXPORT Dart_Handle Dart_NewUnhandledExceptionError(Dart_Handle exception); + +/** + * Propagates an error. + * + * If the provided handle is an unhandled exception error, this + * function will cause the unhandled exception to be rethrown. This + * will proceed in the standard way, walking up Dart frames until an + * appropriate 'catch' block is found, executing 'finally' blocks, + * etc. + * + * If the error is not an unhandled exception error, we will unwind + * the stack to the next C frame. Intervening Dart frames will be + * discarded; specifically, 'finally' blocks will not execute. This + * is the standard way that compilation errors (and the like) are + * handled by the Dart runtime. + * + * In either case, when an error is propagated any current scopes + * created by Dart_EnterScope will be exited. + * + * See the additional discussion under "Propagating Errors" at the + * beginning of this file. + * + * \param handle An error handle (See Dart_IsError) + * + * On success, this function does not return. On failure, the + * process is terminated. + */ +DART_EXPORT void Dart_PropagateError(Dart_Handle handle); + +/** + * Converts an object to a string. + * + * May generate an unhandled exception error. + * + * \return The converted string if no error occurs during + * the conversion. If an error does occur, an error handle is + * returned. + */ +DART_EXPORT Dart_Handle Dart_ToString(Dart_Handle object); + +/** + * Checks to see if two handles refer to identically equal objects. + * + * If both handles refer to instances, this is equivalent to using the top-level + * function identical() from dart:core. Otherwise, returns whether the two + * argument handles refer to the same object. + * + * \param obj1 An object to be compared. + * \param obj2 An object to be compared. + * + * \return True if the objects are identically equal. False otherwise. + */ +DART_EXPORT bool Dart_IdentityEquals(Dart_Handle obj1, Dart_Handle obj2); + +/** + * Allocates a handle in the current scope from a persistent handle. + */ +DART_EXPORT Dart_Handle Dart_HandleFromPersistent(Dart_PersistentHandle object); + +/** + * Allocates a handle in the current scope from a weak persistent handle. + * + * This will be a handle to Dart_Null if the object has been garbage collected. + */ +DART_EXPORT Dart_Handle +Dart_HandleFromWeakPersistent(Dart_WeakPersistentHandle object); + +/** + * Allocates a persistent handle for an object. + * + * This handle has the lifetime of the current isolate unless it is + * explicitly deallocated by calling Dart_DeletePersistentHandle. + * + * Requires there to be a current isolate. + */ +DART_EXPORT Dart_PersistentHandle Dart_NewPersistentHandle(Dart_Handle object); + +/** + * Assign value of local handle to a persistent handle. + * + * Requires there to be a current isolate. + * + * \param obj1 A persistent handle whose value needs to be set. + * \param obj2 An object whose value needs to be set to the persistent handle. + */ +DART_EXPORT void Dart_SetPersistentHandle(Dart_PersistentHandle obj1, + Dart_Handle obj2); + +/** + * Deallocates a persistent handle. + * + * Requires there to be a current isolate group. + */ +DART_EXPORT void Dart_DeletePersistentHandle(Dart_PersistentHandle object); + +/** + * Allocates a weak persistent handle for an object. + * + * This handle has the lifetime of the current isolate. The handle can also be + * explicitly deallocated by calling Dart_DeleteWeakPersistentHandle. + * + * If the object becomes unreachable the callback is invoked with the peer as + * argument. The callback can be executed on any thread, will have a current + * isolate group, but will not have a current isolate. The callback can only + * call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. This + * gives the embedder the ability to cleanup data associated with the object. + * The handle will point to the Dart_Null object after the finalizer has been + * run. It is illegal to call into the VM with any other Dart_* functions from + * the callback. If the handle is deleted before the object becomes + * unreachable, the callback is never invoked. + * + * Requires there to be a current isolate. + * + * \param object An object with identity. + * \param peer A pointer to a native object or NULL. This value is + * provided to callback when it is invoked. + * \param external_allocation_size The number of externally allocated + * bytes for peer. Used to inform the garbage collector. + * \param callback A function pointer that will be invoked sometime + * after the object is garbage collected, unless the handle has been deleted. + * A valid callback needs to be specified it cannot be NULL. + * + * \return The weak persistent handle or NULL. NULL is returned in case of bad + * parameters. + */ +DART_EXPORT Dart_WeakPersistentHandle +Dart_NewWeakPersistentHandle(Dart_Handle object, + void* peer, + intptr_t external_allocation_size, + Dart_HandleFinalizer callback); + +/** + * Deletes the given weak persistent [object] handle. + * + * Requires there to be a current isolate group. + */ +DART_EXPORT void Dart_DeleteWeakPersistentHandle( + Dart_WeakPersistentHandle object); + +/** + * Allocates a finalizable handle for an object. + * + * This handle has the lifetime of the current isolate group unless the object + * pointed to by the handle is garbage collected, in this case the VM + * automatically deletes the handle after invoking the callback associated + * with the handle. The handle can also be explicitly deallocated by + * calling Dart_DeleteFinalizableHandle. + * + * If the object becomes unreachable the callback is invoked with the + * the peer as argument. The callback can be executed on any thread, will have + * an isolate group, but will not have a current isolate. The callback can only + * call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. + * This gives the embedder the ability to cleanup data associated with the + * object and clear out any cached references to the handle. All references to + * this handle after the callback will be invalid. It is illegal to call into + * the VM with any other Dart_* functions from the callback. If the handle is + * deleted before the object becomes unreachable, the callback is never + * invoked. + * + * Requires there to be a current isolate. + * + * \param object An object with identity. + * \param peer A pointer to a native object or NULL. This value is + * provided to callback when it is invoked. + * \param external_allocation_size The number of externally allocated + * bytes for peer. Used to inform the garbage collector. + * \param callback A function pointer that will be invoked sometime + * after the object is garbage collected, unless the handle has been deleted. + * A valid callback needs to be specified it cannot be NULL. + * + * \return The finalizable handle or NULL. NULL is returned in case of bad + * parameters. + */ +DART_EXPORT Dart_FinalizableHandle +Dart_NewFinalizableHandle(Dart_Handle object, + void* peer, + intptr_t external_allocation_size, + Dart_HandleFinalizer callback); + +/** + * Deletes the given finalizable [object] handle. + * + * The caller has to provide the actual Dart object the handle was created from + * to prove the object (and therefore the finalizable handle) is still alive. + * + * Requires there to be a current isolate. + */ +DART_EXPORT void Dart_DeleteFinalizableHandle(Dart_FinalizableHandle object, + Dart_Handle strong_ref_to_object); + +/* + * ========================== + * Initialization and Globals + * ========================== + */ + +/** + * Gets the version string for the Dart VM. + * + * The version of the Dart VM can be accessed without initializing the VM. + * + * \return The version string for the embedded Dart VM. + */ +DART_EXPORT const char* Dart_VersionString(void); + +/** + * Isolate specific flags are set when creating a new isolate using the + * Dart_IsolateFlags structure. + * + * Current version of flags is encoded in a 32-bit integer with 16 bits used + * for each part. + */ + +#define DART_FLAGS_CURRENT_VERSION (0x0000000d) + +typedef struct { + int32_t version; + bool enable_asserts; + bool use_field_guards; + bool use_osr; + bool obfuscate; + bool load_vmservice_library; + bool null_safety; + bool is_system_isolate; + bool is_service_isolate; + bool is_kernel_isolate; + bool snapshot_is_dontneed_safe; + bool branch_coverage; +} Dart_IsolateFlags; + +/** + * Initialize Dart_IsolateFlags with correct version and default values. + */ +DART_EXPORT void Dart_IsolateFlagsInitialize(Dart_IsolateFlags* flags); + +/** + * An isolate creation and initialization callback function. + * + * This callback, provided by the embedder, is called when the VM + * needs to create an isolate. The callback should create an isolate + * by calling Dart_CreateIsolateGroup and load any scripts required for + * execution. + * + * This callback may be called on a different thread than the one + * running the parent isolate. + * + * When the function returns NULL, it is the responsibility of this + * function to ensure that Dart_ShutdownIsolate has been called if + * required (for example, if the isolate was created successfully by + * Dart_CreateIsolateGroup() but the root library fails to load + * successfully, then the function should call Dart_ShutdownIsolate + * before returning). + * + * When the function returns NULL, the function should set *error to + * a malloc-allocated buffer containing a useful error message. The + * caller of this function (the VM) will make sure that the buffer is + * freed. + * + * \param script_uri The uri of the main source file or snapshot to load. + * Either the URI of the parent isolate set in Dart_CreateIsolateGroup for + * Isolate.spawn, or the argument to Isolate.spawnUri canonicalized by the + * library tag handler of the parent isolate. + * The callback is responsible for loading the program by a call to + * Dart_LoadScriptFromKernel. + * \param main The name of the main entry point this isolate will + * eventually run. This is provided for advisory purposes only to + * improve debugging messages. The main function is not invoked by + * this function. + * \param package_root Ignored. + * \param package_config Uri of the package configuration file (either in format + * of .packages or .dart_tool/package_config.json) for this isolate + * to resolve package imports against. If this parameter is not passed the + * package resolution of the parent isolate should be used. + * \param flags Default flags for this isolate being spawned. Either inherited + * from the spawning isolate or passed as parameters when spawning the + * isolate from Dart code. + * \param isolate_data The isolate data which was passed to the + * parent isolate when it was created by calling Dart_CreateIsolateGroup(). + * \param error A structure into which the embedder can place a + * C string containing an error message in the case of failures. + * + * \return The embedder returns NULL if the creation and + * initialization was not successful and the isolate if successful. + */ +typedef Dart_Isolate (*Dart_IsolateGroupCreateCallback)( + const char* script_uri, + const char* main, + const char* package_root, + const char* package_config, + Dart_IsolateFlags* flags, + void* isolate_data, + char** error); + +/** + * An isolate initialization callback function. + * + * This callback, provided by the embedder, is called when the VM has created an + * isolate within an existing isolate group (i.e. from the same source as an + * existing isolate). + * + * The callback should setup native resolvers and might want to set a custom + * message handler via [Dart_SetMessageNotifyCallback] and mark the isolate as + * runnable. + * + * This callback may be called on a different thread than the one + * running the parent isolate. + * + * When the function returns `false`, it is the responsibility of this + * function to ensure that `Dart_ShutdownIsolate` has been called. + * + * When the function returns `false`, the function should set *error to + * a malloc-allocated buffer containing a useful error message. The + * caller of this function (the VM) will make sure that the buffer is + * freed. + * + * \param child_isolate_data The callback data to associate with the new + * child isolate. + * \param error A structure into which the embedder can place a + * C string containing an error message in the case the initialization fails. + * + * \return The embedder returns true if the initialization was successful and + * false otherwise (in which case the VM will terminate the isolate). + */ +typedef bool (*Dart_InitializeIsolateCallback)(void** child_isolate_data, + char** error); + +/** + * An isolate shutdown callback function. + * + * This callback, provided by the embedder, is called before the vm + * shuts down an isolate. The isolate being shutdown will be the current + * isolate. It is safe to run Dart code. + * + * This function should be used to dispose of native resources that + * are allocated to an isolate in order to avoid leaks. + * + * \param isolate_group_data The same callback data which was passed to the + * isolate group when it was created. + * \param isolate_data The same callback data which was passed to the isolate + * when it was created. + */ +typedef void (*Dart_IsolateShutdownCallback)(void* isolate_group_data, + void* isolate_data); + +/** + * An isolate cleanup callback function. + * + * This callback, provided by the embedder, is called after the vm + * shuts down an isolate. There will be no current isolate and it is *not* + * safe to run Dart code. + * + * This function should be used to dispose of native resources that + * are allocated to an isolate in order to avoid leaks. + * + * \param isolate_group_data The same callback data which was passed to the + * isolate group when it was created. + * \param isolate_data The same callback data which was passed to the isolate + * when it was created. + */ +typedef void (*Dart_IsolateCleanupCallback)(void* isolate_group_data, + void* isolate_data); + +/** + * An isolate group cleanup callback function. + * + * This callback, provided by the embedder, is called after the vm + * shuts down an isolate group. + * + * This function should be used to dispose of native resources that + * are allocated to an isolate in order to avoid leaks. + * + * \param isolate_group_data The same callback data which was passed to the + * isolate group when it was created. + * + */ +typedef void (*Dart_IsolateGroupCleanupCallback)(void* isolate_group_data); + +/** + * A thread start callback function. + * This callback, provided by the embedder, is called after a thread in the + * vm thread pool starts. + * This function could be used to adjust thread priority or attach native + * resources to the thread. + */ +typedef void (*Dart_ThreadStartCallback)(void); + +/** + * A thread death callback function. + * This callback, provided by the embedder, is called before a thread in the + * vm thread pool exits. + * This function could be used to dispose of native resources that + * are associated and attached to the thread, in order to avoid leaks. + */ +typedef void (*Dart_ThreadExitCallback)(void); + +/** + * Opens a file for reading or writing. + * + * Callback provided by the embedder for file operations. If the + * embedder does not allow file operations this callback can be + * NULL. + * + * \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. + */ +typedef void* (*Dart_FileOpenCallback)(const char* name, bool write); + +/** + * Read contents of file. + * + * Callback provided by the embedder for file operations. If the + * embedder does not allow file operations this callback can be + * NULL. + * + * \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. + */ +typedef void (*Dart_FileReadCallback)(uint8_t** data, + intptr_t* file_length, + void* stream); + +/** + * Write data into file. + * + * Callback provided by the embedder for file operations. If the + * embedder does not allow file operations this callback can be + * NULL. + * + * \param data Buffer which needs to be written into the file. + * \param length Length of the buffer. + * \param stream Handle to the opened file. + */ +typedef void (*Dart_FileWriteCallback)(const void* data, + intptr_t length, + void* stream); + +/** + * Closes the opened file. + * + * Callback provided by the embedder for file operations. If the + * embedder does not allow file operations this callback can be + * NULL. + * + * \param stream Handle to the opened file. + */ +typedef void (*Dart_FileCloseCallback)(void* stream); + +typedef bool (*Dart_EntropySource)(uint8_t* buffer, intptr_t length); + +/** + * Callback provided by the embedder that is used by the vmservice isolate + * to request the asset archive. The asset archive must be an uncompressed tar + * archive that is stored in a Uint8List. + * + * If the embedder has no vmservice isolate assets, the callback can be NULL. + * + * \return The embedder must return a handle to a Uint8List containing an + * uncompressed tar archive or null. + */ +typedef Dart_Handle (*Dart_GetVMServiceAssetsArchive)(void); + +/** + * The current version of the Dart_InitializeFlags. Should be incremented every + * time Dart_InitializeFlags changes in a binary incompatible way. + */ +#define DART_INITIALIZE_PARAMS_CURRENT_VERSION (0x00000008) + +/** Forward declaration */ +struct Dart_CodeObserver; + +/** + * Callback provided by the embedder that is used by the VM to notify on code + * object creation, *before* it is invoked the first time. + * This is useful for embedders wanting to e.g. keep track of PCs beyond + * the lifetime of the garbage collected code objects. + * Note that an address range may be used by more than one code object over the + * lifecycle of a process. Clients of this function should record timestamps for + * these compilation events and when collecting PCs to disambiguate reused + * address ranges. + */ +typedef void (*Dart_OnNewCodeCallback)(struct Dart_CodeObserver* observer, + const char* name, + uintptr_t base, + uintptr_t size); + +typedef struct Dart_CodeObserver { + void* data; + + Dart_OnNewCodeCallback on_new_code; +} Dart_CodeObserver; + +/** + * Optional callback provided by the embedder that is used by the VM to + * implement registration of kernel blobs for the subsequent Isolate.spawnUri + * If no callback is provided, the registration of kernel blobs will throw + * an error. + * + * \param kernel_buffer A buffer which contains a kernel program. Callback + * should copy the contents of `kernel_buffer` as + * it may be freed immediately after registration. + * \param kernel_buffer_size The size of `kernel_buffer`. + * + * \return A C string representing URI which can be later used + * to spawn a new isolate. This C String should be scope allocated + * or owned by the embedder. + * Returns NULL if embedder runs out of memory. + */ +typedef const char* (*Dart_RegisterKernelBlobCallback)( + const uint8_t* kernel_buffer, + intptr_t kernel_buffer_size); + +/** + * Optional callback provided by the embedder that is used by the VM to + * unregister kernel blobs. + * If no callback is provided, the unregistration of kernel blobs will throw + * an error. + * + * \param kernel_blob_uri URI of the kernel blob to unregister. + */ +typedef void (*Dart_UnregisterKernelBlobCallback)(const char* kernel_blob_uri); + +/** + * Describes how to initialize the VM. Used with Dart_Initialize. + */ +typedef struct { + /** + * Identifies the version of the struct used by the client. + * should be initialized to DART_INITIALIZE_PARAMS_CURRENT_VERSION. + */ + int32_t version; + + /** + * A buffer containing snapshot data, or NULL if no snapshot is provided. + * + * If provided, the buffer must remain valid until Dart_Cleanup returns. + */ + const uint8_t* vm_snapshot_data; + + /** + * 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. + */ + const uint8_t* vm_snapshot_instructions; + + /** + * A function to be called during isolate group creation. + * See Dart_IsolateGroupCreateCallback. + */ + Dart_IsolateGroupCreateCallback create_group; + + /** + * A function to be called during isolate + * initialization inside an existing isolate group. + * See Dart_InitializeIsolateCallback. + */ + Dart_InitializeIsolateCallback initialize_isolate; + + /** + * A function to be called right before an isolate is shutdown. + * See Dart_IsolateShutdownCallback. + */ + Dart_IsolateShutdownCallback shutdown_isolate; + + /** + * A function to be called after an isolate was shutdown. + * See Dart_IsolateCleanupCallback. + */ + Dart_IsolateCleanupCallback cleanup_isolate; + + /** + * A function to be called after an isolate group is + * shutdown. See Dart_IsolateGroupCleanupCallback. + */ + Dart_IsolateGroupCleanupCallback cleanup_group; + + Dart_ThreadStartCallback thread_start; + Dart_ThreadExitCallback thread_exit; + Dart_FileOpenCallback file_open; + Dart_FileReadCallback file_read; + Dart_FileWriteCallback file_write; + Dart_FileCloseCallback file_close; + Dart_EntropySource entropy_source; + + /** + * A function to be called by the service isolate when it requires the + * vmservice assets archive. See Dart_GetVMServiceAssetsArchive. + */ + Dart_GetVMServiceAssetsArchive get_service_assets; + + bool start_kernel_isolate; + + /** + * An external code observer callback function. The observer can be invoked + * as early as during the Dart_Initialize() call. + */ + Dart_CodeObserver* code_observer; + + /** + * Kernel blob registration callback function. See Dart_RegisterKernelBlobCallback. + */ + Dart_RegisterKernelBlobCallback register_kernel_blob; + + /** + * Kernel blob unregistration callback function. See Dart_UnregisterKernelBlobCallback. + */ + Dart_UnregisterKernelBlobCallback unregister_kernel_blob; + +#if defined(__Fuchsia__) + /** + * The resource needed to use zx_vmo_replace_as_executable. Can be + * ZX_HANDLE_INVALID if the process has ambient-replace-as-executable or if + * executable memory is not needed (e.g., this is an AOT runtime). + */ + zx_handle_t vmex_resource; +#endif +} Dart_InitializeParams; + +/** + * Initializes the VM. + * + * \param params A struct containing initialization information. The version + * field of the struct must be DART_INITIALIZE_PARAMS_CURRENT_VERSION. + * + * \return NULL if initialization is successful. Returns an error message + * otherwise. The caller is responsible for freeing the error message. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT char* Dart_Initialize( + Dart_InitializeParams* params); + +/** + * Cleanup state in the VM before process termination. + * + * \return NULL if cleanup is successful. Returns an error message otherwise. + * The caller is responsible for freeing the error message. + * + * NOTE: This function must not be called on a thread that was created by the VM + * itself. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT char* Dart_Cleanup(void); + +/** + * Sets command line flags. Should be called before Dart_Initialize. + * + * \param argc The length of the arguments array. + * \param argv An array of arguments. + * + * \return NULL if successful. Returns an error message otherwise. + * The caller is responsible for freeing the error message. + * + * NOTE: This call does not store references to the passed in c-strings. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT char* Dart_SetVMFlags(int argc, + const char** argv); + +/** + * Returns true if the named VM flag is of boolean type, specified, and set to + * true. + * + * \param flag_name The name of the flag without leading punctuation + * (example: "enable_asserts"). + */ +DART_EXPORT bool Dart_IsVMFlagSet(const char* flag_name); + +/* + * ======== + * Isolates + * ======== + */ + +/** + * Creates a new isolate. The new isolate becomes the current isolate. + * + * A snapshot can be used to restore the VM quickly to a saved state + * and is useful for fast startup. If snapshot data is provided, the + * isolate will be started using that snapshot data. Requires a core snapshot or + * an app snapshot created by Dart_CreateSnapshot or + * Dart_CreatePrecompiledSnapshot* from a VM with the same version. + * + * Requires there to be no current isolate. + * + * \param script_uri The main source file or snapshot this isolate will load. + * The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a + * child isolate is created by Isolate.spawn. The embedder should use a URI + * that allows it to load the same program into such a child isolate. + * \param name A short name for the isolate to improve debugging messages. + * Typically of the format 'foo.dart:main()'. + * \param isolate_snapshot_data Buffer containing the snapshot data of the + * isolate or NULL if no snapshot is provided. If provided, the buffer must + * remain valid until the isolate shuts down. + * \param isolate_snapshot_instructions Buffer containing the snapshot + * instructions of the isolate or NULL if no snapshot is provided. If + * provided, the buffer must remain valid until the isolate shuts down. + * \param flags Pointer to VM specific flags or NULL for default flags. + * \param isolate_group_data Embedder group data. This data can be obtained + * by calling Dart_IsolateGroupData and will be passed to the + * Dart_IsolateShutdownCallback, Dart_IsolateCleanupCallback, and + * Dart_IsolateGroupCleanupCallback. + * \param isolate_data Embedder data. This data will be passed to + * the Dart_IsolateGroupCreateCallback when new isolates are spawned from + * this parent isolate. + * \param error Returns NULL if creation is successful, an error message + * otherwise. The caller is responsible for calling free() on the error + * message. + * + * \return The new isolate on success, or NULL if isolate creation failed. + */ +DART_EXPORT Dart_Isolate +Dart_CreateIsolateGroup(const char* script_uri, + const char* name, + const uint8_t* isolate_snapshot_data, + const uint8_t* isolate_snapshot_instructions, + Dart_IsolateFlags* flags, + void* isolate_group_data, + void* isolate_data, + char** error); +/** + * Creates a new isolate inside the isolate group of [group_member]. + * + * Requires there to be no current isolate. + * + * \param group_member An isolate from the same group into which the newly created + * isolate should be born into. Other threads may not have entered / enter this + * member isolate. + * \param name A short name for the isolate for debugging purposes. + * \param shutdown_callback A callback to be called when the isolate is being + * shutdown (may be NULL). + * \param cleanup_callback A callback to be called when the isolate is being + * cleaned up (may be NULL). + * \param child_isolate_data The embedder-specific data associated with this isolate. + * \param error Set to NULL if creation is successful, set to an error + * message otherwise. The caller is responsible for calling free() on the + * error message. + * + * \return The newly created isolate on success, or NULL if isolate creation + * failed. + * + * If successful, the newly created isolate will become the current isolate. + */ +DART_EXPORT Dart_Isolate +Dart_CreateIsolateInGroup(Dart_Isolate group_member, + const char* name, + Dart_IsolateShutdownCallback shutdown_callback, + Dart_IsolateCleanupCallback cleanup_callback, + void* child_isolate_data, + char** error); + +/* TODO(turnidge): Document behavior when there is already a current + * isolate. */ + +/** + * Creates a new isolate from a Dart Kernel file. The new isolate + * becomes the current isolate. + * + * Requires there to be no current isolate. + * + * \param script_uri The main source file or snapshot this isolate will load. + * The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a + * child isolate is created by Isolate.spawn. The embedder should use a URI that + * allows it to load the same program into such a child isolate. + * \param name A short name for the isolate to improve debugging messages. + * Typically of the format 'foo.dart:main()'. + * \param kernel_buffer A buffer which contains a kernel/DIL program. Must + * remain valid until isolate shutdown. + * \param kernel_buffer_size The size of `kernel_buffer`. + * \param flags Pointer to VM specific flags or NULL for default flags. + * \param isolate_group_data Embedder group data. This data can be obtained + * by calling Dart_IsolateGroupData and will be passed to the + * Dart_IsolateShutdownCallback, Dart_IsolateCleanupCallback, and + * Dart_IsolateGroupCleanupCallback. + * \param isolate_data Embedder data. This data will be passed to + * the Dart_IsolateGroupCreateCallback when new isolates are spawned from + * this parent isolate. + * \param error Returns NULL if creation is successful, an error message + * otherwise. The caller is responsible for calling free() on the error + * message. + * + * \return The new isolate on success, or NULL if isolate creation failed. + */ +DART_EXPORT Dart_Isolate +Dart_CreateIsolateGroupFromKernel(const char* script_uri, + const char* name, + const uint8_t* kernel_buffer, + intptr_t kernel_buffer_size, + Dart_IsolateFlags* flags, + void* isolate_group_data, + void* isolate_data, + char** error); +/** + * Shuts down the current isolate. After this call, the current isolate is NULL. + * Any current scopes created by Dart_EnterScope will be exited. Invokes the + * shutdown callback and any callbacks of remaining weak persistent handles. + * + * Requires there to be a current isolate. + */ +DART_EXPORT void Dart_ShutdownIsolate(void); +/* TODO(turnidge): Document behavior when there is no current isolate. */ + +/** + * Returns the current isolate. Will return NULL if there is no + * current isolate. + */ +DART_EXPORT Dart_Isolate Dart_CurrentIsolate(void); + +/** + * Returns the callback data associated with the current isolate. This + * data was set when the isolate got created or initialized. + */ +DART_EXPORT void* Dart_CurrentIsolateData(void); + +/** + * Returns the callback data associated with the given isolate. This + * data was set when the isolate got created or initialized. + */ +DART_EXPORT void* Dart_IsolateData(Dart_Isolate isolate); + +/** + * Returns the current isolate group. Will return NULL if there is no + * current isolate group. + */ +DART_EXPORT Dart_IsolateGroup Dart_CurrentIsolateGroup(void); + +/** + * Returns the callback data associated with the current isolate group. This + * data was passed to the isolate group when it was created. + */ +DART_EXPORT void* Dart_CurrentIsolateGroupData(void); + +/** + * Gets an id that uniquely identifies current isolate group. + * + * It is the responsibility of the caller to free the returned ID. + */ +typedef int64_t Dart_IsolateGroupId; +DART_EXPORT Dart_IsolateGroupId Dart_CurrentIsolateGroupId(void); + +/** + * Returns the callback data associated with the specified isolate group. This + * data was passed to the isolate when it was created. + * The embedder is responsible for ensuring the consistency of this data + * with respect to the lifecycle of an isolate group. + */ +DART_EXPORT void* Dart_IsolateGroupData(Dart_Isolate isolate); + +/** + * Returns the debugging name for the current isolate. + * + * This name is unique to each isolate and should only be used to make + * debugging messages more comprehensible. + */ +DART_EXPORT Dart_Handle Dart_DebugName(void); + +/** + * 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. + * + * The returned string is scope allocated and is only valid until the next call + * to Dart_ExitScope. + */ +DART_EXPORT const char* Dart_DebugNameToCString(void); + +/** + * Returns the ID for an isolate which is used to query the service protocol. + * + * It is the responsibility of the caller to free the returned ID. + */ +DART_EXPORT const char* Dart_IsolateServiceId(Dart_Isolate isolate); + +/** + * Enters an isolate. After calling this function, + * the current isolate will be set to the provided isolate. + * + * Requires there to be no current isolate. Multiple threads may not be in + * the same isolate at once. + */ +DART_EXPORT void Dart_EnterIsolate(Dart_Isolate isolate); + +/** + * Kills the given isolate. + * + * This function has the same effect as dart:isolate's + * Isolate.kill(priority:immediate). + * It can interrupt ordinary Dart code but not native code. If the isolate is + * in the middle of a long running native function, the isolate will not be + * killed until control returns to Dart. + * + * Does not require a current isolate. It is safe to kill the current isolate if + * there is one. + */ +DART_EXPORT void Dart_KillIsolate(Dart_Isolate isolate); + +/** + * Notifies the VM that the embedder expects to be idle until |deadline|. The VM + * may use this time to perform garbage collection or other tasks to avoid + * delays during execution of Dart code in the future. + * + * |deadline| is measured in microseconds against the system's monotonic time. + * This clock can be accessed via Dart_TimelineGetMicros(). + * + * Requires there to be a current isolate. + */ +DART_EXPORT void Dart_NotifyIdle(int64_t deadline); + +typedef void (*Dart_HeapSamplingReportCallback)(void* context, void* data); + +typedef void* (*Dart_HeapSamplingCreateCallback)( + Dart_Isolate isolate, + Dart_IsolateGroup isolate_group, + const char* cls_name, + intptr_t allocation_size); +typedef void (*Dart_HeapSamplingDeleteCallback)(void* data); + +/** + * Starts the heap sampling profiler for each thread in the VM. + */ +DART_EXPORT void Dart_EnableHeapSampling(void); + +/* + * Stops the heap sampling profiler for each thread in the VM. + */ +DART_EXPORT void Dart_DisableHeapSampling(void); + +/* Registers callbacks are invoked once per sampled allocation upon object + * allocation and garbage collection. + * + * |create_callback| can be used to associate additional data with the sampled + * allocation, such as a stack trace. This data pointer will be passed to + * |delete_callback| to allow for proper disposal when the object associated + * with the allocation sample is collected. + * + * The provided callbacks must not call into the VM and should do as little + * work as possible to avoid performance penalities during object allocation and + * garbage collection. + * + * NOTE: It is a fatal error to set either callback to null once they have been + * initialized. + */ +DART_EXPORT void Dart_RegisterHeapSamplingCallback( + Dart_HeapSamplingCreateCallback create_callback, + Dart_HeapSamplingDeleteCallback delete_callback); + +/* + * Reports the surviving allocation samples for all live isolate groups in the + * VM. + * + * When the callback is invoked: + * - |context| will be the context object provided when invoking + * |Dart_ReportSurvivingAllocations|. This can be safely set to null if not + * required. + * - |heap_size| will be equal to the size of the allocated object associated + * with the sample. + * - |cls_name| will be a C String representing + * the class name of the allocated object. This string is valid for the + * duration of the call to Dart_ReportSurvivingAllocations and can be + * freed by the VM at any point after the method returns. + * - |data| will be set to the data associated with the sample by + * |Dart_HeapSamplingCreateCallback|. + * + * If |force_gc| is true, a full GC will be performed before reporting the + * allocations. + */ +DART_EXPORT void Dart_ReportSurvivingAllocations( + Dart_HeapSamplingReportCallback callback, + void* context, + bool force_gc); + +/* + * Sets the average heap sampling rate based on a number of |bytes| for each + * thread. + * + * In other words, approximately every |bytes| allocated will create a sample. + * Defaults to 512 KiB. + */ +DART_EXPORT void Dart_SetHeapSamplingPeriod(intptr_t bytes); + +/** + * Notifies the VM that the embedder expects the application's working set has + * recently shrunk significantly and is not expected to rise in the near future. + * The VM may spend O(heap-size) time performing clean up work. + * + * Requires there to be a current isolate. + */ +DART_EXPORT void Dart_NotifyDestroyed(void); + +/** + * Notifies the VM that the system is running low on memory. + * + * Does not require a current isolate. Only valid after calling Dart_Initialize. + */ +DART_EXPORT void Dart_NotifyLowMemory(void); + +typedef enum { + /** + * Balanced + */ + Dart_PerformanceMode_Default, + /** + * Optimize for low latency, at the expense of throughput and memory overhead + * by performing work in smaller batches (requiring more overhead) or by + * delaying work (requiring more memory). An embedder should not remain in + * this mode indefinitely. + */ + Dart_PerformanceMode_Latency, + /** + * Optimize for high throughput, at the expense of latency and memory overhead + * by performing work in larger batches with more intervening growth. + */ + Dart_PerformanceMode_Throughput, + /** + * Optimize for low memory, at the expensive of throughput and latency by more + * frequently performing work. + */ + Dart_PerformanceMode_Memory, +} Dart_PerformanceMode; + +/** + * Set the desired performance trade-off. + * + * Requires a current isolate. + * + * Returns the previous performance mode. + */ +DART_EXPORT Dart_PerformanceMode +Dart_SetPerformanceMode(Dart_PerformanceMode mode); + +/** + * Starts the CPU sampling profiler. + */ +DART_EXPORT void Dart_StartProfiling(void); + +/** + * Stops the CPU sampling profiler. + * + * Note that some profile samples might still be taken after this function + * returns due to the asynchronous nature of the implementation on some + * platforms. + */ +DART_EXPORT void Dart_StopProfiling(void); + +/** + * Notifies the VM that the current thread should not be profiled until a + * matching call to Dart_ThreadEnableProfiling is made. + * + * NOTE: By default, if a thread has entered an isolate it will be profiled. + * This function should be used when an embedder knows a thread is about + * to make a blocking call and wants to avoid unnecessary interrupts by + * the profiler. + */ +DART_EXPORT void Dart_ThreadDisableProfiling(void); + +/** + * Notifies the VM that the current thread should be profiled. + * + * NOTE: It is only legal to call this function *after* calling + * Dart_ThreadDisableProfiling. + * + * NOTE: By default, if a thread has entered an isolate it will be profiled. + */ +DART_EXPORT void Dart_ThreadEnableProfiling(void); + +/** + * Register symbol information for the Dart VM's profiler and crash dumps. + * + * This consumes the output of //topaz/runtime/dart/profiler_symbols, which + * should be treated as opaque. + */ +DART_EXPORT void Dart_AddSymbols(const char* dso_name, + void* buffer, + intptr_t buffer_size); + +/** + * Exits an isolate. After this call, Dart_CurrentIsolate will + * return NULL. + * + * Requires there to be a current isolate. + */ +DART_EXPORT void Dart_ExitIsolate(void); +/* TODO(turnidge): We don't want users of the api to be able to exit a + * "pure" dart isolate. Implement and document. */ + +/** + * Creates a full snapshot of the current isolate heap. + * + * A full snapshot is a compact representation of the dart vm isolate heap + * and dart isolate heap states. These snapshots are used to initialize + * the vm isolate on startup and fast initialization of an isolate. + * A Snapshot of the heap is created before any dart code has executed. + * + * Requires there to be a current isolate. Not available in the precompiled + * runtime (check Dart_IsPrecompiledRuntime). + * + * \param vm_snapshot_data_buffer Returns a pointer to a buffer containing the + * vm snapshot. This buffer is scope allocated and is only valid + * until the next call to Dart_ExitScope. + * \param vm_snapshot_data_size Returns the size of vm_snapshot_data_buffer. + * \param isolate_snapshot_data_buffer Returns a pointer to a buffer containing + * the isolate snapshot. This buffer is scope allocated and is only valid + * until the next call to Dart_ExitScope. + * \param isolate_snapshot_data_size Returns the size of + * isolate_snapshot_data_buffer. + * \param is_core Create a snapshot containing core libraries. + * Such snapshot should be agnostic to null safety mode. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_CreateSnapshot(uint8_t** vm_snapshot_data_buffer, + intptr_t* vm_snapshot_data_size, + uint8_t** isolate_snapshot_data_buffer, + intptr_t* isolate_snapshot_data_size, + bool is_core); + +/** + * Returns whether the buffer contains a kernel file. + * + * \param buffer Pointer to a buffer that might contain a kernel binary. + * \param buffer_size Size of the buffer. + * + * \return Whether the buffer contains a kernel binary (full or partial). + */ +DART_EXPORT bool Dart_IsKernel(const uint8_t* buffer, intptr_t buffer_size); + +/** + * Make isolate runnable. + * + * When isolates are spawned, this function is used to indicate that + * the creation and initialization (including script loading) of the + * isolate is complete and the isolate can start. + * This function expects there to be no current isolate. + * + * \param isolate The isolate to be made runnable. + * + * \return NULL if successful. Returns an error message otherwise. The caller + * is responsible for freeing the error message. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT char* Dart_IsolateMakeRunnable( + Dart_Isolate isolate); + +/* + * ================== + * Messages and Ports + * ================== + */ + +/** + * A port is used to send or receive inter-isolate messages + */ +typedef int64_t Dart_Port; + +/** + * ILLEGAL_PORT is a port number guaranteed never to be associated with a valid + * port. + */ +#define ILLEGAL_PORT ((Dart_Port)0) + +/** + * A message notification callback. + * + * This callback allows the embedder to provide a custom wakeup mechanism for + * the delivery of inter-isolate messages. This function is called once per + * message on an arbitrary thread. It is the responsibility of the embedder to + * eventually call Dart_HandleMessage once per callback received with the + * destination isolate set as the current isolate to process the message. + */ +typedef void (*Dart_MessageNotifyCallback)(Dart_Isolate destination_isolate); + +/** + * Allows embedders to provide a custom wakeup mechanism for the delivery of + * inter-isolate messages. This setting only applies to the current isolate. + * + * This mechanism is optional: if not provided, the isolate will be scheduled on + * a VM-managed thread pool. An embedder should provide this callback if it + * wants to run an isolate on a specific thread or to interleave handling of + * inter-isolate messages with other event sources. + * + * Most embedders will only call this function once, before isolate + * execution begins. If this function is called after isolate + * execution begins, the embedder is responsible for threading issues. + */ +DART_EXPORT void Dart_SetMessageNotifyCallback( + Dart_MessageNotifyCallback message_notify_callback); +/* TODO(turnidge): Consider moving this to isolate creation so that it + * is impossible to mess up. */ + +/** + * Query the current message notify callback for the isolate. + * + * \return The current message notify callback for the isolate. + */ +DART_EXPORT Dart_MessageNotifyCallback Dart_GetMessageNotifyCallback(void); + +/** + * The VM's default message handler supports pausing an isolate before it + * processes the first message and right after the it processes the isolate's + * final message. This can be controlled for all isolates by two VM flags: + * + * `--pause-isolates-on-start` + * `--pause-isolates-on-exit` + * + * Additionally, Dart_SetShouldPauseOnStart and Dart_SetShouldPauseOnExit can be + * used to control this behaviour on a per-isolate basis. + * + * When an embedder is using a Dart_MessageNotifyCallback the embedder + * needs to cooperate with the VM so that the service protocol can report + * accurate information about isolates and so that tools such as debuggers + * work reliably. + * + * The following functions can be used to implement pausing on start and exit. + */ + +/** + * If the VM flag `--pause-isolates-on-start` was passed this will be true. + * + * \return A boolean value indicating if pause on start was requested. + */ +DART_EXPORT bool Dart_ShouldPauseOnStart(void); + +/** + * Override the VM flag `--pause-isolates-on-start` for the current isolate. + * + * \param should_pause Should the isolate be paused on start? + * + * NOTE: This must be called before Dart_IsolateMakeRunnable. + */ +DART_EXPORT void Dart_SetShouldPauseOnStart(bool should_pause); + +/** + * Is the current isolate paused on start? + * + * \return A boolean value indicating if the isolate is paused on start. + */ +DART_EXPORT bool Dart_IsPausedOnStart(void); + +/** + * Called when the embedder has paused the current isolate on start and when + * the embedder has resumed the isolate. + * + * \param paused Is the isolate paused on start? + */ +DART_EXPORT void Dart_SetPausedOnStart(bool paused); + +/** + * If the VM flag `--pause-isolates-on-exit` was passed this will be true. + * + * \return A boolean value indicating if pause on exit was requested. + */ +DART_EXPORT bool Dart_ShouldPauseOnExit(void); + +/** + * Override the VM flag `--pause-isolates-on-exit` for the current isolate. + * + * \param should_pause Should the isolate be paused on exit? + * + */ +DART_EXPORT void Dart_SetShouldPauseOnExit(bool should_pause); + +/** + * Is the current isolate paused on exit? + * + * \return A boolean value indicating if the isolate is paused on exit. + */ +DART_EXPORT bool Dart_IsPausedOnExit(void); + +/** + * Called when the embedder has paused the current isolate on exit and when + * the embedder has resumed the isolate. + * + * \param paused Is the isolate paused on exit? + */ +DART_EXPORT void Dart_SetPausedOnExit(bool paused); + +/** + * Called when the embedder has caught a top level unhandled exception error + * in the current isolate. + * + * NOTE: It is illegal to call this twice on the same isolate without first + * clearing the sticky error to null. + * + * \param error The unhandled exception error. + */ +DART_EXPORT void Dart_SetStickyError(Dart_Handle error); + +/** + * Does the current isolate have a sticky error? + */ +DART_EXPORT bool Dart_HasStickyError(void); + +/** + * Gets the sticky error for the current isolate. + * + * \return A handle to the sticky error object or null. + */ +DART_EXPORT Dart_Handle Dart_GetStickyError(void); + +/** + * Handles the next pending message for the current isolate. + * + * May generate an unhandled exception error. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_HandleMessage(void); + +/** + * Handles any pending messages for the vm service for the current + * isolate. + * + * This function may be used by an embedder at a breakpoint to avoid + * pausing the vm service. + * + * This function can indirectly cause the message notify callback to + * be called. + * + * \return true if the vm service requests the program resume + * execution, false otherwise + */ +DART_EXPORT bool Dart_HandleServiceMessages(void); + +/** + * Does the current isolate have pending service messages? + * + * \return true if the isolate has pending service messages, false otherwise. + */ +DART_EXPORT bool Dart_HasServiceMessages(void); + +/** + * Processes any incoming messages for the current isolate. + * + * This function may only be used when the embedder has not provided + * an alternate message delivery mechanism with + * Dart_SetMessageCallbacks. It is provided for convenience. + * + * This function waits for incoming messages for the current + * isolate. As new messages arrive, they are handled using + * Dart_HandleMessage. The routine exits when all ports to the + * current isolate are closed. + * + * \return A valid handle if the run loop exited successfully. If an + * exception or other error occurs while processing messages, an + * error handle is returned. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_RunLoop(void); + +/** + * 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 successful the VM takes ownership of the isolate and takes care + * of its message loop. If not successful the caller retains ownership of the + * isolate. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT bool Dart_RunLoopAsync( + bool errors_are_fatal, + Dart_Port on_error_port, + Dart_Port on_exit_port, + char** error); + +/* TODO(turnidge): Should this be removed from the public api? */ + +/** + * Gets the main port id for the current isolate. + */ +DART_EXPORT Dart_Port Dart_GetMainPortId(void); + +/** + * Does the current isolate have live ReceivePorts? + * + * A ReceivePort is live when it has not been closed. + */ +DART_EXPORT bool Dart_HasLivePorts(void); + +/** + * Posts a message for some isolate. The message is a serialized + * object. + * + * Requires there to be a current isolate. + * + * For posting messages outside of an isolate see \ref Dart_PostCObject. + * + * \param port_id The destination port. + * \param object An object from the current isolate. + * + * \return True if the message was posted. + */ +DART_EXPORT bool Dart_Post(Dart_Port port_id, Dart_Handle object); + +/** + * Returns a new SendPort with the provided port id. + * + * \param port_id The destination port. + * + * \return A new SendPort if no errors occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewSendPort(Dart_Port port_id); + +/** + * Gets the SendPort id for the provided SendPort. + * \param port A SendPort object whose id is desired. + * \param port_id Returns the id of the SendPort. + * \return Success if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_SendPortGetId(Dart_Handle port, + Dart_Port* port_id); + +/* + * ====== + * Scopes + * ====== + */ + +/** + * Enters a new scope. + * + * All new local handles will be created in this scope. Additionally, + * some functions may return "scope allocated" memory which is only + * valid within this scope. + * + * Requires there to be a current isolate. + */ +DART_EXPORT void Dart_EnterScope(void); + +/** + * Exits a scope. + * + * The previous scope (if any) becomes the current scope. + * + * Requires there to be a current isolate. + */ +DART_EXPORT void Dart_ExitScope(void); + +/** + * The Dart VM uses "zone allocation" for temporary structures. Zones + * support very fast allocation of small chunks of memory. The chunks + * cannot be deallocated individually, but instead zones support + * deallocating all chunks in one fast operation. + * + * This function makes it possible for the embedder to allocate + * temporary data in the VMs zone allocator. + * + * Zone allocation is possible: + * 1. when inside a scope where local handles can be allocated + * 2. when processing a message from a native port in a native port + * handler + * + * All the memory allocated this way will be reclaimed either on the + * next call to Dart_ExitScope or when the native port handler exits. + * + * \param size Size of the memory to allocate. + * + * \return A pointer to the allocated memory. NULL if allocation + * failed. Failure might due to is no current VM zone. + */ +DART_EXPORT uint8_t* Dart_ScopeAllocate(intptr_t size); + +/* + * ======= + * Objects + * ======= + */ + +/** + * Returns the null object. + * + * \return A handle to the null object. + */ +DART_EXPORT Dart_Handle Dart_Null(void); + +/** + * Is this object null? + */ +DART_EXPORT bool Dart_IsNull(Dart_Handle object); + +/** + * Returns the empty string object. + * + * \return A handle to the empty string object. + */ +DART_EXPORT Dart_Handle Dart_EmptyString(void); + +/** + * Returns types that are not classes, and which therefore cannot be looked up + * as library members by Dart_GetType. + * + * \return A handle to the dynamic, void or Never type. + */ +DART_EXPORT Dart_Handle Dart_TypeDynamic(void); +DART_EXPORT Dart_Handle Dart_TypeVoid(void); +DART_EXPORT Dart_Handle Dart_TypeNever(void); + +/** + * Checks if the two objects are equal. + * + * The result of the comparison is returned through the 'equal' + * parameter. The return value itself is used to indicate success or + * failure, not equality. + * + * May generate an unhandled exception error. + * + * \param obj1 An object to be compared. + * \param obj2 An object to be compared. + * \param equal Returns the result of the equality comparison. + * + * \return A valid handle if no error occurs during the comparison. + */ +DART_EXPORT Dart_Handle Dart_ObjectEquals(Dart_Handle obj1, + Dart_Handle obj2, + bool* equal); + +/** + * Is this object an instance of some type? + * + * The result of the test is returned through the 'instanceof' parameter. + * The return value itself is used to indicate success or failure. + * + * \param object An object. + * \param type A type. + * \param instanceof Return true if 'object' is an instance of type 'type'. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_ObjectIsType(Dart_Handle object, + Dart_Handle type, + bool* instanceof); + +/** + * Query object type. + * + * \param object Some Object. + * + * \return true if Object is of the specified type. + */ +DART_EXPORT bool Dart_IsInstance(Dart_Handle object); +DART_EXPORT bool Dart_IsNumber(Dart_Handle object); +DART_EXPORT bool Dart_IsInteger(Dart_Handle object); +DART_EXPORT bool Dart_IsDouble(Dart_Handle object); +DART_EXPORT bool Dart_IsBoolean(Dart_Handle object); +DART_EXPORT bool Dart_IsString(Dart_Handle object); +DART_EXPORT bool Dart_IsStringLatin1(Dart_Handle object); /* (ISO-8859-1) */ +DART_EXPORT bool Dart_IsList(Dart_Handle object); +DART_EXPORT bool Dart_IsMap(Dart_Handle object); +DART_EXPORT bool Dart_IsLibrary(Dart_Handle object); +DART_EXPORT bool Dart_IsType(Dart_Handle handle); +DART_EXPORT bool Dart_IsFunction(Dart_Handle handle); +DART_EXPORT bool Dart_IsVariable(Dart_Handle handle); +DART_EXPORT bool Dart_IsTypeVariable(Dart_Handle handle); +DART_EXPORT bool Dart_IsClosure(Dart_Handle object); +DART_EXPORT bool Dart_IsTypedData(Dart_Handle object); +DART_EXPORT bool Dart_IsByteBuffer(Dart_Handle object); +DART_EXPORT bool Dart_IsFuture(Dart_Handle object); + +/* + * ========= + * Instances + * ========= + */ + +/* + * For the purposes of the embedding api, not all objects returned are + * Dart language objects. Within the api, we use the term 'Instance' + * to indicate handles which refer to true Dart language objects. + * + * TODO(turnidge): Reorganize the "Object" section above, pulling down + * any functions that more properly belong here. */ + +/** + * Gets the type of a Dart language object. + * + * \param instance Some Dart object. + * + * \return If no error occurs, the type is returned. Otherwise an + * error handle is returned. + */ +DART_EXPORT Dart_Handle Dart_InstanceGetType(Dart_Handle instance); + +/** + * Returns the name for the provided class type. + * + * \return A valid string handle if no error occurs during the + * operation. + */ +DART_EXPORT Dart_Handle Dart_ClassName(Dart_Handle cls_type); + +/** + * Returns the name for the provided function or method. + * + * \return A valid string handle if no error occurs during the + * operation. + */ +DART_EXPORT Dart_Handle Dart_FunctionName(Dart_Handle function); + +/** + * Returns a handle to the owner of a function. + * + * The owner of an instance method or a static method is its defining + * class. The owner of a top-level function is its defining + * library. The owner of the function of a non-implicit closure is the + * function of the method or closure that defines the non-implicit + * closure. + * + * \return A valid handle to the owner of the function, or an error + * handle if the argument is not a valid handle to a function. + */ +DART_EXPORT Dart_Handle Dart_FunctionOwner(Dart_Handle function); + +/** + * Determines whether a function handle refers to a static function + * of method. + * + * For the purposes of the embedding API, a top-level function is + * implicitly declared static. + * + * \param function A handle to a function or method declaration. + * \param is_static Returns whether the function or method is declared static. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_FunctionIsStatic(Dart_Handle function, + bool* is_static); + +/** + * Is this object a closure resulting from a tear-off (closurized method)? + * + * Returns true for closures produced when an ordinary method is accessed + * through a getter call. Returns false otherwise, in particular for closures + * produced from local function declarations. + * + * \param object Some Object. + * + * \return true if Object is a tear-off. + */ +DART_EXPORT bool Dart_IsTearOff(Dart_Handle object); + +/** + * Retrieves the function of a closure. + * + * \return A handle to the function of the closure, or an error handle if the + * argument is not a closure. + */ +DART_EXPORT Dart_Handle Dart_ClosureFunction(Dart_Handle closure); + +/** + * Returns a handle to the library which contains class. + * + * \return A valid handle to the library with owns class, null if the class + * has no library or an error handle if the argument is not a valid handle + * to a class type. + */ +DART_EXPORT Dart_Handle Dart_ClassLibrary(Dart_Handle cls_type); + +/* + * ============================= + * Numbers, Integers and Doubles + * ============================= + */ + +/** + * Does this Integer fit into a 64-bit signed integer? + * + * \param integer An integer. + * \param fits Returns true if the integer fits into a 64-bit signed integer. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_IntegerFitsIntoInt64(Dart_Handle integer, + bool* fits); + +/** + * Does this Integer fit into a 64-bit unsigned integer? + * + * \param integer An integer. + * \param fits Returns true if the integer fits into a 64-bit unsigned integer. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_IntegerFitsIntoUint64(Dart_Handle integer, + bool* fits); + +/** + * Returns an Integer with the provided value. + * + * \param value The value of the integer. + * + * \return The Integer object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewInteger(int64_t value); + +/** + * Returns an Integer with the provided value. + * + * \param value The unsigned value of the integer. + * + * \return The Integer object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewIntegerFromUint64(uint64_t value); + +/** + * Returns an Integer with the provided value. + * + * \param value The value of the integer represented as a C string + * containing a hexadecimal number. + * + * \return The Integer object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewIntegerFromHexCString(const char* value); + +/** + * Gets the value of an Integer. + * + * The integer must fit into a 64-bit signed integer, otherwise an error occurs. + * + * \param integer An Integer. + * \param value Returns the value of the Integer. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_IntegerToInt64(Dart_Handle integer, + int64_t* value); + +/** + * Gets the value of an Integer. + * + * The integer must fit into a 64-bit unsigned integer, otherwise an + * error occurs. + * + * \param integer An Integer. + * \param value Returns the value of the Integer. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_IntegerToUint64(Dart_Handle integer, + uint64_t* value); + +/** + * Gets the value of an integer as a hexadecimal C string. + * + * \param integer An Integer. + * \param value Returns the value of the Integer as a hexadecimal C + * string. This C string is scope allocated and is only valid until + * the next call to Dart_ExitScope. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_IntegerToHexCString(Dart_Handle integer, + const char** value); + +/** + * Returns a Double with the provided value. + * + * \param value A double. + * + * \return The Double object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewDouble(double value); + +/** + * Gets the value of a Double + * + * \param double_obj A Double + * \param value Returns the value of the Double. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_DoubleValue(Dart_Handle double_obj, double* value); + +/** + * Returns a closure of static function 'function_name' in the class 'class_name' + * in the exported namespace of specified 'library'. + * + * \param library Library object + * \param cls_type Type object representing a Class + * \param function_name Name of the static function in the class + * + * \return A valid Dart instance if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_GetStaticMethodClosure(Dart_Handle library, + Dart_Handle cls_type, + Dart_Handle function_name); + +/* + * ======== + * Booleans + * ======== + */ + +/** + * Returns the True object. + * + * Requires there to be a current isolate. + * + * \return A handle to the True object. + */ +DART_EXPORT Dart_Handle Dart_True(void); + +/** + * Returns the False object. + * + * Requires there to be a current isolate. + * + * \return A handle to the False object. + */ +DART_EXPORT Dart_Handle Dart_False(void); + +/** + * Returns a Boolean with the provided value. + * + * \param value true or false. + * + * \return The Boolean object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewBoolean(bool value); + +/** + * Gets the value of a Boolean + * + * \param boolean_obj A Boolean + * \param value Returns the value of the Boolean. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_BooleanValue(Dart_Handle boolean_obj, bool* value); + +/* + * ======= + * Strings + * ======= + */ + +/** + * Gets the length of a String. + * + * \param str A String. + * \param length Returns the length of the String. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_StringLength(Dart_Handle str, intptr_t* length); + +/** + * Gets the length of UTF-8 encoded representation for a string. + * + * \param str A String. + * \param length Returns the length of UTF-8 encoded representation for string. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_StringUTF8Length(Dart_Handle str, + intptr_t* length); + +/** + * Returns a String built from the provided C string + * (There is an implicit assumption that the C string passed in contains + * UTF-8 encoded characters and '\0' is considered as a termination + * character). + * + * \param str A C String + * + * \return The String object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewStringFromCString(const char* str); +/* TODO(turnidge): Document what happens when we run out of memory + * during this call. */ + +/** + * Returns a String built from an array of UTF-8 encoded characters. + * + * \param utf8_array An array of UTF-8 encoded characters. + * \param length The length of the codepoints array. + * + * \return The String object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewStringFromUTF8(const uint8_t* utf8_array, + intptr_t length); + +/** + * Returns a String built from an array of UTF-16 encoded characters. + * + * \param utf16_array An array of UTF-16 encoded characters. + * \param length The length of the codepoints array. + * + * \return The String object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewStringFromUTF16(const uint16_t* utf16_array, + intptr_t length); + +/** + * Returns a String built from an array of UTF-32 encoded characters. + * + * \param utf32_array An array of UTF-32 encoded characters. + * \param length The length of the codepoints array. + * + * \return The String object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewStringFromUTF32(const int32_t* utf32_array, + intptr_t length); + +/** + * Gets the C string representation of a String. + * (It is a sequence of UTF-8 encoded values with a '\0' termination.) + * + * \param str A string. + * \param cstr Returns the String represented as a C string. + * This C string is scope allocated and is only valid until + * the next call to Dart_ExitScope. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_StringToCString(Dart_Handle str, + const char** cstr); + +/** + * Gets a UTF-8 encoded representation of a String. + * + * Any unpaired surrogate code points in the string will be converted as + * replacement characters (U+FFFD, 0xEF 0xBF 0xBD in UTF-8). If you need + * to preserve unpaired surrogates, use the Dart_StringToUTF16 function. + * + * \param str A string. + * \param utf8_array Returns the String represented as UTF-8 code + * units. This UTF-8 array is scope allocated and is only valid + * until the next call to Dart_ExitScope. + * \param length Used to return the length of the array which was + * actually used. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_StringToUTF8(Dart_Handle str, + uint8_t** utf8_array, + intptr_t* length); + +/** + * Copies the UTF-8 encoded representation of a String into specified buffer. + * + * Any unpaired surrogate code points in the string will be converted as + * replacement characters (U+FFFD, 0xEF 0xBF 0xBD in UTF-8). + * + * \param str A string. + * \param utf8_array Buffer into which the UTF-8 encoded representation of + * the string is copied into. + * The buffer is allocated and managed by the caller. + * \param length Specifies the length of the buffer passed in. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_CopyUTF8EncodingOfString(Dart_Handle str, + uint8_t* utf8_array, + intptr_t length); + +/** + * Gets the data corresponding to the string object. This function returns + * the data only for Latin-1 (ISO-8859-1) string objects. For all other + * string objects it returns an error. + * + * \param str A string. + * \param latin1_array An array allocated by the caller, used to return + * the string data. + * \param length Used to pass in the length of the provided array. + * Used to return the length of the array which was actually used. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_StringToLatin1(Dart_Handle str, + uint8_t* latin1_array, + intptr_t* length); + +/** + * Gets the UTF-16 encoded representation of a string. + * + * \param str A string. + * \param utf16_array An array allocated by the caller, used to return + * the array of UTF-16 encoded characters. + * \param length Used to pass in the length of the provided array. + * Used to return the length of the array which was actually used. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_StringToUTF16(Dart_Handle str, + uint16_t* utf16_array, + intptr_t* length); + +/** + * Gets the storage size in bytes of a String. + * + * \param str A String. + * \param size Returns the storage size in bytes of the String. + * This is the size in bytes needed to store the String. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_StringStorageSize(Dart_Handle str, intptr_t* size); + +/** + * Retrieves some properties associated with a String. + * Properties retrieved are: + * - character size of the string (one or two byte) + * - length of the string + * - peer pointer of string if it is an external string. + * \param str A String. + * \param char_size Returns the character size of the String. + * \param str_len Returns the length of the String. + * \param peer Returns the peer pointer associated with the String or 0 if + * there is no peer pointer for it. + * \return Success if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_StringGetProperties(Dart_Handle str, + intptr_t* char_size, + intptr_t* str_len, + void** peer); + +/* + * ===== + * Lists + * ===== + */ + +/** + * Returns a List of the desired length. + * + * \param length The length of the list. + * + * \return The List object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewList(intptr_t length); + +typedef enum { + Dart_CoreType_Dynamic, + Dart_CoreType_Int, + Dart_CoreType_String, +} Dart_CoreType_Id; + +// TODO(bkonyi): convert this to use nullable types once NNBD is enabled. +/** + * Returns a List of the desired length with the desired legacy element type. + * + * \param element_type_id The type of elements of the list. + * \param length The length of the list. + * + * \return The List object if no error occurs. Otherwise returns an error + * handle. + */ +DART_EXPORT Dart_Handle Dart_NewListOf(Dart_CoreType_Id element_type_id, + intptr_t length); + +/** + * Returns a List of the desired length with the desired element type. + * + * \param element_type Handle to a nullable type object. E.g., from + * Dart_GetType or Dart_GetNullableType. + * + * \param length The length of the list. + * + * \return The List object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewListOfType(Dart_Handle element_type, + intptr_t length); + +/** + * Returns a List of the desired length with the desired element type, filled + * with the provided object. + * + * \param element_type Handle to a type object. E.g., from Dart_GetType. + * + * \param fill_object Handle to an object of type 'element_type' that will be + * used to populate the list. This parameter can only be Dart_Null() if the + * length of the list is 0 or 'element_type' is a nullable type. + * + * \param length The length of the list. + * + * \return The List object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewListOfTypeFilled(Dart_Handle element_type, + Dart_Handle fill_object, + intptr_t length); + +/** + * Gets the length of a List. + * + * May generate an unhandled exception error. + * + * \param list A List. + * \param length Returns the length of the List. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_ListLength(Dart_Handle list, intptr_t* length); + +/** + * Gets the Object at some index of a List. + * + * If the index is out of bounds, an error occurs. + * + * May generate an unhandled exception error. + * + * \param list A List. + * \param index A valid index into the List. + * + * \return The Object in the List at the specified index if no error + * occurs. Otherwise returns an error handle. + */ +DART_EXPORT Dart_Handle Dart_ListGetAt(Dart_Handle list, intptr_t index); + +/** +* Gets a range of Objects from a List. +* +* If any of the requested index values are out of bounds, an error occurs. +* +* May generate an unhandled exception error. +* +* \param list A List. +* \param offset The offset of the first item to get. +* \param length The number of items to get. +* \param result A pointer to fill with the objects. +* +* \return Success if no error occurs during the operation. +*/ +DART_EXPORT Dart_Handle Dart_ListGetRange(Dart_Handle list, + intptr_t offset, + intptr_t length, + Dart_Handle* result); + +/** + * Sets the Object at some index of a List. + * + * If the index is out of bounds, an error occurs. + * + * May generate an unhandled exception error. + * + * \param list A List. + * \param index A valid index into the List. + * \param value The Object to put in the List. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_ListSetAt(Dart_Handle list, + intptr_t index, + Dart_Handle value); + +/** + * May generate an unhandled exception error. + */ +DART_EXPORT Dart_Handle Dart_ListGetAsBytes(Dart_Handle list, + intptr_t offset, + uint8_t* native_array, + intptr_t length); + +/** + * May generate an unhandled exception error. + */ +DART_EXPORT Dart_Handle Dart_ListSetAsBytes(Dart_Handle list, + intptr_t offset, + const uint8_t* native_array, + intptr_t length); + +/* + * ==== + * Maps + * ==== + */ + +/** + * Gets the Object at some key of a Map. + * + * May generate an unhandled exception error. + * + * \param map A Map. + * \param key An Object. + * + * \return The value in the map at the specified key, null if the map does not + * contain the key, or an error handle. + */ +DART_EXPORT Dart_Handle Dart_MapGetAt(Dart_Handle map, Dart_Handle key); + +/** + * Returns whether the Map contains a given key. + * + * May generate an unhandled exception error. + * + * \param map A Map. + * + * \return A handle on a boolean indicating whether map contains the key. + * Otherwise returns an error handle. + */ +DART_EXPORT Dart_Handle Dart_MapContainsKey(Dart_Handle map, Dart_Handle key); + +/** + * Gets the list of keys of a Map. + * + * May generate an unhandled exception error. + * + * \param map A Map. + * + * \return The list of key Objects if no error occurs. Otherwise returns an + * error handle. + */ +DART_EXPORT Dart_Handle Dart_MapKeys(Dart_Handle map); + +/* + * ========== + * Typed Data + * ========== + */ + +typedef enum { + Dart_TypedData_kByteData = 0, + Dart_TypedData_kInt8, + Dart_TypedData_kUint8, + Dart_TypedData_kUint8Clamped, + Dart_TypedData_kInt16, + Dart_TypedData_kUint16, + Dart_TypedData_kInt32, + Dart_TypedData_kUint32, + Dart_TypedData_kInt64, + Dart_TypedData_kUint64, + Dart_TypedData_kFloat32, + Dart_TypedData_kFloat64, + Dart_TypedData_kInt32x4, + Dart_TypedData_kFloat32x4, + Dart_TypedData_kFloat64x2, + Dart_TypedData_kInvalid +} Dart_TypedData_Type; + +/** + * Return type if this object is a TypedData object. + * + * \return kInvalid if the object is not a TypedData object or the appropriate + * Dart_TypedData_Type. + */ +DART_EXPORT Dart_TypedData_Type Dart_GetTypeOfTypedData(Dart_Handle object); + +/** + * Return type if this object is an external TypedData object. + * + * \return kInvalid if the object is not an external TypedData object or + * the appropriate Dart_TypedData_Type. + */ +DART_EXPORT Dart_TypedData_Type +Dart_GetTypeOfExternalTypedData(Dart_Handle object); + +/** + * Returns a TypedData object of the desired length and type. + * + * \param type The type of the TypedData object. + * \param length The length of the TypedData object (length in type units). + * + * \return The TypedData object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewTypedData(Dart_TypedData_Type type, + intptr_t length); + +/** + * Returns a TypedData object which references an external data array. + * + * \param type The type of the data array. + * \param data A data array. This array must not move. + * \param length The length of the data array (length in type units). + * + * \return The TypedData object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewExternalTypedData(Dart_TypedData_Type type, + void* data, + intptr_t length); + +/** + * Returns a TypedData object which references an external data array. + * + * \param type The type of the data array. + * \param data A data array. This array must not move. + * \param length The length of the data array (length in type units). + * \param peer A pointer to a native object or NULL. This value is + * provided to callback when it is invoked. + * \param external_allocation_size The number of externally allocated + * bytes for peer. Used to inform the garbage collector. + * \param callback A function pointer that will be invoked sometime + * after the object is garbage collected, unless the handle has been deleted. + * A valid callback needs to be specified it cannot be NULL. + * + * \return The TypedData object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle +Dart_NewExternalTypedDataWithFinalizer(Dart_TypedData_Type type, + void* data, + intptr_t length, + void* peer, + intptr_t external_allocation_size, + Dart_HandleFinalizer callback); +DART_EXPORT Dart_Handle Dart_NewUnmodifiableExternalTypedDataWithFinalizer( + Dart_TypedData_Type type, + const void* data, + intptr_t length, + void* peer, + intptr_t external_allocation_size, + Dart_HandleFinalizer callback); + +/** + * Returns a ByteBuffer object for the typed data. + * + * \param typed_data The TypedData object. + * + * \return The ByteBuffer object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewByteBuffer(Dart_Handle typed_data); + +/** + * Acquires access to the internal data address of a TypedData object. + * + * \param object The typed data object whose internal data address is to + * be accessed. + * \param type The type of the object is returned here. + * \param data The internal data address is returned here. + * \param len Size of the typed array is returned here. + * + * Notes: + * When the internal address of the object is acquired any calls to a + * Dart API function that could potentially allocate an object or run + * any Dart code will return an error. + * + * Any Dart API functions for accessing the data should not be called + * before the corresponding release. In particular, the object should + * not be acquired again before its release. This leads to undefined + * behavior. + * + * \return Success if the internal data address is acquired successfully. + * Otherwise, returns an error handle. + */ +DART_EXPORT Dart_Handle Dart_TypedDataAcquireData(Dart_Handle object, + Dart_TypedData_Type* type, + void** data, + intptr_t* len); + +/** + * Releases access to the internal data address that was acquired earlier using + * Dart_TypedDataAcquireData. + * + * \param object The typed data object whose internal data address is to be + * released. + * + * \return Success if the internal data address is released successfully. + * Otherwise, returns an error handle. + */ +DART_EXPORT Dart_Handle Dart_TypedDataReleaseData(Dart_Handle object); + +/** + * Returns the TypedData object associated with the ByteBuffer object. + * + * \param byte_buffer The ByteBuffer object. + * + * \return The TypedData object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_GetDataFromByteBuffer(Dart_Handle byte_buffer); + +/* + * ============================================================ + * Invoking Constructors, Methods, Closures and Field accessors + * ============================================================ + */ + +/** + * Invokes a constructor, creating a new object. + * + * This function allows hidden constructors (constructors with leading + * underscores) to be called. + * + * \param type Type of object to be constructed. + * \param constructor_name The name of the constructor to invoke. Use + * Dart_Null() or Dart_EmptyString() to invoke the unnamed constructor. + * This name should not include the name of the class. + * \param number_of_arguments Size of the arguments array. + * \param arguments An array of arguments to the constructor. + * + * \return If the constructor is called and completes successfully, + * then the new object. If an error occurs during execution, then an + * error handle is returned. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_New(Dart_Handle type, + Dart_Handle constructor_name, + int number_of_arguments, + Dart_Handle* arguments); + +/** + * Allocate a new object without invoking a constructor. + * + * \param type The type of an object to be allocated. + * + * \return The new object. If an error occurs during execution, then an + * error handle is returned. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_Allocate(Dart_Handle type); + +/** + * Allocate a new object without invoking a constructor, and sets specified + * native fields. + * + * \param type The type of an object to be allocated. + * \param num_native_fields The number of native fields to set. + * \param native_fields An array containing the value of native fields. + * + * \return The new object. If an error occurs during execution, then an + * error handle is returned. + */ +DART_EXPORT Dart_Handle +Dart_AllocateWithNativeFields(Dart_Handle type, + intptr_t num_native_fields, + const intptr_t* native_fields); + +/** + * Invokes a method or function. + * + * The 'target' parameter may be an object, type, or library. If + * 'target' is an object, then this function will invoke an instance + * method. If 'target' is a type, then this function will invoke a + * static method. If 'target' is a library, then this function will + * invoke a top-level function from that library. + * NOTE: This API call cannot be used to invoke methods of a type object. + * + * This function ignores visibility (leading underscores in names). + * + * May generate an unhandled exception error. + * + * \param target An object, type, or library. + * \param name The name of the function or method to invoke. + * \param number_of_arguments Size of the arguments array. + * \param arguments An array of arguments to the function. + * + * \return If the function or method is called and completes + * successfully, then the return value is returned. If an error + * occurs during execution, then an error handle is returned. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_Invoke(Dart_Handle target, + Dart_Handle name, + int number_of_arguments, + Dart_Handle* arguments); +/* TODO(turnidge): Document how to invoke operators. */ + +/** + * Invokes a Closure with the given arguments. + * + * May generate an unhandled exception error. + * + * \return If no error occurs during execution, then the result of + * invoking the closure is returned. If an error occurs during + * execution, then an error handle is returned. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_InvokeClosure(Dart_Handle closure, + int number_of_arguments, + Dart_Handle* arguments); + +/** + * Invokes a Generative Constructor on an object that was previously + * allocated using Dart_Allocate/Dart_AllocateWithNativeFields. + * + * The 'object' parameter must be an object. + * + * This function ignores visibility (leading underscores in names). + * + * May generate an unhandled exception error. + * + * \param object An object. + * \param name The name of the constructor to invoke. + * Use Dart_Null() or Dart_EmptyString() to invoke the unnamed constructor. + * \param number_of_arguments Size of the arguments array. + * \param arguments An array of arguments to the function. + * + * \return If the constructor is called and completes + * successfully, then the object is returned. If an error + * occurs during execution, then an error handle is returned. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_InvokeConstructor(Dart_Handle object, + Dart_Handle name, + int number_of_arguments, + Dart_Handle* arguments); + +/** + * Gets the value of a field. + * + * The 'container' parameter may be an object, type, or library. If + * 'container' is an object, then this function will access an + * instance field. If 'container' is a type, then this function will + * access a static field. If 'container' is a library, then this + * function will access a top-level variable. + * NOTE: This API call cannot be used to access fields of a type object. + * + * This function ignores field visibility (leading underscores in names). + * + * May generate an unhandled exception error. + * + * \param container An object, type, or library. + * \param name A field name. + * + * \return If no error occurs, then the value of the field is + * returned. Otherwise an error handle is returned. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_GetField(Dart_Handle container, Dart_Handle name); + +/** + * Sets the value of a field. + * + * The 'container' parameter may actually be an object, type, or + * library. If 'container' is an object, then this function will + * access an instance field. If 'container' is a type, then this + * function will access a static field. If 'container' is a library, + * then this function will access a top-level variable. + * NOTE: This API call cannot be used to access fields of a type object. + * + * This function ignores field visibility (leading underscores in names). + * + * May generate an unhandled exception error. + * + * \param container An object, type, or library. + * \param name A field name. + * \param value The new field value. + * + * \return A valid handle if no error occurs. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_SetField(Dart_Handle container, Dart_Handle name, Dart_Handle value); + +/* + * ========== + * Exceptions + * ========== + */ + +/* + * TODO(turnidge): Remove these functions from the api and replace all + * uses with Dart_NewUnhandledExceptionError. */ + +/** + * Throws an exception. + * + * This function causes a Dart language exception to be thrown. This + * will proceed in the standard way, walking up Dart frames until an + * appropriate 'catch' block is found, executing 'finally' blocks, + * etc. + * + * If an error handle is passed into this function, the error is + * propagated immediately. See Dart_PropagateError for a discussion + * of error propagation. + * + * If successful, this function does not return. Note that this means + * that the destructors of any stack-allocated C++ objects will not be + * called. If there are no Dart frames on the stack, an error occurs. + * + * \return An error handle if the exception was not thrown. + * Otherwise the function does not return. + */ +DART_EXPORT Dart_Handle Dart_ThrowException(Dart_Handle exception); + +/** + * Rethrows an exception. + * + * Rethrows an exception, unwinding all dart frames on the stack. If + * successful, this function does not return. Note that this means + * that the destructors of any stack-allocated C++ objects will not be + * called. If there are no Dart frames on the stack, an error occurs. + * + * \return An error handle if the exception was not thrown. + * Otherwise the function does not return. + */ +DART_EXPORT Dart_Handle Dart_ReThrowException(Dart_Handle exception, + Dart_Handle stacktrace); + +/* + * =========================== + * Native fields and functions + * =========================== + */ + +/** + * Gets the number of native instance fields in an object. + */ +DART_EXPORT Dart_Handle Dart_GetNativeInstanceFieldCount(Dart_Handle obj, + int* count); + +/** + * Gets the value of a native field. + * + * TODO(turnidge): Document. + */ +DART_EXPORT Dart_Handle Dart_GetNativeInstanceField(Dart_Handle obj, + int index, + intptr_t* value); + +/** + * Sets the value of a native field. + * + * TODO(turnidge): Document. + */ +DART_EXPORT Dart_Handle Dart_SetNativeInstanceField(Dart_Handle obj, + int index, + intptr_t value); + +/** + * The arguments to a native function. + * + * This object is passed to a native function to represent its + * arguments and return value. It allows access to the arguments to a + * native function by index. It also allows the return value of a + * native function to be set. + */ +typedef struct _Dart_NativeArguments* Dart_NativeArguments; + +/** + * Extracts current isolate group data from the native arguments structure. + */ +DART_EXPORT void* Dart_GetNativeIsolateGroupData(Dart_NativeArguments args); + +typedef enum { + Dart_NativeArgument_kBool = 0, + Dart_NativeArgument_kInt32, + Dart_NativeArgument_kUint32, + Dart_NativeArgument_kInt64, + Dart_NativeArgument_kUint64, + Dart_NativeArgument_kDouble, + Dart_NativeArgument_kString, + Dart_NativeArgument_kInstance, + Dart_NativeArgument_kNativeFields, +} Dart_NativeArgument_Type; + +typedef struct _Dart_NativeArgument_Descriptor { + uint8_t type; + uint8_t index; +} Dart_NativeArgument_Descriptor; + +typedef union _Dart_NativeArgument_Value { + bool as_bool; + int32_t as_int32; + uint32_t as_uint32; + int64_t as_int64; + uint64_t as_uint64; + double as_double; + struct { + Dart_Handle dart_str; + void* peer; + } as_string; + struct { + intptr_t num_fields; + intptr_t* values; + } as_native_fields; + Dart_Handle as_instance; +} Dart_NativeArgument_Value; + +enum { + kNativeArgNumberPos = 0, + kNativeArgNumberSize = 8, + kNativeArgTypePos = kNativeArgNumberPos + kNativeArgNumberSize, + kNativeArgTypeSize = 8, +}; + +#define BITMASK(size) ((1 << size) - 1) +#define DART_NATIVE_ARG_DESCRIPTOR(type, position) \ + (((type & BITMASK(kNativeArgTypeSize)) << kNativeArgTypePos) | \ + (position & BITMASK(kNativeArgNumberSize))) + +/** + * Gets the native arguments based on the types passed in and populates + * the passed arguments buffer with appropriate native values. + * + * \param args the Native arguments block passed into the native call. + * \param num_arguments length of argument descriptor array and argument + * values array passed in. + * \param arg_descriptors an array that describes the arguments that + * need to be retrieved. For each argument to be retrieved the descriptor + * contains the argument number (0, 1 etc.) and the argument type + * described using Dart_NativeArgument_Type, e.g: + * DART_NATIVE_ARG_DESCRIPTOR(Dart_NativeArgument_kBool, 1) indicates + * that the first argument is to be retrieved and it should be a boolean. + * \param arg_values array into which the native arguments need to be + * extracted into, the array is allocated by the caller (it could be + * stack allocated to avoid the malloc/free performance overhead). + * + * \return Success if all the arguments could be extracted correctly, + * returns an error handle if there were any errors while extracting the + * arguments (mismatched number of arguments, incorrect types, etc.). + */ +DART_EXPORT Dart_Handle +Dart_GetNativeArguments(Dart_NativeArguments args, + int num_arguments, + const Dart_NativeArgument_Descriptor* arg_descriptors, + Dart_NativeArgument_Value* arg_values); + +/** + * Gets the native argument at some index. + */ +DART_EXPORT Dart_Handle Dart_GetNativeArgument(Dart_NativeArguments args, + int index); +/* TODO(turnidge): Specify the behavior of an out-of-bounds access. */ + +/** + * Gets the number of native arguments. + */ +DART_EXPORT int Dart_GetNativeArgumentCount(Dart_NativeArguments args); + +/** + * Gets all the native fields of the native argument at some index. + * \param args Native arguments structure. + * \param arg_index Index of the desired argument in the structure above. + * \param num_fields size of the intptr_t array 'field_values' passed in. + * \param field_values intptr_t array in which native field values are returned. + * \return Success if the native fields where copied in successfully. Otherwise + * returns an error handle. On success the native field values are copied + * into the 'field_values' array, if the argument at 'arg_index' is a + * null object then 0 is copied as the native field values into the + * 'field_values' array. + */ +DART_EXPORT Dart_Handle +Dart_GetNativeFieldsOfArgument(Dart_NativeArguments args, + int arg_index, + int num_fields, + intptr_t* field_values); + +/** + * Gets the native field of the receiver. + */ +DART_EXPORT Dart_Handle Dart_GetNativeReceiver(Dart_NativeArguments args, + intptr_t* value); + +/** + * Gets a string native argument at some index. + * \param args Native arguments structure. + * \param arg_index Index of the desired argument in the structure above. + * \param peer Returns the peer pointer if the string argument has one. + * \return Success if the string argument has a peer, if it does not + * have a peer then the String object is returned. Otherwise returns + * an error handle (argument is not a String object). + */ +DART_EXPORT Dart_Handle Dart_GetNativeStringArgument(Dart_NativeArguments args, + int arg_index, + void** peer); + +/** + * Gets an integer native argument at some index. + * \param args Native arguments structure. + * \param index Index of the desired argument in the structure above. + * \param value Returns the integer value if the argument is an Integer. + * \return Success if no error occurs. Otherwise returns an error handle. + */ +DART_EXPORT Dart_Handle Dart_GetNativeIntegerArgument(Dart_NativeArguments args, + int index, + int64_t* value); + +/** + * Gets a boolean native argument at some index. + * \param args Native arguments structure. + * \param index Index of the desired argument in the structure above. + * \param value Returns the boolean value if the argument is a Boolean. + * \return Success if no error occurs. Otherwise returns an error handle. + */ +DART_EXPORT Dart_Handle Dart_GetNativeBooleanArgument(Dart_NativeArguments args, + int index, + bool* value); + +/** + * Gets a double native argument at some index. + * \param args Native arguments structure. + * \param index Index of the desired argument in the structure above. + * \param value Returns the double value if the argument is a double. + * \return Success if no error occurs. Otherwise returns an error handle. + */ +DART_EXPORT Dart_Handle Dart_GetNativeDoubleArgument(Dart_NativeArguments args, + int index, + double* value); + +/** + * Sets the return value for a native function. + * + * If retval is an Error handle, then error will be propagated once + * the native functions exits. See Dart_PropagateError for a + * discussion of how different types of errors are propagated. + */ +DART_EXPORT void Dart_SetReturnValue(Dart_NativeArguments args, + Dart_Handle retval); + +DART_EXPORT void Dart_SetWeakHandleReturnValue(Dart_NativeArguments args, + Dart_WeakPersistentHandle rval); + +DART_EXPORT void Dart_SetBooleanReturnValue(Dart_NativeArguments args, + bool retval); + +DART_EXPORT void Dart_SetIntegerReturnValue(Dart_NativeArguments args, + int64_t retval); + +DART_EXPORT void Dart_SetDoubleReturnValue(Dart_NativeArguments args, + double retval); + +/** + * A native function. + */ +typedef void (*Dart_NativeFunction)(Dart_NativeArguments arguments); + +/** + * Native entry resolution callback. + * + * For libraries and scripts which have native functions, the embedder + * can provide a native entry resolver. This callback is used to map a + * name/arity to a Dart_NativeFunction. If no function is found, the + * callback should return NULL. + * + * The parameters to the native resolver function are: + * \param name a Dart string which is the name of the native function. + * \param num_of_arguments is the number of arguments expected by the + * native function. + * \param auto_setup_scope is a boolean flag that can be set by the resolver + * to indicate if this function needs a Dart API scope (see Dart_EnterScope/ + * Dart_ExitScope) to be setup automatically by the VM before calling into + * the native function. By default most native functions would require this + * to be true but some light weight native functions which do not call back + * into the VM through the Dart API may not require a Dart scope to be + * setup automatically. + * + * \return A valid Dart_NativeFunction which resolves to a native entry point + * for the native function. + * + * See Dart_SetNativeResolver. + */ +typedef Dart_NativeFunction (*Dart_NativeEntryResolver)(Dart_Handle name, + int num_of_arguments, + bool* auto_setup_scope); +/* TODO(turnidge): Consider renaming to NativeFunctionResolver or + * NativeResolver. */ + +/** + * Native entry symbol lookup callback. + * + * For libraries and scripts which have native functions, the embedder + * can provide a callback for mapping a native entry to a symbol. This callback + * maps a native function entry PC to the native function name. If no native + * entry symbol can be found, the callback should return NULL. + * + * The parameters to the native reverse resolver function are: + * \param nf A Dart_NativeFunction. + * + * \return A const UTF-8 string containing the symbol name or NULL. + * + * See Dart_SetNativeResolver. + */ +typedef const uint8_t* (*Dart_NativeEntrySymbol)(Dart_NativeFunction nf); + +/** + * FFI Native C function pointer resolver callback. + * + * See Dart_SetFfiNativeResolver. + */ +typedef void* (*Dart_FfiNativeResolver)(const char* name, uintptr_t args_n); + +/* + * =========== + * Environment + * =========== + */ + +/** + * An environment lookup callback function. + * + * \param name The name of the value to lookup in the environment. + * + * \return A valid handle to a string if the name exists in the + * current environment or Dart_Null() if not. + */ +typedef Dart_Handle (*Dart_EnvironmentCallback)(Dart_Handle name); + +/** + * Sets the environment callback for the current isolate. This + * callback is used to lookup environment values by name in the + * current environment. This enables the embedder to supply values for + * the const constructors bool.fromEnvironment, int.fromEnvironment + * and String.fromEnvironment. + */ +DART_EXPORT Dart_Handle +Dart_SetEnvironmentCallback(Dart_EnvironmentCallback callback); + +/** + * Sets the callback used to resolve native functions for a library. + * + * \param library A library. + * \param resolver A native entry resolver. + * + * \return A valid handle if the native resolver was set successfully. + */ +DART_EXPORT Dart_Handle +Dart_SetNativeResolver(Dart_Handle library, + Dart_NativeEntryResolver resolver, + Dart_NativeEntrySymbol symbol); +/* TODO(turnidge): Rename to Dart_LibrarySetNativeResolver? */ + +/** + * Returns the callback used to resolve native functions for a library. + * + * \param library A library. + * \param resolver a pointer to a Dart_NativeEntryResolver + * + * \return A valid handle if the library was found. + */ +DART_EXPORT Dart_Handle +Dart_GetNativeResolver(Dart_Handle library, Dart_NativeEntryResolver* resolver); + +/** + * Returns the callback used to resolve native function symbols for a library. + * + * \param library A library. + * \param resolver a pointer to a Dart_NativeEntrySymbol. + * + * \return A valid handle if the library was found. + */ +DART_EXPORT Dart_Handle Dart_GetNativeSymbol(Dart_Handle library, + Dart_NativeEntrySymbol* resolver); + +/** + * Sets the callback used to resolve FFI native functions for a library. + * The resolved functions are expected to be a C function pointer of the + * correct signature (as specified in the `@Native()` function + * annotation in Dart code). + * + * NOTE: This is an experimental feature and might change in the future. + * + * \param library A library. + * \param resolver A native function resolver. + * + * \return A valid handle if the native resolver was set successfully. + */ +DART_EXPORT Dart_Handle +Dart_SetFfiNativeResolver(Dart_Handle library, Dart_FfiNativeResolver resolver); + +/* + * ===================== + * Scripts and Libraries + * ===================== + */ + +typedef enum { + Dart_kCanonicalizeUrl = 0, + Dart_kImportTag, + Dart_kKernelTag, +} Dart_LibraryTag; + +/** + * The library tag handler is a multi-purpose callback provided by the + * embedder to the Dart VM. The embedder implements the tag handler to + * provide the ability to load Dart scripts and imports. + * + * -- TAGS -- + * + * Dart_kCanonicalizeUrl + * + * This tag indicates that the embedder should canonicalize 'url' with + * respect to 'library'. For most embedders, the + * Dart_DefaultCanonicalizeUrl function is a sufficient implementation + * of this tag. The return value should be a string holding the + * canonicalized url. + * + * Dart_kImportTag + * + * This tag is used to load a library from IsolateMirror.loadUri. The embedder + * should call Dart_LoadLibraryFromKernel to provide the library to the VM. The + * return value should be an error or library (the result from + * Dart_LoadLibraryFromKernel). + * + * Dart_kKernelTag + * + * This tag is used to load the intermediate file (kernel) generated by + * the Dart front end. This tag is typically used when a 'hot-reload' + * of an application is needed and the VM is 'use dart front end' mode. + * The dart front end typically compiles all the scripts, imports and part + * files into one intermediate file hence we don't use the source/import or + * script tags. The return value should be an error or a TypedData containing + * the kernel bytes. + * + */ +typedef Dart_Handle (*Dart_LibraryTagHandler)( + Dart_LibraryTag tag, + Dart_Handle library_or_package_map_url, + Dart_Handle url); + +/** + * Sets library tag handler for the current isolate. This handler is + * used to handle the various tags encountered while loading libraries + * or scripts in the isolate. + * + * \param handler Handler code to be used for handling the various tags + * encountered while loading libraries or scripts in the isolate. + * + * \return If no error occurs, the handler is set for the isolate. + * Otherwise an error handle is returned. + * + * TODO(turnidge): Document. + */ +DART_EXPORT Dart_Handle +Dart_SetLibraryTagHandler(Dart_LibraryTagHandler handler); + +/** + * Handles deferred loading requests. When this handler is invoked, it should + * eventually load the deferred loading unit with the given id and call + * Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError. It is + * recommended that the loading occur asynchronously, but it is permitted to + * call Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError before the + * handler returns. + * + * If an error is returned, it will be propagated through + * `prefix.loadLibrary()`. This is useful for synchronous + * implementations, which must propagate any unwind errors from + * Dart_DeferredLoadComplete or Dart_DeferredLoadComplete. Otherwise the handler + * should return a non-error such as `Dart_Null()`. + */ +typedef Dart_Handle (*Dart_DeferredLoadHandler)(intptr_t loading_unit_id); + +/** + * Sets the deferred load handler for the current isolate. This handler is + * used to handle loading deferred imports in an AppJIT or AppAOT program. + */ +DART_EXPORT Dart_Handle +Dart_SetDeferredLoadHandler(Dart_DeferredLoadHandler handler); + +/** + * Notifies the VM that a deferred load completed successfully. This function + * will eventually cause the corresponding `prefix.loadLibrary()` futures to + * complete. + * + * Requires the current isolate to be the same current isolate during the + * invocation of the Dart_DeferredLoadHandler. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_DeferredLoadComplete(intptr_t loading_unit_id, + const uint8_t* snapshot_data, + const uint8_t* snapshot_instructions); + +/** + * Notifies the VM that a deferred load failed. This function + * will eventually cause the corresponding `prefix.loadLibrary()` futures to + * complete with an error. + * + * If `transient` is true, future invocations of `prefix.loadLibrary()` will + * trigger new load requests. If false, futures invocation will complete with + * the same error. + * + * Requires the current isolate to be the same current isolate during the + * invocation of the Dart_DeferredLoadHandler. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_DeferredLoadCompleteError(intptr_t loading_unit_id, + const char* error_message, + bool transient); + +/** + * Canonicalizes a url with respect to some library. + * + * The url is resolved with respect to the library's url and some url + * normalizations are performed. + * + * This canonicalization function should be sufficient for most + * embedders to implement the Dart_kCanonicalizeUrl tag. + * + * \param base_url The base url relative to which the url is + * being resolved. + * \param url The url being resolved and canonicalized. This + * parameter is a string handle. + * + * \return If no error occurs, a String object is returned. Otherwise + * an error handle is returned. + */ +DART_EXPORT Dart_Handle Dart_DefaultCanonicalizeUrl(Dart_Handle base_url, + Dart_Handle url); + +/** + * Loads the root library for the current isolate. + * + * Requires there to be no current root library. + * + * \param kernel_buffer A buffer which contains a kernel binary (see + * pkg/kernel/binary.md). Must remain valid until isolate group shutdown. + * \param kernel_size Length of the passed in buffer. + * + * \return A handle to the root library, or an error. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_LoadScriptFromKernel(const uint8_t* kernel_buffer, intptr_t kernel_size); + +/** + * Gets the library for the root script for the current isolate. + * + * If the root script has not yet been set for the current isolate, + * this function returns Dart_Null(). This function never returns an + * error handle. + * + * \return Returns the root Library for the current isolate or Dart_Null(). + */ +DART_EXPORT Dart_Handle Dart_RootLibrary(void); + +/** + * Sets the root library for the current isolate. + * + * \return Returns an error handle if `library` is not a library handle. + */ +DART_EXPORT Dart_Handle Dart_SetRootLibrary(Dart_Handle library); + +/** + * Lookup or instantiate a legacy type by name and type arguments from a + * Library. + * + * \param library The library containing the class or interface. + * \param class_name The class name for the type. + * \param number_of_type_arguments Number of type arguments. + * For non parametric types the number of type arguments would be 0. + * \param type_arguments Pointer to an array of type arguments. + * For non parametric types a NULL would be passed in for this argument. + * + * \return If no error occurs, the type is returned. + * Otherwise an error handle is returned. + */ +DART_EXPORT Dart_Handle Dart_GetType(Dart_Handle library, + Dart_Handle class_name, + intptr_t number_of_type_arguments, + Dart_Handle* type_arguments); + +/** + * Lookup or instantiate a nullable type by name and type arguments from + * Library. + * + * \param library The library containing the class or interface. + * \param class_name The class name for the type. + * \param number_of_type_arguments Number of type arguments. + * For non parametric types the number of type arguments would be 0. + * \param type_arguments Pointer to an array of type arguments. + * For non parametric types a NULL would be passed in for this argument. + * + * \return If no error occurs, the type is returned. + * Otherwise an error handle is returned. + */ +DART_EXPORT Dart_Handle Dart_GetNullableType(Dart_Handle library, + Dart_Handle class_name, + intptr_t number_of_type_arguments, + Dart_Handle* type_arguments); + +/** + * Lookup or instantiate a non-nullable type by name and type arguments from + * Library. + * + * \param library The library containing the class or interface. + * \param class_name The class name for the type. + * \param number_of_type_arguments Number of type arguments. + * For non parametric types the number of type arguments would be 0. + * \param type_arguments Pointer to an array of type arguments. + * For non parametric types a NULL would be passed in for this argument. + * + * \return If no error occurs, the type is returned. + * Otherwise an error handle is returned. + */ +DART_EXPORT Dart_Handle +Dart_GetNonNullableType(Dart_Handle library, + Dart_Handle class_name, + intptr_t number_of_type_arguments, + Dart_Handle* type_arguments); + +/** + * Creates a nullable version of the provided type. + * + * \param type The type to be converted to a nullable type. + * + * \return If no error occurs, a nullable type is returned. + * Otherwise an error handle is returned. + */ +DART_EXPORT Dart_Handle Dart_TypeToNullableType(Dart_Handle type); + +/** + * Creates a non-nullable version of the provided type. + * + * \param type The type to be converted to a non-nullable type. + * + * \return If no error occurs, a non-nullable type is returned. + * Otherwise an error handle is returned. + */ +DART_EXPORT Dart_Handle Dart_TypeToNonNullableType(Dart_Handle type); + +/** + * A type's nullability. + * + * \param type A Dart type. + * \param result An out parameter containing the result of the check. True if + * the type is of the specified nullability, false otherwise. + * + * \return Returns an error handle if type is not of type Type. + */ +DART_EXPORT Dart_Handle Dart_IsNullableType(Dart_Handle type, bool* result); +DART_EXPORT Dart_Handle Dart_IsNonNullableType(Dart_Handle type, bool* result); +DART_EXPORT Dart_Handle Dart_IsLegacyType(Dart_Handle type, bool* result); + +/** + * Lookup a class or interface by name from a Library. + * + * \param library The library containing the class or interface. + * \param class_name The name of the class or interface. + * + * \return If no error occurs, the class or interface is + * returned. Otherwise an error handle is returned. + */ +DART_EXPORT Dart_Handle Dart_GetClass(Dart_Handle library, + Dart_Handle class_name); +/* TODO(asiva): The above method needs to be removed once all uses + * of it are removed from the embedder code. */ + +/** + * Returns an import path to a Library, such as "file:///test.dart" or + * "dart:core". + */ +DART_EXPORT Dart_Handle Dart_LibraryUrl(Dart_Handle library); + +/** + * Returns a URL from which a Library was loaded. + */ +DART_EXPORT Dart_Handle Dart_LibraryResolvedUrl(Dart_Handle library); + +/** + * \return An array of libraries. + */ +DART_EXPORT Dart_Handle Dart_GetLoadedLibraries(void); + +DART_EXPORT Dart_Handle Dart_LookupLibrary(Dart_Handle url); +/* TODO(turnidge): Consider returning Dart_Null() when the library is + * not found to distinguish that from a true error case. */ + +/** + * Report an loading error for the library. + * + * \param library The library that failed to load. + * \param error The Dart error instance containing the load error. + * + * \return If the VM handles the error, the return value is + * a null handle. If it doesn't handle the error, the error + * object is returned. + */ +DART_EXPORT Dart_Handle Dart_LibraryHandleError(Dart_Handle library, + Dart_Handle error); + +/** + * Called by the embedder to load a partial program. Does not set the root + * library. + * + * \param kernel_buffer A buffer which contains a kernel binary (see + * pkg/kernel/binary.md). Must remain valid until isolate shutdown. + * \param kernel_buffer_size Length of the passed in buffer. + * + * \return A handle to the main library of the compilation unit, or an error. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_LoadLibraryFromKernel(const uint8_t* kernel_buffer, + intptr_t kernel_buffer_size); +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_LoadLibrary(Dart_Handle kernel_buffer); + +/** + * Indicates that all outstanding load requests have been satisfied. + * This finalizes all the new classes loaded and optionally completes + * deferred library futures. + * + * Requires there to be a current isolate. + * + * \param complete_futures Specify true if all deferred library + * futures should be completed, false otherwise. + * + * \return Success if all classes have been finalized and deferred library + * futures are completed. Otherwise, returns an error. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_FinalizeLoading(bool complete_futures); + +/* + * ===== + * Peers + * ===== + */ + +/** + * The peer field is a lazily allocated field intended for storage of + * an uncommonly used values. Most instances types can have a peer + * field allocated. The exceptions are subtypes of Null, num, and + * bool. + */ + +/** + * Returns the value of peer field of 'object' in 'peer'. + * + * \param object An object. + * \param peer An out parameter that returns the value of the peer + * field. + * + * \return Returns an error if 'object' is a subtype of Null, num, or + * bool. + */ +DART_EXPORT Dart_Handle Dart_GetPeer(Dart_Handle object, void** peer); + +/** + * Sets the value of the peer field of 'object' to the value of + * 'peer'. + * + * \param object An object. + * \param peer A value to store in the peer field. + * + * \return Returns an error if 'object' is a subtype of Null, num, or + * bool. + */ +DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); + +/* + * ====== + * Kernel + * ====== + */ + +/** + * Experimental support for Dart to Kernel parser isolate. + * + * TODO(hausner): Document finalized interface. + * + */ + +// TODO(33433): Remove kernel service from the embedding API. + +typedef enum { + Dart_KernelCompilationStatus_Unknown = -1, + Dart_KernelCompilationStatus_Ok = 0, + Dart_KernelCompilationStatus_Error = 1, + Dart_KernelCompilationStatus_Crash = 2, + Dart_KernelCompilationStatus_MsgFailed = 3, +} Dart_KernelCompilationStatus; + +typedef struct { + Dart_KernelCompilationStatus status; + char* error; + uint8_t* kernel; + intptr_t kernel_size; +} Dart_KernelCompilationResult; + +typedef enum { + Dart_KernelCompilationVerbosityLevel_Error = 0, + Dart_KernelCompilationVerbosityLevel_Warning, + Dart_KernelCompilationVerbosityLevel_Info, + Dart_KernelCompilationVerbosityLevel_All, +} Dart_KernelCompilationVerbosityLevel; + +DART_EXPORT bool Dart_IsKernelIsolate(Dart_Isolate isolate); +DART_EXPORT bool Dart_KernelIsolateIsRunning(void); +DART_EXPORT Dart_Port Dart_KernelPort(void); + +/** + * 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 embed_sources Set to `true` when sources should be embedded in the + * kernel file. + * + * \param verbosity Specifies the logging behavior of the kernel compilation + * service. + * + * \return Returns the result of the compilation. + * + * On a successful compilation the returned [Dart_KernelCompilationResult] has + * a status of [Dart_KernelCompilationStatus_Ok] and the `kernel`/`kernel_size` + * fields are set. The caller takes ownership of the malloc()ed buffer. + * + * On a failed compilation the `error` might be set describing the reason for + * the failed compilation. The caller takes ownership of the malloc()ed + * error. + * + * Requires there to be a current isolate. + */ +DART_EXPORT Dart_KernelCompilationResult +Dart_CompileToKernel(const char* script_uri, + const uint8_t* platform_kernel, + const intptr_t platform_kernel_size, + bool incremental_compile, + bool snapshot_compile, + bool embed_sources, + const char* package_config, + Dart_KernelCompilationVerbosityLevel verbosity); + +typedef struct { + const char* uri; + const char* source; +} Dart_SourceFile; + +DART_EXPORT Dart_KernelCompilationResult Dart_KernelListDependencies(void); + +/** + * Sets the kernel buffer which will be used to load Dart SDK sources + * dynamically at runtime. + * + * \param platform_kernel A buffer containing kernel which has sources for the + * Dart SDK populated. Note: The VM does not take ownership of this memory. + * + * \param platform_kernel_size The length of the platform_kernel buffer. + */ +DART_EXPORT void Dart_SetDartLibrarySourcesKernel( + const uint8_t* platform_kernel, + const intptr_t platform_kernel_size); + +/** + * Always return true as the VM only supports strong null safety. + */ +DART_EXPORT bool Dart_DetectNullSafety(const char* script_uri, + const char* package_config, + const char* original_working_directory, + const uint8_t* snapshot_data, + const uint8_t* snapshot_instructions, + const uint8_t* kernel_buffer, + intptr_t kernel_buffer_size); + +#define DART_KERNEL_ISOLATE_NAME "kernel-service" + +/* + * ======= + * Service + * ======= + */ + +#define DART_VM_SERVICE_ISOLATE_NAME "vm-service" + +/** + * Returns true if isolate is the service isolate. + * + * \param isolate An isolate + * + * \return Returns true if 'isolate' is the service isolate. + */ +DART_EXPORT bool Dart_IsServiceIsolate(Dart_Isolate isolate); + +/** + * Writes the CPU profile to the timeline as a series of 'instant' events. + * + * Note that this is an expensive operation. + * + * \param main_port The main port of the Isolate whose profile samples to write. + * \param error An optional error, must be free()ed by caller. + * + * \return Returns true if the profile is successfully written and false + * otherwise. + */ +DART_EXPORT bool Dart_WriteProfileToTimeline(Dart_Port main_port, char** error); + +/* + * ============== + * Precompilation + * ============== + */ + +/** + * Compiles all functions reachable from entry points and marks + * the isolate to disallow future compilation. + * + * Entry points should be specified using `@pragma("vm:entry-point")` + * annotation. + * + * \return An error handle if a compilation error or runtime error running const + * constructors was encountered. + */ +DART_EXPORT Dart_Handle Dart_Precompile(void); + +typedef void (*Dart_CreateLoadingUnitCallback)( + void* callback_data, + intptr_t loading_unit_id, + void** write_callback_data, + void** write_debug_callback_data); +typedef void (*Dart_StreamingWriteCallback)(void* callback_data, + const uint8_t* buffer, + intptr_t size); +typedef void (*Dart_StreamingCloseCallback)(void* callback_data); + +DART_EXPORT Dart_Handle Dart_LoadingUnitLibraryUris(intptr_t loading_unit_id); + +// On Darwin systems, 'dlsym' adds an '_' to the beginning of the symbol name. +// Use the '...CSymbol' definitions for resolving through 'dlsym'. The actual +// symbol names in the objects are given by the '...AsmSymbol' definitions. +#if defined(__APPLE__) +#define kSnapshotBuildIdCSymbol "kDartSnapshotBuildId" +#define kVmSnapshotDataCSymbol "kDartVmSnapshotData" +#define kVmSnapshotInstructionsCSymbol "kDartVmSnapshotInstructions" +#define kVmSnapshotBssCSymbol "kDartVmSnapshotBss" +#define kIsolateSnapshotDataCSymbol "kDartIsolateSnapshotData" +#define kIsolateSnapshotInstructionsCSymbol "kDartIsolateSnapshotInstructions" +#define kIsolateSnapshotBssCSymbol "kDartIsolateSnapshotBss" +#else +#define kSnapshotBuildIdCSymbol "_kDartSnapshotBuildId" +#define kVmSnapshotDataCSymbol "_kDartVmSnapshotData" +#define kVmSnapshotInstructionsCSymbol "_kDartVmSnapshotInstructions" +#define kVmSnapshotBssCSymbol "_kDartVmSnapshotBss" +#define kIsolateSnapshotDataCSymbol "_kDartIsolateSnapshotData" +#define kIsolateSnapshotInstructionsCSymbol "_kDartIsolateSnapshotInstructions" +#define kIsolateSnapshotBssCSymbol "_kDartIsolateSnapshotBss" +#endif + +#define kSnapshotBuildIdAsmSymbol "_kDartSnapshotBuildId" +#define kVmSnapshotDataAsmSymbol "_kDartVmSnapshotData" +#define kVmSnapshotInstructionsAsmSymbol "_kDartVmSnapshotInstructions" +#define kVmSnapshotBssAsmSymbol "_kDartVmSnapshotBss" +#define kIsolateSnapshotDataAsmSymbol "_kDartIsolateSnapshotData" +#define kIsolateSnapshotInstructionsAsmSymbol \ + "_kDartIsolateSnapshotInstructions" +#define kIsolateSnapshotBssAsmSymbol "_kDartIsolateSnapshotBss" + +/** + * Creates a precompiled snapshot. + * - A root library must have been loaded. + * - Dart_Precompile must have been called. + * + * Outputs an assembly file defining the symbols listed in the definitions + * above. + * + * The assembly should be compiled as a static or shared library and linked or + * loaded by the embedder. Running this snapshot requires a VM compiled with + * DART_PRECOMPILED_SNAPSHOT. The kDartVmSnapshotData and + * kDartVmSnapshotInstructions should be passed to Dart_Initialize. The + * kDartIsolateSnapshotData and kDartIsolateSnapshotInstructions should be + * passed to Dart_CreateIsolateGroup. + * + * The callback will be invoked one or more times to provide the assembly code. + * + * If stripped is true, then the assembly code will not include DWARF + * debugging sections. + * + * If debug_callback_data is provided, debug_callback_data will be used with + * the callback to provide separate debugging information. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_CreateAppAOTSnapshotAsAssembly(Dart_StreamingWriteCallback callback, + void* callback_data, + bool stripped, + void* debug_callback_data); +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_CreateAppAOTSnapshotAsAssemblies( + Dart_CreateLoadingUnitCallback next_callback, + void* next_callback_data, + bool stripped, + Dart_StreamingWriteCallback write_callback, + Dart_StreamingCloseCallback close_callback); + +/** + * Creates a precompiled snapshot. + * - A root library must have been loaded. + * - Dart_Precompile must have been called. + * + * Outputs an ELF shared library defining the symbols + * - _kDartVmSnapshotData + * - _kDartVmSnapshotInstructions + * - _kDartIsolateSnapshotData + * - _kDartIsolateSnapshotInstructions + * + * The shared library should be dynamically loaded by the embedder. + * Running this snapshot requires a VM compiled with DART_PRECOMPILED_SNAPSHOT. + * The kDartVmSnapshotData and kDartVmSnapshotInstructions should be passed to + * Dart_Initialize. The kDartIsolateSnapshotData and + * kDartIsolateSnapshotInstructions should be passed to Dart_CreateIsolate. + * + * The callback will be invoked one or more times to provide the binary output. + * + * If stripped is true, then the binary output will not include DWARF + * debugging sections. + * + * If debug_callback_data is provided, debug_callback_data will be used with + * the callback to provide separate debugging information. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_CreateAppAOTSnapshotAsElf(Dart_StreamingWriteCallback callback, + void* callback_data, + bool stripped, + void* debug_callback_data); +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_CreateAppAOTSnapshotAsElfs(Dart_CreateLoadingUnitCallback next_callback, + void* next_callback_data, + bool stripped, + Dart_StreamingWriteCallback write_callback, + Dart_StreamingCloseCallback close_callback); + +/** + * Like Dart_CreateAppAOTSnapshotAsAssembly, but only includes + * kDartVmSnapshotData and kDartVmSnapshotInstructions. It also does + * not strip DWARF information from the generated assembly or allow for + * separate debug information. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_CreateVMAOTSnapshotAsAssembly(Dart_StreamingWriteCallback callback, + void* callback_data); + +/** + * Sorts the class-ids in depth first traversal order of the inheritance + * tree. This is a costly operation, but it can make method dispatch + * more efficient and is done before writing snapshots. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_SortClasses(void); + +/** + * Creates a snapshot that caches compiled code and type feedback for faster + * startup and quicker warmup in a subsequent process. + * + * Outputs a snapshot in two pieces. The pieces should be passed to + * Dart_CreateIsolateGroup in a VM using the same VM snapshot pieces used in the + * current VM. The instructions piece must be loaded with read and execute + * permissions; the data piece may be loaded as read-only. + * + * - Requires the VM to have not been started with --precompilation. + * - Not supported when targeting IA32. + * - The VM writing the snapshot and the VM reading the snapshot must be the + * same version, must be built in the same DEBUG/RELEASE/PRODUCT mode, must + * be targeting the same architecture, and must both be in checked mode or + * both in unchecked mode. + * + * The buffers are scope allocated and are only valid until the next call to + * Dart_ExitScope. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_CreateAppJITSnapshotAsBlobs(uint8_t** isolate_snapshot_data_buffer, + intptr_t* isolate_snapshot_data_size, + uint8_t** isolate_snapshot_instructions_buffer, + intptr_t* isolate_snapshot_instructions_size); + +/** + * Get obfuscation map for precompiled code. + * + * Obfuscation map is encoded as a JSON array of pairs (original name, + * obfuscated name). + * + * \return Returns an error handler if the VM was built in a mode that does not + * support obfuscation. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_GetObfuscationMap(uint8_t** buffer, intptr_t* buffer_length); + +/** + * Returns whether the VM only supports running from precompiled snapshots and + * not from any other kind of snapshot or from source (that is, the VM was + * compiled with DART_PRECOMPILED_RUNTIME). + */ +DART_EXPORT bool Dart_IsPrecompiledRuntime(void); + +/** + * Print a native stack trace. Used for crash handling. + * + * If context is NULL, prints the current stack trace. Otherwise, context + * should be a CONTEXT* (Windows) or ucontext_t* (POSIX) from a signal handler + * running on the current thread. + */ +DART_EXPORT void Dart_DumpNativeStackTrace(void* context); + +/** + * Indicate that the process is about to abort, and the Dart VM should not + * attempt to cleanup resources. + */ +DART_EXPORT void Dart_PrepareToAbort(void); + +/** + * Callback provided by the embedder that is used by the VM to + * produce footnotes appended to DWARF stack traces. + * + * Whenever VM formats a stack trace as a string it would call this callback + * passing raw program counters for each frame in the stack trace. + * + * Embedder can then return a string which if not-null will be appended to the + * formatted stack trace. + * + * Returned string is expected to be `malloc()` allocated. VM takes ownership + * of the returned string and will `free()` it. + * + * \param addresses raw program counter addresses for each frame + * \param count number of elements in the addresses array + */ +typedef char* (*Dart_DwarfStackTraceFootnoteCallback)(void* addresses[], + intptr_t count); + +/** + * Configure DWARF stack trace footnote callback. + */ +DART_EXPORT void Dart_SetDwarfStackTraceFootnoteCallback( + Dart_DwarfStackTraceFootnoteCallback callback); + +#endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ diff --git a/pkgs/objective_c/src/include/dart_api_dl.c b/pkgs/objective_c/src/include/dart_api_dl.c new file mode 100644 index 0000000000..48fb54e7b9 --- /dev/null +++ b/pkgs/objective_c/src/include/dart_api_dl.c @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file + * for details. All rights reserved. Use of this source code is governed by a + * BSD-style license that can be found in the LICENSE file. + */ + +#include "dart_api_dl.h" /* NOLINT */ +#include "dart_version.h" /* NOLINT */ +#include "internal/dart_api_dl_impl.h" /* NOLINT */ + +#include +#include + +#define DART_API_DL_DEFINITIONS(name, R, A) name##_Type name##_DL = NULL; + +DART_API_ALL_DL_SYMBOLS(DART_API_DL_DEFINITIONS) +DART_API_DEPRECATED_DL_SYMBOLS(DART_API_DL_DEFINITIONS) + +#undef DART_API_DL_DEFINITIONS + +typedef void* DartApiEntry_function; + +DartApiEntry_function FindFunctionPointer(const DartApiEntry* entries, + const char* name) { + while (entries->name != NULL) { + if (strcmp(entries->name, name) == 0) return entries->function; + entries++; + } + return NULL; +} + +DART_EXPORT void Dart_UpdateExternalSize_Deprecated( + Dart_WeakPersistentHandle object, intptr_t external_size) { + printf("Dart_UpdateExternalSize is a nop, it has been deprecated\n"); +} + +DART_EXPORT void Dart_UpdateFinalizableExternalSize_Deprecated( + Dart_FinalizableHandle object, + Dart_Handle strong_ref_to_object, + intptr_t external_allocation_size) { + printf("Dart_UpdateFinalizableExternalSize is a nop, " + "it has been deprecated\n"); +} + +intptr_t Dart_InitializeApiDL(void* data) { + DartApi* dart_api_data = (DartApi*)data; + + if (dart_api_data->major != DART_API_DL_MAJOR_VERSION) { + // If the DartVM we're running on does not have the same version as this + // file was compiled against, refuse to initialize. The symbols are not + // compatible. + return -1; + } + // Minor versions are allowed to be different. + // If the DartVM has a higher minor version, it will provide more symbols + // than we initialize here. + // If the DartVM has a lower minor version, it will not provide all symbols. + // In that case, we leave the missing symbols un-initialized. Those symbols + // should not be used by the Dart and native code. The client is responsible + // for checking the minor version number himself based on which symbols it + // is using. + // (If we would error out on this case, recompiling native code against a + // newer SDK would break all uses on older SDKs, which is too strict.) + + const DartApiEntry* dart_api_function_pointers = dart_api_data->functions; + +#define DART_API_DL_INIT(name, R, A) \ + name##_DL = \ + (name##_Type)(FindFunctionPointer(dart_api_function_pointers, #name)); + DART_API_ALL_DL_SYMBOLS(DART_API_DL_INIT) +#undef DART_API_DL_INIT + +#define DART_API_DEPRECATED_DL_INIT(name, R, A) \ + name##_DL = name##_Deprecated; + DART_API_DEPRECATED_DL_SYMBOLS(DART_API_DEPRECATED_DL_INIT) +#undef DART_API_DEPRECATED_DL_INIT + + return 0; +} diff --git a/pkgs/objective_c/src/include/dart_api_dl.h b/pkgs/objective_c/src/include/dart_api_dl.h new file mode 100644 index 0000000000..5088b4337c --- /dev/null +++ b/pkgs/objective_c/src/include/dart_api_dl.h @@ -0,0 +1,165 @@ +/* + * Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file + * for details. All rights reserved. Use of this source code is governed by a + * BSD-style license that can be found in the LICENSE file. + */ + +#ifndef RUNTIME_INCLUDE_DART_API_DL_H_ +#define RUNTIME_INCLUDE_DART_API_DL_H_ + +#include "dart_api.h" /* NOLINT */ +#include "dart_native_api.h" /* NOLINT */ + +/** \mainpage Dynamically Linked Dart API + * + * This exposes a subset of symbols from dart_api.h and dart_native_api.h + * available in every Dart embedder through dynamic linking. + * + * All symbols are postfixed with _DL to indicate that they are dynamically + * linked and to prevent conflicts with the original symbol. + * + * Link `dart_api_dl.c` file into your library and invoke + * `Dart_InitializeApiDL` with `NativeApi.initializeApiDLData`. + * + * Returns 0 on success. + */ + +DART_EXPORT intptr_t Dart_InitializeApiDL(void* data); + +// ============================================================================ +// IMPORTANT! Never update these signatures without properly updating +// DART_API_DL_MAJOR_VERSION and DART_API_DL_MINOR_VERSION. +// +// Verbatim copy of `dart_native_api.h` and `dart_api.h` symbol names and types +// to trigger compile-time errors if the symbols in those files are updated +// without updating these. +// +// Function return and argument types, and typedefs are carbon copied. Structs +// are typechecked nominally in C/C++, so they are not copied, instead a +// comment is added to their definition. +typedef int64_t Dart_Port_DL; + +typedef void (*Dart_NativeMessageHandler_DL)(Dart_Port_DL dest_port_id, + Dart_CObject* message); + +// dart_native_api.h symbols can be called on any thread. +#define DART_NATIVE_API_DL_SYMBOLS(F) \ + /***** dart_native_api.h *****/ \ + /* Dart_Port */ \ + F(Dart_PostCObject, bool, (Dart_Port_DL port_id, Dart_CObject * message)) \ + F(Dart_PostInteger, bool, (Dart_Port_DL port_id, int64_t message)) \ + F(Dart_NewNativePort, Dart_Port_DL, \ + (const char* name, Dart_NativeMessageHandler_DL handler, \ + bool handle_concurrently)) \ + F(Dart_CloseNativePort, bool, (Dart_Port_DL native_port_id)) + +// dart_api.h symbols can only be called on Dart threads. +#define DART_API_DL_SYMBOLS(F) \ + /***** dart_api.h *****/ \ + /* Errors */ \ + F(Dart_IsError, bool, (Dart_Handle handle)) \ + F(Dart_IsApiError, bool, (Dart_Handle handle)) \ + F(Dart_IsUnhandledExceptionError, bool, (Dart_Handle handle)) \ + F(Dart_IsCompilationError, bool, (Dart_Handle handle)) \ + F(Dart_IsFatalError, bool, (Dart_Handle handle)) \ + F(Dart_GetError, const char*, (Dart_Handle handle)) \ + F(Dart_ErrorHasException, bool, (Dart_Handle handle)) \ + F(Dart_ErrorGetException, Dart_Handle, (Dart_Handle handle)) \ + F(Dart_ErrorGetStackTrace, Dart_Handle, (Dart_Handle handle)) \ + F(Dart_NewApiError, Dart_Handle, (const char* error)) \ + F(Dart_NewCompilationError, Dart_Handle, (const char* error)) \ + F(Dart_NewUnhandledExceptionError, Dart_Handle, (Dart_Handle exception)) \ + F(Dart_PropagateError, void, (Dart_Handle handle)) \ + /* Dart_Handle, Dart_PersistentHandle, Dart_WeakPersistentHandle */ \ + F(Dart_HandleFromPersistent, Dart_Handle, (Dart_PersistentHandle object)) \ + F(Dart_HandleFromWeakPersistent, Dart_Handle, \ + (Dart_WeakPersistentHandle object)) \ + F(Dart_NewPersistentHandle, Dart_PersistentHandle, (Dart_Handle object)) \ + F(Dart_SetPersistentHandle, void, \ + (Dart_PersistentHandle obj1, Dart_Handle obj2)) \ + F(Dart_DeletePersistentHandle, void, (Dart_PersistentHandle object)) \ + F(Dart_NewWeakPersistentHandle, Dart_WeakPersistentHandle, \ + (Dart_Handle object, void* peer, intptr_t external_allocation_size, \ + Dart_HandleFinalizer callback)) \ + F(Dart_DeleteWeakPersistentHandle, void, (Dart_WeakPersistentHandle object)) \ + F(Dart_NewFinalizableHandle, Dart_FinalizableHandle, \ + (Dart_Handle object, void* peer, intptr_t external_allocation_size, \ + Dart_HandleFinalizer callback)) \ + F(Dart_DeleteFinalizableHandle, void, \ + (Dart_FinalizableHandle object, Dart_Handle strong_ref_to_object)) \ + /* Isolates */ \ + F(Dart_CurrentIsolate, Dart_Isolate, (void)) \ + F(Dart_ExitIsolate, void, (void)) \ + F(Dart_EnterIsolate, void, (Dart_Isolate)) \ + /* Dart_Port */ \ + F(Dart_Post, bool, (Dart_Port_DL port_id, Dart_Handle object)) \ + F(Dart_NewSendPort, Dart_Handle, (Dart_Port_DL port_id)) \ + F(Dart_SendPortGetId, Dart_Handle, \ + (Dart_Handle port, Dart_Port_DL * port_id)) \ + /* Scopes */ \ + F(Dart_EnterScope, void, (void)) \ + F(Dart_ExitScope, void, (void)) \ + /* Objects */ \ + F(Dart_IsNull, bool, (Dart_Handle)) \ + F(Dart_Null, Dart_Handle, (void)) + +// dart_api.h symbols that have been deprecated but are retained here +// until we can make a breaking change bumping the major version number +// (DART_API_DL_MAJOR_VERSION) +#define DART_API_DEPRECATED_DL_SYMBOLS(F) \ + F(Dart_UpdateExternalSize, void, \ + (Dart_WeakPersistentHandle object, intptr_t external_allocation_size)) \ + F(Dart_UpdateFinalizableExternalSize, void, \ + (Dart_FinalizableHandle object, Dart_Handle strong_ref_to_object, \ + intptr_t external_allocation_size)) + +#define DART_API_ALL_DL_SYMBOLS(F) \ + DART_NATIVE_API_DL_SYMBOLS(F) \ + DART_API_DL_SYMBOLS(F) +// IMPORTANT! Never update these signatures without properly updating +// DART_API_DL_MAJOR_VERSION and DART_API_DL_MINOR_VERSION. +// +// End of verbatim copy. +// ============================================================================ + +// Copy of definition of DART_EXPORT without 'used' attribute. +// +// The 'used' attribute cannot be used with DART_API_ALL_DL_SYMBOLS because +// they are not function declarations, but variable declarations with a +// function pointer type. +// +// The function pointer variables are initialized with the addresses of the +// functions in the VM. If we were to use function declarations instead, we +// would need to forward the call to the VM adding indirection. +#if defined(__CYGWIN__) +#error Tool chain and platform not supported. +#elif defined(_WIN32) +#if defined(DART_SHARED_LIB) +#define DART_EXPORT_DL DART_EXTERN_C __declspec(dllexport) +#else +#define DART_EXPORT_DL DART_EXTERN_C +#endif +#else +#if __GNUC__ >= 4 +#if defined(DART_SHARED_LIB) +#define DART_EXPORT_DL DART_EXTERN_C __attribute__((visibility("default"))) +#else +#define DART_EXPORT_DL DART_EXTERN_C +#endif +#else +#error Tool chain not supported. +#endif +#endif + +#define DART_API_DL_DECLARATIONS(name, R, A) \ + typedef R(*name##_Type) A; \ + DART_EXPORT_DL name##_Type name##_DL; + +DART_API_ALL_DL_SYMBOLS(DART_API_DL_DECLARATIONS) +DART_API_DEPRECATED_DL_SYMBOLS(DART_API_DL_DECLARATIONS) + +#undef DART_API_DL_DECLARATIONS + +#undef DART_EXPORT_DL + +#endif /* RUNTIME_INCLUDE_DART_API_DL_H_ */ /* NOLINT */ diff --git a/pkgs/objective_c/src/include/dart_embedder_api.h b/pkgs/objective_c/src/include/dart_embedder_api.h new file mode 100644 index 0000000000..bc03773409 --- /dev/null +++ b/pkgs/objective_c/src/include/dart_embedder_api.h @@ -0,0 +1,105 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +#ifndef RUNTIME_INCLUDE_DART_EMBEDDER_API_H_ +#define RUNTIME_INCLUDE_DART_EMBEDDER_API_H_ + +#include "include/dart_api.h" +#include "include/dart_tools_api.h" + +namespace dart { +namespace embedder { + +// Initialize all subsystems of the embedder. +// +// Must be called before the `Dart_Initialize()` call to initialize the +// Dart VM. +// +// Returns true on success and false otherwise, in which case error would +// contain error message. +DART_WARN_UNUSED_RESULT bool InitOnce(char** error); + +// Cleans up all subsystems of the embedder. +// +// Must be called after the `Dart_Cleanup()` call to initialize the +// Dart VM. +void Cleanup(); + +// Common arguments that are passed to isolate creation callback and to +// API methods that create isolates. +struct IsolateCreationData { + // URI for the main script that will be running in the isolate. + const char* script_uri; + + // Advisory name of the main method that will be run by isolate. + // Only used for error messages. + const char* main; + + // Isolate creation flags. Might be absent. + Dart_IsolateFlags* flags; + + // Isolate group callback data. + void* isolate_group_data; + + // Isolate callback data. + void* isolate_data; +}; + +// Create and initialize kernel-service isolate. This method should be used +// when VM invokes isolate creation callback with DART_KERNEL_ISOLATE_NAME as +// script_uri. +// The isolate is created from the given snapshot (might be kernel data or +// app-jit snapshot). +DART_WARN_UNUSED_RESULT Dart_Isolate +CreateKernelServiceIsolate(const IsolateCreationData& data, + const uint8_t* buffer, + intptr_t buffer_size, + char** error); + +// Service isolate configuration. +struct VmServiceConfiguration { + enum { kBindHttpServerToAFreePort = 0, kDoNotAutoStartHttpServer = -1 }; + + // Address to which HTTP server will be bound. + const char* ip; + + // Default port. See enum above for special values. + int port; + + // If non-null, connection information for the VM service will be output to a + // file in JSON format at the location specified. + const char* write_service_info_filename; + + // TODO(vegorov) document these ones. + bool dev_mode; + bool deterministic; + bool disable_auth_codes; +}; + +// Create and initialize vm-service isolate from the given AOT snapshot, which +// is expected to contain all necessary 'vm-service' libraries. +// This method should be used when VM invokes isolate creation callback with +// DART_VM_SERVICE_ISOLATE_NAME as script_uri. +DART_WARN_UNUSED_RESULT Dart_Isolate +CreateVmServiceIsolate(const IsolateCreationData& data, + const VmServiceConfiguration& config, + const uint8_t* isolate_data, + const uint8_t* isolate_instr, + char** error); + +// Create and initialize vm-service isolate from the given kernel binary, which +// is expected to contain all necessary 'vm-service' libraries. +// This method should be used when VM invokes isolate creation callback with +// DART_VM_SERVICE_ISOLATE_NAME as script_uri. +DART_WARN_UNUSED_RESULT Dart_Isolate +CreateVmServiceIsolateFromKernel(const IsolateCreationData& data, + const VmServiceConfiguration& config, + const uint8_t* kernel_buffer, + intptr_t kernel_buffer_size, + char** error); + +} // namespace embedder +} // namespace dart + +#endif // RUNTIME_INCLUDE_DART_EMBEDDER_API_H_ diff --git a/pkgs/objective_c/src/include/dart_native_api.h b/pkgs/objective_c/src/include/dart_native_api.h new file mode 100644 index 0000000000..79194e03ba --- /dev/null +++ b/pkgs/objective_c/src/include/dart_native_api.h @@ -0,0 +1,207 @@ +/* + * Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file + * for details. All rights reserved. Use of this source code is governed by a + * BSD-style license that can be found in the LICENSE file. + */ + +#ifndef RUNTIME_INCLUDE_DART_NATIVE_API_H_ +#define RUNTIME_INCLUDE_DART_NATIVE_API_H_ + +#include "dart_api.h" /* NOLINT */ + +/* + * ========================================== + * Message sending/receiving from native code + * ========================================== + */ + +/** + * A Dart_CObject is used for representing Dart objects as native C + * data outside the Dart heap. These objects are totally detached from + * the Dart heap. Only a subset of the Dart objects have a + * representation as a Dart_CObject. + * + * The string encoding in the 'value.as_string' is UTF-8. + * + * All the different types from dart:typed_data are exposed as type + * kTypedData. The specific type from dart:typed_data is in the type + * field of the as_typed_data structure. The length in the + * as_typed_data structure is always in bytes. + * + * The data for kTypedData is copied on message send and ownership remains with + * the caller. The ownership of data for kExternalTyped is passed to the VM on + * message send and returned when the VM invokes the + * Dart_HandleFinalizer callback; a non-NULL callback must be provided. + * + * Note that Dart_CObject_kNativePointer is intended for internal use by + * dart:io implementation and has no connection to dart:ffi Pointer class. + * It represents a pointer to a native resource of a known type. + * The receiving side will only see this pointer as an integer and will not + * see the specified finalizer. + * The specified finalizer will only be invoked if the message is not delivered. + */ +typedef enum { + Dart_CObject_kNull = 0, + Dart_CObject_kBool, + Dart_CObject_kInt32, + Dart_CObject_kInt64, + Dart_CObject_kDouble, + Dart_CObject_kString, + Dart_CObject_kArray, + Dart_CObject_kTypedData, + Dart_CObject_kExternalTypedData, + Dart_CObject_kSendPort, + Dart_CObject_kCapability, + Dart_CObject_kNativePointer, + Dart_CObject_kUnsupported, + Dart_CObject_kUnmodifiableExternalTypedData, + Dart_CObject_kNumberOfTypes +} Dart_CObject_Type; +// This enum is versioned by DART_API_DL_MAJOR_VERSION, only add at the end +// and bump the DART_API_DL_MINOR_VERSION. + +typedef struct _Dart_CObject { + Dart_CObject_Type type; + union { + bool as_bool; + int32_t as_int32; + int64_t as_int64; + double as_double; + const char* as_string; + struct { + Dart_Port id; + Dart_Port origin_id; + } as_send_port; + struct { + int64_t id; + } as_capability; + struct { + intptr_t length; + struct _Dart_CObject** values; + } as_array; + struct { + Dart_TypedData_Type type; + intptr_t length; /* in elements, not bytes */ + const uint8_t* values; + } as_typed_data; + struct { + Dart_TypedData_Type type; + intptr_t length; /* in elements, not bytes */ + uint8_t* data; + void* peer; + Dart_HandleFinalizer callback; + } as_external_typed_data; + struct { + intptr_t ptr; + intptr_t size; + Dart_HandleFinalizer callback; + } as_native_pointer; + } value; +} Dart_CObject; +// This struct is versioned by DART_API_DL_MAJOR_VERSION, bump the version when +// changing this struct. + +/** + * Posts a message on some port. The message will contain the Dart_CObject + * object graph rooted in 'message'. + * + * While the message is being sent the state of the graph of Dart_CObject + * structures rooted in 'message' should not be accessed, as the message + * generation will make temporary modifications to the data. When the message + * has been sent the graph will be fully restored. + * + * If true is returned, the message was enqueued, and finalizers for external + * typed data will eventually run, even if the receiving isolate shuts down + * before processing the message. If false is returned, the message was not + * enqueued and ownership of external typed data in the message remains with the + * caller. + * + * This function may be called on any thread when the VM is running (that is, + * after Dart_Initialize has returned and before Dart_Cleanup has been called). + * + * \param port_id The destination port. + * \param message The message to send. + * + * \return True if the message was posted. + */ +DART_EXPORT bool Dart_PostCObject(Dart_Port port_id, Dart_CObject* message); + +/** + * Posts a message on some port. The message will contain the integer 'message'. + * + * \param port_id The destination port. + * \param message The message to send. + * + * \return True if the message was posted. + */ +DART_EXPORT bool Dart_PostInteger(Dart_Port port_id, int64_t message); + +/** + * A native message handler. + * + * This handler is associated with a native port by calling + * Dart_NewNativePort. + * + * The message received is decoded into the message structure. The + * lifetime of the message data is controlled by the caller. All the + * data references from the message are allocated by the caller and + * will be reclaimed when returning to it. + */ +typedef void (*Dart_NativeMessageHandler)(Dart_Port dest_port_id, + Dart_CObject* message); + +/** + * Creates a new native port. When messages are received on this + * native port, then they will be dispatched to the provided native + * message handler. + * + * \param name The name of this port in debugging messages. + * \param handler The C handler to run when messages arrive on the port. + * \param handle_concurrently Is it okay to process requests on this + * native port concurrently? + * + * \return If successful, returns the port id for the native port. In + * case of error, returns ILLEGAL_PORT. + */ +DART_EXPORT Dart_Port Dart_NewNativePort(const char* name, + Dart_NativeMessageHandler handler, + bool handle_concurrently); +/* TODO(turnidge): Currently handle_concurrently is ignored. */ + +/** + * Closes the native port with the given id. + * + * The port must have been allocated by a call to Dart_NewNativePort. + * + * \param native_port_id The id of the native port to close. + * + * \return Returns true if the port was closed successfully. + */ +DART_EXPORT bool Dart_CloseNativePort(Dart_Port native_port_id); + +/* + * ================== + * Verification Tools + * ================== + */ + +/** + * Forces all loaded classes and functions to be compiled eagerly in + * the current isolate.. + * + * TODO(turnidge): Document. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_CompileAll(void); + +/** + * Finalizes all classes. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_FinalizeAllClasses(void); + +/* This function is intentionally undocumented. + * + * It should not be used outside internal tests. + */ +DART_EXPORT void* Dart_ExecuteInternalCommand(const char* command, void* arg); + +#endif /* INCLUDE_DART_NATIVE_API_H_ */ /* NOLINT */ diff --git a/pkgs/objective_c/src/include/dart_tools_api.h b/pkgs/objective_c/src/include/dart_tools_api.h new file mode 100644 index 0000000000..c118bc46de --- /dev/null +++ b/pkgs/objective_c/src/include/dart_tools_api.h @@ -0,0 +1,627 @@ +// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +#ifndef RUNTIME_INCLUDE_DART_TOOLS_API_H_ +#define RUNTIME_INCLUDE_DART_TOOLS_API_H_ + +#include "dart_api.h" /* NOLINT */ + +/** \mainpage Dart Tools Embedding API Reference + * + * This reference describes the Dart embedding API for tools. Tools include + * a debugger, service protocol, and timeline. + * + * NOTE: The APIs described in this file are unstable and subject to change. + * + * This reference is generated from the header include/dart_tools_api.h. + */ + +/* + * ======== + * Debugger + * ======== + */ + +/** + * ILLEGAL_ISOLATE_ID is a number guaranteed never to be associated with a + * valid isolate. + */ +#define ILLEGAL_ISOLATE_ID ILLEGAL_PORT + +/** + * ILLEGAL_ISOLATE_GROUP_ID is a number guaranteed never to be associated with a + * valid isolate group. + */ +#define ILLEGAL_ISOLATE_GROUP_ID 0 + +/* + * ======= + * Service + * ======= + */ + +/** + * A service request callback function. + * + * These callbacks, registered by the embedder, are called when the VM receives + * a service request it can't handle and the service request command name + * matches one of the embedder registered handlers. + * + * The return value of the callback indicates whether the response + * should be used as a regular result or an error result. + * Specifically, if the callback returns true, a regular JSON-RPC + * response is built in the following way: + * + * { + * "jsonrpc": "2.0", + * "result": , + * "id": , + * } + * + * If the callback returns false, a JSON-RPC error is built like this: + * + * { + * "jsonrpc": "2.0", + * "error": , + * "id": , + * } + * + * \param method The rpc method name. + * \param param_keys Service requests can have key-value pair parameters. The + * keys and values are flattened and stored in arrays. + * \param param_values The values associated with the keys. + * \param num_params The length of the param_keys and param_values arrays. + * \param user_data The user_data pointer registered with this handler. + * \param result A C string containing a valid JSON object. The returned + * pointer will be freed by the VM by calling free. + * + * \return True if the result is a regular JSON-RPC response, false if the + * result is a JSON-RPC error. + */ +typedef bool (*Dart_ServiceRequestCallback)(const char* method, + const char** param_keys, + const char** param_values, + intptr_t num_params, + void* user_data, + const char** json_object); + +/** + * Register a Dart_ServiceRequestCallback to be called to handle + * requests for the named rpc on a specific isolate. The callback will + * be invoked with the current isolate set to the request target. + * + * \param method The name of the method that this callback is responsible for. + * \param callback The callback to invoke. + * \param user_data The user data passed to the callback. + * + * NOTE: If multiple callbacks with the same name are registered, only + * the last callback registered will be remembered. + */ +DART_EXPORT void Dart_RegisterIsolateServiceRequestCallback( + const char* method, + Dart_ServiceRequestCallback callback, + void* user_data); + +/** + * Register a Dart_ServiceRequestCallback to be called to handle + * requests for the named rpc. The callback will be invoked without a + * current isolate. + * + * \param method The name of the command that this callback is responsible for. + * \param callback The callback to invoke. + * \param user_data The user data passed to the callback. + * + * NOTE: If multiple callbacks with the same name are registered, only + * the last callback registered will be remembered. + */ +DART_EXPORT void Dart_RegisterRootServiceRequestCallback( + const char* method, + Dart_ServiceRequestCallback callback, + void* user_data); + +/** + * Embedder information which can be requested by the VM for internal or + * reporting purposes. + * + * The pointers in this structure are not going to be cached or freed by the VM. + */ + +#define DART_EMBEDDER_INFORMATION_CURRENT_VERSION (0x00000001) + +typedef struct { + int32_t version; + const char* name; // [optional] The name of the embedder + int64_t current_rss; // [optional] the current RSS of the embedder + int64_t max_rss; // [optional] the maximum RSS of the embedder +} Dart_EmbedderInformation; + +/** + * Callback provided by the embedder that is used by the VM to request + * information. + * + * \return Returns a pointer to a Dart_EmbedderInformation structure. + * The embedder keeps the ownership of the structure and any field in it. + * The embedder must ensure that the structure will remain valid until the + * next invocation of the callback. + */ +typedef void (*Dart_EmbedderInformationCallback)( + Dart_EmbedderInformation* info); + +/** + * Register a Dart_ServiceRequestCallback to be called to handle + * requests for the named rpc. The callback will be invoked without a + * current isolate. + * + * \param method The name of the command that this callback is responsible for. + * \param callback The callback to invoke. + * \param user_data The user data passed to the callback. + * + * NOTE: If multiple callbacks are registered, only the last callback registered + * will be remembered. + */ +DART_EXPORT void Dart_SetEmbedderInformationCallback( + Dart_EmbedderInformationCallback callback); + +/** + * Invoke a vm-service method and wait for its result. + * + * \param request_json The utf8-encoded json-rpc request. + * \param request_json_length The length of the json-rpc request. + * + * \param response_json The returned utf8-encoded json response, must be + * free()ed by caller. + * \param response_json_length The length of the returned json response. + * \param error An optional error, must be free()ed by caller. + * + * \return Whether the call was successfully performed. + * + * NOTE: This method does not need a current isolate and must not have the + * vm-isolate being the current isolate. It must be called after + * Dart_Initialize() and before Dart_Cleanup(). + */ +DART_EXPORT bool Dart_InvokeVMServiceMethod(uint8_t* request_json, + intptr_t request_json_length, + uint8_t** response_json, + intptr_t* response_json_length, + char** error); + +/* + * ======== + * Event Streams + * ======== + */ + +/** + * A callback invoked when the VM service gets a request to listen to + * some stream. + * + * \return Returns true iff the embedder supports the named stream id. + */ +typedef bool (*Dart_ServiceStreamListenCallback)(const char* stream_id); + +/** + * A callback invoked when the VM service gets a request to cancel + * some stream. + */ +typedef void (*Dart_ServiceStreamCancelCallback)(const char* stream_id); + +/** + * Adds VM service stream callbacks. + * + * \param listen_callback A function pointer to a listen callback function. + * A listen callback function should not be already set when this function + * is called. A NULL value removes the existing listen callback function + * if any. + * + * \param cancel_callback A function pointer to a cancel callback function. + * A cancel callback function should not be already set when this function + * is called. A NULL value removes the existing cancel callback function + * if any. + * + * \return Success if the callbacks were added. Otherwise, returns an + * error handle. + */ +DART_EXPORT char* Dart_SetServiceStreamCallbacks( + Dart_ServiceStreamListenCallback listen_callback, + Dart_ServiceStreamCancelCallback cancel_callback); + +/** + * Sends a data event to clients of the VM Service. + * + * A data event is used to pass an array of bytes to subscribed VM + * Service clients. For example, in the standalone embedder, this is + * function used to provide WriteEvents on the Stdout and Stderr + * streams. + * + * If the embedder passes in a stream id for which no client is + * subscribed, then the event is ignored. + * + * \param stream_id The id of the stream on which to post the event. + * + * \param event_kind A string identifying what kind of event this is. + * For example, 'WriteEvent'. + * + * \param bytes A pointer to an array of bytes. + * + * \param bytes_length The length of the byte array. + * + * \return NULL if the arguments are well formed. Otherwise, returns an + * error string. The caller is responsible for freeing the error message. + */ +DART_EXPORT char* Dart_ServiceSendDataEvent(const char* stream_id, + const char* event_kind, + const uint8_t* bytes, + intptr_t bytes_length); + +/* + * ======== + * Reload support + * ======== + * + * These functions are used to implement reloading in the Dart VM. + * This is an experimental feature, so embedders should be prepared + * for these functions to change. + */ + +/** + * A callback which determines whether the file at some url has been + * modified since some time. If the file cannot be found, true should + * be returned. + */ +typedef bool (*Dart_FileModifiedCallback)(const char* url, int64_t since); + +DART_EXPORT char* Dart_SetFileModifiedCallback( + Dart_FileModifiedCallback file_modified_callback); + +/** + * Returns true if isolate is currently reloading. + */ +DART_EXPORT bool Dart_IsReloading(); + +/* + * ======== + * Timeline + * ======== + */ + +/** + * Enable tracking of specified timeline category. This is operational + * only when systrace timeline functionality is turned on. + * + * \param categories A comma separated list of categories that need to + * be enabled, the categories are + * "all" : All categories + * "API" - Execution of Dart C API functions + * "Compiler" - Execution of Dart JIT compiler + * "CompilerVerbose" - More detailed Execution of Dart JIT compiler + * "Dart" - Execution of Dart code + * "Debugger" - Execution of Dart debugger + * "Embedder" - Execution of Dart embedder code + * "GC" - Execution of Dart Garbage Collector + * "Isolate" - Dart Isolate lifecycle execution + * "VM" - Execution in Dart VM runtime code + * "" - None + * + * When "all" is specified all the categories are enabled. + * When a comma separated list of categories is specified, the categories + * that are specified will be enabled and the rest will be disabled. + * When "" is specified all the categories are disabled. + * The category names are case sensitive. + * eg: Dart_EnableTimelineCategory("all"); + * Dart_EnableTimelineCategory("GC,API,Isolate"); + * Dart_EnableTimelineCategory("GC,Debugger,Dart"); + * + * \return True if the categories were successfully enabled, False otherwise. + */ +DART_EXPORT bool Dart_SetEnabledTimelineCategory(const char* categories); + +/** + * Returns a timestamp in microseconds. This timestamp is suitable for + * passing into the timeline system, and uses the same monotonic clock + * as dart:developer's Timeline.now. + * + * \return A timestamp that can be passed to the timeline system. + */ +DART_EXPORT int64_t Dart_TimelineGetMicros(); + +/** + * Returns a raw timestamp in from the monotonic clock. + * + * \return A raw timestamp from the monotonic clock. + */ +DART_EXPORT int64_t Dart_TimelineGetTicks(); + +/** + * Returns the frequency of the monotonic clock. + * + * \return The frequency of the monotonic clock. + */ +DART_EXPORT int64_t Dart_TimelineGetTicksFrequency(); + +typedef enum { + Dart_Timeline_Event_Begin, // Phase = 'B'. + Dart_Timeline_Event_End, // Phase = 'E'. + Dart_Timeline_Event_Instant, // Phase = 'i'. + Dart_Timeline_Event_Duration, // Phase = 'X'. + Dart_Timeline_Event_Async_Begin, // Phase = 'b'. + Dart_Timeline_Event_Async_End, // Phase = 'e'. + Dart_Timeline_Event_Async_Instant, // Phase = 'n'. + Dart_Timeline_Event_Counter, // Phase = 'C'. + Dart_Timeline_Event_Flow_Begin, // Phase = 's'. + Dart_Timeline_Event_Flow_Step, // Phase = 't'. + Dart_Timeline_Event_Flow_End, // Phase = 'f'. +} Dart_Timeline_Event_Type; + +/** + * Add a timeline event to the embedder stream. + * + * Note regarding flow events: events must be associated with flow IDs in two + * different ways to allow flow events to be serialized correctly in both + * Chrome's JSON trace event format and Perfetto's proto trace format. Events + * of type |Dart_Timeline_Event_Flow_Begin|, |Dart_Timeline_Event_Flow_Step|, + * and |Dart_Timeline_Event_Flow_End| must be reported to support serialization + * in Chrome's trace format. The |flow_ids| argument must be supplied when + * reporting events of type |Dart_Timeline_Event_Begin|, + * |Dart_Timeline_Event_Duration|, |Dart_Timeline_Event_Instant|, + * |Dart_Timeline_Event_Async_Begin|, and |Dart_Timeline_Event_Async_Instant| to + * support serialization in Perfetto's proto format. + * + * The Dart VM can use various underlying recorders depending on configuration + * and operating system. Many recorders do not support all event types; + * unsupported event types are siliently dropped. Some recorders do not accept + * timestamps as input, instead implicitly using the time the event is recorded. + * For maximum compatibility, record events with the Begin and End types as they + * occur instead of using the Duration type or buffering. + * + * \param label The name of the event. Its lifetime must extend at least until + * Dart_Cleanup. + * \param timestamp0 The first timestamp of the event. + * \param timestamp1_or_id When reporting an event of type + * |Dart_Timeline_Event_Duration|, the second (end) timestamp of the event + * should be passed through |timestamp1_or_id|. When reporting an event of + * type |Dart_Timeline_Event_Async_Begin|, |Dart_Timeline_Event_Async_End|, + * or |Dart_Timeline_Event_Async_Instant|, the async ID associated with the + * event should be passed through |timestamp1_or_id|. When reporting an + * event of type |Dart_Timeline_Event_Flow_Begin|, + * |Dart_Timeline_Event_Flow_Step|, or |Dart_Timeline_Event_Flow_End|, the + * flow ID associated with the event should be passed through + * |timestamp1_or_id|. When reporting an event of type + * |Dart_Timeline_Event_Begin| or |Dart_Timeline_Event_End|, the event ID + * associated with the event should be passed through |timestamp1_or_id|. + * Note that this event ID will only be used by the MacOS recorder. The + * argument to |timestamp1_or_id| will not be used when reporting events of + * other types. + * \param flow_id_count The number of flow IDs associated with this event. + * \param flow_ids An array of flow IDs associated with this event. The array + * may be reclaimed when this call returns. + * \param argument_count The number of argument names and values. + * \param argument_names An array of names of the arguments. The lifetime of the + * names must extend at least until Dart_Cleanup. The array may be reclaimed + * when this call returns. + * \param argument_values An array of values of the arguments. The values and + * the array may be reclaimed when this call returns. + */ +DART_EXPORT void Dart_RecordTimelineEvent(const char* label, + int64_t timestamp0, + int64_t timestamp1_or_id, + intptr_t flow_id_count, + const int64_t* flow_ids, + Dart_Timeline_Event_Type type, + intptr_t argument_count, + const char** argument_names, + const char** argument_values); + +/** + * Associates a name with the current thread. This name will be used to name + * threads in the timeline. Can only be called after a call to Dart_Initialize. + * + * \param name The name of the thread. + */ +DART_EXPORT void Dart_SetThreadName(const char* name); + +typedef struct { + const char* name; + const char* value; +} Dart_TimelineRecorderEvent_Argument; + +#define DART_TIMELINE_RECORDER_CURRENT_VERSION (0x00000002) + +typedef struct { + /* Set to DART_TIMELINE_RECORDER_CURRENT_VERSION */ + int32_t version; + + /* The event's type / phase. */ + Dart_Timeline_Event_Type type; + + /* The event's timestamp according to the same clock as + * Dart_TimelineGetMicros. For a duration event, this is the beginning time. + */ + int64_t timestamp0; + + /** + * For a duration event, this is the end time. For an async event, this is the + * async ID. For a flow event, this is the flow ID. For a begin or end event, + * this is the event ID (which is only referenced by the MacOS recorder). + */ + int64_t timestamp1_or_id; + + /* The current isolate of the event, as if by Dart_GetMainPortId, or + * ILLEGAL_PORT if the event had no current isolate. */ + Dart_Port isolate; + + /* The current isolate group of the event, as if by + * Dart_CurrentIsolateGroupId, or ILLEGAL_PORT if the event had no current + * isolate group. */ + Dart_IsolateGroupId isolate_group; + + /* The callback data associated with the isolate if any. */ + void* isolate_data; + + /* The callback data associated with the isolate group if any. */ + void* isolate_group_data; + + /* The name / label of the event. */ + const char* label; + + /* The stream / category of the event. */ + const char* stream; + + intptr_t argument_count; + Dart_TimelineRecorderEvent_Argument* arguments; +} Dart_TimelineRecorderEvent; + +/** + * Callback provided by the embedder to handle the completion of timeline + * events. + * + * \param event A timeline event that has just been completed. The VM keeps + * ownership of the event and any field in it (i.e., the embedder should copy + * any values it needs after the callback returns). + */ +typedef void (*Dart_TimelineRecorderCallback)( + Dart_TimelineRecorderEvent* event); + +/** + * Register a `Dart_TimelineRecorderCallback` to be called as timeline events + * are completed. + * + * The callback will be invoked without a current isolate. + * + * The callback will be invoked on the thread completing the event. Because + * `Dart_RecordTimelineEvent` may be called by any thread, the callback may be + * called on any thread. + * + * The callback may be invoked at any time after `Dart_Initialize` is called and + * before `Dart_Cleanup` returns. + * + * If multiple callbacks are registered, only the last callback registered + * will be remembered. Providing a NULL callback will clear the registration + * (i.e., a NULL callback produced a no-op instead of a crash). + * + * Setting a callback is insufficient to receive events through the callback. The + * VM flag `timeline_recorder` must also be set to `callback`. + */ +DART_EXPORT void Dart_SetTimelineRecorderCallback( + Dart_TimelineRecorderCallback callback); + +/* + * ======= + * Metrics + * ======= + */ + +/** + * Return metrics gathered for the VM and individual isolates. + */ +DART_EXPORT int64_t +Dart_IsolateGroupHeapOldUsedMetric(Dart_IsolateGroup group); // Byte +DART_EXPORT int64_t +Dart_IsolateGroupHeapOldCapacityMetric(Dart_IsolateGroup group); // Byte +DART_EXPORT int64_t +Dart_IsolateGroupHeapOldExternalMetric(Dart_IsolateGroup group); // Byte +DART_EXPORT int64_t +Dart_IsolateGroupHeapNewUsedMetric(Dart_IsolateGroup group); // Byte +DART_EXPORT int64_t +Dart_IsolateGroupHeapNewCapacityMetric(Dart_IsolateGroup group); // Byte +DART_EXPORT int64_t +Dart_IsolateGroupHeapNewExternalMetric(Dart_IsolateGroup group); // Byte + +/* + * ======== + * UserTags + * ======== + */ + +/* + * Gets the current isolate's currently set UserTag instance. + * + * \return The currently set UserTag instance. + */ +DART_EXPORT Dart_Handle Dart_GetCurrentUserTag(); + +/* + * Gets the current isolate's default UserTag instance. + * + * \return The default UserTag with label 'Default' + */ +DART_EXPORT Dart_Handle Dart_GetDefaultUserTag(); + +/* + * Creates a new UserTag instance. + * + * \param label The name of the new UserTag. + * + * \return The newly created UserTag instance or an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewUserTag(const char* label); + +/* + * Updates the current isolate's UserTag to a new value. + * + * \param user_tag The UserTag to be set as the current UserTag. + * + * \return The previously set UserTag instance or an error handle. + */ +DART_EXPORT Dart_Handle Dart_SetCurrentUserTag(Dart_Handle user_tag); + +/* + * Returns the label of a given UserTag instance. + * + * \param user_tag The UserTag from which the label will be retrieved. + * + * \return The UserTag's label. NULL if the user_tag is invalid. The caller is + * responsible for freeing the returned label. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT char* Dart_GetUserTagLabel( + Dart_Handle user_tag); + +/* + * ======= + * Heap Snapshot + * ======= + */ + +/** + * Callback provided by the caller of `Dart_WriteHeapSnapshot` which is + * used to write out chunks of the requested heap snapshot. + * + * \param context An opaque context which was passed to `Dart_WriteHeapSnapshot` + * together with this callback. + * + * \param buffer Pointer to the buffer containing a chunk of the snapshot. + * The callback owns the buffer and needs to `free` it. + * + * \param size Number of bytes in the `buffer` to be written. + * + * \param is_last Set to `true` for the last chunk. The callback will not + * be invoked again after it was invoked once with `is_last` set to `true`. + */ +typedef void (*Dart_HeapSnapshotWriteChunkCallback)(void* context, + uint8_t* buffer, + intptr_t size, + bool is_last); + +/** + * Generate heap snapshot of the current isolate group and stream it into the + * given `callback`. VM would produce snapshot in chunks and send these chunks + * one by one back to the embedder by invoking the provided `callback`. + * + * This API enables embedder to stream snapshot into a file or socket without + * allocating a buffer to hold the whole snapshot in memory. + * + * The isolate group will be paused for the duration of this operation. + * + * \param write Callback used to write chunks of the heap snapshot. + * + * \param context Opaque context which would be passed on each invocation of + * `write` callback. + * + * \returns `nullptr` if the operation is successful otherwise error message. + * Caller owns error message string and needs to `free` it. + */ +DART_EXPORT char* Dart_WriteHeapSnapshot( + Dart_HeapSnapshotWriteChunkCallback write, + void* context); + +#endif // RUNTIME_INCLUDE_DART_TOOLS_API_H_ diff --git a/pkgs/objective_c/src/include/dart_version.h b/pkgs/objective_c/src/include/dart_version.h new file mode 100644 index 0000000000..cb343c0d3f --- /dev/null +++ b/pkgs/objective_c/src/include/dart_version.h @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file + * for details. All rights reserved. Use of this source code is governed by a + * BSD-style license that can be found in the LICENSE file. + */ + +#ifndef RUNTIME_INCLUDE_DART_VERSION_H_ +#define RUNTIME_INCLUDE_DART_VERSION_H_ + +// On breaking changes the major version is increased. +// On backwards compatible changes the minor version is increased. +// The versioning covers the symbols exposed in dart_api_dl.h +#define DART_API_DL_MAJOR_VERSION 2 +#define DART_API_DL_MINOR_VERSION 4 + +#endif /* RUNTIME_INCLUDE_DART_VERSION_H_ */ /* NOLINT */ diff --git a/pkgs/objective_c/src/include/internal/dart_api_dl_impl.h b/pkgs/objective_c/src/include/internal/dart_api_dl_impl.h new file mode 100644 index 0000000000..e4a5689314 --- /dev/null +++ b/pkgs/objective_c/src/include/internal/dart_api_dl_impl.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file + * for details. All rights reserved. Use of this source code is governed by a + * BSD-style license that can be found in the LICENSE file. + */ + +#ifndef RUNTIME_INCLUDE_INTERNAL_DART_API_DL_IMPL_H_ +#define RUNTIME_INCLUDE_INTERNAL_DART_API_DL_IMPL_H_ + +typedef struct { + const char* name; + void (*function)(void); +} DartApiEntry; + +typedef struct { + const int major; + const int minor; + const DartApiEntry* const functions; +} DartApi; + +#endif /* RUNTIME_INCLUDE_INTERNAL_DART_API_DL_IMPL_H_ */ /* NOLINT */ diff --git a/pkgs/objective_c/src/objective_c.c b/pkgs/objective_c/src/objective_c.c new file mode 100644 index 0000000000..85bc0bc58d --- /dev/null +++ b/pkgs/objective_c/src/objective_c.c @@ -0,0 +1,13 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +#include "include/dart_api_dl.h" +#include "objective_c.h" +#include "objective_c_runtime_types.h" + +// Dispose helper for ObjC blocks that wrap a Dart closure. For these blocks, +// the target is an int ID, and the dispose_port is listening for these IDs. +void disposeObjCBlockWithClosure(ObjCBlock* block) { + Dart_PostInteger_DL(block->dispose_port, (int64_t)block->target); +} diff --git a/pkgs/objective_c/src/objective_c.h b/pkgs/objective_c/src/objective_c.h new file mode 100644 index 0000000000..cfa43a640a --- /dev/null +++ b/pkgs/objective_c/src/objective_c.h @@ -0,0 +1,13 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +#ifndef OBJECTIVE_C_SRC_OBJECTIVE_C_H_ +#define OBJECTIVE_C_SRC_OBJECTIVE_C_H_ + +#include "objective_c_runtime_types.h" + +// Dispose helper for ObjC blocks that wrap a Dart closure. +void disposeObjCBlockWithClosure(ObjCBlock* block); + +#endif // OBJECTIVE_C_SRC_OBJECTIVE_C_H_ diff --git a/pkgs/objective_c/src/objective_c_runtime_functions.h b/pkgs/objective_c/src/objective_c_runtime_functions.h new file mode 100644 index 0000000000..0df7ddfead --- /dev/null +++ b/pkgs/objective_c/src/objective_c_runtime_functions.h @@ -0,0 +1,31 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// This file exposes a subset of the Objective C runtime. Ideally we'd just run +// ffigen directly on the runtime headers that come with XCode, but those +// headers don't have everything we need (e.g. the ObjCBlock struct). + +#ifndef OBJECTIVE_C_SRC_OBJECTIVE_C_RUNTIME_FUNCTIONS_H_ +#define OBJECTIVE_C_SRC_OBJECTIVE_C_RUNTIME_FUNCTIONS_H_ + +#include "include/dart_api_dl.h" +#include "objective_c_runtime_types.h" + +ObjCSelector* sel_registerName(const char *name); +ObjCObject* objc_getClass(const char *name); +ObjCObject* objc_retain(ObjCObject* object); +void objc_release(ObjCObject* object); + +// The signature of this function is just a placeholder. This function is used by +// every method invocation, and is cast to every signature we need. +void objc_msgSend(); +void objc_msgSend_fpret(); +void objc_msgSend_stret(); + +extern void* const _NSConcreteGlobalBlock; + +ObjCBlock* _Block_copy(ObjCBlock* object); +void _Block_release(ObjCBlock* object); + +#endif // OBJECTIVE_C_SRC_OBJECTIVE_C_RUNTIME_FUNCTIONS_H_ diff --git a/pkgs/objective_c/src/objective_c_runtime_types.h b/pkgs/objective_c/src/objective_c_runtime_types.h new file mode 100644 index 0000000000..0499da5e48 --- /dev/null +++ b/pkgs/objective_c/src/objective_c_runtime_types.h @@ -0,0 +1,38 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// This file exposes a subset of the Objective C runtime. Ideally we'd just run +// ffigen directly on the runtime headers that come with XCode, but those +// headers don't have everything we need (e.g. the ObjCBlock struct). + +#ifndef OBJECTIVE_C_SRC_OBJECTIVE_C_RUNTIME_TYPES_H_ +#define OBJECTIVE_C_SRC_OBJECTIVE_C_RUNTIME_TYPES_H_ + +#include "include/dart_api_dl.h" + +typedef struct _ObjCSelector ObjCSelector; +typedef struct _ObjCObject ObjCObject; + +// See https://clang.llvm.org/docs/Block-ABI-Apple.html +typedef struct _ObjCBlockDesc { + unsigned long int reserved; + unsigned long int size; // sizeof(_ObjCBlock) + void (*copy_helper)(void *dst, void *src); + void (*dispose_helper)(void *src); + const char *signature; +} ObjCBlockDesc; + +typedef struct _ObjCBlock { + void *isa; // _NSConcreteGlobalBlock + int flags; + int reserved; + void *invoke; // RET (*invoke)(ObjCBlock *, ARGS...); + ObjCBlockDesc *descriptor; + + // Captured variables follow. These are specific to our use case. + void* target; + Dart_Port dispose_port; +} ObjCBlock; + +#endif // OBJECTIVE_C_SRC_OBJECTIVE_C_RUNTIME_TYPES_H_ diff --git a/pkgs/objective_c/test/generate_code_test.dart b/pkgs/objective_c/test/generate_code_test.dart new file mode 100644 index 0000000000..e899625ff5 --- /dev/null +++ b/pkgs/objective_c/test/generate_code_test.dart @@ -0,0 +1,37 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Objective C support is only available on mac. +@TestOn('mac-os') + +import 'dart:io'; + +import 'package:test/test.dart'; + +import '../tool/generate_code.dart' as generate_code; + +void main() { + group('generate_code.dart', () { + test('Runs without exception', () async { + // As well as testing that this returns normally, this also generates + // coverage info for the parts of ffigen that are gated by + // generate-for-package-objective-c. + await expectLater(generate_code.run(), completes); + + // Sanity check the generated code. + final cBindings = + File('lib/src/c_bindings_generated.dart').readAsStringSync(); + expect(cBindings, contains('sel_registerName')); + expect(cBindings, contains('objc_msgSend')); + expect(cBindings, contains('_NSConcreteGlobalBlock')); + expect(cBindings, contains('_ObjCBlock')); + + final objcBindings = File('lib/src/objective_c_bindings_generated.dart') + .readAsStringSync(); + expect(objcBindings, contains('class NSObject')); + expect(objcBindings, contains('class NSString')); + expect(objcBindings, contains('factory NSString(String str)')); + }); + }); +} diff --git a/pkgs/objective_c/test/interface_lists_test.dart b/pkgs/objective_c/test/interface_lists_test.dart new file mode 100644 index 0000000000..56f896f354 --- /dev/null +++ b/pkgs/objective_c/test/interface_lists_test.dart @@ -0,0 +1,53 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Objective C support is only available on mac. +@TestOn('mac-os') + +import 'dart:io'; + +import 'package:ffigen/src/code_generator/objc_built_in_functions.dart'; +import 'package:test/test.dart'; +import 'package:yaml/yaml.dart'; + +void main() { + group('Verify interface lists', () { + late List yamlInterfaces; + setUpAll(() { + final yaml = loadYaml(File('ffigen_objc.yaml').readAsStringSync()); + yamlInterfaces = yaml['objc-interfaces']['include'] + .map((dynamic i) => i as String) + .toList() as List + ..sort(); + }); + + test('ObjCBuiltInFunctions.builtInInterfaces', () { + expect(ObjCBuiltInFunctions.builtInInterfaces, yamlInterfaces); + }); + + test('package:objective_c exports all the interfaces', () { + final exportFile = File('lib/objective_c.dart').readAsStringSync(); + for (final intf in yamlInterfaces) { + expect(exportFile, contains(intf)); + } + }); + + test('All code genned interfaces are included in the list', () { + final classNameRegExp = RegExp(r'^class (\w+) '); + final allClassNames = []; + for (final line in File('lib/src/objective_c_bindings_generated.dart') + .readAsLinesSync()) { + final match = classNameRegExp.firstMatch(line); + if (match != null) { + final className = match[1]!; + if (!className.startsWith('ObjCBlock')) { + allClassNames.add(className); + } + } + } + allClassNames.sort(); + expect(allClassNames, yamlInterfaces); + }); + }); +} diff --git a/pkgs/objective_c/test/nsdata_test.dart b/pkgs/objective_c/test/nsdata_test.dart new file mode 100644 index 0000000000..c2b07c9ed2 --- /dev/null +++ b/pkgs/objective_c/test/nsdata_test.dart @@ -0,0 +1,93 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Objective C support is only available on mac. +@TestOn('mac-os') + +import 'dart:ffi'; + +import 'package:ffi/ffi.dart'; +import 'package:objective_c/objective_c.dart'; +import 'package:test/test.dart'; + +void main() { + group('NSData', () { + setUpAll(() { + // TODO(https://github.com/dart-lang/native/issues/1068): Remove this. + DynamicLibrary.open('test/objective_c.dylib'); + }); + + group('toNSData', () { + test('empty', () { + final data = [].toNSData(); + expect(data.length, 0); + data.release(); // Make sure that dealloc succeeds. + }); + + test('non empty', () { + final data = [1, 2, 3].toNSData(); + expect(data.length, 3); + expect(data.bytes.cast()[0], 1); + expect(data.bytes.cast()[1], 2); + expect(data.bytes.cast()[2], 3); + data.release(); // Make sure that dealloc succeeds. + }); + + test('non-byte', () { + final data = [257].toNSData(); + expect(data.length, 1); + expect(data.bytes.cast().value, 1); + data.release(); // Make sure that dealloc succeeds. + }); + }); + + group('toList', () { + test('empty', () { + final data = NSData.data(); + expect(data.toList(), isEmpty); + }); + + test('non empty', () { + using((arena) { + final bytes = arena(3); + bytes[0] = 1; + bytes[1] = 2; + bytes[2] = 3; + + final data = NSData.dataWithBytes_length_(bytes.cast(), 3); + expect(data.toList(), [1, 2, 3]); + }); + }); + }); + + group('operator[]', () { + test('in bounds', () { + using((arena) { + final bytes = arena(3); + bytes[0] = 1; + bytes[1] = 2; + bytes[2] = 3; + + final data = NSData.dataWithBytes_length_(bytes.cast(), 3); + expect(data[0], 1); + expect(data[1], 2); + expect(data[2], 3); + }); + }); + + test('out of bounds', () { + using((arena) { + final bytes = arena(3); + bytes[0] = 1; + bytes[1] = 2; + bytes[2] = 3; + + final data = NSData.dataWithBytes_length_(bytes.cast(), 3); + expect(() => data[3], throwsRangeError); + expect(() => data[-1], throwsRangeError); + }); + }); + }); + }); +} diff --git a/pkgs/objective_c/test/nsstring_test.dart b/pkgs/objective_c/test/nsstring_test.dart new file mode 100644 index 0000000000..78714b8ce9 --- /dev/null +++ b/pkgs/objective_c/test/nsstring_test.dart @@ -0,0 +1,34 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Objective C support is only available on mac. +@TestOn('mac-os') + +import 'dart:ffi'; + +import 'package:objective_c/objective_c.dart'; +import 'package:test/test.dart'; + +void main() { + group('NSString', () { + setUpAll(() { + // TODO(https://github.com/dart-lang/native/issues/1068): Remove this. + DynamicLibrary.open('test/objective_c.dylib'); + }); + + for (final s in ['Hello', '🇵🇬', 'Embedded\u0000Null']) { + test('NSString to/from Dart string [$s]', () { + final ns1 = NSString(s); + expect(ns1.length, s.length); + expect(ns1.toString().length, s.length); + expect(ns1.toString(), s); + + final ns2 = s.toNSString(); + expect(ns2.length, s.length); + expect(ns2.toString().length, s.length); + expect(ns2.toString(), s); + }); + } + }); +} diff --git a/pkgs/objective_c/test/setup.dart b/pkgs/objective_c/test/setup.dart new file mode 100644 index 0000000000..441dc7fb26 --- /dev/null +++ b/pkgs/objective_c/test/setup.dart @@ -0,0 +1,46 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// When users import package:objective_c as a plugin, Flutter builds our native +// code automatically. But we want to be able to run tests using `dart test`, so +// we can't use Flutter's build system. So this script builds a dylib containing +// all that native code. + +// ignore_for_file: avoid_print + +import 'dart:ffi'; +import 'dart:io'; + +const inputFiles = ['src/objective_c.c', 'src/include/dart_api_dl.c']; +const outputFile = 'test/objective_c.dylib'; + +void _buildLib(List inputs, String output) { + final args = [ + '-shared', + '-fpic', + ...inputs, + '-I', + 'src', + '-o', + output, + ]; + const exec = 'clang'; + print('Running: $exec ${args.join(" ")}'); + final proc = Process.runSync(exec, args); + if (proc.exitCode != 0) { + exitCode = proc.exitCode; + print(proc.stdout); + print(proc.stderr); + throw Exception('Command failed: $exec ${args.join(" ")}'); + } + print('Generated $output'); +} + +void main() { + Directory.current = Platform.script.resolve('..').path; + _buildLib(inputFiles, outputFile); + + // Sanity check that the dylib was created correctly. + DynamicLibrary.open(outputFile).lookup('disposeObjCBlockWithClosure'); +} diff --git a/pkgs/objective_c/tool/coverage.sh b/pkgs/objective_c/tool/coverage.sh new file mode 100755 index 0000000000..b1e660628f --- /dev/null +++ b/pkgs/objective_c/tool/coverage.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +# for details. All rights reserved. Use of this source code is governed by a +# BSD-style license that can be found in the LICENSE file. + +# Fast fail the script on failures. +set -e + +# Gather coverage. +dart pub global activate coverage +# Generate coverage report. +dart run --pause-isolates-on-exit --disable-service-auth-codes --enable-vm-service=3000 test & +dart pub global run coverage:collect_coverage --wait-paused --uri=http://127.0.0.1:3000/ -o coverage.json --resume-isolates --scope-output=ffigen --scope-output=objective_c +dart pub global run coverage:format_coverage --check-ignore --packages=.dart_tool/package_config.json --lcov -i coverage.json -o lcov.info diff --git a/pkgs/objective_c/tool/data/extra_methods.dart b/pkgs/objective_c/tool/data/extra_methods.dart new file mode 100644 index 0000000000..f40c99a9f5 --- /dev/null +++ b/pkgs/objective_c/tool/data/extra_methods.dart @@ -0,0 +1,20 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Extra methods inserted into NSString by tool/generate_code.dart. +class NSString extends NSObject { + factory NSString(String str) { + final cstr = str.toNativeUtf16(); + final nsstr = stringWithCharacters_length_(cstr.cast(), str.length); + pkg_ffi.calloc.free(cstr); + return nsstr; + } + + @override + String toString() { + final data = + dataUsingEncoding_(0x94000100 /* NSUTF16LittleEndianStringEncoding */); + return data!.bytes.cast().toDartString(length: length); + } +} diff --git a/pkgs/objective_c/tool/generate_code.dart b/pkgs/objective_c/tool/generate_code.dart new file mode 100644 index 0000000000..6d322dcea0 --- /dev/null +++ b/pkgs/objective_c/tool/generate_code.dart @@ -0,0 +1,75 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Runs the ffigen configs, then merges tool/data/extra_methods.dart into the +// Objective C bindings. + +// ignore_for_file: avoid_print + +import 'dart:io'; + +import 'package:ffigen/src/executables/ffigen.dart' as ffigen; + +const cConfig = 'ffigen_c.yaml'; +const objcConfig = 'ffigen_objc.yaml'; +const cBindings = 'lib/src/c_bindings_generated.dart'; +const objcBindings = 'lib/src/objective_c_bindings_generated.dart'; +const extraMethodsFile = 'tool/data/extra_methods.dart'; + +void dartCmd(List args) { + final exec = Platform.resolvedExecutable; + print('Running: $exec ${args.join(" ")}'); + final proc = Process.runSync(exec, args, runInShell: true); + if (proc.exitCode != 0) { + exitCode = proc.exitCode; + print(proc.stdout); + print(proc.stderr); + throw Exception('Command failed: $exec ${args.join(" ")}'); + } +} + +Map parseExtraMethods(String filename) { + final extraMethods = {}; + String? currentClass; + var methods = StringBuffer(); + for (final line in File(filename).readAsLinesSync()) { + if (currentClass == null) { + if (line.startsWith('class ')) { + currentClass = line; + methods = StringBuffer(); + } + } else { + if (line == '}') { + extraMethods[currentClass] = methods.toString(); + } else { + methods.writeln(line); + } + } + } + return extraMethods; +} + +void mergeExtraMethods(String filename, Map extraMethods) { + final out = StringBuffer(); + for (final line in File(filename).readAsLinesSync()) { + out.writeln(line); + final methods = extraMethods[line]; + if (methods != null) { + out.writeln(methods); + } + } + File(filename).writeAsStringSync(out.toString()); +} + +Future run() async { + await ffigen.main(['--no-format', '-v', 'severe', '--config', cConfig]); + await ffigen.main(['--no-format', '-v', 'severe', '--config', objcConfig]); + mergeExtraMethods(objcBindings, parseExtraMethods(extraMethodsFile)); + dartCmd(['format', cBindings, objcBindings]); +} + +Future main() async { + Directory.current = Platform.script.resolve('..').path; + await run(); +}